TITLE: shortest path in complete metric space
QUESTION [5 upvotes]: Let $(X,d)$ be a complete connected by arcs metric space. We define the length of a continuous path $\gamma: [0,1] \rightarrow X$ to be
\begin{equation*}
\sup\limits_{0=a_{0}<a_{1}<... a_{n}=1} \sum\limits_{i=0}^{n-1} d(\gamma(a_{i}),\gamma(a_{i+1})).
\end{equation*}
If two given points are joined by a path of finite length, is there necessarily a path of minimum length joining them ? I do not know the answer to this question.
What I do know is that if $X$ is compact then the answer is yes. A sketch of proof goes as follows: prove that length is invariant by reparametrization, then that every path of length $l$ has an $(l+\varepsilon)$-lipschitz reparametrization, and then apply Arzela-Ascoli's theorem. I found this exercise (with compact $X$) in a French book, Amar and Matheron's "Analyse complexe".

REPLY [5 votes]: Abstract idea: connect two points $A,B$ by a countable family of arcs $\gamma_n$ so that the length of $\gamma_n$ is $1+1/n$. 
Concrete realization: in the Hilbert space $\ell^2$ with standard basis $\{e_0,e_1,\dots\}$, consider the points $A=e_0$, $B=-e_0$, and $C_n = (1+1/n)e_n$ for $n=1,2,\dots$. All these are at distance at least $1$ from one another. Let $X$ be the union of line segments $AC_n$ and $BC_n$ over $n=1,2,\dots$. This set is rectifiably connected: indeed, one can get from any point to $A$ by traveling along two line segments at most. 
There is no shortest path from  $A$ to $B$:  traveling along $AC_nB$ takes distance $$2\sqrt{1+(1+1/n)^2}$$
which can be arbitrarily close to $2\sqrt{2}$ but never equal to it.
Completeness of $X$ follows from the fact that it's a closed subset of $\ell^2$.