Proof. Let C ⊆ B. Suppose first that B is finite, so that some one-to-one function f carries B into an initial segment Sₙ. Since every element of C is an element of B, the same f may be read on C alone; it is still one-to-one and its values still lie in Sₙ, which makes C finite.
先處理 finite 的那一半。因為 B 是 finite,定義 3.1(能被 one-to-one 打進某個 initial segment Sₙ 者為 finite、與整個 ℕ 有 1-1 correspondence 者為 denumerable,兩者合稱 countable)交給我們一個 one-to-one 函數 f,把 B 打進某個 Sₙ。接著是這一步真正的動作:不另造函數,只把 f 的定義域縮小到 C。one-to-one 要求「相異的輸入給出相異的輸出」,而這個要求對 B 的每一對元素都已成立;由於 C 的元素本來就是 B 的元素,它對 C 的每一對元素也成立——縮小定義域只會減少要檢查的配對,不可能製造出新的碰撞。輸出的落點也沒有改變,仍在 Sₙ 裡,所以 C 正好滿足 finite 的定義。
Now suppose B is countable. Then a one-to-one function f carries B into ℕ: this is immediate when B is denumerable, and in the finite case the initial segment Sₙ is itself part of ℕ. Reading f on C alone, as above, gives a one-to-one function from C into ℕ.
It remains to identify the image f(C) ⊆ ℕ. If f(C) is empty, then C is empty as well, so C is finite and the argument is over. Suppose therefore that f(C) is non-empty. Since ℕ is well-ordered, take the least element of f(C) as entry number 1, the least of what then remains as entry number 2, and continue in this manner. Either some stage leaves nothing further to number, in which case f(C) is finite, or the numbering never stops and reaches every element of f(C), which makes f(C) denumerable.
In both of these cases f(C) is countable, and C is in one-to-one correspondence with f(C); hence C is countable as well.∎
收口。上一步不論落在哪一種結局,f(C) 都是 countable。而 f 讀在 C 上是 one-to-one,它把 C 的每個元素送到 f(C) 的一個元素、不同元素送到不同位置,並且 f(C) 按定義就是 C 全部輸出所成的集合,所以 C 與 f(C) 之間是 1-1 correspondence——兩者的身分完全相同,f(C) 驗出什麼,C 就是什麼。因此 C 是 countable。
前半的證明(歸納法,就地解決):先看兩個集合的情形。因為 A 是 finite,依定義 3.1 存在 one-to-one 函數 f 把 A 打進某個 S_m;同理存在 g 把 B 打進某個 S_n。定義 h : A ∪ B → S_{m+n}:x ∈ A 時取 h(x) = f(x),x ∈ B 而 x ∉ A 時取 h(x) = m + g(x)。前一種輸出落在 1 到 m 之間,後一種落在 m + 1 到 m + n 之間,因此兩段絕不互撞;而各段內部的相異輸入分別由 f 與 g 的 one-to-one 保證輸出互異,所以 h 是 one-to-one,A ∪ B 因此 finite。接著對集合的份數 k 做歸納:k = 0 時一份集合也沒有,聯集是空集,依定義 3.1 是 finite;k = 1 時聯集就是那一個集合,本來就 finite;若 k 份 finite 集合的聯集必為 finite,那麼 k + 1 份的聯集可以寫成「前 k 份的聯集」與「第 k + 1 份」這兩個集合的聯集,由於前者依歸納假設是 finite、後者本來就 finite,剛才的兩集合結果就給出它仍是 finite。歸納完成。
Proof. If every Aᵢ is empty, so is the union, and the empty set is countable. Otherwise fix an index k with A_k ≠ ∅ and set Bᵢ = Aᵢ whenever Aᵢ ≠ ∅, and Bᵢ = A_k whenever Aᵢ = ∅. Because only copies of A_k have been substituted, ⋃ᵢBᵢ = ⋃ᵢAᵢ, while every Bᵢ is now countable and non-empty. For each i choose a function fᵢ : ℕ → Bᵢ that is onto — list the elements of Bᵢ, repeating the list cyclically if it is finite.
Define g : ℕ×ℕ → ⋃ᵢAᵢ by g(i, j) = fᵢ(j); this is well defined because every index i still carries a set Bᵢ and Bᵢ ⊆ ⋃ᵢAᵢ. Since each fᵢ is onto and every element of the union lies in some Bᵢ, the function g is onto.
這一步的所求:一個「一口氣管到全聯集」的機制。上一步的 fᵢ 每個只管自己那一疊,沒有誰管得到全部——把它們並排起來就行了:所有清單疊成一張大表(例 4 分數表的一般版,就是下圖),第 i 列是第 i 疊的清單。而 g 不是什麼新東西,它就是「查表」這個動作:給列號 i 與位號 j,回傳那一格的內容——g(i, j) = fᵢ(j)。立刻用例 4 的數字查一次:g(2, 3) = f₂(3) = 2⁄2,正是圖中圈起來的那一格。剩下兩件待驗的事。其一,每一格都查得到東西嗎?會怕的是空疊——但上一步的改填保證每個 i 都還配著一疊非空的 Bᵢ,所以第 i 列必有清單,查出來的元素落在 Bᵢ 裡、也就落在聯集裡:g 是貨真價實的函數。其二,有沒有元素躲得掉這張表?任取聯集裡的元素 x——它屬於某一疊 Bᵢ(⋃ᵢBᵢ 與 ⋃ᵢAᵢ 是同一個集合),而 fᵢ 是 onto,所以 x 在第 i 列的清單上佔著某個位號 j,於是 g(i, j) = x。每個元素在表上都至少有一格:g 是 onto。
Enumerate ℕ×ℕ along diagonals: for d ∈ ℕ, the d-th diagonal consists of the d cells with i + j = d + 1, taken in order of increasing i. The diagonals preceding it hold 1 + 2 + ⋯ + (d−1) = (d−1)d/2 cells, so the cell (i, j), which lies on the diagonal d = i + j − 1, receives the number (d−1)d/2 + i. Since every n ∈ ℕ satisfies (d−1)d/2 < n ≤ d(d+1)/2 for exactly one d, and i = n − (d−1)d/2, j = d + 1 − i then recover the cell, this rule inverts to a 1-1 correspondence ψ : ℕ ↔ ℕ×ℕ. Because ψ reaches every cell and g is onto, the composite g∘ψ : ℕ → ⋃ᵢAᵢ is onto as well.
這一步的所求:把二維的表壓成一維的隊伍——也就是一套「格子 ↔ 號碼」的雙向換算。走法就是例 4 的對角線,畫面同一張;差別是這裡得把走法寫成明確的公式。第 d 條對角線指的是所有滿足 i + j = d + 1 的格子——索引由 1 起算,所以第 1 條只有 (1, 1)、第 2 條有 (1, 2) 與 (2, 1),第 d 條恰好 d 格;線內的次序規定為 i 由小到大。有了這兩件事,每一格的號碼就算得出來:因為排在第 d 條之前的格子共 1 + 2 + ⋯ + (d−1) = (d−1)d/2 個,格子 (i, j) 的號碼就是 (d−1)d/2 + i,其中 d = i + j − 1。拿 (2, 3) 驗算:d = 4,前面有 1 + 2 + 3 = 6 格,號碼是 6 + 2 = 8。反過來給定號碼 n 也找得回格子:由於三角數 d(d+1)/2 嚴格遞增且趨向無窮,恰有一個 d 使 (d−1)d/2 < n ≤ d(d+1)/2,於是 i = n − (d−1)d/2 落在 1 到 d 之間、j = d + 1 − i,而且這組 (i, j) 是唯一的。號碼與格子既然彼此都算得出對方、又都唯一,這套規則就是一個 ℕ 與 ℕ×ℕ 之間的 1-1 correspondence,記作 ψ。由於 ψ 走遍所有格子,而上一步已驗過 g 是 onto,合成的 g∘ψ 仍是 onto:ℕ 的第 n 號先經 ψ 找到一格,再經 g 找到一個元素,於是聯集的每個元素都被排進了這一列。
這張圖在證編號公式 (d−1)d/2 + i 真的給每一格一個號碼:第 d 條斜線收齊 i + j = d + 1 的 d 格、線內依 i 由小到大,所以一格的號碼就是「前面斜線的總格數 (d−1)d/2」再加「線內排第 i」。藍圈驗算 (2, 3):它在 d = 4 那條線上,前面共 1 + 2 + 3 = 6 格,號碼 6 + 2 = 8。這正是例 4 那條藍色掃線的公式版,每一格都在有限步之內被點到。
Finally let h(x) = min { n ∈ ℕ : (g∘ψ)(n) = x } for x ∈ ⋃ᵢAᵢ. The set on the right is non-empty, since g∘ψ is onto. By the Well-Ordering Property its minimum therefore exists. Since one position carries one element, distinct elements have distinct first positions, so h is one-to-one and gives a 1-1 correspondence between ⋃ᵢAᵢ and its image h(⋃ᵢAᵢ) ⊆ ℕ. Now ℕ is countable, so Theorem 3.3 makes the subset h(⋃ᵢAᵢ) countable. Countability travels back along h: should h(⋃ᵢAᵢ) be finite, a one-to-one function carries it into some Sₙ, and composing that function with h carries ⋃ᵢAᵢ one-to-one into Sₙ; should it be denumerable instead, composing the 1-1 correspondence onto ℕ with h puts ⋃ᵢAᵢ in 1-1 correspondence with ℕ. Hence ⋃ᵢAᵢ is finite in the first case and denumerable in the second, and countable in either.∎