skip to main content
research-article

Homotopical patch theory

Published:19 August 2014Publication History
Skip Abstract Section

Abstract

Homotopy type theory is an extension of Martin-Löf type theory, based on a correspondence with homotopy theory and higher category theory. In homotopy type theory, the propositional equality type becomes proof-relevant, and corresponds to paths in a space. This allows for a new class of datatypes, called higher inductive types, which are specified by constructors not only for points but also for paths. In this paper, we consider a programming application of higher inductive types. Version control systems such as Darcs are based on the notion of patches - syntactic representations of edits to a repository. We show how patch theory can be developed in homotopy type theory. Our formulation separates formal theories of patches from their interpretation as edits to repositories. A patch theory is presented as a higher inductive type. Models of a patch theory are given by maps out of that type, which, being functors, automatically preserve the structure of patches. Several standard tools of homotopy theory come into play, demonstrating the use of these methods in a practical programming context.

References

  1. M. Abbott, T. Altenkirch, and N. Ghani. Containers: constructing strictly positive types. Theoretic Computer Science, 342(1):3--27, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. T. Altenkirch. Containers in homotopy type theory. Talk at Mathematical Structures of Computation, Lyon, 2014.Google ScholarGoogle Scholar
  3. T. Altenkirch, C. McBride, and W. Swierstra. Observational equality, now. In Programming Languages meets Program Verification Workshop, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Awodey and M. Warren. Homotopy theoretic models of identity types. Mathematical Proceedings of the Cambridge Philosophical Society, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  5. B. Barras, T. Coquand, and S. Huber. A generalization of Takeuti-Gandy interpretation. To appear in Mathematical Structures in Computer Science, 2013.Google ScholarGoogle Scholar
  6. M. Bezem, T. Coquand, and S. Huber. A model of type theory in cubical sets. Preprint, September 2013.Google ScholarGoogle Scholar
  7. Camp Project. http://projects.haskell.org/camp/, 2010.Google ScholarGoogle Scholar
  8. R. L. Constable, S. F. Allen, H. M. Bromley, W. R. Cleaveland, J. F. Cremer, R. W. Harper, D. J. Howe, T. B. Knoblock, N. P. Mendler, P. Panangaden, J. T. Sasaki, and S. F. Smith. Implementing Mathematics with the NuPRL Proof Development System. Prentice Hall, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Coq Development Team. The Coq Proof Assistant Reference Manual, version 8.2. INRIA, 2009. Available from http://coq.inria.fr/.Google ScholarGoogle Scholar
  10. J. Dagit. Type-correct changes - a safe approach to version control implementation. MS Thesis, 2009.Google ScholarGoogle Scholar
  11. N. Gambino and R. Garner. The identity type weak factorisation system. Theoretical Computer Science, 409(3):94--109, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ganesh Sittampalam et al. Some properties of darcs patch theory. Available from http://urchin.earth.li/darcs/ganesh/darcs-patch-theory/theory/formal.pdf, 2005.Google ScholarGoogle Scholar
  13. R. Garner. Two-dimensional models of type theory. Mathematical. Structures in Computer Science, 19(4):687--736, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Hofmann and T. Streicher. The groupoid interpretation of type theory. In Twenty-five years of constructive type theory. Oxford University Press, 1998.Google ScholarGoogle ScholarCross RefCross Ref
  15. R. Houston. On editing text. http://bosker.wordpress.com/2012/05/10/on-editing-text/, 2012.Google ScholarGoogle Scholar
  16. J. Jacobson. A formalization of darcs patch theory using inverse semigroups. Available from ftp://ftp.math.ucla.edu/pub/camreport/cam09-83.pdf, 2009.Google ScholarGoogle Scholar
  17. C. Kapulkin, P. L. Lumsdaine, and V. Voevodsky. The simplicial model of univalent foundations. arXiv:1211.2851, 2012.Google ScholarGoogle Scholar
  18. F. W. Lawvere. Functorial Semantics of Algebraic Theories and Some Algebraic Problems in the context of Functorial Semantics of Algebraic Theories. PhD thesis, Columbia University, 1963.Google ScholarGoogle Scholar
  19. D. R. Licata and G. Brunerie. πn(Sn) in homotopy type theory. In Certified Programs and Proofs, 2013.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. D. R. Licata and E. Finster. Eilenberg-MacLane spaces in homotopy type theory. Draft available from http://dlicata.web.wesleyan.edu/pubs.html, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. R. Licata and R. Harper. 2-dimensional directed type theory. In Mathematical Foundations of Programming Semantics (MFPS), 2011.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. R. Licata and R. Harper. Canonicity for 2-dimensional type theory. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. R. Licata and M. Shulman. Calculating the fundamental group of the circle in homotopy type theory. In IEEE Symposium on Logic in Computer Science, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. P. L. Lumsdaine. Weak ω-categories from intensional type theory. In International Conference on Typed Lambda Calculi and Applications, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. P. L. Lumsdaine. Higher inductive types: a tour of the menagerie. http://homotopytypetheory.org/2011/04/24/higher-inductive-types-a-tour-of-the-menagerie/, April 2011.Google ScholarGoogle Scholar
  26. P. L. Lumsdaine and M. Shulman. Higher inductive types. In preparation, 2013.Google ScholarGoogle Scholar
  27. C. McBride. Dependently Typed Functional Programs and Their Proofs. PhD thesis, University of Edinburgh, 2000.Google ScholarGoogle Scholar
  28. S. Mimram and C. Di Giusto. A categorical theory of patches. Electronic Notes in Theoretic Computer Science, 298:283--307, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. U. Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology, 2007.Google ScholarGoogle Scholar
  30. J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In IEEE Symposium on Logic in Computer Science, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. D. Roundy. Darcs: Distributed version management in haskell. In ACM SIGPLAN Workshop on Haskell. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. M. Shulman. Homotopy type theory VI: higher inductive types. http://golem.ph.utexas.edu/category/2011/04/homotopy_type_theory_vi.html, April 2011.Google ScholarGoogle Scholar
  33. M. Shulman. Univalence for inverse diagrams, oplax limits, and gluing, and homotopy canonicity. arXiv:1203.3253, 2013.Google ScholarGoogle Scholar
  34. W. Swierstra and A. Löh. The semantics of version control. Available from http://www.staff.science.uu.nl/~swier004/, 2014.Google ScholarGoogle Scholar
  35. The Univalent Foundations Program, Institute for Advanced Study. Homotopy Type Theory: Univalent Foundations Of Mathematics. Available from homotopytypetheory.org/book, 2013.Google ScholarGoogle Scholar
  36. B. van den Berg and R. Garner. Types are weak ω-groupoids. Proceedings of the London Mathematical Society, 102(2):370--394, 2011.Google ScholarGoogle Scholar
  37. V. Voevodsky. Univalent foundations of mathematics. Invited talk at WoLLIC 2011 18th Workshop on Logic, Language, Information and Computation, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. M. A.Warren. Homotopy theoretic aspects of constructive type theory. PhD thesis, Carnegie Mellon University, 2008.Google ScholarGoogle Scholar

Index Terms

  1. Homotopical patch theory

    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

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 49, Issue 9
      ICFP '14
      September 2014
      361 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2692915
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programming
        August 2014
        390 pages
        ISBN:9781450328739
        DOI:10.1145/2628136

      Copyright © 2014 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 August 2014

      Check for updates

      Author Tags

      Qualifiers

      • research-article

    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!