# Proving that Borel sigma-field is a countably generated usign Dynkin theorem

I am attending a PhD course in Probability, and I have stumbled upon an exercise in which I need to prove that the Borel sigma-field on the real line is countably generated. I think I have managed to do it using sequences of interval whose ends are rationals, like in this question (Showing that the family of Borel sets is countably generated), but I have been told that it is possible to do that using Dynkin $\pi - \lambda$ theorem.

The Borel sigma-field is a $\lambda$- system and it includes $\mathcal{Q}$, the collection of all intervals with rational ends, so that $\sigma(\mathcal{Q}) \subseteq \mathcal{B}(\mathbb{R})$, but I am not able to prove the opposite inclusion (which would lead me to the equality I am looking for).

Thank you in advance.

In general, the Borel $\sigma$-field ${\cal B}(X)$ of a topological space $(X,\tau)$ is just $\sigma(\tau)$, the $\sigma$-field generated by $\tau$.
Therefore, all you need to do is showing that $\sigma({\cal Q})$ contains every open interval (and therefore every open subset -- since every open subset of $\mathbb R$ can be written as a countable union of disjoint open intervals) of $\mathbb{R}$.
For every open interval $I\subseteq\mathbb R$, say $I=(a,b)$, there exists $(a_n)_n$, $(b_n)_n$ sequences in $I\cap\mathbb Q$ such that $a_n\to a$ and $b_n\to b$ (here we're using density of $\mathbb Q$). In that way, $I = (a,b) = \bigcup_{n} (a_n,b_n)$, where $(a_n,b_n)\in{\cal Q}$. Then $I\in\sigma({\cal Q})$, as desired.