15.15. EXERCISES 329

the technique of chopping into small pieces of the above Problem 33. You could alsodo something like the following. Let δ be a Lebesgue number for the open cover C ofK. Now consider B(x1,δ ). If it covers K you are done. Otherwise, pick x2 not in it.Consider B(x2,δ ) . If these two balls cover K, then you are done. Otherwise pick x3not covered. Continue this way. Argue the the sequential compactness of K requiresthis process to stop in finitely many steps. If a set K is compact, then it obviouslymust be bounded. Otherwise, you could consider the open cover {B(x,n)}∞

n=1. Itthe set K is not closed, then there is a point not in K called x and a sequence ofpoints {xk} of K converging to x. Explain why Fm ≡ ∪∞

k=mxk is closed. Considerthe increasing sequence of open sets FC

m .

36. Suppose S is a nonempty set in Rp. Define

dist(x,S)≡ inf{|x−y| : y ∈ S} .

Show that|dist(x,S)−dist(y,S)| ≤ |x−y| .

Hint: Suppose dist(x,S) < dist(y,S). If these are equal there is nothing to show.Explain why there exists z ∈ S such that |x−z|< dist(x,S)+ ε . Now explain why

|dist(x,S)−dist(y,S)|= dist(y,S)−dist(x,S)≤ |y−z|− (|x−z|− ε)

Now use the triangle inequality and observe that ε is arbitrary.

37. Suppose H is a closed set and H ⊆ U ⊆ Rp, an open set. Show there exists a con-tinuous function defined on Rp, f such that f (Rp) ⊆ [0,1], f (x) = 0 if x /∈ U andf (x) = 1 if x ∈ H. Hint: Try something like

dist(x,UC

)dist(x,UC)+dist(x,H)

,

where UC ≡ Rp \U , a closed set. You need to explain why the denominator is neverequal to zero. The rest is supplied by Problem 36. This is a special case of a majortheorem called Urysohn’s lemma.