'Defines equality modulo alphabetic variance.  If we are comparing
\x.M  and \y.N, then check equality of M and N[x/y].'

def __eq__(self, other):

    if (isinstance(self, other.__class__) or isinstance(other, self.__class__)):
        if (self.variable == other.variable):
            return (self.term == other.term)
        else:
            varex = VariableExpression(self.variable)
            return (self.term == other.term.replace(other.variable, varex))
    else:
        return False
