We know that we can generate the Borel-$\sigma$-algebra on $\mathbb{R}^n$, denoted by $\mathcal{B}^n$, by the sets $I:=\{x\in\mathbb{R}^n\mid a_i<x_i<b_i,~1\leq i\leq n\}$ where >$a,b\in\mathbb{R}^n$ such that $a_i<b_i$ for all $1\leq i\leq n$.
Show that $\mathcal{B}^n$ contains all open sets of $\mathbb{R}^n$.
My approach:
Let be $M\subset \mathbb{R}^n$ an arbitrary open set. We consider an arbitrary $y\in M\cap\mathbb{Q}^n$ and define the set $E_y:=\{\epsilon\in(0,\infty)\cap\mathbb{Q}\mid I_{\epsilon}(y)\subset M\}$, where $$I_{\epsilon}(y):=\{x\in\mathbb{R}^n\mid y_i-\epsilon<x_i<y_i+\epsilon\}.$$
As $M$ is open there exists at least one such $\epsilon >0$. WLOG $\epsilon\in(0,\infty)\cap\mathbb{Q}$. (If $\epsilon$ was not rational then we would take the next smaller value that is rational which obviously satisfies $I_{\epsilon}(y)\subset M$)
The union $\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)$ is countable and as mentioned at the beginning each set $I_{\epsilon}(y)$ is a Borel-set. By the properties of a $\sigma$-algebra $\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\in \mathcal{B}^n$. The same argument holds if we consider $\bigcup\limits_{y\in M\cap \mathbb{Q}^n}\left(\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\right)$ and hence $\bigcup\limits_{y\in M\cap \mathbb{Q}^n}\left(\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\right)\in \mathcal{B}^n$.
Now we show that $M=\bigcup\limits_{y\in M\cap \mathbb{Q}^n}\left(\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\right)$.
The property $M\supseteq\bigcup\limits_{y\in M\cap \mathbb{Q}^n}\left(\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\right)$ is trivial as the sets $I_{\epsilon}(y)$ are constructed appropriately.
Now we turn to $M\subseteq\bigcup\limits_{y\in M\cap \mathbb{Q}^n}\left(\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\right)$.
If we take a $y\in M\cap \mathbb{Q}^n$ we immediately see that $y\in\bigcup\limits_{y\in M\cap \mathbb{Q}^n}\left(\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\right)$.
If $x\in M\setminus\mathbb{Q}^n$ then it gets a bit more complicated:
As $M$ is open we find a $\epsilon>0$ such that $I_{\epsilon}(x)\subset M$. WLOG we assume $\epsilon\in\mathbb{Q}$. Of course $I_{\frac{\epsilon}{2}}(x)\subset M$. As $\mathbb{Q}^n$ is dense in $\mathbb{R}^n$ we find a $y\in\mathbb{Q}^n$ such that $y\in I_{\frac{\epsilon}{2}}(x)$. We see that $x\in I_{\frac{\epsilon}{2}}(y) $ and. As $\frac{\epsilon}{2}$ is rational and $I_{\frac{\epsilon}{2}}(y) \subset I_{\epsilon}(x)\subset M$ we can conclude that $x \in \bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)$. Hence, $x\in \bigcup\limits_{y\in M\cap \mathbb{Q}^n}\left(\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\right)$ and finally $M=\bigcup\limits_{y\in M\cap \mathbb{Q}^n}\left(\bigcup\limits_{\epsilon\in E_y}I_{\epsilon}(y)\right)$.
Is this correct? Is there an easier way to show the part where $x\in M\setminus\mathbb{Q}^n$?