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.