I'll be referencing and using the first diagram from this wiki page. I want to convince myself that the $\operatorname{Hom}(\_,Y)$ functor preserves coproducts. So, I'll start by applying $\operatorname{Hom}(\_,Y)$ to the objects of the diagram. We get maps $\operatorname{Hom}(X_1,Y)$, $\operatorname{Hom}(X_2,Y)$ and $\operatorname{Hom}(X_1\amalg X_2,Y)$. The category sets is cartesian closed hence we can take $\operatorname{Hom}(X_1,Y)\times \operatorname{Hom}(X_2,Y)$ to be an element of the category we land in. Finally, by the universal mapping property (UMP) of the coproduct we have that
$$
\operatorname{Hom}(X_1,Y)\times\operatorname{Hom}(X_2,Y) \cong\operatorname{Hom}(X_1\amalg X_2,Y)
$$
I'm a little worried by my use of the UMP. I know the isomorphism $\operatorname{Hom}(X_1,Y)\times\operatorname{Hom}(X_2,Y) \cong\operatorname{Hom}(X_1\amalg X_2,Y)$ is true and that I'm supposed to use the UMP somehow (basically it's the only property at my disposal) but I was hoping someone could elaborate for me. Should I be trying to use that fact that the contravariant $\operatorname{Hom}$ functor takes morphisms, say $f:X\to Y$, to precomposition with $Hom(X,Y)$?
Best Answer
First, recall that the UMP states:
The first portion of the UMP says that we have a well defined map $$\operatorname{Hom}(X_1,Y)\times\operatorname{Hom}( X_2,Y)\to\operatorname{Hom}(X_1\amalg X_2,Y).$$ sending every $(f,g)\in\operatorname{Hom}(X_1,Y)\times \operatorname{Hom}(X_2,Y)$ to $f\amalg g$. Now, given any map $\phi:X_1\amalg X_2\to Y$, we can define maps $$\phi_1:=\phi\circ i_1:X_1\to Y\quad\text{and}\quad \phi_2:=\phi\circ i_2:X_2\to Y.$$ By the uniqueness portion of the UMP, we must have $\phi=\phi_1\amalg \phi_2$. Thus the map is surjective. I'll leave injectivity as an exercise.