Show that $f$ is discontinuous at $c \in (a, b)$ if and only if ... I would like to prove the following:
"Suppose $f$ is a bounded function on $[a, b]$. Show that $f$ is discontinuous at $c \in (a,b)$ if and only if $\exists n \in \mathbb{N}$ s.t. $$\sup_{x \in I}f(x) - \inf_{x \in I}f(x) > 2^{-n}$$ for every interval $I$ contained in $[a, b]$ having $c$ in its interior.
So I am trying to prove $[\Rightarrow]$ first. So I supposed $f$ is discontinuous at $c$, which means $\exists \epsilon >0$ so that $\forall \delta >0$, $|x - c| < \delta$ and $x \in [a, b]$ implies $|f(x) - f(c)| \geq \epsilon$. But I need a little bit of push forward from here. Can I get some help? Thanks.
 A: For all $\delta>0$, and all $x\in I_{c,\delta} = (c-\delta, c+\delta) = I$, we have
$$
\inf_{u\in I} f(u) \le f(x), f(c) \le \sup_{u\in I} f(u),
$$
so
$$
\lvert f(x) - f(c)\rvert \le \sup_{u\in I} f(u) - \inf_{u\in I} f(u).\tag{1}
$$
Because $f$ is discontinuous at $c$, there's some $\varepsilon>0$ such that for every $\delta>0$, there is $x\in I_{c,\delta} = I$ such that
$$
\varepsilon \le \lvert f(x) - f(c)\rvert.\tag{2}
$$
Thus, by (2) and (1),
$$
\varepsilon \le \sup_{u\in I} f(u) - \inf_{u\in I} f(u),\tag{3}
$$
for every open interval $I$ centered at $c$. 
Clearly, then, this holds for every interval $J$ with $c$ in its interior: given such a $J$, there is $\delta>0$ such that $I = I_{c,\delta} \subseteq J$, so we have $\inf_{u\in J} f(u)\le \inf_{u\in I} f(u)\le \sup_{u\in I} f(u)\le \sup_{u\in J} f(u)$; therefore,
$$
\sup_{u\in I} f(u) - \inf_{u\in I} f(u) \le \sup_{u\in J} f(u) - \inf_{u\in J} f(u),\tag{4}
$$
hence by (3) and (4),
$$
\varepsilon \le \sup_{u\in J} f(u) - \inf_{u\in J} f(u).
$$
Now take $n$ large enough that $2^{-n} < \varepsilon$.
A: You have that there exists some $\epsilon$ such that for all $\delta>0$, $|x-c|<\delta$ and $x\in [a,b]$ implies $|f(x)-f(c)|\geq \epsilon$.  Now, $$\mbox{sup}_{x\in I}f(x)\geq \mbox{sup}_{x\in [c-\delta,c+\delta]}f(x)\geq f(c)$$ and $$\mbox{inf}_{x\in I}f(x)\leq \mbox{inf}_{x\in [c-\delta,c+\delta]}f(x)\leq f(c)$$ which implies that $$\mbox{sup}_{x\in I}f(x)-\mbox{inf}_{x\in I}f(x)\geq \mbox{sup}_{x\in [c-\delta,c+\delta]}f(x)-\mbox{inf}_{x\in [c-\delta,c+\delta]}f(x)$$ $$\geq\mbox{sup}_{x\in [c-\delta,c+\delta]}f(x)-f(c)+f(c)-\mbox{inf}_{x\in [c-\delta, c+\delta]}f(x)\geq 2\epsilon$$ This is because we have assumed that $|f(x)-f(c)|\geq \epsilon$ for $\textit{all}$ $x\in [c-\delta,c+\delta]$, so certainly it is true for the $x_{sup}$ where $f$ achieves its supremum in the compact interval $[c-\delta,c+\delta]$, and similarly, it is true for the $x_{inf}$ where $f$ achieves its infimum on the compact interval $[c-\delta,c+\delta]$.  Indeed, note that $$\mbox{sup}_{x\in [c-\delta,c+\delta]}f(x)-f(c)=|f(x_{sup})-f(c)|$$ and that $$f(c)-\mbox{inf}_{x\in [c-\delta,c+\delta]}f(x)=|f(x_{inf})-f(c)|$$  Now, we would like to pick $n\in \mathbf{N}$ so large that $2^{-n}<2\epsilon$.  This is certainly possible: take $n:=\log_{2}(\frac{1}{2\epsilon})+1$.
