Theorem 4.20.4 (Tietze Extension Theorem (LCH)). Let $X$ be a LCH space, $K \subset X$ be compact, $U \in \cn^{o}(K)$, and $f \in C(K; \real)$, then there exists $F \in C_{c}(U; \real)$ such that $F|_{K} = f$.

Proof. By Lemma 4.20.2, there exists $V, W \in \cn^{o}(K)$ precompact such that $K \subset V \subset \ol{V}\subset U$. As $\ol{W}$ is compact, it is normal by Proposition 4.16.4. Since $X$ is Hausdorff, $K \subset \ol{W}$ is closed by Proposition 4.16.3.

By the Tietze extension theorem, there exists $F \in C(\ol{W}; \real)$ such that $F|_{K} = f$. By Urysohn’s lemma, there exists $\eta \in C_{c}(X; [0, 1])$ such that $\eta|_{K} = 1$ and $\supp{\eta}\subset V$. In which case, define

\[\ol F: X \to \real \quad x \mapsto \begin{cases}\eta(x) \cdot f(x) &x \in V \\ 0 &x \in X \setminus \supp{\eta}\end{cases}\]

then by the gluing lemma for continuous functions, $\ol F \in C_{c}(X; \real)$ with $\ol F|_{K} = F|_{K} = f$ and $\supp{F}\subset \supp{\eta}\subset V \subset U$.$\square$