The Details:

Let's have a recap of some definitions (taken from "Nine Chapters in the Semigroup Art" (pdf), by A. J. Cain).

Definition 1: Let $P$ be a semigroup. The left action of $P$ on a set $X$ is an operation $\cdot:P\times X\to X$ such that $(pq)\cdot x=p\cdot (q\cdot x)$ for all $x\in X$, $p, q\in P$.

Such a left semigroup action defines an anti-homomorphism $\psi:P\to\mathcal{T}_X$ by setting $x(p\psi)=p\cdot x$ (so for all p, q, we have $(pq)\psi=(q\psi)(p\psi))$.

If $X$ is a semigroup, the left action of $P$ on $X$ acts by endomorphisms if for all $p\in P$, we have $x\psi\in\operatorname{End}(X)$, so given $x, y\in X$, $$xy\cdot p=(x\cdot p)(y\cdot p).$$

In this case, the semidirect product of $P$ and $X$ with respect to $\psi$, denoted $X\rtimes_{\psi} P$, is the Cartesian product $X\times P$ under $$(x_1, p_1)(x_2, p_2)=(x_1(p_1\cdot x_2), p_1p_2).$$

Definition 2: Let $S$ and $T$ be semigroups. Then the Wreath product of $S$ and $T$, denoted $S\wr T$, is given by the semidirect product $S^T\rtimes_\varphi T$ with respect to $\varphi$, where $S^T$ is the direct product of the set $S$ indexed by $T$ and $\varphi:T\to \mathcal{T}_{S^T}$ is the anti-homomorphism associated with the left action $\cdot:T\times S^T\to S^T$ such that for all $x, y\in T, f\in S^T$, $$^yf:=y\cdot f\quad\text{and}\quad (x)\cdot\, ^yf=(xy)\cdot f=\,^{xy}f.$$

So it's $S^T\times T$ under $$(f_1, s_1)(f_2, s_2)=(f_1 \,^{s_1}f_2, s_1s_2).$$

The Question:

This all seems suggestive (to me) of exponentiation in some category of semigroups but I can't for the life of me figure out the details of that. The anti-homomorphism throws a spanner in the works. Maybe there's some pullback involved . . . Anyway, to this end, here's my question.

Is there a categorical description of the Wreath product of two semigroups?

Please help :)

"Why ask?"

Because (I'm curious and) I'm wondering if it'd help me understand the Wreath product better. I would be particularly grateful for an answer shedding light on how this connects to the group-theoretic analogue.


Let me work only with groups for the sake of familiarity.

The wreath product is defined using the semidirect product, so the first step is to understand the semidirect product categorically. I claim that the correct way to understand the semidirect product is not categorically but higher-categorically, and also that the correct higher-categorical perspective makes it clear that the semidirect product is not a product. The basic claim is the following:

Let $\varphi : G \to \text{Aut}(H)$ be an action of a group $G$ on a group $H$. Then the semidirect product $H \rtimes G$ is the homotopy quotient of $H$ by the action of $G$.

In other words, the semidirect product is not a limit or a colimit, but a 2-colimit (in fact it's the simplest interesting example I know of a 2-colimit).

What does this mean? More generally, let a group $G$ act by automorphisms on an object $c$ in an arbitrary category $C$. The ordinary quotient of $c$ by $G$ is the colimit of the corresponding diagram $BG \to C$, where $BG$ is the one-object category corresponding to $G$. Explicitly, it is an object $c_G$ such that there are natural bijections

$$\text{Hom}(c_G, d) \cong \text{Hom}(c, d)^G.$$

More explicitly, morphisms $c_G \to d$ are $G$-invariant morphisms $c \to d$, where $G$ acts on $\text{Hom}(c, d)$ by precomposition (this is a right action). Even more explicitly, in a concrete category this means that morphisms $c_G \to d$ are morphisms $c \to d$ which take the same value on $G$-orbits.

In particular, we can let $C = \text{Grp}$ and this gives us a notion of the quotient of a group by the action of a group. However, this construction is poorly behaved: explicitly, if $\varphi : G \to \text{Aut}(H)$ is such a group action, then the quotient is the quotient of $H$ by the relations $\varphi(g) h = h$ for all $g \in G, h \in H$, and this construction will often destroy a lot of information about the group action.

But it is possible to do something less violent. In the world of homotopy theory, a less violent alternative to identifying two points of a space is putting a path in between them, which identifies them up to homotopy; this idea leads to things like the mapping cone. I claim that we can do the same sort of thing with groups, thanks to the following important observation:

Groups naturally form a 2-category, not just a category.

This is because groups $G$ are secretly themselves categories $BG$ with one object. Functors between these categories give group homomorphisms, but we can talk not only about functors but about natural transformations. It is a very good exercise to prove the following.

Claim: Let $\varphi_1, \varphi_2 : G \to H$ be a pair of morphisms between groups. Then a natural transformation $\varphi_1 \to \varphi_2$ is precisely an element $h \in H$ such that $\varphi_2(-) h = h \varphi_1(-)$, or equivalently such that $\varphi_2(-) = h \varphi_1(-) h^{-1}$.

The topological picture here is to think of $G, H$ as fundamental groups of based spaces $X, Y$, so that $\varphi_1, \varphi_2$ are induced by two based maps $f_1, f_2 : X \to Y$, and we want to understand when $\varphi_1, \varphi_2$ are freely homotopic (so a homotopy which ignores the basepoints). What can happen is that in a homotopy from $\varphi_1$ to $\varphi_2$ the basepoint can travel around a nontrivial loop in $Y$, which is precisely the element $h$ above.

The idea now is that instead of forcing two elements $h_1, h_2$ of a group to become equal in a quotient, we can "put a path between them" by adjoining a new element $g$ such that $h_2 g = g h_1$, or equivalently such that $h_2 = g h_1 g^{-1}$. This is essentially what happens in the construction of the semidirect product, one presentation of which is

$$H \rtimes G = \langle G, H | \varphi(g) h = ghg^{-1} \rangle.$$

Here I mean the quotient of the free product of $G$ and $H$ by the specified relations. I can be more formal here but it may not be all that helpful to do so; in particular the resulting notion of homotopy quotient can also be described by a universal property, but now involving a natural equivalence of categories rather than a natural bijection of sets.

Anyway, let me connect all this back up to spaces and also to wreath products to describe a topological example of this homotopy quotient idea at work. Take a path-connected space $X$ and consider the space $X^n$ of $n$-tuples of elements in $X$. The quotient $X^n/S_n$ is the configuration space of $n$ unordered and not necessarily distinct elements of $X$, but quotients of spaces by group actions can often fail to be well-behaved, and in homotopy theory-land we can instead take the homotopy quotient, explicitly described by the Borel construction

$$(X^n \times ES_n)/S_n.$$

This is a kind of "homotopy configuration space." The punchline is now that the fundamental group of this space is the wreath product $\pi_1(X) \wr S_n$. (This isn't just a random example either; these spaces can be used, among other things, to define the Steenrod operations.)