Countable Union in separable metric space

I am Reading a book on measure theory ("Probability measures on metric spaces", Phartasarathy) and I fuond a sentence which is not proven: Let S be a separable metric space. Let $$\mathcal B$$ a collection of open sets $$B_\alpha$$. Then there exists a numerable sub-collection $$(B_n)_n\in \mathcal B$$ such that $$\bigcup_\alpha B_\alpha=\bigcup_n B_n$$ In other words: every union of open sets can be written as a countable union of open sets belonging to the previous ones. It is more about topology than about measure theory and I have no idea how to prove It.

• This looks similar to compactness. Do you know the connections between compactness and separability? – Viktor Glombik Jul 29 at 11:33

A separable metric space is second countable. So let $$\{U_n\}_{n=1}^\infty$$ be a countable basis of $$S$$. Now let:
$$M=\{n\in\mathbb{N}: \exists\alpha\ \ U_n\subseteq B_{\alpha}\}$$
For each $$n\in M$$ we can choose $$\alpha_n$$ such that $$U_n\subseteq B_{\alpha_n}$$. Now we can prove that $$\cup_{\alpha} B_{\alpha}=\cup_{n=1}^\infty B_{\alpha_n}$$. Let's say $$x$$ belongs to the union on the left side. Then there is $$\alpha$$ such that $$x\in B_{\alpha}$$. But from one of the definitions of a basis we know that there is $$k\in\mathbb{N}$$ such that $$x\in U_k\subseteq B_{\alpha}$$. This implies $$k\in M$$ and then $$x\in U_k\subseteq B_{\alpha_k}$$.