auto tellsimpafter repetition?



On Nov. 20, 2010, Richard Fateman wrote
--------------------------------------------


>On 11/20/2010 1:32 PM, Edwin Woollett wrote:
>> matchdeclare(aa,atom,bb,atom,cc,atom)$
>> (%i2) matchdeclare(nn,integerp,mm,integerp,pp,integerp)$
>> (%i3) tellsimpafter(
>>         comm (aa^^nn   .  bb^mm,  cc),
>>         aa . comm(aa^^(nn-1) . bb^mm,cc) +
>>            comm(aa^nn . bb^(mm-1),cc) . bb)$

>I don't know if this is a typo or not.  Did you mean bb^mm   or bb^^m ?

You are right that bb^mm should have been bb^^mm and
aa^nn should have been aa^^nn.

(It passed spellcheck :) )

Thanks for the sharp eyes.

(%i1) matchdeclare(aa,atom,bb,atom,cc,atom)$
(%i2) matchdeclare(nn,integerp,mm,integerp,pp,integerp)$
(%i3) tellsimpafter(comm(aa^^nn . bb^^mm,cc),aa . comm(aa^^(nn-1) . 
bb^^mm,cc)
         + comm(aa^^nn . bb^^(mm-1),cc) . bb)$
(%i4) comm(a^^2 . b^^2,c);
(%o4) comm(a^^2 . b,c) . b+a . comm(a . b^^2,c)
(%i5) comm(a^^2 . b^^3,c);
(%o5) comm(a^^2 . b^^2,c) . b+a . comm(a . b^^3,c)
(%i6) expand (ev (comm(a^^2 . b^^3,c),infeval));
(%o6) comm(a^^2 . b,c) . b^^2+a . comm(a . b^^3,c)+a . comm(a . b^^2,c) . b

Ted