Can anyone help me with a proof or a reference for the following:
Let $(M,g)$be a Riemannian manifold, $d$ is the Riemannian distance and $f\in C^\infty (M)$, then
$$\lim_{r\to 0}\sup_{y:0<d(y,x)\leq r}\frac{|f(y)-f(x)|}{d(x,y)} = |\nabla f(x)|,$$ for every $x\in M$.
Here $\nabla $ is the Riemannian gradient, and the length of the gradient $|\nabla f(x)|$ is with respect to the norm associated to the metric $g$.
I've come across this limit many times in literature and have always taken it for granted. Heuristicslly I know why this must be true, but I was hoping someone can point out a reference or help with a proof.
One of the inequalities is obvious. Let $\gamma$ be a arclenth parametrized geodesic such that $\gamma (0)=x$ and $\gamma (d(x,y))=y$, then $$ |f(y)-f(x)| = \left| \int _0^{d(x,y)} g(\nabla f(\gamma (s)),\gamma^{\prime}(s)) ds \right| \leq \max_{0\leq s \leq d(x,y)} |\nabla f(\gamma (s))| d(x,y).$$
The other direction seems more difficult to me. Any help would be much appreciated.
Let $\gamma:(-\epsilon,\epsilon) \to M$ be a unit-speed geodesic with $\gamma'(0) = \nabla f(x)/|\nabla f(x)|$ and study the function $F = f \circ \gamma$. (In the case where $|\nabla f(x)| = 0$, the direction of $\gamma$ does not matter.) To establish that the limsup is at least $|\nabla f(x)|$ (the direction you're having trouble with), it suffices to show that $$\limsup_{t\to0} \frac{|F(t) - F(0)|}{|t|} = |\nabla f(x)|.$$ By the chain rule we know that $F'(0) = |\nabla f(x)|$, so by the definition of the derivative we have $$\frac{F(t) - F(0)}{t} \to |\nabla f(x)|$$ as $t \to 0$. Thus the absolute value of the LHS converges to this same value, so the claim follows.