Reference. Normalisation for First-Class Universe Levels
Various mechanisms are available for managing universe levels in proof assistants based on type theory. The Agda proof assistant implements a strong form of universe polymorphism in which universe levels are internalised as a type, making levels first-class objects and permitting higher-rank quantification via ordinary Π-types. We prove normalisation and decidability of equality and type-checking for a type theory with first-class universe levels inspired by Agda. We also show that level primitives can safely be erased in extracted programs. Our development is formalised in Agda itself and builds upon previous work which uses logical relations on extrinsically typed syntax.
Cite
Cited by (2)
Mechanizing Synthetic Tait Computability in Istari li_etal_2025
Categorical gluing is a powerful technique for proving meta-theorems of type theories such as canonicity and normalization. Synthetic Tait Computability (STC) provides an abstract treatment of the complex gluing models by internalizing the gluing category into a modal dependent type theory with a phase distinction. This work presents a mechanization of STC in the Istari proof assistant. Istari is a Martin-Löf-style extensional type theory with equality reflection, which avoids much of the explicit transport reasoning typically found in intensional proof assistants. This work develops a reusable library for synthetic phase distinction, including modalities, extension types, and strict glue types, and applies it to two case studies: (1) a canonicity model for dependent type theory with dependent products and booleans with large elimination, and (2) a Kripke canonicity model for the cost-aware logical framework. Our results demonstrate that the core STC constructions can be formalized essentially verbatim in Istari, preserving the elegance of the on-paper arguments while ensuring machine-checked correctness.
Divide and Check: Logical Relations, No Algorithms Attached poiret_etal_2026
The correctness of type-checking implementations for proof assistants based on dependent type theory relies on metatheoretical properties that ensure the decidability of typing, some of which require substantial logical strength. Recent mechanizations of such algorithms have highlighted the importance of separating the algorithmic components of the proof - often intricate but requiring relatively low logical strength - from the logical components, which depend on stronger metatheoretical properties, such as normalization or the injectivity of type constructors. In this work, we revisit the logical relations technique and show how it can be used to derive these metatheoretical properties in a direct and uniform way for a core dependent type theory featuring Π-types, N, ⊥ and a universe U. Our presentation yields a compact and conceptually simplified argument that isolates the logically strong reasoning from the algorithmic core. We argue that this approach scales smoothly to richer type theories, and demonstrate this by extending our construction to Exceptional Type Theory (ExcTT), obtaining the first mechanized canonicity proof for this theory.
Cites 45 works (4 here)
With notes (4)
Bounded First-Class Universe Levels in Dependent Type Theory chan-2025-bounded
In dependent type theory, being able to refer to a type universe as a term itself increases its expressive power, but requires mechanisms in place to prevent Girard’s paradox from introducing logical inconsistency in the presence of type-in-type. The simplest mechanism is a hierarchy of universes indexed by a sequence of levels, typically the naturals. To improve reusability of definitions, they can be made level polymorphic, abstracting over level variables and adding a notion of level expressions. For even more expressive power, level expressions can be made first-class as terms themselves, and level polymorphism is subsumed by dependent functions quantifying over levels. Furthermore, bounded level polymorphism provides more expressivity by being able to explicitly state constraints on level variables. While semantics for first-class levels with constraints are known, syntax and typing rules have not been explicitly written down. Yet pinning down a well-behaved syntax is not trivial; there exist prior type theories with bounded level polymorphism that fail to satisfy subject reduction. In this work, we design an explicit syntax for a type theory with bounded first-class levels, parametrized over arbitrary well-founded sets of levels. We prove the metatheoretic properties of subject reduction, type safety, consistency, and canonicity, entirely mechanized from syntax to semantics in Lean.
An Order-Theoretic Analysis of Universe Polymorphism houfavonia-2023-an
We present a novel formulation of universe polymorphism in dependent type theory in terms of monads on the category of strict partial orders, and a novel algebraic structure, displacement algebras, on top of which one can implement a generalized form of McBride’s “crude but effective stratification” scheme for lightweight universe polymorphism. We give some examples of exotic but consistent universe hierarchies, and prove that every universe hierarchy in our sense can be embedded in a displacement algebra and hence implemented via our generalization of McBride’s scheme. Many of our technical results are mechanized in Agda, and we have an OCaml library for universe levels based on displacement algebras, for use in proof assistant implementations.
Gluing for Type Theory GluingForTypeTheory
The relationship between categorical gluing and proofs using the logical relation technique is folklore. In this paper we work out this relationship for Martin-Löf type theory and show that parametricity and canonicity arise as special cases of gluing. The input of gluing is two models of type theory and a pseudomorphism between them and the output is a displayed model over the first model. A pseudomorphism preserves the categorical structure strictly, the empty context and context extension up to isomorphism, and there are no conditions on preservation of type formers. We look at three examples of pseudomorphisms: the identity on the syntax, the interpretation into the set model and the global section functor. Gluing along these result in syntactic parametricity, semantic parametricity and canonicity, respectively.
External (41)
- An Agda Formalisation of a Graded Modal Type Theory with First-Class Universe Levels and Erasure (2025)
- McTT: A Verified Kernel for a Proof Assistant (2025)
- What Does It Take to Certify a Conversion Checker? (2025)
- Principles of Dependent Type Theory (book draft) (2025)
- The Agda standard library (2025)
- Agda User Manual Release 2.8.0 (2025)
- The Lean Language Reference (2025)
- The Rocq Prover Reference Manual Release 9.0.0 (2025)
- Martin-Löf à la Coq (2024)
- Correct and Complete Type Checking and Certified Erasure for Coq , in Coq (2024)
- Type Theory with Explicit Universe Polymorphism (revised and extended version) (2024)
- A Graded Modal Dependent Type Theory with a Universe and Erasure, Formalized (2023)
- Type Theory with Explicit Universe Polymorphism (2023)
- Agda User Manual Release 2.6.4 (2023)
- Generalized Universe Hierarchies and First-Class Universe Levels (2021)
- Agda User Manual Release 2.6.2 (2021)
- Agda User Manual Release 2.6.1 (2020)
- Generic level polymorphic n-ary functions (2019)
- Canonicity and normalization for dependent type theory (2019)
- Algebraic Type Theory and Universe Hierarchies (2019)
- Decidability of conversion for type theory in type theory (2017)
- Normalisation by Evaluation for Type Theory, in Type Theory (2017)
- Type theory in type theory using quotient inductive types (2016)
- Universe Polymorphism in Coq (2014)
- New Equations for Neutral Terms: A Sound and Complete Decision Procedure, Formalized (2013)
- Presheaf model of type theory (note) (2013)
- Sheaf model of type theory (note) (2012)
- Why dependent types matter (2006)
- A New Extraction for Coq (2003)
- Explicit Universes for the Calculus of Constructions (2002)
- A general formulation of simultaneous inductive-recursive definitions in type theory (2000)
- Irrelevance, Polymorphism, and Erasure in Type Theory (2000)
- Internal type theory (1996)
- Categorical reconstruction of a reduction free normalization proof (1995)
- Type checking with universes (1991)
- The independence of Peano's fourth axiom from Martin-Löf's type theory without universes (1988)
- Extending the Calculus of Constructions with Type:Type (unpublished draft) (1988)
- An Analysis of Girard's Paradox (1986)
- Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem (1972)
- Interprétation fonctionnelle et élimination des coupures de l'arithmétique d'ordre supérieur (Thèse d'état) (1972)
- Intensional interpretations of functionals of finite type I (1967)