The compactness theorem of first-order logic
ProvedFamousTheorems.compactness_theorem_first_orderThe compactness theorem. A first-order theory in a language has a model if and only if every finite subset of has a model.
Compactness is one of the two pillars of classical model theory, together with the Löwenheim–Skolem theorems. It yields nonstandard models of arithmetic and analysis, shows that finiteness and many other properties are not first-order expressible, and gives transfer principles such as the Ax–Grothendieck theorem.
Formalization note. Mathlib's FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable. T.IsSatisfiable means has a nonempty model, and T.IsFinitelySatisfiable means every finite subtheory does. Mathlib proves it by ultraproducts (Łoś's theorem).
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem compactness_theorem_first_order {L : FirstOrder.Language} (T : L.Theory) : T.IsSatisfiable ↔ T.IsFinitelySatisfiable := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable`. Proof here reduces to that Mathlib result.