0% found this document useful (0 votes)
32 views

Lecture 07

The document provides an overview of logic including soundness and completeness. It discusses the tableau proof system used, including how branches are closed and tableaus are closed. It then covers soundness and completeness theorems, proving that if a formula is valid it can be derived in the system, and if it can be derived it is valid. The proof of soundness uses a soundness lemma showing truth is preserved when rules are applied. The completeness proof uses an open branch and valuation to show any valid formula can be derived.

Uploaded by

Walid Zerrad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Lecture 07

The document provides an overview of logic including soundness and completeness. It discusses the tableau proof system used, including how branches are closed and tableaus are closed. It then covers soundness and completeness theorems, proving that if a formula is valid it can be derived in the system, and if it can be derived it is valid. The proof of soundness uses a soundness lemma showing truth is preserved when rules are applied. The completeness proof uses an open branch and valuation to show any valid formula can be derived.

Uploaded by

Walid Zerrad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

2022-2023 Inleiding Logica (KI1V13001)

dr. Johannes Korbmacher dr. Colin Caret

Department of Philosophy and Religious Studies

29-09

201/227
Overview

Rehash

7. Soundness and Completeness


7.1 Soundness and Completeness
7.2 The Soundness Theorem
7.3 The Completeness Theorem
7.4 Innite Premiss Sets and Compactness

202/227
Rehash
I Our proof system is the method of tableaux.
¬¬φ φ ∧ ψ ¬(φ ∧ ψ) φ∨ψ ¬(φ ∨ ψ)

φ φ ¬φ ¬ψ φ ψ ¬φ

ψ ¬ψ

¬(φ → ψ) φ→ψ φ↔ψ ¬(φ ↔ ψ)

φ ¬φ ψ φ ¬φ φ ¬φ

¬ψ ψ ¬ψ ¬ψ ψ

I A branch B is closed i p, ¬p ∈ B for some p ∈ P .


I A tableau is closed i every branch is closed.
I Γ ` φ i the complete tableau for Γ ∪ {¬φ} is closed.
I Γ 0 φ i there is at least one open branch.
(
1 if p ∈ B
vB (p) =
0 if p ∈
/B
203/227
7.1 Soundness and Completeness
I (7.1.1) We want to be able to derive the conclusion from the
premises in all and only the valid inferences:

Soundness Theorem. If Γ ` φ, then Γ  φ.


Completeness Theorem. If Γ  φ, then Γ ` φ.
I (7.1.2) Together, the two reduce semantic validity to syntactic
validity.

I (7.1.3) Soundness is a sanity check: only if it follows, we can


infer it.

I (7.1.4) Completeness is a strong property: everything that


follows, you can infer.

204/227
Proof Idea
I (7.1.6) Remember:

Down Preservation. If the formula at the parent node of a rule


is true under a valuation, then at least one
formula on a newly generated child node is true
under the valuation.
Up Preservation. If the formula at a newly generated child
node is true under a valuation, then the formula
at the parent node is true.

I Together, up and down preservation guarantee that when


we're applying the rules, we consider precisely the dierent
ways for a formula to be true.

205/227
7.2 The Soundness Theorem  Proof Idea
I (7.2.1) We're actually going to prove the contrapositive:
I If Γ 2 φ, then Γ 0 φ.
I If Γ 2 φ, then there's a valuation v that makes all the
members of Γ ∪ {¬φ} true.

I That's the initial list.

I By Down Preservation, whenever we apply a rule, we get at


least one branch all of whose members v makes true.

I So, in the complete tableau, there has to be one branch, B,


such that v makes all the formulas on B true.

I But then B cannot be closed. So the tableau is open.

206/227
The Soundness Lemma
I Let B be a branch of a possibly incomplete tableau and v a
valuation:
I (7.2.2) We say that v is faithful to B i JφKv = 1, for all φ ∈ B
p → q, q 0 p
p→q
q
¬p

¬p q

Countermodel: vB (q) = 1, vB (p) = 0.


I (7.2.3) Lemma. Let v be a valuation that is faithful to a
branch B of an incomplete tableau. If a rule is applied to a
formula in the tableau, then v is faithful to at least one branch
B 0 which extends B in the new tableau.

I This is a direct consequence of Down Preservation!

207/227
Example
I v1 with v1 (p) = 1 and v1 (q) = 0
I v2 with v2 (p) = 0 and v2 (q) = 1

p∨q
¬p ∨ ¬q

p q

¬p ¬q ¬p ¬q
7 7

208/227
(7.2.4) Proof of the Soundness Lemma
The proof consists in a one-by-one inspection of the rules.
There are 9 cases. We do: (a) φ→ψ and (b) ¬(φ → ψ).
(a) Let v be faithful to B and φ → ψ ∈ B.
φ→ψ

¬φ ψ
We get two new branches extending B , B1 and B2 .
I We have B1 = B ∪ {¬φ} and B2 = B ∪ {ψ}.
I Since v is faithful to B , we get Jφ → ψKv = 1.
I Since Jφ → ψKv = max(1 − JφKv , JψKv ), we get either
JφKv = 0 or JψKv = 1.
I If JφKv = 0, then J¬φKv = 1 − JφKv = 1. So v is faithful to
B = B ∪ {¬φ}.
1

I If JψKv = 1, then v is faithful to B = B ∪ {ψ}.


2

So, either way, v is faithful to at least one new branch created


by the rule for φ → ψ.
209/227
(7.2.4) Proof of the Soundness Lemma (Cont'd)
(b) Let v be faithful to B and ¬(φ → ψ) ∈ B .
¬(φ → ψ)

¬ψ
We get one new branch B
0 = B ∪ {φ, ¬ψ}.
I Since v is faithful to B , we get J¬(φ → ψ)Kv = 1.
I Since J¬(φ → ψ)Kv = 1 − max(1 − JφKv , JψKv ), we get that
max(1 − JφKv , JψKv ) = 0.
I So JφKv = 1 and JψKv = 0.
I Since J¬ψKv = 1 − JψKv , we can conclude J¬ψKv = 1.
I So v is faithful to B 0 .

210/227
The Soundness Theorem
(7.2.5) Theorem (Soundness). If Γ ` φ, then Γ  φ.
Proof:

I Suppose that Γ 2 φ.
I So, there's a v that makes all the members of Γ ∪ {¬φ} true.

I That's the initial list of our tableau.

I Every time we apply a rule, v remains faithful to at least one


branch.

I So, in the complete tableau, there's a branch B that v is


faithful to.

I Suppose that B is closed, i.e. p, ¬p ∈ B .


I It follows that v (p) = 1 and v (p) = 0. Contradiction.

I So B is open, meaning Γ 0 φ.

211/227
Tableau Verication 1
(7.2.6) Theorem. If the tableau algorithm gives the answer that a
set is unsatisable, then the set is unsatisable.
Proof:

I Suppose that the algorithm says Γ is unsatisable.

I So, the tableau for Γ is closed.

I Suppose, for contradiction, that Γ is satisable via v.


I Using the soundness lemma, we can infer that there's a branch
B in the tableau for Γ which is open (as in soundness).

I Hence the tableau for Γ is open. Contradiction.

I So Γ is unsatisable.

212/227
7.3 The Completeness Theorem  Proof Idea
I (7.3.1) We'll prove once more, the contrapositive:
I If Γ 0 φ, then Γ 2 φ.
I The proof idea is simple:
I If Γ 0 φ, then the complete tableau for Γ ∪ {¬φ} is open via
open branch B .
I We get the associated valuation vB for B :

1 if p ∈ B
(
vB (p) =
0 if p ∈/ B
I Using Up Preservation, we can inductively argue that vB
makes all B 's true.
I But then vB satises Γ ∪ {¬φ}.
I Which gives us Γ 2 φ.
I The devil is in the detail.

213/227
The Completeness Lemma
(7.3.2) Lemma (Completeness Lemma). Let B be an open branch
of a complete tableau. Then vB is faithful to B.
Proof: The proof is a (rather complicated) induction.
I We note that vB is faithful to B i for all φ ∈ L:
1. if φ ∈ B , then JφKvB = 1, and
2. if ¬φ ∈ B , then JφKvB = 0.
I This we prove by induction.
(i) Base case. We need to show that for all p ∈ P :
1. If p ∈ B , then JpKvB = 1
2. If ¬p ∈ B , then JpKvB = 0.
I 1. is immediate from the denition of vB .
I For 2. note that if ¬p ∈ B , then p ∈
/ B since B is open. So, by
denition, vB (p) = 0. Since JpKvB = vB (p), we get our desired
claim.

214/227
The Completeness Lemma (Cont'd)
(ii) Induction steps.
(a) We need to prove that if φ enjoys the property, then ¬φ enjoys
the property. From the induction hypothesis
1. If φ ∈ B , then JφKvB = 1.
2. If ¬φ ∈ B , then JφKvB = 0.
We derive:
1'. If ¬φ ∈ B , then J¬φKvB = 1.
2'. If ¬¬φ ∈ B , then J¬φKvB = 0.
I For 1', suppose that ¬φ ∈ B . By 2., we have JφKvB = 0. But
J¬φKvB = 1 − JφKvB and so J¬φKvB = 1.
I For 2', assume ¬¬φ ∈ B . Since B is an open branch of a
complete tableau, every rule that can be applied has been:
¬¬φ

φ
So, φ ∈ B . But then, by 1., we get JφKvB = 1. And since
J¬φKvB = 1 − JφKvB , we get J¬φKvB = 0, as desired.

215/227
The Completeness Lemma (Cont'd)
(ii) Induction steps.
(b) We do the case for φ ∧ ψ .
We have two pairs of induction hypotheses:
1φ . if φ ∈ B , then JφKvB = 1, and
2φ . if ¬φ ∈ B , then JφKvB = 0.
And
1ψ . if ψ ∈ B , then JψKvB = 1, and
2ψ . if ¬ψ ∈ B , then JψKvB = 0.
What we need to prove are:
1φ∧ψ . if φ ∧ ψ ∈ B , then Jφ ∧ ψKvB = 1, and
2φ∧ψ . if ¬(φ ∧ ψ) ∈ B , then Jφ ∧ ψKvB = 0.

216/227
The Completeness Lemma (Cont'd)
I Suppose that φ ∧ ψ ∈ B. Since B is an open branch of a
complete tableau, every rule that can be applied has been
applied:

φ∧ψ

ψ
I So, we can conclude that both φ, ψ ∈ B .
I But by 1φ . and 1ψ ., this means that JφKvB = 1 and JψKvB = 1.
I Since Jφ ∧ ψKvB = min(JφKvB , JψKvB ), we get Jφ ∧ ψKvB = 1,
as desired.

217/227
The Completeness Lemma (Cont'd)
I Next, suppose that ¬(φ ∧ ψ) ∈ B . Again, all rules that can be
applied have been applied:

¬(φ ∧ ψ)

¬φ ¬ψ
I So, we can conclude that either (∗) ¬φ ∈ B or (∗∗) ¬ψ ∈ B .
(∗) I If ¬φ ∈ B , from 2φ ., we get JφK = 0.
I Since Jφ ∧ ψKvB = min(JφKvB , JψKvB ), this means we get
Jφ ∧ ψKvB = 0.
(∗∗) I If ¬ψ ∈ B , from 2ψ ., we get JφK = 0.
I So, we get Jφ ∧ ψKvB = 0.
I So either way, Jφ ∧ ψKvB = 0, as desired.

218/227
The Completeness Theorem
(7.3.3) Theorem (Completeness). If Γ  φ, then Γ ` φ.
Proof:

I Assume that Γ 0 φ.
I By denition, this means that there's an open branch, B, in
the complete tableau for Γ ∪ {¬φ}.
I Consider the associated valuation vB .
I By the completeness lemma vB makes all the members of B
true.

I Since Γ ∪ {¬φ} ⊆ B , it follows that vB satises Γ ∪ {¬φ}.


I So Γ 2 φ, as desired.

219/227
Tableau Verication 2
(7.3.4) Theorem. If the tableau algorithm gives the answer that a
set is satisable, then the set is satisable.
Proof:

I Suppose that the algorithm says Γ is satisable.

I So, the tableau for Γ is open.

I We can infer that there's a branch B in the tableau for Γ


which is open.

I By the completeness lemma vB makes all the members of B


true..

I Since Γ ⊆ B, we can infer that vB satises Γ as desired.

(7.3.5) Theorem (Decidability). Propositional logic is decidable,


i.e. there exists an algorithm which after nitely many steps
correctly determines whether a given inference (with nitely any
premises) is valid.

220/227
7.4 Innite Premiss Sets and Compactness
I (7.4.1) For the formal treatment of mathematics, we
sometimes need innite premise sets:
I The theory of natural numbers cannot be reduced to nitely
many axioms.
I (7.4.2) We'll go innite, but we assume there is a way of
writing Γ as the set {φi : i ∈ I }, where I ⊆ N+ .
I (7.4.3) Examples:
(a) {p, ¬p, ¬¬p, . . .} (or more precisely the smallest set X such
that p ∈ X and if φ ∈ X then ¬φ ∈ X ).
(b) P = {pi : i ∈ N}
(c) {¬p2i , p2i+1 : i ∈ N} which contains ¬pi for each even i and pi
for each odd i ∈ N.
(d) Let v be any valuation. Then the set Tv = {φ : JφKv = 1} is
always innite!
I (7.4.4) Γφ works just like before.

221/227
Truth-Tables Don't Work

I (7.4.5) But truth-tables no longer work:


I With nite Γ, we can use:

φ1 , . . . , φn  ψ i  (φ1 ∧ . . . ∧ φn ) → ψ

I But with innite Γ, there is no theorem:

φ1 , φ2 , . . .  ψ i  (φ1 ∧ φ2 ∧ . . .) → ψ
| {z }
???

222/227
(7.4.6) Innite Tableaux
I Tableaux, however, work.

I To make the tableau for {φ1 , φ2 , . . . , ¬ψ} write down ¬ψ as


the initial list and do its tableau.

I Then, add φ1 to the initial list, and extend the tableau for ¬ψ
to the tableau for {φ1 , ¬φ}.
I Then add φ2 , and extend the tableau to the one for
{φ1 , φ2 , ¬φ}.
I And so on.

I Γ`φ i the complete tableau is closed, Γ0φ i the complete


(?) tableau is open.

I Note that a complete tableau (which is open) can be innite!

223/227
Example
p, ¬¬p, ¬¬¬¬p, . . . 0 q
.
.
.
¬¬¬¬p
¬¬p
p
¬q

¬¬p

.
.
.

224/227
Compactness
But if a tableau closes, it closes after nitely many steps (at some
point):
Theorem (Compactness). Let Γ be an innite set of formulas. If
Γ ` φ, then there exists a nite set Σ⊆Γ such that Σ ` φ.
Proof:

I Let Γ = {ψi : i ∈ I } for some I ⊆ N+ .


I Assume that Γ ` φ.
I This means that the tableau closes at some point.

I So there is a smallest i such that ψj is in the tableau for all


j ≤ i.
I We've actually made the tableau for {¬φ} ∪ {ψj : j ≤ i}.
I So {ψj : j ≤ i} ` φ.
I But clearly {ψj : j ≤ i} is nite and {ψj : j ≤ i} ⊆ Γ.

225/227
Core Ideas (Lecture Version)
I Soundness and completeness reduce validity to syntax.

I The soundness theorem is a sanity check.

I The completeness theorem is a surprising mathematical fact.

I For tableaux, soundness relies on the fact that in every rule, if


the upper formula is true, then at least one of the lower
formulas is true (`down preservation').

I For tableaux, completeness relies on the fact that if one of the


lower formulas in a rule is true, so is the upper formula (`up
preservation').

I Truth tables don't work for innitary premise sets but tableaux
do.

I Compactness tells us that if there's a proof, we can always nd


a nitary one.

226/227
Thanks!

227/227

You might also like