skip to main content
research-article
Open Access

Flexible presentations of graded monads

Published:31 August 2022Publication History
Skip Abstract Section

Abstract

A large class of monads used to model computational effects have natural presentations by operations and equations, for example, the list monad can be presented by a constant and a binary operation subject to unitality and associativity. Graded monads are a generalization of monads that enable us to track quantitative information about the effects being modelled. Correspondingly, a large class of graded monads can be presented using an existing notion of graded presentation. However, the existing notion has some deficiencies, in particular many effects do not have natural graded presentations.

We introduce a notion of flexibly graded presentation that does not suffer from these issues, and develop the associated theory. We show that every flexibly graded presentation induces a graded monad equipped with interpretations of the operations of the presentation, and that all graded monads satisfying a particular condition on colimits have a flexibly graded presentation. As part of this, we show that the usual algebra-preserving correspondence between presentations and a class of monads transfers to an algebra-preserving correspondence between flexibly graded presentations and a class of flexibly graded monads.

References

  1. Jiří Adámek and Jiří Rosický. 2001. On Sifted Colimits and Generalized Varieties. Theory Appl. Categ., 8, 3 (2001), 33–53. http://www.tac.mta.ca/tac/volumes/8/n3/8-03abs.html Revised 2007 Google ScholarGoogle Scholar
  2. Thorsten Altenkirch, James Chapman, and Tarmo Uustalu. 2015. Monads Need Not Be Endofunctors. Log. Methods Comput. Sci., 11, 1 (2015), Article 3, 40 pages. https://doi.org/10.2168/lmcs-11(1:3)2015 Google ScholarGoogle ScholarCross RefCross Ref
  3. Paul M. Cohn. 1981. Universal Algebra (revised ed.) (Mathematics and Its Applications, Vol. 6). D. Reidel Publ. Co., Dordrecht, Boston, London. https://doi.org/10.1007/978-94-009-8399-1 Google ScholarGoogle ScholarCross RefCross Ref
  4. Ulrich Dorsch, Stefan Milius, and Lutz Schröder. 2019. Graded Monads and Graded Logics for the Linear Time–Branching Time Spectrum. In 30th Int. Conf. on Concurrency Theory, CONCUR 2019, Wan Fokkink and Rob van Glabbeek (Eds.) (Leibniz Int. Proc. in Informatics, Vol. 140). Dagstuhl Publishing, Saarbrücken/Wadern. 36:1–36:16. https://doi.org/10.4230/lipics.concur.2019.36 Google ScholarGoogle ScholarCross RefCross Ref
  5. Nikolai Durov. 2007. New Approach to Arakelov Geometry. arXiv eprint 0704.2030. arxiv:0704.2030. arxiv:0704.2030 Google ScholarGoogle Scholar
  6. Tobias Fritz and Paolo Perrone. 2019. A Probability Monad as the Colimit of Spaces of Finite Samples. Theory Appl. Categ., 34, 7 (2019), 170–220. http://www.tac.mta.ca/tac/volumes/34/7/34-07abs.html Google ScholarGoogle Scholar
  7. Soichiro Fujii, Shin-ya Katsumata, and Paul-André Melliès. 2016. Towards a Formal Theory of Graded Monads. In Foundations of Software Science and Computation Structures: 19th Int. Conf., FoSSaCS 2016, Eindhoven, The Netherlands, April 2–8, 2016, Proceedings, Bart Jacobs and Christof Löding (Eds.) (Lect. Notes in Comput. Sci., Vol. 9634). Springer, Cham. 513–530. https://doi.org/10.1007/978-3-662-49630-5_30 Google ScholarGoogle ScholarCross RefCross Ref
  8. Marco Gaboardi, Shin-ya Katsumata, Dominic Orchard, and Tetsuya Sato. 2021. Graded Hoare Logic and Its Categorical Semantics. In Programming Languages and Systems: 30th Europ. Symp. on Programming, ESOP 2021, Luxembourg City, Luxembourg, March 27 – April 1, 2021, Proceedings, Nobuko Yoshida (Ed.) (Lect. Notes in Comput. Sci., Vol. 12648). Springer, Cham. 234–263. https://doi.org/10.1007/978-3-030-72019-3_9 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Sergey Goncharov. 2013. Trace Semantics via Generic Observations. In Algebra and Coalgebra in Computer Science: 5th Int. Conf. CALCO 2013, Warsaw, Poland, September 3–6, 2013, Proceedings, Reiko Heckel and Stefan Milius (Eds.) (Lect. Notes in Comput. Sci., Vol. 8089). Springer, Berlin, Heidelberg. 158–174. https://doi.org/10.1007/978-3-642-40206-7_13 Google ScholarGoogle ScholarCross RefCross Ref
  10. Robert Gordon and A. John Power. 1999. Gabriel-Ulmer Duality for Categories Enriched in Bicategories. J. Pure Appl. Alg., 137, 1 (1999), 29–48. https://doi.org/10.1016/s0022-4049(97)00167-9 Google ScholarGoogle ScholarCross RefCross Ref
  11. Martin Hyland, Gordon Plotkin, and John Power. 2006. Combining Computational Effects: Commutativity and Sum. Theor. Comput. Sci., 357, 1–3 (2006), 70–99. https://doi.org/10.1016/j.tcs.2006.03.013 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ohad Kammar and Gordon D. Plotkin. 2012. Algebraic Foundations for Effect-Dependent Optimisations. In Proc. of 39th Ann. ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL ’12, Philadelphia, PA, USA, January 22–28, 2012. ACM Press, New York. 349–360. https://doi.org/10.1145/2103656.2103698 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Shin-ya Katsumata. 2014. Parametric Effect Monads and Semantics of Effect Systems. In Proc. of 41st Ann. ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20-21, 2014. ACM Press, New York. 633–645. https://doi.org/10.1145/2535838.2535846 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. G. Max Kelly. 1982. Basic Concepts of Enriched Category Theory (London Math. Soc. Lecture Note Series, Vol. 64). Cambridge University Press, Cambridge. Reprinted (2005) as: Reprints in Theory and Applications of Categories 10, http://www.tac.mta.ca/tac/reprints/articles/10/tr10abs.html Google ScholarGoogle Scholar
  15. G. Max Kelly and A. John Power. 1993. Adjunctions Whose Counits Are Coequalizers, and Presentations of Finitary Enriched Monads. J. Pure Appl. Alg., 89, 1–2 (1993), 163–179. https://doi.org/10.1016/0022-4049(93)90092-8 Google ScholarGoogle ScholarCross RefCross Ref
  16. Satoshi Kura. 2020. Graded Algebraic Theories. In Foundations of Software Science and Computation Structures: 23rd Int. Conf., FoSSaCS 2020, Dublin, Ireland, April 25–30, 2020, Proceedings, Jean Goubault-Larrecq and Barbara König (Eds.) (Lect. Notes in Comput. Sci., Vol. 12077). Springer, Cham. 401–421. https://doi.org/10.1007/978-3-030-45231-5_21 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Stephen Lack and Jiří Rosický. 2011. Notions of Lawvere Theory. Appl. Categ. Struct., 19, 1 (2011), 363–391. https://doi.org/10.1007/s10485-009-9215-2 Google ScholarGoogle ScholarCross RefCross Ref
  18. Paul Blain Levy. 2019. Locally Graded Categories. Slides. https://www.cs.bham.ac.uk/~pbl/papers/locgrade.pdf Google ScholarGoogle Scholar
  19. John M. Lucassen and David K. Gifford. 1988. Polymorphic Effect Systems. In Conf. Record of 15th Ann. ACM Symp. on Principles of Programming Languages, POPL ’88, San Diego, CA, USA, January 10–13, 1988. ACM Press, New York. 47–57. https://doi.org/10.1145/73560.73564 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Dylan McDermott and Tarmo Uustalu. 2022. Flexibly Graded Monads and Graded Algebras. In Mathematics of Program Construction: 14th Int. Conf., MPC 2022, Tbilisi, Georgia, September 26–28, 2022, Proceedings, Ekaterina Komendantskaya (Ed.). Lect. Notes in Comput. Sci. Springer, Cham. (to appear) Google ScholarGoogle Scholar
  21. Paul-André Melliès. 2010. Segal Condition Meets Computational Effects. In Proc. of 25th Ann. IEEE Symp. on Logic in Computer Science, LICS ’10, 11–14 July 2010, Edinburgh, United Kingdom. IEEE, Los Alamitos, CA. 150–159. https://doi.org/10.1109/lics.2010.46 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Paul-André Melliès. 2012. Parametric Monads and Enriched Adjunctions. Manuscript. https://www.irif.fr/~mellies/tensorial-logic/8-parametric-monads-and-enriched-adjunctions.pdf Google ScholarGoogle Scholar
  23. Stefan Milius, Dirk Pattinson, and Lutz Schröder. 2015. Generic Trace Semantics and Graded Monads. In 6th Conf. on Algebra and Coalgebra in Computer Science, CALCO 2015, Lawrence S. Moss and Paweł Sobociński (Eds.) (Leibniz Int. Proceedings in Informatics, Vol. 35). Dagstuhl Publishing, Saarbrücken/Wadern. 253–269. https://doi.org/10.4230/lipics.calco.2015.253 Google ScholarGoogle ScholarCross RefCross Ref
  24. Alan Mycroft, Dominic Orchard, and Tomas Petricek. 2016. Effect Systems Revisited: Control-Flow Algebra and Semantics. In Semantics, Logics, and Calculi: Essays Dedicated to Hanne Riis Nielson and Flemming Nielson on the Occasion of Their 60th Birthdays, Christian W. Probst, Chris Hankin, and René Rydhof Hansen (Eds.) (Lect. Notes in Comput. Sci., Vol. 9560). Springer, Cham. 1–32. isbn:978-3-319-27810-0 https://doi.org/10.1007/978-3-319-27810-0_1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Maciej Piróg and Sam Staton. 2017. Backtracking with Cut via a Distributive Law and Left-Zero Monoids. J. Funct. Program., 27 (2017), Article e17, 15 pages. https://doi.org/10.1017/s0956796817000077 Google ScholarGoogle ScholarCross RefCross Ref
  26. Gordon Plotkin and John Power. 2002. Notions of Computation Determine Monads. In Foundations of Software Science and Computation Structures: 5th Int. Conf., FoSSaCS 2002, Grenoble, France, April 8–12, 2002, Proceedings, Mogens Nielsen and Uffe Engberg (Eds.) (Lect. Notes in Comput. Sci., Vol. 2303). Springer, Berlin, Heidelberg. 342–356. https://doi.org/10.1007/3-540-45931-6_24 Google ScholarGoogle ScholarCross RefCross Ref
  27. Gordon Plotkin and John Power. 2003. Algebraic Operations and Generic Effects. Appl. Categ. Struct., 11 (2003), 69–94. https://doi.org/10.1023/a:1023064908962 Google ScholarGoogle ScholarCross RefCross Ref
  28. A.L. Smirnov. 2008. Graded Monads and Rings of Polynomials. J. Math. Sci., 151, 3 (2008), 3032–3051. https://doi.org/10.1007/s10958-008-9013-7 Google ScholarGoogle ScholarCross RefCross Ref
  29. Sam Staton. 2013. An Algebraic Presentation of Predicate Logic. In Foundations of Software Science and Computation Structures: 16th Int. Conf., FOSSACS 2013, Rome, Italy, March 16–24, 2013, Proceedings, Frank Pfenning (Ed.) (Lect. Notes in Comput. Sci., Vol. 7794). Springer, Berlin, Heidelberg. 401–417. https://doi.org/10.1007/978-3-642-37075-5_26 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Ross Street. 1972. Two Constructions on Lax Functors. Cah. Topol. Géom. Diff. Catég., 13, 3 (1972), 217–264. http://www.numdam.org/item/CTGDC_1972__13_3_217_0 Google ScholarGoogle Scholar
  31. Kornél Szlachányi. 2017. On the Tensor Product of Modules over Skew Monoidal Actegories. J. Pure Appl. Algebra, 221, 1 (2017), 185–221. https://doi.org/10.1016/j.jpaa.2016.06.003 Google ScholarGoogle ScholarCross RefCross Ref
  32. Richard J. Wood. 1976. Indicial Methods for Relative Categories. Ph. D. Dissertation. Dalhousie University. http://hdl.handle.net/10222/55465 Google ScholarGoogle Scholar

Index Terms

  1. Flexible presentations of graded monads

        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!