Is there a coproduct in $\mathsf{Set}$ that is $\textit{not}$ the disjoint union?

Background: I'm self-studying Aluffi's Algebra: Chapter 0; currently on Section I.5.5 on coproducts. I've worked through proving that the disjoint union in $\mathsf{Set}$ is indeed a coproduct and I understand that any two coproducts in $\mathsf{Set}$ are isomorphic. I am asking whether the converse is true; that is, whether all coproducts in $\mathsf{Set}$ are disjoint unions.

I am aware that there are categories out there whose coproducts do not coincide with disjoint unions; see the answer here. My question concerns coproducts in $\mathsf{Set}$, specifically.

I am asking this question because, before learning category theory at all, the definitions of products and disjoint unions that I had in mind were:

  • A product of sets $X$ and $Y$ is a triple $(U,\pi_X,\pi_Y)$ where $U$ is a set and $\pi_X:U\to X$ and $\pi_Y:U\to Y$ are functions (called canonical projections) such that for any other product $(V,f_X,f_Y)$, there exist a unique function $\sigma:V\to U$ such that $f_X=\pi_X\circ\sigma$ and $f_U=\pi_Y\circ\sigma$.
  • A disjoint union of sets $X$ and $Y$ is a triple $(W,\iota_X,\iota_Y)$ where $W=X'\cup Y'$ for any sets $X'$ and $Y'$ such that $X\cong X'$, $Y\cong Y'$, and $X'\cap Y'=\varnothing$, and $\iota_X:X\to W$ and $\iota_Y:Y\to W$ are functions such that for any other disjoint union $(Z,g_X,g_Y)$, there exists a unique function $\rho:W\to Z$ such that $g_X=\rho\circ\iota_X$ and $g_Y=\rho\circ\iota_Y$.

The definition for products aligned perfectly with final objects in the slice category $\mathsf{Set}_{X,Y}$. However, for disjoint unions, there seems to be additional restrictions on $W$ (namely $W=X'\cup Y'$ ...) that are absent in the categorical definition that coproducts are initial objects in the coslice category $\mathsf{Set}^{X,Y}$. Naturally (I hope...), I am led to wonder if there are coproducts in $\mathsf{Set}$ that are not disjoint unions (but are, of course, isomorphic to disjoint unions).

Please correct me if my definitions are wrong. Thank you in advance.


Any universal property determines an objects only up to an isomorphism. Therefore, the coproduct of $X$ and $Y$ in the category of sets, is not uniquely defined. It can be defined in infinitely many ways, and any two such choices will be isomorphic. In particular, if $C=X\coprod Y$ is one such choice, with the canonical injections $X\to C$ and $Y\to C$, then any other set $D$ isomorphic to $C$ also yields a coproduct of $X$ and $Y$. $D$ is isomorphic to $C$ if, and only if, $C$ and $D$ have the same cardinality; a pretty weak property.

Now, weather you interpret this to mean that the coproduct in $\mathbf {Set}$ much be the disjoint union (by which you mean that any choice of coproduct is canonically isomorphic to the disjoint union) or if you take that to mean that the coproduct does not have to be the disjoint union (since the disjoint union is but one of many choices for the coproduct) is a linguistic matter. I would say that in $\mathbf{Set}$ disjoint unions are not canonically definable. If the sets are disjoint, there is a nice choice for the disjoint union. In any case, disjoint unions are nice models for coproducts.


According to the Wikipedia article Disjoint union:

In mathematics, a disjoint union (or discriminated union) of a family $(A_{i}:i\in I)$ of sets is a set $A,$ often denoted by $\bigsqcup_{i\in I}A_{i},$ with an injective function of each $A_{i}$ into $A,$ such that the images of these injections form a partition of $A$ (that is, each element of $A$ belongs to exactly one of these images). The disjoint union of a family of pairwise disjoint sets is their union. In terms of category theory, the disjoint union is the coproduct of the category of sets. The disjoint union is thus defined up to a bijection.

This definition suggests, but does not state clearly, that not only is every disjoint union a coproduct in $\mathsf{Set},$ but conversely, every coproduct in $\mathsf{Set}$ is a disjoint union.

The comment on your question by @D_S, if I'm reading it correctly, makes the same point.

I addressed this point in a long answer last year. It's very long, and mostly irrelevant to the present question, but the relevant portion is short enough to quote:

Every set-indexed family of sets $(A_k)_{k \in K}$ has a coproduct. The usual construction, which confusingly is called a disjoint union of the $A_k$ (even though the point is that the $A_k$ need not be disjoint), is $E = \bigcup_{k \in K} A^*_k,$ where $A^*_k = \{k\} \times A_k$ for all $k \in K$ (or $A^*_k = A_k \times \{k\},$ it makes no difference).

As the Wikipedia article rightly observes, the crucial property of such a set $E$ is that there is a family of injective functions $(\epsilon_k \colon A_k \to E)_{k \in K}$ whose images $A^*_k$ form a partition of $E$. It is clear that any such set $E$, with such functions $\epsilon_k,$ has the universal property needed for it to be a coproduct of the $A_k.$

The converse is also true. Let $(C, (\gamma_k)_{k \in K})$ be any coproduct of the $A_k,$ and let $\varphi \colon C \to E$ be the unique bijection such that $\varphi \circ \gamma_k = \epsilon_k$ for all $k \in K.$ Then each of the functions $\gamma_k = \varphi^{-1} \circ \epsilon_k$ is an injection, and their images $\gamma_k(A_k) = \varphi^{-1}(A^*_k)$ form a partition of $C,$ so $(C, (\gamma_k)_{k \in K})$ is a disjoint union of the $A_k,$ in the sense defined by the Wikipedia article.

The definition of 'disjoint union' given in your question isn't clear to me. (I don't know much about category theory, so it's possible that I have misunderstood something.)

It seems to merge part of the Wikipedia definition (not all of it, as it omits the part about injective functions) with a version of the usual definition of a coproduct in $\mathsf{Set},$ complicated by the requirement that $(Z,g_X,g_Y)$ itself be a disjoint union, so that the definition seems to recurse on itself, in a never-ending way. (I hope I'm not just projecting my own confusion onto what you've written!)

Do you have a source for this definition? I'm sorry to answer a question with another question! You write:

However, for disjoint unions, there seems to be additional restrictions [$\ldots$]

What have you read that gives this impression?

Incidentally, it would be good to have an authoritative source for a definition of the term 'disjoint union'. (Wikipedia is often excellent on mathematics, and I find little wrong with its definition of the term, but it is not an authoritative reference.)


I would also like to take up your comment about there being an analogous question for products. I believe that there is such a question, and I would phrase it thus (this is just off the top of my head, as I can't easily lay my hands on the many notes I've written on the topic - they are all over the place, in more senses than one!):

Say, temporarily (I don't have a term for this), that a set $Z$ is an 'independent combination' of sets $X$ and $Y$ if there are functions $\eta_X \colon Z \to X$ and $\eta_Y \colon Z \to Y$ such that: (i) for all $z, z' \in Z$ we have $z = z'$ if and (trivially) only if $\eta_X(z) = \eta_X(z')$ and $\eta_Y(z) = \eta_Y(z')$; and (ii) for all $x \in X$ and all $y \in Y,$ there exists $z \in Z$ such that $\eta_X(z) = x$ and $\eta_Y(z) = y.$

This is analogous, at least loosely, to the definition (as in Wikipedia) of a 'disjoint union', because $\eta_X$ and $\eta_Y$ determine equivalence relations on $Z$ (analogous to subsets of a 'disjoint union'), condition (i) says that their conjunction is the identity relation on $Z$ (analogous to the union of two subsets being the whole set), and condition (ii) says that the two relations are in a sense 'independent' of one another (analogous to two subsets being disjoint), and $X$ and $Y$ are in one-to-one correspondence with the quotients of $Z$ by the two relations (analogous to $X$ and $Y$ being in one-to-one correspondence with subsets).

Clearly, any independent combination of $X$ and $Y$ is also a product of $X$ and $Y$ in the categorical sense, because conditions (i) and (ii) together assert - without explicit mention of ordered pairs - that there is a bijection $\eta \colon Z \to X \times Y,$ defined by $\eta(z) = (\eta_X(z), \eta_Y(z)),$ and we have $\eta_X = \pi_X \circ \eta$ and $\eta_Y = \pi_Y \circ \eta,$ where $\pi_X \colon X \times Y \to X$ and $\pi_Y \colon X \times Y \to Y$ are the projections.

Conversely, any product, $Z,$ of $X$ and $Y$ in $\mathsf{Set},$ with its projections $\eta_X \colon Z \to X$ and $\eta_Y \colon Z \to Y,$ is an independent combination of $X$ and $Y,$ because there is a bijection $\theta \colon Z \to X \times Y$ such that $\eta_X = \pi_X \circ \theta$ and $\eta_Y = \pi_Y \circ \theta,$ and conditions (i) and (ii) are clearly satisfied.

(However, I'm pretty sure that the last time I wrote notes on this topic, I came to the disappointing conclusion that the analogy doesn't go as far, or work as nicely, as I'd hoped. I wish I could be less vague about this, but your comment was interesting, and it would be a shame just to let it pass by.)