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 $\omega_f$ be the oscillation of $f$, that is:


 * $\omega_f \left({I}\right) = \sup \left\{{\vert f \left({x}\right) - f \left({y}\right) \vert: x, y \in I}\right\}$


 * $\omega_f \left({x}\right) = \inf \left\{{\omega_f \left({I}\right): x \in I}\right\}$

Then $\omega_f \left({x}\right) = 0$ iff $f$ is continuous at $x$.

Necessary Condition
Suppose $\omega_f \left({x}\right)=0$

Let $\epsilon>0\exists I$ such that $x\in I$ and $\omega_f(I)=0$

let $\delta=\sup\{\vert u-v\vert: u, v \in I\}$

so if $\vert x-y|<\delta\Rightarrow x,y\in I$

then $\vert f \left({x}\right)-f \left({y}\right)\vert<\sup\{\vert f \left({x}\right)-f \left({y}\right)\vert:x,y\in I\}=\omega_f \left({x}\right)=0<\epsilon$

Sufficient Condition
Suppose $f$ is continuous at $x$.

Then $\forall \epsilon > 0: \exists \delta \in \R$ such that:
 * $\left \vert x-y \right \vert < \delta \implies \left \vert f \left({x}\right)-f \left({y}\right) \right \vert < \epsilon$

Let the interval $I_\delta$ be defined as:
 * $I_\delta := \left({x - \delta . . x + \delta}\right)$

Then:

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

Thus $\omega_f \left({x}\right)$ must be $0$.

Hence the result.