I would consider -1/2 to be valid in the real domain. -1/2 is a real
number and plugging it into the equation produces 0, so it's a
solution.
I think the domain keyword should only be concerned with filtering
solutions. If we also use it to change the meaning of functions in the
expression things start getting more difficult.
You can get the same problem with square roots. Consider
solveset(sqrt(x + 1)/sqrt(x - 1), domain=Reals). The solution ({-1})
when plugged in, gives 0/(2*I), which involves complex numbers. So
should solveset(domain=Reals) change the definition of sqrt to only be
valid for positive numbers?
One of the reasons we default to complex numbers in SymPy is that it
simplifies things everywhere. We don't have to worry about an
algorithm doing something that isn't valid for a restricted "reals
only" function because it somehow goes through the complex plane.
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sympy+un...@googlegroups.com.
> To post to this group, send email to
sy...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sympy.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sympy/c3915e4d-bb5d-443c-b38c-5f8aa2696478%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.