# `x**2 < oo` returns `True` but `x < oo` un-evaluated for real `x` #9832

Open
opened this Issue Aug 15, 2015 · 0 comments

Projects
None yet
1 participant
Member

### gxyd commented Aug 15, 2015

 As explained by @aktech ``````In [2]: x = Symbol('x', real=True) In [3]: x < oo Out[3]: x < oo In [4]: x**2 < oo Out[4]: True `````` In this, both the evaluations should comply with one another This leads to a few problems like this: ``````>>> solveset(x**2 < oo, x, S.Reals) AttributeError Traceback (most recent call last) in () ----> 1 solveset(x**2 < oo, x, S.Reals) /home/gxyd/Public/sympy/sympy/solvers/solveset.py in solveset(f, symbol, domain) 887 "setting domain=S.Reals") 888 return solve_univariate_inequality( --> 889 f, symbol, relational=False).intersection(domain) 890 891 if isinstance(f, (Expr, Number)): /home/gxyd/Public/sympy/sympy/solvers/inequalities.py in solve_univariate_inequality(expr, gen, relational) 407 gen = d 408 --> 409 e = expr.lhs - expr.rhs 410 parts = n, d = e.as_numer_denom() 411 if all(i.is_polynomial(gen) for i in parts): AttributeError: 'BooleanTrue' object has no attribute 'lhs' ``````

### skirpichev added a commit to diofant/diofant that referenced this issue Aug 18, 2015

``` XXX Fixes sympy/sympy#9832 ```
``` b07bebc ```

### skirpichev added a commit to diofant/diofant that referenced this issue Sep 12, 2015

``` XXX Fixes sympy/sympy#9832 ```
``` 16df612 ```

### skirpichev added a commit to diofant/diofant that referenced this issue Sep 13, 2015

``` Redo Add._eval_is_positive/negative handlers ```
```Correct also broken test test_Add_is_pos_neg (finite doesn't
imply real!).  Fixes sympy/sympy#9832.```
``` a9242ac ```

### skirpichev added a commit to diofant/diofant that referenced this issue Sep 13, 2015

``` Redo Add._eval_is_positive/negative handlers ```
```Correct also broken test test_Add_is_pos_neg (finite doesn't
imply real!).  Fixes sympy/sympy#9832.```
``` 253aa87 ```

### skirpichev added a commit to diofant/diofant that referenced this issue Sep 13, 2015

``` Merge pull request #123 from skirpichev/9832-fix ```
`Fixes sympy/sympy#9832`
``` 1a2be96 ```