# Equivalent definitions of $C_0(X)$

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?

• Is $X$ compact? If not $d$ isn't a distance! Dec 28 '12 at 20:14
• @Mercy $f,g$ are taken from the space continuous functions with compact support. Dec 28 '12 at 21:54
• ok, I get it now Dec 28 '12 at 22:02
• @Mercy I was thinking more about your comment. If we didn't assume $f,g$ had compact support, and we were just looking at all functions $f:X \to \mathbb{R}$, how come $d$ isn't a distance? If $f\neq g$ then $|f-g|$ is strictly positive somewhere, clearly $d(f,g) = d(g,f)$, and $\sup |f-g| \leq \sup(|f-h| + |h-g|) \leq \sup|f-h| + \sup|h-g|$. Am I missing something here? Dec 28 '12 at 22:24
• Take $X=\mathbb{R}, \ f(x)=x, \ g=0$, then $d(f,g)=\infty \notin \mathbb{R}$. Dec 28 '12 at 22:39

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$.
• I think you are telling about $g_n=m_\frac{1}{n}\circ f$. Dec 28 '12 at 22:22