152 CHAPTER 7. METRIC SPACES AND TOPOLOGICAL SPACES

Now let p satisfy 7.8.7 for all x whenever p > N. Also pick δ > 0 such that if |x−y|<δ , then

d (gp (x) ,gp (y))<ε

3.

Then if |x−y|< δ ,

d (g(x) ,g(y)) ≤ d (g(x) ,gp (x))+d (gp (x) ,gp (y))+d (gp (y) ,g(y))

3+

ε

3+

ε

3= ε.

Since ε was arbitrary, this shows that g is continuous.It only remains to verify that ρ (g,gk)→ 0. But this follows from 7.8.7.With these lemmas, it is time to prove Theorem 7.8.4.Proof of Theorem 7.8.4: Let D = {xk} be the countable dense set of K gauranteed by

Lemma 7.8.5 and let {(1,1) ,(1,2) ,(1,3) ,(1,4) ,(1,5) , · · ·} be a subsequence of N suchthat

limk→∞

f(1,k) (x1) exists.

This is where the local compactness of X is being used. Now let

{(2,1) ,(2,2) ,(2,3) ,(2,4) ,(2,5) , · · ·}

be a subsequence of {(1,1) ,(1,2) ,(1,3) ,(1,4) ,(1,5) , · · ·} which has the property that

limk→∞

f(2,k) (x2) exists.

Thus it is also the case that

f(2,k) (x1) converges to limk→∞

f(1,k) (x1) .

because every subsequence of a convergent sequence converges to the same thing as theconvergent sequence. Continue this way and consider the array

f(1,1), f(1,2), f(1,3), f(1,4), · · · converges at x1f(2,1), f(2,2), f(2,3), f(2,4) · · · converges at x1 and x2

f(3,1), f(3,2), f(3,3), f(3,4) · · · converges at x1, x2, and x3...

Now let gk ≡ f(k,k). Thus gk is ultimately a subsequence of{

f(m,k)}

whenever k > m andtherefore, {gk} converges at each point of D. By Lemma 7.8.6 it follows there exists g ∈C (K;X) such that

limk→∞

ρ (g,gk) = 0.

Actually there is an if and only if version of it but the most useful case is what ispresented here. The process used to get the subsequence in the proof is called the Cantordiagonalization procedure.