On 12/03/2012 09:44 AM, Cary Cherng wrote:
I tried using solve_ineq in the notebook in the simple way below and got
an error. It seems to be related to
http://trac.sagemath.org/sage_trac/ticket/11520
Is there a workaround?
R.<g1,g2> = PolynomialRing(QQ)
solve_ineq([g1 > g2],[g1,g2])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_106.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("c29sdmVfaW5lcShbZzEgPiBnMl0sW2cxLGcyXSk="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpwFoZvN/___code___.py", line 2, in <module>
exec compile(u'solve_ineq([g1 > g2],[g1,g2])
File "", line 1, in <module>
File
"/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/symbolic/relation.py",
line 1204, in solve_ineq
return(solve_ineq_fourier(ineq, vars))
File
"/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/symbolic/relation.py",
line 1115, in solve_ineq_fourier
ineq0 = [i._maxima_() for i in ineq]
AttributeError: 'bool' object has no attribute '_maxima_'
I think it is more related to this ticket:
http://trac.sagemath.org/sage_trac/ticket/13645
As soon as you write g1 > g2, the expression is evaluated and you get a
boolean as a result. solve() or solve_ineq() clearly can't solve a
boolean. This inequality is not evaluated if you have normal symbolic
variables (declared using var()).
#11520 will be solved by the patch in #13645.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
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.
Visit this group at http://groups.google.com/group/sage-support?hl=en.