Fundamental Theorem of the Logical Relation (Theorems 3.21 & 3.23)
ProvedAbel2018.theorems_3_21_and_3_23_fundamentalby kmehltretter82 · Nov 7, 2026 · Mathlib 0df444a (Lean v4.33.1)
conversion-checkingdecidabilitydependent-typeslogical-relationsnormalizationtype-theory
Section 3.6 (Theorem 3.21 & Theorem 3.23): Fundamental theorem of the logical relation parameterized by eqrel : EqRelSet for all 5 declarative judgments (FundCtxMotive, FundTypeMotive, FundTermMotive, FundTypeEqMotive, FundTermEqMotive) and identity substitution validity, implying reducibility of well-formed types, well-typed terms, and judgmentally equal types and terms in any abstract equality system eqrel.
Preamble
import Definitions.Def_Abel2018_LogicalRelation
Formal statement
namespace Abel2018
theorem theorems_3_21_and_3_23_fundamental (eqrel : EqRelSet) :
(∀ {Γ : Context}, CtxWf Γ → FundCtxMotive eqrel Γ) ∧
(∀ {Γ : Context} {A : Term}, TypeWf Γ A → FundTypeMotive eqrel Γ A) ∧
(∀ {Γ : Context} {t A : Term}, HasType Γ t A → FundTermMotive eqrel Γ t A) ∧
(∀ {Γ : Context} {A B : Term}, TypeEq Γ A B → FundTypeEqMotive eqrel Γ A B) ∧
(∀ {Γ : Context} {t u A : Term}, TermEq Γ t u A → FundTermEqMotive eqrel Γ t u A) ∧
(∀ {Γ Δ : Context} {σ : Subst}, CtxWf Γ → CtxWf Δ → SubstWf Δ σ Γ →
ValidCtx eqrel Γ ∧ ValidSubst eqrel Δ σ Γ) ∧
(∀ {Γ Δ : Context} {σ σ' : Subst}, CtxWf Γ → CtxWf Δ → SubstEq Δ σ σ' Γ →
ValidCtx eqrel Γ ∧ ValidSubst eqrel Δ σ Γ ∧ ValidSubst eqrel Δ σ' Γ ∧
ValidSubstEq eqrel Δ σ σ' Γ) := by sorry
end Abel2018Source
Andreas Abel, Joakim Öhman, and Andrea Vezzosi, 'Decidability of Conversion for Type Theory in Type Theory', Proceedings of the ACM on Programming Languages (PACMPL), Vol. 2, No. POPL, Article 23, January 2018, pp. 23:1-23:29 (doi:10.1145/3158111). Mechanized Agda artifact: https://github.com/mr-ohman/logrel-mltt (commit eb2b15ab1c4b45923025834d3bb798943cb44b8e). Section 3.6 (Theorems 3.21 and 3.23; `Fundamental.agda`).
Read-back
What the Lean code literally says, in plain math · Gemini 3.1 Pro (Independent Blind Auditor)
Given any parameter eqrel:EqRelSet, the theorem Abel2018.theorems_3_21_and_3_23_fundamental asserts the conjunction of 7 fundamental validity implications:
- Fundamental theorem for contexts:
∀Γ:Context,CtxWf(Γ)→ValidCtx(eqrel,Γ).
- Fundamental theorem for types:
∀Γ:Context,∀A:Term,TypeWf(Γ,A)→ValidCtx(eqrel,Γ)∧ValidType(eqrel,one,Γ,A).
- Fundamental theorem for terms:
∀Γ:Context,∀t,A:Term,HasType(Γ,t,A)→ValidCtx(eqrel,Γ)∧∃(hA:ValidType(eqrel,one,Γ,A)),ValidTerm(hA,t).
- Fundamental theorem for type equality:
∀Γ:Context,∀A,B:Term,TypeEq(Γ,A,B)→ValidCtx(eqrel,Γ)∧∃(hA:ValidType(eqrel,one,Γ,A)),ValidType(eqrel,one,Γ,B)∧ValidTypeEq(hA,B).
- Fundamental theorem for term equality:
∀Γ:Context,∀t,u,A:Term,TermEq(Γ,t,u,A)→ValidCtx(eqrel,Γ)∧ModelsTermEq(eqrel,one,Γ,t,u,A).
- Fundamental theorem for well-formed substitutions:
∀Γ,Δ:Context,∀σ:Subst,CtxWf(Γ)→CtxWf(Δ)→SubstWf(Δ,σ,Γ)→ValidCtx(eqrel,Γ)∧ValidSubst(eqrel,Δ,σ,Γ).
- Fundamental theorem for equal substitutions:
∀Γ,Δ:Context,∀σ,σ′:Subst,CtxWf(Γ)→CtxWf(Δ)→SubstEq(Δ,σ,σ′,Γ)→ValidCtx(eqrel,Γ)∧ValidSubst(eqrel,Δ,σ,Γ)∧ValidSubst(eqrel,Δ,σ′,Γ)∧ValidSubstEq(eqrel,Δ,σ,σ′,Γ).View graph
Confirmed by the moderator at approval.