# In $\mathbb{R}^n$, every open set is a union of closed sets

I read this statement when reading a proof about "continuous function with compact support is dense in $$L^p$$". For simplicity, I consider the case $$n=1$$, but how do I construct a closed covering $$\{U\}_{i=1}^\infty$$ that make the a open interval $$U=\cup_{i=1}^\infty U_i$$. The boundary of the open set can not be covered by closed set and still in $$U$$, isn't it? For example, the interval $$(0,1)$$, I can't cover its boundary by closed sets and make the closed sets in it, or should I consider closed sets like $$[\frac{1}{n},1-\frac{1}{n}]$$?

Another question is that, I also read another statement:

every open set in $$\mathbb{R}$$ is a countable union of disjoint half-open intervals.

How do I construct this?

• The answer to the question in your title is this: every set is a union of singletons, which are closed in $\Bbb R^n.$ The answer to your second question is: Given any $a,b\in\Bbb R$ with $a<b,$ show that $$(a,b)=\bigcup_{n=1}^\infty\left(b-\frac{b-a}{2^{n-1}},b-\frac{b-a}{2^n}\right].$$ Something similar can be done for sets of the form $(-\infty, b).$ Readily, $\Bbb R$ and sets of the form $(a,\infty)$ can be shown to be such a union, as well. (cont'd) – Cameron Buie Jan 5 '19 at 19:18
• Since every non-empty, connected open set is a countably-infinite disjoint union of such half-open intervals, and since any open subset of $\Bbb R$ is the union of at most countably-infinitely-many disjoint, connected open sets, then the second claim follows. Unfortunately, I'm not sure I understand the rest of the body of your question. – Cameron Buie Jan 5 '19 at 19:19

In $$\mathbb{R}^n$$, if a set $$U$$ is open then for every $$x\in U$$ you can find an open ball $$B_\delta(x)$$ of appropriately small radius $$\delta$$ centered on $$x$$ entirely contained inside $$U$$. Thus, the closure of the ball $$B_{\delta/2}(x)$$ is also contained inside $$U$$. If you take a union over all of these balls, then you recover $$U$$.