Suppose that $f:(a,b)\to\Bbb R$ is differentiable and $f^\prime(x)=0$ on $D$, where $D$ is dense on $(a,b)$. Can we conclude that $f$ is a constant function?
In calculus course, I'm told that there's a theorem stated when $D=(a,b)$. In fact, it's reducible. For example, if $D=(a,b)\backslash C$ where $C$ is at most countable, we have $f^\prime(x)=0$ for all $x\in(a,b)$, because if $k_0=f^\prime(x_0)\neq0$ for some $x_0\in C$, there's some $\xi\in C$ such that $f^\prime(\xi)=\eta$ for all $0\le\eta\le k_0$, so $C$ is uncountable.