I am reading "Principles of Mathematical Analysis 3rd Edition" by Walter Rudin.
There is the following theorem on p.42:
Theorem 2.47
A subset $E$ of the real line $\mathbb{R}^1$ is connected if and only if it has the following property: If $x \in E, y \in E$, and $x < z < y$, then $z \in E$.
Rudin didn't write the following more concrete result.
Why?
I wish if Rudin had written the following more concrete result:
A subset $E$ of the real line $\mathbb{R}^1$ has the following property: If $x \in E, y \in E$, and $x < z < y$, then $z \in E$
if and only if
(1) $E = (a, b)$ for $a, b \in \mathbb{R}$ such that $a \leq b$ or
(2) $E = [a, b]$ for $a, b \in \mathbb{R}$ such that $a \leq b$ or
(3) $E = [a, b)$ for $a, b \in \mathbb{R}$ such that $a \leq b$ or
(4) $E = (a, b]$ for $a, b \in \mathbb{R}$ such that $a \leq b$ or
(5) $E = (a, +\infty)$ for $a \in \mathbb{R}$ or
(6) $E = [a, +\infty)$ for $a \in \mathbb{R}$ or
(7) $E = (-\infty, b)$ for $b \in \mathbb{R}$ or
(8) $E = (-\infty, b]$ for $b \in \mathbb{R}$ or
(9) $E = (-\infty, +\infty)$.
Why? Because the two statements are equivalent and yours is way more work to write down. The essence of the theorem is that connected sets of reals (w.r.t. the usual topology) are precisely intervals.
Edit: I see your version of the theorem doesn't mention connectedness and is therefore false. But the above applies by correcting your statement in the obvious way.