Logic Form of Rules
Our rule in logic form is:
cartesian(p) ∧ cartesian(q)
→ distance(p, q, euclidist(p,q))
For backchaining, we put the conclusion on the left:
((distance p1 p2 (euclidist p1c p2c)) ; dist is (cartesian p1 p1c) ; if p1c is cart of p1 (cartesian p2 p2c)) ; and p2c is cart of p2
cartesian is now a two-place predicate:
cartesian(p, pc) is true if pc is the Cartesian form of p.