Open Sets in Real Number Line

Theorem
Every non-empty open set $I \subseteq \R$ can be expressed uniquely as a countable union of pairwise disjoint open intervals.

Proof
We know that $\R$ is a complete metric space.

Let $x \in I$.

Since $I$ is open, there is an open interval $I_x$, contained in $I$, that contains $x$.

Define the following:

The existence of $I_x$ assures us that we have $a \left({x}\right) < x < b\left({x}\right)$.

In this way we associate a non-empty open interval:
 * $J\left({x}\right) = \left({a \left({x}\right) \,.\,.\, b \left({x}\right)}\right)$

to $x \in I$.

Let $\epsilon > 0$ be arbitrary.

As $a\left({x}\right)$ is an infimum, there is a $z < a\left({x}\right) + \epsilon$ such that:
 * $\left({z \,.\,.\, x}\right) \subseteq I$

Thus certainly:
 * $\left({a \left({x}\right) + \epsilon \,.\,.\, x}\right) \subseteq I$

It follows that we have:
 * $\displaystyle \left({a \left({x}\right) \,.\,.\, x}\right) = \bigcup_{n \mathop = 1}^\infty \left({a \left({x}\right) + \frac 1 n \,.\,.\, x}\right) \subseteq I$

By a similar argument:
 * $\left({x \,.\,.\, b \left({x}\right)}\right) \subseteq I$

Therefore, as we have:
 * $J\left({x}\right) = \left({a \left({x}\right) \,.\,.\, x}\right) \cup \left\{{x}\right\} \cup \left({x \,.\,.\, b \left({x}\right)}\right)$

we conclude that:
 * $J \left({x}\right) \subseteq I$

Suppose now that we have $a\left({x}\right) = -\infty$ or $b\left({x}\right) = \infty$.

If both are the case, it must be that $I = \R$, and hence $I$ is open.

It can then also be written uniquely as the pairwise disjoint union of the single open interval $\R$.

In other cases, we observe that intervals of the type:
 * $K_-\left({a}\right) = \left({-\infty \,.\,.\, a}\right)$

or:
 * $K_+\left({a}\right) = \left({a \,.\,.\, \infty}\right)$

are open.

Assume $I$ contains such an interval $K_\pm \left({a}\right)$ with $a \notin I$.

Then we have:
 * $\displaystyle I = \left({I \cap K_- \left({a}\right)}\right) \cup \left({I \cap K_+ \left({a}\right)}\right)$

Thus $I$ is open iff $I \setminus K_\pm\left({a}\right)$ is open, since the $K_\pm\left({a}\right)$ are disjoint, open sets.

It is also clear that a unique decomposition of $I \setminus K_\pm\left({a}\right)$ into disjoint open intervals will give rise to such a decomposition for $I$.

Therefore, without loss of generality, we assume $I$ contains no such interval.

Define a relation $\sim$ on $I$ by $x \sim y$ iff $J \left({x}\right) = J \left({y}\right)$ (the induced equivalence of $J$).

Then $\sim$ is an equivalence relation on $I$ by Induced Equivalence is Equivalence Relation.

Therefore, by the Fundamental Theorem on Equivalence Relations, $\sim$ partitions $I$.

In fact, the equivalence classes are open intervals.

To prove this, let $x < y$ with $x, y\in I$. We see that when $x \sim y$, we have $x \in J \left({x}\right) = J\left({y}\right)\ni y$.

Also, when $x\in J \left({y}\right)$, it follows that $\left({x \,.\,.\, y}\right) \subseteq I$.

Therefore, we must have:
 * $a \left({x}\right) = a \left({y}\right)$

and:
 * $b \left({x}\right) = b \left({y}\right)$

hence:
 * $J \left({x}\right) = J \left({y}\right)$

This implies that the equivalence class of $x$ is precisely $J\left({x}\right)$.

Finally, as:
 * $\left({ a \left({x}\right) \,.\,.\, b \left({x}\right)}\right) \ne \emptyset$

by Rationals Dense in Reals there exists:
 * $q \in \left({a \left({x}\right) \,.\,.\, b \left({x}\right)}\right) \cap \Q$

Therefore each set in the partition of $I$ can be labelled with a rational number.

Since the Rational Numbers are Countable the partition is countable.

Then enumerating the disjoint intervals of $I$, we have an expression:


 * $\displaystyle I = \bigcup_{n \mathop \in \N} J_n $