The differential of an almost everywhere constant function is almost everywhere zero? Let $f: \mathbb{R}^n \to \mathbb{R}$ be measurable and differentiable almost everywhere. 
Is it true that $df=0 $ a.e on $\{f=0\}$?
If $f \in W^{1,p}$ then it's known to be true- but the proof* uses the fact that weak derivatives behave well w.r.t fundamental theorem of calculus, so I am guessing that withouth this assumption this should not hold in general.
*(It is Theorem 4.4 (iv) in "Measure theory and
fine properties of functions", revised ed)
 A: Yes, it's true. In particular $df=0$ at every Lebesgue point (point of density $1$) of $\{f=0\}$, assuming the differential exists. When $f\in W^{1,p}$ the only relevant implied information is the a.e. approximate differentiability, under which assumption (instead of a.e. classical differentiability) the following should remain true with minor modifications.
Let us consider a point $x_0\in \{f=0\}$ such that $df(x_0)\neq 0$, and let us prove that the density of $\{f=0\}$ at $x_0$ is zero. 
Set $df(x_0)[y]=\xi\cdot y$ with $\xi\neq 0$. By definition of differential
$$|f(x)|=|f(x)-f(x_0)|=|\xi\cdot(x-x_0)+o(|x-x_0|)|\geq |\xi\cdot (x-x_0)|-|o(|x-x_0|)|.$$
For every $\epsilon>0$ we can find a radius $r_\epsilon$ such that $o(|x-x_0|)\leq \frac\epsilon2|\xi||x-x_0|$ for $|x-x_0|<r_\epsilon$. In particular if $x\in B(x_0,r_\epsilon)$ and belongs to the cone
$$C_\epsilon:=\{x:|\xi\cdot (x-x_0)|\geq \epsilon |\xi||x-x_0|\}$$
it holds that
$$|f(x)|\geq |\xi\cdot (x-x_0)|-\frac\epsilon 2 |\xi||x-x_0|\geq \frac\epsilon2|\xi||x-x_0|>0 \quad\forall x\neq x_0.$$
Now in the limit $\epsilon\to 0$ the cone $C_\epsilon$ fills a portion of $B(x_0,r_\epsilon)$ going to $1$. In particular $f\neq 0$ in a portion of the balls $B(x_0,r_\epsilon)$ that goes to $1$. This implies that the density of $\{f=0\}$ at $x_0$ is zero, and concludes the proof since a.e. point of $\{f=0\}$ is of density $1$ by the Lebesgue differentiation theorem.
If I'm not wrong it can be proved that the set of points of $\{f=0\}$ where the differential is nonzero is $(n-1)$-rectifiable, and therefore of Hausdorff dimension $n-1$ (which is stronger than Lebesgue negligible).
