A mapping $f:X\to Y$ is defined to be locally constant if $\forall x\in X$, there exists a neighbourhood $V(x)$ containing $x$ such that $a\in V(x)\implies f(a)=x_0$ for some constant $x_0$. In other words, every point in that neighbourhood maps to the same image.
My book says that if $\text{grad }f=0$ for all $x \in X$, then $f$ is locally constant.
Could someone give a proof of this fact? It has been confusing me for some time now!