Monads Need Not Be Endofunctors

  • Thorsten Altenkirch
  • James Chapman
  • Tarmo Uustalu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6014)

Abstract

We introduce a generalisation of monads, called relative monads, allowing for underlying functors between different categories. Examples include finite-dimensional vector spaces, untyped and typed λ-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 monads and relative monads. Arrows are also an instance of relative monads.

References

  1. 1.
    Abbott, M., Altenkirch, T., Ghani, N.: Containers—constructing strictly positive types. Theor. Comput. Sci. 342(1), 3–27 (2005)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Abramsky, S., Coecke, B.: A categorical semantics of quantum protocols. In: Proc. of 19th Ann. IEEE Symp. on Logic in Computer Science, LICS 2004, pp. 415–425. IEEE CS Press, Los Alamitos (2004)CrossRefGoogle Scholar
  3. 3.
  4. 4.
    Altenkirch, T., Green, A.: The Quantum IO Monad. In: Gay, S., McKie, I. (eds.) Semantic Techniques in Quantum Computation, pp. 173–205. Cambridge Univ. Press, Cambridge (2009)Google Scholar
  5. 5.
    Altenkirch, T., Reus, B.: Monadic presentations of lambda terms using generalized inductive types. In: Flum, J., Rodríguez-Artalejo, M. (eds.) CSL 1999. LNCS, vol. 1683, pp. 453–468. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  6. 6.
    Fiore, M.: Semantic analysis of normalisation by evaluation for typed lambda calculus. In: Proc. of 4th ACM SIGPLAN Conf. on Principles and Practice of Declarative Programming, PPDP 2002, pp. 26–37. ACM Press, New York (2002)CrossRefGoogle Scholar
  7. 7.
    Fiore, M., Plotkin, G., Turi, D.: Abstract syntax and variable binding. In: Proc. of 14th Ann. IEEE Symp. on Logic in Computer Science, LICS 1999, pp. 193–202. IEEE CS Press, Los Alamitos (1999)Google Scholar
  8. 8.
    Heunen, C., Jacobs, B.: Arrows, like monads, are monoids. In: Brookes, S., Mislove, M. (eds.) Proc. of 22nd Ann. Conf. on Mathematical Foundations of Programming Semantics, MFPS XXII. Electron. Notes in Theor. Comput. Sci, vol. 158, pp. 219–236. Elsevier, Amsterdam (2006)Google Scholar
  9. 9.
    Hughes, J.: Generalising monads to arrows. Sci. of Comput. Program. 37(1-3), 67–111 (2000)MATHCrossRefGoogle Scholar
  10. 10.
    Jacobs, B., Heunen, C., Hasuo, I.: Categorical semantics for arrows. J. of Funct. Program. 19(3-4), 403–438 (2009)MATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Jaskelioff, M.: Lifting of Operations in Modular Monadic Semantics. PhD thesis, University of Nottingham (2009)Google Scholar
  12. 12.
    Manes, E.G.: Algebraic Theories. Springer, Heidelberg (1976)MATHGoogle Scholar
  13. 13.
    McBride, C., Paterson, R.: Applicative programming with effects. J. of Funct. Program. 18(1), 1–13 (2008)MATHGoogle Scholar
  14. 14.
    Morris, P., Altenkirch, T.: Indexed containers. In: Proc. of 24th Ann. IEEE Symp. on Logic in Computer Science, LICS 2009, pp. 277–285. IEEE CS Press, Los Alamitos (2009)Google Scholar
  15. 15.
    Piponi, D.: Commutative monads, diagrams and knots. In: Proc. of 14th Int. Conf. on Functinal Programming, ICFP 2009, p. 231. ACM Press, New York (2009) (see the video) CrossRefGoogle Scholar
  16. 16.
    Power, J., Robinson, E.: Premonoidal categories and notions of computation. Math. Struct. in Comput. Sci. 7(5), 453–468 (1997)MATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Spivey, J.M.: Algebras for combinatorial search. J. of Funct. Program. 19(3-4), 469–487 (2009)MATHCrossRefMathSciNetGoogle Scholar
  18. 18.
    Uustalu, T., Vene, V.: Comonadic notions of computation. In: Adamék, J., Kupke, C. (eds.) Proc. of 9th Int. Wksh. on Coalgebraic Methods in Computer Science, CMCS 2008. Electron. Notes in Theor. Comput. Sci., vol. 203(5), pp. 263–284. Elsevier, Amsterdam (2008)Google Scholar
  19. 19.
    Vizzotto, J.K., Altenkirch, T., Sabry, A.: Structuring quantum effects: Superoperators as arrows. Math. Struct. in Comput. Sci. 16(3), 453–468 (2006)MATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Thorsten Altenkirch
    • 1
  • James Chapman
    • 2
  • Tarmo Uustalu
    • 2
  1. 1.School of Computer ScienceUniversity of Nottingham 
  2. 2.Institute of CyberneticsTallinn University of Technology 

Personalised recommendations