7.10. THE TIETZE EXTENSION THEOREM 157

Proof: Let H = f−1 ([−1,−1/3]) ,K = f−1 ([1/3,1]) . Thus H and K are disjoint closedsubsets of M. Suppose first H,K are both nonempty. Then by Lemma 7.10.3 there existsg such that g is a continuous function defined on all of X and g(H) =−1/3, g(K) = 1/3,and g(X)⊆ [−1/3,1/3] . It follows || f −g||M < 2/3. If H = /0, then f has all its values in[−1/3,1] and so letting g≡ 1/3, the desired condition is obtained. If K = /0, let g≡−1/3.This proves the lemma.

Lemma 7.10.6 Suppose M is a closed set in X where (X ,d) is a metric space and supposef : M→ [−1,1] is continuous at every point of M. Then there exists a function, g which isdefined and continuous on all of X such that g = f on M and g has its values in [−1,1] .

Proof: Let g1 be such that g1 (X) ⊆ [−1/3,1/3] and || f −g1||M ≤ 23 . Suppose that

g1, · · · ,gm have been chosen such that g j (X)⊆ [−1/3,1/3] and∣∣∣∣∣∣∣∣∣∣ f − m

∑i=1

(23

)i−1

gi

∣∣∣∣∣∣∣∣∣∣M

<

(23

)m

. (7.10.11)

Then ∣∣∣∣∣∣∣∣∣∣(

32

)m(

f −m

∑i=1

(23

)i−1

gi

)∣∣∣∣∣∣∣∣∣∣M

≤ 1

and so( 3

2

)m(

f −∑mi=1( 2

3

)i−1gi

)can play the role of f in the first step of the proof.

Therefore, there exists gm+1 defined and continuous on all of X such that its values arein [−1/3,1/3] and ∣∣∣∣∣

∣∣∣∣∣(

32

)m(

f −m

∑i=1

(23

)i−1

gi

)−gm+1

∣∣∣∣∣∣∣∣∣∣M

≤ 23.

Hence ∣∣∣∣∣∣∣∣∣∣(

f −m

∑i=1

(23

)i−1

gi

)−(

23

)m

gm+1

∣∣∣∣∣∣∣∣∣∣M

≤(

23

)m+1

.

It follows there exists a sequence, {gi} such that each has its values in [−1/3,1/3] and forevery m 7.10.11 holds. Then let

g(x)≡∞

∑i=1

(23

)i−1

gi (x) .

It follows

|g(x)| ≤

∣∣∣∣∣ ∞

∑i=1

(23

)i−1

gi (x)

∣∣∣∣∣≤ m

∑i=1

(23

)i−1 13≤ 1

and since convergence is uniform, g must be continuous. The estimate 7.10.11 impliesf = g on M.

The following is the Tietze extension theorem.

7.10. THE TIETZE EXTENSION THEOREM 157Proof: Let H = f~' ([-1,—1/3]),K =f7! ((1/3, 1]). Thus A and K are disjoint closedsubsets of M. Suppose first H,K are both nonempty. Then by Lemma 7.10.3 there existsg such that g is a continuous function defined on all of X and g(H) = —1/3, g(K) = 1/3,and g(X) C [—1/3, 1/3]. It follows || f — g||y < 2/3. If H =9, then f has all its values in[—1/3,1] and so letting g = 1/3, the desired condition is obtained. If K = 0, let g = —1/3.This proves the lemma.Lemma 7.10.6 Suppose M is a closed set in X where (Xd) is a metric space and supposef :M = [-1,1] is continuous at every point of M. Then there exists a function, g which isdefined and continuous on all of X such that g = f on M and g has its values in |—1,1].Proof: Let g; be such that gi (X) C [—1/3,1/3] and ||f—gi||y < 3- Suppose that81,°** ,8m have been chosen such that g;(X) C [—1/3, 1/3] andm 5) i-l 2 m_y(z J] <(4). (7.10.11)£02) al] <(3)(VO)and so (3)” ( f-y (3)! si) can play the role of f in the first step of the proof.Therefore, there exists g,,,; defined and continuous on all of X such that its values are<in [~1/3, 1/3] and| (3) UE (3) ‘«) ~ 8mm (9 i-] a\m 2 m+1| (-E (3) «| _ (3) §&m+1 < (3) := MIt follows there exists a sequence, {g;} such that each has its values in [—1/3, 1/3] and forevery m 7.10.11 holds. Then letew)=E(2) aco.U»» ) « (x)and since convergence is uniform, g must be continuous. The estimate 7.10.11 impliesf=gonmM.The following is the Tietze extension theorem.<1M23HenceIt followsIg(x)| <