How to show there exist a unique $x_o$ in X such that f($x_o$)=$x_o$? Let $(X, d)$ be a compact metric space. Let $f:X\rightarrow X$ be such that  $d(f(x), f(y)) < d(x, y)$ for all $x, y\in X$ with $x$ not equal to $y$. Show that $f$ has a fixed point, that is, there exists $x_0\in X$ such that  $f(x_0) = x_0$. Is the fixed point unique?
My work: first i prove that $f$ is uniformly continuous on $X$ and if possible $f(x) \neq x$ for all $x \in X$
Considering a function $x\rightarrow d(x,f(x))$. Then i showed that this function is continuous by sequential criteria of continuity. Since it is continuous on a metric space then it is also uniformly continuous and attains it's infimum at some point $x_1 \in X$ so $d(x_1,f(x_1))>0$. But after that I cannot proceed. I think it will contradict the given condition. But ran out of ideas how to show that.
 A: We can actually construct a fixed point by repeatedly applying $f$ to the set $X$ and taking the limit. Here‘s a sketch.
Let $Y\subset X$. The condition that $d(f(x),f(y))<d(x,y)$ implies that the image $f(Y)$ of $Y$ cannot equal $Y$ (the diameter is finite because the set is bounded, and the diameter must shrink when $f$ is applied). Therefore we have $f(Y)\subset Y$ for any subset $Y$ of $X$.
This implies that
$$X\supset f(X)\supset f(f(X))\supset f(f(f(X)))\supset ...$$
In this sequence of sets, let us denote the nth set by $X_n$ so that $X_0=X$, $X_1=f(X)$, and so on. We have that $X_{n+1}\subset X_n$, and all $X_n$ are nonempty.
Notice that any point inside of the set
$$\bigcap_{n=0}^\infty X_n$$
is a fixed-point of the function $f$. We should be able to construct such a point by taking the limit of a converging sequence of points $(x_0,x_1,x_2,...)$ with $x_n\in X_n$. We know that the limit point will be an element of $X$ because it is compact (and therefore closed).
Did I miss anything? I may have skipped some steps, so maybe people can help me clean up this proof in the comments.
