Continuous functions and uncountable intersections with the x-axis

604 Views Asked by At

Let $f : \mathbb{R} \to \mathbb{R}$ such that the set $X = \{x \in \mathbb{R} : f(x) = 0\}$ does not contain any interval (i.e. there is no interval $I \subset X$)

Of course the set $X$ can be uncountable (see Cantor Set). If we add that $f$ is continuous, is it true that X is countable? I have been thinking about this for a while, and couldn't find any counterexamples - my intuition says the answer is yes. I tried to start a proof but really couldn't move forward.

My attempt (by contradiction): assume $X$ is uncountable. Then there exists $[a, b] \subset \mathbb{R}$ such that $X \cap [a, b]$ is uncountable. Now, let $g$ be the restriction of $f$ to $[a, b]$. Then $g$ is uniformly continuous. I don't know what to do next, though...

Any hints appreciated.

1

There are 1 best solutions below

1
On BEST ANSWER

No, the conclusion is not true. Take an uncountable compact set $E$ that contains no intervals (for example, the $1/3$ Cantor set) and define

$$f(x) = \operatorname{dist}(x, E)$$

This is zero if and only if $x \in E$, and is actually Lipschitz continuous.