Lec 23
Lec 23
Lec 23
1 Compactness Theorem
Definition 1 (Finite Satisfiability). A set Φ of formulas is finitely satisfiable
iff every finite subset Φ0 of Φ is satisfiable.
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.
u u u u q q q q u u q q q
0 1 2 3 n n+1
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∆ .
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.