Preimage of continuous function of nonzero measure

general-topologyreal-analysis

Let $f : [0,1] \to \mathbb{R}$ be continuous. Let $a \in \mathbb{R}$ be such that $f^{-1}(\{a\})$ is of nonzero measure. Then there exists an interval $I$ such that $f|_{I} \equiv a$. I believe this statement to be true but I may be wrong.Here's how I was thinking of proving.

$\{a\}^C$ is open, so $f^{-1}(\{a\}^C)$ is open and thus can be written as a countable union of disjoint open intervals. Since complementation commutes with preimage, this means that $f^{-1}(\{a\}$ can be written as a countable intersection of closed intervals. Since $f^{-1}(\{a\})$ is of nonzero measure this forces one of said closed intervals to have positive measure. By definition of preimage, the conclusion follows.

Best Answer

In fact, there is a counterexample. Hint: if $U\subset [0,1]$ is an open set containing $\mathbb{Q}\cap [0,1]$ with measure $m(U)<1$ (why does $U$ exist?), then $U^C$ has positive measure. Then, since $U^C$ is closed, the distance function $f(x):=d(x,U^C)$ is a continuous function and $f^{-1}(\{0\})= U^C$. By construction of $U$, $U^C$ cannot contain an interval. (Why not?)