How to define a product in a category Suppose $C$ is the category of sets and $F:C\rightarrow C$ is a functor. We can then define a new category $(F\downarrow C)$ which has object $(A,a)$ where $A$ is an object in $C$ and  $a:F(A)\rightarrow A$ is a relation. The morphisms between $(A,a)$ and $(B,b)$ are the functions that make square below commute:

How would I go about defining a product of a family $(A_i,a_i)_{i\in I}$ on this category? 
I saw somewhere (but I cannot remember where) I should take the object $(\Pi_{i\in I} A_i, a)$ where $a:F(\Pi A_i)\rightarrow \Pi A_i$ by first taking $F(\Pi A_i)\rightarrow \Pi F(A_i)$ via the 'canonical function' and then take $\Pi F(A_i)\rightarrow \Pi A_i$.
Mainly, I am unclear about two things:


*

*What is the 'canonical function'?

*How to take $\Pi F(A_i)\rightarrow \Pi A_i$ after using the 'canonical function'?

 A: Any morphism into a product can be defined by specifying morphisms into its components. (Indeed, this is the defining universal property of products.)
If $\mathcal{C},\mathcal{D}$ are any categories (with products, say) and $F : \mathcal{C} \to \mathcal{D}$ is any functor, then for any family of objects $(A_i \mid i \in I)$ of $\mathcal{C}$, there is a canonical morphism
$$k : F\left( \prod_{i \in I} A_i \right) \to \prod_{i \in I} F(A_i)$$
defined as follows. For each $i \in I$, let $\pi_i : \prod_{i \in I} A_i \to A_i$ be the projection map. Applying $F$ yields a morphism
$$F(\pi_i) : F \left( \prod_{i \in I} A_i \right) \to F(A_i)$$
in $\mathcal{D}$ for each $i \in I$. Then $k = (F(\pi_i) \mid i \in I)$ is the induced morphism into the product $\prod_{i \in I} F(A_i)$.
[As a side-note, a functor $F$ preserves products if and only if all such canonical maps are isomorphisms.]
Now, given a morphisms $f_i : A_i \to B_i$ in $\mathcal{C}$ for all $i \in I$, there is a natural induced morphism
$$f : \prod_{i \in I} A_i \to \prod_{i \in I} B_i$$
defined by letting $f = (f_i \circ \pi_i \mid i \in I)$, where again $\pi_i : \prod_{i \in I} A_i \to A_i$ denotes the projection morphism.
So let's piece all this together. You have objects $A_i$ and morphisms $a_i : F(A_i) \to A_i$ for all $i \in I$. Let
$$k : F\left( \prod_{i \in I} A_i \right) \to \prod_{i \in I} F(A_i)$$
be the canonical morphism defined as described above, and let
$$a : \prod_{i \in I} F(A_i) \to \prod_{i \in I} A_i$$
be the morphism defined by $a = (a_i \circ \pi_i \mid i \in I)$. Then the composite
$$a \circ k : F\left( \prod_{i \in I} A_i \right) \to \prod_{i \in I} A_i$$
is the morphism you seek.
Note that this works in any category with products, not just the category of sets.
A: Assuming when you said $a : FA \to A$ is a relation you meant function, the category you're describing is called the category of algebras for an endofunctor, often just the category of $F$-algebras, $\mathbf{Alg}_F$. (There's a closely related category for monads $T : \mathcal{C}\to\mathcal{C}$ which are called $T$-algebras typically, but obviously this naming scheme is a bit ambiguous.)
Here's Clive's answer in a different formulation.  The universal property of $\Pi_i C_i$ in any category is $$\mathcal{C}(-,\Pi_i C_i)\cong\prod_i\mathcal{C}(-,C_i)$$
For the first question then the canonical function is the image of the identity arrow via the action of the functor $F : \mathcal{C}\to\mathcal{D}$ on arrows applied to each component: $$\mathcal{C}(\Pi_i C_i, \Pi_i C_i)\cong\prod_i\mathcal{C}(\Pi_i C_i,C_i)\to \prod_i\mathcal{D}(F(\Pi_i C_i),FC_i) \cong \mathcal{D}(F(\Pi_i C_i),\Pi_i FC_i)$$
For the second question generalizing, the input of your product is a family of arrows $\mathcal{C}(A_i,B_i)$. By precomposing with $\pi_i : \Pi_j A_j \to A_i$ you get a family of arrows $\mathcal{C}(\Pi_j A_j,B_i)$ i.e. an element of $\prod_i\mathcal{C}(\Pi_j A_j,B_i)$ which by the universal property of products is isomorphic to $\mathcal{C}(\Pi_j A_j,\Pi_i B_i)$.  If all products exists in $\mathcal{C}$ this gives rise to a functor $\Pi_i : \prod_i \mathcal{C}\to\mathcal{C}$ and the above mapping is its action on families of arrows.
Going a bit further, let's show that this actually is the product of $\mathbf{Alg}_F$ where $F : \mathcal{C}\to\mathcal{C}$ now, and we assume $\mathcal{C}$ has all products (as $\mathbf{Set}$ surely does). First, let's describe $\mathbf{Alg}_F((A,a),(B,b))$ in a manner that makes it fit in with the framework above. $$\mathbf{Alg}_F((A,a),(B,b)) \cong \{f\in\mathcal{C}(A,B)\mid f \circ a = b \circ Ff\}$$
Note that this is an equalizer in $\mathbf{Set}$ (and lifts to an equalizer of $\mathcal{C}\to\mathbf{Set}$). Now we calculate: $$\begin{align}
\prod_i\mathbf{Alg}_F((A,a),(A_i,a_i))
& \cong \prod_i\{f\in\mathcal{C}(A,A_i)\mid f\circ a = a_i \circ Ff\} \\
& \cong \{f\in\prod_i\mathcal{C}(A,A_i)\mid \forall i.f_i \circ a = a_i \circ Ff_i\} \\
& \cong \{f\in\mathcal{C}(A,\Pi_i A_i)\mid \forall i.\pi_i \circ f \circ a = a_i \circ F(\pi_i \circ f)\} \\
& = \{f\in\mathcal{C}(A,\Pi_i A_i)\mid \forall i.\pi_i \circ f \circ a = a_i \circ F\pi_i \circ Ff\} \\
& = \{f\in\mathcal{C}(A,\Pi_i A_i)\mid \forall i.\pi_i \circ f \circ a = a_i \circ \pi_i \circ \varphi \circ Ff\} \\
& = \{f\in\mathcal{C}(A,\Pi_i A_i)\mid \forall i.\pi_i \circ f \circ a = \pi_i \circ \Pi_j a_j \circ \varphi \circ Ff\} \\
& = \{f\in\mathcal{C}(A,\Pi_i A_i)\mid f \circ a = (\Pi_j a_j \circ \varphi) \circ Ff\} \\
& \cong \mathbf{Alg}_f((A,a),(\Pi_i A_i, \Pi_i a_i \circ \varphi))
\end{align}$$ where $\varphi : F(\Pi_i A_i)\to\Pi_i F(A_i)$ is the canonical function.
