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

logic as a tool chapter 2 deductive reasoning in
SMART_READER_LITE
LIVE PREVIEW

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:


slide-1
SLIDE 1

Goranko

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

slide-2
SLIDE 2

Goranko

Disjunctive and conjunctive normal forms: basic definitions

slide-3
SLIDE 3

Goranko

Disjunctive and conjunctive normal forms: basic definitions

  • 1. A literal is a propositional constant or variable or its negation.
slide-4
SLIDE 4

Goranko

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.

slide-5
SLIDE 5

Goranko

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,

slide-6
SLIDE 6

Goranko

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,

slide-7
SLIDE 7

Goranko

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,

slide-8
SLIDE 8

Goranko

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;

slide-9
SLIDE 9

Goranko

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,

slide-10
SLIDE 10

Goranko

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,

slide-11
SLIDE 11

Goranko

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,

slide-12
SLIDE 12

Goranko

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.

slide-13
SLIDE 13

Goranko

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.

slide-14
SLIDE 14

Goranko

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,

slide-15
SLIDE 15

Goranko

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,

slide-16
SLIDE 16

Goranko

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,

slide-17
SLIDE 17

Goranko

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,

slide-18
SLIDE 18

Goranko

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,

slide-19
SLIDE 19

Goranko

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).

slide-20
SLIDE 20

Goranko

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.

slide-21
SLIDE 21

Goranko

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,

slide-22
SLIDE 22

Goranko

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,

slide-23
SLIDE 23

Goranko

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,

slide-24
SLIDE 24

Goranko

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,

slide-25
SLIDE 25

Goranko

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),

slide-26
SLIDE 26

Goranko

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).

slide-27
SLIDE 27

Goranko

Algorithm for equivalent transformation to CNF/DNF

slide-28
SLIDE 28

Goranko

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.

slide-29
SLIDE 29

Goranko

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:

slide-30
SLIDE 30

Goranko

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.

slide-31
SLIDE 31

Goranko

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.

slide-32
SLIDE 32

Goranko

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).

slide-33
SLIDE 33

Goranko

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).

slide-34
SLIDE 34

Goranko

Some useful simplifications

slide-35
SLIDE 35

Goranko

Some useful simplifications

Throughout this process the formulae can be simplified by using commutativity, associativity, and idempotency of ∨ and, as well as:

slide-36
SLIDE 36

Goranko

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 ≡ ⊥;

slide-37
SLIDE 37

Goranko

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 ∧ ⊥ ≡ ⊥;

slide-38
SLIDE 38

Goranko

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.

slide-39
SLIDE 39

Goranko

Transformation to DNF and CNF: example

slide-40
SLIDE 40

Goranko

Transformation to DNF and CNF: example

(p ∧ ¬r) → (p ↔ ¬q)

slide-41
SLIDE 41

Goranko

Transformation to DNF and CNF: example

(p ∧ ¬r) → (p ↔ ¬q) ≡ (p ∧ ¬r) → ((p → ¬q) ∧ (¬q → p)) (eliminating ↔)

slide-42
SLIDE 42

Goranko

Transformation to DNF and CNF: example

(p ∧ ¬r) → (p ↔ ¬q) ≡ (p ∧ ¬r) → ((p → ¬q) ∧ (¬q → p)) (eliminating ↔) ≡ ¬(p ∧ ¬r) ∨ ((¬p ∨ ¬q) ∧ (¬¬q ∨ p)) (eliminating →)

slide-43
SLIDE 43

Goranko

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)

slide-44
SLIDE 44

Goranko

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))

slide-45
SLIDE 45

Goranko

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:

slide-46
SLIDE 46

Goranko

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))

slide-47
SLIDE 47

Goranko

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))

slide-48
SLIDE 48

Goranko

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))

slide-49
SLIDE 49

Goranko

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).

slide-50
SLIDE 50

Goranko

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:

slide-51
SLIDE 51

Goranko

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)

slide-52
SLIDE 52

Goranko

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)

slide-53
SLIDE 53

Goranko

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) ∧ ⊤

slide-54
SLIDE 54

Goranko

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.

slide-55
SLIDE 55

Goranko

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.)

slide-56
SLIDE 56

Goranko

The rule of Propositional Resolution

slide-57
SLIDE 57

Goranko

The rule of Propositional Resolution

RES A ∨ C, B ∨ ¬C A ∨ B

slide-58
SLIDE 58

Goranko

The rule of Propositional Resolution

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

slide-59
SLIDE 59

Goranko

The rule of Propositional Resolution

RES A ∨ C, B ∨ ¬C 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.

slide-60
SLIDE 60

Goranko

The rule of Propositional Resolution

RES A ∨ C, B ∨ ¬C 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.

slide-61
SLIDE 61

Goranko

Clausal normal forms

slide-62
SLIDE 62

Goranko

Clausal normal forms

  • A clause is essentially an elementary disjunction l1 ∨ . . . ∨ ln,

but written as a (possibly empty) set of literals {l1, . . . , ln}.

slide-63
SLIDE 63

Goranko

Clausal normal forms

  • A clause is essentially an elementary disjunction l1 ∨ . . . ∨ ln,

but written as a (possibly empty) set of literals {l1, . . . , ln}.

  • The empty clause {} is a clause containing no literals.
slide-64
SLIDE 64

Goranko

Clausal normal forms

  • A clause is essentially an elementary disjunction l1 ∨ . . . ∨ ln,

but written as a (possibly empty) set of literals {l1, . . . , ln}.

  • The empty clause {} is a clause containing no literals.
  • A unit clause is a clause containing only one literal.
slide-65
SLIDE 65

Goranko

Clausal normal forms

  • A clause is essentially an elementary disjunction l1 ∨ . . . ∨ ln,

but written as a (possibly empty) set of literals {l1, . . . , ln}.

  • 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:

C1 . . . Ck. It represents the conjunction of these clauses.

slide-66
SLIDE 66

Goranko

Clausal normal forms

  • A clause is essentially an elementary disjunction l1 ∨ . . . ∨ ln,

but written as a (possibly empty) set of literals {l1, . . . , ln}.

  • 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:

C1 . . . Ck. 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.

slide-67
SLIDE 67

Goranko

Clausal normal forms

  • A clause is essentially an elementary disjunction l1 ∨ . . . ∨ ln,

but written as a (possibly empty) set of literals {l1, . . . , ln}.

  • 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:

C1 . . . Ck. 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}.

slide-68
SLIDE 68

Goranko

Clausal normal forms

  • A clause is essentially an elementary disjunction l1 ∨ . . . ∨ ln,

but written as a (possibly empty) set of literals {l1, . . . , ln}.

  • 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:

C1 . . . Ck. 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).

slide-69
SLIDE 69

Goranko

Clausal Propositional Resolution rule

The Propositional Resolution rule can be rewritten for clauses: CL − RES {A1, . . . , C, . . . , Am} {B1, . . . , ¬C, . . . , Bn} {A1, . . . , Am, B1, . . . , Bn} .

slide-70
SLIDE 70

Goranko

Clausal Propositional Resolution rule

The Propositional Resolution rule can be rewritten for clauses: CL − RES {A1, . . . , C, . . . , Am} {B1, . . . , ¬C, . . . , Bn} {A1, . . . , Am, B1, . . . , Bn} . The clause {A1, . . . , Am, B1, . . . , Bn} is called a resolvent of the clauses {A1, . . . , C, . . . , Am} and {B1, . . . , ¬C, . . . , Bn}.

slide-71
SLIDE 71

Goranko

Clausal Propositional Resolution rule

The Propositional Resolution rule can be rewritten for clauses: CL − RES {A1, . . . , C, . . . , Am} {B1, . . . , ¬C, . . . , Bn} {A1, . . . , Am, B1, . . . , Bn} . The clause {A1, . . . , Am, B1, . . . , Bn} is called a resolvent of the clauses {A1, . . . , C, . . . , Am} and {B1, . . . , ¬C, . . . , Bn}.

Example

{p, q, ¬r} {¬q, ¬r} {p, ¬r, ¬r} ,

slide-72
SLIDE 72

Goranko

Clausal Propositional Resolution rule

The Propositional Resolution rule can be rewritten for clauses: CL − RES {A1, . . . , C, . . . , Am} {B1, . . . , ¬C, . . . , Bn} {A1, . . . , Am, B1, . . . , Bn} . The clause {A1, . . . , Am, B1, . . . , Bn} is called a resolvent of the clauses {A1, . . . , C, . . . , Am} and {B1, . . . , ¬C, . . . , Bn}.

Example

{p, q, ¬r} {¬q, ¬r} {p, ¬r, ¬r} , {¬p, q, ¬r} {r} {¬p, q} ,

slide-73
SLIDE 73

Goranko

Clausal Propositional Resolution rule

The Propositional Resolution rule can be rewritten for clauses: CL − RES {A1, . . . , C, . . . , Am} {B1, . . . , ¬C, . . . , Bn} {A1, . . . , Am, B1, . . . , Bn} . The clause {A1, . . . , Am, B1, . . . , Bn} is called a resolvent of the clauses {A1, . . . , C, . . . , Am} and {B1, . . . , ¬C, . . . , Bn}.

Example

{p, q, ¬r} {¬q, ¬r} {p, ¬r, ¬r} , {¬p, q, ¬r} {r} {¬p, q} , {¬p} {p} {} .

slide-74
SLIDE 74

Goranko

Some remarks

slide-75
SLIDE 75

Goranko

Some remarks

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

slide-76
SLIDE 76

Goranko

Some remarks

Note that two clauses can have more than one resolvent, e.g.: {p, ¬q}{¬p, q} {p, ¬p} , {p, ¬q}{¬p, q} {¬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} {} .

slide-77
SLIDE 77

Goranko

Some remarks

Note that two clauses can have more than one resolvent, e.g.: {p, ¬q}{¬p, q} {p, ¬p} , {p, ¬q}{¬p, q} {¬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: {A1, . . . , C, C, . . . , Am} ⇒ {A1, . . . , C, . . . , Am}.

slide-78
SLIDE 78

Goranko

Some remarks

Note that two clauses can have more than one resolvent, e.g.: {p, ¬q}{¬p, q} {p, ¬p} , {p, ¬q}{¬p, q} {¬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: {A1, . . . , C, C, . . . , Am} ⇒ {A1, . . . , C, . . . , Am}. For instance: {p, ¬q, ¬r}{q, ¬r} {p, ¬r} instead of {p, ¬q, ¬r}{q, ¬r} {p, ¬r, ¬r}

slide-79
SLIDE 79

Goranko

Propositional resolution as a deductive system

slide-80
SLIDE 80

Goranko

Propositional resolution as a deductive system

The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A1, . . . , An | = B, show that there is no truth assignment which falsifies it

slide-81
SLIDE 81

Goranko

Propositional resolution as a deductive system

The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A1, . . . , An | = B, show that there is no truth assignment which falsifies it, i.e., show that the formulae A1, . . . , An and ¬B cannot be satisfied simultaneously.

slide-82
SLIDE 82

Goranko

Propositional resolution as a deductive system

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

slide-83
SLIDE 83

Goranko

Propositional resolution as a deductive system

The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A1, . . . , An | = B, show that there is no truth assignment which falsifies it, i.e., show that the formulae A1, . . . , An and ¬B cannot be satisfied simultaneously. That is done by transforming the formulae A1, . . . , An 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 A1, . . . , An and ¬B cannot be satisfied together.

slide-84
SLIDE 84

Goranko

Propositional resolution as a deductive system

The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A1, . . . , An | = B, show that there is no truth assignment which falsifies it, i.e., show that the formulae A1, . . . , An and ¬B cannot be satisfied simultaneously. That is done by transforming the formulae A1, . . . , An 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 A1, . . . , An and ¬B cannot be satisfied together. Then, the logical consequence A1, . . . , An | = B holds.

slide-85
SLIDE 85

Goranko

Propositional resolution as a deductive system

The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A1, . . . , An | = B, show that there is no truth assignment which falsifies it, i.e., show that the formulae A1, . . . , An and ¬B cannot be satisfied simultaneously. That is done by transforming the formulae A1, . . . , An 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 A1, . . . , An and ¬B cannot be satisfied together. Then, the logical consequence A1, . . . , An | = B holds. Alternatively, after finitely many applications of the Propositional Resolution rule, no new applications of the rule remain possible.

slide-86
SLIDE 86

Goranko

Propositional resolution as a deductive system

The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A1, . . . , An | = B, show that there is no truth assignment which falsifies it, i.e., show that the formulae A1, . . . , An and ¬B cannot be satisfied simultaneously. That is done by transforming the formulae A1, . . . , An 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 A1, . . . , An and ¬B cannot be satisfied together. Then, the logical consequence A1, . . . , An | = 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 A1, . . . , An and ¬B can be satisfied together,

slide-87
SLIDE 87

Goranko

Propositional resolution as a deductive system

The underlying idea of Propositional Resolution: in order to prove the validity of a logical consequence A1, . . . , An | = B, show that there is no truth assignment which falsifies it, i.e., show that the formulae A1, . . . , An and ¬B cannot be satisfied simultaneously. That is done by transforming the formulae A1, . . . , An 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 A1, . . . , An and ¬B cannot be satisfied together. Then, the logical consequence A1, . . . , An | = 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 A1, . . . , An and ¬B can be satisfied together, so the logical consequence A1, . . . , An | = B does not hold.

slide-88
SLIDE 88

Goranko

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).

slide-89
SLIDE 89

Goranko

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?

slide-90
SLIDE 90

Goranko

Propositional resolution derivation: Example 1

Check whether p → q, q → r | = p → r holds.

slide-91
SLIDE 91

Goranko

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:

slide-92
SLIDE 92

Goranko

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: C1 = {¬p, q}, C2 = {¬q, r}, C3 = {p}, C4 = {¬r}.

slide-93
SLIDE 93

Goranko

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: C1 = {¬p, q}, C2 = {¬q, r}, C3 = {p}, C4 = {¬r}. Now, applying Propositional Resolution successively:

slide-94
SLIDE 94

Goranko

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: C1 = {¬p, q}, C2 = {¬q, r}, C3 = {p}, C4 = {¬r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q};

slide-95
SLIDE 95

Goranko

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: C1 = {¬p, q}, C2 = {¬q, r}, C3 = {p}, C4 = {¬r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q}; C6 = Res(C2, C5) = {r};

slide-96
SLIDE 96

Goranko

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: C1 = {¬p, q}, C2 = {¬q, r}, C3 = {p}, C4 = {¬r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q}; C6 = Res(C2, C5) = {r}; C7 = Res(C4, C6) = {}.

slide-97
SLIDE 97

Goranko

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: C1 = {¬p, q}, C2 = {¬q, r}, C3 = {p}, C4 = {¬r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q}; C6 = Res(C2, C5) = {r}; C7 = Res(C4, C6) = {}. The derivation of the empty clause completes the proof.

slide-98
SLIDE 98

Goranko

Propositional resolution derivation: Example 2

Check whether (¬p → q), ¬r p ∨ (¬q ∧ ¬r) holds.

slide-99
SLIDE 99

Goranko

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:

slide-100
SLIDE 100

Goranko

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: C1 = {p, q}, C2 = {¬r}, C3 = {¬p}, C4 = {q, r}.

slide-101
SLIDE 101

Goranko

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: C1 = {p, q}, C2 = {¬r}, C3 = {¬p}, C4 = {q, r}. Now, applying Propositional Resolution successively:

slide-102
SLIDE 102

Goranko

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: C1 = {p, q}, C2 = {¬r}, C3 = {¬p}, C4 = {q, r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q};

slide-103
SLIDE 103

Goranko

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: C1 = {p, q}, C2 = {¬r}, C3 = {¬p}, C4 = {q, r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q}; C6 = Res(C2, C4) = {q};

slide-104
SLIDE 104

Goranko

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: C1 = {p, q}, C2 = {¬r}, C3 = {¬p}, C4 = {q, r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q}; C6 = Res(C2, C4) = {q}; At this stage, no new applications of the Propositional Resolution rule are possible

slide-105
SLIDE 105

Goranko

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: C1 = {p, q}, C2 = {¬r}, C3 = {¬p}, C4 = {q, r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q}; C6 = Res(C2, C4) = {q}; At this stage, no new applications of the Propositional Resolution rule are possible, hence the empty clause is not derivable.

slide-106
SLIDE 106

Goranko

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: C1 = {p, q}, C2 = {¬r}, C3 = {¬p}, C4 = {q, r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q}; C6 = Res(C2, C4) = {q}; At this stage, no new applications of the Propositional Resolution rule are possible, hence the empty clause is not derivable. Therefore, (¬p → q), ¬r p ∨ (¬q ∧ ¬r).

slide-107
SLIDE 107

Goranko

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: C1 = {p, q}, C2 = {¬r}, C3 = {¬p}, C4 = {q, r}. Now, applying Propositional Resolution successively: C5 = Res(C1, C3) = {q}; C6 = Res(C2, C4) = {q}; At this stage, no new applications of the Propositional Resolution rule are possible, hence the empty clause is not derivable. Therefore, (¬p → q), ¬r p ∨ (¬q ∧ ¬r). A falsifying assignment can be extracted from the unit clauses in the final set: p : F, q : T, r : F.