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.
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.
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] Kurt Gödel proved the countable compactness theorem in 1930.
Anatoly Maltsev proved the uncountable case in 1936.
[3][4] The compactness theorem has many applications in model theory; a few typical results are sketched here.
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
such that the sentence holds for every field of characteristic larger than
together with the field axioms and the infinite sequence of sentences
holds, and the infinite sequence of sentences ensures any model would be a field of characteristic 0).
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
is true in some algebraically closed field of characteristic
is true in all algebraically closed fields of sufficiently large non-0 characteristic
[5] One consequence is the following special case of the Ax–Grothendieck theorem: all injective complex polynomials
[7] In fact, the surjectivity conclusion remains true for any injective polynomial
[7] 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'.
or by any infinite model, the entire extended theory is satisfiable.
be a first-order axiomatization of the theory of the real numbers.
Consider the theory obtained by adding a new constant symbol
are a model for every finite subset of these axioms, because the real numbers satisfy everything in
can be made to satisfy any finite subset of the axioms about
A similar argument, this time adjoining the axioms
etc., shows that the existence of numbers with infinitely large magnitudes cannot be ruled out by any axiomatization
satisfy the transfer principle:[9] a first-order sentence is true of
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.
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.
[10] 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.