Cauchy $\implies$ Uniform Convergence in $C_0(X)$ w.r.t. the $\sup$ metric Let $X$ be a locally compact Hausdorff space, and $(C_0(X),d)$ be the metric space of (complex) continuous functions on $X$ which vanish at infinity (definition below). The metric $d$ is such that for $f,g\in C_0(X)$, $$d(f,g) = \sup_{x\in X}|f(x) -g(x)|$$  Let $\{f_n\}$ be a Cauchy sequence in $C_0(X)$. Show that $\{f_n\}$ converges uniformly.

(Rudin): A complex function $f$ on a locally compact Hausdorff space is said to vanish at infinity if for every $\epsilon > 0$ there exists a compact set $K\subset X$, such that $|f(x)| < \epsilon$ for every $x\notin K$.


My work: Let $\{f_n\}$ be Cauchy in $C_0(X)$. So, $$\forall \epsilon > 0\ \exists N\in \mathbb N\ \forall m,n\ge N\ d(f_m,f_n) < \epsilon$$
We already know that uniform convergence and convergence are equivalent notions in the sup metric as defined above. To show uniform convergence, it suffices to show convergence. To that end, let us define a function $f$ as follows. For every $x\in X$, $\lim_{n\to\infty} f_n(x)$ exists, since $\mathbb C$ is a complete metric space. Define $f(x) = \lim_{n\to\infty} f_n(x)$. It suffices to show that $f \in C_0(X)$ and $f_n \xrightarrow{n\to\infty} f$ in the sup metric.

*

*$f\in C_0(X)$: Let $\epsilon > 0$. Since all $f_n\in C_0(X)$, there exists a compact set $K_n$ such that $|f_n(x)| < \epsilon$ for every $x\in K_n^c$. Now how do I find a compact set $K$ such that $|f(x)| < \epsilon$ for every $x\in K^c$? We must also show that $f$ is infact continuous.

*To show $f_n \xrightarrow{n\to\infty} f$ in the sup metric, I need $$\forall \epsilon > 0\ \exists N\in\mathbb N\ \forall n\ge N\ d(f_n,f) < \epsilon$$
Pick $x\in X$ and observe that there exists $N_x \in\mathbb N$ such that for every $n\ge N_x$, we have $|f_n(x) - f(x)| < \epsilon/2$. Define $N:= \sup_{x\in X} N_x$, and note that for every $n\ge N$ and $x\in X$, $|f_n(x) - f(x)| < \epsilon/2$. Taking supremum over all $x$, we have $d(f_n,f) = \sup_{x\in X} |f_n(x) - f(x)| \le \epsilon/2 < \epsilon$. Does this work? I'm a little unsure because $N = \sup_{x\in X} N_x$ may also be $\infty$.

I would appreciate your help in filling gaps in the above proof. Thanks a lot!
 A: Ad 1:
Fix $\epsilon>0$. By the Cauchyness we find $N \in \mathbb{N}$ such that $\forall m,n\ge N\ d(f_m,f_n) < \epsilon/2$. Note that this implies $|f_n(x) - f_N(x)| < \epsilon/2$ for all $n>N$ and all $x \in X$. Hence, by passing to the limit, we also have $|f(x) - f_N(x)| \leq \epsilon/2$ for all $x \in X$. Now, using that $f_N$ vanishes at $\infty$, we can find $K \subseteq X$ such that $|f_N(x)| < \epsilon/2$ on $X \setminus K$. Combining these two inequalities, we get
$$|f(x)| \leq |f(x) - f_N(x)| + |f_N(x)| < \epsilon, \hspace{2cm} x \notin K.$$
So we have proved that $f$ is indeed in $C_0(X)$. It is a standard fact that a uniform limit of continuous functions is continuous, so the continuity of $f$ will follow from 2.
Ad 2:
Your $N$ can indeed be $\infty$, we need to somehow use the fact that the sequence is Cauchy in the uniform metric, not just pointwise:
Fix $\epsilon > 0$. We can find $N \in \mathbb{N}$ such that for all $n \geq N$ and all $x \in X$ we have $|f(x) - f_n(x)| \leq \epsilon/2$ by the same argument as above (using Cauchyness to get $|f_m(x) - f_n(x)| < \epsilon/2$ for all $m,n \geq N$ and all $x \in X$, and then passing to the limit $m \rightarrow \infty$). But this works for all $x \in X$, therefore
$$d(f,f_n) = \sup_{x \in X} |f(x) - f_n(x)| \leq \epsilon/2 < \epsilon$$
for $n > N$, which is exactly what we wanted.
