Treat inequalities like equations?



ineq is not particularly robust or general.

For example:

(a=b)*(c=d) => a*c = b*d (base Maxima, OK)
With ineq, (a=b)*(c<d) asks if a and b are PNZ (second question is
redundant) and returns
    a*c<a*d = (b*c<b*d)  (?!); I'd think this should be a*c < b*d (if a>=0)

(a<b)*(c<d) => is a<b PNZ (nonsense question) => (a<b)*c < (a<b)*d
(nonsense value).  This should presumably either be returned unmodified or
as a*c<b*d (if signs are appropriate).

0*(a<b) => 0  -- not clear what this should be, but probably not 0

but

assume(equal(q,0))$
q*(a<b) => q*(a<b)    -- again, not clear what this should be

Of course, base Maxima doesn't do too well, either, for equation
manipulation:

exp(a=b) => exp(a=b), not exp(a)=exp(b)

Ineq also slows down simplification:

(%i8) expand((a+b+a*b-2)^50)$
Evaluation took 0.9830 seconds (1.0200 elapsed)
(%i9) load(ineq)$
tellsimp: warning: putting rules on '+' or '*' is inefficient, and may not
work.
...(%i10) expand((a+b+a*b-2)^50)$
Evaluation took 2.0750 seconds (2.0940 elapsed)

          -s

On Wed, Nov 2, 2011 at 08:38, Henry Baker <hbaker1 at pipeline.com> wrote:

> Cool! "ineq" seems to do nearly everything that I wanted.  Thank you!
>
> This sort of behavior on inequalities seems pretty orthogonal to the rest
> of Maxima.  How come Maxima can't just incorporate it into the standard
> mechanisms?  I would be surprised if it broke anything.
>
> At 09:56 PM 11/1/2011, Robert Dodier wrote:
> >There is a share package, ineq, which might be helpful.
> >load(ineq) loads the package and demo(ineq) runs through some examples.
> >
> >ineq is not too complicated -- it defines simplifications rules
> >(via tellsimp and tellsimpafter) for some basic operations on
> >inequalities. Maybe it's enough, I don't know.
> >
> >Hope this helps,
> >
> >Robert Dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>