Skip to content
Part IA Michaelmas, Lent Term

Disjoint Unions

Motivation: The Problem with Union

Given sets AA and BB, the ordinary union ABA \cup B loses information:

  • If xABx \in A \cap B, we cannot tell if xx came from AA, from BB, or from both
  • The size is AB=A+BAB|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)
  • ABA \sqcup B
  • ABA \oplus B

Examples

Example 1

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

  • AB={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:AA+B\iota_A : A \to A + B given by ιA(a)=(0,a)\iota_A(a) = (0, a)
  • ιB:BA+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:ACf : A \to C, g:BCg : B \to C, there is a unique function [f,g]:A+BC[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+BCh : A + B \to C, define:

  1. A function hA:ACh_A : A \to C for the “left” case
  2. A function hB:BCh_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},aAi}A_1 + A_2 + \cdots + A_n = \{(i, a) : i \in \{1, \ldots, n\}, a \in A_i\}

Cardinality

i=1nAi=i=1nAi\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+BCA + B \to C correspond to pairs of maps ACA \to C, BCB \to C