Equivalence of Definitions of Real Interval

Outline of proof
That an interval according the second definition is an interval according to the first, follows by the properties of the ordering on the real numbers.

To prove the other direction, we distinguish according to if the subset is bounded on the left or on the right, and use the Supremum Principle and Infimum Principle.

1 implies 2
Let $I\subset \R$ be a subset such that:
 * $\forall x, y \in I : \forall z \in \R : (x < z < y \implies z \in I)$

Let:
 * $a = \inf \left({I}\right)$ (or $a = -\infty$ if $I$ is not bounded below)
 * $b = \sup \left({I}\right)$ (or $b = +\infty$ if $I$ is not bounded above).

We will prove that:
 * $\left({a \,.\,.\, b}\right) \subseteq I \subseteq \left[{a \,.\,.\, b}\right]$

In order not to need to provide a long list of cases, the temporary convention is used:
 * A square bracket "$[$" or "$]$" next to $\pm \infty$ means the same as a round bracket "$($" or "$)$"
 * $\left({a \,.\,.\, b}\right)$ means $\varnothing$ iff $a = b$.

Let $z \in \left({a \,.\,.\, b}\right)$.

Then $z > a$, so $\exists x \in I: x < z$ by definition of $a$.

Similarly $z < b$, so $\exists y \in S: z < y$ by definition of $b$.

Hence by hypothesis $z \in I$.

This proves that $\left({a \,.\,.\, b}\right) \subseteq I$.

From the definitions of $a$ and $b$ it follows that $I \subseteq \left[{a \,.\,.\, b}\right]$.

But if $\left({a \,.\,.\, b}\right) \subseteq I \subseteq \left[{a \,.\,.\, b}\right]$, then $I$ must be one of the various types of real interval.

2 implies 1
If $I$ is a real interval of any of the various kinds, then it clearly has this property by definition.