Let f be defined on ℝ by f(x) = 1 for rational x and f(x) = 0 for irrational x. Then f is continuous at no point of ℝ.
有理點取 1、無理點取 0 的函數,在每一個點都不連續——沒有任何一段是好的,連一個好點都沒有。
正例:在 a = 1/2 這個有理點,取無理數數列 xₙ = 1/2 + √2/n,它收斂到 1/2,而 f(xₙ) 恆為 0,不收斂到 f(1/2) = 1。反例:這個函數在任何一點的單邊也救不回來——不管把定義域縮到 a 的哪一側,兩種點在那一側仍然都有,證明原封不動地照走。
PROOF
要對每一個點都判不連續。點分成兩類:有理與無理。兩類各造一條數列,手法對稱。
證明計畫 · 由所求想起 所求:對每個 a,一條收斂到 a 而像數列跑錯地方的數列。造法只有一句話:a 是有理點就沿無理數逼近它,是無理點就沿有理數逼近它——這樣一來像數列是常數,而那個常數恰好不是 f(a)。逼近做得到,靠的是稠密性。
Proof. Let a be rational, so f(a) = 1. For each n ∈ ℕ the interval (a, a + 1/n) contains an irrational number by 6.10; call it xₙ. Then |xₙ − a| < 1/n, so (xₙ) converges to a, while f(xₙ) = 0 for every n.
這一步的所求:一條由無理數組成、卻擠向有理點 a 的數列。稠密性給的是「任兩個實數之間必有無理數」,把那兩個實數取成 a 與 a + 1/n,就在指定的細窄範圍內拿到一個無理數。範圍隨 n 收窄,距離被 1/n 壓住,由 §14-4 例 5(1/n → 0)數列收斂到 a。像數列則整條是常數 0,因為每一項都是無理數。
Since (f(xₙ)) is constantly 0, it converges to 0 ≠ 1 = f(a). By the Discontinuity Criterion 20.3, f is not continuous at a.
常數數列收斂到那個常數,這一步不必再算。要留意判準要的不是「像數列發散」,而是「像數列沒有收斂到 f(a)」——這裡它收斂得很好,只是收斂到 0,而 f(a) = 1。差距是固定的 1,不隨 n 縮小。
Now let b be irrational, so f(b) = 0. By 6.10 each interval (b, b + 1/n) contains a rational number yₙ. Then (yₙ) converges to b while (f(yₙ)) is constantly 1, hence converges to 1 ≠ 0 = f(b). Again 20.3 applies. Since every real number is rational or irrational, f is continuous at no point.
Let D(f) = {x ∈ ℝ : x > 0}. Define f(x) = 0 for irrational x, and f(m/n) = 1/n whenever m, n ∈ ℕ have no common factor other than 1. Then f is continuous at every irrational point of D(f) and discontinuous at every rational point.
證明計畫 · 由所求想起 有理點:所求是一條像數列跑錯地方的數列,沿無理數逼近即可。 無理點:所求是一個半徑,讓範圍內所有的函數值都小於 ε。無理點的值本來就是 0,唯一會超標的是分母小的有理數——而它們在任一段有限長度裡只有有限多個。有限多個就可以一一避開:算出每一個到 a 的距離,取最小的那個當半徑。
Proof. Let a be a rational point of D(f), so f(a) = 1/n > 0 for some n ∈ ℕ. By 6.10 each interval (a, a + 1/k) contains an irrational number x_k; these lie in D(f) and converge to a, while f(x_k) = 0 for all k. Since 0 ≠ 1/n, criterion 20.3 shows that f is not continuous at a.
這一半與前一個定理的第一段逐字同型,只有一處不同:那裡跑錯的距離固定是 1,這裡是 1/n,隨著 a 的分母變大而變小。可是「變小」不等於「變成零」——只要它是一個正數,判準就成立。分母 100 的有理點照樣不連續,只是那裡的斷差只有 1/100。
Now let a ∈ D(f) be irrational, so f(a) = 0, and let ε > 0. By 6.7 there is n ∈ ℕ with 1/n < ε. Consider the rationals in (a − 1, a + 1) whose denominator is smaller than n. For a fixed denominator k, such a number m/k needs k(a − 1) < m < k(a + 1), which leaves at most 2k + 1 choices of m; and there are only n − 1 denominators to consider. So there are finitely many such points, and none of them equals a.
這一步的所求:把「會超標的點」清點成有限多個。超標的只可能是分母小於 n 的有理數,因為分母 k ≥ n 的既約分數 m/k 的值是 1/k ≤ 1/n < ε,本來就合格。清點的算法很直接:分母 k 固定時,分子只能落在一段長度 2k 的範圍裡,整數選擇有限;而分母的可能值也只有 n − 1 個。§6-3 的 6.7(1/n 可以任意小)保證這樣的 n 找得到。這些點都是有理數而 a 是無理數,所以它們沒有一個等於 a,距離全是正的。
Let δ be the smallest of the numbers 1, a, and the distances from a to those finitely many points; then δ > 0. Suppose x ∈ D(f) and |x − a| < δ. If x is irrational, then |f(x) − f(a)| = 0 < ε. If x = m/k in lowest terms, then k ≥ n, since every rational with smaller denominator was excluded; hence |f(x) − f(a)| = 1/k ≤ 1/n < ε. So f is continuous at a by 20.2(b).