Let $ (X,d) $ be a compact metric space and $ f:X\to X $ a function with $ d(f(x),f(y))<d(x,y) $ for all $ x,y\in X $ with $ x\neq y $. I have the function $ g:X\to \mathbb{R}, x\mapsto d(f(x),x) $ which is Lipschitz-continuous. So $ g $ has a minimum which means there exists $ x'\in X $ with $$ \min\limits_{x\in X}\{g(x)\}=g(x')=d(f(x'),x')\geq 0. $$
I assume $ g(x')>0 $. I want to strive for a contradiction disprove this. How can I do this?