Rising sun lemma
# Rising sun lemma

In mathematical analysis, the rising sun lemma is a lemma due to Frigyes Riesz, used in the proof of the Hardy–Littlewood maximal theorem. The lemma was a precursor in one dimension of the Calderón–Zygmund lemma.

The lemma is stated as follows:

    Suppose g is a real-valued continuous function on the interval [a,b] and S is the set of x in [a,b] such that there exists a y∈(x,b] with g(y) > g(x). (Note that b cannot be in S, though a may be.) Define E = S ∩ (a,b).
    Then E is an open set, and it may be written as a countable union of disjoint intervals
       $E=\bigcup _{k}(a_{k},b_{k})$
    such that $g(a_k)$ = $g(b_k),$ unless $a_k$ = a ∈ S for some k, in which case g(a) < $g(b_k)$ for that one k. Furthermore, if x ∈ $(a_k,b_k),$ then g(x) < $g(b_k).$

The colorful name of the lemma comes from imagining the graph of the function g as a mountainous landscape, with the sun shining horizontally from the right. The set E consist of points that are in the shadow.

## Proof

We need a lemma: Suppose [c,d) ⊂ S, but d ∉ S. Then g(c) < g(d). To prove this, suppose g(c) ≥ g(d). Then g achieves its maximum on [c,d] at some point z < d. Since z ∈ S, there is a y in (z,b] with g(z) < g(y). If y ≤ d, then g would not reach its maximum on [c,d] at z. Thus, y ∈ (d,b], and g(d) ≤ g(z) < g(y). This means that d ∈ S, which is a contradiction, thus establishing the lemma.

The set E is open, so it is composed of a countable union of disjoint intervals $(a_k,b_k).$

It follows immediately from the lemma that g(x) < $g(b_k)$ for x in $(a_k,b_k).$ Since g is continuous, we must also have $g(a_k)$ ≤ $g(b_k).$

If $a_k$ ≠ a or a ∉ S, then $a_k$ ∉ S, so $g(a_k)$ ≥ $g(b_k),$ for otherwise $a_k$ ∈ S. Thus, $g(a_k)$ = $g(b_k)$ in these cases.

Finally, if $a_k$ = a ∈ S, the lemma tells us that g(a) < $g(b_k).$

