nltk.inference.TableauProverCommand¶
- class nltk.inference.TableauProverCommand[source]¶
Bases:
BaseProverCommand
- __init__(goal=None, assumptions=None, prover=None)[source]¶
- Parameters
goal (sem.Expression) – Input expression to prove
assumptions (list(sem.Expression)) – Input expressions to use as assumptions in the proof.
- add_assumptions(new_assumptions)[source]¶
Add new assumptions to the assumption list.
- Parameters
new_assumptions (list(sem.Expression)) – new assumptions
- decorate_proof(proof_string, simplify=True)[source]¶
Modify and return the proof string :param proof_string: str the proof to decorate :param simplify: bool simplify the proof? :return: str
- 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