Typed Weak-Head Reduction Properties, Typed Weakening, and Declarative EqRelSet Instance (Lemmas 2.2-2.7 & Section 3.1)
ProvedAbel2018.lemmas_2_2_to_2_7_typed_reduction_and_weakeningby kmehltretter82 · Nov 7, 2026 · Mathlib 0df444a (Lean v4.33.1)
conversion-checkingdecidabilitydependent-typeslogical-relationsnormalizationtype-theory
Section 2.2 (Lemmas 2.2-2.7) & Section 3.1 (TermEq instance of EqRelSet): Soundness of typed weak-head reduction (Step -> TermEq, TypeStep -> TypeEq), WHNF irreducibility, determinism of one-step weak-head reduction, typed weakening for all 4 declarative judgments (TypeWf, HasType, TypeEq, TermEq), and existence of the declarative judgmental equality EqRelSet instance (synEqRel, with TypeEqRel = TypeEq, TermEqRel = TermEq, and NeEqRel = TermEq).
Preamble
import Definitions.Def_Abel2018_Judgments
Formal statement
namespace Abel2018
theorem lemmas_2_2_to_2_7_typed_reduction_and_weakening :
(∀ {Γ : Context} {t u A : Term}, Step Γ t u A → TermEq Γ t u A) ∧
(∀ {Γ : Context} {A B : Term}, TypeStep Γ A B → TypeEq Γ A B) ∧
(∀ {Γ : Context} {t u A : Term}, Step Γ t u A → Whnf t → False) ∧
(∀ {Γ : Context} {t u A u' A' : Term}, Step Γ t u A → Step Γ t u' A' → u = u') ∧
(∀ {Γ Δ : Context} {A : Term} {ρ : Wk}, WkCtx ρ Δ Γ → CtxWf Δ → TypeWf Γ A → TypeWf Δ (wk ρ A)) ∧
(∀ {Γ Δ : Context} {t A : Term} {ρ : Wk}, WkCtx ρ Δ Γ → CtxWf Δ → HasType Γ t A → HasType Δ (wk ρ t) (wk ρ A)) ∧
(∀ {Γ Δ : Context} {A B : Term} {ρ : Wk}, WkCtx ρ Δ Γ → CtxWf Δ → TypeEq Γ A B → TypeEq Δ (wk ρ A) (wk ρ B)) ∧
(∀ {Γ Δ : Context} {t u A : Term} {ρ : Wk}, WkCtx ρ Δ Γ → CtxWf Δ → TermEq Γ t u A → TermEq Δ (wk ρ t) (wk ρ u) (wk ρ A)) ∧
(∃ eqrel : EqRelSet,
eqrel.TypeEqRel = TypeEq ∧
eqrel.TermEqRel = TermEq ∧
eqrel.NeEqRel = TermEq) := 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 2.2 (Lemmas 2.2-2.7) and Section 3.1 (`TermEq` instance of `EqRelSet`).
Read-back
What the Lean code literally says, in plain math · Gemini 3.1 Pro (Independent Blind Auditor)
The theorem Abel2018.lemmas_2_2_to_2_7_typed_reduction_and_weakening asserts the conjunction of 9 clauses:
- Term reduction implies judgmental term equality:
∀Γ:Context,∀t,u,A:Term,Step(Γ,t,u,A)→TermEq(Γ,t,u,A).
- Type reduction implies judgmental type equality:
∀Γ:Context,∀A,B:Term,TypeStep(Γ,A,B)→TypeEq(Γ,A,B).
- WHNF terms do not step:
∀Γ:Context,∀t,u,A:Term,Step(Γ,t,u,A)→Whnf(t)→False.
- Determinism of one-step weak-head reduction:
∀Γ:Context,∀t,u,A,u′,A′:Term,Step(Γ,t,u,A)→Step(Γ,t,u′,A′)→u=u′.
- Typed weakening for well-formed types:
∀Γ,Δ:Context,∀A:Term,∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→TypeWf(Γ,A)→TypeWf(Δ,wk(ρ,A)).
- Typed weakening for well-typed terms:
∀Γ,Δ:Context,∀t,A:Term,∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→HasType(Γ,t,A)→HasType(Δ,wk(ρ,t),wk(ρ,A)).
- Typed weakening for judgmental type equality:
∀Γ,Δ:Context,∀A,B:Term,∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→TypeEq(Γ,A,B)→TypeEq(Δ,wk(ρ,A),wk(ρ,B)).
- Typed weakening for judgmental term equality:
∀Γ,Δ:Context,∀t,u,A:Term,∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→TermEq(Γ,t,u,A)→TermEq(Δ,wk(ρ,t),wk(ρ,u),wk(ρ,A)).
- Existence of the judgmental
EqRelSet instance (TermEq instance):
∃eqrel:EqRelSet,eqrel.TypeEqRel=TypeEq∧eqrel.TermEqRel=TermEq∧eqrel.NeEqRel=TermEq.View graph
Confirmed by the moderator at approval.