#NEWLINE# def convert_to_prover9( input ) : #NEWLINE# #INDENT# '\n    Convert a ``logic.Expression`` to Prover9 format.\n    ' #NEWLINE# if isinstance ( input , list ) : #NEWLINE# #INDENT# result = [ ] #NEWLINE# for s in input : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# result . append ( _convert_to_prover9 ( s . simplify ( ) ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# print ( ( 'input %s cannot be converted to Prover9 input syntax' % input ) ) #NEWLINE# raise #NEWLINE# #UNINDENT# #UNINDENT# return result #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return _convert_to_prover9 ( input . simplify ( ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# print ( ( 'input %s cannot be converted to Prover9 input syntax' % input ) ) #NEWLINE# raise