Metric Spaces and Continuity Problem: Let $(X,d)$ be a compact metric space and let $f: X \to X$ be a function with the following property: There exists some $0<c<1$ so that $d(f(x),f(y)) \leq cd(x,y)$
for all $x,y \in X$. Prove that $f$ is continuous. Furthermore, let $x\in X$ and consider the sequence $f(x), f(f(x)), ... $. Prove this sequence is Cauchy.
Below are definitions from Rudin that I am using:
Definition: Suppose $X$ and $Y$ are metric spaces, $E \subset X, p\in E,$ and $f$ maps $E$ into $Y$. Then $f$ is continuous at $p$ if for any $\epsilon >0$ there exists $\delta >0$ such that $d_Y (f(x),f(p)) < \epsilon$ for all points $x \in E$ for which $d_X (x,p) < \delta$. If $f$ is continuous at every point of $E$, then $f$ is continuous on $E$.
Definition: Let $(X,d)$ be a metric space. A sequence $\left \{ x_n \right \}$ with the following property is called a Cauchy sequence: For any $\epsilon >0$ there exists $N \in \mathbb{N}$ such that $d(x_m,x_n) < \epsilon$ whenever $m,n \geq N$.
My Attempt: I'm struggling with this problem and don't think I'm thinking in the correct direction, so I'm open to any advice/ideas that anyone has. I will put what I have for the first part of the proof (I don't have an idea of what to do for the second part): Let $\epsilon >0$ be given, and let $p \in E$. We must find $\delta >0$ such that $d(f(x),f(p)) < \epsilon$ whenever $x \in E$ and $d(x,p) < \delta$. Set $\delta = \frac{\epsilon}{c}$. It follows that if $d(x,p) < \delta$ then $d(f(x),f(p)) \leq cd(x,p) < c \frac{\epsilon}{c} = \epsilon$. Hence, $f$ is continuous.
 A: So if $d_X(f(x), f(y)) < cd_X(x, y)$, and $0 < c < 1$, this tells you that the distance is shrinking between your points when you apply your function.
So $f(x)$ and $f(f(x))$ satisfy $d_X(f(x), f(f(x))) < cd_X(x, f(x))$, and the intuition is that your points will get closer and closer together because of the way $c$ was chosen. How does this relate to the definition of being Cauchy?
For the continuity aspect of the proof, given an $x \in X$ and  $d_X(f(x), f(y)) <\epsilon$, how can you choose $y \in X$ so that $cd_X(x,y) < \epsilon$? What should this tell you about how to choose $\delta$?
A: For the first part, we can simply use the definition of continuity. That is $\forall\epsilon > 0$, we must find a delta, such that $d(x,y) < \delta$ implies $d(f(x),f(y))$. Looking at the way the function has constructed, it is apparent that we can pick $\epsilon/c$ as this delta for every epsilon, so the function is continuous, and further uniformly continuous(the choice of delta is independent from the value. 
For the second part, lets call the sequence $x_n$ = $f^n(x)$, where I am using $f^n(x)$ to denote the function being applied $n$ times.I'll restate the definition of cauchy so that we know what we need to prove. We need to show that $\forall\epsilon > 0$, there exists some $N$ such that whenever $n,m > N$, we have $d(x_n,x_m) < \epsilon$.
Also, let's notice a pattern in $x_n$ by doing some simply experimental work. Let's try to find the $d(f^{52}(x), f^{40}(x))$. We know that $d(f^{52}(x), f^{40}(x)) < c \times d(f^{51}(x), f^{39}(x))$. So, we can then just continue inductively downward until we get to a point where we hit a lone x. i.e $d(f^{52}(x), f^{40}(x)) < c^{40} \times d(f^{12}(x), (x))$. Now, we can see what we need to do, since $0 < c < 1$. We can simply make the power of c super huge so that the product will always be less than epsilon. Also note the function is on a compact metric space, so therefore it achieves a maximum and minimum and hence bounded so the $d(x, f^n(x))$, has a finite maximum value call it $M$, and you can always make $c^x$ so large as to make the product very small. You can write out the cauchy proof more formally, but that should be the basic idea
