Let $f:\mathbb R\rightarrow \mathbb R$. Suppose we know that $f $ is a constant on some open/closed interval. Which condition does guarantee that $f $ is constant on $\mathbb R$?
Clearly, continuity is not enough. Differentiable? $C^1$? smooth? real analytic?