Monads are commonplace in computer science, and can be composed using Beck's distributive laws. Unfortunately, finding distributive laws can be extremely difficult and error-prone. The literature contains some general principles for constructing distributive laws. However, until now there have been no such techniques for establishing when no distributive law exists.
We present three families of theorems for showing when there can be no distributive law between two monads. The first widely generalizes a counterexample attributed to Plotkin. It covers all the previous known no-go results for specific pairs of monads, and includes many new results. The second and third families are entirely novel, encompassing various new practical situations. For example, they negatively resolve the open question of whether the list monad distributes over itself, reveal a previously unobserved error in the literature, and confirm a conjecture made by Beck himself in his first paper on distributive laws. In addition, we establish conditions under which there can be at most one possible distributive law between two monads, proving various known distributive laws to be unique.
Beck's distributive laws provide sufficient conditions under which two monads can be composed, and monads arising from distributive laws have many desirable theoretical properties. Unfortunately, finding and verifying distributive laws, or establishing if one even exists, can be extremely difficult and error-prone. We develop general-purpose techniques for showing when there can be no distributive law between two monads. Two approaches are presented. The first widely generalizes ideas from a counterexample attributed to Plotkin, yielding general-purpose theorems that recover the previously kno…
Motivated by recent work on weak distributive laws and their applications to coalgebraic semantics, we investigate the algebraic nature of semialgebras for a monad. These are algebras for the underlying functor of the monad subject to the associativity axiom alone-the unit axiom from the definition of an Eilenberg-Moore algebras is dropped. We prove that if the underlying category has coproducts, then semialgebras for a monad M are in fact the Eilenberg-Moore algebras for a suitable monad structure on the functor id + M , which we call the semifree monad M^s. We also provide concrete algebraic…
We show how non-symmetric operads (or multicategories), symmetric operads, and clones, arise from three suitable monads on Cat, each extending to a (pseudo-)monad on the bicategory of categories and profunctors. We also explain how other previous categorical analyses of operads (via Day's tensor products, or via analytical functors) fit with the profunctor approach.
Distributive laws of a monad T over a functor F are categorical tools for specifying algebra-coalgebra interaction. They proved to be important for solving systems of corecursive equations, for the specification of well-behaved structural operational semantics and, more recently, also for enhancements of the bisimulation proof method. If T is a free monad, then such distributive laws correspond to simple natural transformations. However, when T is not free it can be rather difficult to prove the defining axioms of a distributive law. In this paper we describe how to obtain a distributive law f…
The coalgebraic modelling of alternating automata and of probabilistic automata has long been obstructed by the absence of distributive laws of the powerset monad over itself, respectively of the powerset monad over the finite distribution monad. This can be fixed using the framework of weak distributive laws. We extend this framework to the case when one of the monads is only a functor. We provide abstract compositionality results, a generalized determinization procedure, and systematic soundness of up-to techniques. Along the way, we apply these results to alternating automata as a motivatin…
The Only Distributive Law Over the Powerset Monad Is the One You Know
University of Birmingham(伯明翰大学);CIDMA, University of Aveiro(阿威罗大学CIDMA研究中心);Universität Duisburg-Essen(杜伊斯堡-埃森大学);Friedrich-Alexander-Universität Erlangen-Nürnberg(埃尔朗根-纽伦堡弗里德里希·亚历山大大学)
We modularly build increasingly larger fragments of the ZX-calculus by modularly adding new generators and relations, at each point, giving some concrete semantics in terms of some category of spans. This is performed using Lack's technique of composing props via distributive laws, as well as the technique of pushout cubes of Zanasi. We do this for the fragment of the ZX-calculus with only the black $π$-phase (and no Hadamard gate) as well as well as the fragment which additionally has the and gate as a generator (which is equivalent to the natural number H-box fragment of the ZH-calculus). In…
Turi and Plotkin introduced an elegant approach to structural operational semantics based on universal coalgebra, parametric in the type of syntax and the type of behaviour. Their framework includes abstract GSOS, a categorical generalisation of the classical GSOS rule format, as well as its categorical dual, coGSOS. Both formats are well behaved, in the sense that each specification has a unique model on which behavioural equivalence is a congruence. Unfortunately, the combination of the two formats does not feature these desirable properties. We show that monotone specifications - that disal…
Monads 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 this line of research, Petrişan and Sarkis recently introduced a construction called the semifree monad in order to study semialgebras for a monad and weak distributive laws. In this paper, we prove that an algebraic presentation of the semifree monad M^s on a monad M can be obtained uniformly from an algebraic presentation of M. This result was conje…
We introduce a novel approach to secure compilation based on maps of distributive laws. We demonstrate through four examples that the coherence criterion for maps of distributive laws can potentially be a viable alternative for compiler security instead of full abstraction, which is the preservation and reflection of contextual equivalence. To that end, we also make use of the well-behavedness properties of distributive laws to construct a categorical argument for the contextual connotations of bisimilarity.