Why isn't the Disjoint Union in Set a *product* in addition to being a coproduct? So I'm understanding that in $Set$ that the cartesian product is a categorical product, and further get why the disjoint union is a categorical coproduct, but why is it also not a product? I want to understand where I'm going wrong in my reasoning for why it seems like it could be a product.
If I define disjoint union to be
$$ A \sqcup B := \{ a \in A\ | \ (0, a) \} \cup \{ b \in B\ | \ (1, b) \} $$
then I can define a projection $p:  A \sqcup B \to A$, as $$ p := \{ (i, x) \in A \sqcup B, i =0\ |\ x \}$$ and respectively $q:  A \sqcup B \to B$ by setting $i = 1$ above.
Now with that, pick an arbitrary object $V$ with morphisms $f: V \to A, g: V \to B$, then there exists a morphism $V \to A \sqcup B$, defined as $$ h := \{ v \in V \ | \ (0, f(v) \} \cup \{ v \in V \ | \ (1, g(v) \}$$
Can you explain where my reasoning falls apart? If I were to take a guess, it's that my definition of disjoint union is improper, because the indexes can be arbitrary, hence there cannot be cannonical projection functions from the disjoint union to its parts, because the indexes separating the parts are neither known, nor do they tell us if they correspond to $A$ or $B$.
Does that hunch sound correct? Even in that, my instinct is to ask why we couldn't construct a definition of disjoint union where you always know how to access elements of any of its objects in a canonical way. That is, where the index always starts at zero, and for each successive object between a disjoint union of two or more sets, the next index is defined to be the successor to the largest existing index in the disjoint union.
 A: Your problem is with the definition of $p$, which doesn't really make sense. You could define it as a partial function sending $a\in A$ to itself and undefined on $B$, but by definition it needs to be defined on all of $A\sqcup B$. You could define it arbitrarily on $B$, but that just wouldn't satisfy the requirements for a product. Say you have a set $V$ and two functions $f:V\to A,g:V\to B$, there doesn't necessarily exist a function $H :V\to A\sqcup B$ such that its composition with $p$ and $q$ are $f$ and $g$.
EDIT. Here's an example. $A=\{1,2,3\},B=\{4,5,6\}$, $V=\{0\}$. There are $3$ maps from $V$ to $A$ and $3$ from $V$ to $B$, so, by definition of the product, there are $9$ maps from $V$ to the product of $A$ and $B$ (since they are precisely characterized by specifying one map from $V$ to $A$ and one map from $V$ to $B$). But there are only $6$ maps from $V$ to $A\sqcup B$, so this is impossible.
I am sure someone who is more into categories than me would feel that a different contradiction ought to be presented, but it seems to me this is the easiest thing to write down.
Perhaps you should read the proof of the fact the product is unique up to (unique) isomorphism, and see where it fails when you try to define $A\sqcup B$ as a product.
