If $X$ is locally compact and $\mathcal C_c (X)$ is separable, then $X$ is separable Let

*

*$X$ be a metric space,

*$\mathcal C_b(X)$ the space of real-valued bounded continuous functions,

*$\mathcal C_0(X)$ the space of real-valued continuous functions that vanish at infinity, and

*$\mathcal C_c(X)$ the space of real-valued continuous functions with compact supports.

Then $\mathcal C_b(X)$ and $\mathcal C_0(X)$ are real Banach space with supremum norm $\|\cdot\|_\infty$. It's mentioned here that "if $E$ is locally compact and separable, then $\mathcal C_0 (E)$ is separable". Now I would like to prove a somehow reverse direction, i.e.,

Theorem: If $X$ is locally compact and $\mathcal C_c (X)$ is separable, then $X$ is separable.

Could you have a check on my below attempt?

Proof: Because $\mathcal C_0(X)$ is the closure of $\mathcal C_c(X)$ in $\mathcal C_b(X)$, it suffices to show that

If $X$ is locally compact and $\mathcal C_0 (X)$ is separable, then $X$ is separable.

Let $\mathcal M(X)$ the space of finite signed Radon measures on $X$. Let $[\cdot]$ be the total variation norm on $\mathcal M(X)$. We define a map
$$
f:X \to \mathcal M(X), x \mapsto \delta_x.
$$
Notice that $f(X)$ is a subset of the closed unit ball of $\mathcal M (X)$. Let $E := \mathcal C_0 (X)$. By Riesz–Markov–Kakutani theorem, $(\mathcal M(X), [\cdot])$ is isometrically isomorphic to $E^*$ though a canonical map $\Phi:\mathcal M(X) \to E^*$. Let $B$ be the closed unit ball of $E^*$. Clearly, $\Phi \circ f (X) \subset B$.
By Banach-Alaoglu's theorem, $B$ is compact in the weak$^*$ topology $\sigma(E^*, E)$. Because $E$ is separable, the subspace topology $\sigma_B(E^*, E)$ that $\sigma(E^*, E)$ induces on $B$ is metrizable. It follows that $\sigma_B(E^*, E)$ is compact metrizable and thus separable.
If one proves that $\Phi \circ f$ is a homeomorphism from $X$ (together with metric topology) onto $\Phi \circ f(X)$ (together with its subspace topology induced by $\sigma_B(E^*, E)$),  It would follow that $X$ is separable.
 A: To show that $\Phi\circ f: X\rightarrow\Phi(f(X))$ is a homeomorphism it seems that is enough to show that for any sequence $(x_m:m\in\mathbb{N})\subset X$, $\delta_{x_m}\stackrel{v}{\longrightarrow}\delta_x$ iff $x_m\xrightarrow{m\rightarrow\infty} x$ in $X$.
Sufficiency is obvious. As for necessity, I suggest the  OP to consider a sequence of open and relatively compact neighborhoods $V_n$ around $x$ such that
$V_{n+1}\subset\overline{V_{n+1}}\subset V_n$, and $\operatorname{diam}(V_n)\xrightarrow{n\rightarrow\infty}0$.
Then define functions  $f_n\in\mathcal{C}_{00}(X)$ with $0\leq f_n\leq 1$ such that $f_{n+1}=1$ on $\overline{V_{n+1}}$ and $f_n=0$ on $X\setminus V_n$. Then
If $\delta_{x_m}\stackrel{v}{\rightarrow}\delta_x$, for any $n$,
$f_n(x_m)\xrightarrow{m\rightarrow\infty} f_n(x)=1$. This means that for all $m$ large enough, the $x_m$ are close to $x$, i.e. $x_m\xrightarrow{m\rightarrow\infty}x$.
A: As mentioned by @OliverDíaz, the fact that $f^{-1}$ is a homeomorphism (in weak$^*$ topology of $\mathcal M(X)$) from $f(X)$ onto $X$ is not clear. I have added a proof below.

WLOG, we assume $d \le 1$. For $x \in X$ and $r>0$, let

*

*$B_r (x)$ be the open ball centered at $x$ with radius $r$.

*$\overline B_r (x)$ the closed ball centered at $x$ with radius $r$.

*$\overline{B_r (x)}$ the closure of $B_r (x)$.

Notice that $\overline{B_r (x)} \subset \overline B_r (x)$ but not necessarily that $\overline{B_r (x)} = \overline B_r (x)$. Assume $a, x_n \in X$ such that $\delta_{x_n} \to \delta_a$ in weak$^*$ topology, i.e.,
$$
\forall f \in \mathcal C_0(X) : \int_X f \mathrm d \delta_{x_n} \to \int_X f \mathrm d \delta_{a} \quad \text{as} \quad n \to \infty.
$$
Because $X$ is locally compact, there is a sequence $(r_m) \subset \mathbb R_{>0}$ such that $r_m \searrow 0$ and $\overline B_{r_m} (a)$ is compact.  Clearly, $\overline{B_{r_m} (a)}$ is compact. Let $C_m := X \setminus B_{r_m} (a)$, and
$$
f_m (x) := d(x, C_m) \quad \forall x \in X.
$$
Then $f_m \in \mathcal C_b(X)$. Because $C_m$ is closed,
$$
f_m (x) \neq 0 \iff d(x, C_m)>0 \iff x \notin C_m \iff x \in B_{r_m} (a).
$$
So
$$
\operatorname{supp} (f_m) = \overline{B_{r_m} (a)}.
$$
Hence $f_m \in \mathcal C_c (X)$ and thus
$$
f_m(x_n) \xrightarrow{n \to \infty} f_m(a) \quad \forall m \in \mathbb N.
$$
This implies
$$
\lim_{n \to \infty} d(x_n, C_m) = d(a, C_m) \quad \forall m \in \mathbb N.
$$
As such,
$$
\lim_{n \to \infty} d(x_n, a) \le \lim_{n \to \infty} d(x_n, C_m) + d(a, C_m) = 2 d(a, C_m) \le 2r_m  \quad \forall m \in \mathbb N.
$$
The proof is completed by taking the limit $m \to \infty$.
