|
| 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 | +import Mathlib.Analysis.Oscillation |
| 9 | +import Mathlib.Dynamics.BirkhoffSum.Maximal |
| 10 | +import Mathlib.Tactic.Scratchpad |
| 11 | +import Mathlib.Dynamics.BirkhoffSum.NormedSpace |
| 12 | + |
| 13 | +open MeasureTheory Measure MeasurableSpace Filter Topology |
| 14 | + |
| 15 | +variable {α M : Type*} {f : α → α} {g : α → M} {n : ℕ} |
| 16 | + |
| 17 | +variable [MeasurableSpace α] (μ : Measure α) (hf : MeasurePreserving f μ μ) |
| 18 | + |
| 19 | +variable [NormedAddCommGroup M] (hg : Integrable g μ) [IsFiniteMeasure μ] [NormedSpace ℝ M] |
| 20 | + |
| 21 | +variable (M f) in |
| 22 | +def convergenceSet := |
| 23 | + {g : Lp M 1 μ | ∀ᵐ x ∂μ, oscillation (birkhoffAverage ℝ f g · x) atTop = 0} |
| 24 | + |
| 25 | +open scoped NNReal ENNReal |
| 26 | + |
| 27 | +theorem ENNReal.forall_pos_of_forall_nat_mul {motive : ℝ≥0∞ → Prop} (k : ℝ≥0∞) |
| 28 | + (h : ∀ ε > 0, motive (k * ε)) (hk₀ : k ≠ 0 := by positivity) (hk : k ≠ ∞ := by finiteness) : |
| 29 | + ∀ ε > 0, motive ε := fun ε hε ↦ |
| 30 | + ENNReal.mul_div_cancel (a := k) (b := ε) hk₀ hk ▸ h (ε / k) (ENNReal.div_pos hε.ne_zero hk) |
| 31 | + |
| 32 | +omit [IsFiniteMeasure μ] in |
| 33 | +lemma foo {f : α → ℝ≥0∞} (h : ∀ ε > 0, ∀ᵐ x ∂μ, f x ≤ ε) : ∀ᵐ x ∂μ, f x ≤ 0 := by |
| 34 | + have H : ∀ᵐ x ∂μ, ∀ n : ℕ, f x ≤ (n : ℝ≥0∞)⁻¹ := |
| 35 | + ae_all_iff.mpr fun n => h _ (ENNReal.inv_pos.mpr (by finiteness)) |
| 36 | + filter_upwards [H] with x hx |
| 37 | + refine le_of_forall_pos_le_add fun ε hε => ?_ |
| 38 | + obtain ⟨n, hn⟩ := ENNReal.exists_inv_nat_lt hε.ne_zero |
| 39 | + exact (hx n).trans (by simp [hn.le]) |
| 40 | + |
| 41 | +theorem EReal.coe_ennreal_iSup {ι : Sort*} [hι : Nonempty ι] (f : ι → ℝ≥0∞) : |
| 42 | + ((⨆ i, f i : ℝ≥0∞) : EReal) = ⨆ i, (f i : EReal) := by |
| 43 | + refine le_antisymm ?_ (iSup_le fun i ↦ mod_cast le_iSup f i) |
| 44 | + refine le_iSup_iff.mpr fun b hb ↦ ?_ |
| 45 | + have h0 : 0 ≤ b := hι.elim fun i ↦ (EReal.coe_ennreal_nonneg _).trans (hb i) |
| 46 | + obtain ⟨c, rfl⟩ : ∃ c : ℝ≥0∞, (c : EReal) = b := ⟨b.toENNReal, EReal.coe_toENNReal h0⟩ |
| 47 | + exact mod_cast iSup_le fun i ↦ mod_cast hb i |
| 48 | + |
| 49 | +include hf in |
| 50 | +theorem closed_convergenceSet : IsClosed (convergenceSet M f μ) := by |
| 51 | + refine isClosed_of_closure_subset (fun g hg ↦ ?_) |
| 52 | + rw [EMetric.mem_closure_iff] at hg |
| 53 | + simp only [convergenceSet, ← nonpos_iff_eq_zero, Set.mem_setOf_eq] |
| 54 | + apply foo |
| 55 | + refine ENNReal.forall_pos_of_forall_nat_mul 2 fun δ hδ ↦ ?_ |
| 56 | + apply ae_iff.mpr <| nonpos_iff_eq_zero.mp _ |
| 57 | + push Not |
| 58 | + have (h : Lp M 1 μ) (hh : h ∈ convergenceSet M f μ) : |
| 59 | + ∀ᵐ x ∂μ, 2 * δ < oscillation (birkhoffAverage ℝ f ⇑g · x) atTop → |
| 60 | + δ < birkhoffAverageSup f (‖(⇑g - ⇑h) ·‖) x := by |
| 61 | + filter_upwards [hh] with x hosc hx |
| 62 | + have := hx.trans_le <| oscillation_le_add_sub (f₂ := (birkhoffAverage ℝ f h · x)) .. |
| 63 | + rw [hosc] at this |
| 64 | + grw [oscillation_le_two_mul_iSup_enorm] at this |
| 65 | + simp [ENNReal.mul_lt_mul_iff_right] at this |
| 66 | + change _ < ⨆ n, ‖(birkhoffAverage ℝ f g - _) n x‖ₑ at this |
| 67 | + rw [← birkhoffAverage_sub] at this |
| 68 | + simp_rw [←ofReal_norm, ←EReal.coe_ennreal_lt_coe_ennreal_iff] at this |
| 69 | + simp_rw [EReal.coe_ennreal_iSup, EReal.coe_ennreal_ofReal, max_eq_left (norm_nonneg _)] at this |
| 70 | + exact this.trans_le (iSup_mono fun _ ↦ EReal.coe_le_coe norm_birkhoffAverage_le) |
| 71 | + refine le_of_forall_gt fun c hc ↦ ?_ |
| 72 | + |
| 73 | + apply measure_mono_ae (this _) |
| 74 | + |
| 75 | + |
| 76 | + done |
| 77 | + |
| 78 | +/- simp only [convergenceSet, ← nonpos_iff_eq_zero, Set.mem_setOf_eq] |
| 79 | + apply foo |
| 80 | + refine ENNReal.forall_pos_of_forall_nat_mul 2 fun δ hδ ↦ ?_ |
| 81 | + rcases hg δ hδ with ⟨h, hh, hh'⟩ |
| 82 | + filter_upwards [hh] with x hx |
| 83 | + apply le_of_forall_pos_le_add |
| 84 | + refine ENNReal.forall_pos_of_forall_nat_mul 2 fun ε hε ↦ ?_ |
| 85 | + apply oscillation_le_add_sub (f₂ := (birkhoffAverage ℝ f h · x)) .. |>.trans |
| 86 | + change _ + oscillation ((birkhoffAverage ℝ f g - birkhoffAverage ℝ f h) · x) _ ≤ _ |
| 87 | + rw [←birkhoffAverage_sub, hx, zero_add, ←mul_add] |
| 88 | + apply oscillation_le_two_mul_norm_max _ _ |>.trans |
| 89 | + gcongr |
| 90 | + simp_rw [←ofReal_norm] |
| 91 | + apply (iSup_mono fun _ ↦ ENNReal.ofReal_le_ofReal norm_birkhoffAverage_le).trans |
| 92 | + apply EReal.coe_ennreal_le_coe_ennreal_iff.mp |
| 93 | + simp only [Pi.sub_apply, EReal.coe_ennreal_iSup, EReal.coe_ennreal_ofReal, EReal.coe_max, |
| 94 | + EReal.coe_zero, EReal.coe_ennreal_add, iSup_le_iff, sup_le_iff] |
| 95 | + push ∀ _, _ |
| 96 | + rw [← iSup_le_iff, ← birkhoffAverageSup] |
| 97 | +
|
| 98 | +
|
| 99 | + push_cast |
| 100 | + simp |
| 101 | + -- apply iSup_le_iff.mpr |
| 102 | + -- intro i |
| 103 | + done |
| 104 | + -/ |
0 commit comments