I'm working through "The Joy of Abstraction" and this is problem 19.2.2
I've solved 19.2.1, and 19.2.3:
See if you can show that there is always a canonical morphism from the pullback $a \times_c b$ to the product $a \times b$, if they exist.
Show that this canonical morphism is always monic.
Show that if $c$ is the terminal object the pullback $a \times_c b$ is a product $a \times b$.
I've drawn a diagram of a fork going into the pullback and product diagram, and followed the loops many ways around, but haven't found a way to connect the fork to the rest of the diagram. I've tried proving it in Set, but I think the proof is using too many assumptions from Set.
This question seems like it must have a simple solution, can anybody give an instructive hint? I really don't want the answer spoiled if it is simple.
We will do this in two ways.
Direct Proof :
1 and 2:
Observe that the pair of arrows $a\times_c b \to a, a\times_c b \to b$ induce, by the universal property of the product, a unique arrow $a \times_c b \to a\times b$ such that the diagram
$$\require{AMScd} \begin{CD} a \times_c b @>>> b\\ @VVV {_{\rlap{}}\style{display: inline-block; transform: rotate(30deg)}{{\xrightarrow[\rule{4em}{0em}]{}}}} @AAA\\ a @<<< a \times b \end{CD}$$ where the arrows are the obvious ones.
You want to show that the morphism $a\times_c b \to a\times b$ is a monomorphism.
Take parallel arrows $x \xrightarrow{p} a \times_c b$, $x \xrightarrow{q} a \times_c b$ such that $x \xrightarrow{p} a \times_c b \to a \times b = x \xrightarrow{q} a\times_c b \to a \times b$.
The lower triangle of the above commutative diagram says that $ x \xrightarrow{p} a\times_c b \to a = x \xrightarrow{q} a \times_c b \to a$. Call this common arrow $f$.
The upper triangle of the above commutative diagram says that $ x \xrightarrow{p} a\times_c b \to b = x \xrightarrow{q} a \times_c b \to b$. Call this common arrow $g$.
Thus, the following square commutes
$$\require{AMScd} \begin{CD} x @>{g}>> b\\ @V{f}VV @VVV \\ a @>>> c \end{CD}$$ since the square giving the pullback $a \times_c b$ commutes.
By the Universal Property of Pullbacks, there is a unique arrow $t : x \rightarrow a\times_c b$ such that $ f = [ x \xrightarrow{t} a\times_c b \to a]$ and $ g = [x \xrightarrow{t} a \times_c b \to b]$.
Since both $p, q$ satisfy these two equations, by uniqueness, $p = q$. Since $p, q$ are arbitrary, hence the arrow $a\times_c b \to a\times b$ is left cancellable, that is, a monomorphism.
3:
Assume now that $c$ is a terminal object of the category. You can either show that the canonical morphism $a \times_c b \to a\times b$ obtained above is an isomorphism (by showing that it is a split epimorphism, since you have already shown that it is a monic) or you can show that the pullback and the product are isomorphic. I will show the later, that is, $(a \times_c b, a\times_c b \to a, a\times_c b \to b)$ is isomorphic to the product of $a$ and $b$.
Take morphisms $x \to a, x \to b$. Then, $c$ being terminal implies that the square
$$\require{AMScd} \begin{CD} x @>>> b\\ @VVV @VVV \\ a @>>> c \end{CD}$$ is commutative (since there exists a unique morphism from x to c). By the universal property of pullbacks, this induces a unique morphism $x \to a \times_c b$ such that $$x \to a = x \to a\times_c b \to a$$ $$x \to b = x \to a\times_c b \to b$$ Thus, $a \times_c b$, together with the arrows to $a$ and $b$ is a product.
Alternate Approach (using the version that you have already proved in Set) :
For any object $x$ in the category, we denote the associated contravariant representable functor $Hom(-, x)$ by $y_x$.
Note that as mentioned in the comments,$$y_a \times y_b \cong y_{a \times b}$$ $$y_a \times_{y_c} y_b \cong y_{a \times_c b}$$ (this follows alternatively from the fact that the Yoneda embedding $y : \mathcal{C} \to [\mathcal{C}^{op}, Set]$ preserves limits).
and the pair $(a\times_c b \to a, a\times_c b \to b)$ corresponds to an arrow $h : a\times_c b \to a\times b$.
You now have a commutative diagram
$$\require{AMScd} \begin{CD} y_a \times_{y_c} y_b @>{\cong}>> y_{a \times_c b}\\ @VVV @V{y(h)}VV \\ y_a \times y_b @>{\cong}>> y_{a \times b} \end{CD}$$ of functors and natural transformations, where the left vertical natural transformation has, as it's component at an object $x$, the canonical inclusion map (monic) $$Hom(x,a) \times_{Hom(x,c)} Hom(x,b) \hookrightarrow Hom(x,a) \times Hom(x,b)$$in Set (and so, this natural transformation is itself a monic in particular). Also note that the commutativity of the above diagram follows from the object-wise commutativity of it, which follows easily from the naturality of the isomorphism $y_a \times y_b \cong y_{a \times b}$).
Since the left vertical natural transformation is a monic and the above square commutes, hence $y(h)$ is a monic. Finally since the Yoneda embedding is faithful, it reflect monics, so that $h : a \times_c b \to a \times b$ is a monomorphism.
Thus, the left vertical natural transformation $y_a \times_{y_c} y_b \to y_a \times y_b$ in the above commutative square is a natural isomorphism. Consequently, $y(h)$ is an isomorphism and since the Yoneda embedding $y$ is fully faithful, $h : a \times_c b \rightarrow a \times b$ is an isomorphism.