unevaluated boolean and conditional expressions (take 1)



Seems useful in some context, but...

not(c<1)  does not mean  c>=1  for all c in Maxima.
For example, c=3+4*%i.
or  c= undefined
or  c= NaN

So there is an implicit assumption that a,b,c are from an ordered
field, or perhaps from the real numbers.  Maybe this should be
explicit. e.g. have your simplifications within a context of some sort..

(with  realvars(a,b,c) ....  simplify )


How far are you going with geometric inequalities?  Linear, e.g.

a*x+b*y+c*z   where a,b,c must be explicit numbers?
Or more interesting stuff, say polynomial systems?

RJF

----- Original Message ----- 
From: "Robert Dodier" <robert.dodier at gmail.com>
To: "Maxima List" <maxima at math.utexas.edu>
Sent: Saturday, January 28, 2006 3:39 PM
Subject: unevaluated boolean and conditional expressions (take 1)


> Hello,
>
> I've put together some code to equip Maxima to handle unevaluated
> boolean and conditional expressions.
> (http://cvs.sf.net/viewcvs.py/maxima/maxima/share/contrib/boolsimp/)
> It's not finished, but I think it is well on its way.
> When it is completed (maybe another month or so) I want to merge it
> into maxima/src/.
>
> From the comment header ---
>
> ; The functions in this file are an attempt to make Boolean (and, or, not)
> ; and conditional (if -- then -- else/elseif) expressions work more like
> ; arithmetic expressions in the treatment of predicates which are
> ; undecidable at the time the expression is evaluated,
> ; by allowing undecided predicates in simplified and evaluated
> ; expressions, instead of complaining or returning 'unknown.
>
> Examples:
>
> assume (a > 1);
>
> a > 1 and b < 0  =>  b < 0
>
> c > 1 and b < 0  =>  c > 1 and b < 0
>
> not b < 0  =>   b >= 0
>
> if c then d  =>  if c then d
>
> plot2d (if x > 0 then x else -x, [x, -1, 1])  =>  nice plot
>
> quad_qags (if x > 0 then x else -x, x, -1 ,1)  =>   [1.0,
> 1.1107651257113993E-14, 63, 0]
>
> Comments?
>
> Robert Dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>