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.
- 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 Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- Nikolai Durov. 2007. New Approach to Arakelov Geometry. arXiv eprint 0704.2030. arxiv:0704.2030. arxiv:0704.2030
Google Scholar
- 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 Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- Paul Blain Levy. 2019. Locally Graded Categories. Slides. https://www.cs.bham.ac.uk/~pbl/papers/locgrade.pdf
Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Cross Ref
- Richard J. Wood. 1976. Indicial Methods for Relative Categories. Ph. D. Dissertation. Dalhousie University. http://hdl.handle.net/10222/55465
Google Scholar
Index Terms
Flexible presentations of graded monads
Recommendations
Flexibly Graded Monads and Graded Algebras
Mathematics of Program ConstructionAbstractWhen modelling side-effects using a monad, we need to equip the monad with effectful operations. This can be done by noting that each algebra of the monad carries interpretations of the desired operations. We consider the analogous situation for ...
Algebraic Presentation of Semifree Monads
Coalgebraic Methods in Computer ScienceAbstractMonads and their composition via distributive laws have many applications in program semantics and functional programming. For many interesting monads, distributive laws fail to exist, and this has motivated investigations into weaker notions. In ...
Parametric effect monads and semantics of effect systems
POPL '14We study fundamental properties of a generalisation of monad called parametric effect monad, and apply it to the interpretation of general effect systems whose effects have sequential composition operators. We show that parametric effect monads admit ...






Comments