1.6. Differentiation theorems 117 In a similar spirit, from Markov’s inequality (Lemma 1.3.15) we have m({x ∈ R : |f(x) − g(x)| ≥ λ}) ≤ ε λ . By subadditivity, we conclude that for all x ∈ R outside of a set E of measure at most 2ε/λ, one has both (1.23) 1 h [x,x+h] |f(t) − g(t)| dt λ and (1.24) |f(x) − g(x)| λ for all h 0. Now let x ∈ R\E. From the dense subclass result (Corollary 1.6.10) applied to the continuous function g, we have | 1 h [x,x+h] g(t) dt − g(x)| λ whenever h is suﬃciently close to x. Combining this with (1.23), (1.24), and the triangle inequality, we conclude that | 1 h [x,x+h] f(t) dt − f(x)| 3λ for all h suﬃciently close to zero. In particular, we have lim sup h→0 | 1 h [x,x+h] f(t) dt − f(x)| 3λ for all x outside of a set of measure 2ε/λ. Keeping λ fixed and sending ε to zero, we conclude that lim sup h→0 | 1 h [x,x+h] f(t) dt − f(x)| 3λ for almost every x ∈ R. If we then let λ go to zero along a countable sequence (e.g. λ := 1/n for n = 1, 2,...), we conclude that lim sup h→0 | 1 h [x,x+h] f(t) dt − f(x)| = 0 for almost every x ∈ R, and the claim follows. The only remaining task is to establish the one-sided Hardy-Littlewood maximal inequality. We will do so by using the rising sun lemma: 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:

Purchased from American Mathematical Society for the exclusive use of nofirst nolast (email unknown) Copyright no copyright American Mathematical Society. Duplication prohibited. Please report unauthorized use to cust-serv@ams.org. Thank You! Your purchase supports the AMS' mission, programs, and services for the mathematical community.