Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3 Propositional Logic

Similar presentations


Presentation on theme: "Chapter 3 Propositional Logic"— Presentation transcript:

1 Chapter 3 Propositional Logic
3.6. Propositional Resolution

2 Propositional Resolution (another Propositinal calculus)
a single rule of inference: P => Q , Q => R P => R Using propositional resolution alone (without axiom schemata or other rules of inference), it is possible to build a theorem prover that is sound and complete for All propositional Calculus . The search space using propositional resolution is much smaller than for standard propositional calculus (like H). works only on expressions in clausal form. General procedure to convert wffs into clausal forms introduced before.

3 Clausal Form revisited
A literal is either an atomic sentence or a negation of an atomic sentence. p -p A clause is either a literal or a disjunction of literals. p \/ q \/ r Clauses are usually written as sets of literals. { p} , { -p} , { p,q,r } A database in clausal form is a set of clauses. {{-p,q},{r,-q}}

4 The empty clause {} is unsatisfiable. The empty database {} is valid.
Empty Sets The empty clause {} is unsatisfiable. Why: It is equivalent to an empty disjunction. The empty database {} is valid. Why: It is equivalent to an empty conjunction. What about a database consisting of an empty clause {{}}?

5 Conversion to Clausal Form
Implications out: P1 -> P > ~P1 \/ P2 P1 <-> P > (~P1 \/ P2) /\ (P1 \/ ~P2) Negations in: ~~P > P ~(P1 /\ P2) ---> ~P1 \/ ~P2 ~(P1 \/ P2) ---> ~P1 /\ ~P2 Disjunctions in: P1 \/ (P2 /\ P3) ---> (P1 \/ P2) /\ (P1\/ P3) Operators out: P1 \/ P > {P1,P2} P1 /\ P > {P1} , {P2}

6 Example 1: (g & (r -> f))
Examples Example 1: (g & (r -> f)) I (g & (~r | f)) N D O { g} , {~r,f} Example 2: ~(g & (r -> f)) I ~(g & (~r | f)) N (~g | ~(~r | f)) (~g | (~~r & ~f)) (~g | (r & ~f)) D (~g | r) & (~g | ~f) O {~g, r} , {~g, ~f}

7 Propositional Resolution
General form: {p1,..., r,...,pm} {q1,...,~r,...,qn} {p1,...,pm,q1,...,qn} Example: {Office, Home} {~Home,Sick} {Office,Sick}

8 Multiple Conclusions:
Issues Collapse: {~p,q} {p,q} {q} Multiple Conclusions: {~p,~q} {p,~p} {q,~q} Single Application Only: {p,q} {~p,~q} {} NO!

9 Special Cases of Propositional Resolution
Modus Ponens: p => q {-p,q} p {p} q {q} Modus Tollens: -q {-q} -p {-p} Chaining: p => q {-p,q} q => r {-q,r} p => r {-p,r}

10 Example: 1. {p,q} premise 2. {-p,q} premise 3. {p,-q} premise
Unsatisfiability Example: 1. {p,q} premise 2. {-p,q} premise 3. {p,-q} premise 4. {-p,-q} premise 5. {q} ,2 6. {-q} 3,4 7. {} ,6

11 True or False Questions
Theorem: T |= A iff T U {~A} is unsatisfiable. Application: To determine whether a set T of sentences logically implies a sentence A, rewrite T U {-s} in clausal form and try to derive the empty clause.

12 {p -> q, q -> r} |= p -> r ?
True or False Example {p -> q, q -> r} |= p -> r ? p -> q ==> {-p,q} q -> r ==> {-q,r} -(p -> r) ==> {p} , {-r} 1. {~p,q} premise 2. {~q,r} premise 3. {p} negated goal 4. {~r} negated goal 5. {q} ,3 6. {r} ,5 7. {} ,6

13 {p -> q,m -> p \/ q} |= m -> q?
True or False Example {p -> q,m -> p \/ q} |= m -> q? p -> q ==> {~p,q} m -> p \/ q ==> {~m,p,q} ~ (m -> q) ==> {m} , {~q} 1. {~p,q} premise 2. {~m,p,q} premise 3. {m} negated goal 4. {~q} negated goal 5. {p,q} 2,3 6. {q} ,5 7. {} ,6

14 Incompleteness? Theorem: Propositional Resolution is not generatively complete. I.e., the statement: “If T |= A then there is a proof of A from T using Propositional Resolution only.” is not true. Pf: Show that {} |= p => (q => p) using propositional resolution. Note since there are no premises, there are no conclusions that can be generated. QED However it can be show that Propositional Resolution is refutation complete. Namely, if T is unsatisfiable, then there is a resolution proof of {} (contradiction) from T. Hence T |= A iff T U {~A} is unsatisfiable iff there is a resolution proof of {} from T U {~A}.

15 Resolution proof of {} |= p->(q->p)
I ~(p -> (q -> p)) : ~A N ~(~p \/ (~q \/ p)) (~~p /\ ~(~q \/ p)) (~~p /\ (~~q /\ ~p)) (p /\ (q /\ ~p)) D O {p}, {q}, {-p} 1. {p} negated goal 2. {q} negated goal 3. {-p} negated goal 4. {} 1,3

16 Resolution Provability
Definition: A sentence A is provable from a set of sentences T by propositional resolution (written T |-p A) iff there is a derivation of the empty clause from the clausal from of T U {~A} using resolution rule only. Soundness and Completeness of Resolution: Soundness Theorem: Proposition resolution is sound. T |-r A => T |= A Completeness Theorem: Our proof system is complete. T |= A => T |-r A

17 Two finger method: 1. {P,Q} Premise
Termination Two finger method: 1. {P,Q} Premise 2. {-P,Q} Premise 3. {P,-Q} Premise 4. {-P,-Q} Premise 5. {Q} ,2 6. {P} ,3 7. {Q,-Q} 1,4; 2,3 8. {P,-P} 1,4; 2,3 9. {-P} ,4 10. {-Q} ,4 11. {} ,9 Theorem: There is a resolution derivation of a conclusion from a set of premises if and only if there is a derivation using the two finger method. Theorem: Propositional resolution using the two-finger method always terminates. Proof: There are only finitely many clauses that can be constructed from a finite set of logical constants.


Download ppt "Chapter 3 Propositional Logic"

Similar presentations


Ads by Google