Let $I$ be a set. For every $i\in I$ let a set $X_i$ be given, and for every $j\in I$ denote $p_j:\prod_{i\in I} X_i\to X_j$, $p_j((x_i)_{i\in I}):= x_j$, the j-th projection.
If $X,Y$ are sets let $\operatorname{Hom}(X,Y):=\{\text{Function}\,\, f: X\to Y\} $. The set of all functions $f: X\to Y$.
Show, that for every set $X$ is $\varphi: \operatorname{Hom}(X,\prod_{i\in I} X_i)\to \prod_{i\in I}\operatorname{Hom}(X,X_i)$, $f\mapsto (p_i\circ f)_{i\in I}$ is a bijection.
First of all the statement is clear, for $X=\emptyset$ since there is nothing to show. For $X\neq\emptyset$ I proceed as follows:
To show, that $\varphi$ is injectiv, should be easy:
Let $f, g\in \operatorname{Hom}(X,\prod_{i\in I} X_i)$ be arbitrary and $\varphi(f)=\varphi(g)$.
I want to show, that $f=g$. Which means, that $f(x)=g(x)$ for every $x\in X$.
$\varphi(f)=\varphi(g)\Leftrightarrow (p_i\circ f)_{i\in I} = (p_i\circ g)_{i\in I}$
$\Leftrightarrow p_i((f(x)))_{i\in I}=p_i((g(x)))_{i\in I}$
$\Leftrightarrow f_i(x)=g_i(x)$ for every $i\in I$.
[Where $f_i(x)$ notes the i-th coordinate of $f(x)$]
$\Leftrightarrow f(x)=g(x)$ for every $x\in X$.
$\Leftrightarrow f=g$.
Now I struggle, to show, that $\varphi$ is surjective. I tried to make an example to understand better, what is happening:
So $X=X_1=X_2=\{1,2\}$.
Now I take an element $(g, h)\in\prod_{i=1}^2 \operatorname{Hom}(X, X_i)$, where $g(1)=1, g(2)=1$ and $h(1)=2, h(2)=2$.
How can I choose a reasonable preimage?
I thought I just take the function $f\in \operatorname{Hom}(X, \prod_{i=1}^2 X_i)$ with $f(1)=(1,2)=(g(1), h(1))$ and $f(2)=(1,2)=(g(2), h(2))$
Then I get what I want: $\varphi(f)=(g, h)$
For the generalization
For a give $(g_i)_{i\in I}\in\operatorname{Hom}(X,\prod_{i\in I} X_i)$ we construct the preimage $f: X\to \prod_{i\in I} X_i$ by $f(x)=(g_1(x), g_2(x),\dotso )$
$f$ is indeed a preimage of $(g_i)_{i\in I}$
Proof:
$\varphi(f)=(p_i\circ f)_{i\in I}=(p_i(f(x))_{i\in I}=(f_i(x))_{i\in I}=(g_i(x))_{i\in I}$ for every $x\in X \Leftrightarrow \varphi(f)=g$.
So $\varphi$ is indeed a bijection.
Further question:
Is this an instance, where one uses the axiom of choice?
I would be grateful if someone checks this and might point out mistakes I might have made. Thanks in advance.
Let $ \{\lambda_j: X \to X_j\}_{j\in I}$ be a cone over $\{X_j\}_{j \in I}$. The UMP of the product gives us a $\textit{unique}$ arrow $\phi:X\to \prod_{j\in I} X_j$ such that $p_j\circ \phi=\lambda_j$ for each $j\in I$. This means that the map $\Phi:\text{Cone}(X,(X_j)_{j\in I})\to \text{Hom}(X,\prod_{j\in I} X_j)$ that sends the cone $ \{\lambda_j: X \to X_j\}_{j\in I}$ to $\phi$ induces the injection $(\lambda_j)_{j\in I}=(p_j\circ \phi)_{j\in I}\mapsto \phi$.
On the other hand, given an arrow $\phi:X\to \prod_{j\in I} X_j,\ \Phi$ sends the cone $ \{p_j\circ \phi: X \to X_j\}_{j\in I}$ to $\phi$ and so the induced map is also a surjection.