This was a problem that the Professor went over in class, but I am having trouble understanding and finishing the proof. The full question is:
$f:I \rightarrow \mathbb R$ is continuous at $x_0 \in I$ if and only if for any monotonic sequence $x_n$, with $x_n \rightarrow x_0$ we have $f(x_n) \rightarrow f(x_0)$
This is his solution (I'll mention where I am confused):
We know that for every monotonic sequence $$(x_n) \rightarrow x_0, f(x_n) \rightarrow f(x_0)$$ Want to show that $$x_n \rightarrow x_0 \implies f(x_n) \rightarrow f(x_0) $$ for any $x_n$. With $x_n \rightarrow x_0$ we know there exists a monotonic convergent subsequence, $$x_{n_k} \rightarrow x_0 .$$ Now we want to show $\{f(x_n)\}_n$ is Cauchy.
(Where did this come from? Why does this need to be shown? From what I understand, $\{f(x_n)\}_n$ is a subsequence of the function $f$? Or would this technically be called a subfunction? I don't know if there is such a thing)
For any $\epsilon > 0, \exists N_{\epsilon}$ such that $$|f(x_m)-f(x_n)|<\epsilon \quad for \quad m,n>N_{\epsilon} $$ If not, $\exists \epsilon_0, \forall N\in \mathbb R$ such that $$|f(x_m)-f(x_n)|\geq \epsilon \quad for \quad some \quad m,n>N$$
I am supposed to finish the proof by showing that $\{f(x_n)\}_n$ is Cauchy, but I am not sure how to do this and don't know where to begin. Sorry if the question involves a lot of explaining, it isn't a homework problem to be turned in but I need to understand what is going on (if I can show it is Cauchy, however, I do get a bit of extra credit, so please don't give me the answer off the bat).
Thanks for any help! This function\continuity chapter really has me scratching my head.
I have a proof of the result here, not via Cauchy. It appeals to this lemma:
Proof: see this thread, and recall that compactness is not needed, as shown by Ragib Zaman's answer.
We take any sequence $x_n$ converges to $x$, then take any subsequence of $x_n$, call it $x_{n_k}$, then $x_{n_k}$ has a monotone subsequence $x_{n_{k_l}}$, such that $f(x_{n_{k_l}})$ converges to $f(x)$
Then for consider $f(x_n)$ for any sequence $x_n$ converging to $x$, for any subsequence $f(x_{n_k})$, it has a sub-subsequence $f(x_{n_{k_l}})$ converges to $f(x)$. Now we use the lemma, we have shown $f(x_n)$ converges to $f(x)$, for any choice of sequence $x_n$ converging to $x$.