Comment #4 on issue 2009 by mattpap: Document why solve((x-y,y),x) is None
http://code.google.com/p/sympy/issues/detail?id=2009

I disagree with comment #1. Currently solve([x - y, y], x) returns None but solve(x - y, x) returns [y]. In SymPy, solve([x - y, y], x) means solve([Eq(x - y, 0), Eq(y, 0)], x), where y is a free variable. This way we let y to be zero and solve a single linear equation. This is equivalent to writing:

y = 0
solve(x - y, x)
[0]

So, solve([x - y, y], x) should return [0] (or any equivalent data structure, e.g. {x: 0}, or event better some SolutionSet class). btw. Mathematica can do this and returns {x -> 0}}.

This approach could be even generalized to allow things like:

solve([x**3 - 1, x in QQ], x)
{x: 1}

assuming that x in QQ would return (for example) Element(x, QQ) instance.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to