# Open Sets in Real Number Line

## Theorem

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

If:

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

are two such expressions, then there exists a permutation $\sigma$ of $\N$ such that $J_n = K_{\sigma\left({ n }\right)}$ for all $n \in \N$.

## Proof

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

Let $x \in I$.

By the definition of open sets in a metric space, there is an open interval $I_x$, contained in $I$, that contains $x$.

Define the following:

\((1):\quad\) | \(\displaystyle a \left({x}\right)\) | \(=\) | \(\displaystyle \inf\,\left\{ {z: \left({z \,.\,.\, x}\right) \subseteq I}\right\}\) | ||||||||||

\((2):\quad\) | \(\displaystyle b \left({x}\right)\) | \(=\) | \(\displaystyle \sup\,\left\{ {y: \left({x \,.\,.\, y}\right) \subseteq I}\right\}\) |

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 \varnothing$

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 Countably Infinite, the partition is countable.

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

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

Now let:

- $\displaystyle I = \bigcup_{n \mathop \in \N} J_n,\qquad I = \bigcup_{n \mathop \in \N} K_n$

be two such expression for $I$.

Suppose that there exists $m_0 \in \N$ such that for all $n \in \N$, $K_{m_0} \ne J_n$.

Write $K_{m_0} = \left({a_0 \,.\,.\, b_0}\right)$.

Since $I$ contains $K_{m_0}$ there exists $J_{m_0'} = \left({a_0' \,.\,.\, b_0'}\right)$ such that $J_{m_0'} \cap K_{m_0} \ne \varnothing$.

This means that either $a_0' \in \left({a_0 \,.\,.\, b_0}\right)$ or $b_0' \in \left({a_0 \,.\,.\, b_0}\right)$.

Therefore either:

- $J_{m_0'} \setminus K_{m_0} = \left[{b_0' \,.\,.\, b_0}\right)$

or:

- $J_{m_0'} \setminus K_{m_0} = \left({a_0 \,.\,.\, a_0'}\right]$

Then we have one of the following two expressions:

- $\displaystyle I \setminus K_{m_0} = \bigcup_{n \mathop \ne m_0} \left({J_n \setminus K_{m_0} }\right) \cup \left[{b_0' \,.\,.\, b_0}\right)$

- $\displaystyle I \setminus K_{m_0} = \bigcup_{n \mathop \ne m_0} \left({J_n \setminus K_{m_0} }\right) \cup \left({a_0 \,.\,.\, a_0'}\right]$

Now by Half-Open Real Interval is neither Open nor Closed, and since this union is disjoint, we have that $I\setminus K_{m_0}$ is not open.

On the other hand, we have:

- $\displaystyle I \setminus K_{m_0} = \bigcup_{n \mathop \ne m_0} K_n$

which is a union of open sets, hence open.

This contradiction shows that for every $m \in \N$ there exists $\sigma \left({m}\right) \in \N$ such that $K_m = J_{\sigma \left({m}\right)}$.

Moreover since the $J_n$, $n \in \N$ are disjoint, there can be only one such $\sigma \left({m}\right)$, so $\sigma$ is a permutation.

$\blacksquare$