Skip to content

Commit ef089fc

Browse files
committed
feat(BirkhoffSum.Pointwise): maximal inequality
1 parent a8a0f78 commit ef089fc

File tree

3 files changed

+402
-0
lines changed

3 files changed

+402
-0
lines changed

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4040,7 +4040,9 @@ public import Mathlib.Deprecated.RingHom
40404040
public import Mathlib.Deprecated.Sort
40414041
public import Mathlib.Dynamics.BirkhoffSum.Average
40424042
public import Mathlib.Dynamics.BirkhoffSum.Basic
4043+
public import Mathlib.Dynamics.BirkhoffSum.Maximal
40434044
public import Mathlib.Dynamics.BirkhoffSum.NormedSpace
4045+
public import Mathlib.Dynamics.BirkhoffSum.Pointwise
40444046
public import Mathlib.Dynamics.BirkhoffSum.QuasiMeasurePreserving
40454047
public import Mathlib.Dynamics.Circle.RotationNumber.TranslationNumber
40464048
public import Mathlib.Dynamics.Ergodic.Action.Basic
Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
/-
2+
Copyright (c) 2025 Lua Viana Reis. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Lua Viana Reis
5+
-/
6+
module
7+
8+
public import Mathlib.MeasureTheory.Integral.Bochner.Basic
9+
import Mathlib.MeasureTheory.Integral.Bochner.Set
10+
import Mathlib.Algebra.Order.Group.PartialSups
11+
import Mathlib.Algebra.Order.Ring.Star
12+
import Mathlib.Analysis.InnerProductSpace.Basic
13+
import Mathlib.Analysis.RCLike.Lemmas
14+
import Mathlib.Data.Real.StarOrdered
15+
import Mathlib.Dynamics.BirkhoffSum.Average
16+
17+
/-!
18+
# Maximal ergodic theorem.
19+
20+
We the set `birkhoffAverageSupSet f g a` of points `x` where the supremum of
21+
`birkhoffAverage ℝ f g n x` for varying `n` is greater than `a`.
22+
23+
## Main results
24+
25+
* `meas_birkhoffAverageSupSet_mul_le_integral`:
26+
* `meas_birkhoffAverageSupSet_mul_le_norm`
27+
-/
28+
29+
variable {α : Type*} {f : α → α}
30+
31+
open MeasureTheory Measure MeasurableSpace Filter Topology
32+
33+
section BirkhoffMax
34+
35+
/-- The maximum of `birkhoffSum f g i` for `i` ranging from `0` to `n`. -/
36+
def birkhoffMax (f : α → α) (g : α → ℝ) : ℕ →o (α → ℝ) :=
37+
partialSups (birkhoffSum f g)
38+
39+
lemma birkhoffMax_nonneg {g n} :
40+
0 ≤ birkhoffMax f g n := by
41+
apply (le_partialSups_of_le _ n.zero_le).trans'
42+
rfl
43+
44+
lemma birkhoffMax_succ {g n} :
45+
birkhoffMax f g (n + 1) = 0 ⊔ (g + birkhoffMax f g n ∘ f) := by
46+
have : birkhoffSum f g ∘ Nat.succ = fun k ↦ g + birkhoffSum f g k ∘ f := by
47+
funext
48+
exact birkhoffSum_succ' ..
49+
erw [partialSups_succ', this, partialSups_const_add, birkhoffSum_zero']
50+
funext
51+
simp [birkhoffMax, partialSups]
52+
53+
lemma birkhoffMax_succ' {g n x} (hpos : 0 < birkhoffMax f g (n + 1) x) :
54+
birkhoffMax f g (n + 1) x = g x + birkhoffMax f g n (f x) := by
55+
erw [birkhoffMax_succ, lt_sup_iff] at hpos
56+
cases hpos with
57+
| inl h => absurd h; exact lt_irrefl 0
58+
| inr h =>
59+
erw [birkhoffMax_succ, Pi.sup_apply, sup_of_le_right h.le]
60+
rfl
61+
62+
lemma birkhoffMax_comp_le_succ {g n} :
63+
birkhoffMax f g n ≤ birkhoffMax f g (n + 1) := by
64+
gcongr
65+
exact n.le_succ
66+
67+
lemma birkhoffMax_le_birkhoffMax {g n x} (hpos : 0 < birkhoffMax f g n x) :
68+
birkhoffMax f g n x ≤ g x + birkhoffMax f g n (f x) := by
69+
match n with
70+
| 0 => absurd hpos; exact lt_irrefl 0
71+
| n + 1 =>
72+
apply le_of_eq_of_le (birkhoffMax_succ' hpos)
73+
apply add_le_add_right
74+
exact birkhoffMax_comp_le_succ (f x)
75+
76+
lemma birkhoffMax_pos_of_mem_support {g n x}
77+
(hx : x ∈ (birkhoffMax f g n).support) : 0 < birkhoffMax f g n x := by
78+
apply lt_or_gt_of_ne at hx
79+
cases hx with
80+
| inl h =>
81+
absurd h; exact (birkhoffMax_nonneg x).not_gt
82+
| inr h => exact h
83+
84+
-- TODO: move elsewhere
85+
@[measurability]
86+
lemma birkhoffSum_measurable [MeasurableSpace α] {f : α → α} (hf : Measurable f) {g : α → ℝ}
87+
(hg : Measurable g) {n} : Measurable (birkhoffSum f g n) := by
88+
apply Finset.measurable_sum
89+
measurability
90+
91+
-- TODO: move elsewhere
92+
@[measurability]
93+
lemma birkhoffMax_measurable [MeasurableSpace α] (hf : Measurable f) {g : α → ℝ}
94+
(hg : Measurable g) {n} : Measurable (birkhoffMax f g n) := by
95+
unfold birkhoffMax
96+
induction n <;> measurability
97+
98+
section MeasurePreserving
99+
100+
variable {f : α → α} [MeasurableSpace α] (μ : Measure α := by volume_tac) {g : α → ℝ} {n}
101+
(hf : MeasurePreserving f μ μ) (hg : Integrable g μ)
102+
103+
include hf
104+
105+
-- TODO: move elsewhere
106+
@[measurability]
107+
lemma birkhoffSum_aestronglyMeasurable (hg : AEStronglyMeasurable g μ) :
108+
AEStronglyMeasurable (birkhoffSum f g n) μ := by
109+
apply Finset.aestronglyMeasurable_fun_sum
110+
exact fun i _ => hg.comp_measurePreserving (hf.iterate i)
111+
112+
-- TODO: move elsewhere
113+
@[measurability]
114+
lemma birkhoffMax_aestronglyMeasurable (hg : AEStronglyMeasurable g μ) :
115+
AEStronglyMeasurable (birkhoffMax f g n) μ := by
116+
unfold birkhoffMax
117+
induction n <;> measurability
118+
119+
include hg
120+
121+
-- TODO: move elsewhere
122+
lemma birkhoffSum_integrable : Integrable (birkhoffSum f g n) μ :=
123+
integrable_finset_sum _ fun _ _ ↦ (hf.iterate _).integrable_comp_of_integrable hg
124+
125+
-- TODO: move elsewhere
126+
lemma birkhoffMax_integrable : Integrable (birkhoffMax f g n) μ := by
127+
unfold birkhoffMax
128+
induction n with
129+
| zero => exact integrable_zero ..
130+
| succ n hn => simpa using Integrable.sup hn (birkhoffSum_integrable μ hf hg)
131+
132+
lemma birkhoffMax_integral_le :
133+
∫ x, birkhoffMax f g n x ∂μ ≤
134+
∫ x in (birkhoffMax f g n).support, g x ∂μ +
135+
∫ x in (birkhoffMax f g n).support, birkhoffMax f g n (f x) ∂μ := by
136+
have := hf.integrable_comp_of_integrable (birkhoffMax_integrable μ hf hg (n := n))
137+
rw [←integral_add hg.restrict, ←setIntegral_support]
138+
· apply setIntegral_mono_on₀
139+
· exact (birkhoffMax_integrable μ hf hg).restrict
140+
· exact .add hg.restrict this.restrict
141+
· exact AEStronglyMeasurable.nullMeasurableSet_support (by measurability)
142+
· intro x hx
143+
exact birkhoffMax_le_birkhoffMax (birkhoffMax_pos_of_mem_support hx)
144+
· exact this.restrict
145+
146+
lemma setIntegral_nonneg_on_birkhoffMax_support :
147+
0 ≤ ∫ x in (birkhoffMax f g n).support, g x ∂μ := by
148+
have hg₁ : AEStronglyMeasurable (birkhoffMax f g n) μ := by measurability
149+
have hg₂ : Integrable (birkhoffMax f g n) μ := birkhoffMax_integrable μ hf hg
150+
have hg₃ : Integrable (birkhoffMax f g n ∘ f) μ := hf.integrable_comp_of_integrable hg₂
151+
calc
152+
0 ≤ ∫ x in (birkhoffMax f g n).supportᶜ, birkhoffMax f g n (f x) ∂μ := by
153+
exact integral_nonneg (fun x => birkhoffMax_nonneg (f x))
154+
_ = ∫ x, birkhoffMax f g n (f x) ∂μ -
155+
∫ x in (birkhoffMax f g n).support, birkhoffMax f g n (f x) ∂μ := by
156+
exact setIntegral_compl₀ hg₁.nullMeasurableSet_support hg₃
157+
_ = ∫ x, birkhoffMax f g n x ∂μ -
158+
∫ x in (birkhoffMax f g n).support, birkhoffMax f g n (f x) ∂μ := by
159+
rw [←integral_map hf.aemeasurable (hf.map_eq.symm ▸ hg₁), hf.map_eq]
160+
_ ≤ ∫ x in (birkhoffMax f g n).support, g x ∂μ := by
161+
grw [birkhoffMax_integral_le μ hf hg]
162+
grind
163+
164+
end MeasurePreserving
165+
166+
end BirkhoffMax
167+
168+
def birkhoffSupSet (f : α → α) (g : α → ℝ) : Set α :=
169+
{x | ∃ n : ℕ, 0 < birkhoffSum f g n x}
170+
171+
lemma birkhoffSupSet_eq_iSup_birkhoffMax_support {f : α → α} {g : α → ℝ} :
172+
birkhoffSupSet f g = ⋃ n : ℕ, (birkhoffMax f g n).support := by
173+
ext x
174+
simp only [birkhoffSupSet, Set.mem_setOf_eq, Set.mem_iUnion, Function.mem_support]
175+
constructor
176+
· refine fun ⟨n, hn⟩ => ⟨n, ?_⟩
177+
apply ne_of_gt (hn.trans_le _)
178+
exact le_partialSups (birkhoffSum f g) _ _
179+
· rintro ⟨n, hn⟩
180+
apply lt_or_gt_of_ne at hn
181+
cases hn with
182+
| inl h => absurd h; exact not_lt_of_ge (birkhoffMax_nonneg x)
183+
| inr h =>
184+
rw [birkhoffMax, Pi.partialSups_apply] at h
185+
rcases exists_partialSups_eq (birkhoffSum f g · x) n with ⟨m, _, hm₂⟩
186+
exact ⟨m, hm₂ ▸ h⟩
187+
188+
public def birkhoffAverageSupSet (f : α → α) (g : α → ℝ) (a : ℝ) : Set α :=
189+
{x | ∃ n : ℕ, a < birkhoffAverage ℝ f g n x}
190+
191+
theorem birkhoffAverage_iff_birkhoffSum {f : α → α} {x n g} {a : ℝ} (hn : 0 < n) :
192+
a < birkhoffAverage ℝ f g n x ↔ 0 < birkhoffSum f (g - fun _ ↦ a) n x := by
193+
nth_rw 2 [←smul_lt_smul_iff_of_pos_left (a := (↑n : ℝ)⁻¹) (by positivity)]
194+
rw [smul_zero, ←birkhoffAverage, birkhoffAverage_sub]
195+
simp only [Pi.sub_apply, sub_pos]
196+
nth_rw 2 [birkhoffAverage_of_comp_eq rfl hn.ne']
197+
198+
theorem birkhoffAverageSupSet_eq_birkhoffSupSet {f : α → α} {g a} (ha : 0 < a) :
199+
birkhoffAverageSupSet f g a = birkhoffSupSet f (g - fun _ ↦ a) := by
200+
unfold birkhoffAverageSupSet birkhoffSupSet
201+
have {n x} : a < birkhoffAverage ℝ f g n x ↔ 0 < birkhoffSum f (g - fun _ ↦ a) n x := by
202+
cases n with
203+
| zero =>
204+
refine ⟨fun h => ?_, fun h => ?_⟩
205+
· exfalso; rw [birkhoffAverage_zero] at h; exact lt_asymm ha h
206+
· exfalso; rw [birkhoffSum_zero] at h; exact lt_irrefl 0 h
207+
| succ n => exact birkhoffAverage_iff_birkhoffSum (by positivity)
208+
conv =>
209+
enter [1, 1, x, 1, n]
210+
rw [this]
211+
212+
section MeasurePreserving
213+
214+
variable {f : α → α} [MeasurableSpace α] (μ : Measure α := by volume_tac) {n}
215+
(hf : MeasurePreserving f μ μ)
216+
217+
include hf
218+
219+
section Real
220+
221+
variable {g : α → ℝ} (hg : Integrable g μ)
222+
223+
include hg
224+
225+
lemma tendsto_setIntegral_on_birkhoffMax_support_birkhoffSupSet :
226+
Tendsto (fun n ↦ ∫ x in (birkhoffMax f g n).support, g x ∂μ) atTop
227+
(𝓝 <| ∫ x in birkhoffSupSet f g, g x ∂ μ) := by
228+
rw [birkhoffSupSet_eq_iSup_birkhoffMax_support]
229+
apply tendsto_setIntegral_of_monotone₀ _ _ hg.integrableOn
230+
· intros
231+
exact AEStronglyMeasurable.nullMeasurableSet_support (by measurability)
232+
· intro i j hij x
233+
have : 0 ≤ birkhoffMax f g i x := birkhoffMax_nonneg x
234+
have := (birkhoffMax f g).mono hij x
235+
grind [Function.mem_support]
236+
theorem setIntegral_nonneg_on_birkhoffSupSet :
237+
0 ≤ ∫ x in birkhoffSupSet f g, g x ∂μ := by
238+
apply ge_of_tendsto' (tendsto_setIntegral_on_birkhoffMax_support_birkhoffSupSet μ hf hg)
239+
intro n
240+
exact setIntegral_nonneg_on_birkhoffMax_support μ hf hg
241+
242+
variable [IsFiniteMeasure μ]
243+
244+
/-- **Maximal ergodic theorem**: The measure of the set where the supremum of the Birkhoff
245+
averages of `g` is greater than `a`, multiplied by `a`, is bounded above by the integral of
246+
`g` on this set. -/
247+
public theorem meas_birkhoffAverageSupSet_mul_le_integral (a : ℝ) (ha : 0 < a) :
248+
μ.real (birkhoffAverageSupSet f g a) • a ≤ ∫ x in birkhoffAverageSupSet f g a, g x ∂μ := by
249+
have p₁ := Integrable.sub hg (integrable_const a)
250+
calc
251+
_ = ∫ x in birkhoffSupSet f (g - fun _ ↦ a), a ∂μ := by
252+
rw [setIntegral_const, birkhoffAverageSupSet_eq_birkhoffSupSet ha]
253+
_ ≤ ∫ x in birkhoffSupSet f (g - fun _ ↦ a), a ∂μ +
254+
∫ x in birkhoffSupSet f (g - fun _ ↦ a), g x - a ∂μ := by
255+
exact le_add_of_nonneg_right (setIntegral_nonneg_on_birkhoffSupSet μ hf p₁)
256+
_ = ∫ x in birkhoffAverageSupSet f g a, g x ∂μ := by
257+
rw [← integral_add, birkhoffAverageSupSet_eq_birkhoffSupSet ha]
258+
· rcongr; grind
259+
· exact (integrable_const a).restrict
260+
· exact p₁.restrict
261+
262+
end Real
263+
264+
section NormedAddCommGroup
265+
266+
variable {E : Type*} [NormedAddCommGroup E] {g : α → E} (hg : Integrable g μ) [IsFiniteMeasure μ]
267+
268+
include hg
269+
270+
/-- **Maximal ergodic theorem** for group-valued functions: The measure of the set where
271+
the supremum of the Birkhoff averages of `‖g‖` is greater than `a`, multiplied by `a`, is
272+
bounded above by the norm of `g`. -/
273+
public theorem meas_birkhoffAverageSupSet_mul_le_norm (a : ℝ) (ha : 0 < a) :
274+
μ.real (birkhoffAverageSupSet f (fun x ↦ ‖g x‖) a) • a ≤ ∫ x, ‖g x‖ ∂μ :=
275+
calc
276+
_ ≤ ∫ x in birkhoffAverageSupSet f (fun x ↦ ‖g x‖) a, ‖g x‖ ∂μ := by
277+
exact meas_birkhoffAverageSupSet_mul_le_integral μ hf hg.norm a ha
278+
_ ≤ ∫ x, ‖g x‖ ∂μ := by
279+
exact setIntegral_le_integral hg.norm (ae_of_all _ (norm_nonneg <| g ·))
280+
281+
end NormedAddCommGroup
282+
283+
end MeasurePreserving

0 commit comments

Comments
 (0)