Fixed point of a bounded map in compact metric space The following is an exercise from Linear Analysis by Bollobas.
Let $f:X\to X$, with $X$ a compact metric space. Suppose that for every $\epsilon>0$, there is a $\delta=\delta(\epsilon)$ such that if $d(x,f(x))<\delta$ then $f(B(x,\epsilon))\subset B(x,\epsilon)$. Let $x_0\in X$ and define $x_n=f(x_{n-1})$ for every $n\ge 1$. Show that if $d(x_n,x_{n+1})\to 0$ as $n\to \infty$ then the sequence converges to a fixed point of $f$.
My attempt: So compactness implies completeness, so this sequence has a limit $x$. On the other hand, for any $\epsilon>0$ there is $N$ so that whenever $k>N$, $d(x_k,x)<\epsilon$ and $d(x_k,f(x_{k}))<\delta\epsilon$.  Then since $x$ is in an $\epsilon$-ball around $x_k$ and $x_k$ satisfies the necessary condition, $f(x)$ must also be in the $\epsilon$-ball about $x_k$. Thus $d(x_k,f(x))<\epsilon$, and so we see that $x_k\to f(x)$ as well, and therefore we must have $x=f(x)$.
Did I do something wrong? I don't seem to have used the full strength of compactness anywhere...
 A: My first thought is to say that on a compact space, every sequence has a convergent sub-sequence.
In which case $d(x_{n_{k}},x) <\epsilon$
d($f\circ f\circ ...f\circ (x_n),x_{n_k})<\epsilon$ for some number of repetitions.
What I haven't been able to prove to myself is, would it be possible for f(x) to step away from $x_{n_k}$ for a sequence of steps, and step back to it, and have each step be decreasing.
A: $X$ is compact, so given any such sequence $(x_i)$, we can take a convergent subsequence $(x_{i_j})$ that converges to some $x\in X$. Now, take any $\epsilon>0$. By convergence there is some $N$ such that whenever $l>N$, $d(x,x_{i_l})<\epsilon$. Now by hypothesis there is $M$ such that whenever $k>M$, $d(x_k,x_{k+1})<\delta(\epsilon)$. Hence there is some sufficiently large $L$ such that whenever $m>N$ and $i_m>M$, $f(x)$ is inside the $\epsilon$-ball about $x_{i_m}$. Thus $x_{i_j}$ converge to $f(x)$, and so $f(x)=x$.
Now, $x$ trivially satisfies $d(x,f(x))<\delta(\epsilon)$, so for any arbitrary $\epsilon$, there is $x_{i_j}$ such that $d(x_{i_j},x)<\epsilon$, and thus $f(x_{i_j})=x_{i_j+1}$ is inside the $\epsilon$-ball about $x$. In fact this continues to hold for all $f^n(x_{i_j})$, or equivalently, every $x_m$ with $m>i_j$. Hence the $x_i$ converge to $x$ as well.
