# 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.

• I don't nderstant your notation. is $$p := \{ (i, x) \in A \sqcup B, i =0\ |\ x \}$$ a function from $A \sqcup B$ to $A$? Jul 28, 2020 at 19:40
• Yes, I am perhaps misusing notation here, if you have a suggestion for how that might be rewritten. I am attempting to define a function here that takes the entire disjoint union as input. Is this one area where I'm perhaps going astray? That $p$ does not make sense as a function, because it doesn't have a proper element-wise definition? For example, p(1, b) = ???, it wouldn't really work; it's perhaps a partial function then? Jul 28, 2020 at 19:42
• If my definition for $p$ is incorrect, could I define p(1, b) to be equal to any arbitrary element of A? Send all elements that aren't of the form (0, a) to an arbitrary a? That would require that disjoint unions only be constructed from non-empty sets however (which does already have an analog in the definition of intersection, but perhaps it's unnecessarily restrictive for the construction of disjoint union). Jul 28, 2020 at 19:49

## 1 Answer

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.

• This is a very helpful answer, thank you. You say, "You could define it arbitrarily on B, but that just wouldn't satisfy the requirements for a product". Is that true even if every $b \in B$ was sent to some (or perhaps one) $a \in A$? As I mentioned in my comments above, that seemed like it could work, but also forces a disjoint union to only exist between non-empty sets, which is not (I believe) what it is naturally defined to be. Jul 28, 2020 at 20:23
• @NicholasMontaño This wouldn't work either. I edited my answer, perhaps it'd be a bit clearer now. Jul 29, 2020 at 11:19
• It's also just impossible to define a map $B\sqcup A\to A$ when $A$ is empty, but $B$ is not.
– jgon
Jul 29, 2020 at 14:06
• @jgon That's true, but it was important to me to show this could just never work, and it's not just a problem with the case of an empty set. (Although I guess it does work in the case $A=2,B=2$, which is somewhat confusing). Jul 29, 2020 at 14:26
• @NicholasMontaño Sure things, I'm very happy I helped. If something isn't clear to you you can write here again and I'll try to explain a bit more. (Although I'm far from an expert on Category Theory...) Jul 30, 2020 at 22:03