# Set of All Real Intervals is Semiring of Sets

## Theorem

Let $\mathbb S$ be the set of all real intervals.

Then $\mathbb S$ is a semiring of sets, but is **not** a ring of sets.

## Proof

Consider the types of real interval that exist.

In the following, $a, b \in \R$ are real numbers.

There are:

- Closed intervals:
- $\closedint a b = \set {x \in \R: a \le x \le b}$

- Open intervals:
- $\openint a b = \set {x \in \R: a < x < b}$

- Half-open intervals:
- $\hointr a b = \set {x \in \R: a \le x < b}$
- $\hointl a b = \set {x \in \R: a < x \le b}$

- Unbounded closed and unbounded open intervals:
- $\hointr a {+\infty} = \set {x \in \R: a \le x}$
- $\hointl {-\infty} a = \set {x \in \R: x \le a}$
- $\openint a {+\infty} = \set {x \in \R: a < x}$
- $\openint {-\infty} a = \set {x \in \R: x < a}$
- $\openint {-\infty} {+\infty} = \R$

- The empty interval:
- $\openint a a = \set {x \in \R: a < x < a} = \O$

- Singleton intervals:
- $\closedint a a = \set {x \in \R: a \le x \le a} = \set a$

### Set of Intervals is Not a Ring

Consider, for example, an open interval:

- $\openint a b = \set {x \in \R: a < x < b}$

such that $a < b$.

Any subset $\openint c d \subset \openint a b$ such that $a < c, d < b$ is such that:

- $\openint a b \setminus \openint c d = \hointl a c \cup \hointr d b$

But $\hointl a c \cup \hointr d b$ is not in itself a real interval, and therefore is not an element of $\mathbb S$.

Hence $\mathbb S$ is not closed under the operation of set difference and is therefore not a ring of sets.

### Set of Intervals is a Semiring

It is tedious but straightforward to examine each type of interval, and pass it through the same sort of exhaustive examination as follows.

We will take a general half-open interval:

- $A = \hointr a b$

and note that the argument generalizes.

Let $c, d \in \R: a \le c < d \le b$.

Then $C = \openint c d$ is a subset of $\hointr a b$.

There are four cases:

- $a < c, d < b$:

Then:

- $A = \closedint a c \cup \openint c d \cup \hointr d b$

and it can be seen that this is a partition of $A$.

- $a = c, d < b$:

Then:

- $A = \set a \cup \openint a d \cup \hointr d b$

and it can be seen that this is a partition of $A$.

- $a < c, d = b$:

Then:

\(\ds A\) | \(=\) | \(\ds \closedint a c \cup \openint c b \cup \hointr b b\) | ||||||||||||

\(\ds \) | \(=\) | \(\ds \closedint a c \cup \openint c b\) | as $\hointr b b = \O$ |

and it can be seen that this is a partition of $A$.

- $a = c, d = b$:

Then:

\(\ds A\) | \(=\) | \(\ds \closedint a a \cup \openint a b \cup \hointr b b\) | ||||||||||||

\(\ds \) | \(=\) | \(\ds \set a \cup \openint a b\) | as $\hointr b b = \O$ |

and it can be seen that this is a partition of $A$.

The same technique can be used to generate a finite expansion of any interval of $\R$ from any subset of that interval.

Hence $\mathbb S$ is a semiring of sets.

$\blacksquare$