I would like to find a "simple" proof of the following statement:
Let $f\in C(\mathbb{R})$. Let $A$ be a closed and countable subset of $\mathbb{R}$. Suppose $f'(x)=0$ for all $x\in\mathbb{R}\setminus A$. Show $f(x)$ must be constant.
Here, a simple proof to me can assume knowledge of Folland's Real Analysis Chapters 1-7. There are other questions on here and here asking for the same thing. This is a qualifying exam question and genuinely, I am stuck. Some thought suggests that $\mathbb{R}\setminus A$ might be dense and so I could try to argue that $f'(x)=0$ for $x\in A$ from there. I couldn't get this to work.
The Cantor-Lebesgue function shows that if $A$ being countable is replaced by $m(A)=0$, then the result is false. So, any proof must rely on $A$ being countable.
Thanks for any ideas.