§ Categorical definition of products in painful detail
I feel like I have incorrectly understood, then un-understood, and re-understood
in a slightly less broken way the definition of the product in category theory
around 5 times. I'm documenting the journey here.
§ The definition
Given two objects a,b, in a category C, any 3-tuple
(p∈C,πa∈Hom(p,a),πb∈Hom(p,b)) is called their product , if for any
other 3 tuple (q∈C,πa′∈Hom(q,a),πb′∈Hom(q,b)), we have a
unique factorization map f∈Hom(q,p) such that πa′=πa∘f,
πb′=πb∘f.
(Note that I did not say the product. This is on purpose). We claim that
the product is unique up to unique isomorphism.
Let's choose the category to be the category of sets. Let's try and figure out
what a product of the sets a={α,β} and b={γ,δ}
is going to be.
§ Non-example 1: product as {1}
Let's try to choose the product set as simply {1}, with the maps
being chosen as πa(1)=α;πb(1)=γ:
πb
p{1}--->{ γ }
| { δ }
|
πa|
v
{ α , β }
In this case, it's easy to see the failure. I can build a set q={2} with
the maps πa′(2)=α;πb′(2)=δ:
πb
q{2}-+ { γ }
| | { }
| +->{ δ }
|
πa|
v
{ α , β }
There is a single, unique map which takes q to p, which is the function f:2↦1.
See that πb′(2)=δ, while πb(f(2))=πb(1)=γ. Hence
the universal property can never be satisfied.
Thus ({1},1↦α,1↦γ) is not a
product of {α,β} and {γ,δ} as it is
unable to represent a pair (α,δ).
§ Non-example 2: product as {1,2,3,4,5}
In this case, we shall see that we will have too much freedom , so this will
violate the "unique map" aspect. Let's pick some choice of πa and πb.
For example, we can use:
(p={1,2,3,4},πa=1↦α,2↦α,3↦β,4↦β,5↦βπb=1↦γ,2↦δ,3↦γ,4↦δ,5↦δ)
Now let's say we have a set q={42} such that πa′(42)=β,πb′(42)=δ.
If we try to construct the map f:q→p, notice that we get \emph{two}
possible legal maps. We can set f(42)=4, or f(42)=5, because both 4
and 5 map into (β,δ).
This violates the uniqueness condition of the product. Thus, the set {1,2,3,4,5}
is not a product of {α,β} and {γ,δ} because it does not
provide a unique map from q into p. Alternatively, it does not provide
a unique representation for the tuple (β,δ). Thus it can't be a product.
§ Checking an example: {α,β}×{γ,δ} as {1,2,3,4}
I claim that a possible product of a and b is:
(p={1,2,3,4},πa=1↦α,2↦α,3↦β,4↦β,πb=1↦γ,2↦δ,3↦γ,4↦δ)
p πa a
1------------*--->{α}
| 2--------─┘ { }
| | 3-------*--->{β}
| | | 4----─┘
+----* |
πb | | |
| *---+
| |
v v
b {γ δ}
Now given a 3-tuple (q,πa′∈Hom(q,a),πb′∈Hom(q,b)), we construct
the factorization map f:q→p, where:
f:q→p;f(x)≡⎩⎪⎪⎪⎪⎨⎪⎪⎪⎪⎧1234πa′(x)=α∧πb′(x)=γπa′(x)=α∧πb′(x)=δπa′(x)=β∧πb′(x)=γπa′(x)=β∧πb′(x)=δ
That is, we build f(x) such that on composing with πa and πb, we will
get the right answer. For example, if πa′(x)=α, then we know that
we should map x to an element y∈p such that π(y)=α. So
we need y=1∨y=2. Then looking at πb′(x) allows us to pick a
unique y. There is zero choice in the
construction of f. We need exactly 4 elements to cover all possible ways
in which q could map into a and b through πa′,πb′ such that
we cover all possibilities with no redundancy.
This choice of product is goldilocks : it does not have too few elements such
that some elements are not representable; it also does not have too many
elements such that some elements are redundant.
§ Non uniqueness: product as {10,20,30,40}
Note that instead of using p={1,2,34}, I could have used
p={10,20,30,40}
and nothing would have changed.
I have never depended on using the values 1,2,3,4.
Rather, I've only used them as \emph{labels}.
§ Non uniqueness: product as {(α,γ),(α,δ),(β,γ),(β,δ)}
Indeed, our usual idea of product also satisfies the product, since it is
in unique isomorphism to the set {1,2,3,4} we had considered previously.
But this might be strange: Why is it that the categorical definition of product
allows for so many other "spurious" products? Clearly this product of tuples
is the best one, is it not?
Of course not! Inside the category of sets, anything with the same cardinality
is isomorphic. So nothing inside the category can distinguish between the
sets {1,2,3,4} and {(α,γ),(α,δ),(β,γ),(β,δ)}.
Hence, the usual product we are so used to dealing with is not privileged.
This should make us happy, not sad. We have removed the (un-necessary)
privilege we were handing to this one set because it "felt" like it was
canonical, and have instead identified what actually makes the product of sets
tick: the fact that their cardinality is the product of the cardinalities of
the individual sets!
§ How to think about the product
Since we are specifying the data of (p,πa,πb), we can simply think of
elements of p as being "pre-evaluated", as (x∈p,πa(x),πb(x)).
So in our case, we can simplify the previous situation with (p={10,20,30,40},πa,πb)
by writing the set as
p={(10,α,γ),(20,α,δ),(30,β,γ),(40,β,δ)}.
This tells us "at a glance" that every element of a×b is represented,
as well as what element it is represented by.
§ Proof of uniqueness upto unique isomorphism
- Assume we have two products (p,πa,πb) and (q,πa,πb), which are products of a and b
- By the universality of p wrt q, we get a unique! map q2p such that the diagaram commutes.
- By the universality of q wrt p, we get a unique! map p2q
- We get a map q2p⋅p2q:p→p. by the universality of p with respect to p, we get a unique! map that makes the diagram commute.But we have two such maps: idp as well as q2p.p2q. Hence we must have idp=q2p⋅p2q. In pictures:
∃!id(p)
+---+
| |
| v
+---------ppppp--------+
| πa | ^ πb |
v ∃!p2q | v
a | | b
^ | ∃!q2p ^
| π'b v | π'b |
+---------qqqqq--------+
- The full diagram commutes.
- By definition of identity/commutativity of the diagram, πa∘idp=πa.
- By definition of identity/commutativity of the diagram, πb∘idp=πb.
- By the commutativity of the diagram, we have πa∘(q2p∘p2q)=πa.
- By the commutativity of the diagram, we have πb∘(q2p∘p2q)=πb.
- We can consider the universal property of the product, where we have (p,πa,πb) as one product, and (p,πa,πb) as another product.
- This gives us a unique map h such that πa∘h=πa, and πb∘h=πb.
- We have two candidates for h: h=idp and h=p2q∘q2p. Hence, by the uniqueness of h, we have that idp=p2q∘q2p.
§ Wrapping up