Let f be a real function which is finite and continuous on the closed bounded interval I=[a,b] (where a<b*) and has a right derivative* (finite or not) at all the points of the relative complement in [a,b) of a countable subset A of this interval. If fd′(x)≥0 at every point of [a,b[ not belonging to A, then one has f(b)≥f(a); if, further, fd′(x)>0 for at least one point of [a,b[, then f(b)>f(a).
Let ε>0 be arbitrary, and denote by (an)n≥1 a sequence obtained by listing the countable set A. Let J be the set of points y∈I such that one has
f(x)−f(a)≥−ε(x−a)−εan<x∑2n1
(1)
for all x with a≤x≤y, the sum in the second term of the right-hand side being taken over all indices n for which an<x. We shall show that if fd′(x)≥0 at every point of [a,b[ distinct from the an, then J=I.
It is clear that J is not empty, since a∈J; moreover the definition of this set shows that if y∈J one has x∈J for a≤x≤y, so J is an interval with left-hand endpoint a (Gen. Top., IV, p. 336, prop. 1); let c be its right-hand endpoint. One has c∈J; this is clear if c=a; if not, for every x<c we have the inequality (1), and a fortiori
f(x)−f(a)≥−ε(c−a)−εan<c∑2n1
from which it follows, on letting x tend to c in this inequality (since f is continuous), that c satisfies (1).
This being so, we shall see that we must have c=b. Indeed, if one had c<b, then certainly one would have c∈/A; now fd′(c) exists, and since fd′(c)≥0 by hypothesis, there exists a y such that c<y≤b and such that for c≤x≤y one has
f(x)−f(c)≥−ε(x−c)
from which, taking account of (1), where x is replaced by c,
f(x)−f(a)≥−ε(x−a)−εan<c∑2n1≥−ε(x−a)−εan<x∑2n1
which signifies that y∈J, contradicting the definition of c. Thus we have c=ak for some index k; since f is continuous at the point ak there is a y such that c<y≤b and such that for c<x≤y one has
f(x)−f(c)≥−2kε from which, taking account of (1), where
x is replaced by
c,
f(x)−f(a)≥−ε(c−a)−εan<x∑2n1≥−ε(x−a)−εan<x∑2n1 which again leads to a contradiction; we thus have
c=b, and in consequence
f(b)−f(a)≥−ε(b−a)−εan<b∑2n1≥−ε(b−a)−ε.(2) Since
ε>0 is arbitrary we deduce from (2) that
f(b)≥f(a), which demonstrates the first part of the proposition.
We remark now that this result applied to an interval [x,y] where a≤x<y≤b proves that f is increasing on I; if one had f(b)=f(a) one could deduce that f is constant on I, and then that fd′(x)=0 at every point of [a,b[; the second part follows from this.
Bourbaki puts the proof directly after the statement, so what is above is the statement and its proof together.