Is the set of discontinuity of $f$ countable?

Suppose $f:[0,1]\rightarrow\mathbb{R}$ is a bounded function satisfying: for each $c\in [0,1]$ there exist the limits $\lim_{x\rightarrow c^+}f(x)$ and $\lim_{x\rightarrow c^-}f(x)$. Is true that the set of discontinuity of $f$ is countable?


Hopefully this more tedious proof is more illustrative...

In light of the assumptions on $f$, there are two ways that $f$ can fail to be continuous: (1) the left and right hand limits differ, or (2) the limits are equal, but the function value differs from the limit (thanks to @GEdgar for pointing this out).

Let $\epsilon>0$ and $\Delta_\epsilon = \{ x |\, |\lim_{y \downarrow x}f(y) - \lim_{y \uparrow x}f(y)| \geq \epsilon \}$. If $\Delta_\epsilon$ is not finite, then since $[0,1]$ is compact, there exists an accumulation point $\hat{x} \in [0,1]$. Let $c_+ = \lim_{y \downarrow \hat{x}}f(y), c_- = \lim_{y \uparrow \hat{x}}f(y)$. (Note that it is possible that $c_- = c_+$.) By assumption, there exists some $\delta>0$ such that for $y \in (\hat{x}-\delta,\hat{x})$, $|f(y)-c_-| < \frac{\epsilon}{4}$ and for $y \in (\hat{x}, \hat{x}+\delta)$, $|f(y)-c_+| < \frac{\epsilon}{4}$. However, this implies that $\hat{x}$ is an isolated point of $\Delta_\epsilon$, which is a contradiction. Hence $\Delta_\epsilon$ is finite.

If we let $\Delta = \cup_n \Delta_{\frac{1}{n}}$, we see that $\Delta $ is at most countable.

@GEdgar has pointed out an omission in my proof: It is possible that the two limits coincide at a point, but the function is still discontinuous at that point, ie, $\Delta$ is not the entire set of discontinuities.

Let $\Gamma_\epsilon = \{ x |\, \lim_{y \downarrow x}f(y) = \lim_{y \uparrow x}f(y), \ |\lim_{y \downarrow x}f(y)-f(x) | \geq \epsilon \}$. Suppose, as above, that $\Gamma_\epsilon$ is not finite, and let $\hat{x}$ be an accumulation point. Let $c_+, c_-$ be the limits as above. Again, there exists a $\delta>0$ such that if $y \in (\hat{x}-\delta,\hat{x})$, $|f(y)-c_-| < \frac{\epsilon}{4}$, and similarly, if $y \in (\hat{x}, \hat{x}+\delta)$, $|f(y)-c_+| < \frac{\epsilon}{4}$. Consequently, $\hat{x}$ is isolated, hence a contradiction, and $\Gamma_\epsilon$ is finite.

If we let $\Gamma= \cup_n \Gamma_{\frac{1}{n}}$, we see that $\Gamma$ is at most countable.

Since the set of discontinuities is $\Delta \cup \Gamma$, we see that the set of discontinuities is at most countable.


Or try to go directly.

Assume the set $D$ of discontinuities is uncountable, select a condensation point of $D$ (a point where every neighborhood is $D$ is uncountable), then show that a one sided limits fails to exist there. I suggest the Cauchy criterion for nonexistence of a limit...

** more complete version **

If $f$ is discontinuous at a point $c$, then there is $\epsilon > 0$ so that for every $\delta>0$ there exists $x$ with $|x-c|<\delta$ and $|f(x)-f(c)|>\epsilon$. Let $D_\epsilon$ be the set of points satisfying this for a given $\epsilon$. The set of all discontinuities is $$ D = \bigcup_{\epsilon>0} D_\epsilon = \bigcup_{n=1}^\infty D_{1/n} $$ Suppose $D$ is uncountable. Then $D_{1/n}$ is uncountable for some $n$. Fix such an $n$. An uncountable set in $\mathbb R$ has an accuulation point, say $c$ is an accumulation point of $D_{1/n}$. Either every right-neighborhood of $c$ meets $D_{1/n}$ or every left-neighborhood of $c$ meets $D_{1/n}$.

Suppose every left-neighborhood of $c$ meets $D_{1/n}$; we will show that the left limit of $f$ does not exist at $c$. (The case for right-neighborhoods is similar, then the right limit does not exist.) Indeed, for any $\delta>0$, the interval $(c-\delta, c)$ meets $D_{1/n}$. Let $x \in (c-\delta,c)\cap D_{1/n}$. There is $\delta'>0$ so that $(x-\delta',x+\delta') \subset (c-\delta,c)$. By the definition of $D_{1/n}$, there is $y$ so that $|x-y|<\delta'$ and $|f(x)-f(y)|>1/n$. Summary:

For every $\delta>0$ there exists $x,y$ so that $c-\delta < x < c$, $c-\delta< y < c$, but $|f(x)-f(y)|>1/n$.

Thus the Cauchy criterion for existence of the left-hand limit $$ \lim_{t \to c^-} f(t) $$ fails.