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

def as_set(self):

    if (len(self.free_symbols) == 1):
        return self.args[0].as_set().complement(S.Reals)
    else:
        raise NotImplementedError('Sorry,    Not.as_set    has    not    yet    been    implemented    for    mutivariate    expressions')
