Abstract
In type theory, coinductive types are used to represent processes, and are thus crucial for the formal verification of non-terminating reactive programs in proof assistants based on type theory, such as Coq and Agda. Currently, programming and reasoning about coinductive types is difficult for two reasons: The need for recursive definitions to be productive, and the lack of coincidence of the built-in identity types and the important notion of bisimilarity.
Guarded recursion in the sense of Nakano has recently been suggested as a possible approach to dealing with the problem of productivity, allowing this to be encoded in types. Indeed, coinductive types can be encoded using a combination of guarded recursion and universal quantification over clocks. This paper studies the notion of bisimilarity for guarded recursive types in Ticked Cubical Type Theory, an extension of Cubical Type Theory with guarded recursion. We prove that, for any functor, an abstract, category theoretic notion of bisimilarity for the final guarded coalgebra is equivalent (in the sense of homotopy type theory) to path equality (the primitive notion of equality in cubical type theory). As a worked example we study a guarded notion of labelled transition systems, and show that, as a special case of the general theorem, path equality coincides with an adaptation of the usual notion of bisimulation for processes. In particular, this implies that guarded recursion can be used to give simple equational reasoning proofs of bisimilarity. This work should be seen as a step towards obtaining bisimilarity as path equality for coinductive types using the encodings mentioned above.
Supplemental Material
- Andreas Abel, Stephan Adelsberger, and Anton Setzer. 2017. Interactive programming in Agda - Objects and graphical user interfaces. J. Funct. Program. 27 (2017), e8.Google Scholar
Cross Ref
- Jirí Adámek, Paul Blain Levy, Stefan Milius, Lawrence S. Moss, and Lurdes Sousa. 2015. On Final Coalgebras of Power-Set Functors and Saturated Trees - To George Janelidze on the Occasion of His Sixtieth Birthday. Applied Categorical Structures 23, 4 (2015), 609–641.Google Scholar
Cross Ref
- Benedikt Ahrens, Paolo Capriotti, and Régis Spadotti. 2015. Non-Wellfounded Trees in Homotopy Type Theory. In 13th International Conference on Typed Lambda Calculi and Applications, TLCA 2015, July 1-3, 2015, Warsaw, Poland (LIPIcs), Thorsten Altenkirch (Ed.), Vol. 38. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 17–30.Google Scholar
- Andrew W. Appel and David A. McAllester. 2001. An indexed model of recursive types for foundational proof-carrying code. ACM Trans. Program. Lang. Syst. 23, 5 (2001), 657–683. Google Scholar
Digital Library
- Robert Atkey and Conor McBride. 2013. Productive coprogramming with guarded recursion. In ACM SIGPLAN International Conference on Functional Programming, ICFP’13, Boston, MA, USA - September 25 - 27, 2013, Greg Morrisett and Tarmo Uustalu (Eds.). ACM, 197–208. Google Scholar
Digital Library
- Patrick Bahr, Hans Bugge Grathwohl, and Rasmus Ejlers Møgelberg. 2017. The clocks are ticking: No more delays!. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017. IEEE Computer Society, 1–12.Google Scholar
Digital Library
- Marc Bezem, Thierry Coquand, and Simon Huber. 2013. A Model of Type Theory in Cubical Sets. In 19th International Conference on Types for Proofs and Programs, TYPES 2013, April 22-26, 2013, Toulouse, France (LIPIcs), Ralph Matthes and Aleksy Schubert (Eds.), Vol. 26. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 107–128.Google Scholar
- Lars Birkedal, Ales Bizjak, Ranald Clouston, Hans Bugge Grathwohl, Bas Spitters, and Andrea Vezzosi. 2016. Guarded Cubical Type Theory: Path Equality for Guarded Recursion. In 25th EACSL Annual Conference on Computer Science Logic, CSL 2016, August 29 - September 1, 2016, Marseille, France (LIPIcs), Jean-Marc Talbot and Laurent Regnier (Eds.), Vol. 62. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 23:1–23:17.Google Scholar
- Lars Birkedal, Rasmus Ejlers Møgelberg, Jan Schwinghammer, and Kristian Støvring. 2012. First steps in synthetic guarded domain theory: step-indexing in the topos of trees. Logical Methods in Computer Science 8, 4 (2012). Google Scholar
Digital Library
- Aleš Bizjak, Lars Birkedal, and Marino Miculan. 2014. A Model of Countable Nondeterminism in Guarded Type Theory. In Rewriting and Typed Lambda Calculi - Joint International Conference, RTA-TLCA 2014, Held as Part of the Vienna Summer of Logic, VSL 2014, Vienna, Austria, July 14-17, 2014. Proceedings (Lecture Notes in Computer Science), Gilles Dowek (Ed.), Vol. 8560. Springer, 108–123.Google Scholar
Cross Ref
- Ales Bizjak, Hans Bugge Grathwohl, Ranald Clouston, Rasmus Ejlers Møgelberg, and Lars Birkedal. 2016. Guarded Dependent Type Theory with Coinductive Types. In Foundations of Software Science and Computation Structures - 19th International Conference, FOSSACS 2016, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2016, Eindhoven, The Netherlands, April 2-8, 2016, Proceedings, Bart Jacobs and Christof Löding (Eds.). Springer, 20–35.Google Scholar
- Edwin Brady. 2016. Type-driven Development with Idris. Manning Publications Company.Google Scholar
- Cyril Cohen, Thierry Coquand, Simon Huber, and Anders Mörtberg. 2018. Cubical Type Theory: A Constructive Interpretation of the Univalence Axiom. In 21st International Conference on Types for Proofs and Programs (TYPES 2015) (Leibniz International Proceedings in Informatics (LIPIcs)), Tarmo Uustalu (Ed.), Vol. 69. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 5:1–5:34.Google Scholar
- Thierry Coquand. 1993. Infinite Objects in Type Theory. In Types for Proofs and Programs, International Workshop TYPES’93, Nijmegen, The Netherlands, May 24-28, 1993, Selected Papers (Lecture Notes in Computer Science), Henk Barendregt and Tobias Nipkow (Eds.), Vol. 806. Springer, 62–78. Google Scholar
Digital Library
- 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 2018, Oxford, UK, July 09-12, 2018, Anuj Dawar and Erich Grädel (Eds.). ACM, 255–264. Google Scholar
Digital Library
- Nils Anders Danielsson. 2018. Up-to techniques using sized types. PACMPL 2, POPL (2018), 43:1–43:28. Google Scholar
Digital Library
- Peter Dybjer. 1996. Internal Type Theory. In Types for Proofs and Programs, International Workshop TYPES’95, Torino, Italy, June 5-8, 1995, Selected Papers (Lecture Notes in Computer Science), Stefano Berardi and Mario Coppo (Eds.), Vol. 1158. Springer, 120–134. Google Scholar
Digital Library
- Dan Frumin, Herman Geuvers, Léon Gondelman, and Niels van der Weide. 2018. Finite sets in homotopy type theory. In Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2018, Los Angeles, CA, USA, January 8-9, 2018, June Andronick and Amy P. Felty (Eds.). ACM, 201–214. Google Scholar
Digital Library
- Matthew Hennessy and Robin Milner. 1980. On Observing Nondeterminism and Concurrency. In Automata, Languages and Programming, 7th Colloquium, Noordweijkerhout, The Netherlands, July 14-18, 1980, Proceedings (Lecture Notes in Computer Science), J. W. de Bakker and Jan van Leeuwen (Eds.), Vol. 85. Springer, 299–309. Google Scholar
Digital Library
- Claudio Hermida and Bart Jacobs. 1998. Structural Induction and Coinduction in a Fibrational Setting. Inf. Comput. 145, 2 (1998), 107–152. Google Scholar
Digital Library
- John Hughes, Lars Pareto, and Amr Sabry. 1996. Proving the Correctness of Reactive Systems Using Sized Types. In Conference Record of POPL’96: The 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Papers Presented at the Symposium, St. Petersburg Beach, Florida, USA, January 21-24, 1996, Hans-Juergen Boehm and Guy L. Steele Jr. (Eds.). ACM Press, 410–423. Google Scholar
Digital Library
- Bart Jacobs. 2016. Introduction to Coalgebra: Towards Mathematics of States and Observation. Cambridge Tracts in Theoretical Computer Science, Vol. 59. Cambridge University Press.Google Scholar
- Ralf Jung, Robbert Krebbers, Jacques-Henri Jourdan, Aleš Bizjak, Lars Birkedal, and Derek Dreyer. 2018. Iris from the ground up. (2018). https://people.mpi- sws.org/~dreyer/papers/iris- ground- up/paper.pdfGoogle Scholar
- Alexander Kurz and Jiri Velebil. 2016. Relation lifting, a survey. J. Log. Algebr. Meth. Program. 85, 4 (2016), 475–499.Google Scholar
Cross Ref
- Xavier Leroy. 2006. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In Proceedings of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2006, Charleston, South Carolina, USA, January 11-13, 2006, J. Gregory Morrisett and Simon L. Peyton Jones (Eds.). ACM, 42–54. Google Scholar
Digital Library
- Saunders MacLane and Ieke Moerdijk. 2012. Sheaves in geometry and logic: A first introduction to topos theory. Springer Science & Business Media.Google Scholar
- Bassel Mannaa and Rasmus Ejlers Møgelberg. 2018. The Clocks They Are Adjunctions Denotational Semantics for Clocked 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, 23:1–23:17.Google Scholar
- Robin Milner. 1980. A Calculus of Communicating Systems. Lecture Notes in Computer Science, Vol. 92. Springer. Google Scholar
- Robin Milner. 1983. Calculi for Synchrony and Asynchrony. Theor. Comput. Sci. 25 (1983), 267–310.Google Scholar
Cross Ref
- Robin Milner. 1999. Communicating and mobile systems: the pi calculus. Cambridge University Press. Google Scholar
Digital Library
- R. E. Møgelberg. 2014. A type theory for productive coprogramming via guarded recursion. In CSL-LICS. 71:1–71:10.Google Scholar
- Rasmus Ejlers Møgelberg and Marco Paviotti. 2016. Denotational semantics of recursive types in synthetic guarded domain theory. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’16, New York, NY, USA, July 5-8, 2016, Martin Grohe, Eric Koskinen, and Natarajan Shankar (Eds.). ACM, 317–326. Google Scholar
Digital Library
- Hiroshi Nakano. 2000. A Modality for Recursion. In 15th Annual IEEE Symposium on Logic in Computer Science, Santa Barbara, California, USA, June 26-29, 2000. IEEE Computer Society, 255–266. Google Scholar
Digital Library
- 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, August 29 - September 1, 2016, Marseille, France (LIPIcs), Jean-Marc Talbot and Laurent Regnier (Eds.), Vol. 62. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 24:1–24:19.Google Scholar
- Damien Pous and Davide Sangiorgi. 2012. Enhancements of the bisimulation proof method. In Advanced Topics in Bisimulation and Coinduction, Davide Sangiorgi and Jan Rutten (Eds.). Cambridge University Press.Google Scholar
- Jan J. M. M. Rutten. 2000. Universal coalgebra: a theory of systems. Theor. Comput. Sci. 249, 1 (2000), 3–80. Google Scholar
Digital Library
- Daniel Schwencke. 2010. Coequational logic for accessible functors. Inf. Comput. 208, 12 (2010), 1469–1489. Google Scholar
Digital Library
- Arnaud Spiwack and Thierry Coquand. 2010. Constructively Finite? In Contribuciones científicas en honor de Mirian Andrés Gómez, Laureano Lambán Pardo, Ana Romero Ibáñez, and Julio Rubio García (Eds.). Universidad de La Rioja, 217–230.Google Scholar
- Sam Staton. 2009. Relating Coalgebraic Notions of Bisimulation. In Algebra and Coalgebra in Computer Science, Third International Conference, CALCO 2009, Udine, Italy, September 7-10, 2009. Proceedings (Lecture Notes in Computer Science), Alexander Kurz, Marina Lenisa, and Andrzej Tarlecki (Eds.), Vol. 5728. Springer, 191–205. Google Scholar
Digital Library
- The Agda Team. 2018. The Agda wiki. (2018). http://wiki.portal.chalmers.se/agda/ .Google Scholar
- The Project Everest Team. 2018. The Everest Project. (2018). https://project- everest.github.io/ .Google Scholar
- The Univalent Foundations Program. 2013. Homotopy Type Theory: Univalent Foundations of Mathematics. https: //homotopytypetheory.org/book , Institute for Advanced Study.Google Scholar
- Niccolò Veltri. 2017. A Type-Theoretical Study of Nontermination. Ph.D. Dissertation. Tallinn University of Technology. https://digi.lib.ttu.ee/i/?7631Google Scholar
- Andrea Vezzosi. 2017. Streams for Cubical Type Theory. (2017). http://www.cse.chalmers.se/~vezzosi/streams- ctt.pdfGoogle Scholar
Index Terms
Bisimulation as path type for guarded recursive types
Recommendations
Higher inductive types in cubical computational type theory
Homotopy type theory proposes higher inductive types (HITs) as a means of defining and reasoning about inductively-generated objects with higher-dimensional structure. As with the univalence axiom, however, homotopy type theory does not specify the ...
Guarded Cubical Type Theory
This paper improves the treatment of equality in guarded dependent type theory ($$\mathsf {GDTT}$$GDTT), by combining it with cubical type theory ($$\mathsf {CTT}$$CTT). $$\mathsf {GDTT}$$GDTT is an extensional type theory with guarded recursive types, ...
Type Theory based on Dependent Inductive and Coinductive Types
LICS '16: Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer ScienceWe develop a dependent type theory that is based purely on inductive and coinductive types, and the corresponding recursion and corecursion principles. This results in a type theory with a small set of rules, while still being fairly expressive. For ...






Comments