Definitional inversion for sorts and dependent function types

Establish the following inversion properties for Lean4Lean’s (untyped) definitional equality: (1) If Γ ⊢ U_ℓ ≡ U_{ℓ′}, then ℓ ≡ ℓ′; (2) If Γ ⊢ (∀ x : α. β) ≡ (∀ x : α′. β′), then Γ ⊢ α ≡ α′ and Γ, x : α ⊢ β ≡ β′; and (3) Show that Γ ⊢ U_ℓ is not definitionally equal to (∀ x : α. β).

Background

Definitional inversion properties characterize the structure of definitional equality for universe sorts and Π-types. These results are used to reason about the shapes of terms in equality proofs and to derive other metatheoretic properties, often in tandem with unique typing.

The paper presents these as conjectures here because the prior proof approach relied on a stratification of the typing judgment that was later found to be flawed with respect to substitution. Proving these inversion properties would restore key components of the metatheory needed for verification tasks.

References

Conjecture Definitional inversion If Γ ⊢ U_ℓ ≡ U_{ℓ′} then ℓ ≡ ℓ′. (2) If Γ ⊢ (∀ x : α. β) ≡ (∀ x : α′. β′) then Γ ⊢ α ≡ α′ and Γ, x : α ⊢ β ≡ β′. (3) Γ ⊢ U_ℓ ≮≡ (∀ x : α. β).

Lean4Lean: Towards a Verified Typechecker for Lean, in Lean  (2403.14064 - Carneiro, 2024) in Section 2.4 (Conjectured properties of the typing judgment)