7.5 Reasoning Patterns in Propositional Logic
Note: to see the Unicode symbols, use the Mozilla Firefox browser.
Conjunctive Normal Form: CNF
- Eliminate ⇔. Example: a ⇔ b.
- Eliminate ⇒. Example: a ⇒ b.
- Move negation inwards. Example: ¬(a ^ b).
- Use distributive laws. Example: (a ^ b) ∨ c.
Resolution
- Unit resolution. (a ∨ b) and ¬b yields a.
- Full resolution. (a ∨ b ∨ c ∨ d) and (¬d ∨ e ∨ f)
yields (a ∨ b ∨ c ∨ e ∨ f).
- Resolution is sound.
Resolution Theorem Proving
- The knowledge base must be converted to CNF.
- Assume the negation of what you are trying to prove.
- If a contradiction can be reached, what you are
trying to prove is known to be true.
- Resolution theorem proving is refutation complete.
Exercise 7.9
If the unicorn is mythical, then it is immortal, but if it
is not mythical, then it is a mortal mammal. If the unicorn is either
immortal or a mammal, then it is horned. The unicorn is magical if it
is horned.
Using resolution, prove that the unicorn is magical.
Horn Clauses
- A Horn clause is a disjunction of literals where at most one is
positive.
- Horn clauses are the basis for Prolog!
- Here is a Prolog rule: a ^ b ^ c => d
- Here is a Prolog fact: e
- Deciding entailment with Horn clauses can be done in time
that is linear in the size of the knowledge base!
Example
Consider the following Prolog rules and facts:
- a ^ b ⇒ c
- a ⇒ g
- a ⇒ h
- c ⇒ d
- d ^ e ⇒ f
- i ⇒ f
- a
- b
- e
Prove f first using forward chaining and then using backward chaining.