Cannot understand the rules in maxima (maxima hanging on few rule applications)



Sure. Since e can match 1, the rule s2 can be applied forever.
Not relevant to this bug, but why don't you just use  defrule(s1, ...)?

 

> -----Original Message-----
> From: maxima-bounces at math.utexas.edu 
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of dp2 at cise.ufl.edu
> Sent: Thursday, September 21, 2006 4:14 PM
> To: maxima at math.utexas.edu
> Subject: Cannot understand the rules in maxima 
> (maxima hanging on few rule applications)
> 
> (%i1) sumexpand:false,
>    matchdeclare([_i,_k,_f,_e],all),
>    apply(defrule,[s1,sum(_f(_i),_i,1,_k),S(_f)]),
>    apply(defrule,[s2,_e*sum(_f(_i),_i,1,_k),_e*S(_f)])
> (%i4) apply1(sum(f(i),i,1,n),s1);
> (%o4) S(f)
> (%i5) apply1(sum(f(i),i,1,n),s2);
> .... hang...
> 
> Could you please tell me the reason why rule s2 is hanging 
> while s1 is running ok?
> 
> Thanks,
> Dileep
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>