Show that a separable metric space $X$ is second countable.
I’m trying to figure out whether I got this proof correct.
Since $X$ is separable there exists a countable subset $D$ such that the closure equals $X$. Consider the collection $\mathcal{B} = \{B(x, r) \mid x \in D, r \in \Bbb Q, r > 0 \}$. This is a subset of the topology generated by the metric and I’m trying to show that it’s a basis for $X$.
Let $\varepsilon > 0$ and pick $x \in X$ with neighborhood $B(x, \varepsilon)$. Since $D$ is dense there exists $a \in D \cap B(x, \varepsilon/3)$. Take now any $r \in \Bbb Q$ such that $\varepsilon/3 < r < \varepsilon$. For any $z \in B(x, \varepsilon/3)$ we know have that $$d(x,a) \le d(x,z) + d(z,a) < \varepsilon/3 + \varepsilon/3 = 2\varepsilon/3 < 2r.$$
So $x \in B(x, 2r) \subset B(x, \varepsilon)$ which proves the claim.
I think I’m having issues with having only the bound $2r$ and so the last inclusion would be actually $x \in B(x, 2r) \subset B(x, 2\varepsilon)$. Can this proof be saved?
Let $(X,d)$ be a separable metric space with $D \subset X$ dense.
I claim the basis formed by
$$\mathcal{B}:=\{B_{\frac{1}{n}}(x): x \in D, n \in \Bbb{Z}^+\}$$
is a basis for $X$. Let $y \in U \in \tau$ be arbitrary. As $U \in \tau$, there exists some $\epsilon >0$ such that
$$y \in B_\epsilon(y) \subset U.$$
Moreover, there exists an $n \in \Bbb{Z}^+$ such that
$$n> \frac{2}{\epsilon}.$$
I.e., $\epsilon > \frac{2}{n}$. That is,
$$B_{\frac{2}{n}}(y) \subset B_\epsilon(y).$$
As $D \subset X$ is dense, there exists some
$$x \in D \cap B_{\frac{1}{n}}(y).$$
I.e., $y \in B_{\frac{1}{n}}(x)$. Then for every $z \in B_{\frac{1}{n}}(x)$ one has, by the triangle inequality,
\begin{align} d(y,z) &\leq d(y,x)+d(x,z)\\\\ &<\frac{1}{n}+\frac{1}{n}\\\\ &=\frac{2}{n}. \end{align} I.e.,
$$y \in B_{\frac{1}{n}}(x) \subset B_{\frac{2}{n}}(y) \subset U.$$
That is, $\mathcal{B}$ is a basis for $X$ which is countable thus $X$ is second-countable as desired.