$f$ is Lipschitz if and only if there exists $L\geq0$ such that $|f'(x)|\leq L$ Let $f:[a,b]\to\mathbb{R}$ be absolutely continuous.
Prove that $f$ is Lipschitz if and only if there exists $L\geq0$ and a set $E\subset[a,b]$ such that, $m(E)=0$ and $f$ is differentiable at each $x\in[a,b]\setminus E\quad$  with $|f'(x)|\leq L$.
My attempt:
For $\Rightarrow$ direction:
Since $f$ is absolutely continuous on $[a,b]$, it is differentiable a.e on $[a,b]$
And notice:
$\begin{align}
|f'(x)|&=\left|\lim\limits_{h\to0}\frac{f(x+h)-f(x)}{h}\right|\\
&\leq\lim\limits_{h\to0}\left|\frac{f(x+h)-f(x)}{h}\right|\\  
&\leq \lim\limits_{h\to0}\left| \frac{L|(x+h)-x|}{h}\right|\\
&=L \quad\text{ Where, $L$ is the Lipschitz constant}
\end{align}$
Is that correct?
And for the other side of the implication I would really appreciate your help
 A: Since $f$ is absolutely continuous, we have that
$$ f(x) - f(y) = \int_x^y f'(t) \, dt .$$
Then
\begin{align}
\text{$f$ is Lipschitz with constant $L$} &\Leftrightarrow
-L (y-x) \le \int_x^y f'(t) \, dt \le L (y-x) \text{ for all $x < y$} \\
&\Leftrightarrow  \int_x^y (L - f'(t)) \, dt \ge 0 \text{ and } \int_x^y (L + f'(t)) \, dt \ge 0\text{ for all $x < y$}
\end{align}
Also
$$ \int_x^y g(t) \, dt \ge 0 \text{ for all $x < y$} \Leftrightarrow g \ge 0 \text{ a.e.} $$
Hence $f$ is Lipschitz with constant $L$ if and only if $L - f'(t)$ and $L + f'(t)$ are greater than or equal to zero for almost every $t$.
A: Important: this proof only works when $f$ is differentiable in $\mathbb{R}$.
The reverse implication can easily be seen with the Mean value theorem. Assuming $|f'(x)|\leq L$ (being $L\geq 0$) for any $x\in\mathbb{R}$, using the mean value theorem we know that, given $x,y\in\mathbb{R}$ (we will assume $x<y$), there exists $c\in(x,y)$ such that
$$\frac{f(x)-f(y)}{x-y}=f'(c).$$
Using absolute values, and using that $|f'|\leq L$ we get that
$$\frac{|f(x)-f(y)|}{|x-y|}\leq |f'(c)|\leq L,$$
so we end up with
$$\boxed{|f(x)-f(y)|\leq L\cdot|x-y|}$$
and we conclude $f$ is Lipschitz
