Homotopy limits in Coq

Jeremy Avigad, Krzysztof Kapulkin, Peter LeFanu Lumsdaine

The paper "Homotopy Limits in Type Theory" by Jeremy Avigad, Krzysztof Kapulkin, and Peter LeFanu Lumsdaine represents a significant milestone in the effort to bridge abstract mathematics with computer-verified proofs. The authors provide a systematic way to handle "homotopy limits"—a fundamental but notoriously slippery concept in topology—within the rigorous environment of the Coq proof assistant.

The Challenge of Homotopy Limits

In classical category theory, "strict" limits, such as pullbacks or equalizers, are used to build new mathematical structures from existing ones. However, these strict limits are "brittle": if an object is replaced with a homotopically equivalent one (for instance, deforming a circle into an ellipse), the strict limit may fail to preserve the intended properties.

To address this, mathematicians utilize homotopy limits, which are flexible enough to respect such deformations. The challenge lies in their complexity; homotopy limits require tracking an infinite tower of "coherences"—proofs that various higher-dimensional paths and equalities are consistent with one another. Formalizing these in a computer environment often leads to "coherence hell," where the sheer volume of data becomes unmanageable.

Methodology and Formalization

The researchers worked within a specific flavor of Martin-Löf type theory, denoted $H'$, which incorporates function extensionality. To bypass the infinite coherence problem, they restricted their study to diagrams over graphs rather than general categories. This restriction allows limits to be defined using only 0-dimensional data (types) and 1-dimensional data (paths/functions), avoiding the need for higher-dimensional coherence data.

The development was entirely implemented in the Coq proof assistant, building upon the community-driven HoTT library. The authors employed "internal" reasoning to prove properties within the type theory, subsequently showing that these structures behave like classical mathematical objects in "external" categorical models.

Key Insights: The "Accidental" Homotopy Limit

Perhaps the most profound insight of the paper is that in Homotopy Type Theory (HoTT), the standard way to define a limit—using $\Sigma$-types and identity types—is the homotopy limit. In traditional set theory, significant extra work is required to make a limit "homotopical." In contrast, the logic of HoTT is "homotopy-aware" by default.

Furthermore, the authors proved that any categorical model of their type theory carries the structure of a fibration category (following Brown’s axioms). This provides a formal bridge between the world of computer science and classical homotopy theory. In this framework, a path (a proof of equality) is treated as data rather than just a fact, allowing the computer to "compute" with equalities to construct complex topological objects.

Results and Implementation

The project resulted in a robust Coq library for pullbacks, equalizers, and limits over arbitrary graphs, which is now available for the research community.

Key achievements include:

  • The Long Exact Sequence: Successful recovery of the "long exact sequence of a pointed map," a staple tool in algebraic topology.
  • The Two Pullbacks Lemma: A rigorous formalization of this classic lemma. The authors found that a "definitional" approach—where equations are handled automatically by the type-checker—was far more successful than manual construction, which often produced terms so large they crashed the system.

Limitations and Future Work

Despite these successes, the "coherence wall" remains. The authors acknowledge that they cannot yet represent diagrams over arbitrary categories due to the infinite coherence problem. Additionally, some formal proofs resulted in massive computational overhead. Future work will focus on integrating the Univalence Axiom and Higher Inductive Types (HITs), which may simplify constructions while introducing new formalization challenges.

Summary updated

BibTeX
@article{avigad2015homotopy,
  author = {Jeremy Avigad and Krzysztof Kapulkin and Peter LeFanu Lumsdaine},
  title = {{Homotopy limits in Coq}},
  journal = {Math. Struct. Comput. Sci.},
  year = {2015},
  doi = {10.1017/s0960129514000498},
}
Figure