In [[symbolic logic]], the '''compactness theorem''' asserts that a set of [[first-order predicate calculus|first-order]] sentences is satifiable, i.e., has a [[consistencymodel theory|consistentmodel]], if and only if anyevery finite [[subset]] of it is consistentsatifiable. Any[[Goedel]]'s [[completeness theorem]] says that any consistent set of sentences in logic has a [[model, theoryso |the model]]compactness theorem is a corollary of the completeness theorem. Goedel originally proved the compactness theorem in just that way, sobut thislater issome equivalent"purely tosemantic" sayingproofs of the compactness theorem were found, i.e., proofs that setrefer to ''truth'' but not to ''provability''. The concept of sentences"consistency", haswhich occurs in the statement of the completeness theorem, relies essentially on the idea of "provability", since a modelset of sentences is consistent if and only if anyno contradiction is ''provable'' from sentences in the set. The ''finite'' subsetnature of it''proofs'' hasentails athe modelfiniteness in the compactness theorem when Goedel's way of proving the compactness theorem is followed.
This is a basic fact in logic and [[model theory]], and has very far-reaching consequences. For instance, it follows that if some first-order sentence can be true in [[field]]s of arbitrary large [[characteristic]], it must also be true in some field of [[characteristic]] zero. In other words, if some sentence holds for every field of characteristic zero it must hold for every field of [[characteristic]] larger than some constant.
for [[field]]s of arbitrary large [[characteristic]], it must also be true for some field of [[characteristic]] zero. In other words, if some sentence holds for every field of characteristic zero it must hold for every field of [[characteristic]] larger than some constant.
Also, it follows that any theory that has an infinite model has models of arbitrary large [[cardinality]]. So, for instance, there are nonstandard models of [[Peano arithmetic]] with uncountably many natural numbers. The [[nonstandard analysis]] is another example where infinite natural numbers appear, a possibility that cannot be excluded by any axiomatization - also a consequence of the compactness theorem.