class ClosedWorldProver(ProverCommandDecorator): (source)
Constructor: ClosedWorldProver(proverCommand)
This is a prover decorator that completes predicates before proving.
If the assumptions contain "P(A)", then "all x.(P(x) -> (x=A))" is the completion of "P". If the assumptions contain "all x.(ostrich(x) -> bird(x))", then "all x.(bird(x) -> ostrich(x))" is the completion of "bird". If the assumptions don't contain anything that are "P", then "all x.-P(x)" is the completion of "P".
walk(Socrates) Socrates != Bill + all x.(walk(x) -> (x=Socrates)) ---------------- -walk(Bill)
see(Socrates, John) see(John, Mary) Socrates != John John != Mary + all x.all y.(see(x,y) -> ((x=Socrates & y=John) | (x=John & y=Mary))) ---------------- -see(Socrates, Mary)
all x.(ostrich(x) -> bird(x)) bird(Tweety) -ostrich(Sam) Sam != Tweety + all x.(bird(x) -> (ostrich(x) | x=Tweety)) + all x.-ostrich(x) ------------------- -bird(Sam)
Method | assumptions |
List the current assumptions. |
Method | _make |
Return an application expression with 'predicate' as the predicate and 'signature' as the list of arguments. |
Method | _make |
Create a dictionary of predicates from the assumptions. |
Method | _make |
This method figures out how many arguments the predicate takes and returns a tuple containing that number of unique variables. |
Method | _map |
Undocumented |
Inherited from ProverCommandDecorator
:
Method | __init__ |
No summary |
Method | decorate |
Modify and return the proof string :param proof_string: str the proof to decorate :param simplify: bool simplify the proof? :return: str |
Method | get |
Return the prover object :return: Prover |
Method | proof |
Return the proof string :param simplify: bool simplify the proof? :return: str |
Method | prove |
Perform the actual proof. |
Instance Variable | _proof |
Undocumented |
Instance Variable | _result |
Undocumented |
Inherited from TheoremToolCommandDecorator
(via ProverCommandDecorator
):
Method | add |
Add new assumptions to the assumption list. |
Method | goal |
Return the goal |
Method | print |
Print the list of the current assumptions. |
Method | retract |
Retract assumptions from the assumption list. |
Instance Variable | _command |
Undocumented |
Return an application expression with 'predicate' as the predicate and 'signature' as the list of arguments.
Create a dictionary of predicates from the assumptions.
Parameters | |
assumptions | a list of ``Expression``s |
Returns | |
dict mapping AbstractVariableExpression to PredHolder |