#NEWLINE# def equiv( self , other , prover = None ) : #NEWLINE# #INDENT# '\n        Check for logical equivalence.\n        Pass the expression (self <-> other) to the theorem prover.\n        If the prover says it is valid, then the self and other are equal.\n\n        :param other: an ``Expression`` to check equality against\n        :param prover: a ``nltk.inference.api.Prover``\n        ' #NEWLINE# assert isinstance ( other , Expression ) , ( '%s is not an Expression' % other ) #NEWLINE# if ( prover is None ) : #NEWLINE# #INDENT# from nltk.inference import Prover9 #NEWLINE# prover = Prover9 ( ) #NEWLINE# #UNINDENT# bicond = IffExpression ( self . simplify ( ) , other . simplify ( ) ) #NEWLINE# return prover . prove ( other )