TITLE: proof that an alternative definition of limit is equivalent to the usual one
QUESTION [5 upvotes]: How to prove the following theorem? 

Let $I \in R$ be an open interval, let $c \in I$, and let $f: I-{c} \rightarrow R$ be a function. Then $\lim \limits_{x \rightarrow c} {f(x)}$ exists if for each $\epsilon > 0$, there is some $\delta > 0$ such that $x,y \in I$ and $\vert x-c \vert < \delta$ and $\vert y-c \vert < \delta$ implies $\vert f(x)-f(y) \vert < \epsilon$.

I think this needs standard limit definition, sup and inf properties to prove. And I came up with a following scratch of proof:
(1) Suppose for each $\epsilon >0$, there is some $\delta >0$ such that $\vert x-c \vert < \delta$ and $\vert y-c \vert < \delta$ implies $\vert f(x)-f(y) \vert < \epsilon$. For each $r>0$, let $A_r$ = $I \bigcap (c-r,c+r)$. Then, for each $\epsilon>0$, there is some $\delta>0$, such that $x,y \in A_\delta$ implies $\vert f(x)-f(y) \vert < \epsilon$. Then I want to show there is some $a>0$ such that $f(A_a)$ is bounded.
(2) If $f(A_a)$ is bounded, then for each $s \in (0,a)$, $f(A_s) \subseteq f(A_a)$, and thus $f(A_s)$ is bounded. Define $a_s = \mathrm{glb}~f(A_s)$ and $b_s = \mathrm{lub}~f(A_s)$. Let $A = \{a_s \mid s \in (0,a)\}$ and $B=\{b_s \mid s \in (0,a)\}$. Then we know that A has a least upper bound and B has a greatest lower bound, and $\mathrm{lub}(A) \leq \mathrm{glb}(B)$. Now I want to show $\mathrm{lub}(A) = \mathrm{glb}(B)$
(3) If I could show $\mathrm{lub}(A) = \mathrm{glb}(B)$, let $M=\mathrm{lub}(A) = \mathrm{glb}(B)$, I want to show $\lim \limits_{x \rightarrow c} {f(x)} = M$.
Can someone give me some help on how to prove (1) (2) (3), $f(A_a)$ is bounded, $\mathrm{lub}(A) = \mathrm{glb}(B)$, and $\lim \limits_{x \rightarrow c} {f(x)} = M$? Thanks!

REPLY [6 votes]: Regarding your "scratch of proof". 
(1) To show there is an $a$ such that $f(A_a)$ is bounded (and therefore, $f(A_b)$ is bounded for all $b\leq a$), simply pick $\delta$ that "works" for $\epsilon=1$. Now fix $x\in A_{\delta}$, and let $M = f(x)$. For all $y\in A_{\delta}$, you know that $|f(x)-f(y)|\lt 1$, hence 
$$|f(y)| - |f(x)| \leq |f(y)-f(x)| \lt 1$$
so $|f(y)|\lt 1 + |f(x)| = 1+M$. This shows that $f(A_{\delta})\subseteq [-1-M, 1+M]$, hence $f(A_{\delta})$ is bounded.
I confess that I don't really see how to handle (2) easily.
Alternative way.
Here is a possible way of attacking the problem which is closely related to what you are trying to do, but perhaps a bit easier: try constructing a sequence of points $x_1,x_2,\ldots$, with $x_1\to c$, and such that $f(x_1),f(x_2),\ldots$ is a Cauchy sequence. This will give you a "target" value for the limit, and then you can prove that the limit equals that target.
So: let $\epsilon_1 = \frac{1}{2}$. Then there exists a $\delta_1$, and we may assume $\delta_1\lt \frac{1}{2}$, such that $|x-c|\lt \delta_1$ and $|y-c|\lt \delta_1$ implies $|f(x)-f(y)|\lt \epsilon_1$. Take $x_1 = c-(\delta_1/2)$.
Now let $\epsilon_2 = \frac{1}{4}$. There exists a $\delta_2$, and we may assume $\delta_2\lt \min(\frac{1}{4},\delta_1)$, such that $|x-c|\lt \delta_2$ and $|y-c|\lt\delta_2$ implies $|f(x)-f(y)|\lt \epsilon_2$. Take $x_2 = c-(\delta_2/2)$. 
Let $\epsilon_3 = \frac{1}{8}$. Then there exists a $\delta_3$, which we may assume satisfies $\delta_3\lt \min(\frac{1}{8},\delta_2)$, such that $|x-c|\lt\delta_3$ and $|y-c|\lt \delta_3$ implies $|f(x)-f(y)|\lt \epsilon_3$. Take $x_3 = c-(\delta_3/2)$. 
Continuing this way, let $\epsilon_{n+1} = \frac{1}{2^{n+1}}$, and let $\delta_{n+1}\lt \min(\frac{1}{2^{n+1}},\delta_{n})$ be such that if $|x-c|\lt\delta_{n+1}$ and $|y-c|\lt\delta_{n+1}$ then $|f(x)-f(y)|\lt \epsilon_{n+1}$. Let $x_{n+1} = c - (\delta_{n+1}/2)$.
Now we have a sequence of points $\{x_n\}$ in $I$, with $x_n\to c$, and such that $|x_n - c| \lt \frac{1}{2^n}$ for all $n$. 
Consider now the sequence $\{ f(x_m)\mid m=1,2,\ldots\}$. I claim this is a Cauchy sequence. 
Indeed: let $\epsilon\gt 0$. Then there exists a natural number $N\gt 0$ such that $1/2^N \lt \epsilon$. Let $n,m\geq N$. Then $|x_n-c| \lt \delta_{N}$ and $|x_m-c|\leq \delta_N$, so we know that $$|f(x_n)-f(x_m)|\leq \epsilon_N = \frac{1}{2^N}\lt \epsilon.$$
Thus, for every $\epsilon\gt 0$ there exists $N\gt 0$ such that for all $n,m\geq N$, $|f(x_n)-f(x_m)|\lt \epsilon$. Hence, the sequence $\{f(x_n)\}$ is a Cauchy sequence, and therefore has a limit, $L$.
Now, since $x_n\to c$, then if there is a limit for $f(x)$ as $x\to c$, then it will have to be equal to $L$. Prove that this is indeed the limit.