# $f\colon X\to \mathbb{R}$ is continuous at $a$ iff we have $\lim{f(x_n)}=f(a)$ for every $\{x_n\}_{n\in\mathbb{N}}$ in $X$ with $\lim{x_n}=a$

A function $$f\colon X\to \mathbb{R}$$ is continuous at $$a\in X$$ if and only if we have $$\lim{f(x_n)}=f(a)$$ for every sequence $$\{x_n\}_{n\in\mathbb{N}}$$ in $$X$$ with $$\lim{x_n}=a$$.

Scratch.

($$\Rightarrow$$). As $$f$$ is continuous at $$a\in X$$, then for all $$\varepsilon>0$$ we're going to have an interval $$(f(a)-\varepsilon,f(a)+\varepsilon)$$ such that $$(f(a)-\varepsilon,f(a)+\varepsilon)\cap f[X]\neq \emptyset$$, so $$f(a)$$ is accumulation point for some sequence $$\{y_n\}$$ in $$\mathbb{R}$$.

But how do I proceed from here to show that there's also a sequence $$\{x_n\}$$ in $$X$$ such that $$\lim{x_n}=a$$? In order to be a sequence there, we're going to allow say $$\delta>0$$ to be any value, but $$\delta$$ is dependent on $$\varepsilon>0$$, as the definition of continuity tells us.

And after I do this, how to show that $$\lim{f(x_n)}=f(a)$$? Because although $$f(a)$$ is an accumulation point, it needs to be an accumulation point for the image of $$f$$ with $$\{x_n\}\subset X$$

($$\Leftarrow$$). Again, I'm having a hard time connecting the fact that a sequence $$\{x_n\}$$ in $$X$$ would need an $$\delta>0$$ to be any $$\delta$$ such that there'll be $$N\in\mathbb{N}$$ with $$n>N\implies \left|x_n-a\right|<\delta$$. And this $$\delta$$ will define our $$\varepsilon>0$$...

• You're are misreading the statement you're trying to prove. For $\implies$ you need to prove that " If $f$ is continuous at $a$ then we have $\lim_{n \to \infty} f(x_n) = f(a)$ for any sequence $x_n$ such that $\lim_{n \to \infty } x_n = a$". To prove the statement you must 1. assume that $f$ is continuous at $a$ 2. consider any sequence $x_n$ such that $\lim_{n \to \infty} x_n = a$ and 3. Deduce from 1 and 2 that $\lim_{n\to \infty} f(x_n) = f(x)$ There is no need to show that $x_n$ exists. – Digitallis Nov 18 '20 at 1:30

This is a corollary of a more general result: $$f(x)\to b$$ when $$x\to a$$ iff $$f(x_n)\to b$$ for each $$(x_n)$$ such that $$x_n\to a$$.
($$\Rightarrow$$). Consider $$(x_n)$$ such that $$x_n\to a$$ and $$\epsilon>0$$ arbitrary.
1. Since $$f$$ is continuous, there exist $$\delta>0$$ such that if $$|x_n - a|<\delta$$ then $$|f(x_n) - b|<\epsilon$$.
2. Since $$x_n\to a$$, there exists $$n_0$$ such that if $$n\ge n_0$$, then $$|x_n - a|<\delta$$.
Therefore, there exists $$n_0$$ such that $$n\ge n_0$$ implies $$|f(x_n)-b|<\epsilon$$.
($$\Leftarrow$$). Suppose the $$f(x)\not\to b$$. This means there exists $$\epsilon>0$$ such that for any $$\delta>0$$ there exists $$x_\delta$$ such that $$|x_\delta - a|<\delta$$ and $$|f(x_\delta) - b|\ge \epsilon$$.
In particular, for each $$n\in\mathbb N$$ we may take $$\delta_n = \frac 1n$$ and consider the sequence $$(x_n)$$ given by $$x_n = x_{\delta_n}$$. In this case, $$|x_n - a|<\frac 1n\to0$$ but $$|f(x_n) - b|\ge\epsilon$$ and therefore $$f(x_n)\not\to b$$, which is a contradiction.