12.2. URYSOHN’S LEMMA 285

compact subset of X . Then there exist sets from C , U1, · · · ,Ur which cover K. Therefore,a finite subcover of X̃ is U1, · · · ,Ur,U∞.

To see the last claim, suppose U contains ∞ since otherwise there is nothing to show.Notice that if C is a compact set, then X \C is an open set. Therefore, if x ∈U \{∞} , andif X̃ \C is a basic open set contained in U containing ∞, then if x is in this basic open setof X̃ , it is also in the open set X \C ⊆U \{∞} . If x is not in any basic open set of the formX̃ \C then x is contained in an open set of τ which is contained in U \{∞}. Thus U \{∞}is indeed open in τ .

Theorem 12.2.7 Let X be a locally compact Hausdorff space, and let K be a compactsubset of the open set V . Then there exists a continuous function, f : X → [0,1], such thatf equals 1 on K and {x : f (x) ̸= 0} ≡ spt( f ) is a compact subset of V .

Proof: Let X̃ be the space just described. Then K and V are respectively closed andopen in τ̃ . By Theorem 12.2.4 there exist open sets in τ̃, U , and W such that K ⊆U,∞ ∈VC ⊆W , and U ∩W =U ∩ (W \{∞}) = /0.

VC

K U W

Thus W \{∞} is an open set in the original topological space which contains VC,U isan open set in the original topological space which contains K, and W \ {∞} and U aredisjoint.

Now for each x ∈ K, let Ux be a basic open set whose closure is compact and such that

x ∈Ux ⊆U.

Thus Ux must have empty intersection with VC because the open set, W \{∞} contains nopoints of Ux. Since K is compact, there are finitely many of these sets, Ux1 ,Ux2 , · · · ,Uxn

which cover K. Now let H ≡ ∪ni=1Uxi .

Claim: H = ∪ni=1Uxi

Proof of claim: Suppose p ∈ H. If p /∈ ∪ni=1Uxi then it follows p /∈ Uxi for each i.

Therefore, there exists an open set, Ri containing p such that Ri contains no other points ofUxi . Therefore, R ≡ ∩n

i=1Ri is an open set containing p which contains no other points of∪n

i=1Uxi =W, a contradiction. Therefore, H ⊆ ∪ni=1Uxi . On the other hand, if p ∈Uxi then

p is obviously in H so this proves the claim.From the claim, K ⊆ H ⊆ H ⊆ V and H is compact because it is the finite union of

compact sets. By Urysohn’s lemma, there exists f1 continuous on H which has values in[0,1] such that f1 equals 1 on K and equals 0 off H. Let f denote the function which extends