macrakis at gmail.com wrote on 01/09/2007 10:48:51 AM:
> > (%i1) prederror : false$
> > OK more or less:
> > (%i2) if f(k) then 0 else %pi;
> > (%o2) if unknown then 0 else %pi
>
> No, this is worse than useless -- it seems that the unevaluated
> conditional experimentation has leaked into the production version.
boolsimp fixes this:
(%i1) load(boolsimp)$
(%i2) if f(k) then 0 else %pi;
(%o2) if f(k) then 0 else %pi
Could we make boolsimp the standard in the next release?
> This is as designed. The protasis must be a boolean expression. "+"
> cannot return a boolean result, so the syntax prevents this.
Of course 'true' shouldn't be in the range of "+", but it is:
(%i3) f(k) := true - 1;
(%o3) f(k):=true-1
(%i4) f(k) + 1;
(%o4) true
Barton