I have to prove the following
THEOREM Let $f:[a,b]\to\Bbb R$ be such that $\lim\limits_{y\to x}f(y)$ exists for every $x\in[a,b]$. Then the set $\Delta\subset[a,b]$ where $f$ is discontinuous is countable.
First
PROPOSITION Let $f:[a,b]\to\Bbb R$ be such that $\lim\limits_{y\to x}f(y)$ exists for every $x\in[a,b]$. Define $g:[a,b]\to\Bbb R$ as $$g(x)=\lim_{y\to x}f(y)$$ Then $g$ is continuous.
PROOF
Let $\alpha\in[a,b]$. Then $g(\alpha)=\lim_{y\to\alpha}f(y)$. Thus, for $\epsilon >0$ given there exists a $\delta>0$ such that $0<|y-\alpha|<\delta$ implies $|g(\alpha)-f(y)|<\epsilon/2$. This is $g(\alpha)-\epsilon/2<f(y)<g(\alpha)+\epsilon/2$. Let $x$ such that $0<|x-\alpha|<\delta$. Then
$$g(\alpha)-\epsilon/2\leq \lim_{y\to x}f(y)\leq g(\alpha)+\epsilon/2$$
But this means $|g(x)-g(\alpha)|\leq \epsilon/2<\epsilon$.$\;\blacktriangle$
Now we can move on:
PROOF Let $\epsilon >0$ and consider the set $$\Lambda(\epsilon)=\left\{x\in[a,b]:\left|\lim\limits_{y\to x}f(y)-f(x)\right|>\epsilon\right\}$$
The claim is that $\Lambda(\epsilon)$ is finite for every choice of $\epsilon$. Indeed, suppose $\Lambda(\epsilon)\subset[a,b]$ was not finite. Then, it has an accumulation point, $\lambda$, in $[a,b]$. By hypothesis $\lim\limits_{y\to \lambda}f(y)$ exists. Thus for this $\epsilon >0$ there exists a $\delta >0$ such that $$\tag 1 \left|f(y)-\lim_{x\to \lambda}f(x)\right|<\epsilon /2$$ whenever $0<|y-\lambda |<\delta$. Since $\lambda$ is an accumulation point, for each $\delta >0$ there exists a $w\in\Lambda(\epsilon)$ such that $0<|w-\lambda|<\delta$ and
$$\tag 2 \left|f(w)-\lim_{x\to w}f(x)\right|>\epsilon$$
And because of the previous proposition, for this $\epsilon>0$ there exists $\delta' >0$ such that for each $y$ with $0<|y-\lambda|<\delta'$ we have
$$\tag 3 \left|\lim_{x\to y}f(x)-\lim_{x\to \lambda}f(x)\right|<\epsilon/2$$
Let $\delta''=\min(\delta,\delta')$. We thus obtain from $(1)$,$(2)$ and $(3)$ a $w\in \Lambda(\epsilon)$ such that $0<|w-\lambda|<\delta''$ with
$$ \left|f(w)-\lim_{x\to \lambda}f(x)\right|<\epsilon /2$$
$$ \left|f(w)-\lim_{x\to w}f(x)\right|>\epsilon$$
$$ \left|\lim_{x\to w}f(x)-\lim_{x\to \lambda}f(x)\right|<\epsilon/2$$
which, by the triangle inequiality, is absurd. Then $\Lambda(\epsilon)$ is finite for each $\epsilon>0$. In particular, for each $n\in\Bbb N$, $\Lambda(1/n)$ is finite. But
$$\bigcup_{n\in\Bbb N}\Lambda(1/n)=\Delta$$ which is the countable union of finite sets, whence, it is at most countable.$\; \blacktriangle$
ADD I cannot understand Spivak's proof of this. He considers $[0,1]$ in his exercise (I had forgotten)
If the set of such $a$ was infinite, it would have an accumulation point in $[0,1]$. Call it $x$. For every $\delta >0$ there would be an $a$ such that $0<|x-a|<\delta/2$ and $$\tag 1 \lim_{y\to a}f(y)-f(a)|>\epsilon$$ Thus, there would exist an $a'$ such that $|a'-a|<\delta/2$ (from where $0<|x-a'|<\delta$) such that $$\tag 2 |f(a')-f(a)|>\epsilon$$ But since $\ell=\lim\limits_{y\to x }f(y)$ for some $\ell$, there exists a $\delta >0$ such that $$|f(y)-\ell|<\epsilon/2$$ whenever $0<|y-x|<\delta$. In particular, if $0<|x-a|<\delta$ and $0<|x-a'|<\delta$ then $\epsilon < |f(a')-f(a)|<|f(a')-\ell|+|f(a)-\ell|<\epsilon$ which is absurd.
My question is: where does he get $$\epsilon < |f(a')-f(a)|$$ from?