Prove that every open set in $\mathbb{R}$ is the union of an at most countable collection of disjoint segments.

proof-writingreal-analysissolution-verification

My attempt:

We know that $\mathbb{Q}$ is dense in $\mathbb{R}$.Now, we consider an open set $S$ in $\mathbb{R}$ then let $x \in S$, $x$ is an interior point of $S$ and we can get an open ball $(x-r,x+r)$ ,$r>0$ contained in $S$. Since $\mathbb{Q}$ is dense, let $q_1 \in (x-r,x+r)$.Now, $q_1 \in (x-r,x+r)$ and let $r_1=|q_1-x|$.We consider the rational number $ > r_1$ (which is possible to choose as $\mathbb{Q}$ is dense ) and let us call it $d_1$ and we consider the open ball $(q_1-d_1,q_1 +d_1)$ which will contain $x$.

We pick $x' \in S$ , and consider $r_2>0$ such that $(x'-r_2,x'+r_2) \cap (q_1-d_1,q_1+d_1) = \phi$ , if such an $r_2$ doesn't exist then we can conclude that $x' \in (q_1-d_1,q_1+d_1)$. Repeating this process we can conclude that the open set $S $ can be written as the union of disjoint segments.

Since $\mathbb{Q}$ is countable then it can be shown that union of this disjoint segment is also countable.

I am trying to do Rudin on my own and need someone to cross check my proofs.I know this might be a duplicate but if someone goes through my proof and picks up my mistake and a probable way out that would be helpful.

Best Answer

On open set $S$ you can say that elements $x,y\in S$ are related if the closed interval (or singleton) determined by them is a subset of $S$.

(So $x\sim y$ if $x=y$ or $x<y$ and $[x,y]\subseteq S$ or $y<x$ and $[y,x]\subseteq S$)

This relation can be shown to be an equivalence relation and the equivalence classes can be shown to be open.

Now the density of $\mathbb Q$ comes in in order to prove that there are at most countable equivalence classes.