Let (X,p) be a compact metric space.Suppose that f X->X is a function such that, for all $x_1$,$x_2$ $\in$X, if $x_1\neq x_2$ then p(f($x_1$),f($x_2$))<$p($x1$,$x2$)$. Prove that there exists a unique point y which in X such that f(y)=y. (there is a hint below the question:Consider the function g:X->R defined by setting g(x)=p(x,f(x)).)
this is my thought: I know g(X) should be a closed and bounded set in the real numbers, since X is compact. so m<=g(X)<=M, if m=0, it's obvious that there exists a x in X such that f(x)=x, but if m>0, I want to prove if m>0, then X cannot be a compact set, I am trying to find an open covering which there are no finite open sets which can cover X. If I can find such an open covering, then I think I will finish the question, but I don't know how to find it. Can someone help me to find it. Or, can someone have other methods to solve this question? I am struggling with it, and have no idea how to continue? Hope someone can help me solve this question!