Suppose that $X$ is a compact metric space, $T:X \to X$ is a surjection. Besides,$\forall x,y\in X$, $$d(Tx,Ty)\leq d(x,y).$$ Show that $T$ is an isometry.
The conclusion seems to be correct. But I just can prove that $\inf\{d(x,Tx):x\in X\}$ can attain its infimum. It seems that if there exist $x,y\in X$ such that $d(Tx,Ty)<d(x,y)$, then $ T$ would not be surjection. But I don’t know how to illustrate it in details.
Or maybe this conclusion is false. However,I also cannot give a counter-example.
It's true. See proof in, for example, "A Course in Metric Geometry" by Burago, Ivanov, theorem 1.6.15.
If you want to find proof by yourself (it's not trivial, but I think possible) - hint: take some points $p$ and $q$ s.t. $d(Tp, Tq) < d(p, q) - 5\cdot \varepsilon$, take some $\varepsilon$-net $S$ with $n$ elements s.t. $\sum\limits_{x,y \in S} d(x, y)$ is minimum possible, check what is this sum for $TS$, take $x, y \in S$ s.t. $d(x, p) \leqslant \varepsilon$, $d(y, q) \leqslant \varepsilon$ and find lower bound for $d(x, y)$ and upper bound for $d(Tx, Ty)$.