I have a metric space $(X,d)$, a geodesic arc is defined to be a continuous function $\gamma : [a,b] \rightarrow X$, $a < b$, which is (globally) distance preserving and geodesic segments are defined to be images of geodesic arcs.
Given any curve (continuity is assumed) $\gamma: [a,b] \rightarrow X$ and a partition $P$ $$a = t_0 < t_1 < \cdots < t_m = b$$ of $[a,b]$ define $$\ell(\gamma,P) = \sum_{i=1}^m d(\gamma(t_{i-1}),\gamma(t_i))$$ and we define the length of $\gamma$, denoted by $|\gamma|$ and which may be infinite, to be the supremum of all these sums for partitions $P$.
Because $a < b$ constitutes a partition of $[a,b]$, $|\gamma| \ge d(\gamma(a),\gamma(b))$.
Finally what I want to prove is the following:
Let $\gamma : [a,b] \rightarrow X$ be a curve from $x$ to $y$ in $X$ with $x \neq y$. Then $|\gamma| = d(x,y)$ if and only if $\gamma$ maps $[a,b]$ onto a geodesic segment joining $x$ to $y$ and $d(x,\gamma(t))$ is an increasing function of $t$.
I don't have either direction fully, what I have, my thoughts in general and some notes are:
For the forward direction, that $|\gamma| = d(x,y)$ is the same as saying that equality holds in the triangle inequality for any partition of $[a,b]$; I can show that the same holds for any restriction of $\gamma$ and then using this I can show that $d(x,\gamma(t))$ is increasing. I thought maybe I could consider the reparametrisation of $\gamma$ achieved by affinely mapping $[a,b]$ to $[0,d(x,y)]$ hoping that this may give me a geodesic arc but I have gotten nowhere with this.
For the opposite direction I've spent much less time thinking about it and have nothing at the moment.
A useful fact might be that if $[x,y]$ and $[y,z]$ are geodesic segments joining $x$ to $y$ and $y$ to $z$ respectively, $[x,y] \cup [y,z]$ is a geodesic segment joining $x$ to $z$ if and only if $$d(x,y)+d(y,z)=d(x,z).$$
This is from John G. Ratcliffe's Foundations of Hyperbolic Manifolds, Section 1.5.
Thank you.
First I will summarize the question using more definitions, to ease the discussion:
Curves and Lengths
(1) Curves are continuous functions from an interval of reals into the metric space.
(2) A polygonal path is a sequence of points (vertices) in the metric space.
(3) The length of a polygonal path is the sum of the point-to-point distances going from vertex to vertex along the polygonal path.
(4) The length of a curve is the supremum over lengths of polygonal paths having vertices in order along the curve.
(5) A shortest path is a curve whose length equals the distance between its endpoints.
Geodesics
(6) A geodesic arc is a distance-preserving curve.
(7) A geodesic segment is the range (in the metric space) of a geodesic arc.
(8) An outward journey is a curve for which the distance from the starting point is non-decreasing.
(9) A geodesic journey is an outward journey whose range is a geodesic segment.
The Problem:
Prove that a geodesic journey is the same as a shortest path.
Proof
To show that every geodesic journey is a shortest path, we need to show that the length of a geodesic journey equals the distance between its endpoints.
A geodesic journey $\beta$, by definition, corresponds to some geodesic arc $\gamma$, indeed by a weakly monotonic remapping of the function argument (corresponding to the distance traveled on the outward journey). Note that $\beta$ and $\gamma$ have the same length.
Any geodesic arc is clearly a shortest path, since all polygonal paths going from end to end in fact have the same length, so the supremum is trivial.
Since the geodesic arc $\gamma$ is a shortest path, its length equals the distance between its endpoints. Since $\beta$ has the same endpoints and same length, it is therefore also a shortest path.
To show that every shortest path is a geodesic journey, we will first show that every shortest path is an outward journey.
Indeed, if a curve $\gamma$ that goes from $A$ to $B$ is not an outward journey, then it must pass through a point $X$ and then $Y$, where $X$ is strictly farther from $A$ than $Y$ is. This means that the polygonal path $AXYB$ is strictly longer than the polygonal path $AYB$, which is in turn at least the distance between $A$ and $B$ by the triangle inequality. Thus any curve $\gamma$ which is not an outward journey is also not a shortest path.
All that remains is to show that the range of any shortest path $\delta$ is a geodesic segment.
For this, we need to show that there is a geodesic arc having the same range as $\delta$.
For each point on $\delta$, we consider its distance from the starting point. Thanks to the continuity of curves, every distance from $0$ to the length $|\delta|$ of $\delta$ must occur for some point on $\delta$. This provides a mapping $\rho$ from $[0,|\delta|]$ into the domain of $\delta$.
Thanks to $\delta$ being an outward journey, and the fact that distance $XY$ in a metric space is only zero when $X=Y$, we see that the mapping $\rho$ is continuous and has the same range as $\delta$.
All that remains, to show that $\rho$ is the geodesic arc we are looking for, is to show that $\rho$ is distance-preserving.
Consider two points, $X=\rho(x)$ and $Y=\rho(y)$, with $x<y$. Let $A=\rho(0)$ and $B=\rho(|\delta|)$ be the endpoints of $\delta$ (and of $\rho$). To show that $\rho$ is distance-preserving, we want to show that the distance $XY$ is given by $y-x$. Since $\delta$ is a shortest path, all polygonal path lengths along $\delta$ must be of the same length, namely the distance $AB$, so in particular $AX+XY+YB=AY+YB$, so in other words $x+XY+YB=y+YB$, yielding $XY=y-x$.
So we are done: $\rho$ is a geodesic arc with the same range as shortest path $\delta$, showing that $\delta$, which as we saw must be an outward journey, is indeed a geodesic journey.