I am stuck in proving two parts of this proof.
Let $U$ be the open set in question. Then, for all $x \in U$, since $U$ is open in $\mathbb{R}^n$, we can build an open ball $B(r,x)$ around $x$ with $r>0$, and construct an $n$-rectangle denoted $R_x = (a_1,b_1)\times \cdots \times (a_n,b_n)$ contained inside $B(r,x)$ where $a_i, b_i \in \mathbb{Q}$ for all $i \in [n]$ since $\mathbb{Q}$ is dense in $\mathbb{R}$.
One part I have problems with is how can I rigorously prove that
$$\bigcup_{x\in U} R_x = U$$
and that there is a countable number of rectangles using the fact that all my points $a_i,b_i$ are rational?
Thank you!
As $R_x\subseteq U$ for all $x \in U,$ we have $\bigcup_{x\in U} R_x \subseteq U.$ Now if $x$ is any point in $U,$ then $x\in R_x \subseteq \bigcup_{x\in U} R_x.$ Thus $$ \bigcup_{x\in U} R_x = U. $$
There is only a countable number of rectangles with coordinates in $\mathbb{Q}^n$ as $\mathbb{Q}^n$ is countable, as is normally shown using Cantor's diagonal argument.