Lemma 4: Code-Level Properties of `f-extract`, `f-app`, and `fam`
OpenBergerSchwichtenberg1991.lemma_4completenesslambda-calculusnormalization-by-evaluationsemanticstype-theory
Establishes the four code-level equations (1)-(4) for f_extract, f_app, and fam in any admissible model M (Lemma 4, p. 206).
Preamble
import Definitions.Def_BergerSchwichtenberg1991_Models
Formal statement
namespace BergerSchwichtenberg1991
universe u
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 BergerSchwichtenberg1991Source
Ulrich Berger and Helmut Schwichtenberg, 'An inverse of the evaluation functional for typed λ-calculus', Proceedings of the Sixth Annual IEEE Symposium on Logic in Computer Science (LICS 1991), pp. 203-211 (doi:10.1109/LICS.1991.151645). Lemma 4, p. 206.
Read-back
What the Lean code literally says, in plain math · Gemini 3.1 Pro (Independent Blind Auditor)
Read-back: Thm_BergerSchwichtenberg1991_lemma_4.lean
lemma_4 — For every admissible model in universe (with distinguished types and , term coding , index coding , and operations , , , and ), asserts the conjunction of four equations for arbitrary raw terms (without HasType hypotheses):
- For every raw term , applying to yields the code of up to :
- For every raw term , re-embedding equals up to :
- For all raw terms , applying to and yields up to :
- For every element and every raw term , if holds for every binary index , then equals up to :