I'm reading Walters' Categories and Computer Science, here we have the definition of product:
I made a Mathematica code just to "see the definition working" but am confused with the following issue:
- I defined my objects as elements of $A=\{\{\},\{1\},\{2\},\{3\},\{1,2\},\{1,3\},\{2,3\},\{1,2,3\}\}$.
- I defined my arrows as $a\to b$ if $a \subset b$.
- I want to find the product of $X=\{1, 2\}$ and $Y=\{1, 3\}$, looking at the definition, I think I need to collect all $i\in A$ such that we have $X\times Y \to X$ and $X\times Y \to Y$, there are two possibilities: $\{\},\{1\}$.
- Now I think that we need to check if for all $Z\in A$, we have the arrows: $Z\to X\times Y, Z \to X, Z \to Y$ for $X\times Y=\{\}$ and then for $X\times Y=\{1\}$.
The trouble I am facing is the following: The code I made takes each possibility for $X\times Y$ and highlights the following edges:
- $X\times Y \to X$
- $X\times Y \to Y$
- $Z\to X\times Y$
- $Z \to X$
- $Z \to Y$
For all $Z\in A$ if all them exist for some $Z$. It returns me the following graphs:
Question: I am a bit confused, what is the actual product here? Is it $\{\}$?Is it $\{1\}$? Is it both? I may be confusing something really silly but I am really lost here. I suspect $\{\}$ is not a product here but I don't know why.


In your case the product corresponds to the intersection.
Things you have:
Two candidates for a product with their respective projections. However $\{1\}$ has something stronger, and it's that for $\{\}$ and its projections $q_1$ and $q_2$, there is a unique map $\{\}\rightarrow\{1\}$ call it $f$ such that $q_1 = p_1\circ f$ and $q_2 = p_2\circ f$.
I think of it this way:
We say an object is a "candidate for a product" if it has the projections. (Formally we call it a "cone".)
Then, a product is a candidate for a product with "maximal information".
As you can see, we can "recover" $q_1$ from $p_1$ and $q_2$ from $p_2$ assuming $f$. So in a sense $p_1$ and $p_2$ "contain more information". And that's what's so fundamental about this definition of product.
Importantly, you don't have a map from $\{1\}$ to $\{\}$ that has the same effect. Else it could happen that both were products.