And here's a reply from Barton on this subject. tvn, I hope this
helps!  Keep in mind that while Sage wraps the thing called %solve
below (use the keyword to_poly_solve=True in a single-variable
context, I think it might be automatic in the multivariable one), we
do not have the ability (yet) to parse all the things it outputs,
particularly some of the "nounforms" below.  Using Maxima directly is
often a good choice for very fine-grained things regarding symbolic
manipulation.

- kcrisman

The to_poly_solver automatically dispatches Fourier (aka Fourier-
Motzkin) elimination on systems
of linear inequations (<, <=, >, >=, =, #); examples:

 (%i7) %solve([x+y < 5, x + 8 * y < 42, x - y > 1],[x,y]);
 (%o7) %union([y+1<x,x<5-y,y<2])

The Fourier elimination code has a pre-processor that converts some
nonlinear inequations to
equivalent linear inequations:

 (%i8) %solve([min(x,y) > abs(x-y)],[x,y]);
 (%o8) %union([x=y,0<y],[y/2<x,x<y,0<y],[y<x,x<2*y,0<y])

A few things that I can think of:

(1) The output can be overly complex

     (%i9) %solve(abs(1-abs(1-abs(x-5)))<5,x);
     (%o9) %union([-2<x,x<4],[4<x,x<5],[5<x,x<6],[6<x,x<12],[x=4],
[x=5],[x=6])

(2) Depending on your needs, the simplex method might be much(!)
faster than Fourier
   elimination (but Fourier elimination gives more information).

(3) I would not expect the Maxima Fourier elimination code to work all
that well
   with binary64 numbers for coefficients--the code has no pivoting
strategy. (I've
   not seen an article about pivoting strategies for Fourier
elimination, by the way.)

(4) When the to_poly_solver is unable to solve, it should return a
%solve nounform.
   But when Fourier elimiation code is dispatched, I see this is
broken :(

    (%i10) %solve(x^2+x+1 < 0,x);
    (%o10) %union([-x^2-x-1>0])

  Also, the pre-processor doesn't try all that hard (doesn't introduce
radicals) to
  convert to linear inequations.

--Barton

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to