Disjoint union
Undergraduate
Consider two sets $A$ and $B$, which may overlap. The disjoint union of $A$ and $B$ is a set that combines $A$ and $B$ while keeping the elements of $A$ apart from the elements of $B$:
\[A \sqcup B = (\setdef{1} \times A) \cup (\setdef{2} \times B),\]so each element is tagged with the set it came from.
Examples
Worked examples
-
$A = \setdef{\text{apple}}$ and $B = \setdef{\text{banana}}$
: $A \sqcup B = \setdef{(1, \text{apple}), (2, \text{banana})}$
High school
Each element is tagged with $1$ (from $A$) or $2$ (from $B$). The result is usually identified with $\setdef{\text{apple}, \text{banana}}$.
-
$A = \setdef{\text{apple}, \text{orange}}$ and $B = \setdef{\text{orange}, \text{banana}}$
: $A \sqcup B = \setdef{(1, \text{apple}), (1, \text{orange}), (2, \text{orange}), (2, \text{banana})}$
High school
The tagged disjoint union keeps both copies of orange, so it has $4$ elements.
Distinctions involving this term
- 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.