Skip to content

Commit ae525dc

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

3 files changed

Lines changed: 418 additions & 0 deletions

File tree

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: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
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+
section PR -- todo: separate PR
169+
170+
variable {ι α : Type*} [Preorder ι] [LocallyFiniteOrderBot ι] [LinearOrder α]
171+
172+
theorem partialSups_exists (f : ι → α) (i : ι) :
173+
∃ j ≤ i, partialSups f i = f j := by
174+
obtain ⟨j, hj⟩ : ∃ j ∈ Finset.Iic i, ∀ k ∈ Finset.Iic i, f k ≤ f j :=
175+
Finset.exists_max_image _ _ ⟨i, Finset.mem_Iic.mpr le_rfl⟩
176+
simp_all only [Finset.mem_Iic, partialSups, OrderHom.coe_mk]
177+
use j, hj.1
178+
apply le_antisymm
179+
· exact Finset.sup'_le _ _ fun k hk => hj.2 k (Finset.mem_Iic.1 hk)
180+
· exact Finset.le_sup' _ (Finset.mem_Iic.2 hj.1 )
181+
182+
end PR
183+
184+
def birkhoffSupSet (f : α → α) (g : α → ℝ) : Set α :=
185+
{x | ∃ n : ℕ, 0 < birkhoffSum f g n x}
186+
187+
lemma birkhoffSupSet_eq_iSup_birkhoffMax_support {f : α → α} {g : α → ℝ} :
188+
birkhoffSupSet f g = ⋃ n : ℕ, (birkhoffMax f g n).support := by
189+
ext x
190+
simp only [birkhoffSupSet, Set.mem_setOf_eq, Set.mem_iUnion, Function.mem_support]
191+
constructor
192+
· refine fun ⟨n, hn⟩ => ⟨n, ?_⟩
193+
apply ne_of_gt (hn.trans_le _)
194+
exact le_partialSups (birkhoffSum f g) _ _
195+
· rintro ⟨n, hn⟩
196+
apply lt_or_gt_of_ne at hn
197+
cases hn with
198+
| inl h => absurd h; exact not_lt_of_ge (birkhoffMax_nonneg x)
199+
| inr h =>
200+
rw [birkhoffMax, Pi.partialSups_apply] at h
201+
rcases partialSups_exists (birkhoffSum f g · x) n with ⟨m, _, hm₂⟩
202+
exact ⟨m, hm₂ ▸ h⟩
203+
204+
public def birkhoffAverageSupSet (f : α → α) (g : α → ℝ) (a : ℝ) : Set α :=
205+
{x | ∃ n : ℕ, a < birkhoffAverage ℝ f g n x}
206+
207+
theorem birkhoffAverage_iff_birkhoffSum {f : α → α} {x n g} {a : ℝ} (hn : 0 < n) :
208+
a < birkhoffAverage ℝ f g n x ↔ 0 < birkhoffSum f (g - fun _ ↦ a) n x := by
209+
nth_rw 2 [←smul_lt_smul_iff_of_pos_left (a := (↑n : ℝ)⁻¹) (by positivity)]
210+
rw [smul_zero, ←birkhoffAverage, birkhoffAverage_sub]
211+
simp only [Pi.sub_apply, sub_pos]
212+
nth_rw 2 [birkhoffAverage_of_comp_eq rfl hn.ne']
213+
214+
theorem birkhoffAverageSupSet_eq_birkhoffSupSet {f : α → α} {g a} (ha : 0 < a) :
215+
birkhoffAverageSupSet f g a = birkhoffSupSet f (g - fun _ ↦ a) := by
216+
unfold birkhoffAverageSupSet birkhoffSupSet
217+
have {n x} : a < birkhoffAverage ℝ f g n x ↔ 0 < birkhoffSum f (g - fun _ ↦ a) n x := by
218+
cases n with
219+
| zero =>
220+
refine ⟨fun h => ?_, fun h => ?_⟩
221+
· exfalso; rw [birkhoffAverage_zero] at h; exact lt_asymm ha h
222+
· exfalso; rw [birkhoffSum_zero] at h; exact lt_irrefl 0 h
223+
| succ n => exact birkhoffAverage_iff_birkhoffSum (by positivity)
224+
conv =>
225+
enter [1, 1, x, 1, n]
226+
rw [this]
227+
228+
section MeasurePreserving
229+
230+
variable {f : α → α} [MeasurableSpace α] (μ : Measure α := by volume_tac) {n}
231+
(hf : MeasurePreserving f μ μ)
232+
233+
include hf
234+
235+
section Real
236+
237+
variable {g : α → ℝ} (hg : Integrable g μ)
238+
239+
include hg
240+
241+
lemma tendsto_setIntegral_on_birkhoffMax_support_birkhoffSupSet :
242+
Tendsto (fun n ↦ ∫ x in (birkhoffMax f g n).support, g x ∂μ) atTop
243+
(𝓝 <| ∫ x in birkhoffSupSet f g, g x ∂ μ) := by
244+
rw [birkhoffSupSet_eq_iSup_birkhoffMax_support]
245+
apply tendsto_setIntegral_of_monotone₀ _ _ hg.integrableOn
246+
· intros
247+
exact AEStronglyMeasurable.nullMeasurableSet_support (by measurability)
248+
· intro i j hij x
249+
have : 0 ≤ birkhoffMax f g i x := birkhoffMax_nonneg x
250+
have := (birkhoffMax f g).mono hij x
251+
grind [Function.mem_support]
252+
theorem setIntegral_nonneg_on_birkhoffSupSet :
253+
0 ≤ ∫ x in birkhoffSupSet f g, g x ∂μ := by
254+
apply ge_of_tendsto' (tendsto_setIntegral_on_birkhoffMax_support_birkhoffSupSet μ hf hg)
255+
intro n
256+
exact setIntegral_nonneg_on_birkhoffMax_support μ hf hg
257+
258+
variable [IsFiniteMeasure μ]
259+
260+
/-- **Maximal ergodic theorem**: The measure of the set where the supremum of the Birkhoff
261+
averages of `g` is greater than `a`, multiplied by `a`, is bounded above by the integral of
262+
`g` on this set. -/
263+
public theorem meas_birkhoffAverageSupSet_mul_le_integral (a : ℝ) (ha : 0 < a) :
264+
μ.real (birkhoffAverageSupSet f g a) • a ≤ ∫ x in birkhoffAverageSupSet f g a, g x ∂μ := by
265+
have p₁ := Integrable.sub hg (integrable_const a)
266+
calc
267+
_ = ∫ x in birkhoffSupSet f (g - fun _ ↦ a), a ∂μ := by
268+
rw [setIntegral_const, birkhoffAverageSupSet_eq_birkhoffSupSet ha]
269+
_ ≤ ∫ x in birkhoffSupSet f (g - fun _ ↦ a), a ∂μ +
270+
∫ x in birkhoffSupSet f (g - fun _ ↦ a), g x - a ∂μ := by
271+
exact le_add_of_nonneg_right (setIntegral_nonneg_on_birkhoffSupSet μ hf p₁)
272+
_ = ∫ x in birkhoffAverageSupSet f g a, g x ∂μ := by
273+
rw [← integral_add, birkhoffAverageSupSet_eq_birkhoffSupSet ha]
274+
· rcongr; grind
275+
· exact (integrable_const a).restrict
276+
· exact p₁.restrict
277+
278+
end Real
279+
280+
section NormedAddCommGroup
281+
282+
variable {E : Type*} [NormedAddCommGroup E] {g : α → E} (hg : Integrable g μ) [IsFiniteMeasure μ]
283+
284+
include hg
285+
286+
/-- **Maximal ergodic theorem** for group-valued functions: The measure of the set where
287+
the supremum of the Birkhoff averages of `‖g‖` is greater than `a`, multiplied by `a`, is
288+
bounded above by the norm of `g`. -/
289+
public theorem meas_birkhoffAverageSupSet_mul_le_norm (a : ℝ) (ha : 0 < a) :
290+
μ.real (birkhoffAverageSupSet f (fun x ↦ ‖g x‖) a) • a ≤ ∫ x, ‖g x‖ ∂μ :=
291+
calc
292+
_ ≤ ∫ x in birkhoffAverageSupSet f (fun x ↦ ‖g x‖) a, ‖g x‖ ∂μ := by
293+
exact meas_birkhoffAverageSupSet_mul_le_integral μ hf hg.norm a ha
294+
_ ≤ ∫ x, ‖g x‖ ∂μ := by
295+
exact setIntegral_le_integral hg.norm (ae_of_all _ (norm_nonneg <| g ·))
296+
297+
end NormedAddCommGroup
298+
299+
end MeasurePreserving

0 commit comments

Comments
 (0)