Skip to content

5.1 Compactness Theorem

Detailed development of the compactness theorem, its proof via completeness, and fundamental applications in model theory.

The compactness theorem is one of the central structural results of first order logic, and it expresses a precise relationship between finite and infinite behavior of theories, showing that global satisfiability is completely controlled by finite fragments.

Definition 5.1 (Structures and Satisfaction)

Let L\mathcal{L} be a first order language, and let M\mathcal{M} be an L\mathcal{L}-structure.

For a sentence AA in L\mathcal{L}, we write:

MA \mathcal{M} \models A

to mean that AA is true in M\mathcal{M}.

If Γ\Gamma is a set of sentences, we write:

MΓ \mathcal{M} \models \Gamma

to mean that:

MA \mathcal{M} \models A

for every AΓA \in \Gamma.

Thus M\mathcal{M} is a model of Γ\Gamma exactly when it satisfies every sentence in Γ\Gamma.

Definition 5.2 (Satisfiability and Consistency)

A set of sentences Γ\Gamma is satisfiable if there exists an L\mathcal{L}-structure M\mathcal{M} such that:

MΓ \mathcal{M} \models \Gamma

A set of sentences Γ\Gamma is unsatisfiable if no such structure exists.

A set of sentences Γ\Gamma is syntactically consistent if:

Γ \Gamma \nvdash \bot

In first order logic, the completeness theorem connects these two notions by saying that a set of sentences is satisfiable exactly when it is syntactically consistent.

Definition 5.3 (Finite Satisfiability)

A set of sentences Γ\Gamma is finitely satisfiable if every finite subset:

Γ0Γ \Gamma_0 \subseteq \Gamma

is satisfiable.

This means that whenever one chooses only finitely many sentences from Γ\Gamma, there is a structure in which all chosen sentences are true at the same time.

Theorem 5.4 (Compactness Theorem)

Let Γ\Gamma be a set of first order sentences.

If Γ\Gamma is finitely satisfiable, then Γ\Gamma is satisfiable.

Equivalently, if every finite subset of Γ\Gamma has a model, then there is a single structure that is a model of all sentences in Γ\Gamma.

The theorem says that an infinite set of first order requirements can fail to have a model only when some finite part of those requirements already fails to have a model.

Assume that Γ\Gamma is finitely satisfiable, and suppose for contradiction that Γ\Gamma is not satisfiable.

Then:

Γ \Gamma \models \bot

By the completeness theorem for first order logic:

Γ \Gamma \vdash \bot

A formal proof is finite, so this derivation of contradiction can use only finitely many assumptions from Γ\Gamma. Hence there is a finite subset:

Γ0Γ \Gamma_0 \subseteq \Gamma

such that:

Γ0 \Gamma_0 \vdash \bot

By soundness, or equivalently by completeness applied in the opposite direction, this finite subset is unsatisfiable:

Γ0 \Gamma_0 \models \bot

This contradicts the assumption that every finite subset of Γ\Gamma is satisfiable. Therefore Γ\Gamma must be satisfiable.

Theorem 5.5 (Compactness in Consequence Form)

Let Γ\Gamma be a set of sentences, and let AA be a sentence.

If:

ΓA \Gamma \models A

then there exists a finite subset:

Γ0Γ \Gamma_0 \subseteq \Gamma

such that:

Γ0A \Gamma_0 \models A

Assume:

ΓA \Gamma \models A

Then there is no model of:

Γ{¬A} \Gamma \cup \{¬A\}

Thus:

Γ{¬A} \Gamma \cup \{¬A\}

is unsatisfiable.

By compactness, some finite subset is already unsatisfiable. Therefore there exists a finite set:

Γ0Γ \Gamma_0 \subseteq \Gamma

such that:

Γ0{¬A} \Gamma_0 \cup \{¬A\}

is unsatisfiable.

This means that every model of Γ0\Gamma_0 must be a model of AA, and hence:

Γ0A \Gamma_0 \models A

Example 5.6 (Infinite Models from Finite Conditions)

Let the language contain one unary predicate symbol PP.

For each natural number n1n \geq 1, let AnA_n be the sentence:

x1xn(1i<jnxixj1inP(xi)) \exists x_1 \cdots \exists x_n \left( \bigwedge_{1 \leq i < j \leq n} x_i \neq x_j \land \bigwedge_{1 \leq i \leq n} P(x_i) \right)

The sentence AnA_n says that there are at least nn distinct elements satisfying PP.

Let:

Γ={An:n1} \Gamma = \{A_n : n \geq 1\}

Every finite subset of Γ\Gamma contains only finitely many sentences:

An1,An2,,Ank A_{n_1}, A_{n_2}, \dots, A_{n_k}

Let:

N=max(n1,n2,,nk) N = \max(n_1,n_2,\dots,n_k)

A structure with NN elements, all satisfying PP, is a model of all these finitely many sentences.

Thus every finite subset of Γ\Gamma is satisfiable.

By compactness, Γ\Gamma itself is satisfiable. In any model of Γ\Gamma, for every natural number nn there are at least nn distinct elements satisfying PP. Therefore the set of elements satisfying PP is infinite.

Example 5.7 (Nonstandard Models of Arithmetic)

Let L\mathcal{L} be the usual language of arithmetic, and extend it by adding a new constant symbol cc.

Let Γ\Gamma consist of the axioms of arithmetic together with the sentences:

c>0,c>1,c>2, c > 0,\quad c > 1,\quad c > 2,\quad \dots

Every finite subset of Γ\Gamma mentions only finitely many inequalities:

c>0,c>1,,c>n c > 0,\quad c > 1,\quad \dots,\quad c > n

This finite set can be satisfied in the standard natural numbers by interpreting cc as a number larger than nn.

Therefore every finite subset of Γ\Gamma is satisfiable.

By compactness, the whole set Γ\Gamma has a model. In that model, the element denoted by cc is greater than every standard natural number.

Such a model cannot be the standard model N\mathbb{N}, because no ordinary natural number is greater than all ordinary natural numbers. Hence first order arithmetic has nonstandard models.

Corollary 5.8 (Finiteness is Not First Order Axiomatizable)

There is no set of first order sentences whose models are exactly the finite structures.

Suppose, for contradiction, that Γ\Gamma is a set of first order sentences such that a structure satisfies Γ\Gamma exactly when it is finite.

For each n1n \geq 1, let BnB_n be the sentence saying that there are at least nn distinct elements:

x1xn1i<jnxixj \exists x_1 \cdots \exists x_n \bigwedge_{1 \leq i < j \leq n} x_i \neq x_j

Consider:

Γ{Bn:n1} \Gamma \cup \{B_n : n \geq 1\}

Every finite subset of this theory requires only finitely many distinct elements, and so it has a finite model satisfying Γ\Gamma.

By compactness, the whole theory has a model.

That model satisfies every BnB_n, so it is infinite. It also satisfies Γ\Gamma, so by the assumed property of Γ\Gamma it must be finite.

This is impossible. Therefore finiteness cannot be characterized by any first order theory.

Corollary 5.9 (Arbitrarily Large Finite Models Give an Infinite Model)

Let Γ\Gamma be a first order theory.

If Γ\Gamma has finite models of arbitrarily large size, then Γ\Gamma has an infinite model.

For each n1n \geq 1, let BnB_n be the sentence saying that there are at least nn distinct elements:

x1xn1i<jnxixj \exists x_1 \cdots \exists x_n \bigwedge_{1 \leq i < j \leq n} x_i \neq x_j

Consider:

Γ{Bn:n1} \Gamma \cup \{B_n : n \geq 1\}

Every finite subset of this theory requires only a lower bound on the size of a model. Since Γ\Gamma has finite models of arbitrarily large size, every such finite subset is satisfiable.

By compactness, the whole theory is satisfiable.

Any model of the whole theory has at least nn distinct elements for every nn, and therefore it is infinite.

Conceptual Meaning

Compactness says that first order satisfiability is controlled by finite information.

This is a powerful model construction principle. To build a model with infinitely many requirements, it is enough to show that every finite selection of those requirements can be satisfied.

At the same time, compactness reveals a limitation of first order logic. Properties that require a genuinely global distinction between finite and infinite behavior cannot usually be expressed by first order sentences.