logic as a tool chapter 2 deductive reasoning in
play

Logic as a Tool Chapter 2: Deductive Reasoning in Propositional - PowerPoint PPT Presentation

Logic as a Tool Chapter 2: Deductive Reasoning in Propositional Logic 2.5 Normal forms of propositional formulae Propositional Resolution Valentin Goranko Stockholm University October 2016 Goranko Disjunctive and conjunctive normal forms:


  1. Disjunctive and conjunctive normal forms: basic definitions 1. A literal is a propositional constant or variable or its negation. 2. An elementary disjunction (resp., elementary conjunction) is a disjunction (resp., conjunction) of one or more literals. Examples: p , ¬ q , p ∨ ¬ q , p ∨ ¬ p ∨ q ∨ ¬ r are elementary disjunctions; p , ¬ q , ¬ p ∧ q , ¬ p ∧ q ∧ ¬ r ∧ ¬ p are elementary conjunctions. 3. A disjunctive normal form (DNF) is a disjunction of elementary conjunctions. Examples: p , ¬ q , p ∧ ¬ q , p ∨ ¬ q , ( p ∧ ¬ p ) ∨ ¬ q , ( r ∧ q ∧ ¬ p ) ∨ ( ¬ q ∧ p ) ∨ ( ¬ r ∧ p ). 4. A conjunctive normal form (CNF) is a conjunction of elementary disjunctions. Examples: p , ¬ q , p ∧ ¬ q , Goranko

  2. Disjunctive and conjunctive normal forms: basic definitions 1. A literal is a propositional constant or variable or its negation. 2. An elementary disjunction (resp., elementary conjunction) is a disjunction (resp., conjunction) of one or more literals. Examples: p , ¬ q , p ∨ ¬ q , p ∨ ¬ p ∨ q ∨ ¬ r are elementary disjunctions; p , ¬ q , ¬ p ∧ q , ¬ p ∧ q ∧ ¬ r ∧ ¬ p are elementary conjunctions. 3. A disjunctive normal form (DNF) is a disjunction of elementary conjunctions. Examples: p , ¬ q , p ∧ ¬ q , p ∨ ¬ q , ( p ∧ ¬ p ) ∨ ¬ q , ( r ∧ q ∧ ¬ p ) ∨ ( ¬ q ∧ p ) ∨ ( ¬ r ∧ p ). 4. A conjunctive normal form (CNF) is a conjunction of elementary disjunctions. Examples: p , ¬ q , p ∧ ¬ q , p ∨ ¬ q , Goranko

  3. Disjunctive and conjunctive normal forms: basic definitions 1. A literal is a propositional constant or variable or its negation. 2. An elementary disjunction (resp., elementary conjunction) is a disjunction (resp., conjunction) of one or more literals. Examples: p , ¬ q , p ∨ ¬ q , p ∨ ¬ p ∨ q ∨ ¬ r are elementary disjunctions; p , ¬ q , ¬ p ∧ q , ¬ p ∧ q ∧ ¬ r ∧ ¬ p are elementary conjunctions. 3. A disjunctive normal form (DNF) is a disjunction of elementary conjunctions. Examples: p , ¬ q , p ∧ ¬ q , p ∨ ¬ q , ( p ∧ ¬ p ) ∨ ¬ q , ( r ∧ q ∧ ¬ p ) ∨ ( ¬ q ∧ p ) ∨ ( ¬ r ∧ p ). 4. A conjunctive normal form (CNF) is a conjunction of elementary disjunctions. Examples: p , ¬ q , p ∧ ¬ q , p ∨ ¬ q , p ∧ ( ¬ p ∨ ¬ q ), Goranko

  4. Disjunctive and conjunctive normal forms: basic definitions 1. A literal is a propositional constant or variable or its negation. 2. An elementary disjunction (resp., elementary conjunction) is a disjunction (resp., conjunction) of one or more literals. Examples: p , ¬ q , p ∨ ¬ q , p ∨ ¬ p ∨ q ∨ ¬ r are elementary disjunctions; p , ¬ q , ¬ p ∧ q , ¬ p ∧ q ∧ ¬ r ∧ ¬ p are elementary conjunctions. 3. A disjunctive normal form (DNF) is a disjunction of elementary conjunctions. Examples: p , ¬ q , p ∧ ¬ q , p ∨ ¬ q , ( p ∧ ¬ p ) ∨ ¬ q , ( r ∧ q ∧ ¬ p ) ∨ ( ¬ q ∧ p ) ∨ ( ¬ r ∧ p ). 4. A conjunctive normal form (CNF) is a conjunction of elementary disjunctions. Examples: p , ¬ q , p ∧ ¬ q , p ∨ ¬ q , p ∧ ( ¬ p ∨ ¬ q ), ( r ∨ q ∨ ¬ r ) ∧ ¬ q ∧ ( ¬ p ∨ r ). Goranko

  5. Algorithm for equivalent transformation to CNF/DNF Goranko

  6. Algorithm for equivalent transformation to CNF/DNF Theorem (Conjunctive normal form) Every propositional formula is equivalent to a disjunctive normal form and to a conjunctive normal form. Goranko

  7. Algorithm for equivalent transformation to CNF/DNF Theorem (Conjunctive normal form) Every propositional formula is equivalent to a disjunctive normal form and to a conjunctive normal form. Algorithm transforming a formula into a DNF, respectively CNF: Goranko

  8. Algorithm for equivalent transformation to CNF/DNF Theorem (Conjunctive normal form) Every propositional formula is equivalent to a disjunctive normal form and to a conjunctive normal form. Algorithm transforming a formula into a DNF, respectively CNF: 1. Eliminate all occurrences of ↔ and → using the equivalences A ↔ B ≡ ( A → B ) ∧ ( B → A ) and A → B ≡ ¬ A ∨ B . Goranko

  9. Algorithm for equivalent transformation to CNF/DNF Theorem (Conjunctive normal form) Every propositional formula is equivalent to a disjunctive normal form and to a conjunctive normal form. Algorithm transforming a formula into a DNF, respectively CNF: 1. Eliminate all occurrences of ↔ and → using the equivalences A ↔ B ≡ ( A → B ) ∧ ( B → A ) and A → B ≡ ¬ A ∨ B . 2. Transform to negation normal form by using the relevant equivalences. Goranko

  10. Algorithm for equivalent transformation to CNF/DNF Theorem (Conjunctive normal form) Every propositional formula is equivalent to a disjunctive normal form and to a conjunctive normal form. Algorithm transforming a formula into a DNF, respectively CNF: 1. Eliminate all occurrences of ↔ and → using the equivalences A ↔ B ≡ ( A → B ) ∧ ( B → A ) and A → B ≡ ¬ A ∨ B . 2. Transform to negation normal form by using the relevant equivalences. 3. For a DNF: distribute all conjunctions over disjunctions using p ∧ ( q ∨ r ) ≡ ( p ∧ q ) ∨ ( p ∧ r ) . Goranko

  11. Algorithm for equivalent transformation to CNF/DNF Theorem (Conjunctive normal form) Every propositional formula is equivalent to a disjunctive normal form and to a conjunctive normal form. Algorithm transforming a formula into a DNF, respectively CNF: 1. Eliminate all occurrences of ↔ and → using the equivalences A ↔ B ≡ ( A → B ) ∧ ( B → A ) and A → B ≡ ¬ A ∨ B . 2. Transform to negation normal form by using the relevant equivalences. 3. For a DNF: distribute all conjunctions over disjunctions using p ∧ ( q ∨ r ) ≡ ( p ∧ q ) ∨ ( p ∧ r ) . 4. For a CNF: distribute all disjunctions over conjunctions using p ∨ ( q ∧ r ) ≡ ( p ∨ q ) ∧ ( p ∨ r ) . Goranko

  12. Some useful simplifications Goranko

  13. Some useful simplifications Throughout this process the formulae can be simplified by using commutativity, associativity, and idempotency of ∨ and , as well as: Goranko

  14. Some useful simplifications Throughout this process the formulae can be simplified by using commutativity, associativity, and idempotency of ∨ and , as well as: ◮ p ∨ ¬ p ≡ ⊤ ; p ∧ ¬ p ≡ ⊥ ; Goranko

  15. Some useful simplifications Throughout this process the formulae can be simplified by using commutativity, associativity, and idempotency of ∨ and , as well as: ◮ p ∨ ¬ p ≡ ⊤ ; p ∧ ¬ p ≡ ⊥ ; ◮ p ∧ ⊤ ≡ p ; p ∧ ⊥ ≡ ⊥ ; Goranko

  16. Some useful simplifications Throughout this process the formulae can be simplified by using commutativity, associativity, and idempotency of ∨ and , as well as: ◮ p ∨ ¬ p ≡ ⊤ ; p ∧ ¬ p ≡ ⊥ ; ◮ p ∧ ⊤ ≡ p ; p ∧ ⊥ ≡ ⊥ ; ◮ p ∨ ⊤ ≡ ⊤ ; p ∨ ⊥ ≡ p . Goranko

  17. Transformation to DNF and CNF: example Goranko

  18. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) Goranko

  19. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) Goranko

  20. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) Goranko

  21. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) Goranko

  22. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) Goranko

  23. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: Goranko

  24. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) Goranko

  25. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) Goranko

  26. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ⊥ ) ∨ ( ⊥ ∨ ( ¬ q ∧ p )) Goranko

  27. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ⊥ ) ∨ ( ⊥ ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ ( ¬ p ∧ q ) ∨ ( ¬ q ∧ p ). Goranko

  28. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ⊥ ) ∨ ( ⊥ ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ ( ¬ p ∧ q ) ∨ ( ¬ q ∧ p ). For a CNF we distribute ∨ over ∧ and simplify: Goranko

  29. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ⊥ ) ∨ ( ⊥ ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ ( ¬ p ∧ q ) ∨ ( ¬ q ∧ p ). For a CNF we distribute ∨ over ∧ and simplify: ≡ ( ¬ p ∨ r ∨ ¬ p ∨ ¬ q ) ∧ ( ¬ p ∨ r ∨ q ∨ p ) Goranko

  30. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ⊥ ) ∨ ( ⊥ ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ ( ¬ p ∧ q ) ∨ ( ¬ q ∧ p ). For a CNF we distribute ∨ over ∧ and simplify: ≡ ( ¬ p ∨ r ∨ ¬ p ∨ ¬ q ) ∧ ( ¬ p ∨ r ∨ q ∨ p ) ≡ ( ¬ p ∨ r ∨ ¬ q ) ∧ ( ⊤ ∨ r ∨ q ) Goranko

  31. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ⊥ ) ∨ ( ⊥ ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ ( ¬ p ∧ q ) ∨ ( ¬ q ∧ p ). For a CNF we distribute ∨ over ∧ and simplify: ≡ ( ¬ p ∨ r ∨ ¬ p ∨ ¬ q ) ∧ ( ¬ p ∨ r ∨ q ∨ p ) ≡ ( ¬ p ∨ r ∨ ¬ q ) ∧ ( ⊤ ∨ r ∨ q ) ≡ ( ¬ p ∨ r ∨ ¬ q ) ∧ ⊤ Goranko

  32. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ⊥ ) ∨ ( ⊥ ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ ( ¬ p ∧ q ) ∨ ( ¬ q ∧ p ). For a CNF we distribute ∨ over ∧ and simplify: ≡ ( ¬ p ∨ r ∨ ¬ p ∨ ¬ q ) ∧ ( ¬ p ∨ r ∨ q ∨ p ) ≡ ( ¬ p ∨ r ∨ ¬ q ) ∧ ( ⊤ ∨ r ∨ q ) ≡ ( ¬ p ∨ r ∨ ¬ q ) ∧ ⊤ ≡ ¬ p ∨ r ∨ ¬ q . Goranko

  33. Transformation to DNF and CNF: example ( p ∧ ¬ r ) → ( p ↔ ¬ q ) ≡ ( p ∧ ¬ r ) → (( p → ¬ q ) ∧ ( ¬ q → p )) (eliminating ↔ ) ≡ ¬ ( p ∧ ¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( ¬¬ q ∨ p )) (eliminating → ) ≡ ( ¬ p ∨ ¬¬ r ) ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) (driving ¬ inside) ≡ ¬ p ∨ r ∨ (( ¬ p ∨ ¬ q ) ∧ ( q ∨ p )) For a DNF we further distribute ∧ over ∨ and simplify: ≡ ¬ p ∨ r ∨ ((( ¬ p ∨ ¬ q ) ∧ q ) ∨ (( ¬ p ∨ ¬ q ) ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ( ¬ q ∧ q )) ∨ (( ¬ p ∧ p ) ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ (( ¬ p ∧ q ) ∨ ⊥ ) ∨ ( ⊥ ∨ ( ¬ q ∧ p )) ≡ ¬ p ∨ r ∨ ( ¬ p ∧ q ) ∨ ( ¬ q ∧ p ). For a CNF we distribute ∨ over ∧ and simplify: ≡ ( ¬ p ∨ r ∨ ¬ p ∨ ¬ q ) ∧ ( ¬ p ∨ r ∨ q ∨ p ) ≡ ( ¬ p ∨ r ∨ ¬ q ) ∧ ( ⊤ ∨ r ∨ q ) ≡ ( ¬ p ∨ r ∨ ¬ q ) ∧ ⊤ ≡ ¬ p ∨ r ∨ ¬ q . (Note that this is a DNF, too.) Goranko

  34. The rule of Propositional Resolution Goranko

  35. The rule of Propositional Resolution A ∨ C , B ∨ ¬ C RES A ∨ B Goranko

  36. The rule of Propositional Resolution A ∨ C , B ∨ ¬ C RES A ∨ B The formula A ∨ B is called a resolvent of A ∨ C and B ∨ ¬ C , denoted Res ( A ∨ C , B ∨ ¬ C ). Goranko

  37. The rule of Propositional Resolution A ∨ C , B ∨ ¬ C RES A ∨ B The formula A ∨ B is called a resolvent of A ∨ C and B ∨ ¬ C , denoted Res ( A ∨ C , B ∨ ¬ C ). Exercise : Show that the Resolution rule is logically sound. That is, if both premises are valid then the conclusion is valid. Goranko

  38. The rule of Propositional Resolution A ∨ C , B ∨ ¬ C RES A ∨ B The formula A ∨ B is called a resolvent of A ∨ C and B ∨ ¬ C , denoted Res ( A ∨ C , B ∨ ¬ C ). Exercise : Show that the Resolution rule is logically sound. That is, if both premises are valid then the conclusion is valid. Moreover, RES preserves satisfiability: Exercise : Show that if the set of premises is (simultaneously) satisfiable, then it is satisfiable together with the conclusion. Goranko

  39. Clausal normal forms Goranko

  40. Clausal normal forms • A clause is essentially an elementary disjunction l 1 ∨ . . . ∨ l n , but written as a (possibly empty) set of literals { l 1 , . . . , l n } . Goranko

  41. Clausal normal forms • A clause is essentially an elementary disjunction l 1 ∨ . . . ∨ l n , but written as a (possibly empty) set of literals { l 1 , . . . , l n } . • The empty clause {} is a clause containing no literals. Goranko

  42. Clausal normal forms • A clause is essentially an elementary disjunction l 1 ∨ . . . ∨ l n , but written as a (possibly empty) set of literals { l 1 , . . . , l n } . • The empty clause {} is a clause containing no literals. • A unit clause is a clause containing only one literal. Goranko

  43. Clausal normal forms • A clause is essentially an elementary disjunction l 1 ∨ . . . ∨ l n , but written as a (possibly empty) set of literals { l 1 , . . . , l n } . • The empty clause {} is a clause containing no literals. • A unit clause is a clause containing only one literal. • A clausal form is a (possibly empty) set of clauses, written as a list: C 1 . . . C k . It represents the conjunction of these clauses. Goranko

  44. Clausal normal forms • A clause is essentially an elementary disjunction l 1 ∨ . . . ∨ l n , but written as a (possibly empty) set of literals { l 1 , . . . , l n } . • The empty clause {} is a clause containing no literals. • A unit clause is a clause containing only one literal. • A clausal form is a (possibly empty) set of clauses, written as a list: C 1 . . . C k . It represents the conjunction of these clauses. Thus, every CNF can be re-written in a clausal form, and therefore every propositional formula is equivalent to one in a clausal form. Goranko

  45. Clausal normal forms • A clause is essentially an elementary disjunction l 1 ∨ . . . ∨ l n , but written as a (possibly empty) set of literals { l 1 , . . . , l n } . • The empty clause {} is a clause containing no literals. • A unit clause is a clause containing only one literal. • A clausal form is a (possibly empty) set of clauses, written as a list: C 1 . . . C k . It represents the conjunction of these clauses. Thus, every CNF can be re-written in a clausal form, and therefore every propositional formula is equivalent to one in a clausal form. Example : the clausal form of the CNF-formula ( p ∨ ¬ q ∨ ¬ r ) ∧ ¬ p ∧ ( ¬ q ∨ r ) is { p , ¬ q , ¬ r }{¬ p }{¬ q , r } . Goranko

  46. Clausal normal forms • A clause is essentially an elementary disjunction l 1 ∨ . . . ∨ l n , but written as a (possibly empty) set of literals { l 1 , . . . , l n } . • The empty clause {} is a clause containing no literals. • A unit clause is a clause containing only one literal. • A clausal form is a (possibly empty) set of clauses, written as a list: C 1 . . . C k . It represents the conjunction of these clauses. Thus, every CNF can be re-written in a clausal form, and therefore every propositional formula is equivalent to one in a clausal form. Example : the clausal form of the CNF-formula ( p ∨ ¬ q ∨ ¬ r ) ∧ ¬ p ∧ ( ¬ q ∨ r ) is { p , ¬ q , ¬ r }{¬ p }{¬ q , r } . Note that the empty clause {} is not satisfiable (being an empty disjunction), while the empty set of clauses ∅ is satisfied by any truth assignment (being an empty conjunction). Goranko

  47. Clausal Propositional Resolution rule The Propositional Resolution rule can be rewritten for clauses: { A 1 , . . . , C , . . . , A m } { B 1 , . . . , ¬ C , . . . , B n } CL − RES { A 1 , . . . , A m , B 1 , . . . , B n } . Goranko

  48. Clausal Propositional Resolution rule The Propositional Resolution rule can be rewritten for clauses: { A 1 , . . . , C , . . . , A m } { B 1 , . . . , ¬ C , . . . , B n } CL − RES { A 1 , . . . , A m , B 1 , . . . , B n } . The clause { A 1 , . . . , A m , B 1 , . . . , B n } is called a resolvent of the clauses { A 1 , . . . , C , . . . , A m } and { B 1 , . . . , ¬ C , . . . , B n } . Goranko

  49. Clausal Propositional Resolution rule The Propositional Resolution rule can be rewritten for clauses: { A 1 , . . . , C , . . . , A m } { B 1 , . . . , ¬ C , . . . , B n } CL − RES { A 1 , . . . , A m , B 1 , . . . , B n } . The clause { A 1 , . . . , A m , B 1 , . . . , B n } is called a resolvent of the clauses { A 1 , . . . , C , . . . , A m } and { B 1 , . . . , ¬ C , . . . , B n } . Example { p , q , ¬ r } {¬ q , ¬ r } { p , ¬ r , ¬ r } , Goranko

  50. Clausal Propositional Resolution rule The Propositional Resolution rule can be rewritten for clauses: { A 1 , . . . , C , . . . , A m } { B 1 , . . . , ¬ C , . . . , B n } CL − RES { A 1 , . . . , A m , B 1 , . . . , B n } . The clause { A 1 , . . . , A m , B 1 , . . . , B n } is called a resolvent of the clauses { A 1 , . . . , C , . . . , A m } and { B 1 , . . . , ¬ C , . . . , B n } . Example { p , q , ¬ r } {¬ q , ¬ r } { p , ¬ r , ¬ r } , {¬ p , q , ¬ r } { r } {¬ p , q } , Goranko

  51. Clausal Propositional Resolution rule The Propositional Resolution rule can be rewritten for clauses: { A 1 , . . . , C , . . . , A m } { B 1 , . . . , ¬ C , . . . , B n } CL − RES { A 1 , . . . , A m , B 1 , . . . , B n } . The clause { A 1 , . . . , A m , B 1 , . . . , B n } is called a resolvent of the clauses { A 1 , . . . , C , . . . , A m } and { B 1 , . . . , ¬ C , . . . , B n } . Example { p , q , ¬ r } {¬ q , ¬ r } { p , ¬ r , ¬ r } , {¬ p , q , ¬ r } { r } {¬ p , q } , {¬ p } { p } {} . Goranko

  52. Some remarks Goranko

  53. Some remarks Note that two clauses can have more than one resolvent, e.g.: { p , ¬ q }{¬ p , q } { p , ¬ q }{¬ p , q } { p , ¬ p } , {¬ q , q } . Goranko

  54. Some remarks Note that two clauses can have more than one resolvent, e.g.: { p , ¬ q }{¬ p , q } { p , ¬ q }{¬ p , q } { p , ¬ p } , {¬ q , q } . However, it is wrong to apply the Propositional Resolution rule for both pairs of complementary literals simultaneously and obtain { p , ¬ q }{¬ p , q } {} . Goranko

  55. Some remarks Note that two clauses can have more than one resolvent, e.g.: { p , ¬ q }{¬ p , q } { p , ¬ q }{¬ p , q } { p , ¬ p } , {¬ q , q } . However, it is wrong to apply the Propositional Resolution rule for both pairs of complementary literals simultaneously and obtain { p , ¬ q }{¬ p , q } {} . Sometimes, the resolvent can (and should) be simplified, by removing duplicated literals on the fly: { A 1 , . . . , C , C , . . . , A m } ⇒ { A 1 , . . . , C , . . . , A m } . Goranko

  56. Some remarks Note that two clauses can have more than one resolvent, e.g.: { p , ¬ q }{¬ p , q } { p , ¬ q }{¬ p , q } { p , ¬ p } , {¬ q , q } . However, it is wrong to apply the Propositional Resolution rule for both pairs of complementary literals simultaneously and obtain { p , ¬ q }{¬ p , q } {} . Sometimes, the resolvent can (and should) be simplified, by removing duplicated literals on the fly: { A 1 , . . . , C , C , . . . , A m } ⇒ { A 1 , . . . , C , . . . , A m } . For instance: { p , ¬ q , ¬ r }{ q , ¬ r } instead of { p , ¬ q , ¬ r }{ q , ¬ r } { p , ¬ r } { p , ¬ r , ¬ r } Goranko

  57. Propositional resolution as a deductive system Goranko

  58. Propositional resolution as a deductive system The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A 1 , . . . , A n | = B , show that there is no truth assignment which falsifies it Goranko

  59. Propositional resolution as a deductive system The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A 1 , . . . , A n | = B , show that there is no truth assignment which falsifies it, i.e., show that the formulae A 1 , . . . , A n and ¬ B cannot be satisfied simultaneously . Goranko

  60. Propositional resolution as a deductive system The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A 1 , . . . , A n | = B , show that there is no truth assignment which falsifies it, i.e., show that the formulae A 1 , . . . , A n and ¬ B cannot be satisfied simultaneously . That is done by transforming the formulae A 1 , . . . , A n and ¬ B to a clausal form, and then using repeatedly the Propositional Resolution rule in attempt to derive the empty clause {} . Goranko

  61. Propositional resolution as a deductive system The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A 1 , . . . , A n | = B , show that there is no truth assignment which falsifies it, i.e., show that the formulae A 1 , . . . , A n and ¬ B cannot be satisfied simultaneously . That is done by transforming the formulae A 1 , . . . , A n and ¬ B to a clausal form, and then using repeatedly the Propositional Resolution rule in attempt to derive the empty clause {} . Since {} is not satisfiable, its derivation means that A 1 , . . . , A n and ¬ B cannot be satisfied together. Goranko

  62. Propositional resolution as a deductive system The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A 1 , . . . , A n | = B , show that there is no truth assignment which falsifies it, i.e., show that the formulae A 1 , . . . , A n and ¬ B cannot be satisfied simultaneously . That is done by transforming the formulae A 1 , . . . , A n and ¬ B to a clausal form, and then using repeatedly the Propositional Resolution rule in attempt to derive the empty clause {} . Since {} is not satisfiable, its derivation means that A 1 , . . . , A n and ¬ B cannot be satisfied together. Then, the logical consequence A 1 , . . . , A n | = B holds. Goranko

  63. Propositional resolution as a deductive system The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A 1 , . . . , A n | = B , show that there is no truth assignment which falsifies it, i.e., show that the formulae A 1 , . . . , A n and ¬ B cannot be satisfied simultaneously . That is done by transforming the formulae A 1 , . . . , A n and ¬ B to a clausal form, and then using repeatedly the Propositional Resolution rule in attempt to derive the empty clause {} . Since {} is not satisfiable, its derivation means that A 1 , . . . , A n and ¬ B cannot be satisfied together. Then, the logical consequence A 1 , . . . , A n | = B holds. Alternatively, after finitely many applications of the Propositional Resolution rule, no new applications of the rule remain possible. Goranko

  64. Propositional resolution as a deductive system The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A 1 , . . . , A n | = B , show that there is no truth assignment which falsifies it, i.e., show that the formulae A 1 , . . . , A n and ¬ B cannot be satisfied simultaneously . That is done by transforming the formulae A 1 , . . . , A n and ¬ B to a clausal form, and then using repeatedly the Propositional Resolution rule in attempt to derive the empty clause {} . Since {} is not satisfiable, its derivation means that A 1 , . . . , A n and ¬ B cannot be satisfied together. Then, the logical consequence A 1 , . . . , A n | = B holds. Alternatively, after finitely many applications of the Propositional Resolution rule, no new applications of the rule remain possible. If the empty clause is not derived by then, it cannot be derived at all, and hence the A 1 , . . . , A n and ¬ B can be satisfied together, Goranko

  65. Propositional resolution as a deductive system The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A 1 , . . . , A n | = B , show that there is no truth assignment which falsifies it, i.e., show that the formulae A 1 , . . . , A n and ¬ B cannot be satisfied simultaneously . That is done by transforming the formulae A 1 , . . . , A n and ¬ B to a clausal form, and then using repeatedly the Propositional Resolution rule in attempt to derive the empty clause {} . Since {} is not satisfiable, its derivation means that A 1 , . . . , A n and ¬ B cannot be satisfied together. Then, the logical consequence A 1 , . . . , A n | = B holds. Alternatively, after finitely many applications of the Propositional Resolution rule, no new applications of the rule remain possible. If the empty clause is not derived by then, it cannot be derived at all, and hence the A 1 , . . . , A n and ¬ B can be satisfied together, so the logical consequence A 1 , . . . , A n | = B does not hold. Goranko

  66. Propositional resolution: how to construct a satisfying assignment? Suppose the Propositional Resolution applied to a given input set of clauses ends with a set of non-empty clauses (such that no more clauses can be derived from it). Goranko

  67. Propositional resolution: how to construct a satisfying assignment? Suppose the Propositional Resolution applied to a given input set of clauses ends with a set of non-empty clauses (such that no more clauses can be derived from it). Question: How to construct a satisfying assignment for that set of clauses? Goranko

  68. Propositional resolution derivation: Example 1 Check whether p → q , q → r | = p → r holds. Goranko

  69. Propositional resolution derivation: Example 1 Check whether p → q , q → r | = p → r holds. First, transform p → q , q → r , ¬ ( p → r ) to clausal form: Goranko

  70. Propositional resolution derivation: Example 1 Check whether p → q , q → r | = p → r holds. First, transform p → q , q → r , ¬ ( p → r ) to clausal form: C 1 = {¬ p , q } , C 2 = {¬ q , r } , C 3 = { p } , C 4 = {¬ r } . Goranko

  71. Propositional resolution derivation: Example 1 Check whether p → q , q → r | = p → r holds. First, transform p → q , q → r , ¬ ( p → r ) to clausal form: C 1 = {¬ p , q } , C 2 = {¬ q , r } , C 3 = { p } , C 4 = {¬ r } . Now, applying Propositional Resolution successively: Goranko

  72. Propositional resolution derivation: Example 1 Check whether p → q , q → r | = p → r holds. First, transform p → q , q → r , ¬ ( p → r ) to clausal form: C 1 = {¬ p , q } , C 2 = {¬ q , r } , C 3 = { p } , C 4 = {¬ r } . Now, applying Propositional Resolution successively: C 5 = Res ( C 1 , C 3 ) = { q } ; Goranko

  73. Propositional resolution derivation: Example 1 Check whether p → q , q → r | = p → r holds. First, transform p → q , q → r , ¬ ( p → r ) to clausal form: C 1 = {¬ p , q } , C 2 = {¬ q , r } , C 3 = { p } , C 4 = {¬ r } . Now, applying Propositional Resolution successively: C 5 = Res ( C 1 , C 3 ) = { q } ; C 6 = Res ( C 2 , C 5 ) = { r } ; Goranko

  74. Propositional resolution derivation: Example 1 Check whether p → q , q → r | = p → r holds. First, transform p → q , q → r , ¬ ( p → r ) to clausal form: C 1 = {¬ p , q } , C 2 = {¬ q , r } , C 3 = { p } , C 4 = {¬ r } . Now, applying Propositional Resolution successively: C 5 = Res ( C 1 , C 3 ) = { q } ; C 6 = Res ( C 2 , C 5 ) = { r } ; C 7 = Res ( C 4 , C 6 ) = {} . Goranko

  75. Propositional resolution derivation: Example 1 Check whether p → q , q → r | = p → r holds. First, transform p → q , q → r , ¬ ( p → r ) to clausal form: C 1 = {¬ p , q } , C 2 = {¬ q , r } , C 3 = { p } , C 4 = {¬ r } . Now, applying Propositional Resolution successively: C 5 = Res ( C 1 , C 3 ) = { q } ; C 6 = Res ( C 2 , C 5 ) = { r } ; C 7 = Res ( C 4 , C 6 ) = {} . The derivation of the empty clause completes the proof. Goranko

  76. Propositional resolution derivation: Example 2 Check whether ( ¬ p → q ) , ¬ r � p ∨ ( ¬ q ∧ ¬ r ) holds. Goranko

  77. Propositional resolution derivation: Example 2 Check whether ( ¬ p → q ) , ¬ r � p ∨ ( ¬ q ∧ ¬ r ) holds. First, transform ( ¬ p → q ) , ¬ r , ¬ ( p ∨ ( ¬ q ∧ ¬ r )) to clausal form: Goranko

  78. Propositional resolution derivation: Example 2 Check whether ( ¬ p → q ) , ¬ r � p ∨ ( ¬ q ∧ ¬ r ) holds. First, transform ( ¬ p → q ) , ¬ r , ¬ ( p ∨ ( ¬ q ∧ ¬ r )) to clausal form: C 1 = { p , q } , C 2 = {¬ r } , C 3 = {¬ p } , C 4 = { q , r } . Goranko

Recommend


More recommend