Category Theory – Hom Functor Preserves Coproducts

category-theory

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:

Given any two maps $f_1:X_1\to Y$ and $f_2:X_2\to Y$, there exists a map $$f_1\amalg f_2:X_1\amalg X_2\to Y,$$ such that $(f_1\amalg f_2)\circ i_1= f_1$ and $(f_1\amalg f_2)\circ i_2 = f_2$, where $i_1:X_1\to X_1\amalg X_2$ and $i_2:X_2\to X_1\amalg X_2$ are the structure maps that come with the coproduct. Furthermore, the map $f_1\amalg f_2$ is unique with respect to this property. That is, if $f:X_1\amalg X_2\to Y$ is any other map such that $f\circ i_1=f_1$, and $f\circ i_2=f_2$, then $f=f_1\amalg f_2$.

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.

Related Question