[Math] Proving that the free group on two generators is the coproduct $\mathbb{Z}*\mathbb{Z}$ in $\textbf{Grp}$

category-theoryfree-groupsgroup-theoryuniversal-property

I want to show that the free group on two elements $F(\{x,y\})$ is the coproduct $\mathbb{Z}*\mathbb{Z}$ in $\textbf{Grp}$. The idea is to use the universal property of free groups to prove that $F(\{x,y\})$ satisfies the universal property of coproducts in $\textbf{Grp}$. Below is my attempt to prove this. Is this correct? and also I am having trouble extending this result to the free group on $n$ elements. Any help/comments will be appreciated. Thanks

Let $G$ be any group. Define $\gamma:\{x,y\}\rightarrow \mathbb{Z}$ to be the set map which send $x$ to the generator $1$ and $y$ to the identity. For the means of set up, let $J:\{x,y\}\rightarrow F(\{x,y\})$ be the set map native to the free group. Next denote $\iota:\mathbb{Z}\rightarrow F(\{x,y\})$ to be the inclusion map, which sends $1$ to the generator $x$. Now consider what we've established thus far

enter image description here

Now suppose that we have a group homomorphism $f:\mathbb{Z} \rightarrow G$, then $f\circ \gamma$ is a set map from $\{x,y\}$ and thus by the universal property of free groups there exists a unique group homomorphism $\phi:F(\{x,y\})\rightarrow G$ such that

enter image description here

commutes. Now to show that $F(\{x,y\})$ is the coproduct $\mathbb{Z}*\mathbb{Z}$ in $\textbf{Grp}$, we must show that $f=\phi\circ\iota$, that is the following diagram commutes

enter image description here

I claim that indeed it does. From the commutativity of the second diagram, we have that $f\circ\gamma=\phi\circ j$. It follows that
$$f\circ\gamma(x)=f(1)=\phi(x)=\phi\circ j(x) \text{ and } f\circ\phi(y)=f(0)=\phi(y)=\phi\circ j(y)=e_G $$

Notice that $\phi\circ\iota(1)=\phi(x)=f(1)$, which shows that the homomorphism $\phi\circ\iota$ and $f$ agree for the generator of $\mathbb{Z}$ and so $\phi\circ\iota=f$ The commutativity of the third diagram is confirmed, proving that $F(\{x,y\})$ is the coproduct $\mathbb{Z}*\mathbb{Z}$ (we already have existence $\phi$ from the universal property of free groups, but not the uniqueness in this scenario?).

Best Answer

You're working too hard. I'll assume you're convinced that $\mathbb{Z}$ is the free group on one generator, which means you're convinced that

$$\text{Hom}(\mathbb{Z}, G) \cong G$$

(where the RHS should really be the underlying set of $G$ but I'm omitting that I'm applying the underlying set functor). One way to state the universal property of the coproduct is that

$$\text{Hom}(X \sqcup Y, Z) \cong \text{Hom}(X, Z) \times \text{Hom}(Y, Z)$$

from which it follows that

$$\text{Hom}(\mathbb{Z} \sqcup \mathbb{Z}, G) \cong G \times G$$

and this is also the universal property of the free group on two generators, so you're done by the Yoneda lemma. The argument is exactly the same for the free group on $n$ generators, and in fact on a set's worth of generators.

More abstractly, the forgetful functor $\text{Grp} \to \text{Set}$ has a left adjoint, the free group functor. As a left adjoint, it preserves colimits, and in particular coproducts. But every set $X$ is the coproduct of $X$ copies of the $1$-element set, so it follows that the free group $F_X$ is the coproduct of $X$ copies of $\mathbb{Z}$.