General Topology – Equivalent Definitions of C0(X)

functional-analysisgeneral-topology

We work on $(X,\tau)$ a topological space. We have two different definitions for $C_0(X)$, the set of continuous functions vanishing at infinity. The first is
$$
C_0(X) = \mathrm{cl}_X(C_c(X))
$$
the closure (with respect to the topology induced by the distance function $d(f,g) = \sup_X |f-g|$) of the set of continuous functions with compact support. The second is
$$
C_0(X) = \{f:X \to \mathbb{R} \text{ continuous}: \forall\epsilon>0\ \exists K \text{ closed compact s.t. } |f|<\epsilon \text{ on } X\setminus K \}.
$$

I am trying to show that if $f$ satisfies the second definition, then it satisfies the first. The way I am going about it basically comes down to having $|f|\leq \epsilon$ outside of a compact set $K$, and I need to find a continuous compactly supported $g$ with $g=f$ on $K$ and $g=0$ outside another compact set $K_2 \supseteq K$, but I don't see how I could extend $g$ continuously in such a manner. How should I proceed?

Best Answer

You don't really need $g=f$ on $K$. Postcompose $f$ with a function sending small values to zero. For example define $$m_\epsilon(x)=\begin{cases}x-\epsilon&\text{ if $x\geq \epsilon$}\\ x+\epsilon&\text{ if $x\leq -\epsilon$}\\ 0&\text{ otherwise}\end{cases}$$ Then consider $g=m_\epsilon\circ f$.