Disjoint union: union of disjoint sets vs. tagged union
“Disjoint union” can mean an ordinary union of sets that happen to be disjoint, or a construction that tags each element with the set it came from, so that copies of overlapping sets are kept apart.
Definitions
Consider two sets that have no elements in common. Their union is a union of disjoint sets.
Consider sets $A$ and $B$ with $A \cap B = \emptyset$. A union of disjoint sets is the ordinary union $A \cup B$ in this case. Writing $A \sqcup B$ (or $A \mathbin{\dot{\cup}} B$) for it asserts that $A$ and $B$ are disjoint.
Examples
- $A = \lbrace 1, 2 \rbrace$ and $B = \lbrace 3, 4 \rbrace$ : $A \cup B = \lbrace 1, 2, 3, 4 \rbrace$
-
$A = \lbrace \text{apple} \rbrace$ and $B = \lbrace \text{banana} \rbrace$
: $A \cup B = \lbrace \text{apple}, \text{banana} \rbrace$
$A$ and $B$ are disjoint, so their union is a union of disjoint sets. The tagged disjoint union is usually identified with it.
-
$A = \lbrace \text{apple}, \text{orange} \rbrace$ and $B = \lbrace \text{orange}, \text{banana} \rbrace$
: $A \cup B$ is not a disjoint union because $A$ and $B$ overlap
$A$ and $B$ overlap, so their ordinary union $\lbrace \text{apple}, \text{orange}, \text{banana} \rbrace$ is not a disjoint union in either sense. The tagged disjoint union keeps both copies of orange, so it has $4$ elements.
Consider two sets $A$ and $B$, which may overlap. Their disjoint union is a set that combines them while keeping their elements apart: $A \sqcup B = (\lbrace 1 \rbrace \times A) \cup (\lbrace 2 \rbrace \times B)$, so each element is tagged with the set it came from.
Examples
-
$A = \lbrace \text{apple} \rbrace$ and $B = \lbrace \text{banana} \rbrace$
: $A \sqcup B = \lbrace (1, \text{apple}), (2, \text{banana}) \rbrace$
Each element is tagged with $1$ (from $A$) or $2$ (from $B$). The result is usually identified with $\lbrace \text{apple}, \text{banana} \rbrace$.
-
$A = \lbrace \text{apple}, \text{orange} \rbrace$ and $B = \lbrace \text{orange}, \text{banana} \rbrace$
: $A \sqcup B = \lbrace (1, \text{apple}), (1, \text{orange}), (2, \text{orange}), (2, \text{banana}) \rbrace$
The tagged disjoint union keeps both copies of orange, so it has $4$ elements.
Examples
Each cell is the disjoint union of $A$ and $B$, in the ___ sense. In the tagged sense, each element is paired with a tag, $1$ for $A$ or $2$ for $B$.
| Example | disjoint union (of disjoint sets) | disjoint union (tagged) | Why |
|---|---|---|---|
| $A = \lbrace \text{apple} \rbrace$ and $B = \lbrace \text{banana} \rbrace$ | $A \cup B = \lbrace \text{apple}, \text{banana} \rbrace$ | $A \sqcup B = \lbrace (1, \text{apple}), (2, \text{banana}) \rbrace$ | $A$ and $B$ are disjoint, so their union is a union of disjoint sets. The tagged disjoint union is usually identified with it. |
| $A = \lbrace \text{apple}, \text{orange} \rbrace$ and $B = \lbrace \text{orange}, \text{banana} \rbrace$ | $A \cup B$ is not a disjoint union because $A$ and $B$ overlap | $A \sqcup B = \lbrace (1, \text{apple}), (1, \text{orange}), (2, \text{orange}), (2, \text{banana}) \rbrace$ | $A$ and $B$ overlap, so their ordinary union $\lbrace \text{apple}, \text{orange}, \text{banana} \rbrace$ is not a disjoint union in either sense. The tagged disjoint union keeps both copies of orange, so it has $4$ elements. |
Notes
- When $A$ and $B$ are disjoint, the two meanings agree up to a natural bijection, so many authors use them interchangeably.
- The tagged disjoint union has $\lvert A \rvert + \lvert B \rvert$ elements, even when $A$ and $B$ overlap. For example, $\reals \sqcup \reals$ is two separate copies of the real line.