Let $(M,g)$ be a connected Riemannian manifold.
Let $d\_g$ be the induced distance metric of $g$. Now let $d$ be some other metric on $M$.


Suppose that for each $x \in M$, there is a neighborhood $U$ of $x$ so that $d = d\_g$ on $U \times U$. 


**Question:** Does this imply that $d = d\_g$ on $M \times M$?


I am *not* assuming that $d$ is the metric of some Riemannian metric; I know the answer is yes in that case.


Remarks: 


1. It's clear to me that $d = d\_g$ on a neighborhood of the diagonal in $M \times M$; this essentially is just a rephrasing of the hypothesis.
2. Connectedness is necessary to avoid stupid counter examples. For example, we could take two disjoint points $\{x,y\}$. Then $d\_g$ between them is infinity, but we can take $d(x,y) = 1$. They both agree in a neighborhood of $x$, namely $x$. (We can build similar examples by taking disjoint unions of non-zero dimensional manifolds.)
3. Maybe the 'right' question is actually: let X be a (path) connected topological space and consider two metrics $g$ and $h$ on X, compatible with the topology on X. If these metrics are locally equal in the sense of the question (i.e. agree on a neighborhood of the diagonal), are they equal? (I feel like this either has an obvious proof or some terrible counter example. It appears to be true on graphs metrized by assigning edge lengths - oops, this is wrong by the cut off metric example.)
4. I (think) I can prove a special case. See motivation section below.


**Motivation:** Let $(N,h)$ be a connected Riemannian manifold, with geodesic distance function $d\_N$. Let $G$ be the group of a covering space action by isometries on $N$, with quotient map $\pi$, with $G$ **finite**. Then $N / G$ inherits a Riemannian metric $g$ by using local trivializations. $N / G$ also inherits a metric, defined by $d([x], [y]) = \inf\_{g \in G} d\_N(gx, y)$. Locally $d = d\_g$ because of local trivializations. I want to know if $d = d\_g$ on all of $N / G$. 


I think this is true if the geodesic distance between any two points in $N$ and $N / G$ is always realized by some shortest path, by using the covering space path lifting + being a geodesic is a local condition + isometry of covering actions in order to relate shortest paths in $N$ to those in $N / G$. That is, if $g$ minimizes $d(gx, y)$ let $\gamma : [0,1] \to N$ be a shortest path in $N$ between $gx$ and $y$. Then $\pi( \gamma)$ is a (potentially self intersecting) geodesic, of the same length as $\gamma$, connecting $[x]$ and $[y]$. Hence $d\_g \leq d$. On the other hand, if we have a geodesic path $\gamma$ from $[x]$ to $[y]$, we can lift it to a geodesic from $x$ to $hy$ of the same length, for some $h \in G$, and hence $d\_g \geq d$.


I would like to be able to drop this condition about there always being shortest path witnesses to shortest distances (I mean that the inf in geodesic distance is achieved). I think that maybe in this covering space case one can achieve this by taking a sequence of paths approximating the geodesic distance, but the argument starts to get a lot fuzzier, and I am already outside my comfort zone and procrastinating on my actual work as it is...


I would appreciate a reference for either the main question or the motivation.



If a (distance) metric on a connected Riemannian manifold locally agrees with the Riemannian metric, is it equal to the induced metric?
The answer is no. Take any non-convex region in the plane, and let the Riemannian metric be the ordinary Euclidean metric $ds^2=dx^2+dy^2$. Then define the new metric as the infimum of Euclidean diameters of curves connecting $a$ to $b$. This new metric coincides with the Riemannian metric locally, but does not coincide globally. This metric even has a name: Mazurkiewicz metric. 


One can also construct a compact example by taking $M$ to be a ramified covering of the sphere, and pullback of the spherical metric. This Riemannian metric in general does not coincide with the Mazurkiewicz metric corresponding to it. (Diameter used in the definition is the diameter of the projection of the curve on the sphere. Projection of the Riemannian-shortest path on $M$
can have small diameter but large length).


In general, any distance $d$ which locally coincides with the Riemannian distance $d\_R$ must satisfy $d\leq d\_R$. Just break the curve on which the Riemannian distance is (almost) achieved into small pieces, and use the triangle inequality for $d$. 


