Lemma 1.6.17 (Rising sun lemma)

Let [a,b] be a compact interval, and let F : [a,b] R be a continuous function. Then one can find an at most countable family of disjoint non-empty open intervals In = (an,bn) in [a,b] with the following properties:

(i)
For each n, either F(an) = F(bn), or else an = a and F(bn) F(an).
(ii)
If x (a,b] does not lie in any of the intervals In, then one must have F(y) F(x) for all x y b.