Abstract
We discuss the homotopy type theory library in the Lean proof assistant. The library is especially geared toward synthetic homotopy theory. Of particular interest is the use of just a few primitive notions of higher inductive types, namely quotients and truncations, and the use of cubical methods.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Available as part of: https://github.com/leanprover/lean2.
- 2.
- 3.
- 4.
- 5.
It has 7 700 lines of code and 1 400 lines of comments. It is available at https://github.com/cmu-phil/Spectral.
- 6.
Although we use syntax inspired by the Lean syntax for inductive types, this is not valid syntax in Lean.
- 7.
For the n-truncation we treat the fact that the new type is n-truncated as a “path-constructor.” In [21, Sect. 7.3] it is explained that the fact that a type is n-truncated can be reduced to (recursive) path constructors.
References
Ahrens, B., Kapulkin, K., Shulman, M.: Univalent categories and the Rezk completion. Mathe. Struct. Comput. Sci. 25(5), 1010–1039 (2015)
Angiuli, C., Harper, R., Wilson, T.: Computational higher-dimensional type theory. In: Proceedings of the 44th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2017. ACM (2017)
Awodey, S., Warren, M.A.: Homotopy theoretic models of identity types. In: Mathematical Proceedings of the Cambridge Philosophical Society, vol. 146, no. 1, pp. 45–55 (2009)
Bauer, A., Gross, J., LeFanu Lumsdaine, P., Shulman, M., Sozeau, M., Spitters, B.: The HoTT library: a formalization of homotopy type theory in Coq. ArXiv e-prints, October 2016
Brunerie, G., Hou (Favonia), K.B., Cavallo, E., Finster, E., Cockx, J., Sattler, C., Jeris, C., Shulman, M., et al.: Homotopy Type Theory in Agda (2017). Code library. https://github.com/HoTT/HoTT-Agda
Buchholtz, U., Rijke, E.: The cayley-dickson construction in homotopy type theory. ArXiv e-prints, October 2016
Cohen, C., Coquand, T., Huber, S., Mörtberg, A.: Cubical type theory. Code library. https://github.com/mortberg/cubicaltt
Cohen, C., Coquand, T., Huber, S., Mörtberg, A.: Cubical type theory: a constructive interpretation of the univalence axiom. In: 21st International Conference on Types for Proofs and Programs (TYPES 2015). LIPIcs. Leibniz International Proceedings in Informatics, Schloss Dagstuhl. Leibniz-Zent. Inform., Wadern (2016, to appear)
van Doorn, F.: Constructing the propositional truncation using non-recursive hits. In: Proceedings of the 5th ACM SIGPLAN Conference on Certified Programs and Proofs, pp. 122–129. ACM (2016)
Dybjer, P.: Inductive families. Formal Aspects Comput. 6(4), 440–465 (1994)
Goguen, H., McBride, C., McKinna, J.: Eliminating dependent pattern matching. In: Futatsugi, K., Jouannaud, J.-P., Meseguer, J. (eds.) Algebra, Meaning, and Computation. LNCS, vol. 4060, pp. 521–540. Springer, Heidelberg (2006). doi:10.1007/11780274_27
Hedberg, M.: A coherence theorem for Martin-Löf’s type theory. J. Funct. Program. 8(4), 413–436 (1998)
Hofmann, M., Streicher, T.: The groupoid interpretation of type theory. In: Twentyfive Years of Constructive Type Theory (Venice, 1995). Oxford Logic Guides, vol. 36, pp. 83–111. Oxford University Press, New York (1998)
Kapulkin, C., Lumsdaine, P.L.: The simplicial model of univalent foundations (after voevodsky) (2012, preprint)
Licata, D.: Running circles around (in) your proof assistant; or, quotients that compute. blog post, April 2011. http://homotopytypetheory.org/2011/04/23/running-circles-around-in-your-proof-assistant/
Licata, D., Brunerie, G.: A cubical approach to synthetic homotopy theory. In: Proceedings of the 2015 30th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), LICS 2015, pp. 92–103. IEEE Computer Society, Washington, DC (2015)
de Moura, L., Ebner, G., Roesch, J., Ullrich, S.: The Lean theorem prover. Slides, January 2017. https://leanprover.github.io/presentations/20170116_POPL
de Moura, L., Kong, S., Avigad, J., van Doorn, F., van Raumer, J.: The lean theorem prover (system description). In: Felty, A.P., Middeldorp, A. (eds.) CADE 2015. LNCS, vol. 9195, pp. 378–388. Springer, Cham (2015). doi:10.1007/978-3-319-21401-6_26
Rijke, E.: The join construction. ArXiv e-prints, January 2017
Spitters, B., van der Weegen, E.: Developing the algebraic hierarchy with type classes in Coq. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 490–493. Springer, Heidelberg (2010). doi:10.1007/978-3-642-14052-5_35
The Univalent Foundations Program: Homotopy Type Theory: Univalent Foundations of Mathematics. Institute for Advanced Study (2013). http://homotopytypetheory.org/book
Voevodsky, V.: A very short note on the homotopy \(\lambda \)-calculus (2006). http://www.math.ias.edu/vladimir/Site3/Univalent_Foundations_files/Hlambda_short_current.pdf
Voevodsky, V., Mörtberg, A., Ahrens, B., Lelay, C., Pannila, T., Matthes, R.: UniMath: Univalent Mathematics (2017). Code library. https://github.com/UniMath
Acknowledgments
We wish to thank the members of the HoTT group at Carnegie Mellon University for many fruitful discussions and Lean hacking sessions, and in particular Steve Awodey and Jeremy Avigad who have been very supportive of our work. Additionally, we deeply appreciate all the times Leonardo de Moura fixed an issue in the Lean kernel to accommodate our library. Lastly, we want to thank all contributors to the HoTT library and the Spectral repository, most notably Egbert Rijke and Mike Shulman.
The first and second authors gratefully acknowledge the support of the Air Force Office of Scientific Research through MURI grant FA9550-15-1-0053. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the AFOSR.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
van Doorn, F., von Raumer, J., Buchholtz, U. (2017). Homotopy Type Theory in Lean. In: Ayala-Rincón, M., Muñoz, C.A. (eds) Interactive Theorem Proving. ITP 2017. Lecture Notes in Computer Science(), vol 10499. Springer, Cham. https://doi.org/10.1007/978-3-319-66107-0_30
Download citation
DOI: https://doi.org/10.1007/978-3-319-66107-0_30
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-66106-3
Online ISBN: 978-3-319-66107-0
eBook Packages: Computer ScienceComputer Science (R0)