---
title: Walking Distributive Law
url: https://www.emergentmind.com/topics/walking-distributive-law
type: topic
---

# Walking Distributive Law

Searching arXiv for the cited papers and closely related work on walking distributive laws and distributive laws of monads.
The walking distributive law is the universal strict 2-categorical object encoding two monads on a common object together with a distributive law between them. In the semi-strict formulation, it is defined by
$$
\mathrm{Dist} := B\Delta_+ \otimes_l B\Delta_+,
$$
where \(B\Delta_+\) is the walking monad and \(\otimes_l\) is the lax Gray tensor product; strict 2-functors out of \(\mathrm{Dist}\) are equivalently distributive laws in the target 2-category [2509.22208]. A parallel presentation describes a single-object 2-category \(\mathbb W\) generated by two endo-1-cells, their monad structures, and a 2-cell \(\lambda: S\circ T \Rightarrow T\circ S\), subject to the monad axioms and Beck coherences, thereby exhibiting the same universal role in a more explicitly algebraic form [2404.00581].

## 1. Monad-theoretic precursor: the walking monad

The construction begins with the observation that a monad in a 2-category \(\mathcal B\) is a lax 2-functor
$$
M:\mathbf 1 \to \mathcal B
$$
from the terminal strict 2-category \(\mathbf 1\). Such a lax 2-functor sends the unique object to an object \(X\in\mathcal B\), the unique 1-cell to an endo-1-cell \(t:X\to X\), and carries structure 2-cells
$$
M_u:\mathrm{Id}_X \Rightarrow t,
\qquad
M_c:t\cdot t \Rightarrow t
$$
satisfying the usual unit and associativity axioms [2509.22208].

This factorization yields a fully faithful embedding
$$
\mathrm{Lax}[\mathbf 1,\mathcal B] \simeq \mathrm{Mnd}(\mathcal B).
$$
Concretely, the strict 2-category \(B\Delta_+\), described as the delooping of the monoidal category \((\Delta_+,\oplus,[-1])\), is the free 2-category on one object \(*\) with one 1-cell \([0]\) and unary operations \(\delta,\sigma\). Its universal property is that strict 2-functors
$$
B\Delta_+ \to \mathcal B
$$
correspond to monads in \(\mathcal B\). For this reason \(B\Delta_+\) is called the walking monad [2509.22208].

The walking monad is the basic “free” carrier of monad structure. This suggests that any universal object encoding interactions between monads should arise by combining copies of \(B\Delta_+\) in a monoidal structure on \(2\)-Cat.

## 2. Gray tensor as the mechanism of interaction

The relevant monoidal structure is the lax Gray tensor product \(\otimes_l\) on \(2\)-Cat, characterized by the adjunction
$$
2\mathrm{Cat}[\mathcal B,\mathrm{Lax}[\mathcal C,\mathcal D]]
\;\simeq\;
2\mathrm{Cat}[\mathcal B\otimes_l \mathcal C,\mathcal D].
$$
For strict 2-categories \(\mathcal B,\mathcal C\), the tensor \(\mathcal B\otimes_l\mathcal C\) has 0-cells given by pairs \((b,c)\), 1-cells generated under composition by horizontal steps \((f,\mathrm{id})\) and \((\mathrm{id},g)\), and 2-cells generated by \((\phi,\mathrm{id})\), \((\mathrm{id},\psi)\), and the interchanger
$$
\gamma_{f,g}:(f,\mathrm{id})\cdot(\mathrm{id},g)\Rightarrow(\mathrm{id},g)\cdot(f,\mathrm{id}),
$$
subject to coherence relations expressing compatibility with vertical and horizontal composition, functoriality in \(f\) and \(g\), and the pentagon–triangle axioms making \(\gamma\) into a strength [2509.22208].

In the summary formulation, the interchanger additionally satisfies identities such as
$$
\gamma_{f,\mathrm{id}}=\mathrm{id},
\qquad
\gamma_{\mathrm{id},g}=\mathrm{id},
$$
together with composition laws including
$$
\gamma_{f_1\cdot f_2,g}
=
(\gamma_{f_1,g}\cdot(f_2,\mathrm{id}))
\circ
((f_1,\mathrm{id})\cdot \gamma_{f_2,g}),
$$
and analogous relations [2509.22208].

The Gray tensor is therefore not merely a product of 2-categories. Its interchanger generates exactly the kind of nontrivial comparison 2-cell needed to express a distributive law between two endo-1-cells.

## 3. The semi-strict walking distributive law

The walking distributive law is defined by Gray-tensoring the walking monad with itself:
$$
\mathrm{Dist}:=B\Delta_+\otimes_l B\Delta_+.
$$
Concretely, \(\mathrm{Dist}\) has one object \(\star\) and two generating 1-cells
$$
t=([0],\mathrm{id}),
\qquad
s=(\mathrm{id},[0]).
$$
Each of \(t\) and \(s\) inherits a monad structure, written \((\eta^t,\mu^t)\) and \((\eta^s,\mu^s)\), from the respective copies of \(B\Delta_+\). In addition, there is a distinguished 2-cell
$$
\sigma:s\cdot t \Rightarrow t\cdot s
$$
coming from the interchanger \(\gamma_{[0],[0]}\) [2509.22208].

The defining relations are exactly the usual four Beck distributive-law axioms. In the ordinary categorical notation of two monads \((S,\eta^S,\mu^S)\) and \((T,\eta^T,\mu^T)\) on the same category \(\mathcal C\), a natural transformation
$$
\lambda:ST\Rightarrow TS
$$
is a distributive law precisely when the following equations hold:
$$
\lambda\circ(S\eta^T)=\eta^T S,
\qquad
\lambda\circ(\eta^S T)=T\eta^S,
$$
$$
\lambda\circ(\mu^S T)=(T\mu^S)\circ(\lambda S)\circ(S\lambda),
$$
$$
\lambda\circ(S\mu^T)=(\mu^T S)\circ(T\lambda)\circ(\lambda T).
$$
These are the unit and multiplication coherences that the interchanger-generated 2-cell must satisfy [2404.00581].

A common misconception is that a walking distributive law must already include higher braid-like coherence. In the two-monad case, no higher coherence is needed because there are only two monads [2509.22208]. The nontrivial higher coherence appears only in iterated variants.

## 4. Universal property and algebraic presentation

The universal property of \(\mathrm{Dist}\) states that a strict 2-functor
$$
\mathrm{Dist}\to \mathcal B
$$
is equivalently the datum of an object \(X\in\mathcal B\), two monads \((t,\eta^t,\mu^t)\) and \((s,\eta^s,\mu^s)\) on \(X\), and a 2-cell \(\sigma:s\cdot t\Rightarrow t\cdot s\) satisfying the Beck axioms. Equivalently,
$$
2\mathrm{Cat}[\mathrm{Dist},\mathcal B]\simeq \mathrm{DistLaw}(\mathcal B),
$$
where the right-hand side is the ordinary category of distributive laws in \(\mathcal B\) [2509.22208].

An explicitly presented version of the same idea is the strictly presented 2-category \(\mathbb W\). It has a single object \(\star\), generating 1-cells \(S:\star\to\star\) and \(T:\star\to\star\), generating 2-cells
\(\eta^S\), \(\mu^S\), \(\eta^T\), \(\mu^T\), and \(\lambda:S\circ T\Rightarrow T\circ S\), and relations given by the usual monad axioms for \((S,\eta^S,\mu^S)\) and \((T,\eta^T,\mu^T)\) together with the Beck coherence diagrams for \(\lambda\) [2404.00581]. Given any 2-category \(\mathcal K\) and such data in \(\mathcal K\), there is a unique strict 2-functor
$$
F:\mathbb W\to \mathcal K
$$
sending the generators to the chosen monads and distributive law [2404.00581].

This universal property explains the adjective “walking.” The object walks exactly the structure of a distributive law into any target 2-category, and nothing beyond that structure.

## 5. Relation to composite theories and rewriting

Distributive laws admit an algebraic interpretation through composite theories. If \(S\) and \(T\) are algebraic theories with signatures \(\Sigma_S,\Sigma_T\) and equational axioms \(E_S,E_T\) presenting finitary monads \(S,T\), then from a distributive law \(\lambda\) one forms a new theory
$$
U^\lambda=(\Sigma_U,E_U),
\qquad
\Sigma_U=\Sigma_S\uplus\Sigma_T,
\qquad
E_U=E_S\cup E_T\cup E_\lambda,
$$
where \(E_\lambda\) consists of exactly the mixed equations forced by \(\lambda\) [2404.00581].

The paper states two structural properties. First, every \(U^\lambda\)-term can be rewritten, using \(E_S\cup E_T\cup E_\lambda\), to a normal form in \(\Sigma_T^*\Sigma_S^*\), that is, a \(T\)-term whose variables are \(S\)-terms. Second, any two such separations represent the same element of \(TSV\), so they coincide modulo the \(S\)- and \(T\)-axioms. Hence \(U^\lambda\) is precisely the composite theory of \(T\) after \(S\) [2404.00581].

A term-rewriting system \(R\) is obtained by orienting each distribution equation as a left-to-right rewrite rule
$$
s(t_1,\dots,t_n)\longrightarrow t(s_1,\dots,s_m),
$$
under the assumption that each left-hand side has layer \((1,1)\). If \(R\) is terminating, for example by a suitable multiset path order or a polynomial interpretation sending \(S\)-symbols to large polynomials and \(T\)-symbols to smaller ones, then the smaller subset \(E'\subset E_\lambda\) of all \((1,1)\)-layer equations suffices to derive all of \(E_\lambda\) [2404.00581].

The prototypical “ring” example takes \(S=\) monoids and \(T=\) Abelian groups, with key rewrite rules
$$
x\,(y+z)\to (x\,y)+(x\,z),
\qquad
(y+z)\,x\to (y\,x)+(z\,x).
$$
By polynomial interpretation these rules terminate, and Prover9 or similar tools quickly show that the monoid and Abelian-group axioms plus these two rules derive other mixed equations such as \(x\cdot 0=0\), \(0\cdot x=0\), and \(({-}x)\,y=-(x\,y)\) [2404.00581].

This correspondence situates the walking distributive law simultaneously in 2-category theory and in algebraic syntax. A plausible implication is that the universal 2-categorical presentation and the composite-theory presentation should be viewed as equivalent organizational perspectives on the same coherence data.

## 6. Parametric and iterated variants

The parametric walking distributive law is obtained by adjoining an additional Gray factor. If one wishes to parameterize by a 2-category \(\mathcal P\), the definition is
$$
\mathrm{PDist}(\mathcal P,\mathcal B)
:=
2\mathrm{Cat}[\mathcal P,\mathrm{Dist}(\mathcal B)]
\simeq
2\mathrm{Cat}[\mathcal P,2\mathrm{Cat}[B\Delta_+\otimes_l B\Delta_+,\mathcal B]]
\leftrightarrow
2\mathrm{Cat}[\mathcal P\otimes_l B\Delta_+\otimes_l B\Delta_+,\mathcal B].
$$
In particular, when \(\mathcal P=B\Gamma\) for a monoidal category \(\Gamma\), parameters enter by an extra Gray factor \(\mathcal P\otimes_l B\Delta_+\otimes_l B\Delta_+\) [2509.22208]. The same source demonstrates applicability by providing two concrete examples involving the Writer and Either monads, explicitly describing morphisms of such parametric distributive laws [2509.22208].

Iterated variants are formed by repeated Gray tensoring. The 3-fold semi-strict distributive law is
$$
B\Delta_+\otimes_l B\Delta_+\otimes_l B\Delta_+,
$$
with three monads \(t_1,t_2,t_3\) and three interchangers \(\sigma_{i,j}\) for \(i<j\). The defining new coherence is the Yang–Baxter equation
$$
(\sigma_{23}\cdot t_1)\circ(t_2\cdot \sigma_{13})\circ(\sigma_{12}\cdot t_3)
=
(t_3\cdot \sigma_{12})\circ(\sigma_{13}\cdot t_2)\circ(t_1\cdot \sigma_{23}).
$$
More generally, the \(n\)-fold walking distributive law is
$$
\mathrm{Dist}^n:=\otimes_l^n B\Delta_+,
$$
and one recovers all higher Yang–Baxter constraints among the various \(\sigma_{i,j}\) [2509.22208].

These iterated constructions clarify the boundary between ordinary distributive-law coherence and genuinely higher compatibility. With two monads, the Beck axioms suffice; with three or more, Yang–Baxter constraints become part of the universal structure.

## 7. Conceptual role and scope

Within strict 2-category theory, the walking distributive law packages the minimum data required to speak universally about monad composition: two monads on one object together with a comparison 2-cell satisfying Beck coherence. Its semi-strict form is produced canonically from the walking monad via the Gray tensor, and its universal property identifies strict 2-functors out of it with distributive laws in an arbitrary target [2509.22208].

The algebraic presentation complements this by showing that distributive laws are equivalent to composite theories, with mixed equations generated exactly by the distributive law and analyzable by term rewriting [2404.00581]. This suggests a division of labor between viewpoints: the 2-categorical formulation isolates universal coherence, while the algebraic formulation exposes the induced equations and normalization behavior.

The parametric and iterated extensions enlarge the scope of the construction without changing its basic logic. Parameterization is handled by precomposition and an extra Gray factor; iteration replaces the two-monad setting by a family of monads linked by interchangers, with Yang–Baxter equations governing triple overlaps [2509.22208]. In that sense, the walking distributive law is both a basic universal gadget and the first stage of a hierarchy of higher distributive-law objects.

Source: https://www.emergentmind.com/topics/walking-distributive-law