Lemma 4 — Extraction and application of term families
OpenBergerSchwichtenberg1991V2.lemma_4In an admissible model, extraction on an embedded term yields the code of the selected representative, re-embedding gives the original family, and family application represents syntactic application. Any model function agreeing with a represented family on all index codes gives that family under the family operator.
import Definitions.Def_BergerSchwichtenberg1991V2_Models
namespace BergerSchwichtenberg1991V2
universe u
/-- Lemma 4. Extraction, application, and family formation agree with the coding laws
on represented term families. -/
theorem lemma_4 (M : AdmissibleModel.{u}) :
(∀ r : Term,
M.eqM .base (M.f_extract (M.appM M.emb (M.codeTerm r)))
(M.codeTerm (EXTRACT (EMB r)))) ∧
(∀ r : Term,
M.eqM M.tyF (M.appM M.emb (M.f_extract (M.appM M.emb (M.codeTerm r))))
(M.appM M.emb (M.codeTerm r))) ∧
(∀ r s : Term,
M.eqM M.tyF
(M.f_app (M.appM M.emb (M.codeTerm r)) (M.appM M.emb (M.codeTerm s)))
(M.appM M.emb (M.codeTerm (.app r s)))) ∧
(∀ (a : M.Dom (.arr M.tyIdx .base)) (r : Term),
(∀ k : Index, M.eqM .base (M.appM a (M.codeIdx k)) (M.codeTerm (EMB r k))) →
M.eqM M.tyF (M.fam a) (M.appM M.emb (M.codeTerm r))) := by sorry
end BergerSchwichtenberg1991V2Read-back
What the Lean code literally says, in plain math · OpenAI Codex (GPT-6)
Fix any admissible model with domains in an arbitrary universe. Write for the base type, and for its family and index types, and for its domain and equivalence at type , for the code of a raw term , and for the code of a finite Boolean list . Application of model elements is written by juxtaposition. A lambda model has an equivalence at each domain, application preserving equivalences in both arguments, and equivalence of arrow elements whenever all their applications to common arguments are equivalent. Its evaluation of typed terms uses assignments of a value of the specified type to every variable, one of which is supplied as a default. Evaluation gives the assigned value at variables and respects application, and applying an evaluated abstraction evaluates its body under the assignment updated at the binder, all up to the model equivalences. Types are generated by and arrows. Raw terms are built from variable occurrences, applications, and abstractions. Variables carry a type and either an index or a natural-number name.
Write for the raw term obtained by renaming each binder and its bound occurrences to the indexed name followed by that binder's path, leaving free variables intact. Binding matches full variables at the nearest matching binder. Paths add for a left application child or an abstraction body, and for a right application child. For an index-to-term function , , where is the maximum index length among all variable occurrences and binders in and , with maximum when there are none. Let be the variable of type with index . Admissibility adds operations , , , , , , and at the arrow types indicated by their uses. They obey for concatenation , , , and for all types, indices and raw terms in the respective equations. Also implies , which in turn implies . For every , . For every and raw term , if for every , then .
Define and for . The claim is the conjunction of four assertions. For every raw term , . For every raw term , . For every pair of raw terms , . For every and raw term , if for all finite Boolean lists , including , then . The raw-term ranges include open and ill-typed terms.