Propositional Logic: Completeness of Formal Deduction Alice Gao - - PowerPoint PPT Presentation

propositional logic completeness of formal deduction
SMART_READER_LITE
LIVE PREVIEW

Propositional Logic: Completeness of Formal Deduction Alice Gao - - PowerPoint PPT Presentation

Propositional Logic: Completeness of Formal Deduction Alice Gao Lecture 10 CS 245 Logic and Computation Fall 2019 1 / 37 Learning Goals By the end of this lecture, you should be able to their defjnitions. theorem. CS 245 Logic and


slide-1
SLIDE 1

Propositional Logic: Completeness of Formal Deduction

Alice Gao

Lecture 10

CS 245 Logic and Computation Fall 2019 1 / 37

slide-2
SLIDE 2

Learning Goals

By the end of this lecture, you should be able to

▶ Defjne the completeness of formal deduction. ▶ Defjne consistency and satisfjability. ▶ Prove properties of consistent and satisfjable sets based on

their defjnitions.

▶ Reproduce the key steps of the proof of the completeness

theorem.

CS 245 Logic and Computation Fall 2019 2 / 37

slide-3
SLIDE 3

The Soundness of Formal Deduction

Theorems 1 and 2 are equivalent.

Theorem 1 (Soundness of Formal Deduction)

If Σ ⊢ 𝐵, then Σ ⊨ 𝐵.

Theorem 2

If Σ is satisfjable, then Σ is consistent.

CS 245 Logic and Computation Fall 2019 3 / 37

slide-4
SLIDE 4

The Completeness of Formal Deduction

Theorems 3 and 4 are equivalent.

Theorem 3 (Completeness of Formal Deduction)

If Σ ⊨ 𝐵, then Σ ⊢ 𝐵.

Theorem 4

If Σ is consistent, then Σ is satisfjable.

CS 245 Logic and Computation Fall 2019 4 / 37

slide-5
SLIDE 5

Outline

Learning Goals Defjnitions of Satisfjability and Consistency Two Proofs of Completeness of FD Proof of Completeness of FD using the Stronger Defjnition of Maximal Consistency Proof of Completeness of FD using the Weaker Defjnition of Maximal Consistency Revisiting the Learning Goals

CS 245 Logic and Computation Fall 2019 5 / 37

slide-6
SLIDE 6

Σ is satisfjable

Defjnition 5

Σ is satisfjable if there exists a truth valuation 𝑢 such that for every 𝐵 ∈ Σ, 𝐵𝑢 = 1. Note that this is a semantic notion.

CS 245 Logic and Computation Fall 2019 6 / 37

slide-7
SLIDE 7

Σ is consistent

Intuitively, Σ is consistent if it doesn’t prove a contradiction. Two equivalent defjnitions:

  • 1. There exists a formula 𝐵, Σ ⊬ 𝐵.

∃𝐵 (Σ ⊬ 𝐵).

  • 2. For every formula 𝐵, if Σ ⊢ 𝐵, then Σ ⊬ (¬𝐵).

∀𝐵 (Σ ⊢ 𝐵 → Σ ⊬ ¬𝐵). Note that consistency is a syntactical notion. Let’s prove that these two defjnitions are equivalent.

CS 245 Logic and Computation Fall 2019 7 / 37

slide-8
SLIDE 8

Σ is consistent - two equivalent defjnitions

Theorem 6

Def 2 implies def 1.

Proof.

Assume that for every formula 𝐵, if Σ ⊢ 𝐵, then Σ ⊬ (¬𝐵). We need to fjnd a formula 𝐵 such that Σ ⊬ 𝐵.

CS 245 Logic and Computation Fall 2019 8 / 37

slide-9
SLIDE 9

Σ is consistent - two equivalent defjnitions

Theorem 7

Negation of def 2 implies negation of def 1.

Proof.

Assume that there exists a formula 𝐵 such that Σ ⊢ 𝐵 and Σ ⊢ (¬𝐵). We need to prove that for every formula A, Σ ⊢ 𝐵.

CS 245 Logic and Computation Fall 2019 9 / 37

slide-10
SLIDE 10

Sketch of the Proof of The Completeness of Formal Deduction

Theorem 8

If Σ is consistent implies Σ is satisfjable, then Σ ⊨ 𝐵 implies Σ ⊢ 𝐵.

Proof Sketch.

Assume that Σ ⊨ 𝐵. If Σ ⊨ 𝐵, then we can prove that Σ ∪ {¬𝐵} is not satisfjable. (Part of assignment 4) By our assumption, if Σ ∪ {¬𝐵} is not satisfjable, then Σ ∪ {¬𝐵} is inconsistent. If Σ ∪ {¬𝐵} is inconsistent, then Σ ⊢ 𝐵. (Let’s prove this part.)

CS 245 Logic and Computation Fall 2019 10 / 37

slide-11
SLIDE 11

Properties of a Consistent Set — Direction 1

Theorem 9

If Σ ∪ {¬𝐵} is inconsistent, then Σ ⊢ 𝐵.

Proof.

Similarly, we can prove that “if Σ ∪ {𝐵} is inconsistent, then Σ ⊢ (¬𝐵).”

CS 245 Logic and Computation Fall 2019 11 / 37

slide-12
SLIDE 12

Exercise: Properties of a Consistent Set — Direction 2

Theorem 10

If Σ ⊢ 𝐵, then Σ ∪ {¬𝐵} is inconsistent.

Proof.

Similarly, we can prove that “if Σ ⊢ (¬𝐵), then Σ ∪ {𝐵} is inconsistent.”

CS 245 Logic and Computation Fall 2019 12 / 37

slide-13
SLIDE 13

Outline

Learning Goals Defjnitions of Satisfjability and Consistency Two Proofs of Completeness of FD Proof of Completeness of FD using the Stronger Defjnition of Maximal Consistency Proof of Completeness of FD using the Weaker Defjnition of Maximal Consistency Revisiting the Learning Goals

CS 245 Logic and Computation Fall 2019 13 / 37

slide-14
SLIDE 14

Two Proofs of the Completeness of Formal Deduction

We will present two versions of the proofs of the completeness of formal deduction. These two versions are almost identical except for two key points.

  • 1. The proofs defjne the truth valuation 𝑢 based on the

maximally consistent set Σ∗.

▶ Proof 1 defjnes 𝑞𝑢 = 1 ifg 𝑞 ∈ Σ∗. ▶ Proof 2 defjnes 𝑞𝑢 = 1 ifg Σ∗ ⊢ 𝑞.

  • 2. Because of the defjnitions of the truth valuation 𝑢,

the proofs require difgerent defjnitions of maximal consistency.

▶ Proof 1 requires the maximally consistent set Σ∗ to satisfy

𝐵 ∈ Σ∗ or (¬𝐵) ∈ Σ∗ for every formula 𝐵.

▶ Proof 2 requires the maximally consistent set Σ∗ to satisfy

Σ∗ ⊢ 𝐵 or Σ∗ ⊢ (¬𝐵) for every formula 𝐵.

CS 245 Logic and Computation Fall 2019 14 / 37

slide-15
SLIDE 15

Two Defjnitions of Maximal Consistency

The two proofs require two difgerent defjnitions of a maximally consistent set. The fjrst defjnition is stronger than and implies the second defjnition.

  • 1. Stronger defjnition given in the Lu Zhongwan textbook

Given a consistent Σ, Σ is maximally consistent if and only if

▶ For every formula 𝐵, if 𝐵 ∉ Σ, then Σ ∪ {𝐵} is inconsistent. ▶ For every formula 𝐵, 𝐵 ∈ Σ or (¬𝐵) ∈ Σ but not both.

This defjnition is re-stated on slide 18.

  • 2. Weaker defjnition given in Assignment 5

Given a consistent Σ, Σ is maximally consistent if and only if

▶ For every formula 𝐵, if Σ ⊬ 𝐵, then Σ ∪ {𝐵} is inconsistent. ▶ For every formula 𝐵, Σ ⊢ 𝐵 or Σ ⊢ (¬𝐵) but not both.

This defjnition is re-stated on slide 29.

CS 245 Logic and Computation Fall 2019 15 / 37

slide-16
SLIDE 16

Outline

Learning Goals Defjnitions of Satisfjability and Consistency Two Proofs of Completeness of FD Proof of Completeness of FD using the Stronger Defjnition of Maximal Consistency Proof of Completeness of FD using the Weaker Defjnition of Maximal Consistency Revisiting the Learning Goals

CS 245 Logic and Computation Fall 2019 16 / 37

slide-17
SLIDE 17

Every Consistent Set is Satisfjable

To fjnish the proof of the completeness theorem, it remains to prove theorem 4, which says “if Σ is consistent, then Σ satisfjable.”

Proof Sketch.

Assume that Σ is consistent. We need to fjnd a truth valuation 𝑢 such that 𝐵𝑢 = 1 for every formula 𝐵 ∈ Σ. Extend Σ to some maximally consistent set Σ∗. Let 𝑢 be a truth valuation such that for every propositional variable 𝑞, 𝑞𝑢 = 1 if and only if 𝑞 ∈ Σ∗. For every 𝐵 ∈ Σ, 𝐵 ∈ Σ∗. We can prove that 𝐵𝑢 = 1. Therefore, Σ is satisfjed by 𝑢.

CS 245 Logic and Computation Fall 2019 17 / 37

slide-18
SLIDE 18

Defjnitions of a Maximally Consistent Set (Stronger Version)

A key step in proving theorem 4 is to construct a maximally consistent set that includes Σ. First, let’s look at the defjnition of a maximally consistent set. Given a consistent Σ, Σ is maximally consistent if and only if

▶ For every formula 𝐵, if 𝐵 ∉ Σ, then Σ ∪ {𝐵} is inconsistent. ▶ For every formula 𝐵, 𝐵 ∈ Σ or (¬𝐵) ∈ Σ but not both.

This defjnition is given in the Lu Zhongwan textbook and it is stronger than the defjnition on slide 29.

CS 245 Logic and Computation Fall 2019 18 / 37

slide-19
SLIDE 19

Extending Σ to a Maximally Consistent Set Σ∗

Let Σ be a consistent set of formulas. We extend Σ to a maximally consistent set Σ∗ as follows. Arbitrarily enumerate all the well-formed formulas using the following sequence. 𝐵1, 𝐵2, 𝐵3, … Construct an infjnite sequence of sets Σ𝑜 as follows. ⎧ { ⎨ { ⎩ Σ0 = Σ Σ𝑜+1 = {Σ𝑜 ∪ {𝐵𝑜+1}, if Σ𝑜 ∪ {𝐵𝑜+1} is consistent Σ𝑜, otherwise Observe that Σ𝑜 ⊆ Σ𝑜+1 and Σ𝑜 is consistent. (We can prove this by induction on 𝑜.)

CS 245 Logic and Computation Fall 2019 19 / 37

slide-20
SLIDE 20

Extending to Maximal Consistency (continued)

Defjne Σ∗ = ⋃

𝑜∈ℕ

Σ𝑜. Think of Σ∗ as the largest possible set that

▶ contains Σ, and ▶ is consistent.

We will now prove that Σ∗ is maximally consistent.

CS 245 Logic and Computation Fall 2019 20 / 37

slide-21
SLIDE 21

Σ∗ is maximally consistent

First, we prove that Σ∗ is consistent. Next, we prove that Σ∗ is maximally consistent.

CS 245 Logic and Computation Fall 2019 21 / 37

slide-22
SLIDE 22

A Maximally Consistent Set Proves Its Elements

Note that direction 2 of this lemma does not hold for the weaker defjnitions of maximal consistency given in assignment 5.

Lemma 11 (Lemma 5.3.2 in Lu Zhongwan)

Suppose Σ is maximally consistent. Then, 𝐵 ∈ Σ ifg Σ ⊢ 𝐵.

Proof.

Direction 1: Assume 𝐵 ∈ Σ. Then, Σ ⊢ 𝐵 by (∈). Direction 2: Assume Σ ⊢ 𝐵. Towards a contradiction, assume that 𝐵 ∉ Σ. Since Σ is maximally consistent, Σ ∪ {𝐵} is inconsistent. Then, Σ ⊢ (¬𝐵) and Σ is inconsistent, contradicting the maximal consistency of Σ. Hence, 𝐵 ∈ Σ.

CS 245 Logic and Computation Fall 2019 22 / 37

slide-23
SLIDE 23

Satisfying a Maximally Consistent Set

Lemma 12

Let Σ∗ be a maximally consistent set. Let 𝑢 be a truth valuation such that 𝑞𝑢 = 1 if and only if 𝑞 ∈ Σ∗ for every propositional variable 𝑞. Then, for every well-formed propositional formula 𝐵, 𝐵𝑢 = 1 if and only if 𝐵 ∈ Σ∗.

Proof.

By induction on the structure of 𝐵. (Continued..)

CS 245 Logic and Computation Fall 2019 23 / 37

slide-24
SLIDE 24

Base case and Inductive case 1

▶ Base case: 𝐵 is a propositional variable 𝑞.

𝑞 ∈ Σ∗ ifg 𝑞𝑢 = 1 by the defjnition of 𝑢.

▶ Inductive case 1: 𝐵 = ¬𝐶.

Induction hypothesis: 𝐶𝑢 = 1 ifg 𝐶 ∈ Σ∗. We need to show that (¬𝐶)𝑢 = 1 ifg ¬𝐶 ∈ Σ∗.

CS 245 Logic and Computation Fall 2019 24 / 37

slide-25
SLIDE 25

Inductive case 2

▶ Inductive case 2: 𝐵 = 𝐶 ∧ 𝐷.

Induction hypotheses: 𝐶𝑢 = 1 ifg 𝐶 ∈ Σ∗. 𝐷𝑢 = 1 ifg 𝐷 ∈ Σ∗. We need to show that (𝐶 ∧ 𝐷)𝑢 = 1 ifg 𝐶 ∧ 𝐷 ∈ Σ∗.

Direction 1: Direction 2:

CS 245 Logic and Computation Fall 2019 25 / 37

slide-26
SLIDE 26

Inductive cases 3, 4, and 5

▶ Inductive case 3: 𝐵 = 𝐶 ∨ 𝐷.

Induction hypotheses: 𝐶𝑢 = 1 ifg 𝐶 ∈ Σ∗. 𝐷𝑢 = 1 ifg 𝐷 ∈ Σ∗. We can show that if 𝐶 ∨ 𝐷 ∈ Σ∗ ifg 𝐶 ∈ Σ∗ or 𝐷 ∈ Σ∗.

▶ Inductive case 4: 𝐵 = 𝐶 → 𝐷.

Induction hypotheses: 𝐶𝑢 = 1 ifg 𝐶 ∈ Σ∗. 𝐷𝑢 = 1 ifg 𝐷 ∈ Σ∗. We can show that 𝐶 → 𝐷 ∈ Σ∗ ifg 𝐶 ∈ Σ∗ implies 𝐷 ∈ Σ∗.

▶ Inductive case 5: 𝐵 = 𝐶 ↔ 𝐷.

Induction hypotheses: 𝐶𝑢 = 1 ifg 𝐶 ∈ Σ∗. 𝐷𝑢 = 1 ifg 𝐷 ∈ Σ∗. We can show that 𝐶 ↔ 𝐷 ∈ Σ∗ ifg (𝐶 ∈ Σ∗ ifg 𝐷 ∈ Σ∗).

CS 245 Logic and Computation Fall 2019 26 / 37

slide-27
SLIDE 27

Outline

Learning Goals Defjnitions of Satisfjability and Consistency Two Proofs of Completeness of FD Proof of Completeness of FD using the Stronger Defjnition of Maximal Consistency Proof of Completeness of FD using the Weaker Defjnition of Maximal Consistency Revisiting the Learning Goals

CS 245 Logic and Computation Fall 2019 27 / 37

slide-28
SLIDE 28

Every Consistent Set is Satisfjable

To fjnish the proof of the completeness theorem, it remains to prove theorem 4, which says “if Σ is consistent, then Σ satisfjable.”

Proof Sketch.

Assume that Σ is consistent. We need to fjnd a truth valuation 𝑢 such that 𝐵𝑢 = 1 for every formula 𝐵 ∈ Σ. Extend Σ to some maximally consistent set Σ∗. Let 𝑢 be a truth valuation such that for every propositional variable 𝑞, 𝑞𝑢 = 1 if and only if Σ∗ ⊢ 𝑞. For every 𝐵 ∈ Σ, 𝐵 ∈ Σ∗. We can prove that 𝐵𝑢 = 1. Therefore, Σ is satisfjed by 𝑢.

CS 245 Logic and Computation Fall 2019 28 / 37

slide-29
SLIDE 29

Defjnitions of a Maximally Consistent Set (Weaker Version)

A key step in proving theorem 4 is to construct a maximally consistent set that includes Σ. Let’s look at the defjnition of a maximally consistent set. Given a consistent Σ, Σ is maximally consistent if and only if

▶ For every formula 𝐵, if Σ ⊬ 𝐵, then Σ ∪ {𝐵} is inconsistent. ▶ For every formula 𝐵, Σ ⊢ 𝐵 or Σ ⊢ (¬𝐵) but not both.

This defjnition is given in Assignment 5 and it is weaker than the defjnition on slide 18.

CS 245 Logic and Computation Fall 2019 29 / 37

slide-30
SLIDE 30

Extending Σ to a Maximally Consistent Set Σ∗

Let Σ be a consistent set of formulas. We extend Σ to a maximally consistent set Σ∗ as follows. Arbitrarily enumerate all the well-formed formulas using the following sequence. 𝐵1, 𝐵2, 𝐵3, … Construct an infjnite sequence of sets Σ𝑜 as follows. ⎧ { ⎨ { ⎩ Σ0 = Σ Σ𝑜+1 = {Σ𝑜 ∪ {𝐵𝑜+1}, if Σ𝑜 ∪ {𝐵𝑜+1} is consistent Σ𝑜, otherwise Observe that Σ𝑜 ⊆ Σ𝑜+1 and Σ𝑜 is consistent. (We can prove this by induction on 𝑜.)

CS 245 Logic and Computation Fall 2019 30 / 37

slide-31
SLIDE 31

Extending to Maximal Consistency (continued)

Defjne Σ∗ = ⋃

𝑜∈ℕ

Σ𝑜. Think of Σ∗ as the largest possible set that

▶ contains Σ, and ▶ is consistent.

We will now prove that Σ∗ is maximally consistent.

CS 245 Logic and Computation Fall 2019 31 / 37

slide-32
SLIDE 32

Σ∗ is maximally consistent

First, we prove that Σ∗ is consistent. Next, we prove that Σ∗ is maximally consistent.

CS 245 Logic and Computation Fall 2019 32 / 37

slide-33
SLIDE 33

Satisfying a Maximally Consistent Set

Lemma 13

Let Σ∗ be a maximally consistent set. Let 𝑢 be a truth valuation such that 𝑞𝑢 = 1 if and only if Σ∗ ⊢ 𝑞 for every propositional variable 𝑞. Then, for every well-formed propositional formula 𝐵, 𝐵𝑢 = 1 if and only if Σ∗ ⊢ 𝐵.

Proof.

By induction on the structure of 𝐵. (Continued..)

CS 245 Logic and Computation Fall 2019 33 / 37

slide-34
SLIDE 34

Base case and Inductive case 1

▶ Base case: 𝐵 is a propositional variable 𝑞.

Σ∗ ⊢ 𝑞 ifg 𝑞𝑢 = 1 by the defjnition of 𝑢.

▶ Inductive case 1: 𝐵 = ¬𝐶.

Induction hypothesis: 𝐶𝑢 = 1 ifg Σ∗ ⊢ 𝐶. We need to show that (¬𝐶)𝑢 = 1 ifg Σ∗ ⊢ (¬𝐶).

CS 245 Logic and Computation Fall 2019 34 / 37

slide-35
SLIDE 35

Inductive case 2

▶ Inductive case 2: 𝐵 = 𝐶 ∧ 𝐷.

Induction hypotheses: 𝐶𝑢 = 1 ifg Σ∗ ⊢ 𝐶. 𝐷𝑢 = 1 ifg Σ∗ ⊢ 𝐷. We need to show that (𝐶 ∧ 𝐷)𝑢 = 1 ifg Σ∗ ⊢ 𝐶 ∧ 𝐷.

Direction 1: Direction 2:

CS 245 Logic and Computation Fall 2019 35 / 37

slide-36
SLIDE 36

Inductive cases 3, 4, and 5

▶ Inductive case 3: 𝐵 = 𝐶 ∨ 𝐷.

Induction hypotheses: 𝐶𝑢 = 1 ifg Σ∗ ⊢ 𝐶. 𝐷𝑢 = 1 ifg Σ∗ ⊢ 𝐷. We can show that Σ∗ ⊢ 𝐶 ∨ 𝐷 ifg Σ∗ ⊢ 𝐶 or Σ∗ ⊢ 𝐷.

▶ Inductive case 4: 𝐵 = 𝐶 → 𝐷.

Induction hypotheses: 𝐶𝑢 = 1 ifg Σ∗ ⊢ 𝐶. 𝐷𝑢 = 1 ifg Σ∗ ⊢ 𝐷. We can show that Σ∗ ⊢ (𝐶 → 𝐷) ifg Σ∗ ⊢ 𝐶 implies Σ∗ ⊢ 𝐷.

▶ Inductive case 5: 𝐵 = 𝐶 ↔ 𝐷.

Induction hypotheses: 𝐶𝑢 = 1 ifg Σ∗ ⊢ 𝐶. 𝐷𝑢 = 1 ifg Σ∗ ⊢ 𝐷. We can show that Σ∗ ⊢ (𝐶 ↔ 𝐷) ifg (Σ∗ ⊢ 𝐶 ifg Σ∗ ⊢ 𝐷).

CS 245 Logic and Computation Fall 2019 36 / 37

slide-37
SLIDE 37

Revisiting the Learning Goals

By the end of this lecture, you should be able to

▶ Defjne the completeness of formal deduction. ▶ Defjne consistency and satisfjability. ▶ Prove properties of consistent and satisfjable sets based on

their defjnitions.

▶ Reproduce the key steps of the proof of the completeness

theorem.

CS 245 Logic and Computation Fall 2019 37 / 37