Theorem 3-8, Spivak Calculus on Manifolds This is a question about the proof of Theorem 3-8.

Theorem 3-8: Let $A$ be a closed rectangle and $f:A\rightarrow \mathbb R$ a bounded function. Let $B = \{x:f\hspace{1mm} \text{is not continuous at}\hspace{1mm} x\}$. Then $f$ is integrable if and only if $B$ is a set of measure $0$.

In the proof of this theorem, I do not understand the following quote:

If $\varepsilon>0$, let $P$ be a partition of $A$ such that $U(f,P)-L(f,P)<\frac{\varepsilon}{n}$. Let $\mathscr S$ be the collection of subrectangles $S$ of $P$ which intersect $B_{\frac{1}{n}}$. Then $\mathscr S$ is a cover of $B_{\frac{1}{n}}$. Now if $S\in \mathscr S$, then $M_S(f)-m_S(f)\geq \frac{1}{n}$.

The last inequality is what I do not understand. (From this post Error in theorem 3-8 “Calculus on manifolds”, I know that the inequality is true only if the interior of $S$ intersects $B_{\frac{1}{n}}$, but I am also not able to understand why this statement is true).
 A: Let us recall the definitons:
$$B_{1/n}=\{x:\ o(f,x)\geq 1/n\} \\ o(f,x)=\lim _{\delta \to 0} \{ \sup _{|t-x|<\delta} f(t)- \inf _{|t-x|<\delta} f(t)\} \\ M_S(f)=\sup _{t\in S} f(t) \\ m_s(f)=\inf _{t\in S} f(t) $$
Let us moreover define for $\delta > 0$
$$U_\delta(x) = \{ t \in A \mid \lvert t - x \rvert < \delta \} \\o(f,x,\delta) =  \sup _{t \in U_\delta(x)} f(t)- \inf_{t \in U_\delta(x)} f(t).$$
Since $U_{\delta'}(x) \subset U_\delta(x)$ for $\delta' < \delta$, the function $\phi(\delta) = o(f,x,\delta) : (0,\infty) \to \mathbb R$ is decreasing with $\lim_{\delta \to 0} \phi(\delta) = o(f,x)$. In particular $o(f,x,\delta) \ge o(f,x)$ for all $\delta > 0$.
Assume that the interior of $S$ intersects $B_{1/n}$. Then there exists $x \in \operatorname{int} S$ such that $o(f,x) \ge 1/n$. Choose $\delta > 0$ such that $U_\delta(x) \subset S$. Then we get
$$M_S(f) - m_S(f) = \sup _{t \in S} f(t) - \inf_{t\in S} f(t) \ge \sup _{t \in U_\delta(x)} f(t)- \inf_{t \in U_\delta(x)} f(t) = o(f,x,\delta) \ge o(f,x) \ge 1/n .$$
Note that if $x \in S \setminus \operatorname{int} S$, then no $U_\delta(x)$ is contained in $S$ and our above argument breaks down.
