As long as x is generic, it seems like something like this would preserve 
the fidelity of original
```
>>> eq = x**2 < 0
>>> ans = Piecewise((False, Eq(im(x), 0)), (True, Eq(re(x), 0)), (x > oo, 
True))
```
The both are True or False at the same values of x and they both raise a 
TypeError if `x -> 2 + I`. Once an assumption is placed on x, like being 
real, this collapses to False as expected.

On Sunday, October 1, 2017 at 11:04:48 PM UTC-5, Aaron Meurer wrote:
>
> True and False seem the best. It could return something like 1 = 0, but 
> that would just evaluate to False anyway. 
>
> Aaron Meurer 
>
> On Sun, Oct 1, 2017 at 11:42 PM Chris Smith <[email protected] 
> <javascript:>> wrote:
>
>> When solving an inequality that is true for all reals, e.g. `x**2 >= 0`, 
>> the relational (-oo < x) & (x < oo) is returned by 
>> `solve_univariate_inequality`. This is good because it enforces the 
>> condition that x be real: substitution of x with I, for example, will fail. 
>> But if the relationship is never true for any real numbers, S.EmptySet is 
>> returned and as a relational, this comes back as False. Should a relational 
>> like x > oo be returned instead?
>>
>> ```
>> >>> from sympy.abc import x
>> >>> S.Reals.as_relational(x)
>> (-oo < x) & (x < oo)
>> >>> S.EmptySet.as_relational(x)
>> False
>> >>> S.UniversalSet.as_relational(x)
>> True
>> ```
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] <javascript:>
>> .
>> 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/e01580ef-40bc-4872-9d4d-bb2156507608%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sympy/e01580ef-40bc-4872-9d4d-bb2156507608%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/7f782b04-c441-4575-adbd-d0f7fde0ba4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to