sympy/sympy — pull request #2781 by hargup (2014-01-16 17:24:00+00:00)
Title: bool, relational: added as_set method

`as_set` is the inverse method for existing `as_relational`
method for sets. `as_set` converts a univariate boolean or
relational expression to real set.

Example:

```
In [1]: from sympy import And, Or

In [2]: from sympy.abc import x

In [3]: And(x<2, x>-2).as_set()
Out[3]: (-2, 2)

In [4]: (x**2 > 4).as_set()
Out[4]: (-oo, -2) U (2, oo)
```