What are the abelian group objects in a slice category $\mathsf{Mon}/X$ of monoids, and a slice category $\mathsf{Grp}/X$ of groups?
I think the latter are perhaps split abelian extensions, but I'm not sure how to prove this and so I'm not sure about the case of monoids either.
How to approach unravelling internal structures in slice categories anyway?
Update and clarification. I would like to somewhat update my question. I have now read the following statements:
- In the slice category $\mathsf{Grp}/G$, the abelian group objects are the split abelian extensions of $G$.
- In the slice category $\mathsf{Grp}/G$, the abelian objects - those admitting an internal Mal'cev operation - are the abelian extensions of $G$.
I would like to understand how to prove these statements. At the set level I understand the internal structure unpacks fiberwise with some coherence conditions imposed by the homomorphy of group homomorphisms. What I don't understand is how to actually arive at the characterizations involving abelian kernel.
In his answer, Pece suggests the relevance of the isomorphy of all fibers of a group homomorphism (which happens because of inverses), but still I cannot arrive at the desired conclusions.
I think my question about monoids is answered by the unpacking of internal structure - abelian group objects in slices are nothing more than fiberwise monoids with coherence conditions.
Ok, let's unravel what is an abelian group in $\mathsf{Mon}/X$.
Structure. Well it is certainly an object $f : M \to X$ together with a unit morphism $u : 1 \to f$, a multiplication $m : f \times f \to f$ and an inverse $i : f \to f$. But all that is happening in the cartesian category $\mathsf{Mon}/X$, whose morphisms are commutative triangles over $X$, whose unit $1$ is the identity of $X$ and whose product is the pullback over $X$.
Hence the unit is actually a maps $u : X \to M$ such that $fu={\rm id}_X$, meaning $u$ is a section of $f$. The multiplication is then $m : M \times_X M \to M$ satisfying that for $x,y \in M$ such that $f(x) = f(y)$ then this is also the value of $f(m(x,y))$. Endly, the inverse is a map $i : M \to M$ with the property that $f(x) = f(i(x))$ for every $x\in M$.
That's it for the structure. Let's move on to the axioms (i.e. the commutatiity of certain diagrams).
Axioms. One have to interprete the associativity axiom which says $m\circ (m\times {\rm id}) = m\circ ({\rm id} \times m)$. In algebraic terms, here it says: for all $x,y,z \in M$ such that $f(x)=f(y)=f(z)$, $$m(x,m(y,z)) = m(m(x,y),z)$$
The multiplication by unit axiom usually says $m\circ (u\times {\rm id}) = {\rm id} = m\circ ({\rm id} \times u)$. In here, it gives: for all $x \in M$, $$ m(uf(x),x) = x = m(x,uf(x))$$
Next is the multiplication by inverse axiom : $m\circ (i\times{\rm id}) = {!}\circ u = m\circ ({\rm id}\times i)$ where $!$ denotes the unique map to the cartesian unit. So here, we get: for all $x \in M$, $$ m(i(x),x) = uf(x) = m(x, i(x)) $$
Finally, the abelianity axiom, which comes at $m = m \circ \sigma$ with $\sigma$ the canonical braiding of the cartesian structure, gives us: for all $x,y \in M$ such that $f(x) = f(y)$, $$m(x,y)=m(y,x)$$
And we're done! Well, it does seem we can try to say more.
Interpretations. If you look carefully, the axioms always talk about elements in the same fiber of $f$. And those curiously look like the usual axioms of abelian group theory after that.
So an abelian group object in $\mathsf{Mon}/X$ is more or less a family of abelian groups indexed by $X$ with a coherent choice of unit, multiplication and inverse. (You probably could make that formal, I don't have the patience to do so.)
You can carry the same reasoning in any category $\mathsf A$ instead of $\mathsf{Mon}$ as long as there is forgetful functor $\mathsf A \to \mathsf{Set}$ that preserves pullbacks. So in particular in $\mathsf{Grp}$ : you'll see that not much changes, but in the case of $\mathsf{Grp}$ the interpretation can be carried out further away as each fiber is iso to the kernel...
Remark. We could probably drop the "abelian" part in $\mathsf{Mon}$ and $\mathsf{Grp}$ without changing the outcome because of the Eckmann-Hilton argument.