Is an expanding map on a compact metric space continuous? I got inspired by this question Existence of convergent subsequence to think about the following problem: Suppose you have a compact metric space $(X,d)$ and an expanding map $T:X\rightarrow X$, i.e. $d(Tx,Ty)\geq d(x,y)$ for every $x,y\in X$. Is the map $T$ then continuous?
Without assuming continuity we already know that $T^n(X)$ must be dense in $X$ for any $n\geq 1$, since given $z\in X$ the orbit of $z$ must accumulate upon $z$. But showing continuity has escaped me so far. If there are counter-examples using the Axiom of Choice that also interests me.
 A: Such a map $T$ must in fact be an isometry.  Indeed, given $x,y\in X$, let $x_n=T^n(x)$ and $y_n=T^n(y)$.  By compactness, we can find $n_k$ such that both $(x_{n_k})$ and $(y_{n_k})$ converge, and by passing to a further subsequence we may assume $n_{k+1}-n_k$ is increasing.  Setting $m_k=n_{k+1}-n_k$, we then find as in your answer to the linked question that $(x_{m_k})$ converges to $x$ and $(y_{m_k})$ converges to $y$.  In particular, $d(x_{m_k},y_{m_k})$ must converge to $d(x,y)$.  But as long as $m_k>0$, $d(x_{m_k},y_{m_k})\geq d(T(x),T(y))$.  It follows that we must have $d(T(x),T(y))\leq d(x,y)$.
(By compactness of $X$ and your observation that $T(X)$ is dense, it follows that $T$ is also surjective.)
A: Question: Let $(X,d)$ be a compact metric space and let  $f:X\to X$ be a map such that $d(f(x),f(y))\geq d(x,y)$ for all $x,y\in X$. Show that $f$ is an isometry onto $X$.
Solution: First we will see that $f$ is an isometry, then that $f$ is onto $X$.
1. Given a (small) $r>0$, let $K_n(r)$ be the set of $n$-tuples $(x_1,...,x_n)$ in $X^n$ such that $d(x_i,x_j) \ge r$ for every $i \ne j$. By compactness of $X$, there is$^*$ (see footnote) a maximal $n$ such that $K_n(r) \ne \emptyset$. We now fix $n$ to take this value.  Since $K_n(r)$ is a closed subset of $X^n$, it is compact, so the continuous function
$$g(x_1,\ldots x_n):= \sum_{i >j} d(x_i,x_j)$$ attains its maximum over $K_n(r)$ at some n-tuple $(x_1^*,\ldots ,x_n^*) \in K_n(r)$.
Write $y_i=f(x_i^*)$ for each $i$, and observe that $(y_1,\ldots,y_n) \in K_n(r)$ and $g(y_1,\ldots,y_n) =g(x_1^*,\ldots ,x_n^*)$; thus we must have $d(y_i,y_j)=d(x_i^*,x_j^*)$ for all $i,j$.
Given $z,w \in X$, maximality of $n$ ensures that there is $i\le n$ such that $d(y_i,f(z)) \le r$, so $d(x_i^*,z) \le r$. Similarly, there is  $j \le n$ such that $d(y_j,f(w)) \le r$, so $d(x_j^*,w) \le r$. We conclude that
$$d(f(z),f(w)) \le d(f(z),y_i)+d(y_i,y_j)+d(y_j,f(w)\le d(x_i^*,x_j^*) +2r $$ $$ \le d(x_i^*,z)+d(z,w)+d(w,x_j^*)+2r \le  d(z,w) +4r\,.$$
Since $r>0$ can be arbitrary,
$$\forall z,w \in X, \quad d(f(z),f(w))   \le  d(z,w) \,.$$
2. If $f$ was not surjective, then $f(X)$ is a closed subset of $X$ and there must exist some $u \in X$ and $r>0$ such that $d(u,f(X))>r$.  Using the notation of part 1, we consider the same $n$, and the $n$-tuples $(x_1^*,\ldots ,x_n^*) \in K_n(r) $ and $(y_1,...y_n) \in K_n(r)$. Then $(u,y_1,\ldots,y_n) \in K_{n+1}(r)$, contradictng the maximality of $n$.
$(*)$ Footnote: By compactness of $X$, it can be covered by finitely many open balls of radius $r/2$, call them $\{B(v_i,r/2)\}_{i=1}^M$. If $(x_1,\ldots x_n) \in K_n(r)$, then each ball $B(v_i,r/2)$ can contain at most one $x_j$, so $n \le M$.
