Skip to content

Distributive Law Between Monads

A natural transformation λ:TS⇒ST coherent with both monads' units and multiplications, allowing the ordered composite ST to inherit a monad structure.

Version
v1 · 2026-10-03 · History
Domain-specific #
13160
Aliases
Beck Distributive Law Between Monads

Core Idea

A distributive law between two monads \(S\) and \(T\) on one category is a natural transformation \(\lambda:TS\Rightarrow ST\) that respects both monads' units and multiplications in four Beck equations. The verified interchange makes the ordered composite \(ST\) a monad: its multiplication swaps the middle \(TS\) layers of \(STST\) and then flattens the two \(S\) and two \(T\) layers. Authors sometimes exchange the letters \(S,T\); the arrow type, not the phrase “distributes over,” determines the composite order.[1][2]

How would you explain it like I'm…

 

No faithful explanation at this level. Any child-level picture reduces to 'just swap two kinds of wrapping,' which is exactly the naive objectwise swap that is insufficient without the four coherence equations.

 

No faithful explanation at this level. Without units, multiplications and natural transformations, the idea collapses into 'you can always reorder two kinds of boxes.' That hides the coherence equations and the fact that not every pair of monads admits such a law.

Coherent Swap for Composing Monads

In category theory, a monad is a way of wrapping things in a layer of structure, with a rule for adding a trivial layer (the unit) and a rule for flattening two layers of the same kind into one (the multiplication). Given two monads S and T, you might want to combine them into a single wrapper ST, but then flattening STST is a problem because the layers are interleaved. A distributive law is a chosen way λ of turning TS into ST that lets you move the middle layers past each other, giving SSTT, which you can then flatten. It only counts if it satisfies four consistency equations with both monads' units and multiplications, not just if it looks like a natural swap. Order matters, so you specify the arrow's direction rather than saying 'S distributes over T.' Having a law is enough to build the combined monad, but not every pair of monads has one.

 

A distributive law between monads S and T on the same category is a natural transformation λ: TS ⇒ ST (in this convention) that is compatible with both monads' units η and multiplications μ. Compatibility is expressed by four Beck equations, two for each monad; a merely plausible objectwise swap of layers is not enough. When these hold, the composite functor ST becomes a monad: its unit combines η^S and η^T, and its multiplication takes STST, applies SλT to reach SSTT, then flattens with μ^S and μ^T. Conventions differ across the literature: Zwart and Marsden write λ: ST ⇒ TS, which yields TS, so letters must be exchanged to compare. Because phrases like 'S distributes over T' are ambiguous, the arrow type and the resulting outer functor are the reliable specification. The law is sufficient for this canonical composite, but not every pair of monads admits one, and not every monad structure on a composite arises from a distributive law.

Scope of Application

The free-monoid/list monad \(L\) distributes over the free-abelian-group monad \(A\) by \(LA\Rightarrow AL\), yielding the free-ring monad \(AL\). In computational semantics, the exception monad \(E(X)=X+E_0\) distributes over any monad \(M\) by \(EM\Rightarrow ME\); a singleton exception has the Maybe/optional-result form. These are different interactions with the same categorical proof obligations. Reversing a law is not automatic: the standard reverse \(AL\Rightarrow LA\) is a published no-go case.[2][3]

Clarity

A plausible objectwise swap is insufficient. It must be natural and satisfy both unit and both multiplication compatibility diagrams. The law is distinct from ordinary distributivity between binary operations and from a monoidal monad's tensor comparison. It is also not a guarantee that every pair of monads combines in the desired order.[1][2]

Manages Complexity

The four Beck laws reduce a difficult composite-unit-and-multiplication construction to a reusable interchange test. Once established, \(STST\xrightarrow{S\lambda T}SSTT\to ST\) defines the composite multiplication coherently. The method certifies a specific interaction; it does not choose which interaction a program or algebra ought to use.[1][3]

Abstract Reasoning

To assess a candidate composite, identify the two monads, type the proposed arrow, and verify naturality plus all four diagrams. If the arrow is \(TS\Rightarrow ST\), the licensed result is \(ST\). A failure of a unit or multiplication diagram blocks this Beck construction, while absence of one direction says nothing by itself about the other direction. The free-ring positive/reverse-negative pair shows why the distinction matters.[1][2]

Knowledge Transfer

The categorical test applies literally to ring construction, list/powerset choices and exception layering; what changes is the concrete action of \(\lambda\). A simple algebraic expansion may suggest a candidate, but cannot replace the naturality and coherence proof. No checked live prime currently supplies a necessary typed genus, so this draft is staged unparented rather than connected by word resemblance.[1][2][3]

Neighborhood in Abstraction Space

Distributive Law Between Monads sits in a moderately populated region (58th percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Abstract Algebra & Category Theory (26 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Louis Parlant, Monad Composition via Preservation of Algebras, University College London PhD thesis, PDF pp. 38–40, Definition 2.64, Eq. (2.16), Theorems 2.65–2.66. registry ↩a ↩b ↩c ↩d ↩e

[2] Maaike Zwart and Dan Marsden, “No-Go Theorems for Distributive Laws”, Logical Methods in Computer Science 18(1):13 (2022), PDF pp. 5–6 and 44–45. registry ↩a ↩b ↩c ↩d ↩e

[3] Rasmus E. Møgelberg and Maaike Zwart, “What Monads Can and Cannot Do With a Few Extra Pages”, Logical Methods in Computer Science 21(4):5 (2025), PDF p. 9 §4 “Exceptions.” registry ↩a ↩b ↩c