$\require{AMScd}$I am fighting with an exercise in Leinster's Higher operads: in short, Example 2.2.11 says that every monad on $\bf Set$ gives an operad taking the sequence of $T(n)$, where $n$ is an $n$-elements set. He then says
Informally, composition is substitution of words; formally, the composition functions can be written down in terms of the monad structure on T (exercise)
Doing this exercise seems very difficult. What am I missing?
Attempt at a solution
I am convinced that the unit $\eta_1 : 1 \to T1$ is the unit map of the operad, and that multiplication is defined as follows: given positive integers $m, n_1,\dots, n_m$, if $n=\sum n_i$ I define $$ \begin{CD} Tm\times Tn_1\times\dots Tn_m \\ @VVTm\times\iota_1\times \iota_m V\\ Tm\times Tn\times\dots\times Tn \\ @VVTm\times a V\\ Tm\times TTn^{Tm} \\ @VV\epsilon V\\ TTn \\ @VV\mu_nV\\ Tn \end{CD} $$ where
- $i_k : Tn_k\to Tn$ is the image under $T$ of the embedding $n_k\to n = n_1\sqcup\dots\sqcup n_m$.
- I blur the distinction between the product $\prod_{i=1}^m Tn_i$ and the set of functions $m\to Tn$.
- $a$ is the action of $T$ on morphisms.
This is a wannabe multiplication map $\gamma_{m,\vec n} : Tm \times Tn_1\times Tn_m \to Tn$.
Now, I have to verify suitable axioms. Unitality is not a problem: it follows from the monad axioms. Intuitively, associativity shall entail associativity for $\gamma$, but the diagram I have to check is, well... huge.
Let us consider positiv integers $m, p_1,\dots, p_m$ and $q_{ij}$ where $i=1,\dots,m$ and $j=1,\dots, p_i$. Associativity amounts to the commutativity of the following huge square:
($\blacksquare$ is a trick to save some space: in the upper horizontal row, the $q_{ij}$ are untouched)
Moreover, I adopted the following shorthands: $Q_i := \sum_j q_{ij}$, $P=\sum_i p_i$, $Q=\sum_i Q_i$; $T\vec p := Tp_1\times\dots\times Tp_m$ and $T\vec q_i := Tq_{i1}\times\dots\times Tq_{i p_i}$.
I can fill all the squares I have drawn with something making them commutative; I see no way to go on and finish. At some point things become really dirty, as I have to use the trick above (treat a number as a finite set, and sum as coproduct) over the diagram of inclusions $$ \begin{CD} {} @. {} @. q_{ij}\\ @. @. @VVV\\ {} @. p_i @>>> Q_i \\ @. @VVV @VVV \\ m @>>> P @>>> Q \end{CD} $$ It seems quite clear that this approach is not the smartest one, but I am quite stubborn and now I want to finish the proof this way. Advices? Corrections?
