Abstract
Monads are widely used in programming semantics and in functional programming to encapsulate notions of side-effect, such as state, exceptions, input/output, or continuations. One of their advantages is that they allow for a modular treatment of effects, using composition operators such as sum and tensor. Here, the sum represents the non-interacting combination of effects, while the tensor imposes a high degree of interaction in the shape of a commutation law. Although many important effects are ranked, i.e. presented by algebraic operations of bounded arity, there is also a range of relevant unranked effects, with prominent examples including continuations and unbounded non-determinism. While the sum and tensor of ranked effects always exist, this is not so clear already when one of the components is unranked, in which case size problems come into play. In contrast to the case of sums where a counterexample can be constructed rather trivially, the general existence of tensors has, so far, been an open issue — as the tensor identifies more terms than the sum, it does exist in many cases where the sum fails to exist. As a possible counterexample, tensors of continuations with unranked effects have been discussed; however, we have disproved that possibility in recent work. In the present work, we nevertheless settle the question in the negative by presenting a well-order monad whose tensor with a simple ranked monad fails to exist; as a consequence, we show also that there is an unranked monad whose tensor with the finite list monad fails to exist.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abelson, H., Dybvig, K., Haynes, C., Rozas, G., Adams, N., Friedman, D., Kohlbecker, E., Steele, G., Bartley, D., Halstead, R., Oxley, D., Sussman, G., Brooks, G., Hanson, C., Pitman, K., Wand, M.: Revised report on the algorithmic language Scheme. Higher-Order Symb. Comput. 11, 7–105 (1998)
Abramsky, S., Jung, A.: Domain theory. In: Handbook of Logic in Computer Science, vol. 3, pp. 1–168. Oxford University Press, Oxford (1994)
Adámek, J., Herrlich, H., Strecker, G.: Abstract and concrete categories. John Wiley & Sons Inc., New York (1990)
Cenciarelli, P., Moggi, E.: A syntactic approach to modularity in denotational semantics. In: Category Theory and Computer Science, CTCS 1993 (1993)
Droste, M., Kuich, W., Vogler, H. (eds.): Handbook of Weighted Automata. Springer, Heidelberg (2009)
Freyd, P.: Algebra valued functors in general and tensor products in particular. Colloq. Math. 14, 89–106 (1966)
Goncharov, S., Schröder, L.: Powermonads and tensors of unranked effects. In: Logic in Computer Science, LICS 2011, pp. 227–236. IEEE Computer Society Press, Los Alamitos (2011)
Goncharov, S., Schröder, L., Mossakowski, T.: Kleene monads: handling iteration in a framework of generic effects. In: Kurz, A., Lenisa, M., Tarlecki, A. (eds.) CALCO 2009. LNCS, vol. 5728, pp. 18–33. Springer, Heidelberg (2009)
Hyland, M., Levy, P., Plotkin, G., Power, J.: Combining algebraic effects with continuations. Theoret. Comput. Sci. 375, 20–40 (2007)
Hyland, M., Plotkin, G., Power, J.: Combining effects: Sum and tensor. Theoret. Comput. Sci. 357, 70–99 (2006)
Hyland, M., Power, J.: The category theoretic understanding of universal algebra: Lawvere theories and monads. ENTCS 172, 437–458 (2007)
Linton, F.: Some aspects of equational categories. In: Proc. Conf. Categor. Algebra, La Jolla, pp. 84–94 (1966)
Lüth, C., Ghani, N.: Composing monads using coproducts. In: International Conference on Functional Programming, ICFP 2002, pp. 133–144. ACM Press, New York (2002)
Manes, E.: A triple theoretic construction of compact algebras. In: Seminar on Triples and Categorical Homology Theory. Lect. Notes Math., vol. 80, pp. 91–118. Springer, Heidelberg (1969)
Moggi, E.: Notions of computation and monads. Inf. Comput. 93, 55–92 (1991)
Moggi, E.: A semantics for evaluation logic. Fund. Inform. 22, 117–152 (1995)
Peyton-Jones, S. (ed.): Haskell 98 Language and Libraries — The Revised Report. Cambridge University Press, Cambridge (2003); Also: J. Funct. Prog. 13 (2003)
Plotkin, G., Power, J.: Notions of computation determine monads. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 342–356. Springer, Heidelberg (2002)
Power, J., Shkaravska, O.: From comodels to coalgebras: State and arrays. In: Coalgebraic Methods in Computer Science, CMCS 2004. ENTCS, vol. 106, pp. 297–314. Elsevier, Amsterdam (2004)
Schröder, L., Mossakowski, T.: Generic exception handling and the java monad. In: Rattray, C., Maharaj, S., Shankland, C. (eds.) AMAST 2004. LNCS, vol. 3116, pp. 443–459. Springer, Heidelberg (2004)
Wadler, P.: How to declare an imperative. ACM Comput. Surveys 29, 240–263 (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Goncharov, S., Schröder, L. (2011). A Counterexample to Tensorability of Effects. In: Corradini, A., Klin, B., Cîrstea, C. (eds) Algebra and Coalgebra in Computer Science. CALCO 2011. Lecture Notes in Computer Science, vol 6859. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22944-2_15
Download citation
DOI: https://doi.org/10.1007/978-3-642-22944-2_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22943-5
Online ISBN: 978-3-642-22944-2
eBook Packages: Computer ScienceComputer Science (R0)