$\newcommand{\set}{\mathsf{Set}}\newcommand{\T}{\mathcal{T}}$Given any monad $(\T,\eta,\mu)$ over $\set$, it is claimed that the Eilenberg-Moore category of algebras $\set^\T$ is cocomplete. More generally, for any well-powered, cocomplete category $\mathscr{A}$ that has:
- All arbitrary pullbacks
- All finite limits
- The axiom of choice (every epimorphism splits)
Then $\mathscr{A}^\T$ shall be cocomplete.
Rather surprisingly, it turns out that it is sufficient to show that:
$\set^\T$ has all coequalisers of reflexive pairs.
I've read two sources which attempt to prove this. But I'm sorry to say that I don't understand their proofs! The axiom of choice is assumed.
The sources attempt to prove instead that $\set^\T$ has coequalisers of all pairs. Both proceed as follows:
Let $f,g:(A,\alpha)\to(B,\beta)$ be some parallel pair. As $U^\T$ creates all limits, and $\set$ has all limits, we have a product algebra $(B\times B,\xi)$ and projections $\pi_{1,2}:(B\times B,\xi)\to(B,\beta)$. Let $R=\langle f,g\rangle:(A,\alpha)\to(B\times B,\xi)$.
The next part is what is mysterious to me:
Let $(E,\xi')$ be the smallest $\T$-subalgebra of $B\times B$, that is also an equivalence relation, through which $R$ factors.
Ok...
By the axiom of choice, the following is a split coequaliser: $$E\overset{\pi_1}{\underset{\pi_2}{\large\rightrightarrows}}B\overset{p}{\longrightarrow}B/E$$Where the quotient $B/E,p$ is computed in $\set$. As $U^\T$ (strictly) creates all coequalisers of $U^\T$-split pairs (as above!) there is a unique algebra structure $\Xi$ on $B/E$, that: $$(E,\xi')\overset{\pi_1}{\underset{\pi_2}{\large\rightrightarrows}}(B,\beta)\overset{p}\longrightarrow(B/E,\Xi)$$Is a coequaliser diagram in $\set^\T$.
And now, apparently, we are done. Why?
It is implied that the algebra $B/E$ coequalises $f,g$ in $\set^\T$. But neither source explain how this works. I am familiar with quotient constructions, but this particular one has me confused. So suppose $h:(B,\beta)\to(C,\varsigma)$ is a homomorphism with $hf=hg$. We want to show that there exists a unique $\sigma:(B/E,\Xi)\to(C,\varsigma)$ with $h=\sigma\circ p$. That would be automatically true if we could show $h\pi_1=h\pi_2$ on $E$. Indeed, that appears to be the only way to proceed.
Of course, $h\pi_1=h\pi_2$ on the set $(f(a),g(a))_{a\in A}\subseteq E$. However, there is a very simple trouble that the "$\T$-subalgebra" condition imposes. We may need to introduce elements to $E$ that are not of the form $(f(a),g(a))$. So, how can we be sure $h\pi_1=h\pi_2$?
Both sources conclude their proof around $R$; I suppose one is supposed to consider that $(h\times h)\circ R$ is a diagonal arrow. But I don't see a way around the aforementioned problem.
I would really appreciate any explanations regarding this.