Companions, Codensity and Causality

  • Damien PousEmail author
  • Jurriaan Rot
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10203)


In the context of abstract coinduction in complete lattices, the notion of compatible function makes it possible to introduce enhancements of the coinduction proof principle. The largest compatible function, called the companion, subsumes most enhancements and has been proved to enjoy many good properties. Here we move to universal coalgebra, where the corresponding notion is that of a final distributive law. We show that when it exists the final distributive law is a monad, and that it coincides with the codensity monad of the final sequence of the given functor. On sets, we moreover characterise this codensity monad using a new abstract notion of causality. In particular, we recover the fact that on streams, the functions definable by a distributive law or GSOS specification are precisely the causal functions. Going back to enhancements of the coinductive proof principle, we finally obtain that any causal function gives rise to a valid up-to-context technique.



We are grateful to Henning Basold, Filippo Bonchi, Bart Jacobs, Joshua Moerman, Daniela Petrişan, and Jan Rutten for valuable discussions and comments.


  1. 1.
    Abadi, M., Gordon, A.D.: A bisimulation method for cryptographic protocols. Nord. J. Comput. 5(4), 267 (1998)MathSciNetzbMATHGoogle Scholar
  2. 2.
    Abramsky, S.: The lazy lambda calculus. In: Research Topics in Functional Programming, pp. 65–116. Addison Wesley (1990)Google Scholar
  3. 3.
    Adámek, J.: Free algebras and automata realizations in the language of categories. Commentationes Mathematicae Universitatis Carolinae 15(4), 589–602 (1974)MathSciNetzbMATHGoogle Scholar
  4. 4.
    Barr, M.: Algebraically compact functors. J. Pure Appl. Algebra 82(3), 211–231 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Bartels, F.: On generalised coinduction and probabilistic specification formats. PhD thesis, CWI, Amsterdam, April 2004Google Scholar
  6. 6.
    Bonchi, F., Petrisan, D., Pous, D., Rot, J.: Coinduction up-to in a fibrational setting. In: Proceeding CSL-LICS, pp. 20:1–20:9. ACM (2014)Google Scholar
  7. 7.
    Bonchi, F., Petrişan, D., Pous, D., Rot, J.: A general account of coinduction up-to. Acta Informatica, pp. 1–64 (2016)Google Scholar
  8. 8.
    Cordier, J.-M., Porter, T.: Shape Theory: Categorical Methods of Approximation. Mathematics and its Applications. Ellis Horwood, New York (1989). Reprinted by Dover, 2008zbMATHGoogle Scholar
  9. 9.
    Endrullis, J., Hendriks, D., Bodin, M.: Circular coinduction in coq using bisimulation-up-to techniques. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 354–369. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-39634-2_26 CrossRefGoogle Scholar
  10. 10.
    Fournet, C., Lévy, J.-J., Schmitt, A.: An asynchronous, distributed implementation of mobile ambients. In: Leeuwen, J., Watanabe, O., Hagiya, M., Mosses, P.D., Ito, T. (eds.) TCS 2000. LNCS, vol. 1872, pp. 348–364. Springer, Heidelberg (2000). doi: 10.1007/3-540-44929-9_26 CrossRefGoogle Scholar
  11. 11.
    Gambino, N., Kock, J.: Polynomial functors and polynomial monads. In: Proceeding of Mathematical proceedings of the cambridge philosophical society, vol. 154, pp. 153–192. Cambridge University Press (2013)Google Scholar
  12. 12.
    Hansen, H.H., Kupke, C., Rutten, J.: Stream differential equations: specification formats and solution methods. CoRR, abs/1609.08367 (2016)Google Scholar
  13. 13.
    Hur, C., Neis, G., Dreyer, D., Vafeiadis, V.: The power of parameterization in coinductive proof. In: Proceeding of POPL, pp. 193–206. ACM (2013)Google Scholar
  14. 14.
    Jacobs, B.: Distributive laws for the coinductive solution of recursive equations. Inf. Comput. 204(4), 561–587 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Jacobs, B.: Introduction to coalgebra. Towards mathematics of states and observations. Draft (2014)Google Scholar
  16. 16.
    Jeffrey, A., Rathke, J.: A theory of bisimulation for a fragment of concurrent ML with local names. Theor. Comput. Sci. 323(1–3), 1–48 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Klin, B.: Bialgebras for structural operational semantics: an introduction. Theor. Comput. Sci. 412(38), 5043–5069 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Klin, B., Nachyla, B.: Presenting morphisms of distributive laws. In: Proceeding CALCO, vol. 35. LIPIcs, pp. 190–204. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2015)Google Scholar
  19. 19.
    Knaster, B.: Un théorème sur les fonctions d’ensembles. Annales de la Socit Polonaise de Mathmatiques 6, 133–134 (1928)zbMATHGoogle Scholar
  20. 20.
    Lane, S.M.: Categories for the Working Mathematician. Springer, New York (1998)zbMATHGoogle Scholar
  21. 21.
    Leinster, T.: Codensity and the ultrafilter monad. Theory and Applications of Categories 28(13), 332–370 (2013)MathSciNetzbMATHGoogle Scholar
  22. 22.
    Lenisa, M., Power, J., Watanabe, H.: Distributivity for endofunctors, pointed and co-pointed endofunctors, monads and comonads. Electron. Notes Theor. Comput. Sci. 33, 230–260 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Lenisa, M., Power, J., Watanabe, H.: Category theory for operational semantics. Theor. Comput. Sci. 327(1–2), 135–154 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  24. 24.
    Leroy, X.: Formal verification of a realistic compiler. Commun. ACM 52(7), 107–115 (2009)CrossRefGoogle Scholar
  25. 25.
    Milius, S., Moss, L.S., Schwencke, D.: Abstract GSOS rules and a modular treatment of recursive definitions. Logical Methods Comput. Sci. 9(3) (2013)Google Scholar
  26. 26.
    Milner, R.: Communication and Concurrency. Prentice Hall (1989)Google Scholar
  27. 27.
    Milner, R., Parrow, J., Walker, D.: A calculus of mobile processes I/II. Inf. Comput. 100(1), 1–77 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  28. 28.
    nLab article. Kan extension 2016. (Revision 103),
  29. 29.
    Parrow, J., Weber, T.: The largest respectful function. Logical Methods Comput. Sci. 12(2) (2016)Google Scholar
  30. 30.
    Pous, D.: Complete lattices and up-to techniques. In: Shao, Z. (ed.) APLAS 2007. LNCS, vol. 4807, pp. 351–366. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-76637-7_24 CrossRefGoogle Scholar
  31. 31.
    Pous,D.: Coinduction all the way up. In: Proceeding LICS, pp. 307-316. ACM (2016)Google Scholar
  32. 32.
    Pous, D., Rot, J.: Companions, Codensity, and Causality. In: Esparza, J., Murawski, A.S. (eds.) FOSSACS 2017 LNCS, vol. 10203, pp. 106–123. Springer, Heidelberg (2017). (version with proofs),
  33. 33.
    Pous, D., Sangiorgi, D.: Advanced Topics in Bisimulation and Coinduction, chapter about “Enhancements of the coinductive proof method”. Cambridge University Press (2011)Google Scholar
  34. 34.
    Power, J., Watanabe, H.: Combining a monad and a comonad. Theor. Comput. Sci. 280(1–2), 137–162 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  35. 35.
    Rot, J., Bonsangue, M.M., Rutten, J.: Proving language inclusion and equivalence by coinduction. Inf. Comput. 246, 62–76 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  36. 36.
    Rot, J., Winter, J.: On language equations and grammar coalgebras for context-free languages. In: Proceeding CALCO Early Ideas (2013)Google Scholar
  37. 37.
    Rutten, J.J.M.M.: A coinductive calculus of streams. Math. Struct. Comput. Sci. 15(1), 93–147 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  38. 38.
    Sangiorgi, D.: On the bisimulation proof method. Math. Struct. Comput. Sci. 8, 447–479 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  39. 39.
    Sangiorgi, D., Walker, D.: The \(\pi \)-calculus: a theory of mobile processes. Cambridge University Press (2001)Google Scholar
  40. 40.
    Sevcík, J., Vafeiadis, V., Nardelli, F.Z., Jagannathan, S., Sewell, P.: CompCertTSO: a verified compiler for relaxed-memory concurrency. J. ACM 60(3), 22 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
  41. 41.
    Silva, A., Bonchi, F., Bonsangue, M., Rutten, J.: Generalizing the powerset construction, coalgebraically. In: Proceeding FSTTCS, pp. 272–283 (2010)Google Scholar
  42. 42.
    Tarski, A.: A lattice-theoretical fixpoint theorem, its applications. Pacific J. Math. 5(2), 285–309 (1955)MathSciNetCrossRefzbMATHGoogle Scholar
  43. 43.
    Turi, D., Plotkin, G.D.: Towards a mathematical operational semantics. In: Proceeding LICS, pp. 280-291. IEEE (1997)Google Scholar
  44. 44.
    Watanabe, H.: Well-behaved translations between structural operational semantics. Electron. Notes Theor. Comput. Sci. 65(1), 337–357 (2002)CrossRefzbMATHGoogle Scholar
  45. 45.
    Winter, J., Bonsangue, M.M., Rutten, J.J.M.M.: Coalgebraic characterizations of context-free languages. Logical Methods Comput. Sci. 9(3) (2013)Google Scholar

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  1. 1.Univ Lyon, CNRS, ENS de Lyon, UCB Lyon 1, LIPLyonFrance
  2. 2.Radboud UniversityNijmegenThe Netherlands
  3. 3.CWIAmsterdamThe Netherlands

Personalised recommendations