'Rewrite logic operators and relationals in terms of real sets.
Examples
>>> from sympy import And, Symbol
>>> x = Symbol(\'x\', real=True)
>>> And(x<2, x>-2).as_set()
Interval.open(-2, 2)'

def as_set(self):

    from sympy.sets.sets import Intersection
    if (len(self.free_symbols) == 1):
        return Intersection(*[arg.as_set() for arg in self.args])
    else:
        raise NotImplementedError('Sorry,    And.as_set    has    not    yet    been    implemented    for    multivariate    expressions')
