Monads need not be endofunctors

We introduce a generalization of monads, called relative monads, allowing for underlying functors between different categories. Examples include finite-dimensional vector spaces, untyped and typed lambda-calculus syntax and indexed containers. We show that the Kleisli and Eilenberg-Moore constructions carry over to relative monads and are related to relative adjunctions. Under reasonable assumptions, relative monads are monoids in the functor category concerned and extend to monads, giving rise to a coreflection between relative monads and monads. Arrows are also an instance of relative monads.

[1]  John Hughes,et al.  Generalising monads to arrows , 2000, Sci. Comput. Program..

[2]  Mauro Javier Jaskelioff Lifting of operations in modular monadic semantics , 2009 .

[3]  Thorsten Altenkirch,et al.  Structuring quantum effects: superoperators as arrows , 2006, Math. Struct. Comput. Sci..

[4]  Richard Blute,et al.  Categories for computation in context and unified logic , 1997 .

[5]  Peter Selinger,et al.  Dagger Compact Closed Categories and Completely Positive Maps: (Extended Abstract) , 2007, QPL.

[6]  Peter Morris,et al.  Indexed Containers , 2009, 2009 24th Annual IEEE Symposium on Logic In Computer Science.

[7]  Robert D. Tennent,et al.  Semantics of programming languages , 1991, Prentice Hall International Series in Computer Science.

[8]  Ulf Norell Dependently typed programming in Agda , 2009, TLDI '09.

[9]  S. Lack,et al.  The Catalan simplicial set , 2013, Mathematical Proceedings of the Cambridge Philosophical Society.

[10]  Kornel Szlachanyi,et al.  Skew-monoidal categories and bialgebroids , 2012, 1201.4981.

[11]  Tarmo Uustalu Coherence for Skew-Monoidal Categories , 2014, MSFP.

[12]  Dan Piponi,et al.  Commutative monads, diagrams and knots , 2009, ICFP.

[13]  Conor McBride,et al.  Applicative programming with effects , 2008, J. Funct. Program..

[14]  Edmund Robinson,et al.  Premonoidal categories and notions of computation , 1997, Mathematical Structures in Computer Science.

[15]  Gordon D. Plotkin,et al.  Abstract syntax and variable binding , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[16]  Tarmo Uustalu,et al.  Comonadic Notions of Computation , 2008, CMCS.

[17]  Alan Mycroft,et al.  Categorical Programming for Data Types with Restricted Parametricity , 2012 .

[18]  Thorsten Altenkirch,et al.  The Quantum IO Monad , 2006 .

[19]  Kazuyuki Asada,et al.  Arrows are strong monads , 2010, MSFP '10.

[20]  Thorsten Altenkirch,et al.  Containers: Constructing strictly positive types , 2005, Theor. Comput. Sci..

[21]  Clemens Berger,et al.  Monads with arities and their associated theories , 2011, 1101.3064.

[22]  M. Bauer,et al.  Triangulations , 1996, Discret. Math..

[23]  Thorsten Altenkirch,et al.  Monads Need Not Be Endofunctors , 2010, FoSSaCS.

[24]  Charles Grellois,et al.  Algebraic theories, monads, and arities , 2011, ArXiv.

[25]  Samson Abramsky,et al.  A categorical semantics of quantum protocols , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[26]  Marcelo P. Fiore,et al.  Semantic analysis of normalisation by evaluation for typed lambda calculus , 2002, PPDP '02.

[27]  Bart Jacobs,et al.  Under Consideration for Publication in J. Functional Programming Categorical Semantics for Arrows , 2022 .

[28]  Stephen Lack,et al.  Skew monoidales, skew warpings and quantum categories , 2012, 1205.0074.

[29]  Stephen Lack,et al.  Triangulations, orientals, and skew monoidal categories☆ , 2014 .

[30]  J. Roger Hindley,et al.  Introduction to Combinators and Lambda-Calculus , 1986 .

[31]  M. Laplaza,et al.  Coherence for associativity not an isomorphism , 1972 .

[32]  Benedikt Ahrens Initiality for Typed Syntax and Semantics , 2012, WoLLIC.

[33]  Thorsten Altenkirch,et al.  Monadic Presentations of Lambda Terms Using Generalized Inductive Types , 1999, CSL.

[34]  J. Michael Spivey Algebras for combinatorial search , 2009, J. Funct. Program..

[35]  Benedikt Ahrens Modules over relative monads for syntax and semantics , 2016, Math. Struct. Comput. Sci..

[36]  Murdoch James Gabbay,et al.  Denotation of contextual modal type theory (CMTT): Syntax and meta-programming , 2013, J. Appl. Log..

[37]  Chris Heunen,et al.  Arrows, like Monads, are Monoids , 2006, MFPS.