Is there any strengthened version of Rademacher's Theorem or any counterexample?

The following theorem is well-known in the ordinary analysis textbook:

Theorem: Assume the function $$f:U\to\Bbb R^n$$ is Lipschitz continuous on an open set $$U\subset\Bbb R^m$$, then $$f$$ is almost everywhere differentiable on $$U$$.

My question:

Question: Assume the function $$f:U\to\Bbb{R}^n$$ is Lipschitz continuous on an open set $$U\subset\Bbb R^m$$. Prove or disprove that $$f$$ is almost everywhere $$C^1$$ on $$U$$.

Basically, this means that the point where $$f$$ is not differentiable would be a zero-measure closed set and on the open set where $$f$$ is differentiable, the gradient should be continuous. Is there any counterexample?

Thank for all the comments. This problem is solved now. The key point is that there exists a function $$f$$ which is differentiable everywhere with bounded derivative but the set consisting of discontinuous point of $$f'$$ can have positive measure. See Differentiable function with discontinuous derivative

• You can easily find counterexamples in the case $n=m=1$; here $f'$ may be (a.e.) any $L^\infty$ function. Mar 8 at 9:34
• there exists a function $f$ which is differentiable everywhere with bounded derivative but the set consisting of discontinuous point of $f'$ can have positive measure --- The discontinuity set of $f'$ can even have full measure, meaning that the continuity set has measure zero. In fact, most functions with a bounded derivative ("most" in a Baire category sense) are such that their continuity sets have Hausdorff dimension zero (and even this can be strengthened by using gauge functions). Mar 8 at 20:39

The best thing you can do is the following: for every $$\epsilon > 0$$ there exists a $$C^1$$ function $$g: U \to \mathbf{R}^n$$ so that $$$$\mathcal{H}^m(\{ f \neq g \} \cup \{ Df \neq Dg \} ) < \epsilon.$$$$ This can be deduced from the Whitney extension theorem; you can find a proof in Leon Simon's lecture notes on GMT (Theorem 5.3, pp. 32-33).

Let $$C \subset [0,1]$$ be a fat Cantor set. This is closed, has empty interior, and measure $$\lambda := \mathcal{H}^1(C) \in (0,1)$$. Define $$f: x \mapsto \int_0^x \mathbf{1}_C$$. This is $$1$$-Lipschitz and has $$f(1) = \lambda$$; moreover $$f' = 0$$ on the open complement $$C^c$$.
Now, if there were an open set $$U \subset [0,1]$$ of full measure, and along which $$f$$ is $$C^1$$, then $$f' = 0$$ on $$U$$, because $$C$$ has empty interior. But then on the one hand $$\int_{[0,1]} f' = \int_{[0,1] \cap U} f' = 0$$, and on the other hand $$\int_{[0,1]} f' = f(1) - f(0) > 0$$; this is absurd.
• Thanks! The theorem you mentioned in Leon Simon's note is very interesting. But I think finding a $C^1$ function $g$ which agrees with $f$ almost everywhere seems to be much stronger than what I asked. To be more precise, consider the function $f(x)=|x|$ on $\mathbb{R}$. We directly see that $f$ is of $C^1$ on the open set $\mathbb{R}\backslash 0$, but of course one can not find any $C^1$ function $g$ which agrees with $f$ almost everywhere, because this actually requires $g=f$ everywhere. Mar 8 at 11:12
• Yeah, the $\epsilon$ argument follows from the standard Littlewood's three principles in real analysis. I missed it. Mar 8 at 11:17