Let $(X, d)$ be a compact metric space.


* We say that $\{x\_1, \cdots, x\_n\} \subseteq X$ is an $\varepsilon$-**covering** of $X$ if for any $x \in X$, there exists $i \in \{1, \ldots, n\}$ such that $d(x, x\_i) \leq \varepsilon$. Let
$$
\operatorname{Cov} (X, \varepsilon) := \min \{n: \exists \varepsilon \text {-covering of } X \text { with size } n\}
$$
be the $\varepsilon$-covering number of $X$.
* We say that $\{x\_1, \cdots, x\_n\} \subseteq X$ is an $\varepsilon$-**packing** of $X$ if $d(x\_i, x\_j)\ge\varepsilon$ for all distinct $i, j$. Let
$$
\operatorname{Pack} (X, \varepsilon) := \max \{n: \exists \varepsilon \text {-packing of } A \text { with size } n\}
$$
be the $\varepsilon$-packing number of $A$.


The metric spaces $(X, d)$ and $(X', d')$ are said to be isometric (denoted by $X \cong X'$) if there is a bijective isometry between them. Then we have a theorem.



> 
> **Theorem** Let $(X, d)$ be a compact metric space and $f:X \to X$ be $1$-Lipschitz. Then $f$ is an isometry if and only if $f$ is surjective.
> 
> 
> 


I have found the proof of one direction from [here](https://math.stackexchange.com/q/495648/368425) and the other one from [here](https://math.stackexchange.com/a/2672454/368425), i.e.,



> 
> * $\implies$ Let $f$ be an isometry. Assume the contrary that there is $y \in X$ such that $y \notin Y:= f(X)$. Then there is $\varepsilon>0$ such that $d(y, Y)\ge \varepsilon$. Let $n:= \operatorname{Cov} (X, \varepsilon/2)$. Because $X \cong Y$, we get $n = \operatorname{Cov} (Y, \varepsilon/2)$. Let $C:=\{x\_1, \ldots, x\_n\}$ be an $\varepsilon/2$-covering of $X$. It follows that $y \in C$. Then $C \setminus \{y\}$ is an $\varepsilon/2$-covering of $Y$. Hence $\operatorname{Cov} (Y, \varepsilon/2) \le n-1$. This is a contradiction.
> * $\impliedby$ Let $f$ be surjective. Fix $x, y\in X$ such that $x \neq y$. Fix $\varepsilon>0$ such that $\delta := d(x,y) - \varepsilon/2 > 0$. Let $S$ be an $\varepsilon/4$-covering of $X$ that minimizes the quantity
> $$
> \mathcal N(S) := \operatorname{card} (\{ (s\_1, s\_2) \in S^2 : d(s\_1, s\_2) \ge \delta\}).
> $$
> Because $f$ is $1$-Lipschitz and surjective, $f(S)$ is also an $\varepsilon/4$-covering of $X$. Hence $\mathcal N(f(S)) \ge \mathcal N(S)$. This implies if $s\_1, s\_2 \in S$ with $d(s\_1, s\_2) \ge \delta$, then $d(f(s\_1), f(s\_2)) \ge \delta$. Now we pick $s\_1, s\_2 \in S$ with $d(s\_1,x)\le \varepsilon/4$ and $d(s\_2,y)\le \varepsilon/4$. Then
> $$
> d(s\_1, s\_2) \ge d(x, y)-d(s\_1, x)-d(s\_3, y) \ge d(x, y)- \varepsilon/2= \delta.
> $$
> So $d(f(s\_1), f(s\_2)) \ge \delta= d(x,y) - \varepsilon/2$. The claim then follows by taking the limit $\varepsilon \to 0^+$.
> 
> 
> 


Now let $(X, d)$ and $(X', d')$ be compact metric spaces and $f:X \to X'$ be $1$-Lipschitz.


* Just as in the proof of direction $\implies$ above, if $f$ is an isometry and $\operatorname{Cov} (X, \varepsilon)= \operatorname{Cov} (X', \varepsilon)$ for all $\varepsilon>0$, then $f$ is surjective.
* The proof of direction $\impliedby$ above uses the quantity $\mathcal N(S)$ which looks related to $\operatorname{Pack} (S, \delta)$.


I would like to ask if below statement is true, i.e.,



> 
> If $f$ is surjective and $\operatorname{Pack} (X, \varepsilon)= \operatorname{Pack} (X', \varepsilon)$ for all $\varepsilon>0$, then $f$ is an isometry.
> 
> 
> 


Thank you so much for your elaboration!



If $X,X'$ have the same $\varepsilon$-packing numbers and $f:X \to X'$ surjective $1$-Lipschitz, then $f$ is an isometry
Consider two metrics on $\{x,x',y\}$ defined by
$$|x-y|\_1=|x'-y|\_1=|x-y|\_2=3, \quad |x-x'|\_1=|x-x'|\_2=1, \quad |x'-y|\_2=2.$$
Denote by $X\_1$ and $X\_2$ the corresponding metric spaces.


Note that $\mathrm{pack}\_\varepsilon X\_1\equiv \mathrm{pack}\_\varepsilon X\_2$.
Indeed, for both spaces we have


* $\mathrm{pack}\_\varepsilon=1$ if $\varepsilon>3$,
* $\mathrm{pack}\_\varepsilon=2$ if $3\geqslant \varepsilon>1$, and
* $\mathrm{pack}\_\varepsilon=3$ if $1\geqslant \varepsilon>0$.


The identity map on the set $\{x,x',y\}$ defines an onto short map $X\_1\to X\_2$ which is not an isometry.


