Skip to content
Part IA Michaelmas, Lent Term

Disjoint Unions

Motivation: The Problem with Union

Given sets AA and BB, the ordinary union A∪BA \cup B loses information:

  • If x∈A∩Bx \in A \cap B, we cannot tell if xx came from AA, from BB, or from both
  • The size is ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|, not simply ∣A∣+∣B∣|A| + |B|

Definition of Disjoint Union

The disjoint union (also called coproduct or sum) of AA and BB is:

A+B=({0}×A)∪({1}×B)A + B = (\{0\} \times A) \cup (\{1\} \times B)

Each element is “tagged” with its origin: 00 for elements from AA, 11 for elements from BB.

Alternative Notations

  • A⨿BA \amalg B (amalgamation symbol)
  • A⊔BA \sqcup B
  • A⊕BA \oplus B

Examples

Example 1

A={a,b}A = \{a, b\}, B={b,c}B = \{b, c\}.

  • A∪B={a,b,c}A \cup B = \{a, b, c\} (ordinary union, bb appears once)
  • A+B={(0,a),(0,b),(1,b),(1,c)}A + B = \{(0, a), (0, b), (1, b), (1, c)\} (disjoint union, bb appears twice with different tags)

Example 2

A={1,2,3}A = \{1, 2, 3\}, B={x,y}B = \{x, y\}.

A+B={(0,1),(0,2),(0,3),(1,x),(1,y)}A + B = \{(0, 1), (0, 2), (0, 3), (1, x), (1, y)\}

Properties

Cardinality

∣A+B∣=∣A∣+∣B∣|A + B| = |A| + |B|

This is the key advantage: the size adds without any correction.

Injective Maps

There are natural injection maps:

  • ιA:A→A+B\iota_A : A \to A + B given by ιA(a)=(0,a)\iota_A(a) = (0, a)
  • ιB:B→A+B\iota_B : B \to A + B given by ιB(b)=(1,b)\iota_B(b) = (1, b)

Universal Property

Given any set CC and functions f:A→Cf : A \to C, g:B→Cg : B \to C, there is a unique function [f,g]:A+B→C[f, g] : A + B \to C such that:

[f,g]∘ιA=fand[f,g]∘ιB=g[f, g] \circ \iota_A = f \quad \text{and} \quad [f, g] \circ \iota_B = g

Explicitly: [f,g](0,a)=f(a)[f, g](0, a) = f(a) and [f,g](1,b)=g(b)[f, g](1, b) = g(b).

Universal property of disjoint union

Case Analysis

The disjoint union enables case analysis in proofs:

To define a function h:A+B→Ch : A + B \to C, define:

  1. A function hA:A→Ch_A : A \to C for the “left” case
  2. A function hB:B→Ch_B : B \to C for the “right” case

Then h=[hA,hB]h = [h_A, h_B].

n-ary Disjoint Union

For sets A1,…,AnA_1, \ldots, A_n:

A1+A2+⋯+An={(i,a):i∈{1,…,n},a∈Ai}A_1 + A_2 + \cdots + A_n = \{(i, a) : i \in \{1, \ldots, n\}, a \in A_i\}

Cardinality

∣∑i=1nAi∣=∑i=1n∣Ai∣\left|\sum_{i=1}^{n} A_i\right| = \sum_{i=1}^{n} |A_i|

Product vs Sum

Product ×\timesSum ++
Pair (a,b)(a, b) with bothTagged (i,a)(i, a) with one
$A \times B
Projection mapsInjection maps
Universal: maps outUniversal: maps in

These are dual constructions in category theory.


Summary

  • Disjoint union A+BA + B tags elements to preserve origin
  • ∣A+B∣=∣A∣+∣B∣|A + B| = |A| + |B| without intersection correction
  • Natural injections ιA\iota_A, ιB\iota_B embed AA, BB into the sum
  • Universal property: maps A+B→CA + B \to C correspond to pairs of maps A→CA \to C, B→CB \to C