id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
26727 Make SR('x == 0') work, and likewise for <, >, <=, >=, !=, <> slelievre "While `SR('3*x + 2')` correctly returns `3*x + 2`, calling `SR` on
strings representing equations or inequations, such as
`SR('x == 0')` or `SR('x < 0')` or similar, choke on `==`, `<`, etc.
All of the following are valid:
{{{
sage: x == 0
x == 0
sage: x < 0
x < 0
sage: x <= 0
x <= 0
sage: x > 0
x > 0
sage: x >= 0
x >= 0
sage: x != 0
x != 0
sage: x <> 0
x != 0
}}}
so one would expect the following to work too:
{{{
sage: SR('x == 0')
x == 0
sage: SR('x < 0')
x < 0
sage: SR('x <= 0')
x <= 0
sage: SR('x > 0')
x > 0
sage: SR('x >= 0')
x >= 0
sage: SR('x != 0')
x != 0
sage: SR('x <> 0')
x != 0
}}}
Instead we get for example:
{{{
sage: print(version())
SageMath version 8.4, Release Date: 2018-10-17
sage: SR('x == 0')
Traceback (most recent call last)
...
TypeError: Malformed expression: x == !!! 0
}}}
Initially reported by Ludger O. Suarez-Burgoa in the discussion around
[[https://ask.sagemath.org/question/41135|Ask Sage question 41135]]." defect new major sage-wishlist symbolics SymbolicRing, string, equation slelievre N/A