Cantor's Theorem

See that any set is smaller than the collection of all its subsets. Flip a list's diagonal to build a new element.

The power set collects all subsets. One extra element doubles the subsets. So any attempted pairing leaves leftovers. The diagonal-flipped set is exactly such a leftover.

For example, three πŸ§‘ classmates have eight subsets. Subsets already outnumber the friends. More people only widens the gap. Even infinity keeps the gap.

∣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.

2. Number Systems