From: Rainer Schöpf <rainer.schoepf@gm...>  20110823 17:19:52

On Tue, 23 Aug 2011 at 17:15 +0100, Arthur Norman wrote: > I observe that prepf/unplus gets called on things with "plus" as a > variable in at least poly.tst and liepde.tst... > > I am minded to alter the behaviour of prepf so as not to strip "plus" so > enthusiastically, but since that is incompatible I though I should see > what views others have first. And if anybody understands whether poly.tst > of liepde.tst OUGHT to have things like > (((minus . 1) . 1) ((plus . 1) . 1))) In poly.tst I see ((((equal . 1) . 1) ((plus . 1) . 1)) . 1) This comes from the following line in the procedure testdecompose: if 'equal = part(p,0) then part(p,0) returns the symbol plus, and the comparison in algebraic mode is implemented by simplifying the difference of equal and plus and comparing the result to 0. crack/crsimpso.red contains similar code, ie. if part(n,0)='MINUS then cs1:=t which would give the one you quote. It all comes down to howto handle this comparison in algebraic mode. Should this particular case (one argument of equal being a quoted symbol) really be done as comparing simp '(difference equal plus) to zero, or rather as evaluating (equal 'equal 'plus) One way to achieve the latter would be to a) flag('(quote),'nochange) so that "(quote equal)" doesn't become "(aeval!* (quote equal))". (Isn't the noform flag meant to achieve this?) b) modify formbool as (not sure that's correct!) symbolic procedure evalequal(u,v); %%% First handle case of quoted symbol(s) if idp u or idp v then u eq v else begin scalar x; return if (x := getrtype u) neq getrtype v then nil else if null x then numberp(x := reval list('difference,u,v)) and zerop x else u=v end; Rainer 