I am trying to understand Spivak's proof of theorem 1 in the appendix to chapter 8. He uses a lemma in the proof, which in turn uses two statements (i) and (ii).
Prerequisites
Suppose that we have two intervals $[a,b]$ and $[b,c]$ with the common end-point $b$, and a function $f$ that is continuous on $[a,c]$. Let $\epsilon>0$ and suppose that the following two statements hold
(i) if $x$ and $y$ are in $[a,b]$ and $|x-y|<\delta_1$, then $|f(x)-f(y)|<\epsilon$,
(ii) if $x$ and $y$ are in $[b,c]$ and $|x-y|<\delta_2$, then $|f(x)-f(y)|<\epsilon$.
We'd like to know if there is some $\delta>0$ such that $|f(x)-f(y)|<\epsilon$ whenever $x$ and $y$ are points in $[a,c]$ with $|x-y|<\delta$.
Lemma
Let $a<b<c$ and let $f$ be continuous on the interval $[a,c]$. Let $\epsilon>0$, and suppose that (i) and (ii) hold. Then there is a $\delta>0$ such that,
if $x$ and $y$ are in $[a,c]$ and $|x-y|<\delta$, then $|f(x)-f(y)|<\epsilon$.
Questions
Theorem 1
If $f$ is continuous on $[a,b]$, then $f$ is uniformly continuous on $[a,b]$.
Proof
For $\epsilon>0$ let's say that $f$ is $\epsilon$-good on $[a,b]$ if there is some $\delta>0$ such that, for all $y$ and $z$ in $[a,b]$,
if $|y-z|<\delta$, then $|f(y)-f(z)|<\epsilon$.
Then we're trying to prove that $f$ is $\epsilon$-good on $[a,b]$ for all $\epsilon>0$. Consider any particular $\epsilon>0$. Let
$A=\{x: a\leq x\leq b \ \text{and} \ f \ \text{is} \ \epsilon\text{-good on} \ [a,x]\}$.
Then $A\neq \emptyset$ (since $a$ is in $A$), and $A$ is bounded above (by $b$), so $A$ has a least upper bound $\alpha$.... Suppose that we had $\alpha< b$. Since $f$ is continuous at $\alpha$, there is $\delta_0>0$ such that, if $|y-\alpha|<\delta_0$, then $|f(y)-f(\alpha)|<\epsilon/2$. Consequently, if $|y-\alpha|<\delta_0$ and $|z-\alpha|<\delta_0$, then $|f(y)-f(z)|<\epsilon$. So $f$ is surely $\epsilon$-good on the interval $[\alpha-\delta_0,\alpha+\delta_0]$.
Why is $f$ surely $\epsilon$-good on the interval $[\alpha-\delta_0,\alpha+\delta_0]$?
On the other hand, since $\alpha$ is the least upper bound of $A$, it is also clear that $f$ is $\epsilon$-good on $[a,\alpha-\delta_0]$.
How can we know that $a< \alpha-\delta_0$?
Then the Lemma implies that $f$ is $\epsilon$-good on $[a,a+\delta_0]$, so $a+\delta_0$ is in $A$, contradicting the fact that $\alpha$ is an upper bound.
I am quoting from the third edition (Cambridge University Press) and I believe $a+\delta_0$ must be a typo. It should be $\alpha+\delta_0$, shouldn't it?
To complete the proof we just have to show that $\alpha=b$ is actually in $A$.... Since $f$ is continuous at $b$, there is some $\delta_0>0$ such that, if $|b-y|<\delta_0$, then $|f(y)-f(b)|<\epsilon/2$. So $f$ is $\epsilon$-good on $[b-\delta_0,b]$.
Why is $f$ $\epsilon$-good on $[b-\delta_0,b]$?
Because if $x,y\in[\alpha−\delta_0,\alpha+\delta_0]$ then $|x-\alpha|\le\delta_0,|y-\alpha|\le\delta_0$ therefore: $$|f(x)-f(y)|=|f(x)-f(\alpha)+f(\alpha)-f(y)|\le|f(x)-f(\alpha)|+|f(y)-f(\alpha)|<\epsilon$$
Strictly speaking, one should specify $\delta_0$ with the criterion that $a\le\alpha-\delta_0$. It is quite easy to see $\alpha>a$, so this is possible. Since such $\delta_0$ exist at any sufficiently small size, there is no loss of generality in asserting this, and many authors will do this without comment. In fact, we need $a\le\alpha-\delta_0$ (and $\alpha+\delta_0\le b$) for $f$ to even make sense on $[\alpha−\delta_0,\alpha+\delta_0]$. To reiterate, you can enforce these condition anyway, don't worry about it!
Yes, it should be.
For the same reasons that $f$ is $\epsilon$-good on $[\alpha−\delta_0,\alpha+\delta_0]$. It follows by the continuity-at-a-point ($b$) inequality and the triangle inequality.
This proof is essentially a proof by real induction. A more general proof might be to observe that $[a,b]$ is compact, thus any continuous function thereon is uniformly continuous. I won't prove this in full generality (metric spaces) but you can apply these ideas elsewhere.
Fix an $\epsilon>0$. Since $f$ is continuous at every point, for all $x\in[a,b]$ there exist (given) $\delta_x>0$ and $|x-y|<\delta_x\implies|f(x)-f(y)|<\epsilon/2$. Then, for reasons described above, $|f(u)-f(v)|<\epsilon$ whenever $u,v\in(x-\delta_x,x+\delta_x)\cap[a,b]$. We have an open cover: $$[a,b]=\bigcup_{x\in[a,b]}(x-\delta_x/3,x+\delta_x/3)\cap[a,b]$$(Yes, divided by $3$) which admits a finite subcover - by compactness - indexed by some $(x_i)_{i=1}^n$: $$[a,b]=\bigcup_{i=1}^n(x_i-\delta_{x_i}/3,x_i+\delta_{x_i}/3)\cap[a,b]$$
Define: $$\delta:=\min_{1\le i\le n}\delta_{x_i}/3>0$$
Suppose $x,y\in[a,b]$ and $|x-y|<\delta$. There is some $x_i$ such that $|x-x_i|<\delta_{x_i}/3$, so: $$|y-x_i|=|y-x+x-x_i|\le|y-x|+|x-x_i|<\delta+\delta_{x_i}/3\le\frac{2}{3}\delta_{x_i}<\delta_{x_i}$$
Therefore $x$ and $y$ are both in $(x_i-\delta_{x_i},x_i+\delta_{x_i})\cap[a,b]$. By definition of the $\delta_{x_i}$, we have that: $$|f(x)-f(y)|<\epsilon$$As $x,y$ were arbitrary, we conclude that this $\delta$ makes $f$ $\epsilon$-good on all $[a,b]$. As $\epsilon$ is arbitrary, we get that $f$ is uniformly continuous.