The HoTT library: a formalization of homotopy type theory in Coq

We report on the development of the HoTT library, a formalization of homotopy type theory in the Coq proof assistant. It formalizes most of basic homotopy type theory, including univalence, higher inductive types, and significant amounts of synthetic homotopy theory, as well as category theory and modalities. The library has been used as a basis for several independent developments. We discuss the decisions that led to the design of the library, and we comment on the interaction of homotopy type theory with recently introduced features of Coq, such as universe polymorphism and private inductive types.

[1]  Jeremy Avigad,et al.  The Lean Theorem Prover , 2015 .

[2]  Freek Wiedijk,et al.  Modeling set theory in homotopy type theory , 2014 .

[3]  Nicolas Tabareau,et al.  Universe Polymorphism in Coq , 2014, ITP.

[4]  Enrico Tassi,et al.  A Small Scale Reflection Extension for the Coq system , 2008 .

[5]  Michael Shulman,et al.  Univalence for inverse diagrams and homotopy canonicity , 2012, Mathematical Structures in Computer Science.

[6]  Thierry Coquand,et al.  Cubical Type Theory: A Constructive Interpretation of the Univalence Axiom , 2015, TYPES.

[7]  Michael Shulman,et al.  Idempotents in intensional type theory , 2015, Log. Methods Comput. Sci..

[8]  Bas Spitters,et al.  Type classes for mathematics in type theory† , 2011, Mathematical Structures in Computer Science.

[9]  Matthieu Sozeau A New Look at Generalized Rewriting in Type Theory , 2009, J. Formaliz. Reason..

[10]  Adam Chlipala,et al.  Experience Implementing a Performant Category-Theory Library in Coq , 2014, ITP.

[11]  Camilo Rueda,et al.  Theoretical Aspects of Computing - ICTAC 2015 , 2015, Lecture Notes in Computer Science.

[12]  Matthieu Sozeau,et al.  A Gentle Introduction to Type Classes and Relations in Coq , 2012 .

[13]  Michael Shulman,et al.  Univalent categories and the Rezk completion , 2013, Mathematical Structures in Computer Science.

[14]  Dominique Devriese,et al.  Pattern matching without K , 2014, ICFP.

[15]  Alvin Cheung,et al.  HoTTSQL: proving query rewrites with univalent SQL semantics , 2016, PLDI.

[16]  Bart Jacobs,et al.  First Steps Towards Cumulative Inductive Types in CIC , 2015, ICTAC.

[17]  Daniel R. Licata,et al.  Calculating the Fundamental Group of the Circle in Homotopy Type Theory , 2013, 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science.

[18]  C. Flori,et al.  Homotopy Type Theory : Univalent Foundations of Mathematics , 2014 .

[19]  Thorsten Altenkirch,et al.  Partiality, Revisited: The Partiality Monad as a Quotient Inductive-Inductive Type , 2017, FoSSaCS.

[20]  Jeremy Avigad,et al.  The Lean Theorem Prover (System Description) , 2015, CADE.

[21]  Matthieu Sozeau Equations: A Dependent Pattern-Matching Compiler , 2010, ITP.

[22]  Bas Spitters,et al.  Synthetic topology in Homotopy Type Theory for probabilistic programming , 2019, ArXiv.

[23]  Bart Jacobs,et al.  Category theory in Coq 8.5: Extended version , 2016 .

[24]  Bas Spitters,et al.  Type classes for efficient exact real arithmetic in Coq , 2011, Log. Methods Comput. Sci..

[25]  Matthieu Sozeau,et al.  Equations for Hereditary Substitution in Leivant's Predicative System F: A Case Study , 2015, ArXiv.

[26]  S. Awodey,et al.  Homotopy theoretic models of identity types , 2007, Mathematical Proceedings of the Cambridge Philosophical Society.

[27]  Anton Setzer,et al.  A finite axiomatisation of inductive-inductive definitions , 2012 .

[28]  Michael Shulman,et al.  Quantum Gauge Field Theory in Cohesive Homotopy Type Theory , 2014, QPL.

[29]  Gaëtan Gilbert Formalising real numbers in homotopy type theory , 2017, CPP.

[30]  Vladimir Voevodsky,et al.  An experimental library of formalized Mathematics based on the univalent foundations , 2015, Mathematical Structures in Computer Science.

[31]  Peter LeFanu Lumsdaine,et al.  The simplicial model of Univalent Foundations (after Voevodsky) , 2012, Journal of the European Mathematical Society.

[32]  Vladimir Voevodsky,et al.  Experimental library of univalent formalization of mathematics , 2013, 1401.0053.