If $f:X\to \mathbb R$ is a continuous mapping, then it maps cauchy sequences into cauchy sequences. 
Let $(X,d)$ be a compact metric space. Is the following statement true?


If $f:X\to \mathbb  R$ is a continuous mapping, then it maps cauchy sequences into cauchy sequences.

I think this statement is incorrect. Consider $X=[0,1]$ and $d=|x-y|$, then $(X,d)$ is a compact metric space. Now, consider the function $f(x)=\frac{1}{x}$, which is continuous and consider the sequence $x_n=\frac{1}{n}$. Then $x_n$ is cauchy sequence in $X$, but $f(x_n)=n$ in $\mathbb R$ is a diveregent sequence, hence not cauchy.
Is my argument correct? Also, if it is true can you please prove it.
 A: Let $\{x_n\}$ be a cauchy sequence in $X$. Since $X$ is complete, let $x_n \to x$. Now, since $f$ is continuous, $f(x_n) \to f(x)$, which implies $\{f(x_n)\}$ is cauchy.
A: Since $f$ is continous and $X$ a compact metric space $f$ is uniformly continuos.
Let $\epsilon>0$ be given.
There is a $\delta >0$ s.t. $|x-x'|<\delta$
implies $|f(x)-f(x')|<\epsilon.$
Since $x_n$ is Cauchy there is a $n_0$ s.t.
$|x_n-x_m|<\delta$ for $m\ge n\ge n_0$
implies $|f(x_n)-f(x_m)| < \epsilon,$ i. e.
$f(x_n)$ is Cauchy.
A: There is the following interesting parallelism.
While a continuous function between metric spaces transforms convergent sequences into convergent sequences, a uniformly continuous function between metric spaces transforms Cauchy sequences into Cauchy sequences.
Indeed, let $(X,d), (X',d')$ be metric spaces, and $\;f : X\to X'\;$ a unifomly continuous function. Then, along the lines of what Peter Szilas already observed,
$$ \forall\,\epsilon>0,\;\exists\,\delta>0\; \text{ s.t. }\; d(x,y)\leq \delta \;\implies\; d'(f(x),f(y))\leq \epsilon, \tag{*}\label{formula}$$
and therefore, if $(a_n)$ is a Cauchy sequence in $X$, as
$$ \forall\,\epsilon>0,\;\exists\,\nu\in\Bbb N \;\text{ s.t. }\; k,h\geq\nu \;\implies\; d(a_k,a_h)\leq\delta, $$
it follows, by $\eqref{formula}$:
$$ \forall\,\epsilon>0, \,\exists\,\nu\in\Bbb N \;\text{ s.t. }\;k,h\geq\nu\;\implies\; d'(f(a_k),f(a_h))\leq\epsilon,\qquad \text{q.e.d.} $$
In your case, just note that a continuous function defined on a compact set is uniformly continuous.
