Dear Mr. Witty,
I am currently researching how to replace Mathematica in our first-year students' lectures.
One of the main emerging topics is how to solve (systems of) rational inequalities. In this context I have just found out about Sage's support of quantifier elimination via QEPCAD and your qepcad.py, which seems to be the way to go.
As an example, I want to solve the inequality "(x-1)/(x-5) <= 1/3" with qepcad.py.
I have to get rid of the fractions, so I get: "( x-5 > 0 and 3(x-1) <= x-5 ) or ( x-5 < 0 and 3(x-1) >= x-5 )".
After reading qepcad.py I tried to translate this to a qepcad call:
qepcad(qepcad_formula.or_(qepcad_formula.and_(x-5 > 0, 3(x-1) <= x-5), qepcad_formula.and_(x-5 < 0, 3(x-1) >= x-5)), vars='(x)')
However, this only yields
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-54920de01e67> in <module>()
----> 1 qepcad(qepcad_formula.or_(qepcad_formula.and_(x-Integer(5) > Integer(0), Integer(3)(x-Integer(1)) <= x-Integer(5)), qepcad_formula.and_(x-Integer(5) < Integer(0), Integer(3)(x-Integer(1)) >= x-Integer(5))), vars='(x)')
TypeError: 'sage.rings.integer.Integer' object is not callable
Can you please help me to compose the correct call?
(Because of
http://trac.sagemath.org/ticket/16642 I am currently using
http://sagecell.sagemath.org/, which has 'Version B 1.50, 22 May 2008' of qepcad.)
Best regards,
Robert Pollak