nltk.inference.Prover9Command¶
- class nltk.inference.Prover9Command[source]¶
Bases:
Prover9CommandParent
,BaseProverCommand
A
ProverCommand
specific to theProver9
prover. It contains the a print_assumptions() method that is used to print the list of assumptions in multiple formats.- __init__(goal=None, assumptions=None, timeout=60, prover=None)[source]¶
- Parameters
goal (sem.Expression) – Input expression to prove
assumptions (list(sem.Expression)) – Input expressions to use as assumptions in the proof.
timeout (int) – number of seconds before timeout; set to 0 for no timeout.
prover (Prover9) – a prover. If not set, one will be created.
- add_assumptions(new_assumptions)[source]¶
Add new assumptions to the assumption list.
- Parameters
new_assumptions (list(sem.Expression)) – new assumptions
- proof(simplify=True)[source]¶
Return the proof string :param simplify: bool simplify the proof? :return: str
- prove(verbose=False)[source]¶
Perform the actual proof. Store the result to prevent unnecessary re-proving.
- retract_assumptions(retracted, debug=False)[source]¶
Retract assumptions from the assumption list.
- Parameters
debug (bool) – If True, give warning when
retracted
is not present on assumptions list.retracted (list(sem.Expression)) – assumptions to be retracted