Reference. Category Theory in Coq 8.5

We report on our experience implementing category theory in Coq 8.5. Our work formalizes most of basic category theory, including concepts not covered by existing formalizations, in a library that is fit to be used as a general-purpose category-theoretical foundation.

Our development particularly takes advantage of two features new to Coq 8.5: primitive projections for records and universe polymorphism. Primitive projections allow for well-behaved dualities while universe polymorphism provides a relative notion of largeness and smallness. The latter is one of the main contributions of this paper. It pushes the limits of the new universe polymorphism and constraint inference algorithm of Coq 8.5.

In this paper we present in detail smallness and largeness in categories and the foundation they are built on top of. We furthermore explain how we have used the universe polymorphism of Coq 8.5 to represent smallness and largeness arguments by simply ignoring them and entrusting them to the universe inference algorithm of Coq 8.5. We also briefly discuss our experience throughout this implementation, discuss concepts formalized in this development and give a comparison with a few other developments of similar extent.

Cite

Cite as @timany-2016-category (helia, typst) · \cite{timany-2016-category} (LaTeX)
BibTeX
bibtex · 14 lines
@inproceedings{timany-2016-category,
  doi = {10.4230/LIPICS.FSCD.2016.30},
  url = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FSCD.2016.30},
  author = {Timany, Amin and Jacobs, Bart},
  keywords = {Category Theory, Coq 8.5, Universe Polymorphism, Homotopy Type Theory},
  language = {en},
  title = {Category Theory in Coq 8.5},
  volume = {52},
  pages = {30:1-30:18},
  publisher = {Schloss Dagstuhl – Leibniz-Zentrum für Informatik},
  year = {2016},
  copyright = {Creative Commons Attribution 3.0 Unported license},
  booktitle = {1st International Conference on Formal Structures for Computation and Deduction (FSCD 2016)}
}
hayagriva YAML (typst)
yaml · 16 lines
timany-2016-category:
  type: article
  title: Category Theory in Coq 8.5
  author:
  - Timany, Amin
  - Jacobs, Bart
  date: 2016
  page-range: 30:1-30:18
  url: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FSCD.2016.30
  serial-number:
    doi: 10.4230/LIPICS.FSCD.2016.30
  parent:
    type: proceedings
    title: 1st International Conference on Formal Structures for Computation and Deduction (FSCD 2016)
    publisher: Schloss Dagstuhl – Leibniz-Zentrum für Informatik
    volume: 52
Cited by (3)

Solving Guarded Domain Equations in Presheaves over Ordinals and Mechanizing It stepanenko-2025-solving

Constructing solutions to recursive domain equations is a well-known, important problem in the study of programs and programming languages. Mathematically speaking, the problem is finding a fixed point (up to isomorphism) of a suitable functor over a suitable category. A particularly useful instance, inspired by the step-indexing technique, is where the functor is over (a subcategory of) the category of presheaves over the ordinal ω and the functors are locally-contractive, also known as guarded functors. This corresponds to step-indexing over natural numbers. However, for certain problems, e.g., when dealing with infinite non-determinism, one needs to employ trans-finite step-indexing, i.e., consider presheaf categories over higher ordinals. Prior work on trans-finite step-indexing either only considers a very narrow class of functors over a particularly restricted subcategory of presheaves over higher ordinals, or treats the problem very generally working with sheaves over an arbitrary complete Heyting algebra with a well-founded basis. In this paper we present a solution to the guarded domain equations problem over all guarded functors over the category of presheaves over ordinal numbers, as well as its mechanization in the Rocq Prover. As the categories of sheaves and presheaves over ordinals are equivalent, our main contribution is simplifying prior work from the setting of the category of sheaves to the setting of the category of presheaves and mechanizing it - presheaves are more amenable to mechanization in a proof assistant.
DOI

Formalizing category theory in Agda hu-2021-formalizing

PDF · DOI · arXiv · pldb

Cumulative Inductive Types In Coq timany-2018-cumulative

In order to avoid well-known paradoxes associated with self-referential definitions, higher-order dependent type theories stratify the theory using a countably infinite hierarchy of universes (also known as sorts), Type0:Type1:…. Such type systems are called cumulative if for any type A we have that 𝐴:Type𝑖 implies 𝐴:Type𝑖+1. The Predicative Calculus of Inductive Constructions (pCIC) which forms the basis of the Coq proof assistant, is one such system. In this paper we present the Predicative Calculus of Cumulative Inductive Constructions (pCuIC) which extends the cumulativity relation to inductive types. We discuss cumulative inductive types as present in Coq 8.7 and their application to formalization and definitional translations.
DOI
Cites 21 works (4 here)
With notes (4)

Univalent categories and the Rezk completion ahrens_etal_2015

We develop category theory within Univalent Foundations, which is a foundational system for mathematics based on a homotopical interpretation of dependent type theory. In this system, we propose a definition of ‘category’ for which equality and equivalence of categories agree. Such categories satisfy a version of the univalence axiom, saying that the type of isomorphisms between any two objects is equivalent to the identity type between these objects; we call them ‘saturated’ or ‘univalent’ categories. Moreover, we show that any category is weakly equivalent to a univalent one in a universal way. In homotopical and higher-categorical semantics, this construction corresponds to a truncated version of the Rezk completion for Segal spaces, and also to the stack completion of a prestack.
DOI · arXiv

Homotopy Type Theory: Univalent Foundations of Mathematics hottbook

Web · arXiv

BI-hyperdoctrines, higher-order separation logic, and abstraction biering-2007-bi

We present a precise correspondence between separation logic and a simple notion of predicate BI, extending the earlier correspondence given between part of separation logic and propositional BI. Moreover, we introduce the notion of a BI hyperdoctrine, show that it soundly models classical and intuitionistic first- and higher-order predicate BI, and use it to show that we may easily extend separation logic to higher-order . We also demonstrate that this extension is important for program proving, since it provides sound reasoning principles for data abstraction in the presence of aliasing.
PDF · DOI · pldb

Categorical Logic and Type Theory jacobs-1999

This book is an attempt to give a systematic presentation of both logic and type theory from a categorical perspective, using the unifying concept of fibred category. Its intended audience consists of logicians, type theorists, category theorists and (theoretical) computer scientists.

External (17)
timany-2016-category reference entries/refs/timany-2016-category/timany-2016-category.hel