Real Function is Continuous at Point iff Oscillation is Zero

Theorem
Let $f: D \to \R$ be a real function where $D \subseteq \R$.

Let $x$ be a point in $D$.

Let $N_x$ be the set of open subset neighborhoods of $x$.

Let $\map {\omega_f} x$ be the oscillation of $f$ at $x$:
 * $\map {\omega_f} x = \displaystyle \inf \set {\map {\omega_f} I: I \in N_x}$

where:
 * $\map {\omega_f} I = \displaystyle \sup \set {\size {\map f y - \map f z}: y, z \in I \cap D}$

Then $\map {\omega_f} x = 0$ $f$ is continuous at $x$.

Necessary Condition
Let $\map {\omega_f} x = 0$.

Let $\epsilon > 0$.

Suppose that $\forall I: I \in N_x: \omega_f \left({I} \right) \ge \epsilon$.

Then by definition, $\map {\omega_f} x \ge \epsilon$.

This contradicts $\map {\omega_f} x = 0$.

From this contradiction we deduce that:
 * $\exists I: I \in N_x: \omega_f \left({I}\right) < \epsilon$

For this particular $I$, there is an open set $O \subset I$ by the definition of open subset neighborhood.

Therefore, a $\delta \in \R_{>0}$ exists such that $\openint {x - \delta} {x + \delta}$ is a subset of $O$.

So for our specific $x$, if $y$ satisfies:
 * $\size {x - y} < \delta$

Then:
 * $y \in I$

and, if $y \in D$:
 * $\size {\map f x - \map f y} \le \map {\omega_f} I$

Since $\map {\omega_f} I < \epsilon$ it follows by the definition of continuity that $f$ is continuous at $x$.

Sufficient Condition
Let $f$ be continuous at $x$.

Then $\forall \epsilon > 0: \exists \delta \in \R_{>0}$ such that, if $y \in D$:
 * $\size {x - y} < \delta \implies \size {\map f x - \map f y} < \epsilon$

Let the interval $I_\delta$ be defined as:
 * $I_\delta := \openint {x - \delta} {x + \delta}$

$I_\delta$ is an element of $N_x$ as $I_\delta$ is a neighborhood of $x$.

We have:

This gives:

This holds true for any value of $\epsilon$.

Thus $\map {\omega_f} x$ must be $0$.

Hence the result.