For a fixed "reasonable" metric space $(X,d)$ (say complete, separable, whatever is needed...), a curve $\gamma:[0,1]\to X$ is said to be $AC^p(0,1)$ (absolutely continuous) if $$ d(\gamma(s),\gamma(t))\leq\int_s^t m(r)dr \qquad\mbox{for all }0\leq s\leq t\leq 1 $$ for some nonnegative function $m\in L^p(0,1)$ (with an obvious definition for $p=\infty$, corresponding to Lipschitz curves).

Theorem:If $\gamma\in AC^p(0,1)$ for some $p\in [1,\infty]$ then the metric derivative $$ |\dot\gamma(t)|:=\lim\limits_{h\to 0}\frac{d(\gamma(t+h),\gamma(t))}{h} $$ exists for a.a. $t\in (0,1)$, it is an $L^p$ function, and it is the smallest admissible function $m$ in the above definition of $AC^p$ curves.

The statement and proof can be found in [Ambrosio, Gigli, Savaré, *Gradient Flows in Metric Spaces and in the Space of Probability Measures*, thm. 1.1.2 page 24]

I am interested in the following characterization of $AC^p$ curves.

Question:Assume that I have a curve $\gamma:[0,1]\to X$ such that, for some function $m\in L^p(0,1)$, there holds $$ |\dot\gamma(t)|_+:=\limsup\limits_{h\to 0}\frac{d(\gamma(t+h),\gamma(t))}{h}\leq m(t) \qquad \mbox{for a.a. }t\in (0,1). $$ Can I conclude that $\gamma\in AC^p$ with $|\dot\gamma(t)|=|\dot\gamma(t)|_+\leq m(t)$ for a.e. $t$?

Of course this seems very plausible, but so far I cannot prove it by hand and I could not find this statement anywhere in the literature. Is this known? (I suspect that there should be an elementary proof) Can anyone provide a reference?

**Quick comment:** of course the function $|\dot\gamma(t)|_+$ is some kind of upper metric derivative which presumably should control the metric speed itself, it is exists. The statement would immediately follow if we could prove directly that
$$
d(\gamma(s),\gamma(t))\leq \int _s^t |\dot\gamma(\tau)|_+d\tau,
$$
but so far I am stuck and I don't really see how to proceed from the definition of $|\dot\gamma|_+$.