Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1: Inversion of the Evaluation Functional in Admissible Models

Open
BergerSchwichtenberg1991.theorem_1

by kmehltretter82 · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

completenesslambda-calculusnormalization-by-evaluationsemanticstype-theory

In any admissible model M, the procedure-to-expression functional p-e_ρ inverts evaluation on λ-definable elements and computes the long β-normal form of any closed term, yielding Strong Completeness (M ⊨ r = s → r =_{βη} s).

Preamble
import Definitions.Def_BergerSchwichtenberg1991_Models
Formal statement
namespace BergerSchwichtenberg1991

universe u

theorem theorem_1 (M : AdmissibleModel.{u}) (IF : InversionFunctionals M) :
    (∀ (ρ : Ty) (a : M.Dom ρ),
      M.IsLambdaDefinable ρ a →
      ∃ t : Term,
        IF.IsPeResult ρ a t ∧
        IsClosed t ∧
        IsLongBetaNormal ρ t ∧
        ∀ η : M.Env, M.eqM ρ (M.eval t η ρ) a) ∧
    (∀ (ρ : Ty) (r rStar : Term) (θ : Substitution),
      HasType r ρ →
      HasType rStar ρ →
      IsLongBetaNormal ρ rStar →
      BetaEtaEq r rStar →
      IsWellTypedSubst θ →
      IF.IsPeResult ρ (M.eval r (IF.etaSubst θ) ρ) (EXTRACT (EMB (applySubst θ rStar))) ∧
      AlphaEq (EXTRACT (EMB (applySubst θ rStar))) (applySubst θ rStar)) ∧
    (∀ (ρ : Ty) (r s : Term),
      HasType r ρ →
      HasType s ρ →
      M.ModelsEq ρ r s →
      BetaEtaEq r s) := by sorry

end BergerSchwichtenberg1991
Source
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). Theorem 1 & Corollary, pp. 207-208.
Read-back

What the Lean code literally says, in plain math · Gemini 3.1 Pro (Independent Blind Auditor)

Read-back: Thm_BergerSchwichtenberg1991_theorem_1.lean

theorem_1 — Given an admissible model M:AdmissibleModelM : \mathrm{AdmissibleModel}M:AdmissibleModel in universe uuu and an inversion functional package IF:InversionFunctionals(M)\mathrm{IF} : \mathrm{InversionFunctionals}(M)IF:InversionFunctionals(M), asserts the conjunction of three statements:

  1. (Inversion of λ\lambdaλ-definable elements) For every simple type ρ∈Ty\rho \in \mathrm{Ty}ρ∈Ty and every element a∈Mρa \in M^\rhoa∈Mρ that is λ\lambdaλ-definable in MMM (IsLambdaDefinable(M,ρ,a)\mathrm{IsLambdaDefinable}(M, \rho, a)IsLambdaDefinable(M,ρ,a), meaning there exists a closed term r:ρr : \rhor:ρ with ∀η∈M.Env,  M.eval(r,η,ρ)=ρa\forall \eta \in M.\mathrm{Env},\; M.\mathrm{eval}(r, \eta, \rho) =_\rho a∀η∈M.Env,M.eval(r,η,ρ)=ρ​a), there exists a term t∈Termt \in \mathrm{Term}t∈Term such that:
    • IF.IsPeResult(ρ,a,t)\mathrm{IF.IsPeResult}(\rho, a, t)IF.IsPeResult(ρ,a,t) holds (i.e., HasType(t,ρ)\mathrm{HasType}(t, \rho)HasType(t,ρ) and ⌈t⌉o=of_extract(Φρ a)\lceil t \rceil^o =_o \mathrm{f\_extract}(\Phi_\rho\ a)⌈t⌉o=o​f_extract(Φρ​ a)),
    • ttt is closed (IsClosed(t)\mathrm{IsClosed}(t)IsClosed(t), i.e., freeVars(t)=[]\mathrm{freeVars}(t) = []freeVars(t)=[]),
    • ttt is in long β\betaβ-normal form at type ρ\rhoρ (IsLongBetaNormal(ρ,t)\mathrm{IsLongBetaNormal}(\rho, t)IsLongBetaNormal(ρ,t)), and
    • for every environment η∈M.Env\eta \in M.\mathrm{Env}η∈M.Env, M.eval(t,η,ρ)=ρaM.\mathrm{eval}(t, \eta, \rho) =_\rho aM.eval(t,η,ρ)=ρ​a.
  2. (Normalization under substitution) For every simple type ρ∈Ty\rho \in \mathrm{Ty}ρ∈Ty, all raw terms r,r∗∈Termr, r^* \in \mathrm{Term}r,r∗∈Term, and every substitution θ:Var→Term\theta : \mathrm{Var} \to \mathrm{Term}θ:Var→Term, if rrr has type ρ\rhoρ (HasType(r,ρ)\mathrm{HasType}(r, \rho)HasType(r,ρ)), r∗r^*r∗ has type ρ\rhoρ (HasType(r∗,ρ)\mathrm{HasType}(r^*, \rho)HasType(r∗,ρ)), r∗r^*r∗ is in long β\betaβ-normal form at type ρ\rhoρ (IsLongBetaNormal(ρ,r∗)\mathrm{IsLongBetaNormal}(\rho, r^*)IsLongBetaNormal(ρ,r∗)), rrr and r∗r^*r∗ are βη\beta\etaβη-equal (BetaEtaEq(r,r∗)\mathrm{BetaEtaEq}(r, r^*)BetaEtaEq(r,r∗)), and θ\thetaθ is well-typed (IsWellTypedSubst(θ)\mathrm{IsWellTypedSubst}(\theta)IsWellTypedSubst(θ)), then letting t∗=EXTRACT(EMB(applySubst(θ,r∗)))t^* = \mathrm{EXTRACT}(\mathrm{EMB}(\mathrm{applySubst}(\theta, r^*)))t∗=EXTRACT(EMB(applySubst(θ,r∗))):
    • IF.IsPeResult(ρ, M.eval(r,ηθ,ρ), t∗)\mathrm{IF.IsPeResult}\bigl(\rho,\, M.\mathrm{eval}(r, \eta_\theta, \rho),\, t^*\bigr)IF.IsPeResult(ρ,M.eval(r,ηθ​,ρ),t∗) holds (i.e., HasType(t∗,ρ)\mathrm{HasType}(t^*, \rho)HasType(t∗,ρ) and ⌈t∗⌉o=of_extract(Φρ(M.eval(r,ηθ,ρ)))\lceil t^* \rceil^o =_o \mathrm{f\_extract}\bigl(\Phi_\rho(M.\mathrm{eval}(r, \eta_\theta, \rho))\bigr)⌈t∗⌉o=o​f_extract(Φρ​(M.eval(r,ηθ​,ρ)))), and
    • t∗t^*t∗ is α\alphaα-equivalent to applySubst(θ,r∗)\mathrm{applySubst}(\theta, r^*)applySubst(θ,r∗) (AlphaEq(t∗,applySubst(θ,r∗))\mathrm{AlphaEq}(t^*, \mathrm{applySubst}(\theta, r^*))AlphaEq(t∗,applySubst(θ,r∗))).
  3. (Completeness) For every simple type ρ∈Ty\rho \in \mathrm{Ty}ρ∈Ty and all raw terms r,s∈Termr, s \in \mathrm{Term}r,s∈Term, if HasType(r,ρ)\mathrm{HasType}(r, \rho)HasType(r,ρ), HasType(s,ρ)\mathrm{HasType}(s, \rho)HasType(s,ρ), and M.ModelsEq(ρ,r,s)M.\mathrm{ModelsEq}(\rho, r, s)M.ModelsEq(ρ,r,s) (i.e., ∀η∈M.Env,  M.eval(r,η,ρ)=ρM.eval(s,η,ρ)\forall \eta \in M.\mathrm{Env},\; M.\mathrm{eval}(r, \eta, \rho) =_\rho M.\mathrm{eval}(s, \eta, \rho)∀η∈M.Env,M.eval(r,η,ρ)=ρ​M.eval(s,η,ρ)), then rrr and sss are βη\beta\etaβη-equal (BetaEtaEq(r,s)\mathrm{BetaEtaEq}(r, s)BetaEtaEq(r,s)).

Note that Part 1 and Part 3 do not assume as a hypothesis that the witnessing closed term rrr (in Part 1) or the terms r,sr, sr,s (in Part 3) possess long β\betaβ-normal forms r∗r^*r∗ satisfying BetaEtaEq(r,r∗)\mathrm{BetaEtaEq}(r, r^*)BetaEtaEq(r,r∗), whereas Part 2 explicitly takes r∗r^*r∗ with IsLongBetaNormal(ρ,r∗)\mathrm{IsLongBetaNormal}(\rho, r^*)IsLongBetaNormal(ρ,r∗) and BetaEtaEq(r,r∗)\mathrm{BetaEtaEq}(r, r^*)BetaEtaEq(r,r∗) as inputs.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me