Let $A\subset\mathbb{R}$ be a set of Lebesgue measure zero and $f:\mathbb{R}^n\to\mathbb{R}$ is a function. Under what conditions does $f^{-1}(A)$ have Lebesgue measure zero?
I found a possible answer here but I cannot fully understand the proof. The claim is that $f\in C^1$ and the set $\{x:\ \nabla f(x)=0\}$ having measure zero suffices. Now the proof given starts with: "To prove this, note that this is true locally, in a neighborhood of each point where $\nabla f(x)\neq 0$, due to the implicit function theorem." Take a point $x=(x_1,\ldots,x_n)\in\mathbb{R}^n$ such that $\nabla f(x)\neq 0$ and $f(x)=c$ for some $c\in A$. By the implicit function theorem one can find neighborhoods $U$ and $V$ of $(x_1,\ldots,x_{n-1})$ and $x_n$ respectively such that $f^{-1}(\{c\})\cap (U\times V)=\{(y,g(y)):y\in U\}$ for some function $g$ on $U$ and $\nabla f(x)\neq 0$ for all $x\in U\times V$. But what about all the other elments of $A$?
A reference on this or similar theorem would be greatly appreciated.