Opened 2 years ago

# Make SR('x == 0') work, and likewise for <, >, <=, >=, !=, <>

Reported by: Owned by: slelievre major sage-wishlist symbolics SymbolicRing, string, equation slelievre N/A

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 Ask Sage question 41135.

### comment:1 Changed 2 years ago by slelievre

• Description modified (diff)

### comment:2 Changed 2 years ago by slelievre

• Description modified (diff)

### comment:3 Changed 23 months ago by slelievre

• Milestone changed from sage-8.5 to sage-wishlist

Change milestone to sage-wishlist for a few tickets whose previous milestone is closed.

Note: See TracTickets for help on using tickets.