First-Order Satisfiability #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4. This file deals with the satisfiability of first-order theories, as well as equivalence over them.
Main Definitions #
first_order.language.Theory.is_satisfiable:T.is_satisfiableindicates thatThas a nonempty model.first_order.language.Theory.is_finitely_satisfiable:T.is_finitely_satisfiableindicates that every finite subset ofTis satisfiable.first_order.language.Theory.is_complete:T.is_completeindicates thatTis satisfiable and models each sentence or its negation.first_order.language.Theory.semantically_equivalent:T.semantically_equivalent φ ψindicates thatφandψare equivalent formulas or sentences in models ofT.cardinal.categorical: A theory isκ-categorical if all models of sizeκare isomorphic.
Main Results #
- The Compactness Theorem, 
first_order.language.Theory.is_satisfiable_iff_is_finitely_satisfiable, shows that a theory is satisfiable iff it is finitely satisfiable. first_order.language.complete_theory.is_complete: The complete theory of a structure is complete.first_order.language.Theory.exists_large_model_of_infinite_modelshows that any theory with an infinite model has arbitrarily large models.first_order.language.Theory.exists_elementary_embedding_card_eq: The Upward Löwenheim–Skolem Theorem: Ifκis a cardinal greater than the cardinalities ofLand an infiniteL-structureM, thenMhas an elementary extension of cardinalityκ.
Implementation Details #
- Satisfiability of an 
L.TheoryTis defined in the minimal universe containing all the symbols ofL. By Löwenheim-Skolem, this is equivalent to satisfiability in any universe. 
A theory is satisfiable if a structure models it.
Equations
- T.is_satisfiable = nonempty T.Model
 
A theory is finitely satisfiable if all of its finite subtheories are satisfiable.
Equations
- T.is_finitely_satisfiable = ∀ (T0 : finset L.sentence), ↑T0 ⊆ T → ↑T0.is_satisfiable
 
The Compactness Theorem of first-order logic: A theory is satisfiable if and only if it is finitely satisfiable.
A version of The Downward Löwenheim–Skolem theorem where the structure N elementarily embeds
into M, but is not by type a substructure of M, and thus can be chosen to belong to the universe
of the cardinal κ.
The Upward Löwenheim–Skolem Theorem: If κ is a cardinal greater than the cardinalities of L
and an infinite L-structure M, then M has an elementary extension of cardinality κ.
The Löwenheim–Skolem Theorem: If κ is a cardinal greater than the cardinalities of L
and an infinite L-structure M, then there is an elementary embedding in the appropriate
direction between then M and a structure of cardinality κ.
A consequence of the Löwenheim–Skolem Theorem: If κ is a cardinal greater than the
cardinalities of L and an infinite L-structure M, then there is a structure of cardinality κ
elementarily equivalent to M.
A theory models a (bounded) formula when any of its nonempty models realizes that formula on all inputs.
A theory is complete when it is satisfiable and models each sentence or its negation.
Equations
- T.is_complete = (T.is_satisfiable ∧ ∀ (φ : L.sentence), T ⊨ φ ∨ T ⊨ first_order.language.formula.not φ)
 
A theory is maximal when it is satisfiable and contains each sentence or its negation. Maximal theories are complete.
Equations
- T.is_maximal = (T.is_satisfiable ∧ ∀ (φ : L.sentence), φ ∈ T ∨ first_order.language.formula.not φ ∈ T)
 
Two (bounded) formulas are semantically equivalent over a theory T when they have the same
interpretation in every model of T. (This is also known as logical equivalence, which also has a
proof-theoretic definition.)
Equations
- T.semantically_equivalent φ ψ = T ⊨ φ.iff ψ
 
Instances for first_order.language.Theory.semantically_equivalent
        
        
    Semantic equivalence forms an equivalence relation on formulas.
Equations
- T.semantically_equivalent_setoid = {r := T.semantically_equivalent, iseqv := _}
 
A theory is κ-categorical if all models of size κ are isomorphic.
The Łoś–Vaught Test : a criterion for categorical theories to be complete.