Coinduction in Flow: The Later Modality in Fibrations

Author Henning Basold

Thumbnail PDF


  • Filesize: 0.59 MB
  • 22 pages

Document Identifiers

Author Details

Henning Basold
  • CNRS, ENS de Lyon, France
  • LIACS - Leiden University, The Netherlands

Cite AsGet BibTex

Henning Basold. Coinduction in Flow: The Later Modality in Fibrations. In 8th Conference on Algebra and Coalgebra in Computer Science (CALCO 2019). Leibniz International Proceedings in Informatics (LIPIcs), Volume 139, pp. 8:1-8:22, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019)


This paper provides a construction on fibrations that gives access to the so-called later modality, which allows for a controlled form of recursion in coinductive proofs and programs. The construction is essentially a generalisation of the topos of trees from the codomain fibration over sets to arbitrary fibrations. As a result, we obtain a framework that allows the addition of a recursion principle for coinduction to rather arbitrary logics and programming languages. The main interest of using recursion is that it allows one to write proofs and programs in a goal-oriented fashion. This enables easily understandable coinductive proofs and programs, and fosters automatic proof search. Part of the framework are also various results that enable a wide range of applications: transportation of (co)limits, exponentials, fibred adjunctions and first-order connectives from the initial fibration to the one constructed through the framework. This means that the framework extends any first-order logic with the later modality. Moreover, we obtain soundness and completeness results, and can use up-to techniques as proof rules. Since the construction works for a wide variety of fibrations, we will be able to use the recursion offered by the later modality in various context. For instance, we will show how recursive proofs can be obtained for arbitrary (syntactic) first-order logics, for coinductive set-predicates, and for the probabilistic modal mu-calculus. Finally, we use the same construction to obtain a novel language for probabilistic productive coinductive programming. These examples demonstrate the flexibility of the framework and its accompanying results.

Subject Classification

ACM Subject Classification
  • Theory of computation → Logic
  • Coinduction
  • Fibrations
  • Later Modality
  • Recursive Proofs
  • Up-to techniques
  • Probabilistic Logic
  • Probabilistic Programming


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Andreas Abel, Brigitte Pientka, David Thibodeau, and Anton Setzer. Copatterns: Programming Infinite Structures by Observations. In POPL'13, pages 27-38. ACM, 2013. URL:
  2. Jiří Adámek, Stefan Milius, and Lawrence S. Moss. Introduction to Category Theroy, Algebras and Coalgebra. A monograph in preparation, 2010. URL:
  3. Jiŕı Adámek and Vera Trnková. Initial Algebras and Terminal Coalgebras in Many-Sorted Sets. MSCS, 21(2):481-509, 2011. URL:
  4. Bahareh Afshari and Graham E. Leigh. Cut-Free Completeness for Modal Mu-Calculus. In Proc. of LICS'17, pages 1-12. IEEE Computer Society, 2017. URL:
  5. Andrew W. Appel, Paul-André Melliès, Christopher D. Richards, and Jérôme Vouillon. A Very Modal Model of a Modern, Major, General Type System. In POPL, pages 109-122. ACM, 2007. URL:
  6. Robert Atkey and Conor McBride. Productive Coprogramming with Guarded Recursion. In ICFP, pages 197-208. ACM, 2013. URL:
  7. Michael Barr. Terminal Coalgebras in Well-Founded Set Theory. TCS, 114(2):299-315, 1993. URL:
  8. Henning Basold. Code Repository, 2018. URL:
  9. Henning Basold. Mixed Inductive-Coinductive Reasoning: Types, Programs and Logic. PhD Thesis, Radboud University, 2018. URL:
  10. Henning Basold, Ekaterina Komendantskaya, and Yue Li. Coinduction in Uniform: Foundations for Corecursive Proof Search with Horn Clauses. In ESOP'19, volume 11423 of LNCS. Springer, 2019. URL:
  11. Henning Basold, Damien Pous, and Jurriaan Rot. Monoidal Company for Accessible Functors. In CALCO 2017, volume 72 of LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2017. URL:
  12. Lev D. Beklemishev. Parameter Free Induction and Provably Total Computable Functions. TCS, 224(1-2):13-33, 1999. URL:
  13. Jean Bénabou. Fibered Categories and the Foundations of Naive Category Theory. Journal of Symbolic Logic, 50(1):10-37, 1985. URL:
  14. Lars Birkedal, Alěs Bizjak, Ranald Clouston, Hans Bugge Grathwohl, Bas Spitters, and Andrea Vezzosi. Guarded Cubical Type Theory: Path Equality for Guarded Recursion. In CSL 2016, volume 62 of LIPIcs, pages 23:1-23:17. Schloss Dagstuhl, 2016. URL:
  15. Lars Birkedal and Rasmus Ejlers Møgelberg. Intensional Type Theory with Guarded Recursive Types qua Fixed Points on Universes. In LICS, pages 213-222. IEEE Computer Society, 2013. URL:
  16. Lars Birkedal, Rasmus Ejlers Møgelberg, Jan Schwinghammer, and Kristian Støvring. First Steps in Synthetic Guarded Domain Theory: Step-Indexing in the Topos of Trees. LMCS, 8(4), 2012. URL:
  17. Ales Bizjak, Hans Bugge Grathwohl, Ranald Clouston, Rasmus Ejlers Møgelberg, and Lars Birkedal. Guarded Dependent Type Theory with Coinductive Types. In FoSSaCS, volume 9634 of LNCS, pages 20-35. Springer, 2016. URL:
  18. Jasmin Christian Blanchette, Johannes Hölzl, Andreas Lochbihler, Lorenz Panny, Andrei Popescu, and Dmitriy Traytel. Truly Modular (Co)Datatypes for Isabelle/HOL. In Gerwin Klein and Ruben Gamboa, editors, Proceedings of ITP 2014, volume 8558 of LNCS, pages 93-110. Springer, 2014. URL:
  19. Filippo Bonchi, Daniela Petrişan, Damien Pous, and Jurriaan Rot. Coinduction Up-to in a Fibrational Setting. In LICS '14, pages 20:1-20:9. ACM, 2014. URL:
  20. Julian C. Bradfield and Colin Stirling. Modal Mu-Calculi. In Handbook of Modal Logic, pages 721-756. Elsevier, 2006. Google Scholar
  21. James Brotherston. Cyclic Proofs for First-Order Logic with Inductive Definitions. In Bernhard Beckert, editor, Proceedings of TABLEAUX 2005, volume 3702 of Lecture Notes in Computer Science, pages 78-92. Springer, 2005. URL:
  22. James Brotherston and Alex Simpson. Complete Sequent Calculi for Induction and Infinite Descent. In Proceedings of LICS 2007, pages 51-62. IEEE Computer Society, 2007. URL:
  23. Ranald Clouston and Rajeev Goré. Sequent Calculus in the Topos of Trees. In Andrew M. Pitts, editor, Proc. of FoSSaCS 2015, volume 9034 of LNCS, pages 133-147. Springer, 2015. URL:
  24. J. Robin B. Cockett. Deforestation, Program Transformation, and Cut-Elimination. Electr. Notes Theor. Comput. Sci., 44(1):88-127, 2001. URL:
  25. The Coq Development Team. The Coq Proof Assistant Reference Manual. Technical report, LogiCal Project, 2012. Version 8.4. URL:
  26. Christian Dax, Martin Hofmann, and Martin Lange. A Proof System for the Linear Time μ-Calculus. In S. Arun-Kumar and Naveen Garg, editors, Proceedings of FSTTCS 2006, volume 4337 of LNCS, pages 273-284. Springer, 2006. URL:
  27. Amina Doumane. On the Infinitary Proof Theory of Logics with Fixed Points. PhD Thesis, Université Paris Diderot, 2017. Google Scholar
  28. Jérôme Fortier and Luigi Santocanale. Cuts for Circular Proofs: Semantics and Cut-Elimination. In CSL, pages 248-262, 2013. URL:
  29. Clément Fumex, Neil Ghani, and Patricia Johann. Indexed Induction and Coinduction, Fibrationally. In Proc. of CALCO '11, volume 6859 of Lecture Notes in Computer Science, pages 176-191. Springer, 2011. URL:
  30. Sergey Goncharov and Lutz Schröder. Guarded Traced Categories. In Christel Baier and Ugo Dal Lago, editors, Proc. of FOSSACS'18, volume 10803 of LNCS, pages 313-330. Springer, 2018. URL:
  31. Programming Logic group on Agda. Agda Documentation. Technical report, Chalmers and Gothenburg University, 2015. Version URL:
  32. Tatsuya Hagino. A Typed Lambda Calculus with Categorical Type Constructors. In Category Theory in Computer Science, Lecture Notes in Computer Science, pages 140-157. Springer, 1987. URL:
  33. Helle Hvid Hansen, Clemens Kupke, and Jan Rutten. Stream Differential Equations: Specification Formats and Solution Methods. LMCS, 13(1), 2017. URL:
  34. Masahito Hasegawa. On Traced Monoidal Closed Categories. Mathematical Structures in Computer Science, 19(2):217-244, 2009. URL:
  35. Ichiro Hasuo, Kenta Cho, Toshiki Kataoka, and Bart Jacobs. Coinductive Predicates and Final Sequences in a Fibration. Electronic Notes in Theoretical Computer Science, 298:197-214, November 2013. URL:
  36. Claudio Hermida and Bart Jacobs. Structural Induction and Coinduction in a Fibrational Setting. Information and Computation, 145:107-152, 1997. URL:
  37. Chris Heunen, Ohad Kammar, Sam Staton, and Hongseok Yang. A Convenient Category for Higher-Order Probability Theory. In Proc. of LICS'17, pages 1-12. IEEE Computer Society, 2017. URL:
  38. Chung-Kil Hur, Georg Neis, Derek Dreyer, and Viktor Vafeiadis. The Power of Parameterization in Coinductive Proof. In Proc. of POPL'13, POPL '13, pages 193-206. ACM, 2013. URL:
  39. Michael Huth and Marta Z. Kwiatkowska. Quantitative Analysis and Model Checking. In Proc. of LICS'97, pages 111-122. IEEE Computer Society, 1997. URL:
  40. J Martin E Hyland. The Effective Topos. In Studies in Logic and the Foundations of Mathematics, volume 110, pages 165-216. Elsevier, 1982. Google Scholar
  41. Bart Jacobs. Categorical Logic and Type Theory. Number 141 in Studies in Logic and the Foundations of Mathematics. North Holland, Amsterdam, 1999. Google Scholar
  42. Bart Jacobs. Introduction to Coalgebra: Towards Mathematics of States and Observation. Number 59 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 2016. URL:
  43. Bart Jacobs and Jan Rutten. A Tutorial on (Co)Algebras and (Co)Induction. EATCS Bulletin, 62:62-222, 1997. Google Scholar
  44. Henning Kerstan, Barbara König, and Bram Westerbaan. Lifting Adjunctions to Coalgebras to (Re)Discover Automata Constructions. In Marcello M. Bonsangue, editor, Revised Selected Papers of CMCS'14, volume 8446 of LNCS, pages 168-188. Springer, 2014. URL:
  45. Anders Kock. Strong Functors and Monoidal Monads. Archiv der Mathematik, 23(1):113-120, 1972. Google Scholar
  46. Dexter Kozen. Results on the Propositional μ-Calculus. Theor. Comput. Sci., 27:333-354, 1983. URL:
  47. F William Lawvere. Diagonal Arguments and Cartesian Closed Categories. In Category Theory, Homology Theory and Their Applications II, pages 134-145. Springer, 1969. Google Scholar
  48. Nex Paul Mendler. Inductive Types and Type Constraints in the Second-Order Lambda Calculus. Ann. Pure Appl. Logic, 51(1-2):159-172, 1991. URL:
  49. Matteo Mio and Alex Simpson. Łukasiewicz (μ)-calculus. Fundam. Inform., 150(3-4):317-346, 2017. URL:
  50. Rasmus Ejlers Møgelberg. A Type Theory for Productive Coprogramming via Guarded Recursion. In CSL-LICS, pages 71:1-71:10. ACM, 2014. URL:
  51. Lawrence S. Moss. Parametric Corecursion. Theoretical Computer Science, 260:139-163, 2001. Google Scholar
  52. Hiroshi Nakano. A Modality for Recursion. In LICS, pages 255-266. IEEE Computer Society, 2000. URL:
  53. Damian Niwinski and Igor Walukiewicz. Games for the μ-Calculus. TCS, 163(1&2):99-116, 1996. URL:
  54. Damien Pous. Complete Lattices and Up-To Techniques. In Zhong Shao, editor, APLAS'07, volume 4807 of LNCS, pages 351-366. Springer, 2007. URL:
  55. Damien Pous. Coinduction All the Way Up. In Martin Grohe, Eric Koskinen, and Natarajan Shankar, editors, Proceedings of LICS '16, pages 307-316. ACM, 2016. URL:
  56. Damien Pous and Jurriaan Rot. Companions, Codensity, and Causality. In Proceedings of FOSSACS 2017, 2017. URL:
  57. Grigore Roşu and Dorel Lucanu. Circular Coinduction: A Proof Theoretical Foundation. In CALCO, volume 5728 of LNCS, pages 127-144. Springer, 2009. URL:
  58. Jurriaan Rot. Enhanced Coinduction. PhD, University Leiden, Leiden, 2015. Google Scholar
  59. Jurriaan Rot, Filippo Bonchi, Marcello Bonsangue, Damien Pous, Jan Rutten, and Alexandra Silva. Enhanced Coalgebraic Bisimulation. MSCS, 27(7):1236-1264, 2017. URL:
  60. Jan Rutten. Universal Coalgebra: A Theory of Systems. TCS, 249(1):3-80, 2000. URL:
  61. Jan Rutten. Behavioural Differential Equations: A Coinductive Calculus of Streams, Automata, and Power Series. TCS, 308(1-3):1-53, 2003. URL:
  62. Jan Rutten. The Method of Coalgebra: Exercises in Coinduction. CWI, Amsterdam, February 2019. URL:
  63. Davide Sangiorgi. On the Bisimulation Proof Method. Mathematical Structures in Computer Science, 8(5):447-479, 1998. Google Scholar
  64. Luigi Santocanale. A Calculus of Circular Proofs and Its Categorical Semantics. In FoSSaCS, pages 357-371, 2002. URL:
  65. Luigi Santocanale. μ-Bicomplete Categories and Parity Games. RAIRO - ITA, 36(2):195-227, 2002. URL:
  66. Luke Simon, Ajay Bansal, Ajay Mallya, and Gopal Gupta. Co-Logic Programming: Extending Logic Programming with Coinduction. In Lars Arge, Christian Cachin, Tomasz Jurdzinski, and Andrzej Tarlecki, editors, Proc. of ICALP'07, volume 4596 of LNCS, pages 472-483. Springer, 2007. URL:
  67. Alex Simpson. Cyclic Arithmetic Is Equivalent to Peano Arithmetic. In Proceedings of FoSSaCS'17, LNCS, 2017. URL:
  68. Craig Smoryński. Self-Reference and Modal Logic. Universitext. Springer-Verlag, 1985. Google Scholar
  69. Ana Sokolova. Probabilistic Systems Coalgebraically: A Survey. TCS, 412(38):5095-5110, 2011. URL:
  70. Robert M. Solovay. Provability Interpretations of Modal Logic. Israel Journal of Mathematics, 25(3):287-304, 1976. URL:
  71. Thomas Streicher. Fibred Categories à La Jean Bénabou. arXiv:math.CT/1801.02927, 2018. URL:
  72. Kasper Svendsen, Filip Sieczkowski, and Lars Birkedal. Transfinite Step-Indexing: Decoupling Concrete and Logical Steps. In Peter Thiemann, editor, Proc. of ESOP'16, volume 9632 of LNCS, pages 727-751. Springer, 2016. URL:
  73. D. A. Turner. Elementary Strong Functional Programming. In Pieter H. Hartel and Marinus J. Plasmeijer, editors, Proceedings of FPLE'95, volume 1022 of LNCS, pages 1-13. Springer, 1995. URL:
  74. Matthijs Vákár, Ohad Kammar, and Sam Staton. A Domain Theory for Statistical Probabilistic Programming. PACMPL, 3(POPL):36:1-36:29, 2019. URL:
  75. Igor Walukiewicz. On Completeness of the Mu-Calculus. In Proceedings of LICS '93, pages 136-146. IEEE Computer Society, 1993. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail