Properties of absolutely continuous functions

Here goes one solution for this problem, it is lemma 3.45 from Leoni's book, A first course in Sobolev spaces.

Theorem: $I\subset\mathbb{R}$ an interval and $u:I\to \mathbb{R}$. Assume that that $u$ has derivative (finite or infinite) on a set $E\subset I$ (not necessarily measurable), with $m(u(E))=0$. Then $u'=0$ a.e. $x\in E$.

Proof: We have to prove that $E^{\star}=\{x\in E:\ |u'(x)|>0\}$ has zero measure. Write $$E^{\star}_k=\left\{x\in E^{\star}:\ |u(x)-u(y)|\ge \frac{|x-y|}{k},\ \forall\ y\in (x-1/k,x+1/k)\cap I\right\}$$

Note that $E^{\star}=\cup_{k=1}^\infty E^{\star}_k$, therefore, is it sufficiently to prove that $m(E^{\star}_k)=0$ for all $k$. To prove it, fix $k$ and let $J$ be any inteval, with length less than $1/k$. Define $F=J\cap E_k^{\star}$. We will prove that $m(F)=0$ for all $J$.

Indeed, note that, as $m(u(E))=0$ and $F\subset E$ then, for any $\epsilon>0$ there exist a sequence of disjoint open intervals $I_n$ such that $$m(u(F))\le \sum _{n=1}^\infty m(I_n)<\epsilon. \tag{1}$$

Let $F_n=u^{-1}(I_n)\cap F$ and note that $F_n$ cover $F$. Hence

\begin{eqnarray} m(F) &\le& \sum_{n=1}^\infty m(F_n) \nonumber \\ &\le & \sum _{n=1}^\infty \sup _{x,y\in F_n} |x-y| \nonumber \\ &\le& k\sum _{n=1}^\infty \sup_{x,y\in F_n} |u(x)-u(y)|, \tag{2} \end{eqnarray}

where in the last inequality we used the fact that $F_n\subset J\cap E_k^{\star}$. To conclude, note that as $x,y$ varies in $F_n$, $u(x),u(y)$ varies in $u(F)$. Then, combining $(1)$ and $(2)$ we get that $$m(u(F))\le k\epsilon,$$

which proves that $m(u(F))=0$.