You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trac #34341: Fix bool(expr1 != expr2) for nontrivially equal expressions
As reported on [https://groups.google.com/g/sage-devel/c/rXZeGZjAIdU
sage-devel]:
{{{
sage: a = x^2 + 2*x + 1
sage: b = (x + 1)^2
sage: c = a != b
sage: bool(c)
True
}}}
Note that
{{{
sage: bool(c.expand())
False
}}}
This is due to calling `is_trivial_zero` instead
of `is_zero` in the `__bool__` method for symbolic expressions.
The fix provided by this ticket is not intended to fix other existing
`bool(expr1 != expr2)` issues (e.g. #33698).
URL: https://trac.sagemath.org/34341
Reported by: tmonteil
Ticket author(s): Thierry Monteil
Reviewer(s): Samuel Lelièvre
0 commit comments