Separable Metric Space is Second-Countable

Theorem
Let $M = \left({A, d}\right)$ be a metric space.

Let $M$ be separable.

Then $M$ is second-countable.

Proof
By the definition of separability, we can choose a subset $S \subseteq X$ that is countable and everywhere dense.

Define:
 * $\mathcal B = \left\{{B_{1/n} \left({x}\right): x \in S, \, n \in \N_{>0}}\right\}$

where $B_\epsilon \left({x}\right)$ denotes the open $\epsilon$-ball of $x$ in $M$.

We have that Cartesian Product of Countable Sets is Countable.

Hence, by Image of Countable Set under Mapping is Countable, it follows that $\mathcal B$ is countable.

Let $\tau$ denote the topology on $X$ induced by the metric $d$.

It suffices to show that $\mathcal B$ is an analytic basis for $\tau$.

From Open Ball is Open Set, we have that $\mathcal B \subseteq \tau$.

We use Equivalent Definitions of Analytic Basis.

Let $y \in U \in \tau$.

By the definition of an open set, there exists a strictly positive real number $\epsilon$ such that $B_\epsilon \left({y}\right) \subseteq U$.

By the Archimedean Principle, there exists a natural number $\displaystyle n > \frac 2 \epsilon$.

That is, $\displaystyle \frac 2 n < \epsilon$, and so $B_{2/n} \left({y}\right) \subseteq B_\epsilon \left({y}\right)$.

From Subset Relation is Transitive, we have $B_{2/n} \left({y}\right) \subseteq U$.

By the definition of everywhere denseness, and by Equivalence of Definitions of Adherent Point, there exists an $x \in S \cap B_{1/n} \left({y}\right)$.

By axiom $\left({M3}\right)$ for a metric, it follows that $y \in B_{1/n} \left({x}\right)$.

For all $z \in B_{1/n} \left({x}\right)$, we have:

That is, $B_{1/n} \left({x}\right) \subseteq B_{2/n} \left({y}\right)$.

From Subset Relation is Transitive, we have $y \in B_{1/n} \left({x}\right) \subseteq U$.

Hence the result.