# Does continuity in $(X, d_X)$ imply continuity in $(Y, d_Y)$ when $(X, d_X) \simeq (Y, d_Y)$?

I want to check if my intuition about continuity is correct.

Suppose $(X, d_X)$ and $(Y, d_Y)$ are two metric spaces that are isometrically isomorphic, i.e., there is an isomorphism $h : X \to Y$ with $d_X(x_1,x_2) = d_Y(h(x_1), h(x_2))$ for all $x_1,x_2 \in X$. Let $M \subseteq X \cap Y$ be a common subset of $X$ and $Y$.

Is it true that if a function $f : M \to M$ is continuous in $X$, it is continuous also in $Y$, and vice versa?

In other word: Suppose we have shown, using the $\epsilon$-$\delta$ criterion, that $$d_X(x,y) < \delta \quad\Longrightarrow\quad d_X(f(x), f(y)) < \epsilon.$$ Does this imply that $$d_Y(x,y) < \delta' \quad\Longrightarrow\quad d_Y(f(x), f(y)) < \epsilon',$$ with possibly different $\delta'$ and $\epsilon'$?

### Example

As a more concrete example, consider the function $f : \mathbb{R}_{>0} \to \mathbb{R}_{>0}, \, x \mapsto \frac{1}{\sqrt{x}}$. Then $f$ is continuous in $(\mathbb{R}_{>0}, d_A)$ with distance function $d_A(x,y) = | \ln(x) - \ln(y) |$. Hint: Choose $\delta = \epsilon$ and show that $$\begin{array}{ccccccccccc} \epsilon &=& \delta &>& d_A(x,y) &>& \left| -\dfrac{1}{2} \right| \cdot d_A(x,y) &=& \ldots &=& d_A(f(x), f(y)). \end{array}$$ Now notice that $(\mathbb{R}_{>0}, d_A)$ is isometrically isomorphic to $(\mathbb{R}, d_B)$ with $d_B(x,y) = | x - y |$. Is this fact already sufficient to conclude that $f$ is continuous also in $\mathbb{R}$?

You would also need that there is an isometric isomorphism from $X$ to $Y$ that fixes $M$ (equivalently, $d_X,d_Y$ agree on $M$). Otherwise, the set intersection of $X$ and $Y$ is not very meaningful, since it's changed by a simple relabelling of elements. For instance, for $X=\mathbb R$, you could replace each negative number $x$ with $(0,x)$, and apply some horrible bijection $[0,\infty)$ to relabel the nonnegative numbers, obtaining a metric space $Y$ which is isometrically isomorphic to $\mathbb R$. Then, $X \cap Y = [0,\infty)$, but your statement does not necessarily hold if our horrible bijection was not a homeomorphism; it is mere coincidence that the labelling of these elements coincide in $X$ and $Y$, and they needn't have the same metric space structure.
So if you assume that $d_X,d_Y$ agree on $M$, the statement is trivially true, since then $(M,d_X) = (M,d_Y)$.