Reference or proof of $ \lim_{r\to 0}\sup_{y:0Can 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. 
 A: 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.
A: If $c$ is a curve with $c(0)=x,\ c'(0) = \frac{ \nabla f}{|\nabla
f|} (x)$, then $$ \lim_{t_n}\ \frac{f\circ c\ (t_n) -f(x)
}{d(c(t_n),x)} =|\nabla f|(x) $$
where $t_n>0,\ t_n\rightarrow 0$.
Proof : Note that $\frac{d}{dt}\ f\circ c\ (t)=|\nabla f|(x)$ so
that
$$ f\circ c\ (t) -f(x)=|\nabla f|(x)t+ O(t^2) $$
Hence $$  \lim_{t_n}\ \frac{f\circ c\ (t_n) -f(x) }{d(c(t_n),x)}
 =\lim_{t_n}\ \frac{f\circ c\ (t_n) -f(x)
}{t_n} \frac{t_n}{d(c(t_n),x)} $$
so that it is claimed that $$\lim_{t_n}\ \frac{t_n}{d(c(t_n),x)} =1
$$
Here it is followed from $ d(c_0(t),c(t))=O(t^2)$ where $
c_0(t):=\exp_x\ t \frac{\nabla f}{|\nabla f|}(x)$. 
