# There is a unique map $P \to \text{Hom}(A, \prod_i C_i)$ whenever $P \xrightarrow{p_i} \text{Hom}(A, C_i)$?

I'm trying to prove directly that $$\text{Hom}(A, \prod_i C_i) \simeq \prod_i \text{Hom}(A, C_i)$$ whenever $$\prod_{i\in I} C_i$$ is a product of a family of objects $$C_i$$ in a category $$B$$, where $$A$$ is any other object of $$B$$.

I want to do this using the universal product property of product. So far I've got that there is a unique map $$u : \text{Hom}(A, \prod_i C_i) \to \prod_i \text{Hom} (A, C_i)$$ such that $$p_i \circ u = q_i$$ where $$p_i : \prod_i \text{Hom}(A, C_i) \to \text{Hom}(A, C_i)$$ is the projection in the definition of product and $$q_i : \text{Hom}(A, \prod_i C_i) \to \text{Hom}(A, C_i)$$ is any family of maps to the components. The reason there is a unique map is by definition of the product $$\prod_ i \text{Hom}(A, C_i)$$ and its universal property.

I wanted to show that a universal arrow exists from $$\prod_i \text{Hom}(A, C_i) \to \text{Hom}(A, \prod_i C_i)$$ so that we'd have:

$$p_i = q_i \circ v, !v \\ q_i = p_i \circ u, !u$$

so that $$p_i = p_i \circ (u\circ v)$$ and by the universal property self-applied to the product yields $$u \circ v = \text{id}$$. But I'm not seeing any obvious choice for $$v$$. That's where I need help.

For that other direction, you'll have to use the specifities of $$\mathbf{Set}$$ : to define a map $$\prod_{i\in I} \hom(A,C_i) \to \hom(A,\prod_{i\in I}C_i)$$ it suffices to define it on each and every element of the LHS.
So you can take $$(f_i)_{i\in I}\in \prod_{i\in I}\hom(A,C_i)$$, this means that for each $$i\in I, f_i : A\to C_i$$. Then this yields $$A\to \prod_{i\in I}C_i$$ by the universal property, etc.etc. I'll leave the rest to you.
(note that you can't use a universal property to define the map in the other direction, because you can map into products, not easily out ot them - that's where the specificities of $$\mathbf{Set}$$ come in -, and the RHS $$\hom(A,\prod_{i\in I}C_i)$$ has a priori no universal property - we're trying to prove that it has one !-)