Reference. Stratified Type Theory

A hierarchy of type universes is a rudimentary ingredient in the type theories of many proof assistants to prevent the logical inconsistency resulting from combining dependent functions and the type-in-type axiom. In this work, we argue that a universe hierarchy is not the only option for universes in type theory. Taking inspiration from Leivant’s Stratified System F, we introduce Stratified Type Theory (), where rather than stratifying universes by levels, we stratify typing judgements and restrict the domain of dependent functions to strictly lower levels. Even with type-in-type, this restriction suffices to enforce consistency. In , we consider a number of extensions beyond just stratified dependent functions. First, the subsystem employs McBride’s crude-but-effective stratification (also known as displacement) as a simple form of level polymorphism where global definitions with concrete levels can be displaced uniformly to any higher level. Second, to recover some expressivity lost due to the restriction on dependent function domains, the full includes a separate nondependent function type with a floating domain whose level matches that of the overall function type. Finally, we have implemented a prototype type checker for extended with datatypes and inference for level and displacement annotations, along with a small core library. We have proven to be consistent and to be type safe, but consistency of the full remains an open problem, largely due to the interaction between floating functions and cumulativity of judgements. Nevertheless, we believe to be consistent, and as evidence have verified the ill-typedness of some well-known type-theoretic paradoxes using our implementation.

Cite

Cite as @chan-2025-stratified (helia, typst) · \cite{chan-2025-stratified} (LaTeX)
BibTeX
bibtex · 1 line
@inbook{chan-2025-stratified, title={Stratified Type Theory}, ISBN={9783031911187}, ISSN={1611-3349}, url={http://dx.doi.org/10.1007/978-3-031-91118-7_10}, DOI={10.1007/978-3-031-91118-7_10}, booktitle={Programming Languages and Systems}, publisher={Springer Nature Switzerland}, author={Chan, Jonathan and Weirich, Stephanie}, year={2025}, pages={236–263} }
hayagriva YAML (typst)
yaml · 17 lines
chan-2025-stratified:
  type: chapter
  title: Stratified Type Theory
  author:
  - Chan, Jonathan
  - Weirich, Stephanie
  date: 2025
  page-range: 236-263
  url: http://dx.doi.org/10.1007/978-3-031-91118-7_10
  serial-number:
    doi: 10.1007/978-3-031-91118-7_10
    isbn: '9783031911187'
    issn: 1611-3349
  parent:
    type: book
    title: Programming Languages and Systems
    publisher: Springer Nature Switzerland
Cited by (2)

Internalizing Extensions in Lattices of Type Theories chan-2025-internalizing

Many proof assistants allow the use of features and axioms that increase their expressive power. However, these extensions must be used with care, as some combinations are known to lead to logical inconsistencies. Therefore, proof assistants include mechanisms that track which extensions are used in a proof development or module, ensuring that incompatible extensions are not used simultaneously. Unfortunately, existing extension tracking mechanisms are external to the type system. This means that we cannot specify precisely which extensions a definition depends on. Having the ability to write more precise specifications means we are not picking an overapproximation of the extensions needed, which prevents reusing definitions in the presence of incompatible extensions. Furthermore, we cannot refer to definitions that use incompatible extensions even if they are never used in inconsistent ways. The reasoning principles of one extension therefore cannot be used as a metatheory to reason about the properties of an incompatible extension. In this report, I explore the use of the Dependent Calculus of Indistinguishability (DCOI) by Liu et al. for extension tracking. DCOI is a dependent type system with dependency tracking, where terms and variables are assigned dependency levels alongside their types. These dependency levels form a lattice that describes which levels are permitted to access what. To instead track extensions, each set of extensions would correspond to a dependency level, and the lattice would describe how extensions are permitted to interact.
arXiv

Type Universes as Kripke Worlds koronkevich-2025-type

What are mutable references; what do they mean? The answers to these questions have spawned lots of important theoretical work and form the foundation of many impactful tools. However, existing semantics collapse a key distinction: which allocations does a reference depend on? In this paper, we deconstruct the space of mutable higher-order references. We formalize a novel distinction–splitting the design space of references not only into higher-order vs (full-)ground references, but also dependency of an allocation on past vs future allocations. This distinction is fundamental to a thorny issue that arises in constructing semantic models of mutable references–the type-world circularity. The issue disappears for what we call predicative references, those that only quantify over past, not future, allocations, and for non-higher-order impredicative references. We design a syntax and semantics for each point in our newly described space. The syntax relies on a type universe hierarchy, à la dependent type theory, to kind the types of allocated terms, and stratify allocations. Each type universe corresponds to a semantic Kripke world, giving a lightweight syntactic mechanism to design and restrict heap shapes. The semantics bear a resemblance to work on regions, and suggest some connection between universe systems and regions, which we describe in some detail.
PDF · DOI · pldb
Cites 41 works (2 here)
With notes (2)

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.
PDF · DOI · pldb

Homotopy Type Theory: Univalent Foundations of Mathematics hottbook

Web · arXiv
External (39)
chan-2025-stratified reference entries/refs/chan-2025-stratified/chan-2025-stratified.hel