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:
- 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).
- Term model: Build a model from equivalence classes of closed terms.
- Truth lemma: Show that truth in the term model corresponds to membership in the maximal consistent set.
Main Results #
ConsistencyProperty.exists_maximal: Every consistent set extends to a maximal consistent set (requires chain-closure of C.sets).ConsistencyProperty.MaximalConsistent: Predicate for maximal consistency.- Properties of maximal consistent sets (closure under connectives).
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'.
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
- FirstOrder.Language.termSetoid C S hmax = { r := FirstOrder.Language.termEquiv C S hmax, iseqv := ⋯ }
Instances For
The carrier of the term model: closed terms quotiented by the equivalence
relation t₁ ~ t₂ ↔ (t₁ = t₂) ∈ S*.
Equations
- FirstOrder.Language.TermModel C S hmax = Quotient (FirstOrder.Language.termSetoid C S hmax)
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
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.
Every element of the term model is the equivalence class of some term.
Term Conversion for Empty Variable Types #
Since Empty ⊕ Fin 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 #
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:
sizeOf (fun k => φs k) = 1for function types, sosizeOf (iSup φs) = 2, yetsizeOf (φs k)can be arbitrarily large.- The
allcase recurses on(φ.openBounds).subst t, which is not a structural subterm.
We define an Ordinal-valued depth that uses iSup for iSup/iInf cases,
then prove it is preserved by castLE, relabel, openBounds, and subst.
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
- FirstOrder.Language.BoundedFormulaω.falsum.depth = 0
- (FirstOrder.Language.BoundedFormulaω.equal t₁ t₂).depth = 0
- (FirstOrder.Language.BoundedFormulaω.rel R ts).depth = 0
- (φ.imp ψ).depth = max φ.depth ψ.depth + 1
- φ.all.depth = φ.depth + 1
- (FirstOrder.Language.BoundedFormulaω.iSup φs).depth = (⨆ (k : ℕ), (φs k).depth) + 1
- (FirstOrder.Language.BoundedFormulaω.iInf φs).depth = (⨆ (k : ℕ), (φs k).depth) + 1
Instances For
Truth Lemma #
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*.