[Paper Review] Experimental library of univalent formalization of mathematics
This paper presents an experimental library of formalized mathematics using univalent foundations in the Coq proof assistant, based on homotopy type theory where types represent homotopy types rather than sets. By restricting Coq's type system and avoiding Prop and inductive types beyond core constructs, the library enables formalization of mathematics at multiple levels—elements, sets, groupoids, and higher structures—demonstrating that univalent foundations support a unified, consistent framework for formalizing all of mathematics via homotopy-theoretic semantics.
This paper contains a discussion of a library of formalized mathematics for the proof assistant Coq which the author worked on in 2011-13.
Motivation & Objective
- To develop a formal library of mathematics using univalent foundations to explore the feasibility of formalizing all mathematical structures within a homotopy type theory framework.
- To minimize reliance on potentially inconsistent features in Coq by restricting the type system to a safe, hand-managed subset of universes and inductive types.
- To demonstrate that mathematical reasoning at multiple levels—element, set, groupoid, and higher—can be consistently formalized using univalent type theory.
- To provide a practical foundation for formalizing general mathematics using constructive type theory with univalent semantics, inspired by Makkai's categorical logic and Grothendieck's homotopy correspondence.
- To enable researchers to experiment with formalization in a minimal, consistent, and extensible Coq-based system that avoids the pitfalls of unchecked proof assistant extensions.
Proposed method
- The library is implemented in a restricted subset of Coq’s type theory, excluding the Prop universe and disabling Coq’s universe consistency checker via a custom patch.
- Only basic inductive types—identity types, dependent sums, unit, empty type, booleans, and natural numbers—are used; no further inductive definitions are introduced beyond these foundational elements.
- The system uses a patched version of Coq 8.4pl3 to prevent universe inconsistency, with manual tracking of universe levels to maintain safety.
- Library structure is managed via Coq’s Require and Export mechanisms, with explicit -R flags to control LoadPath and ensure correct module resolution.
- The library is organized hierarchically: files are grouped under directories like Foundations/Generalities, and each .vo file is assigned a canonical library name based on its path and -R configuration.
- The approach relies on careful manual management of universe levels and module dependencies, avoiding automated universe polymorphism or resizing rules for experimental stability.
Experimental results
Research questions
- RQ1Can univalent foundations based on homotopy type theory support the formalization of general mathematics beyond homotopy theory?
- RQ2Is it feasible to build a consistent, usable mathematical library in Coq using only a minimal, restricted subset of its type system?
- RQ3How can one safely manage universe levels and module dependencies in a formal library without relying on advanced or potentially inconsistent Coq features?
- RQ4To what extent can mathematical structures at different levels—element, set, groupoid, and higher—be uniformly formalized using univalent type theory?
- RQ5Can a formal library be constructed that avoids the singleton elimination rule in Prop while remaining compatible with standard mathematical reasoning?
Key findings
- The library successfully formalizes foundational mathematical concepts using only core inductive types and a restricted type system, with all files compiling under a patched version of Coq 8.4pl3.
- The use of a patched Coq that disables universe consistency checking allows experimental development, though this introduces potential inconsistency unless universe levels are managed manually.
- The library avoids the Prop universe and its singleton elimination rule, which is inconsistent with univalent models, by modifying Coq’s type-level computation via a patch.
- The file uuu.v compiles to produce a library named "uuu" in the "Foundations.Generalities" namespace, and the compilation output "paths 0 0:UUU" confirms the correct type system configuration.
- The library’s module system relies on precise -R flags and LoadPath configuration, with Require Export ensuring transitive loading of dependencies across hierarchical directories.
- The approach demonstrates that formalization of mathematics at multiple levels—element, set, groupoid, and higher—can be achieved consistently using univalent semantics, even without full universe polymorphism or higher inductive types.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.