Proposition
Let $f:\mathbb R^n \rightarrow \mathbb R$ be locally Lipschitz continuous, and
$$Z := \{x \in \mathbb R^n \mid f(x) = 0 \}.$$
Then$Df(x) = 0$ for Leb$^n$-a.e. $\,x \in Z.$
Where, $Df(x)$ is derivative of $f$ at $x$.
(ByLawrence C. Evans, Ronald F. Garzepy, "Measure Theory and Fine Properties of Functions", Chapter 3, Theorem 3.3(i))
At the beginning of the proof, it is stated that
Choose $x \in Z$ so that $Df(x)$ exists, and $$\lim_{r \rightarrow 0} \frac{\textrm{Leb}^n(Z \cap B(x;r))}{\textrm{Leb}^n(B(x;r))} = 1;$$ Leb$^n$ a.e. point$x \in Z$ will do.
for Leb$^n$-a.e. $\,x \in Z.$
Why is this true? If $\textrm{Leb}^n(Z \setminus\textrm{Int}(Z)) =0$, then this will be true in my opinion. But this is not always right. Could you give me some advice?