# $f$ continuous at point if and only if $\lim\limits_{k\to\infty}(\sup(f)-\inf(f))=0$ on diminishing set $N_k$

Let $\emptyset \ne A\subset \mathbb{R}^n$ and let $f:A\to \mathbb{R}$ be a bounded function. Fix a point $a\in A$ and denote, for $k\ge 1$, $N_k:=A\cap B(a; 1/k)$. I want to prove the following:

$$f \text{ is continuous at } a \text{ if and only if }\lim\limits_{k\to\infty}\left(\sup\limits_{N_k}\{f\}-\inf\limits_{N_k}\{f\}\right)=0.$$

My approach:

(=>): Suppose $f$ is continuous at $a$, then $f$ is sequentially continuous, so that $\lim\limits_{k\to\infty} f(x_k)=f(a)$ for some sequence $(x_k)$ converging to $a$. Now, $\lim\limits_{k\to\infty} N_k = \{a\}$, so that $\lim\limits_{k\to\infty}\sup\limits_{N_k}(f)=f(a)=\inf\limits_{N_k}(f)$, thus $\lim\limits_{k\to\infty}\left(\sup\limits_{N_k}\{f\}-\inf\limits_{N_k}\{f\}\right)=f(a)-f(a)=0$.

(<=): Suppose that $\lim\limits_{k\to\infty}\left(\sup\limits_{N_k}\{f\}-\inf\limits_{N_k}\{f\}\right)=0$. Then $\lim\limits_{k\to\infty}\left(\sup\limits_{N_k}\{f\}-\inf\limits_{N_k}\{f\}\right)=\lim\limits_{k\to\infty}\sup\left\{ \left| f(x)-f(y) \right|:x,y\in N_k \right\}$ $=\lim\limits_{x,y\to a}\sup\{\left| f(x)-f(y) \right|:x,y\in A\}=\lim\limits_{x\to a}\sup\{\left| f(x)-f(a) \right|:x\in A\}$

$\implies \lim\limits_{x\to a} \sup\{f(x)\}=f(a)\implies \lim\limits_{x\to a} f(x) = f(a)$. Hence, $f$ is continuous at $a$.

I'm not completely sure if I built my proof well enough from the analysis formalism viewpoint, so I would appreciate your insight and comments. Please let me know if my proof appears to be OK.

$\sup\limits_{N_k}\{f\}\geq f(a) \geq\inf\limits_{N_k}\{f\} \ \ \ \forall k$

$\lim\limits_{k\to\infty}\sup\limits_{N_k}\{f\}\geq f(a) \geq\lim\limits_{k\to\infty}\inf\limits_{N_k}\{f\}$

Start with some $\epsilon>0$. Given the limits on the difference between sup and inf we know that for this $\epsilon$, there exists $N$ such that for all $k\geq N$, $\sup\limits_{N_k}\{f\}-f(a)<\epsilon$ and $f(a)-\inf\limits_{N_k}\{f\}<\epsilon$. (kind of like a sandwich argument)

Now, $|f(x)-f(a)|\leq \max(\sup\limits_{N_k}\{f\}-f(a), f(a)-\inf\limits_{N_k}\{f\})$

Now put delta equal to the saze of the interval and that completes the proof. I think you have the same thing in mind, maybe mine looks slightly cleaner?

• If I'm correct, the principal difference is that you use "$\varepsilon-\delta$" and I use limits instead. In your proof, I didn't get what to do with this $\delta$, since we'll have this: $\delta:=\max(\cdot)$ will imply that, say, $|\sup{f}-f(a)|=\delta\implies |f(x)-f(a)|\le \delta$, but we need $|x-a|<\delta$ I think. – sequence May 16 '17 at 2:07
• I find mine easier to understand. :) And maybe I am biased. In my proof, $\delta = 1/N$, but, was that your question? – Juanito May 16 '17 at 3:47
• Your proof is for the (<=) direction, and it's definitely cleaner than mine for this direction. In fact I've spotted an error in mine. – sequence May 17 '17 at 0:26
• Oh, for the other direction, I think you have the right approach, sorry, but I did not mention it. For the direction I did, I did not find any obvious mistakes in your proof, where do you think you might have erred? – Juanito May 17 '17 at 2:15
• Exactly, I felt all your steps are possibly true, but one needs to put in some effort to show them formally. – Juanito May 17 '17 at 3:30