# $X$ top space with countable basis $B = \{B_n\}_{n\in \mathbb{N}}$. Then exists countable subset $D\subseteq X$, $\overline{D} = X$

Let $X$ be a topological space with a countable basis $B = \{B_n\}_{n\in \mathbb{N}}$. Show that exists a countable subset $D\subseteq X$ such that $\overline{D} = X$.

Well, I've thought a lot about this question and this is what I've come up, but I think I'm cheating:

We all know that $X\subseteq X$ and that $\overline{X} = X$, and also every element of $x$ is contained in a basis element. So, since $X = \bigcup_{x\in X} \{x\} \subseteq \bigcup_{x\in X} B_x = X$, so taking $D = X$, we have that $D\subseteq X, \overline{D} = X$ and $D$ is countable. I don't think this is right, and this only works for $D = X$.

Could somebody help me?

• If you take $D=X$, why should $D$ be countable? – Tim B. Dec 4 '16 at 18:31
• Your question can be phrased as follows: Every second countable topological space is separable. – Henricus V. Dec 4 '16 at 18:50
• A set $D$ is dense in $X$ iff every non-empty open subset of $X$ intersects $D$. Every non-empty open set contains one of the $B_n$ as a subset... – Henno Brandsma Dec 5 '16 at 4:52

Hint: Choose any element $q_n\in B_n$ for each $n\in\mathbb{N}$. Show that $Q=\{q_n \mid n\in\mathbb{N}\}$ is a dense subset of $X$.
• Hmmm, so if it's a dense subset, it's by definition what the exercise is asking me, right? It's countable, also. I didn't understand what $q_n$ should be. Also, I don't know how to prove that it's adense subset. Could you give me another hint? – Guerlando OCs Dec 4 '16 at 18:47
• Yes, having $\overline{D} = X$ is exactly the statement that $D$ is a dense subset. See edit for second question – Hayden Dec 4 '16 at 18:48
Letting that $q_{n}\in B$ for each $n=1,2,...$ It suffices to prove that for every nonempty open set $G$, there is some $n_{0}$ such that $q_{n_{0}}\in G$. Choose some $p\in G$, since $\{B_{n}\}$ is a basis, some $n_{0}$ is such that $p\in B_{n_{0}}\subseteq G$. Hence $q_{n_{0}}\in G$.