# A function property to guarantee that being constant on an interval implies identically constant

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?

Real analytic is enough.

Smooth is not enough. See http://en.wikipedia.org/wiki/Bump_function