Let $(M,g)$ be a compact connected smooth Riemannian manifold without boundary and let $\phi: M \rightarrow \mathbb{R}$ be a function on $M$. We say that $\phi$ is superdifferiantiable at $x$ with super-gradient $p$, if we have that 


$$\phi(\exp\_{x}(v)) \leq \phi(x)+ g(p,v)\_{x}+o(|v|)\_{x}$$


for all small $v \in TM\_{x}$


and subdifferentiable at $x$ with sub-gradient $q$ if the reverse inequality holds:


$$\phi(\exp\_{x}(v)) \geq \phi(x)+ g(q,v)\_{x}+o(|v|)\_{x}$$


for all small $v \in TM\_{x}$


The following fact has been used in various papers I've seen:



> 
> If $\phi$ is superdifferentiable at $x$ with supergradient $p$ and $\phi$ is sub differentiable at $x$ with subgradient $q$ then $p=q$ and $\phi$ is differentiable at $x$ with $p=q$. 
> 
> 
> 


We can maybe just prove this locally in the Euclidean case and use normal coordinates to generalize. But I'm having trouble doing this in even Euclidean case. Sorry if this is too standard to be asked on here.



Superdifferentiable and subdifferentiable at $x$ implies differentiable at $x$
Pick any arbitrary super- sub-gradients $p,q$, and an arbitrary direction $v\in T\_x \mathbb R^d\cong \mathbb R^d$.
By definition of sub- super-differentiability we get the double inequality
$$
\phi(x)+\langle q,v\rangle+o\_1(|v|) \leq \phi(x+v)\leq \phi(x)+\langle p,v\rangle+o\_2(|v|)
$$
for two negligible functions $o\_1,o\_2$.
Hence
$$
\langle p-q,v\rangle\geq o\_1(|v|)-o\_2(|v|)=o(|v|)
\qquad
\forall\,v\in\mathbb R^d.
$$
Clearly this is only possible if $q=p$, thus necessarily the sub and super-differentials contain a unique common element. Let me denote this element as $p$ from now on.


The same chain of inequalities, with now the new extra information that $q=p$ (the unique "sub=super-gradient"), allows to write in a slightly different fashion
$$
o\_1(|v|)\leq \phi(x+v)-\phi(x)-\langle p,v\rangle \leq o\_2(|v|),
$$
hence
$$
\phi(x+v)=\phi(x)+\langle p,v\rangle+o(|v|)
$$
for all $v\in\mathbb R^d$.
This is the exact definition the differentiability of $\phi$ at $x$, with gradient $D\phi(x)=p$.


