mathics-core
mathics-core copied to clipboard
x == x seems to have no solutions in Reals
Description
The "Domain" argument in Solve seems to mess something up
In[1]:= Solve[x == x, x]
Out[1]= {{}}
In[2]:= Solve[x == x, x, Reals]
Out[2]= {}
It appears to be a general problem of sympy.solve. sympy recommends to use solveset instead, where it's possible.
Another example: Solve[Sin[x] == 0, x] returns only two results: $0$ and $\pi$.
Looking at the SymPy documentation on Solveset and Solvers, I see this gets very complicated very quickly for Mathics or any system to try to figure out automatically.
However WMA Solve does provide for Options, and we could easily add one called "Solvset" which uses the solveset SymPy function instead of solve.
@pavel-the-best would you like to try to implement this?