# Prove that every separable metric space has a countable base.

A collection $\{V_\alpha \}$ of open subsets of $X$ is said to be a base for $X$ if the following is true: For every $x \in X$ and every open set $G \subset X$ such that $x \in G$, we have $x \in V_\alpha \subset G$ for some $\alpha$. In other words, every open set in $X$ is the union of a subcollection of $\{ V_\alpha \}$.

Prove that every separable metric space has a countable base.

Here is what I have, just wanted to make sure that it's sufficient enough? Thanks in advance!

Proof:

Let $X$ be a separable metric space. From the definition of separable in the previous exercise, we know that $X$ contains a countable dense subset $E$. For each $e_i \in E$, let $N_q(e_i)$ be a neighborhood with rational radius $q$ around point $e_i$. Let $\{ V_\alpha \} = \{ N_q(e_i) \ | \ q \in \mathbb{Q}, i \in \mathbb{N} \}$ be the collection of all neighborhoods with rational radius centered around members of $E$. This is a countable collection of countable sets, and therefore $\{V_\alpha \}$ has countably many elements.

Let $x$ be an arbitrary point in $X$, and let $G$ be an arbitrary open set in $X$ such that $x \in G$. Because $G$ is open, we know that $x$ is an interior point of $G$. So there is some neighborhood $N_r(x)$ such that $N_r(x) \subseteq G$. But we can choose a rational $q$ such that $0 < q < \frac{r}{2}$, so that $x \in N_q(x) \subseteq N_r(x) \subseteq G$.

Because $E$ is dense in $x$, every neighborhood of $x$ contains some $e \in E$. So $e \in N_q(x)$, which means that $d(e,x) < q$. But, on the other hand, this also means that $d(x,e)<q$ so that $x \in N_q(e)$. And $N_q(e) \in \{ V_\alpha \}$, by definition.

Having shown that $x \in N_q(e)$, we need to prove that $N_q(e) \subseteq G$. Let $y$ be any point in $N_q(e)$. We know that $d(x,e) < q$ and $d(e,y)<q$. So $d(x,y) < d(x,e) + d(e,y) = 2q$ by definition of metric spaces.

But we defined $q$ so that $0 < q < \frac{r}{2}$, so we know that $d(x,y) < r$. This means that every $y \in N_q(e) \rightarrow y \in N_r(x)$, or $N_q(e) \subseteq N_r(x)$. And we choose $r$ so that $N_r(x) \subseteq G$, so by transitivity we know that $N_q(e) \subseteq G$.

We started by choosing an arbitrary element $x$ in an arbitrary open set $G \subseteq X$, and proved that there was an element $N_q(e) \in \{ V_\alpha \}$ such that $x \in N_q(e) \subseteq G$. We've shown that $\{V_\alpha \}$ has a countable number of elements, and each element is an open neighborhood. This proves that $\{ V_\alpha \}$ is a base for $X$.

-