skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

Cubical agda: a dependently typed programming language with univalence and higher inductive types

Authors Info & Claims
Published:26 July 2019Publication History
Skip Abstract Section

Abstract

Proof assistants based on dependent type theory provide expressive languages for both programming and proving within the same system. However, all of the major implementations lack powerful extensionality principles for reasoning about equality, such as function and propositional extensionality. These principles are typically added axiomatically which disrupts the constructive properties of these systems. Cubical type theory provides a solution by giving computational meaning to Homotopy Type Theory and Univalent Foundations, in particular to the univalence axiom and higher inductive types. This paper describes an extension of the dependently typed functional programming language Agda with cubical primitives, making it into a full-blown proof assistant with native support for univalence and a general schema of higher inductive types. These new primitives make function and propositional extensionality as well as quotient types directly definable with computational content. Additionally, thanks also to copatterns, bisimilarity is equivalent to equality for coinductive types. This extends Agda with support for a wide range of extensionality principles, without sacrificing type checking and constructivity.

Skip Supplemental Material Section

Supplemental Material

a87-vezzosi.webm

References

  1. Andreas Abel, Joakim Öhman, and Andrea Vezzosi. 2017. Decidability of Conversion for Type Theory in Type Theory. Proc. ACM Program. Lang. 2, POPL, Article 23 (Dec. 2017), 29 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Andreas Abel, Brigitte Pientka, David Thibodeau, and Anton Setzer. 2013. Copatterns: Programming Infinite Structures by Observations. SIGPLAN Not. 48, 1 (Jan. 2013), 27–38. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Agda development team. 2018. Agda 2.5.4.2 documentation. http://agda.readthedocs.io/en/v2.5.4.2/Google ScholarGoogle Scholar
  4. Benedikt Ahrens, Paolo Capriotti, and Régis Spadotti. 2015. Non-wellfounded trees in Homotopy Type Theory. CoRR abs/1504.02949 (2015). http://arxiv.org/abs/1504.02949Google ScholarGoogle Scholar
  5. Thorsten Altenkirch and Conor McBride. 2006. Towards Observational Type Theory. (2006). Unpublished draft.Google ScholarGoogle Scholar
  6. Thorsten Altenkirch, Conor McBride, and Wouter Swierstra. 2007. Observational Equality, Now!. In PLPV ’07: Proceedings of the 2007 workshop on Programming languages meets program verification. ACM, New York, NY, USA, 57–68. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Carlo Angiuli, Guillaume Brunerie, Thierry Coquand, Kuen-Bang Hou (Favonia), Robert Harper, and Daniel R. Licata. 2019. Syntax and Models of Cartesian Cubical Type Theory. (February 2019). https://github.com/dlicata335/cart-cube Preprint.Google ScholarGoogle Scholar
  8. Carlo Angiuli, Kuen-Bang Hou (Favonia), and Robert Harper. 2017. Computational Higher Type Theory III: Univalent Universes and Exact Equality. (2017). Preprint arXiv:1712.01800v1.Google ScholarGoogle Scholar
  9. Carlo Angiuli, Kuen-Bang Hou (Favonia), and Robert Harper. 2018. Cartesian Cubical Computational Type Theory: Constructive Reasoning with Paths and Equalities. In 27th EACSL Annual Conference on Computer Science Logic (CSL 2018) (Leibniz International Proceedings in Informatics (LIPIcs)), Dan Ghica and Achim Jung (Eds.), Vol. 119. Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 6:1–6:17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Carlo Angiuli, Edward Morehouse, Daniel R. Licata, and Robert Harper. 2016. Homotopical patch theory. Journal of Functional Programming 26 (2016).Google ScholarGoogle Scholar
  11. Danil Annenkov, Paolo Capriotti, and Nicolai Kraus. 2017. Two-Level Type Theory and Applications. (2017). https://arxiv. org/abs/1705.03307Google ScholarGoogle Scholar
  12. Mark Bickford. 2018. Formalizing Category Theory and Presheaf Models of Type Theory in Nuprl. CoRR abs/1806.06114 (2018). arXiv: 1806.06114 http://arxiv.org/abs/1806.06114Google ScholarGoogle Scholar
  13. Edwin Brady. 2013. Idris, a general-purpose dependently typed programming language: Design and implementation. Journal of Functional Programming 23, 5 (2013), 552–593.Google ScholarGoogle ScholarCross RefCross Ref
  14. Guillaume Brunerie. 2016. On the homotopy groups of spheres in homotopy type theory. Ph.D. Dissertation. Université de Nice.Google ScholarGoogle Scholar
  15. Evan Cavallo and Robert Harper. 2019. Higher Inductive Types in Cubical Computational Type Theory. Proc. ACM Program. Lang. 3, POPL, Article 1 (Jan. 2019), 27 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Shumo Chu, Konstantin Weitz, Alvin Cheung, and Dan Suciu. 2017. HoTTSQL: Proving Query Rewrites with Univalent SQL Semantics. SIGPLAN Not. 52, 6 (June 2017), 510–524.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jesper Cockx and Andreas Abel. 2018. Elaborating Dependent (Co)Pattern Matching. Proc. ACM Program. Lang. 2, ICFP, Article 75 (July 2018), 30 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Cyril Cohen, Thierry Coquand, Simon Huber, and Anders Mörtberg. 2015. Cubicaltt. (2015). https://github.com/mortberg/ cubicaltt .Google ScholarGoogle Scholar
  19. Cyril Cohen, Thierry Coquand, Simon Huber, and Anders Mörtberg. 2018. Cubical Type Theory: A Constructive Interpretation of the Univalence Axiom. In Types for Proofs and Programs (TYPES 2015) (LIPIcs), Vol. 69. 5:1–5:34.Google ScholarGoogle Scholar
  20. Cyril Cohen, Maxime Dénès, and Anders Mörtberg. 2013. Refinements for Free!. In Certified Programs and Proofs (Lecture Notes in Computer Science), Georges Gonthier and Michael Norrish (Eds.), Vol. 8307. Springer International Publishing, 147–162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Thierry Coquand and Nils Anders Danielsson. 2013. Isomorphism is equality. Indagationes Mathematicae 24, 4 (2013), 1105–1120.Google ScholarGoogle ScholarCross RefCross Ref
  22. Thierry Coquand, Simon Huber, and Anders Mörtberg. 2018. On Higher Inductive Types in Cubical Type Theory. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS ’18). ACM, New York, NY, USA, 255–264. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Thierry Coquand, Simon Huber, and Christian Sattler. 2019. Homotopy canonicity for cubical type theory. (2019). Preprint available at http://www.cse.chalmers.se/ simonhu/papers/can.pdf.Google ScholarGoogle Scholar
  24. Leonardo de Moura, Soonho Kong, Jeremy Avigad, Floris van Doorn, and Jakob von Raumer. 2015. The Lean Theorem Prover. In Automated Deduction - CADE-25, 25th International Conference on Automated Deduction, Berlin, Germany, August 1-7, 2015, Proceedings.Google ScholarGoogle Scholar
  25. Simon Huber. 2016. Canonicity for Cubical Type Theory. (2016). Preprint arXiv:1607.04156. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Simon Huber. 2017. A Cubical Type Theory for Higher Inductive Types. (2017). http://www.cse.chalmers.se/~simonhu/ misc/hcomp.pdfGoogle ScholarGoogle Scholar
  27. Chris Kapulkin and Peter LeFanu Lumsdaine. 2012. The Simplicial Model of Univalent Foundations (after Voevodsky). (Nov. 2012). Preprint arXiv:1211.2851v4.Google ScholarGoogle Scholar
  28. Daniel R. Licata and Guillaume Brunerie. 2015. A Cubical Approach to Synthetic Homotopy Theory. In 30th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS’15. ACM, 92–103. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Daniel R. Licata, Ian Orton, Andrew M. Pitts, and Bas Spitters. 2018. Internal Universes in Models of Homotopy Type Theory. In 3rd International Conference on Formal Structures for Computation and Deduction, FSCD 2018, July 9-12, 2018, Oxford, UK (LIPIcs), Hélène Kirchner (Ed.), Vol. 108. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 22:1–22:17.Google ScholarGoogle Scholar
  30. Daniel R. Licata and Michael Shulman. 2013. Calculating the Fundamental Group of the Circle in Homotopy Type Theory. In Proceedings of the 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS’13). 223–232. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Peter LeFanu Lumsdaine and Michael Shulman. 2017. Semantics of higher inductive types. (May 2017). Preprint arXiv:1705.07088.Google ScholarGoogle Scholar
  32. Per Martin-Löf. 1975. An Intiutionistic Theory of Types: Predicative Part. In Logic Colloquium ’73, H. E. Rose and J. Shepherdson (Eds.). North–Holland, Amsterdam, 73–118.Google ScholarGoogle Scholar
  33. Conor McBride. 2009. Let’s See How Things Unfold: Reconciling the Infinite with the Intensional. In Proceedings of the 3rd International Conference on Algebra and Coalgebra in Computer Science (CALCO’09). Springer-Verlag, Berlin, Heidelberg, 113–126. http://dl.acm.org/citation.cfm?id=1812941.1812953 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Ian Orton and Andrew M. Pitts. 2016. Axioms for Modelling Cubical Type Theory in a Topos. In 25th EACSL Annual Conference on Computer Science Logic (CSL 2016) (LIPIcs), Vol. 62. 24:1–24:19.Google ScholarGoogle Scholar
  35. Emily Riehl and Michael Shulman. 2017. A type theory for synthetic ∞-categories. Higher Structures 1, 1 (2017), 147–224.Google ScholarGoogle ScholarCross RefCross Ref
  36. Kristina Sojakova. 2016. The Equivalence of the Torus and the Product of Two Circles in Homotopy Type Theory. ACM Transactions on Computational Logic 17, 4 (Nov. 2016), 29:1–29:19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Jonathan Sterling, Carlo Angiuli, and Daniel Gratzer. 2019. Cubical Syntax for Reflection-Free Extensional Equality. (2019). http://www.jonmsterling.com/pdfs/xtt.pdfGoogle ScholarGoogle Scholar
  38. Nicolas Tabareau, Éric Tanter, and Matthieu Sozeau. 2018. Equivalences for Free: Univalent Parametricity for Effective Transport. Proc. ACM Program. Lang. 2, ICFP, Article 92 (July 2018), 29 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. The Coq Development Team. 2019. The Coq Proof Assistant, version 8.9.0.Google ScholarGoogle Scholar
  40. The RedPRL Development Team. 2018. The red tt Proof Assistant. https://github.com/RedPRL/redtt/Google ScholarGoogle Scholar
  41. The Univalent Foundations Program. 2013. Homotopy Type Theory: Univalent Foundations of Mathematics. Institute for Advanced Study.Google ScholarGoogle Scholar
  42. Andrea Vezzosi. 2017. Streams for Cubical Type Theory. (2017). http://saizan.github.io/streams-ctt.pdf .Google ScholarGoogle Scholar
  43. Vladimir Voevodsky. 2013. A simple type system with two identity types. (2013). https://www.math.ias.edu/vladimir/sites/ math.ias.edu.vladimir/files/HTS.pdfGoogle ScholarGoogle Scholar
  44. Vladimir Voevodsky. 2015. An experimental library of formalized Mathematics based on the univalent foundations. Mathematical Structures in Computer Science 25 (2015), 1278–1294.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Cubical agda: a dependently typed programming language with univalence and higher inductive types

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!