Documentation

InfinitaryLogic.Scott.Code

Countable Code Layer for Lω₁ω Formulas #

Legacy / off-path. The Scott analysis pipeline was decoupled from the FormulaCode bridge (see the notes around per_tuple_stabilization_below_omega1 in Scott/Sentence.lean), so this module is no longer imported by any library root; it is kept for its public FormulaCode API and is reachable via InfinitaryLogic.Everything.

This file defines a countable code type for Lω₁ω formulas over a countable relational language, and proves the key bridge lemma: if two tuples agree on all codes of bounded quantifier rank, they are BFEquiv.

Main Definitions #

Main Results #

Implementation Notes #

In our Lean formalization, BoundedFormulaω is uncountable (due to ℕ → BoundedFormulaω in iSup/iInf). The FormulaCode type provides a countable proxy: it uses an explicit list structure instead of ℕ → for branching, making the type countable. While FormulaCode cannot represent all Lω₁ω formulas, every Lω₁ω formula (including every Scott formula) is logically equivalent to a conjunction of code-representable formulas, because codes capture all atomic facts and all finite approximations of countable conjunctions/disjunctions.

inductive FirstOrder.Language.FormulaCode (L : Language) :
ℕ → Type ((max u v) + 1)

Countable codes for Lω₁ω formulas. Uses an explicit cons/nil list (instead of ℕ →) for conjunctions/disjunctions. The key property is Countable (FormulaCode L n).

Instances For
    inductive FirstOrder.Language.FormulaCodeList (L : Language) :
    ℕ → Type ((max u v) + 1)

    List of formula codes, used for countable conjunctions/disjunctions.

    Instances For
      noncomputable def FirstOrder.Language.FormulaCode.Realize {L : Language} {n : ℕ} {N : Type w} [L.Structure N] (c : L.FormulaCode n) (b : Fin n → N) :

      Semantics of a code: realized iff its formula interpretation is realized.

      Equations
      Instances For
        theorem FirstOrder.Language.BFEquiv_implies_agree_codes {L : Language} [L.IsRelational] {M : Type w} [L.Structure M] [Countable M] {N : Type w} [L.Structure N] [Countable N] {n : ℕ} (a : Fin n → M) (b : Fin n → N) (α : Ordinal.{0}) (hα : α < Ordinal.omega 1) (hBF : BFEquiv α n a b) (c : L.FormulaCode n) (hc : c.toFormulaω.qrank ≤ α) :

        BFEquiv implies agreement on all formula codes of bounded quantifier rank.