Package nltk :: Package inference :: Module api :: Class BaseTheoremToolCommand
[hide private]
[frames] | no frames]

type BaseTheoremToolCommand

source code

        object --+    
                 |    
TheoremToolCommand --+
                     |
                    BaseTheoremToolCommand
Known Subclasses:

This class holds a goal and a list of assumptions to be used in proving or model building.

Instance Methods [hide private]
 
__init__(self, goal=None, assumptions=None) source code
 
add_assumptions(self, new_assumptions)
Add new assumptions to the assumption list.
source code
 
retract_assumptions(self, retracted, debug=False)
Retract assumptions from the assumption list.
source code
 
assumptions(self)
List the current assumptions.
source code
 
goal(self)
Return the goal
source code
 
print_assumptions(self)
Print the list of the current assumptions.
source code
Instance Variables [hide private]
  _result
A holder for the result, to prevent unnecessary re-proving
Method Details [hide private]

__init__(self, goal=None, assumptions=None)
(Constructor)

source code 
Parameters:
  • goal (logic.Expression) - Input expression to prove
  • assumptions (list of logic.Expression) - Input expressions to use as assumptions in the proof.
Overrides: object.__init__

add_assumptions(self, new_assumptions)

source code 

Add new assumptions to the assumption list.

Parameters:
Overrides: TheoremToolCommand.add_assumptions

retract_assumptions(self, retracted, debug=False)

source code 

Retract assumptions from the assumption list.

Parameters:
  • debug (bool) - If True, give warning when retracted is not present on assumptions list.
  • retracted (list of sem.logic.Expressions) - assumptions to be retracted
Overrides: TheoremToolCommand.retract_assumptions

assumptions(self)

source code 

List the current assumptions.

Returns:
list of Expression
Overrides: TheoremToolCommand.assumptions

goal(self)

source code 

Return the goal

Returns:
Expression
Overrides: TheoremToolCommand.goal

print_assumptions(self)

source code 

Print the list of the current assumptions.

Overrides: TheoremToolCommand.print_assumptions