Every open set $E\subseteq\mathbb{R}^{n}$ is a countable union of open rectangles I found some similar questions here, but still couldn't figure the
answers to my questions. Hopefully this would help.
Let $E\subseteq\mathbb{R}^{n}$ be an open set. $E$ is open so for
every $x\in E$ there is $\varepsilon_{x}>0$ such that $B\left(x,\varepsilon_{x}\right)\subseteq E$, and it is clear that $E=\bigcup_{x\in E}B\left(x,\varepsilon_{x}\right)$.
What i was thinking about is to show that every $B\left(x,\varepsilon_{x}\right)$
has an open rectangle with rational coordinates $R_{x}^{r}=\left\{ \left(q_{1},r_{1}\right)\times\ldots\times\left(q_{n},r_{n}\right)\mid q_{i},r_{i}\in\mathbb{Q}\right\} $
such that $x\in R_{x}^{r}\subseteq B\left(x,\varepsilon_{x}\right)$.
My questions are:


*

*How do I show those $R_{x}^{r}$ exist in every $B\left(x,\varepsilon_{x}\right)$?

*How can we construct those $R_{x}^{r}$? (I thought
about building something around each $x=\left(x_{1},\ldots,x_{n}\right)$
but im not sure what should be the maximal size of each edge)

*How does the union $E=\bigcup_{x\in E}R_{x}^{r}$ then turn countable?

*Does $E=\bigcup_{x\in E\cap\mathbb{Q}^{n}}B\left(x,\varepsilon_{x}\right)$
also?


Thanks in advance
 A: (1) Let $x = (x_1,\dots,x_n) \in \mathbb{R}^n$ and $\varepsilon > 0$. Let $q_i,r_i \in \mathbb{Q}$ such that $q_i < x_i < r_i$ and $r_i - q_i < \varepsilon/\sqrt{n}$. Set $q = (q_1,\dots,q_n), r =  (r_1,\dots,r_n)$. Then the open rectangle $R(q,r) = (q_1,r_1) \times \dots  \times  (q_n,r_n)$ contains $x$. It is moreover contained in $B(x,\varepsilon)$ because for $y = (y_1,\dots,y_n) \in R(q,r)$ we have $\lvert y_i - x_i \rvert < r_i - q_i < \varepsilon/\sqrt{n}$ and therefore
$$\Vert y - x \rVert = \sqrt{\sum_{i=1}^n (y_i - x_i)^2} < \sqrt{n (\varepsilon/\sqrt{n})^2} = \varepsilon .$$
(2) The set $\mathbb{Q}^n \times \mathbb{Q}^n$ is countable. Hence also the set
$$R(E) = \{ (q,r) \in \mathbb{Q}^n \times \mathbb{Q}^n \mid q_i < r_i \text{ for } i = 1,\dots,n \text { and } R(q,r) \subset E \}$$
is countable.
For each $x \in E$ we have $\varepsilon > 0$ and $(q,r)$ such that $x \in R(q,r) \subset B(x,\varepsilon) \subset E$. Therefore
$$E = \bigcup_{(q,r) \in R(E)}R(q,r) .$$
A: Instead of a complete answer, I can offer a hint. In the wonderful book [1], Elias Stein proves a similar result for cubes: precisely, he proves ([1], §1.3 pp. 16-18)
Theorem 3. Let $F$ be a non-emptv closed set in $\mathbb{R}^n$. Then its complement $\Omega(=\mathbb{R}^n\setminus F=\complement F)$ is the union of a sequence of cubes $Q_k$, whose sides are parallel to the axes, whose interiors are mutually disjoint, and whose diameters are approximately proportional to their distances from $F$. More explicitly:


*

*$\Omega=\complement F=\bigcup_{k=1}^\infty Q_k$.

*$\mathrm{int}\, Q_i\cap \mathrm{int}\,Q_j=\emptyset$ ($\mathrm{int}\,A\triangleq\text{interior of the set A})$ if $i\neq j$

*There exist two constants $c_1,c_2 > 0$. (we can take $c_1 = 1$ and $c_2 = 4$), so that 
$$
c_1 (\text{diameter of}\, Q_k) < \text{distance of $Q_k$ from $F$} 
< c_2 (\text{diameter of }Q_k)
$$
Probably by wisely modifying his proof, you can construct a family of rectangles $\{R_{x,k}\}_{k\in\mathbb{N}}$ having the properties you need.
Elias M. Stein (1970), "Singular integrals and differentiability properties of functions", Princeton Mathematical Series, No. 30, Princeton, N.J.: Princeton University Press. XIV, 287 p. (1970), MR0290095, Zbl 0207.13501.
