In mathematical logic, the compactness theorem states that a set of first-order sentences has a model if and only if every finite subset of it has a model. This theorem is an important tool in model theory, as it provides a useful (but generally not effective) method for constructing models of any set of sentences that is finitely consistent.

The compactness theorem for the propositional calculus is a consequence of Tychonoff's theorem (which says that the product of compact spaces is compact) applied to compact Stone spaces,[1] hence the theorem's name. Likewise, it is analogous to the finite intersection property characterization of compactness in topological spaces: a collection of closed sets in a compact space has a non-empty intersection if every finite subcollection has a non-empty intersection.

The compactness theorem is one of the two key properties, along with the downward Löwenheim–Skolem theorem, that is used in Lindström's theorem to characterize first-order logic. Although, there are some generalizations of the compactness theorem to non-first-order logics, the compactness theorem itself does not hold in them, except for a very limited number of examples.[2]

## History

Kurt Gödel proved the countable compactness theorem in 1930. Anatoly Maltsev proved the uncountable case in 1936.[3][4]

## Applications

The compactness theorem has many applications in model theory; a few typical results are sketched here.

### Robinson's principle

The compactness theorem implies the following result, stated by Abraham Robinson in his 1949 dissertation.

Robinson's principle:[5][6] If a first-order sentence holds in every field of characteristic zero, then there exists a constant ${\displaystyle p}$ such that the sentence holds for every field of characteristic larger than ${\displaystyle p.}$ This can be seen as follows: suppose ${\displaystyle \varphi }$ is a sentence that holds in every field of characteristic zero. Then its negation ${\displaystyle \lnot \varphi ,}$ together with the field axioms and the infinite sequence of sentences

${\displaystyle 1+1\neq 0,\;\;1+1+1\neq 0,\;\ldots }$
is not satisfiable (because there is no field of characteristic 0 in which ${\displaystyle \lnot \varphi }$ holds, and the infinite sequence of sentences ensures any model would be a field of characteristic 0). Therefore, there is a finite subset ${\displaystyle A}$ of these sentences that is not satisfiable. ${\displaystyle A}$ must contain ${\displaystyle \lnot \varphi }$ because otherwise it would be satisfiable. Because adding more sentences to ${\displaystyle A}$ does not change unsatisfiability, we can assume that ${\displaystyle A}$ contains the field axioms and, for some ${\displaystyle k,}$ the first ${\displaystyle k}$ sentences of the form ${\displaystyle 1+1+\cdots +1\neq 0.}$ Let ${\displaystyle B}$ contain all the sentences of ${\displaystyle A}$ except ${\displaystyle \lnot \varphi .}$ Then any field with a characteristic greater than ${\displaystyle k}$ is a model of ${\displaystyle B,}$ and ${\displaystyle \lnot \varphi }$ together with ${\displaystyle B}$ is not satisfiable. This means that ${\displaystyle \varphi }$ must hold in every model of ${\displaystyle B,}$ which means precisely that ${\displaystyle \varphi }$ holds in every field of characteristic greater than ${\displaystyle k.}$ This completes the proof.

The Lefschetz principle, one of the first examples of a transfer principle, extends this result. A first-order sentence ${\displaystyle \varphi }$ in the language of rings is true in some (or equivalently, in every) algebraically closed field of characteristic 0 (such as the complex numbers for instance) if and only if there exist infinitely many primes ${\displaystyle p}$ for which ${\displaystyle \varphi }$ is true in some algebraically closed field of characteristic ${\displaystyle p,}$ in which case ${\displaystyle \varphi }$ is true in all algebraically closed fields of sufficiently large non-0 characteristic ${\displaystyle p.}$[5] One consequence is the following special case of the Ax–Grothendieck theorem: all injective complex polynomials ${\displaystyle \mathbb {C} ^{n}\to \mathbb {C} ^{n))$ are surjective[5] (indeed, it can even be shown that its inverse will also be a polynomial).[7] In fact, the surjectivity conclusion remains true for any injective polynomial ${\displaystyle F^{n}\to F^{n))$ where ${\displaystyle F}$ is a finite field or the algebraic closure of such a field.[7]

### Upward Löwenheim–Skolem theorem

A second application of the compactness theorem shows that any theory that has arbitrarily large finite models, or a single infinite model, has models of arbitrary large cardinality (this is the Upward Löwenheim–Skolem theorem). So for instance, there are nonstandard models of Peano arithmetic with uncountably many 'natural numbers'. To achieve this, let ${\displaystyle T}$ be the initial theory and let ${\displaystyle \kappa }$ be any cardinal number. Add to the language of ${\displaystyle T}$ one constant symbol for every element of ${\displaystyle \kappa .}$ Then add to ${\displaystyle T}$ a collection of sentences that say that the objects denoted by any two distinct constant symbols from the new collection are distinct (this is a collection of ${\displaystyle \kappa ^{2))$ sentences). Since every finite subset of this new theory is satisfiable by a sufficiently large finite model of ${\displaystyle T,}$ or by any infinite model, the entire extended theory is satisfiable. But any model of the extended theory has cardinality at least ${\displaystyle \kappa }$

### Non-standard analysis

A third application of the compactness theorem is the construction of nonstandard models of the real numbers, that is, consistent extensions of the theory of the real numbers that contain "infinitesimal" numbers. To see this, let ${\displaystyle \Sigma }$ be a first-order axiomatization of the theory of the real numbers. Consider the theory obtained by adding a new constant symbol ${\displaystyle \varepsilon }$ to the language and adjoining to ${\displaystyle \Sigma }$ the axiom ${\displaystyle \varepsilon >0}$ and the axioms ${\displaystyle \varepsilon <{\tfrac {1}{n))}$ for all positive integers ${\displaystyle n.}$ Clearly, the standard real numbers ${\displaystyle \mathbb {R} }$ are a model for every finite subset of these axioms, because the real numbers satisfy everything in ${\displaystyle \Sigma }$ and, by suitable choice of ${\displaystyle \varepsilon ,}$ can be made to satisfy any finite subset of the axioms about ${\displaystyle \varepsilon .}$ By the compactness theorem, there is a model ${\displaystyle {}^{*}\mathbb {R} }$ that satisfies ${\displaystyle \Sigma }$ and also contains an infinitesimal element ${\displaystyle \varepsilon .}$ A similar argument, adjoining axioms ${\displaystyle \omega >0,\;\omega >1,\ldots ,}$ etc., shows that the existence of infinitely large integers cannot be ruled out by any axiomatization ${\displaystyle \Sigma }$ of the reals.[8]

## Proofs

One can prove the compactness theorem using Gödel's completeness theorem, which establishes that a set of sentences is satisfiable if and only if no contradiction can be proven from it. Since proofs are always finite and therefore involve only finitely many of the given sentences, the compactness theorem follows. In fact, the compactness theorem is equivalent to Gödel's completeness theorem, and both are equivalent to the Boolean prime ideal theorem, a weak form of the axiom of choice.[9]

Gödel originally proved the compactness theorem in just this way, but later some "purely semantic" proofs of the compactness theorem were found; that is, proofs that refer to truth but not to provability. One of those proofs relies on ultraproducts hinging on the axiom of choice as follows:

Proof: Fix a first-order language ${\displaystyle L,}$ and let ${\displaystyle \Sigma }$ be a collection of L-sentences such that every finite subcollection of ${\displaystyle L}$-sentences, ${\displaystyle i\subseteq \Sigma }$ of it has a model ${\displaystyle {\mathcal {M))_{i}.}$ Also let ${\textstyle \prod _{i\subseteq \Sigma }{\mathcal {M))_{i))$ be the direct product of the structures and ${\displaystyle I}$ be the collection of finite subsets of ${\displaystyle \Sigma .}$ For each ${\displaystyle i\in I,}$ let ${\displaystyle A_{i}=\{j\in I:j\supseteq i\}.}$ The family of all of these sets ${\displaystyle A_{i))$ generates a proper filter, so there is an ultrafilter ${\displaystyle U}$ containing all sets of the form ${\displaystyle A_{i}.}$

Now for any formula ${\displaystyle \varphi }$ in ${\displaystyle \Sigma :}$

• the set ${\displaystyle A_{\{\varphi \))}$ is in ${\displaystyle U}$
• whenever ${\displaystyle j\in A_{\{\varphi \)),}$ then ${\displaystyle \varphi \in j,}$ hence ${\displaystyle \varphi }$ holds in ${\displaystyle {\mathcal {M))_{j))$
• the set of all ${\displaystyle j}$ with the property that ${\displaystyle \varphi }$ holds in ${\displaystyle {\mathcal {M))_{j))$ is a superset of ${\displaystyle A_{\{\varphi \)),}$ hence also in ${\displaystyle U}$

Łoś's theorem now implies that ${\displaystyle \varphi }$ holds in the ultraproduct ${\textstyle \prod _{i\subseteq \Sigma }{\mathcal {M))_{i}/U.}$ So this ultraproduct satisfies all formulas in ${\displaystyle \Sigma .}$

## Notes

1. ^ See Truss (1997).
2. ^ J. Barwise, S. Feferman, eds., Model-Theoretic Logics (New York: Springer-Verlag, 1985) [1], in particular, Makowsky, J. A. Chapter XVIII: Compactness, Embeddings and Definability. 645--716, see Theorems 4.5.9, 4.6.12 and Proposition 4.6.9. For compact logics for an extended notion of model see Ziegler, M. Chapter XV: Topological Model Theory. 557--577. For logics without the relativization property it is possible to have simultaneously compactness and interpolation, while the problem is still open for logics with relativization. See Xavier Caicedo, A Simple Solution to Friedman's Fourth Problem, J. Symbolic Logic, Volume 51, Issue 3 (1986), 778-784.doi:10.2307/2274031 JSTOR 2274031
3. ^ Vaught, Robert L.: "Alfred Tarski's work in model theory". Journal of Symbolic Logic 51 (1986), no. 4, 869–882
4. ^ Robinson, A.: Non-standard analysis. North-Holland Publishing Co., Amsterdam 1966. page 48.
5. ^ a b c Marker 2002, pp. 40–43.
6. ^ Gowers, Barrow-Green & Leader 2008, pp. 639–643.
7. ^ a b Terence, Tao (7 March 2009). "Infinite fields, finite fields, and the Ax-Grothendieck theorem".
8. ^ Goldblatt, Robert (1998). Lectures on the Hyperreals. New York: Springer Verlag. pp. 10–11. ISBN 0-387-98464-X.
9. ^ See Hodges (1993).