Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Typed Weak-Head Reduction Properties, Typed Weakening, and Declarative EqRelSet Instance (Lemmas 2.2-2.7 & Section 3.1)

Proved
Abel2018.lemmas_2_2_to_2_7_typed_reduction_and_weakening

by 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 Abel2018
Source
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:

  1. Term reduction implies judgmental term equality:
∀Γ:Context,  ∀t,u,A:Term,Step(Γ,t,u,A)→TermEq(Γ,t,u,A).\forall \Gamma : \mathsf{Context},\; \forall t, u, A : \mathsf{Term},\quad \mathsf{Step}(\Gamma, t, u, A) \to \mathsf{TermEq}(\Gamma, t, u, A).∀Γ:Context,∀t,u,A:Term,Step(Γ,t,u,A)→TermEq(Γ,t,u,A).
  1. Type reduction implies judgmental type equality:
∀Γ:Context,  ∀A,B:Term,TypeStep(Γ,A,B)→TypeEq(Γ,A,B).\forall \Gamma : \mathsf{Context},\; \forall A, B : \mathsf{Term},\quad \mathsf{TypeStep}(\Gamma, A, B) \to \mathsf{TypeEq}(\Gamma, A, B).∀Γ:Context,∀A,B:Term,TypeStep(Γ,A,B)→TypeEq(Γ,A,B).
  1. WHNF terms do not step:
∀Γ:Context,  ∀t,u,A:Term,Step(Γ,t,u,A)→Whnf(t)→False.\forall \Gamma : \mathsf{Context},\; \forall t, u, A : \mathsf{Term},\quad \mathsf{Step}(\Gamma, t, u, A) \to \mathsf{Whnf}(t) \to \mathsf{False}.∀Γ:Context,∀t,u,A:Term,Step(Γ,t,u,A)→Whnf(t)→False.
  1. Determinism of one-step weak-head reduction:
∀Γ:Context,  ∀t,u,A,u′,A′:Term,Step(Γ,t,u,A)→Step(Γ,t,u′,A′)→u=u′.\forall \Gamma : \mathsf{Context},\; \forall t, u, A, u', A' : \mathsf{Term},\quad \mathsf{Step}(\Gamma, t, u, A) \to \mathsf{Step}(\Gamma, t, u', A') \to u = u'.∀Γ:Context,∀t,u,A,u′,A′:Term,Step(Γ,t,u,A)→Step(Γ,t,u′,A′)→u=u′.
  1. Typed weakening for well-formed types:
∀Γ,Δ:Context,  ∀A:Term,  ∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→TypeWf(Γ,A)→TypeWf(Δ,wk(ρ,A)).\forall \Gamma, \Delta : \mathsf{Context},\; \forall A : \mathsf{Term},\; \forall \rho : \mathsf{Wk},\quad \mathsf{WkCtx}(\rho, \Delta, \Gamma) \to \mathsf{CtxWf}(\Delta) \to \mathsf{TypeWf}(\Gamma, A) \to \mathsf{TypeWf}(\Delta, \mathsf{wk}(\rho, A)).∀Γ,Δ:Context,∀A:Term,∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→TypeWf(Γ,A)→TypeWf(Δ,wk(ρ,A)).
  1. Typed weakening for well-typed terms:
∀Γ,Δ:Context,  ∀t,A:Term,  ∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→HasType(Γ,t,A)→HasType(Δ,wk(ρ,t),wk(ρ,A)).\forall \Gamma, \Delta : \mathsf{Context},\; \forall t, A : \mathsf{Term},\; \forall \rho : \mathsf{Wk},\quad \mathsf{WkCtx}(\rho, \Delta, \Gamma) \to \mathsf{CtxWf}(\Delta) \to \mathsf{HasType}(\Gamma, t, A) \to \mathsf{HasType}(\Delta, \mathsf{wk}(\rho, t), \mathsf{wk}(\rho, A)).∀Γ,Δ:Context,∀t,A:Term,∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→HasType(Γ,t,A)→HasType(Δ,wk(ρ,t),wk(ρ,A)).
  1. Typed weakening for judgmental type equality:
∀Γ,Δ:Context,  ∀A,B:Term,  ∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→TypeEq(Γ,A,B)→TypeEq(Δ,wk(ρ,A),wk(ρ,B)).\forall \Gamma, \Delta : \mathsf{Context},\; \forall A, B : \mathsf{Term},\; \forall \rho : \mathsf{Wk},\quad \mathsf{WkCtx}(\rho, \Delta, \Gamma) \to \mathsf{CtxWf}(\Delta) \to \mathsf{TypeEq}(\Gamma, A, B) \to \mathsf{TypeEq}(\Delta, \mathsf{wk}(\rho, A), \mathsf{wk}(\rho, B)).∀Γ,Δ:Context,∀A,B:Term,∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→TypeEq(Γ,A,B)→TypeEq(Δ,wk(ρ,A),wk(ρ,B)).
  1. 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)).\forall \Gamma, \Delta : \mathsf{Context},\; \forall t, u, A : \mathsf{Term},\; \forall \rho : \mathsf{Wk},\quad \mathsf{WkCtx}(\rho, \Delta, \Gamma) \to \mathsf{CtxWf}(\Delta) \to \mathsf{TermEq}(\Gamma, t, u, A) \to \mathsf{TermEq}(\Delta, \mathsf{wk}(\rho, t), \mathsf{wk}(\rho, u), \mathsf{wk}(\rho, A)).∀Γ,Δ:Context,∀t,u,A:Term,∀ρ:Wk,WkCtx(ρ,Δ,Γ)→CtxWf(Δ)→TermEq(Γ,t,u,A)→TermEq(Δ,wk(ρ,t),wk(ρ,u),wk(ρ,A)).
  1. Existence of the judgmental EqRelSet instance (TermEq instance):
∃eqrel:EqRelSet,eqrel.TypeEqRel=TypeEq  ∧  eqrel.TermEqRel=TermEq  ∧  eqrel.NeEqRel=TermEq.\exists \mathit{eqrel} : \mathsf{EqRelSet},\quad \mathit{eqrel}.\mathsf{TypeEqRel} = \mathsf{TypeEq} \;\land\; \mathit{eqrel}.\mathsf{TermEqRel} = \mathsf{TermEq} \;\land\; \mathit{eqrel}.\mathsf{NeEqRel} = \mathsf{TermEq}.∃eqrel:EqRelSet,eqrel.TypeEqRel=TypeEq∧eqrel.TermEqRel=TermEq∧eqrel.NeEqRel=TermEq.
Human review
  • Endorsed by Shuze Chen · Nov 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by kmehltretter82 · Nov 7, 2026

    Confirmed by the mission captain (proposal self-audit).

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