def __pow__(self, other): return Binop('**', self, other)
def __rpow__(self, other): return Binop('**', other, self)
def __getitem__(self,i):return Binop('[]',self,i)
+ def __cmp__( self, other ): return self.eval().__cmp__(other)
+ def __eq__( self, other ): return self.eval() == other
+ def __ne__( self, other ): return self.eval() != other
+ def __lt__( self, other ): return self.eval() < other
+ def __le__( self, other ): return self.eval() <= other
+ def __gt__( self, other ): return self.eval() > other
+ def __ge__( self, other ): return self.eval() >= other
+
class Binop(Formula):
opmap = { '+': lambda a, b: a + b,