# The product as the space of functions to the coproduct

I recently had one of my "sun rises over Marblehead" moments when I realized that the elements of an arbitrary (Cartesian) product $\prod_{\alpha \in I}X_\alpha$ of sets can be thought as the set of all the functions from the index set $I$ to the coproduct $\coprod_{\alpha \in I}X_\alpha$. (I.e. For all $x \in \prod_{\alpha \in I}X_\alpha$, $x$ is the function $I\to \coprod_{\alpha \in I}X_\alpha$ defined by $x(\beta) \mapsto \pi_\beta(x)$, where, $\forall \beta \in I$, $\pi_\beta$ is the canonical projection $\prod_{\alpha \in I}X_\alpha$ onto $X_\beta$.)

Admittedly, this is all rather vacuous, but it got me excited because it's the very first time that I have ever had an "endogenous" use for the notion of a coproduct, and I wonder if this particular use of the concept has anything to do with its role in category theory vis-à-vis products (the answer to which I expect will be "of course"), and if so, was this the genesis of the notion of a coproduct?

-
That's not correct. Not every map into the coproduct is of the form you mention. – Zhen Lin May 28 '13 at 18:39
Yeah, I hate to spoil the fun, but even when $I=2$ and $X_1, X_2$ each have one point, then $\prod_i X_i$ has cardinality 1, but $\coprod_i X_i$ has cardinality 2, and there are 4 functions from $I$ to $\coprod_i X_i$. – Nate Eldredge May 28 '13 at 18:51
Perhaps what you mean is: $\prod_I X_\alpha$ can be identified with the set of functions $f : I \to \coprod_I X_\alpha$ which have the property that $f(\alpha) \in X_\alpha$? You can think of such $f$ as choice functions if you like. – Nate Eldredge May 28 '13 at 18:54
Coproducts are just products in the opposite category. If you think taking products make sense, and if you also think taking the opposite of a category makes sense, then you think taking coproducts makes sense. – Qiaochu Yuan May 28 '13 at 20:37
"was this the genesis of the notion of a coproduct?" Of course not! – Martin Brandenburg May 28 '13 at 21:40

This claim is not true. Take $I=2$ and $X_1, X_2$ to be singletons. Then $\prod_i X_i$ has cardinality 1, but $\coprod_i X_i$ has cardinality 2, and there are 4 functions from $I$ to $\coprod_i X_i$.
You may be thinking of the fact that $\prod_i X_i$ can be identified with the set of functions $f : I \to \coprod_i X_i$ which satisfy the additional condition that $f(i) \in X_i$ for each $i \in I$. Such functions are often called choice functions.