Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lec 23

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Lecture 23: The Compactness Theorem

1 Compactness Theorem
Definition 1 (Finite Satisfiability). A set Φ of formulas is finitely satisfiable
iff every finite subset Φ0 of Φ is satisfiable.

Compactness Theorem: A set of formulas Φ is satisfiable iff it is finitely


satisfiable.
The compactness theorem is often used in its contrapositive form: A set of
formulas Φ is unsatisfiable iff there is some finite subset of Φ that is unsatisfiable.
The theorem is true for both first order logic and propositional logic. The
proof for first order logic is outside the scope of this course, but we will give
the proof for propositional logic. We will only consider the case of a countable
number of propositions. The proof for larger cardinalities is essentially the same,
but requires some form of the axiom of choice.

1.1 Proof of Compactness Theorem for Propositional Logic


We first prove a useful result about finite satisfiability, which allows us to enlarge
a set of formulas while preserving their finite satisfiability.

Lemma 1 (Finite Satisfiability Lemma). Let Σ be a finitely satisfiable set of


formulas and ϕ be a formula. Then Σ ∪ {ϕ} is finitely satisfiable or Σ ∪ {¬ϕ}
is finitely satisfiable.
Proof. We prove the contrapositive statement. Suppose Σ∪{ϕ} and Σ∪{¬ϕ} are
both not finitely satisfiable. Then there exist finite subsets Σ1 and Σ2 of Σ, such
that Σ1 ∪{ϕ} is not satisfiable and Σ2 ∪{¬ϕ} is not satisfiable. So models(Σ1 )∩
models(ϕ) = ∅, which means models(Σ1 ) ⊆ models(¬ϕ). Similarly, we get
models(Σ2 ) ⊆ models(ϕ). Then models(Σ1 ∪Σ2 ) = models(Σ1 )∩models(Σ2 ) ⊆
models(¬ϕ) ∩ models(ϕ) = ∅. So Σ1 ∪ Σ2 is not satisfiable. Since Σ1 ∪ Σ2 is a
finite subset of Σ, therefore Σ is not finitely satisfiable.
Proof of the compactness theorem: Let Σ be a finitely satisfiable set of
propositional formulas and let AP (Σ) be countable. Then, by the Relevance
Lemma, we can assume P rop = AP (Σ) = {pi : i ∈ N } to be a countable set

1
of propositions. We define an increasing sequence of sets of formulas as follows:
Σ0 = Σ and for all i ∈ N ,
(
Σi ∪ {pi }, if Σi ∪ {pi } is finitely satisfiable
Σi+1 =
Σi ∪ {¬pi }, otherwise
S∞
And we define Σ0 to be their union: Σ0 = i=0 Σi .
Claim: For all i ∈ N , Σi is finitely satisfiable.
Proof : By induction. The base case is Σ0 = Σ, which is finitely satisfiable by
assumption. Assume that Σk is finitely satisfiable for k ∈ N . Then, by Lemma
1, one of Σk ∪ {pk } and Σk ∪ {¬pk } must be finitely satisfiable, so Σk+1 is also
finitely satisfiable.
Claim: Σ0 is finitely satisfiable.
Proof : Consider a finite subset of X of Σ0 . Since X is finite,
Sj and Σk ⊆ Σk+1
for all k ∈ N , there exists a finite j ∈ N , such that X ⊆ i=0 Σi = Σj . Since
Σj is finitely satisfiable, therefore X is satisfiable.
Now, by the construction of Σ0 , at least one of pi and ¬pi is in Σ0 for all
i ∈ N . However, Σ0 is finitely satisfiable, so it cannot contain both pi and ¬pi .
Therefore, Σ0 contains exactly one of pi and ¬pi for all i ∈ N . Then we can
define a truth assignment τ : P rop → {0, 1} and a function v : P rop → Literals,
where Literals = {pi , ¬pi : i ∈ N }, as follows:
( (
1, if p ∈ Σ0 p, if p ∈ Σ0
τ (p) = 0
v(p) =
0, if ¬p ∈ Σ ¬p, if ¬p ∈ Σ0

Claim: τ |= Σ.
Proof : Let ϕ ∈ Σ. Define X = {v(p) : p ∈ AP (ϕ)}. Then, by the definition
of τ and v, we have τ |= X, X ⊆ Σ0 , and AP (X) = AP (ϕ). Since AP (ϕ) is
finite, X ∪ {ϕ} is a finite subset of Σ0 . Since Σ0 is finitely satisfiable, therefore
X ∪ {ϕ} is satisfiable. Then, by the Relevance Lemma, there exists τ 0 ∈ 2P rop ,
τ 0 |AP (ϕ) |= ϕ and τ 0 |AP (ϕ) |= X. Also by the Relevance Lemma, we have
τ |AP (ϕ) |= X. Since X contains a literal for each proposition in AP (ϕ), therefore
τ and τ 0 must assign the same value to propositions in AP (ϕ), that is, τ |AP (ϕ) =
0
τAP (ϕ) . Therefore τ |AP (ϕ) |= ϕ, and by the Relevance Lemma, τ |= ϕ. Since ϕ
was an arbitrary formula in Σ, therefore τ |= Σ.
We have shown that Σ is satisfiable. This completes the proof of the theorem.

2 Applications of Compactness
2.1 Definability Results in First Order Logic
Compactness can be used to prove results about the definability of class of
structures. For example, in the previous lecture, we showed that 2C 6∈ EC and
EC∆ ∩ co − EC∆ = EC.

2
2.2 Proving Theorems Outside Logic
Compactness can also be used to prove results in mathematical fields other than
logic. For example, in Assignment 6 you are asked to prove the 3-color version
of the following theorem using compactness:
Theorem 1. A graph is k-colorable iff every finite subgraph is k-colorable.
This theorem can then be combined with the famous four color theorem to
prove an infinite version of the four color theorem.

Theorem 2 (Four color theorem). Every finite planar graph is 4-colorable.


Theorem 3. Every infinite planar graph is 4-colorable.
Proof. Let G be an infinite planar graph. Since every subgraph of a planar
graph is also planar, by Theorem 2, every finite subgraph of G is 4-colorable.
Then, by Theorem 1, G is also 4-colorable.

Some other examples of theorems that can be proved using compactness:


• König’s lemma: Every finitely-branching infinite tree has an infinite path.
• Every partial order can be extended to a total order.

2.3 Constructing New Models


In first order logic, compactness is frequently used to construct new and in-
teresting models of familiar structures. Here we give a simple example, where
starting from a connected graph G, we construct a non-connected graph G0 such
that G and G0 satisfy the same first order properties.
Consider the infinite graph G whose set of nodes is N (the natural numbers)
such that for each n ∈ N , there is an undirected edge from n to n + 1. Note
that G is a connected graph, since there is a finite path from i to j for i, j ∈ N .

u u u u q q q q u u q q q
0 1 2 3 n n+1

G = (V, E) = (N, {(n, n + 1), (n + 1, n) : n ∈ N })

Let Σ = {ϕ : G |= ϕ} be the set of all sentences that are true in G. Note that,
by definition, G |= Σ. We define two new constants (0-ary function symbols)
a and b, and define ψn = ¬pathn (a, b) to be a formula that says there is no
path of length n from a to b. Then (V, E, 0, k) satisfies Σ ∪ {ψn : n < k}, since
there is no path of length less than k between node 0 and node k in G (here a
is interpreted as 0 and b is interpreted as k). Therefore, Σ0 = Σ ∪ {ψn : n ∈ N }
is finitely satisfiable, and hence, by compactness, Σ0 is satisfiable.

3
Let (V 0 , E 0 , a0 , b0 ) be a model of Σ0 . Then there is no finite path between a0
and b0 in G0 = (V 0 , E 0 ). So G0 is disconnected. However, because Σ ⊆ Σ0 , any
model of Σ0 is also a model of Σ. Since the symbols a and b do not occur in Σ,
we get that G0 is a model of Σ. But Σ0 was defined to be all sentences satisfied
by G. Thus G and G0 satisfy the same sentences, that is, G ≡ G0 . We cannot
distinguish between G and G0 using first order logic. G0 is called a non-standard
model of G. Note that G is connected, but G0 is not. As a consequence, we
immediately get the following results:
Theorem 4. The class of connected graphs is not EC∆ .

Proof. Suppose a set of sentences Φ defines the class of connected graphs. Then
G is a model of Φ (because it is connected), and therefore Φ ⊆ Σ. But then G0
is also a model of Φ (because G0 is a model of Σ). This contradicts the fact that
G0 is not connected. Therefore no such set Φ exists and the class of connected
graphs is not EC∆ .

Theorem 5. Reachability is not definable in first order logic.


Proof. Suppose we could define a formula reach(x, y) to mean that y is reachable
from x. Then (∀x)(∀y)reach(x, y) defines the class of connected graphs. But
this contradicts the fact that this class is not EC∆ . Thus, reachability is not
definable.

Similarly, non-standard models can be defined for all the familiar mathemat-
ical structures such as the natural numbers and the real numbers. For example,
one can construct non-standard models of the reals which contain infinitismal
numbers that are greater than zero but smaller than all other positive reals.

You might also like