Showing a measurable function is uniformly continuous Let $E \subset \mathbb{R}$ be a measurable set with $m(E) < \infty$. Define the functoin $f: \mathbb{R} \to \mathbb{R}$ by
$f(x) = m(E \cap (-\infty,x])$.
Prove that $f$ is uniformly continuous on $\mathbb{R}$.
Here is my attempt at a proof, but I am not confident in it.
We want to show $\forall x,y$ and $\epsilon > 0$ $\exists \delta > 0$ such that if $|x - y| < \delta$ then $|f(x) - f(y)| < \epsilon$
Let $\delta = \epsilon$
Then,
$|x - y| < \delta$
$|m(E \cap (-\infty,x]) - m(E \cap (-\infty,y]|$
$= |m(E \cap ((-\infty,x] - (\infty,y]))|$
$\leq |m((-\infty,x] - (-\infty,y])|$
$= |m(-\infty + \infty,x - y])|$
Now, here is the step I'm quite unsure of (in fact I think it is wrong). Since this is simply our function evaluated at two different points, I think it's possible that the two infinities are the same level of infinity. So in that case, wouldn't $\infty - \infty = 0$?
$=|m(0,x - y)|$
$= |x - y - 0| = |x - y| < \delta = \epsilon$
I have two issues with my proof, but I can't seem to think of a different way to proceed. One I already mentioned (the infinity issue), and the other is that I don't see how my proof is any different than one for normal continuity. I know somewhere in here there needs to be an emphasis on why the function is uniformly continuous, but I don't see how I could include that. Can anyone shine some light on this? Thanks!
 A: 
Let $E \subset \mathbb{R}$ be a measurable set with $m(E) < \infty$. Define the functoin $f: \mathbb{R} \to \mathbb{R}$ by
$f(x) = m(E \cap (-\infty,x])$. Then $f$ is uniformly continuous on $\mathbb{R}$.

Proof:
We need to show that, for all $\epsilon > 0$ there is  $\delta > 0$ such that, for all $x,y \in \Bbb R$,  if $|x - y| < \delta$ then $|f(x) - f(y)| < \epsilon$. (Note that the choice of $\delta$ must not depend on $x$ or $y$).
Given any $\epsilon > 0$, let $\delta = \epsilon$.  Then, for any  $x,y \in \Bbb R$, we can assume without loss of generality that $x\leqslant y$, and so $m(E \cap (-\infty,x]) \leqslant m(E \cap (-\infty,y])$. So,  we have that, if  $|x - y| < \delta$, then
\begin{align*}
|f(x) - f(y)| &= | m(E \cap (-\infty,x]) - m(E \cap (-\infty,y])|= \\
&= m(E \cap (-\infty,y]) - m(E \cap (-\infty,x]) = \\
&= m((E \cap (-\infty,y]) \setminus (E \cap (-\infty,x])) =\\
&= m (E \cap (( -\infty,y] \setminus (-\infty,x])) = \\
&= m(E \cap (x,y]) \leqslant \\
& \leqslant m((x,y]) = y-x = |x-y| <\delta = \epsilon
\end{align*}
(see Remark 1 for details).
So, $f$ is uniformly continuous on $\mathbb{R}$. $\square$
Remark 1:

*

*We used in the proof above that if $A \subseteq B$ and $m(A)< \infty$, then $m(B) - m(A) = m(B \setminus A)$, where $B \setminus A$ is the set difference of $B$ and $A$, that is, $B \setminus A = \{p: p\in B \textrm{ and } p\notin A\} $.


*We also used, assuming $x \leqslant y$, that $ ( -\infty,y] \setminus (-\infty,x] = (x, y]$. Let us prove it.
We have
\begin{align*}
( -\infty,y] \setminus (-\infty,x] & = \{ p \in \Bbb R : p \leqslant y \} \setminus \{ p \in \Bbb R : p \leqslant x \} = \\
& =  \{ p \in \Bbb R : p \leqslant y \textrm { and not }( p \leqslant x )\} = \\
& =  \{ p \in \Bbb R : p \leqslant y \textrm { and } p > x \} = \\
& = (x, y]
\end{align*}
Remark 2: We actually proved more. We proved that, for all $x, y \in \Bbb R$, $|f(x) - f(y)| \leqslant |x-y|$. So, $f$ is a Lipschitz continuous function.
