Function maps Cauchy sequences to Cauchy sequences: prove uniform continuity Problem: Let $A$ be a non-empty subset of $\mathbb{R}$ and let $f: A \rightarrow \mathbb{R}$ be a function. We have the following statements:
a) If $(x_n)$ is a Cauchy sequence in $A$, then $f(x_n)$ is a Cauchy sequence in $\mathbb{R}$.
b) For all $M > 0$ the restriction of $f$ to $A \cap [-M,M]$ is uniformly continuous.
Prove the implication $a \Rightarrow b$. 
Attempt: I think I almost found it, but I'm not quite sure yet. Here is my attempt:
Suppose a) holds. Let $M > 0$. Let $ \epsilon > 0$. We need to a find a $\delta > 0$ such that for all $x,y \in A \cap [-M,M]$ with $|x-y| < \delta$ it holds that $|f(x) - f(y)| < \epsilon.$
Choose $\delta = \epsilon/3$. Let $x,y \in A \cap [-M,M]$ and suppose that $|x-y| < \delta$. Then $x,y \in [-M,M]$, and since $[-M,M]$ is closed, there are (Cauchy) sequences $(x_n), (y_n) \in [-M,M]$ such that $(x_n) \to x$ and $(y_n) \to y$. From a), we then also know that $f(x_n)$ and $f(y_n)$ are Cauchy sequences in $\mathbb{R}$. Now, we have that \begin{align*} |f(x) - f(y)| \leq |f(x) - f(x_n)| + |f(x_n) - f(y_n) | + |f(y_n) - f(y)|. \end{align*} Since $f(x_n)$ and $f(y_n)$ are Cauchy sequences, I know I can get the middle term smaller than $\epsilon/3$. But I don't know what to do about the other two terms? Can I assume that $f(x_n) \to f(x)$ and $f(y_n) \to f(y)$? If I do this, then I assume continuity of $f$, while this is not given?
This is the part where I'm stuck. Any help is appreciated!
 A: By contradiction. Assume that there exists $M>0$ such that the restriction of $f$ to $A\cap[-M,M]$ is not uniformly continuous.
Then there exist $\epsilon > 0$ and two sequences $(x_n), (y_n) \subset A$ such that
$$
|x_n - y_n| \to 0, \qquad
|f(x_n) - f(y_n)| \geq \epsilon, \quad \forall n\in\mathbb{N}.
$$
Since $(x_n)$ and $(y_n)$ are bounded and $|x_n - y_n| \to 0$, we can extract a common subsequence (not relabeled) converging to the same point $x$.
Let $(z_n)\subset A$ be the sequence defined by $z_{2n} = x_n$, $z_{2n+1} = y_n$.
Then $(z_n)$ is a Cauchy sequence (converging to $x$) but $(f(z_n))$ is not a Cauchy sequence, since $|f(z_{2n}) - f(z_{2n+1})| \geq \epsilon$ for every $n$.
A: Towards contradiction, assume $f$ is not UC. 
Then, $\exists \epsilon > 0$ s.t. $\forall \delta > 0, \exists x,y \in A$ with $|x-y| < \delta$, but $|f(x)-f(y)| \geq \epsilon$.
Fix $\epsilon > 0$. In terms of sequences $\forall n \in \mathbb{N}, \exists x_n, y_n \in A$ with $|x_n - y_n| < \frac{1}{n}$, but $|f(x_n) - f(y_n)| \geq \epsilon$.
Condition (b) essentially says “consider any bounded subset of $\mathbb{R}$” For simplicity, we just assume $A$ itself started out as a bounded set. 
In particular, this means $(x_n)$ and $(y_n)$ are bounded sequences. By Bolzano-Weierstrass, they both have convergent subsequences $(x_{n_{k}}),(y_{n_{k}})$ respectively. 
But, since $|x_n - y_n| < \frac{1}{n}$ then $|x_{n_{k}}-y_{n_{k}}| < \frac{1}{n_k}$. Since both subsequences are known to be convergent, the relevant limit laws apply. Thus, 
$\lim x_{n_{k}} = \lim y_{n_{k}} = x_0 \in A$.
Now construct a new sequence $a_k = \{x_{n_{1}}, y_{n_{1}}, x_{n_{2}}, y_{n_{2}}, ... \}$. 
Note that if we take a subsequences of odd and then even indices, they are just $(x_{n_{k}})$ and $(y_{n_{k}})$ which converge. So, $(a_k)$ itself converges (can you show this?).
But, by assumption, $|f(a_k) - f(a_{k+1})| \geq \epsilon \ \ \forall k$. Thus $(f(a_k))$ is NOT Cauchy, even though $(a_k)$ was. This contradicts our assumption. 
Thus, $f$ must have been UC to begin with. 
