[Maxima] Pattern matching - new user question
fateman at cs.berkeley.edu
Thu Oct 1 10:48:35 CDT 2009
Robert Dodier wrote:
> I get a stack overflow or endless loop for this one.
> Pretty sure the rule is applied to a|b and c, then b|a and c,
> then a|b and c, ad infinitum.
Try something like this..
defmatch(b1,(AA|BB and CC));
brule(p):=block([AA,BB,CC],if (b1(p)=false or ordergreatp(BB,AA)) then
else (BB|AA and CC)*(AA|CC)/(BB|CC));
More information about the Maxima