Intelligent result checking before asking positive/negative/zero...?



> I would prefer that the conditions of validity be carried through the
> computation in the "forward" direction.

That is a related, but I think different, problem.

> If you end up with something like  answer = 
> (if x<0 then A else if x>=0 then A)  you
> have to simplify it to  answer=A.

Absolutely.  This is part of what I was alluding to in saying "things are rather
messy" and "combine the results intelligently".

> I'm not sure that "if"  is the right thing to use.
> If a>=0 .....   may not be the same as  a context in which assume(a>=0).

The semantics of a simplifiable conditional (noun-form IF) need to be
worked through before any sort of implementation.  I think I've
discussed this before on this list -- or at least with some
participants.  But I'm not sure what you mean by your example.  Could
you elaborate?

             -s