Documentation

InfinitaryLogic.ModelExistence.HenkinConstruction

Henkin Construction #

This file provides the infrastructure for the Henkin-style proof of the model existence theorem for Lω₁ω. The construction proceeds in several stages:

  1. Maximal consistent extension: Extend a consistent set of sentences to a maximal one within the consistency property (using Zorn's lemma or sequential enumeration for countable languages).
  2. Term model: Build a model from equivalence classes of closed terms.
  3. Truth lemma: Show that truth in the term model corresponds to membership in the maximal consistent set.

Main Results #

References #

Maximal Consistent Sets #

A set is maximal consistent in a consistency property if it is consistent and no proper superset is consistent. Uses Mathlib's Maximal predicate: Maximal (· ∈ C.sets) S means S ∈ C.sets ∧ ∀ S', S' ∈ C.sets → S ⊆ S' → S = S'.

Equations
Instances For

    Every consistent set in a consistency property can be extended to a maximal consistent set, by Zorn's lemma.

    The chain-closure axiom of ConsistencyProperty ensures that the union of any nonempty chain of consistent sets remains consistent, providing the upper bound required by Zorn's lemma.

    Properties of Maximal Consistent Sets #

    These properties follow from maximality: if adding a sentence preserves consistency, then it must already be in the maximal set.

    A maximal consistent set is consistent.

    If S ∪ {φ} is consistent and S is maximal, then φ ∈ S.

    In a maximal consistent set, for every implication φ → ψ in S, either ¬φ ∈ S or ψ ∈ S.

    In a maximal consistent set, negated implication gives both components: if ¬(φ → ψ) ∈ S, then φ ∈ S and ¬ψ ∈ S.

    In a maximal consistent set, double negation elimination holds.

    In a maximal consistent set, if ⋀ᵢ φᵢ ∈ S, then φₖ ∈ S for all k.

    In a maximal consistent set, if ¬(⋀ᵢ φᵢ) ∈ S, then ¬φₖ ∈ S for some k.

    In a maximal consistent set, if ⋁ᵢ φᵢ ∈ S, then φₖ ∈ S for some k.

    In a maximal consistent set, if ¬(⋁ᵢ φᵢ) ∈ S, then ¬φₖ ∈ S for all k.

    A maximal consistent set decides every sentence: either φ ∈ S* or ¬φ ∈ S*.

    In a maximal consistent set, ¬φ ∈ S ↔ φ ∉ S.

    In a maximal consistent set with ConsistencyPropertyEq, universal quantification: (∀x.φ) ∈ S* iff for all closed terms t, φ[x/t] ∈ S*.

    In a maximal consistent set with ConsistencyPropertyEq, existential quantification: if (∃x.φ) ∈ S* then there exists a closed term t with φ[x/t] ∈ S*.

    In a maximal consistent set, if ¬(∀x.φ(x)) ∈ S, then ∃t, ¬φ(t) ∈ S.

    Direct universal instantiation: if ∀x.φ ∈ S*, then φ(t) ∈ S* for all closed terms t. Uses openBounds to convert the bound variable to a free variable for substitution.

    Direct negated universal: if ¬(∀x.φ) ∈ S*, then ∃t, ¬φ(t) ∈ S*.

    Term Model Construction #

    The term model for the Henkin construction is built from closed terms of language L. Two terms are equivalent if the maximal consistent set contains the equation t₁ = t₂. The quotient model satisfies all sentences in S.

    Equivalence relation on closed terms induced by a maximal consistent set.

    Equations
    Instances For

      The term equivalence is an equivalence relation.

      Term Setoid and Quotient #

      The Setoid on closed terms induced by the equivalence relation from S*.

      Equations
      Instances For

        The carrier of the term model: closed terms quotiented by the equivalence relation t₁ ~ t₂ ↔ (t₁ = t₂) ∈ S*.

        Equations
        Instances For

          Language Structure on the Term Model #

          The structure interprets function symbols by applying them to representative terms, and relation symbols by checking membership in the maximal consistent set S*.

          Embed a closed term into the term model as its equivalence class.

          Equations
          Instances For
            noncomputable instance FirstOrder.Language.termModelStructure {L : Language} {C : L.ConsistencyPropertyEq} {S : Set L.Sentenceω} {hmax : C.MaximalConsistent S} :
            L.Structure (TermModel C S hmax)

            The language structure on the term model.

            Function interpretation: funMap f [⟦t₁⟧,...,⟦tₙ⟧] = ⟦f(t₁,...,tₙ)⟧. Relation interpretation: RelMap R [⟦t₁⟧,...,⟦tₙ⟧] ↔ rel R [t₁,...,tₙ] ∈ S*.

            Equations
            • One or more equations did not get rendered due to their size.

            Truth Lemma Infrastructure #

            In the term model, evaluating a closed term gives its equivalence class.

            theorem FirstOrder.Language.TermModel.exists_rep {L : Language} {C : L.ConsistencyPropertyEq} {S : Set L.Sentenceω} {hmax : C.MaximalConsistent S} (x : TermModel C S hmax) :
            ∃ (t : L.Term Empty), mk t = x

            Every element of the term model is the equivalence class of some term.

            Term Conversion for Empty Variable Types #

            Since EmptyFin 0 has no inhabitants, terms of type Term (Empty ⊕ Fin 0) are ground terms (built from function symbols only). We provide a conversion to Term Empty and show it preserves semantics and set membership.

            Opening Bound Variables #

            BoundedFormulaω.openBounds is defined in Operations.lean and converts bound variables to free variables. The truth lemma uses the semantic roundtrip (realize_openBounds) rather than the syntactic roundtrip.

            Semantic Roundtrip for openBounds #

            theorem FirstOrder.Language.realize_openBounds {L : Language} {M : Type u_1} [L.Structure M] {n : } (φ : L.BoundedFormulaω Empty n) (xs : Fin nM) :

            Semantic roundtrip: openBounds preserves semantics. For φ : BoundedFormulaω Empty n, evaluating openBounds φ with free variable assignment xs : Fin n → M is equivalent to evaluating φ with bound variable assignment xs.

            Ordinal-valued depth for termination of truthLemma #

            The standard sizeOf measure is inadequate for truthLemma because:

            We define an Ordinal-valued depth that uses iSup for iSup/iInf cases, then prove it is preserved by castLE, relabel, openBounds, and subst.

            noncomputable def FirstOrder.Language.BoundedFormulaω.depth {L : Language} {α : Type u_1} {n : } :

            Ordinal-valued depth of a bounded formula. Uses Ordinal.iSup at iSup/iInf nodes to ensure each component φs k has strictly smaller depth.

            Equations
            Instances For

              Truth Lemma #

              @[irreducible]
              noncomputable def FirstOrder.Language.truthLemma {L : Language} {C : L.ConsistencyPropertyEq} {S : Set L.Sentenceω} {hmax : C.MaximalConsistent S} (σ : L.Sentenceω) :
              σ S σ.Realize (TermModel C S hmax)

              Truth Lemma: A sentence belongs to the maximal consistent set S* if and only if it is true in the term model.

              This is proved by recursion on the sentence, with the biconditional proved simultaneously at each step. The forward direction uses the consistency property axioms to decompose formulas. The backward direction uses maximality (decidability) and the dual axioms (C1', C3', C4') to derive contradictions.

              Cases:

              • (C0) for falsum: falsum is never in S (C0) and never realized.
              • (C1, C1') for imp: forward uses C1 + IH; backward uses decidability + C1' + IH.
              • (C3, C3') for iInf: forward uses C3 + IH; backward uses decidability + C3' + IH.
              • (C4, C4') for iSup: forward uses C4 + IH; backward uses decidability + C4' + IH.
              • (C5, C6) for equal: uses term model quotient structure.
              • Term model structure for rel: uses definition of RelMap on term model.
              • (C7, C7_all) for all: uses openBounds roundtrip.
              Equations
              • =
              Instances For

                Model Existence from Truth Lemma #

                The term model satisfies every sentence in S*.