|
>>> p1 = lp.parse(r'see(Socrates, John)')
>>> p2 = lp.parse(r'see(John, Mary)')
>>> p3 = lp.parse(r'-(Socrates = John)')
>>> p4 = lp.parse(r'-(John = Mary)')
>>> c = lp.parse(r'-see(Socrates, Mary)')
>>> prover = inference.get_prover(c, [p1,p2,p3,p4])
>>> prover.prove()
False
>>> cwp = ClosedWorldProver(prover)
>>> for a in cwp.assumptions(): print a
see(Socrates,John)
see(John,Mary)
-(Socrates = John)
-(John = Mary)
all z3.all z4.(see(z3,z4) -> (((z3 = Socrates) & (z4 = John)) | ((z3 = John) & (z4 = Mary))))
>>> cwp.prove()
True
|