Cantor's Theorem

Every set is smaller than its power set — ∣X∣<∣P(X)∣|X| < |\mathcal{P}(X)|. The diagonal-flipped set differs from every row of the list. (This is the theorem itself, not the Cantor "set" scene.)

∣X∣<∣P(X)∣|X| < |\mathcal{P}(X)|
D={x∈X:x∉f(x)}≠f(y) ∀yD = \{x \in X : x \notin f(x)\} \ne f(y)\ \forall y

Examples & Exercises

Prove Cantor's theorem completely: for every set XX, ∣X∣<∣P(X)∣\lvert X \rvert < \lvert\mathcal{P}(X) \rvert. Get ≤\le from the injection x↦{x}x \mapsto \{x\}, and rule out any surjection with the diagonal set D={x:x∉f(x)}D = \{x : x \notin f(x)\}.

D={x∈X:x∉f(x)},y∈D  ⟺  y∉f(y)D = \{x \in X : x \notin f(x)\}, \qquad y \in D \iff y \notin f(y)
∣X∣≤∣P(X)∣  via  x↦{x},∣X∣≠∣P(X)∣ (no surjection)\lvert X \rvert \le \lvert\mathcal{P}(X)\rvert \ \text{ via } \ x \mapsto \{x\}, \qquad \lvert X \rvert \ne \lvert\mathcal{P}(X)\rvert \ \text{(no surjection)}
n=5n = 5: the flipped row 1111111111 sits below the 5 listed rows and differs from row ii at column ii — the finite version of the proof below.
Show proof
  1. ∣X∣≤∣P(X)∣\lvert X \rvert \le \lvert\mathcal{P}(X)\rvert comes from the injection ι:X→P(X)\iota: X \to \mathcal{P}(X), ι(x)={x}\iota(x) = \{x\}: if {x}={y}\{x\} = \{y\} then x=yx = y, so ι\iota is injective. (For X=∅X = \varnothing the empty map is injective.)
  2. Now we show no f:X→P(X)f: X \to \mathcal{P}(X) is surjective. Form the diagonal set D={x∈X:x∉f(x)}D = \{x \in X : x \notin f(x)\} (D⊆XD \subseteq X, so D∈P(X)D \in \mathcal{P}(X)). If ff were surjective, some y∈Xy \in X would satisfy D=f(y)D = f(y).
  3. For that yy: y∈Dy \in D is equivalent by definition to y∉f(y)y \notin f(y), and since f(y)=Df(y) = D, this is equivalent to y∉Dy \notin D. So y∈D  ⟺  y∉Dy \in D \iff y \notin D — a contradiction. Hence no such yy exists, DD is not in the range of ff, and ff is not surjective.
  4. If ∣X∣=∣P(X)∣\lvert X \rvert = \lvert\mathcal{P}(X)\rvert there would be a bijection, hence in particular a surjection — contradicting the above. So ∣X∣≠∣P(X)∣\lvert X \rvert \ne \lvert\mathcal{P}(X)\rvert, and together with ≤\le from the first step, ∣X∣<∣P(X)∣\lvert X \rvert < \lvert\mathcal{P}(X)\rvert. QED.

Prove (0,1)(0,1) is uncountable, completely: assume an enumeration, write out decimal expansions, and build a diagonal number yy whose nn-th digit differs from the nn-th digit of the nn-th number while avoiding the digits 00 and 99 (to dodge the 0.0999…=0.1000…0.0999\ldots = 0.1000\ldots ambiguity).

y=0.e1e2⋯ ,en={4dnn=55dnn≠5y = 0.e_1 e_2 \cdots, \qquad e_n = \begin{cases} 4 & d_{nn} = 5 \\ 5 & d_{nn} \ne 5 \end{cases}
en≠dnn,en∉{0,9},y∈(0,1),y≠xn ∀ne_n \ne d_{nn}, \quad e_n \notin \{0, 9\}, \quad y \in (0,1), \quad y \ne x_n \ \forall n
n=5n = 5: just as 5 rows cannot exhaust the 25=322^5 = 32 possible rows, no enumeration of (0,1)(0,1) can catch the diagonal number.
Show proof
  1. Assume (0,1)(0,1) is countable and fix an enumeration x1,x2,…x_1, x_2, \ldots. Write each xnx_n in decimal as xn=0.dn1dn2⋯x_n = 0.d_{n1}d_{n2}\cdots (dnk∈{0,…,9}d_{nk} \in \{0,\ldots,9\}).
  2. Define the diagonal number y=0.e1e2⋯y = 0.e_1 e_2 \cdots by en=4e_n = 4 if dnn=5d_{nn} = 5, else en=5e_n = 5. Then en≠dnne_n \ne d_{nn} for every nn, and en∈{4,5}e_n \in \{4, 5\}, so the digits 00 and 99 never occur.
  3. y∈(0,1)y \in (0,1): 0.444…≤y≤0.555…0.444\ldots \le y \le 0.555\ldots. If y=xny = x_n, then since the decimal expansion of yy contains no 00 or 99, it cannot have an alternative expansion — two decimal expansions of the same number can differ only when one ends in infinite 00s and the other in infinite 99s — so the expansion of yy is unique. Hence the nn-th digit of xnx_n must be ene_n, contradicting en≠dnne_n \ne d_{nn}.
  4. So yy differs from every xnx_n, contradicting the claim that the enumeration covers (0,1)(0,1). Hence (0,1)(0,1) is not countable: it is uncountable. QED.

For finite ∣X∣=n\lvert X \rvert = n, prove ∣P(X)∣=2n>n\lvert\mathcal{P}(X)\rvert = 2^n > n completely by induction. Connect it to the picture above: only nn of the 2n2^n possible rows are listed in the n×nn \times n table.

P(X)=P(X′)  ⊔  {A∪{x0}:A∈P(X′)},∣P(X)∣=2 ∣P(X′)∣\mathcal{P}(X) = \mathcal{P}(X') \;\sqcup\; \{A \cup \{x_0\} : A \in \mathcal{P}(X')\}, \qquad \lvert\mathcal{P}(X)\rvert = 2\,\lvert\mathcal{P}(X')\rvert
∣P(X)∣=2n>n(n≥0)\lvert\mathcal{P}(X)\rvert = 2^n > n \qquad (n \ge 0)
n=5n = 5: there are 25=322^5 = 32 possible 0/1 rows but only 5 are listed — the flipped row being off the list is inevitable.
Show proof
  1. We prove ∣P(X)∣=2n\lvert\mathcal{P}(X)\rvert = 2^n for ∣X∣=n\lvert X \rvert = n by induction on nn. Base n=0n = 0: X=∅X = \varnothing and P(∅)={∅}\mathcal{P}(\varnothing) = \{\varnothing\}, so ∣P(X)∣=1=20\lvert\mathcal{P}(X)\rvert = 1 = 2^0.
  2. Inductive step: let ∣X∣=n+1\lvert X \rvert = n+1, pick x0∈Xx_0 \in X and put X′=X∖{x0}X' = X \setminus \{x_0\}. Subsets of XX either contain x0x_0 or not, so P(X)=P(X′)  ⊔  {A∪{x0}:A∈P(X′)}\mathcal{P}(X) = \mathcal{P}(X') \;\sqcup\; \{A \cup \{x_0\} : A \in \mathcal{P}(X')\} (disjoint union). Hence ∣P(X)∣=2 ∣P(X′)∣=2⋅2n=2n+1\lvert\mathcal{P}(X)\rvert = 2\,\lvert\mathcal{P}(X')\rvert = 2 \cdot 2^n = 2^{n+1} by the induction hypothesis.
  3. Also 2n>n2^n > n (n≥0n \ge 0) by induction: 1>01 > 0 at n=0n = 0; if 2n>n2^n > n then 2n+1=2⋅2n>2n≥n+12^{n+1} = 2 \cdot 2^n > 2n \ge n+1 (for n≥1n \ge 1; check n=0n = 0 directly). So ∣P(X)∣=2n>n=∣X∣\lvert\mathcal{P}(X)\rvert = 2^n > n = \lvert X \rvert.
  4. Connection to the picture: subsets of X={0,…,n−1}X = \{0,\ldots,n-1\} correspond bijectively to the 2n2^n binary rows. The n×nn \times n table lists only nn of them, and since 2n>n2^n > n some row is necessarily missing — flipping the diagonal explicitly constructs one. This is the finite version of Cantor's theorem.

1. Number Systems