Let $f:X \to X$ be a function on a compact metric space $(X,d)$ such that
$d(f(x),f(y)) < d(x,y)$ for all $x\neq y$
a) If $g:X \to [0,\infty)$ is defined by $g(x)=d(x,f(x))$, prove that $g$ is uniformly continuous on $X$.
b) Prove that $f$ has a unique fixed point in X.
My attempt:
a) We must show that $g$ is uniformly continuous on X. Let $g:X \to [0,\infty)$ be defined by $g(x)=d(x,f(x))$
Choose $\epsilon>0$. Set $\delta=\epsilon/2$.
Then, let $\delta>0$ such that $d(x,y)<\delta$, we have
|$g(x)-g(y)$| = $d(x,f(x))-d(y,f(y))$
=$||x-f(x)|-|y-f(y)||$
$=||x-f(x)+f(x)|-|y-f(y)+f(y)||$
$\leq|(|x-f(x)|+f(x))-(|y-f(y)|+f(y))|$
However, I'm stuck in this step,
what I need to do is to somehow make the following inequality
|$g(x)-g(y)| < d(x,y) + d(f(x),f(y))$
which would lead to
$< 2d(x,y) < 2\delta \leq 2(\epsilon/2) \leq \epsilon$
However, I can't seem to get pass the above step. Any help or suggestions would be greatly appreciated.
For (b) We must show that there exists a unique fixed point $x \in X$ s.t. $f(x) = x$, i.e. such that $g(x) = 0$
I know that by compactness there exists a $z \in X$ such that $inf_{x \in X} g(x) = g(z)$ by Theorem. So existence of this x is given by compactness and continuity, however, I'm stuck following this. I know I still need to prove uniqueness as well, but does the previous statement serve as a proof for existence?
Any help would be greatly appreciated.
Note that $f$ is continuous as $$x_n\rightarrow x\implies d(x_n,x)\rightarrow 0\implies d(f(x_n),f(x))\rightarrow 0$$ as $d(f(x),f(y))≤d(x,y)$. Next note that $d:X×X\rightarrow [0,\infty)$ is continuous , therefore $$x_n\rightarrow x\implies (x_n,f(x_n))\rightarrow (x,f(x))\implies d(x_n,f(x_n))\rightarrow d(x,f(x)).$$ Hence $g$ is continuous. Compactness of $X$ implies $g$ is uniformly continuous.
Let if possible $$g(a)=inf_{x\in X} d(x,f(x))>0\implies d(a,f(a))>0\implies a\not =f(a)\implies d(f(a),f(f(a)))<d(a,f(a))\implies g(f(a))<g(a)=inf_{x\in X} g(x),$$ contradiction. Hence $g(a)=0\implies$ $f$ has a fixed point, namely $a$.
Let $b$ be a fixed point of $f$ and $a\not= b$ , then $d(a,b)>0$ and $$d(f(a),f(b))=d(a,b)<d(a,b),$$ contradiction. So $f$ has unique fixed point.
Another way of proving uniform continuity of $g$ is given below :--
$$g(x)=d(x,f(x))≤d(x,y)+d(y,f(y))+d(f(y),f(x))≤2d(x,y)+g(y)\implies |g(x)-g(y)|≤2d(x,y),\forall x,y\in X.$$ The last inequality follows from interchanging the role of $x,y$ and $d(x,y)=d(y,x)$.