函數也有同樣的問題。一個定義在 D 上的連續函數,要把定義域撐大到整個 ℝᵖ,最省事的作法是「外面一律填零」——可是那樣通常會在 D 的邊界上跳一階。而有些函數根本無藥可救:f(x) = 1/x 在 x ≠ 0 上連續,怎麼定義 f(0) 都接不上。
本篇證明只要 D 是 closed,延拓就一定辦得到,而且不必把函數的上界撐大。第二句是額外的內容——隨便延拓很可能讓值衝出原本的範圍。
LEMMA · 兩個 closed set 之間的分隔函數
Let A, B be disjoint closed subsets of ℝᵖ, either of which may be empty. Then there is a continuous φ on ℝᵖ with φ = 0 on A, φ = 1 on B and 0 ≤ φ ≤ 1 everywhere. When both are non-empty one may take, with d(x, A) = inf {‖x − y‖ : y ∈ A} and likewise for B, φ(x) = d(x, A) / (d(x, A) + d(x, B)).
兩個互不相交的 closed set 之間,永遠架得起一道平順的斜坡:一端貼地、一端到頂,中間連續過渡。這個構造只用到「點到集合的距離」,而它本身是一個連續函數。其中一個是空集時也算數——那時整條要求只剩另一端,取常數函數即可,這一格看似瑣碎,可是下面的延拓構造真的會遇上。
正例:A = {x ∈ ℝ : x ≤ 0}、B = {x : x ≥ 1}。此時 d(x, A) = sup{x, 0}、d(x, B) = sup{1 − x, 0},於是 φ 在 [0, 1] 上恰是 φ(x) = x,兩側各為常數。反例:兩個集合必須都 closed——取 A = {x : x < 0}(不是 closed)與 B = {0},兩者不相交,可是 d(0, A) = 0 = d(0, B),分母歸零,公式失效。
Proof. For any y ∈ A and any x, z, the triangle inequality gives d(x, A) ≤ ‖x − y‖ ≤ ‖x − z‖ + ‖z − y‖; taking the infimum over y yields d(x, A) ≤ ‖x − z‖ + d(z, A), and by symmetry | d(x, A) − d(z, A) | ≤ ‖x − z‖. So d(·, A) satisfies a Lipschitz condition with constant 1, hence is continuous.
If d(x, A) = 0, there are y_n ∈ A with ‖x − y_n‖ → 0, so x belongs to the closed set A. Hence d(x, A) and d(x, B) cannot both vanish, the denominator is positive everywhere, and φ is continuous by 20.6. Finally φ = 0 on A, φ = 1 on B, and both terms being non-negative gives 0 ≤ φ ≤ 1.
這一步是邊界簿記,可是「closed」在這裡兌現。d(x, A) = 0 表示 x 要多接近 A 有多接近,也就是 x 屬於 A 或是 A 的 cluster point;10.5 說 closed 的集合收齊了所有 cluster point,所以兩種情形都給出 x ∈ A。兩個集合不相交,所以不可能同時歸零。若 A 不 closed,它的邊界點會讓分母失守,這正是 inst 那個反例。
兩個不相交的 closed set 之間架得起一道連續的斜坡。∎
這張圖在說分隔函數長什麼樣:兩個粗線段是互不相交的 closed set,上方那條曲線在左段恆為 0、在右段恆為 1,中間連續爬升。分母之所以不歸零,是逐點的理由:某一點若同時貼著兩個集合,它就同時屬於兩者,與不相交衝突。要留意這不表示兩個集合之間隔著一段統一的正距離——在無界的空間裡,兩個不相交的 closed set 可以越靠越近(例如 {(x, 1/x) : x > 0} 與橫軸),可是仍然沒有共同點。這道斜坡就是下面延拓構造裡每一輪要用的零件。
26.4 TIETZE EXTENSION THEOREM
Let f be a bounded continuous function defined on a closed subset D of ℝᵖ with values in ℝ. Then there is a continuous function g on ℝᵖ to ℝ with g(x) = f(x) for x ∈ D and sup {|g(x)| : x ∈ ℝᵖ} = sup {|f(x)| : x ∈ D}.
記 M = sup {|f(x)| : x ∈ D}。M = 0 時 f 恆為零,取 g ≡ 0 即交差,以下設 M > 0。整個構造是一串修補:每一輪造一個定義在整個ℝᵖ 上的小函數,把 D 上的剩餘誤差削掉三分之一。
證明計畫 · 由所求想起 所求是一個定義在全空間上、在 D 上與 f 吻合的連續函數。一步到位不可能,所以分無窮多輪逼近。 每一輪的作法相同:把 D 上「值太低」與「值太高」的兩堆點各收成一個 closed set,用引理在它們之間架一道斜坡,縮放成高度 ±M/3 的一個函數 g₁。扣掉 g₁ 之後,剩餘誤差從 M 降到 (2/3)M。 重複下去,第 n 輪的修補幅度是 (1/3)(2/3)^{n−1}M,等比級數收斂,所以部分和均勻收斂;極限連續(24.1)、在 D 上等於 f,而所有修補幅度加起來恰好是 M——這就是上界不變的來歷。
Proof. Put A₁ = {x ∈ D : f(x) ≤ −M/3} and B₁ = {x ∈ D : f(x) ≥ M/3}. By 22.1(c) each is the intersection of D with a closed set, and D is closed, so both are closed in ℝᵖ; they are disjoint because M > 0, and either may be empty. The Lemma provides a continuous φ₁, and g₁ = (2M/3)φ₁ − M/3 is continuous on ℝᵖ with g₁ = −M/3 on A₁, g₁ = M/3 on B₁, and |g₁| ≤ M/3 everywhere.
這一步的所求:把一輪修補造出來。兩堆點之所以 closed,靠的是 22.1(c)(closed set 的逆像被某個 closed set 切得出來)加上 D 自己 closed——兩個 closed set 的交集仍 closed。定理的前提在這裡兌現,而且是唯一一次真正用到它的地方。兩堆可能有一堆是空的(f 恆正時就沒有「值太低」的點),這正是引理特地容許空集的原因;不相交則由 M > 0 保證。斜坡的縮放是把 [0, 1] 線性搬到 [−M/3, M/3],一次函數不破壞連續。
Set f₂ = f − g₁ on D. If f(x) ≤ −M/3 then f₂(x) = f(x) + M/3 ∈ [−2M/3, 0]; if f(x) ≥ M/3 then f₂(x) ∈ [0, 2M/3]; and if |f(x)| < M/3 then |f₂(x)| < 2M/3. In every case |f₂| ≤ (2/3)M on D.
Repeating the construction with f₂ in place of f and (2/3)M in place of M, and continuing, gives continuous functions g_n on ℝᵖ with |g_n| ≤ (1/3)(2/3)^{n−1} M on ℝᵖ, |f − (g₁ + ⋯ + g_n)| ≤ (2/3)ⁿ M on D.
這一步是遞迴的記帳。兩行不等式的分工:第一行管全空間(修補函數的大小),第二行只管 D(剩餘誤差)——因為 D 以外根本沒有目標可比。第 n 輪的修補幅度是「當時的餘量除以三」,而餘量以 (2/3)ⁿ 崩塌,兩者合起來就是第一行。這與 §23-4 收縮映射的等比崩塌是同一個結構。
The partial sums s_n = g₁ + ⋯ + g_n form a uniformly convergent sequence on ℝᵖ, since for m > n |s_m − s_n| ≤ (1/3)(2/3)ⁿ M [1 + 2/3 + ⋯] = (2/3)ⁿ M. By 17.11 the limit g exists and by 24.1 it is continuous. The second estimate gives g = f on D, and summing the first gives |g| ≤ (M/3)(1 + 2/3 + (2/3)² + ⋯) = M.
Let f be a bounded continuous function on a closed subset D of ℝᵖ with values in ℝ^q. Then there is a continuous g on ℝᵖ to ℝ^q with g = f on D and sup {‖g(x)‖ : x ∈ ℝᵖ} ≤ √q · sup {‖f(x)‖ : x ∈ D}.
Proof. Write f = (f₁, ⋯, f_q); each f_j is continuous, real valued and bounded by M = sup ‖f‖. By 26.4 each has a continuous extension g_j on ℝᵖ with |g_j| ≤ M. Put g = (g₁, ⋯, g_q); then g is continuous, agrees with f on D, and ‖g(x)‖ ≤ √(q M²) = √q · M.
補述:那個 √q 其實拿得掉。令 M = sup {‖f(x)‖ : x ∈ D},並定義 ℝ^q 到自己的徑向收攏 ρ(y) = y(‖y‖ ≤ M)、ρ(y) = M y / ‖y‖(‖y‖ > M)。 它連續(兩段在 ‖y‖ = M 接得起來,而 norm 連續、商在分母不為零處連續),值全落在半徑 M 的閉球內,且對球內的點原封不動。把上面的 g 換成 ρ ∘ g:合成仍連續(20.8),在 D 上因 ‖f(x)‖ ≤ M 而不變,於是它是一個上界恰為 M 的延拓。換句話說,26.4 的「上界不變」在高維也成立——26.5 之所以只寫得出 √q,純粹是因為逐座標處理時各座標互不通氣,而收攏這一步把它們重新綁在一起。