Real-Valued Mapping is Continuous if Inverse Images of Unbounded Open Intervals are Open

Theorem
Let $T = \struct {S, \tau}$ be a topological space.

Let the real number line $\R$ be considered as a topology under the usual (Euclidean) topology.

Let $f: T \to \R$ be a real-valued function on $T$.

Then:
 * $f$ is continuous


 * for all $a \in \R$: $f^{-1} \openint \gets a$ and $f^{-1} \openint a \to$ are open in $T$.