Every open set in $\mathbb{R}$ is the disjoint union of open intervals

The idea is sound, but the implementation could be better. Here’s a fairly careful write-up missing only a few details.

Let $U$ be a non-empty open subset of $\Bbb R$, and let $\mathscr{I}$ be the family of all open intervals contained in $U$. For $I,J\in\mathscr{I}$ write $I\sim J$ iff there are $I_0=I,I_1,\dots,I_n=J\in\mathscr{I}$ such that $I_k\cap I_{k+1}\ne\varnothing$ for $k=0,\dots,n-1$; clearly $\sim$ is an equivalence relation on $\mathscr{I}$. For $I\in\mathscr{I}$ let $[I]$ be the $\sim$-equivalence class of $I$, and let $U_I=\bigcup[I]$; clearly $U_I$ is open.

Suppose that $U_I\cap U_J\ne\varnothing$ for some $I,J\in\mathscr{I}$; then there are $I'\in[I]$ and $J'\in[J]$ such that $I'\cap J'\ne\varnothing$. Clearly $I\sim I'\sim J'\sim J$, so $I\sim J$, and $[I]=[J]$. Thus, $\{U_I:I\in\mathscr{I}\}$ is a partition of $U$ into open subsets.

Suppose that $I,J\in\mathscr{I}$ and $I\cap U\ne\varnothing$; then $I\cup J\in\mathscr{I}$. (Why?) An easy induction on $n$ then shows that if $I_0,\dots,I_n\in\mathscr{I}$, and $I_k\cap I_{k+1}\ne\varnothing$ for $k=0,\dots,n-1$, then $\bigcup_{k=0}^nI_k\in\mathscr{I}$. Fix $I\in\mathscr{I}$, and suppose that $x,y\in U_I$ with $x<y$. Then there are $I_x,I_y\in[I]$ such that $x\in I_x$ and $y\in I_y$. Now $I_x\sim I\sim I_y$, so there are $I_x=I_0,\dots,I_n=I_y\in[I]$ such that $I_k\cap I_{k+1}\ne\varnothing$ for $k=0,\dots,n-1$. Let $J=\bigcup_{k=0}^nI_k$; then $x,y\in J\in[I]$, so $[x,y]\subseteq J\subseteq U_I$. This shows that $U_I$ is order-convex: if $x,y\in U_I$ and $x<z<y$, then $z\in U_I$.

The order-convex subsets of $\Bbb R$ are precisely the intervals, so the open, order-convex subsets of $\Bbb R$ are the open intervals (including the open rays), so $\{U_I:I\in\mathscr{I}\}$ is a partition of $U$ into open intervals, as desired.


You can also prove it by defining an equivalence relation directly on $U$: for $x,y\in U$, $x\sim y$ iff $\big[\min\{x,y\},\max\{x,y\}\big]\subseteq U$. This makes some of the argument a little easier and some a little harder; overall it’s probably pretty much a wash.