Suppose $S\subset[0,1]$ is countable, $f:[0,1]\to\Bbb R$ is continuous, and $f'(t)=0$ for every $t\in[0,1]\setminus S$. Does it follow that $f$ is constant?
Yesterday I realized the answer's yes if $S$ is closed and $f$ has bounded variation (say $f(x)-f(0)=\mu([0,x])$. Then $\mu$ must be concentrated on $S$, and since $S$ is countable and $\mu$ vanishes on singletons it follows that $\mu=0$.)
Today I can show the answer's yes if $S$ is closed.
But.
(The answer must be yes: If there were a counterexample it would be in books next to or in place of that Lebesgue-Cantor function. But I fear some may feel this argument is somewhat lacking in "rigor"...)
Edit: Thanks to @MartinR for pointing out that this follows from the result here. The answer there is a little intricate; one can get the idea from the first few lines, and then give the following proof, which seems simpler to me (possibly just because stuff I figure out always seems simpler than stuff I try to read, maybe not):
Let $S=(\alpha_n)$. Let $\epsilon>0$.
If $x=\alpha_n$ there is an open interval $I_x$ with $x\in I_x$ and $$|f(s)-f(t)|<\epsilon2^{-n}\quad(s,t\in I_x).$$Otoh if $x\in[0,1]\setminus S$ there is an open interval $I_x$ with $x\in I_x$ and $$|f(s)-f(x)|\le\epsilon|s-x|\quad(s\in I_x).$$
Now $[0,1]$ is covered by finitely many intervals $J_1,\dots,J_n$ with $J_j=I_{x_j}$. We can assume that no $J_j$ is contained in the union of the $J_k$ for $k\ne j$, and then we can assume that the $J_j$ are ordered from left to right; in particular $0\in J_1$ and $1\in J_n$.
Now $J_j\cap J_{j+1}\ne\emptyset$, since $[0,1]$ is connected. Say $y_j\in J_j\cap J_{j+1}$. Then $$|f(1)-f(0)|\le|f(0)-f(x_1)|+|f(x_1)-f(y_1)|+|f(y_1)-f(x_2)|+|f(x_2)-f(y_2)| \\+|f(y_2)-f(x_3)|+\dots+|f(y_{n-1})-f(x_n)|+|f(x_n)-f(1)|.$$Now for each term here we may apply one or the other of the two inequalities above (depending on whether $x_j\in S$); throwing in a lot of extra stuff on the RHS to simplify the notation we obtain $$|f(1)-f(0)|\le2\epsilon\sum_k2^{-k}+\epsilon\sum|x_j-y_j|+\epsilon\sum|y_j-x_{j+1}|\le 3\epsilon.$$
So $f(1)=f(0)$, which come to think of it is not what we wanted to prove, but the same argument shows $f(b)=f(a)$ for every $[a,b]\subset[0,1]$.