Let $f: {\bf Q} \rightarrow {\bf Q}$ be a "${\bf Q}$-differentiable" function whose "${\bf Q}$-derivative" is constantly zero; that is, for all $x \in {\bf Q}$ and all $\epsilon > 0$ in ${\bf Q}$, there exists $\delta > 0$ in ${\bf Q}$ such that for all $y \in {\bf Q}$ with $0 < |x-y| < \delta$, $|(f(y)-f(x))/(y-x)| < \epsilon$.
An example of such a function is the 2-valued function on ${\bf Q}$ that takes the value 0 or 1 according to whether $x<\pi$ or $x>\pi$.
Must $f$ be locally constant, in the sense that for all $x \in {\bf Q}$, there exists $\delta > 0$ in ${\bf Q}$ such that for all $y \in {\bf Q}$ with $|x-y| < \delta$, $f(y)=f(x)$?
I have a feeling that this is not a hard problem (and I am even afraid some of you will think that it is a homework problem!), but it actually arose from my research (see http://jamespropp.org/reverse.pdf), and after an hour of thought I still don't see the answer. In an ideal world I'd mull it over longer before posting, but since the journal to which I have submitted the paper has given me a deadline for making revisions, and the deadline is approaching, I am swallowing my pride and seeking help.