Let $(M,g)$ be a Riemannian manifold.
I want to prove the following claim:
Let $c:[0,1]\to M$ be a smooth curve from $p$ to $q$ such that $L(c)=d(p,q)$. Then $c$ is, up to reparametrization, a geodesic.
And I can use the following:
Fact: For each $p\in M$ there exists a $\delta>0$ such that for every $q,q'\in B_\delta(p)$, there exists a unique minimizing geodesic from $q$ to $q'$.
Some observations:
$c$ not only minimizes the distance from $p$ to $q$ but in fact between any two points on the curve: If that were not the case, then we would have $L(\tilde c)<L(c|_{[s,t]})$ for some other curve $\tilde c$ from $c(s)$ to $c(t)$. From that we obtain $L(c|_{[0,s]}\cup \tilde{c}\cup c|_{[t,1]})<L(c)$, contradicting the assumption that $c$ is minimizing.
The curve $c$ can be covered by finitely many balls of some radius $\delta>0$ as in the fact above. So for points $q$ and $q'$ within the ball there exists a minimizing geodesic connecting $q$ and $q'$. On the other hand, $c$ is a minimizing curve connecting $q$ and $q'$.
Does it necessarily follow that on the segment from $q$ to $q'$, the curve $c$ coincides with the geodesic guaranteed by the fact?
Any clarification is more than welcome.
(1) (Reference : Riemannian geometry - do Carmo) Assume that $c$ is a piecewise curve from $p$ to $q$ s.t. for any curve $c'$ from $p$ to $q$ $$ l(c') \geq l(c)$$ where $l$ is length. Then $c$ is a geodesic up to reparametrization :
Proof : As you commented, we have totally normal neighhood at $c(t)$, $B_{\delta_t} c(t)=\exp_{c(t)} B_{\delta_t}(0)$ That is, any two points in the ball can be connected unique minimal geodesic. So in each ball $c$ must be a geodesic. And if $c$ has singularity, then at the point, by using totally normal neighborhood we can rule out singularity.
(2) Now define a distance function $d(p,q)=\inf_c l(c)$ So there exists a curve $c$ s.t. $$ l(c)-d(p,q) <\epsilon $$
By $\epsilon = \frac{1}{n}$, and arzela-ascoli theorem we have the existence of $c$ s.t. $l(c)=d(p,q)$ By previous $c$ is a geodesic.