The completion of a metric space $X$ is a complete metric space $X'$ such that:
- There is an isometry $X\hookrightarrow X'$
- If $Y$ is a complete metric space and there is an isometry $X\hookrightarrow Y$, then this isometry factors as $X\hookrightarrow X'\to Y$ for a unique continuous $X'\to Y$
In other words, $X'$ is the 'minimal' complete container of $X$. Theorem:
- If $X'$ is complete and there is an isometry $X\hookrightarrow X'$ with dense image, $X'$ is a completion of $X$.
So, you might as well take this to be the definition too.
So, you need to check $a),b)$ and you also need to check that the inclusion $C_c\hookrightarrow C_0$ is an isometry. That's true since you are using the 'same' metric.
Your proof of $a)$ is not quite right since the $g$ thus defined is not continuous, necessarily. One easy way round this:
Let $M>0$ be such that $[-M,M]$ contains $K$. Define $g\equiv f$ on $[-M,M]$. Let $\alpha=f(-M),\beta=f(M)$. Define $g$ on $[-M-1,-M]$ to be the linear extension (or whatever else, many functions would do) $0\to\alpha$, and on $[M,M+1]$ to be the linear extension $\beta\to0$.
Finally, set $g\equiv0$ on $(-\infty,-M-1)\cup(M+1,\infty)$. Now $g$ is continuous, and $\|f-g\|_\infty\le\epsilon$ (the presence of a weak inequality sign is not important, but I think it should be this way: both $f$ and $g$ are bounded by $\le\epsilon/2$ outside of $[-M,M]$ so the overall variation is $\le\epsilon$).
Let's check the completeness of $C_0$, I'll leave some hints.
It is very important that the uniform metric is used here. Suppose there is a sequence $(f_n)_{n\in\Bbb N}\subseteq C_0$ which is Cauchy in the uniform metric.
- Check $(f_n(x))_{n\in\Bbb N}\subseteq\Bbb R$ is Cauchy for all $x\in\Bbb R$, so convergent. Define $f:\Bbb R\to\Bbb R$ by $x\mapsto\lim_{n\to\infty}f_n(x)$.
- Is $f$ continuous? Think about the mode of convergence.
- Is it possible for $f$ to not vanish at infinity? Approximate $f$ by $f_n$ for large $n$, and use the vanishing property of that particular $f_n$ to bound $f$ on some $\Bbb R\setminus K$. Again, think about the mode of convergence
Conclude $C_0$ is complete!
Best Answer
The topology you are thinking of is different from the one they are considering. In your topology $u_k \to u$ if $u_k(x) \to u(x)$ uniformly on compact subsets. With this topology the space is not complete and its completion is $C_0$. But they are considering a topology such that $u_k \to u$ if the supports of the functions $u_k$ are all contained one fixed compact set and $u_k(x) \to u(x)$ uniformly. In this topology the space is complete.