1 | initial version |
Hi as far as I understand the problem is that oo so on are symbolic expressios. If you try to compare them with == sage returns as a new symbolic expression the symbolic equationion:
var('x,y')
print x==y
print type(x==y)
returns
x == y
<type 'sage.symbolic.expression.Expression'>
A soultion seems to be to cast the symbolic equation to a boolean:
print bool(x==y)
print bool(x==x)
which returns
False
True