# Fibered products in $\mathsf {Set}$

I'm just starting to work through Aluffi, and one question asks the reader to define fibered products (and coproducts) in the category of sets and functions. I'm just looking to check that I have the fibered products right before I move on to the fibered coproducts.

Let $\alpha\colon A\to C$ and let $\beta\colon B\to C$. Then the fibered product of $\alpha$ and $\beta$ is (I think), the set product $P:=\alpha^{-1}[\beta[B]]\times\beta^{-1}[\alpha[A]]$ together with the usual projections $\pi_A$ and $\pi_B$.

### Proof (I hope):

Let $f\colon Z\to A$ and $g\colon Z\to B$ so that $\alpha f=\beta g$. Suppose that for some $\sigma\colon Z\to P$, $f=\pi_A \sigma$ and $g=\pi_B \sigma$. Then for each $z\in Z$, $\pi_A(\sigma(z))=f(z)$ and $\pi_B(\sigma(z))=g(z)$, so for all $z\in Z$, $\sigma(z)=(f(z),g(z))$ (so $\sigma$ is unique).

Indeed, this assignment works: if $z\in Z$, then $\alpha(f(z))=\beta(g(z))\in \beta[B]$, so surely $f(z)\in \alpha^{-1}[\beta[B]]$, and symmetrically a similar thing holds for $g$, so $(f(z),g(z))\in P$. That $\pi_A\sigma=f$ and $\pi_B\sigma=g$ is then immediate.

### Update

As the answers indicate, that was wrong. Can someone tell me if the answer I give below is correct?

-

Your definition is not quite right, because with it, you need not have $\alpha\circ \pi_A=\beta\circ\pi_B$. For example, let $A=\{1,2\}$, $B=\{1,2\}$, and $C=\{1,2,3\}$, let $\alpha$ be the inclusion, and let $\beta$ send $1$ to $2$ and $2$ to $1$. Then $(2,2)$ is an element of your set, but applying $\pi_A$ and then $\alpha$ gives $2$, while applying $\pi_B$ and then $\beta$ gives $1$. The fiber product must be equipped with projections $\pi_A$ and $\pi_B$ satisfying $\alpha\circ\pi_A=\beta\circ\pi_B$.

-
Did I get it right this time, in my own answer? – dfeuer Nov 22 '13 at 22:22
Dear @dfeuer, Yes, now you have the correct definition. – Keenan Kidwell Nov 22 '13 at 23:27

Responding to Keenan Kidwell's helpful criticism and Ma Ming's perhaps-overly-generous hint, I try again:

Let $P=\{(a,b):\alpha(a)=\beta(b)\}$ and again use the canonical projections. Define $\sigma$ the same way (again, there is no other choice). Now if $z\in Z$, then $\alpha(f(z))=\beta(g(z))$, so $(f(z),g(z))\in P$ and everything works out as it should.

-
Yes, this is correct. Can you express this now in terms of a product and an equalizer? (Assuming you know both universal properties) – Karl Kronenfeld Nov 22 '13 at 23:27
@KarlKronenfeld, maybe I could if I knew what an equalizer was! Those are introduced way later in the text, after a bunch of other concepts like functors and limits and things. – dfeuer Nov 22 '13 at 23:30

This is wrong.

Let $A=B=C$, $\alpha=\beta=id$. Then the fiber product should be the diagonal in $A\times A$.

-