The following is taken from the text $\textit{Algebraic approaches to program semantics}$ by: Arbib and Manes, and "Categories for Types" by Roy L.Crole.
$\color{Green}{Background:}$
$\textbf{From}$ Crole's "Categories for Types".
$\textbf{Definition 1:} A$ $\textit{binary coproduct}$ of objects $A$ and $B$ in a category $C$ is specified by
an object $A+B$ of $C,$ together with
two $\textit{insertion}$ morphism $i_A:A\to A+B$ and $i_B:B\to A+B,$ such that for each morphisms $f:A\to C,g:B\to C$ there exists a unique morphism $[f,g]:A+B\to C$ for which $[f,g]\circ i_A:=f$ and $[f,g]\circ i_B:=g.$
We can extend this definition to the notion of a coproduct of a set indexed family of objects. Given a family of objects $(A_i\mid i\in I)$ in a category $C,$ where $I$ is a set, a $\textit{coproducts}$ is specified by the following data.
An object $\sum_{i\in I}A_i$ in $C,$ and |
For every $j\in I,$ a morphism $i_j:A_j\to \sum_{i\in I}A_i$ called the $j-\textit{th coproduct insertion,}$
such that for any object $C$ and any family morphisms $(f_i:A_i\to C\mid i\in I)$ there is a unique morphism $[f_i\mid i\in I]:\sum_{i\in I}A_i\to C$ for which gien any $j\in I,$we have $[f_i\mid i\in I]\circ i_j=f_j.$
$\textbf{From}$ Arbib and Manes' "Categorical Imperative...".
$\textbf{Definition 2:}$ $\textit{Coproducts in}$ $\textbf{Mon} \textit{ or}$ $\textbf{Grp}$
The one element monoid/group $\{e\}$ is clearly initial object-that is, the empty coproduct-in both categories.
Let now $\{X_i\mid i\in I\}$ be a family of monoids with $I$ non-empty. Let $A$ for 'alphabet') be the disjoint union of the sets $X_i.$ Let $W$ be the set $A*$ of all words on the alphabet $A.$ A word $(a_1,\ldots,a_n)$ is $\textit{reduced}$ if for all $j<n, i_i\neq i_{j+1}$ and for all $j\leq, x_j\neq e_j$ (where $a_j=(x_j,i_j)$ and $e_j$ is the unit of $X_{i_j}).$ If a word is not reduced it has a $\textit{reduction}$ obtained by continuing to apply the following rules:
(a) Multiply adjacent pairs with the same $i-$term:
$(a_1,\ldots,a_j=(x_j,i),a_{j+1}=(x_{j+1},i),\ldots,a_n)\mapsto (a_1,\ldots,\hat{a}_j=(x_jx_{j+1},i),a_{j+2},\ldots,a_n)$
(b) Delete identity terms:
$(a_1,\ldots,a_j=(e_j,i_j),\ldots a_n)\mapsto (a_1,\ldots,a_{j-1},a_{j+1},\ldots,a_n)$
$\textbf{Assumed exercise 1:}$
A monoid $X$ is $\textbf{abelian}$ if $xy=yx$ for all $x,y.$ Let $\textbf{Abm}$ be the category of abelian monoids and monoid homomorphisms. Prove that products, equalizers and coequalizers can be constructed by mimicking these constructs in $\textbf{Mon}$ or $\textbf{Grp}.$ Construct coproducts in $\textbf{Abm}$ by imitating the construction in $\textbf{Vect}$
$\textbf{Assumed exercise 2:}$
Verify that a product of semilattices, as constructed in $\textbf{Abm}$, is still a semilatticve. State and prove a similar statement for equalizers, coequalizers and coproducts.
$\color{Blue}{Exercise:}$
Show that, replacing (abelian monoids, semilattices) with (monoids, abelian monoids), $\textbf{assumed exercise 2}$ goes through for products, equalizers and coequalizers but not for binary coproducts.
$\color{red}{Questions:}$
In the $\color{Blue}{Exercise},$ above, is the replace version reads as: "Verify that a product of abelian monoids, as constructed in monoids, is still a monoid. Also, for binary coproducts given in $\textbf{Definition 1:},$ the exercise won't go through because they are not the same. I posted about coproduct for abelian monoid and monoid. If they are indeed consider different, how can that be proven? Perhaps, that the two are not isomorphic. But I am not sure how to set it up mathematically speaking and how to prove it afterwards.
Thank you in advance
There seems to be confusion about what the exercise is actually asking of you.
A product of (Abelian) monoids in the category of monoids is obviously a monoid, given you already know that the category of monoids has products. The correct and clearer exercise statement should be: “show that a coproduct of Abelian monoids in the category of monoids is not necessarily Abelian” (but show that the product, equaliser etc. of Abelian monoids in the category of monoids is Abelian).
This is pointing out that one constructs the coproduct of Abelian monoids by imitating the construction for vector spaces, not by imitating the construction for (general) monoids since that doesn’t work in the category of Abelian monoids. This is also observing that the forgetful functor $\mathsf{AbMon}\to\mathsf{Mon}$ is not cocontinuous (which allows us to infer it has no right adjoint i.e. no ‘cofree’ construction exists).