Oscillation facts used to prove Lebesgue criterion for integration We define the oscillation of a set $A$ to be $\omega_f(A)=|\sup\limits_{x\in A}f(x)-\sup\limits_{y \in A}f(y)|$.
We define the oscillation of a point $x \in A$ to be $\omega_f(x)=\inf\{\omega_f(x-\epsilon, x+\epsilon)\cap A) : \epsilon > 0\}$.

Proposition: Given $\epsilon > 0$ suppose $\omega_f(x) < \epsilon$ for each $x \in [a,b]$.  Then show that there is a $\delta > 0$ such that for every closed interval $I \subseteq [a,b]$ with $l(I) < \delta$ we have $\omega_f(I) < \epsilon$.

To begin, I want to make sure I understand what I am reading.  Is this saying that all the $x$ in some closed interval are uniformly oscillating (or oscillated)?  So because of this uniform oscillation, I can pick any $I=[x_i, x_{i+1}]\subseteq [a,b]$ with $|x_{i+1}-x_i|<\delta$ and have $\omega_f(I)<\epsilon$.  I'm not sure how to prove this one because I'm not sure how to pick endpoints for $I$.

Proposition: Show that $\{x \in [a,b] : \omega_f(x) \geq \delta \}$ is a closed set for each $\delta > 0$.

I think I was able to prove this as follows:  Let $U= \{x \in [a,b] : \omega_f(x) \geq \delta \}$.  So I want to show $U^c=\{x \in [a,b] : \omega_f(x) < \delta \}$ is open.  Let $x_0 \in U^c$.  Since $\omega_f(x_0) < \delta$ there must be an $r>0$ such that $\omega_f(B(x_0,r))<\delta$.  So take $y \in B(x_0,r)$.  Then there must exist $r'>0$ such that $y \in B(y, r')\subset B(x_0,r)$ and $\omega_f(y) \leq \omega_f(B(y, r')) \leq \omega_f(B(x_0,r))< \delta$.  This shows that $y$ is a member of $U^c$ and since $y$ was chosen arbitrarily, we see that $U^c$ is open.  Hence $U$ is closesed.
 A: By definition of $\omega_f(x)$, for every $x \in [a,b]$ choose $r_x>0$ such that $\omega_f((x-r_x,x+r_x) \cap A) < \epsilon$. Then certainly $\omega_f((x-r_x,r+r_x)) < \epsilon$. Decreasing the radii can only decrease the oscillation, so we may assume without loss that $r_x < \delta/2$ for all $x$ where $\delta$ is a Lebesgue number (see lemma) for $K=[a,b]$ with the open cover $ = \{ (x-r_x,r+r_x)\}_{x\in[a,b]}$.
Now let $I \subseteq [a,b]$ with $\ell(I)<\delta$. By the lemma we know $I \subseteq (x_0-r_{x_0},x_0+r_{x_0})$ for some $x_0 \in [a,b]$. Then certainly $\omega_f(I) \leq \omega_f((x_0-r_{x_0},x_0+r_{x_0})) \leq \epsilon$ as the former oscillation is taken over a smaller set.
Note: I glazed over a small detail here. What happens if $f$ is not defined on $(x-r_x,x+r_x)$? E.g. at the boundary $(a-\epsilon_a,a+\epsilon_a)$. Hint: Extend the function momentarily to take on $f(a)$ on $(-\infty,a)$ and $f(b)$ on $(b,\infty)$, this does not change the oscillation on any subset of $[a,b]$.
