Does there exist a real everywhere differentiable function with the set of critical values of non zero measure? By Sard's theorem, the measure of the set of critical values of a continuously differentiable real function defined on the real line is zero. Is there a counterexample when one omits the condition of continuity of the derivative (but still demands its existence)? (I have read about the Pompeiu derivative in the answers on this site, whose antiderivative as I understood has a $G_\delta$ dense set of critical values in the unit interval, but I did not find a statement about its measure).
 A: This has been answered on math.stackexchange.com in "equation (1)" at Is the image of a null set under a differentiable map always null? (ignore the question title)
Here is a proof using dyadic intervals instead of the Vitali covering lemma.
Consider an everywhere differentiable map $f:[0,1)\to\mathbb R$. Let $\epsilon>0$. We need to show that $\mu(f(N))\leq \epsilon$, where $N$ is the set of points $x$ with $f'(x)=0$.
Let $\mathcal{D}$ be the set of intervals of the form $I=[p/2^q, (p+1)/2^q)$ such that $\mu(f(I))\leq \epsilon \mu(I)$.
Then $N\subseteq\bigcup_{I\in\mathcal D}I$: if $f'(x)=0$ then $x$ is contained in some dyadic interval $I$ such that for all $x'\in I$ we have
$$|f(x')-f(x)|\leq (\epsilon/2) |x'-x|\leq (\epsilon/2)\max_{x'\in I}|x'-x|\leq (\epsilon/2)\mu(I),$$
which implies $\mu(f(I))\leq \epsilon \mu(I)$.
On the other hand, the inclusion-maximal sets in $\mathcal D$ are a countable set of disjoint intervals, so
$$
\mu(f(N))\leq
\mu(f(\bigcup_{I\in\mathcal D}I))\leq
\mu(f(\bigcup_{I\textrm{ maximal in }\mathcal D}I))\leq
 \epsilon\sum_{I\textrm{ maximal in }\mathcal D}\mu(I)\leq\epsilon$$
as required.
