[Paper Review] Formalizing Category Theory and Presheaf Models of Type Theory in Nuprl
This paper presents a formalization of category theory and presheaf models of type theory in Nuprl, establishing foundational components for a constructive model of cubical type theory. It introduces a category-theoretic framework—specifically presheaves, functors, and natural transformations—within Nuprl’s type theory, enabling the construction of models for dependent types and paving the way for verifying univalence and computational path types.
This article is the first in a series of articles that explain the formalization of a constructive model of cubical type theory in Nuprl. In this document we discuss only the parts of the formalization that do not depend on the choice of base category. So, it spells out how we make the first steps of our formalization of cubical type theory.
Motivation & Objective
- To formalize the foundational category theory required for constructing models of type theory in Nuprl.
- To develop a general framework for presheaf models of Martin-Löf type theory independent of the base category.
- To establish the correspondence between category-theoretic concepts (e.g., presheaves) and Nuprl’s type-theoretic language.
- To lay the groundwork for constructing a constructive model of cubical type theory with univalence and computational path types.
- To enable formal verification of type-theoretic constructions, including Π and Σ types, via Nuprl’s proof assistant.
Proposed method
- Formalizing categories, functors, natural transformations, and opposite categories within Nuprl’s type theory using a cumulative hierarchy of universes.
- Defining presheaves as families of types indexed by objects of a category, with restriction maps satisfying functoriality conditions.
- Constructing Π and Σ types in the presheaf model by defining families of functions and pairs that respect restriction maps.
- Encoding the λ-abstraction and application operations as type families satisfying compatibility conditions under restriction.
- Proving that the resulting type formers satisfy the standard 19 rules of Martin-Löf type theory, including equality and substitution rules.
- Generalizing the formalization to work over an arbitrary base category, with later work specializing to the cube category for cubical type theory.
Experimental results
Research questions
- RQ1How can category-theoretic concepts such as presheaves and functors be formally encoded within Nuprl’s constructive type theory?
- RQ2What is the precise correspondence between categorical constructions (e.g., natural transformations) and type-theoretic operations in Nuprl?
- RQ3How can Π and Σ types be defined in a presheaf model such that they satisfy the standard type-theoretic rules and equations?
- RQ4What conditions must be met for a type to support a composition operation, and how does this relate to fibrancy and univalence?
- RQ5How can the formalization be structured to support later specialization to the cube category and the construction of a full model of cubical type theory?
Key findings
- The formalization successfully defines Π and Σ types in a presheaf model over an arbitrary base category, with all standard type-theoretic rules verified.
- The λ-abstraction and application operations are encoded as type families that respect restriction maps, ensuring compatibility with the presheaf structure.
- The model satisfies all 19 core rules of Martin-Löf type theory, including substitution, equality, and computation rules, with proofs fully formalized in Nuprl.
- The framework is general enough to support later specialization to the cube category, enabling the construction of a constructive model of cubical type theory.
- The correspondence between categorical concepts (e.g., Yoneda lemma) and type-theoretic constructions is made explicit and computationally meaningful in Nuprl.
- The formalization provides a 'Rosetta stone' linking category-theoretic language to Nuprl’s type-theoretic language, enhancing interoperability between the two paradigms.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.