# Prove that in any category a product(if exists) is associative up to isomorphism.

I have a question regarding an exercise(p.38, ex.5.9) from Aluffi's Algebra textbook.

Let C be a category with products. Find a reasonable candidate for the universal property that the product $A \times B \times C$ ought to satisfy, and prove that both $(A \times B) \times C$ and $A \times (B \times C)$ satisfy the universal property.Deduce that $(A \times B) \times C$ and $A \times (B \times C)$ are necessarily isomorphic.

$A \times B \times C$ is defined an object of category C satisfying( together with morphisms $\pi''_A:A \times B \times C \to A, \pi''_B:A \times B \times C \to B$ and $\pi''_C:A \times B \times C \to C$ the following universal property: $\forall$ objects $X$ of the category C and morphisms from $X$ to $A(f_0),B(g_0)$ and $C(h_0)\ \exists!$ morphism $\omega$ such that

$\pi''_A\omega=f_0\\ \pi''_B\omega=g_0 \ \ (1)\\ \pi''_C\omega=h_0$

Now, I want to prove that $(A \times B) \times C$ also satisfies this property together with morphisms $\pi_A\pi'_{A \times B}, \pi_B\pi'_{A \times B}$ and $\pi'_C$.

$(A \times B) \times C$ has it's own property. $\forall$ objects $X_1$(of the category C) and morphisms $f_1:X_1 \to A \times B, h_1:X_1 \to C \ \exists! \ \phi:X_1 \to (A \times B) \times C$ such that the following diagram $$\begin{array}{ccccc} A \times B & \stackrel {\pi'_{A \times B}} \leftarrow & (A \times B) \times C & \stackrel{\pi'_C} \to & C \\ & {}_{f_1} \nwarrow & \ \ \ \ \ \uparrow {}_{\phi} & \nearrow {}_{h_1} & \\ & & X_1 & & \end{array}$$ commutes.

And, finally, we have the universal property of $A \times B: \forall X_2$ and morphisms $f_2:X_2 \to A, g_2:X_2 \to B$ we have a unique morphism $\upsilon:X_2 \to A \times B$ such that the following diagram $$\begin{array}{ccccc} A & \stackrel {\pi_A} \leftarrow & A \times B & \stackrel{\pi_B} \to & B \\ & {}_{f_2} \nwarrow & \ \ \ \ \ \uparrow {}_{\upsilon} & \nearrow {}_{g_2} & \\ & & X_1 & & \end{array}$$ commutes. From the universal properties of $A \times (B \times C)$ and $A \times B$ follows that $\forall$ objects $X$ and morphisms $f,g$ and $h$ we have a unique morphism $\psi:X \to (A \times B) \times C$ such that $\pi_A\pi'_{A \times B}\psi = f\\\pi'_C\psi = h$.

Now, how do we prove that an analogue of $(1)$ goes for $(A \times B) \times C$ as well?

• Why is $\psi\colon X\to A\times(B\times C)$ and not $\psi\colon X\to (A\times B)\times C$? And I assume $f,\ g,\ h$ have domain $X$ and codomains $A,\ B,\ C$ respectively? If I'm reading correctly you proved that $(A\times B)\times C$ is product and your question is how to prove it for $A\times(B\times C)$? Please clarify. – Ennar Aug 22 '15 at 18:03
• I mistyped codomain of $\psi$, it is $(A \times B) \times C$. Yes, $f,g,h$ are as you say(like $f_0,g_0,h_0$). No, I couldn't finish the proof for $(A \times B) \times C$. I proved that $\forall$ objects $X$ and morphisms $f,h$ we have a unique morphism $\psi:X \to (A \times B) \times C$ such that $\pi_A\pi'_{A \times B}\psi = f\\\pi'_C\psi = h$ I couldn′t prove that $\psi$ exists as well for any $g$ such that $\pi_B\pi_{A \times B}\psi = g$. – Jxt921 Aug 22 '15 at 22:15

## 3 Answers

Theorem: $(X_1 \times X_2) \times X_3$ together with the obvious projection arrows forms a ternary product of $X_1, X_2, X_3$.

Proof Assume $[X_1 \times X_2, \pi_1, \pi_2]$ is a product of $X_1$ with $X_2$, and $[(X_1 \times X_2) \times X_3, \rho_1, \rho_2]$ is a product of $X_1 \times X_2$ with $X_3$.

Take any object $S$ and arrows $f_i\colon S \to X_i$. By our first assumption, (a) there is a unique $u \colon S \to X_1 \times X_2$ such that $f_1 = \pi_1\circ u$, $f_2 = \pi_2\circ u$. So by our second assumption (b) there is then a unique $v \colon S \to (X_1 \times X_2) \times X_3$ such that $u = \rho_1 \circ v$, $f_3= \rho_2\circ v$.

Therefore $f_1 = \pi_1\circ \rho_1 \circ v$, $f_2 = \pi_2 \circ \rho_1 \circ v$, $f_3 = \rho_2 \circ v$

So now consider $[(X_1 \times X_2) \times X_3, \pi_1 \circ \rho_1, \pi_2 \circ \rho_1, \rho_2]$. This, we claim, is indeed a ternary product of $X_1, X_2, X_3$. We've just proved that $S$ and arrows $f_i\colon S \to X_i$ factor through the product via the arrow $v$. It remains to confirm $v$'s uniqueness in this new role.

Suppose we have $w \colon S \to (X_1 \times X_2) \times X_3$ where $f_1 = \pi_1 \circ \rho_1 \circ w$, $f_2 = \pi_2 \circ \rho_1 \circ w$, $f_3 = \rho_2 \circ w$. Then $\rho_1 \circ w\colon S \to X_1 \times X_2$ is such that $f_1 = \pi_1\circ (\rho_1 \circ w)$, $f_2 = \pi_2\circ (\rho_1 \circ w).$ Hence by (a), $u = \rho_1 \circ w$. But now invoking (b), that together with $f_3 = \rho_2 \circ w$ entails $w = v$. $\quad\Box$

(That's Theorem 76 in these Notes on Basic Category Theory.)

• These Notes seem to be very nicely written. – Ennar Aug 23 '15 at 2:03

We have answer using projections to prove universal property by Peter Smith, and I'm going to show another way to prove this, although, depending how one defines products (limits), this may actually be longer to work out from scratch. But, the characterization of product I'm going to use is very useful in itself:

$P$ is product of the family $\{A_i\}_{i\in I}$ if and only if for any $X$ we have isomorphisms $$\operatorname{Hom}(X,P)\cong \prod_{i\in I}\operatorname{Hom}(X,A_i)$$ which are natural in $X$.

Now, to the question. It's obvious that $(A\times B)\times C$ is product of $A, B, C$ in $\mathbf{Set}$: there is an obvious bijection $(a,b,c)\mapsto ((a,b),c)$ which commutes with projections. Now in any category $\mathcal C$ we have

\begin{align} \operatorname{Hom}(X,(A\times B)\times C) &\cong \operatorname{Hom}(X,A\times B)\times \operatorname{Hom}(X,C)\\ &\cong (\operatorname{Hom}(X,A)\times \operatorname{Hom}(X,B))\times \operatorname{Hom}(X,C)\\ &\cong \operatorname{Hom}(X,A)\times \operatorname{Hom}(X,B)\times \operatorname{Hom}(X,C) \end{align} This is obviously natural in $X$, thus, we can conclude that $(A\times B)\times C$ is product of objects $A, B, C$.

I've finally realized it works the same way for any $g$ as it works for $f$ That is, we get from the universal property of $(A \times B) \times C$ that $\forall$ morphisms $f_1: X \to A \times B$ there is a unique morphism $\phi: X \to (A \times B) \times C$ such that

$\pi'_{A \times B}\phi = f_1$ But it follows that for all morphisms $\pi_Af_1 = f, \pi_Bf_1 = g$ $$\pi_A\pi'_{A \times B}\phi = \pi_Af_1\\ \pi_B\pi'_{A \times B}\phi = \pi_Bf_1$$ The fact that any morphisms of $X \to A$ and $X \to B$ can be decomposed as $\pi_Af_1$ and $\pi_Bf_1$ respectively for some $f_1:X \to A \times B$ follows from universal property of the product $A \times B$. Can say that the initial question is resolved, all that remains is to do the same for $A \times (B \times C)$(which I imagine to be analogous ) and deduce they are isomorphic.