# Codomains, products and limits

I have a proof in front of me of the theorem that if a category $\mathcal{C}$ has equalisers and all small/finite products, then it has all small/finite limits. I'm not sure how standard the proof is (it's in some notes I've taken rather than a book) but I know the result is quite standard so perhaps you'll be familiar enough with it to help me clear up a confusion.

The proof starts as follows:

Let $D: \mathcal{J} \to \mathcal{C}$ be a diagram with $\mathcal{J}$ small/finite. Form the products $P = \prod \limits_{j \in Ob(\mathcal{J})} D(j)$, and $Q = \prod \limits_{\alpha \in Mor(\mathcal{J})} D(\operatorname{cod} \alpha)$, and define $f,\,g: P \to Q$ by $\pi_\alpha f = \pi_{\operatorname{cod} \alpha}$, $\pi_\alpha g = D(\alpha) \pi_{\operatorname{dom} \alpha}$. Then let $(L,e)$ be the equaliser of $f$ and $g$. We go on to show that $L$ gives a limit cone.

My confusion is early on (I only provided the rest of the proof for context, although I'd imagine it's pretty standard). We define $Q = \prod \limits_{\alpha \in Mor(\mathcal{J})} D(\operatorname{cod} \alpha)$, the product of all the codomains of all the morphisms in $\mathcal{J}$: but then surely isn't that just identical to $P$? Surely, since $\mathcal{J}$ is a category it contains an identity morphism for every object, and that morphism has codomain precisely the object it is the identity for, so isn't $Q$ just the product of all $D(j)$ too? Or is $Q$ simply constructed that way to make it easier to work with $\alpha$? Many thanks.

-
If there were $only$ identities, then yes, $Q$ would be $P$, but else $Q$ won't be $P$, since there will be repetitions.
For example, if $\mathcal{J}$ is the category with two distinct objects $A, B$ and one arrow $f:A \to B$ (besides the identities $\operatorname{id}_A$ and $\operatorname{id}_B$), then $P=D(A) \times D(B)$, but $Q= D(A) \times D(B) \times D(B)$ (the first two objects are $\operatorname{cod}(\operatorname{id}_A)$ and $\operatorname{cod}(\operatorname{id}_B)$; the second one is $\operatorname{cod}(f)$).
Ok, I see the difference - so we're actually defining this latter product as a limit over $D$, but we may have lots of repetitions of the same objects because the limit (i.e. product) we are taking can have multiple morphisms down to the same $D(j)$ (or in this case $D(\operatorname{cod} \alpha)$? –  Spyam May 11 '12 at 22:39
@Spyam: Exactly. And you can't ignore those repetitions: nothing says you can collapse some factors into one just because they're equal; you must take $D(\operatorname{cod}(\alpha))$, one time for every $\alpha\in \operatorname{Mor}(\mathcal{J})$. –  Bruno Stonek May 11 '12 at 22:44
@Spyam: You're welcome :) Here's a last comment: the repetitions can be explained like this. An object in a category can be thought of through its identity arrow (i.e. there is a "bijection" (modulo set theory issues, absent in this case because $\mathcal{J}$ is small) between the objects and the identity arrows). So you can think that $\operatorname{Ob}(\mathcal{J})\subset \operatorname{Mor}(\mathcal{J})$. Now it's patent that $P\neq Q$: you're taking the product of $D(\operatorname{cod}(\alpha))$ over sets of indices which are, for a non-discrete category, properly included one in the other. –  Bruno Stonek May 12 '12 at 4:39