|
| 1 | +/- |
| 2 | +Copyright (c) 2021 Rémy Degenne. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Rémy Degenne |
| 5 | +
|
| 6 | +! This file was ported from Lean 3 source module measure_theory.function.ess_sup |
| 7 | +! leanprover-community/mathlib commit bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf |
| 8 | +! Please do not edit these lines, except to modify the commit id |
| 9 | +! if you have ported upstream changes. |
| 10 | +-/ |
| 11 | +import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic |
| 12 | +import Mathlib.Order.Filter.ENNReal |
| 13 | + |
| 14 | +/-! |
| 15 | +# Essential supremum and infimum |
| 16 | +We define the essential supremum and infimum of a function `f : α → β` with respect to a measure |
| 17 | +`μ` on `α`. The essential supremum is the infimum of the constants `c : β` such that `f x ≤ c` |
| 18 | +almost everywhere. |
| 19 | +
|
| 20 | +TODO: The essential supremum of functions `α → ℝ≥0∞` is used in particular to define the norm in |
| 21 | +the `L∞` space (see MeasureTheory/LpSpace.lean). |
| 22 | +
|
| 23 | +There is a different quantity which is sometimes also called essential supremum: the least |
| 24 | +upper-bound among measurable functions of a family of measurable functions (in an almost-everywhere |
| 25 | +sense). We do not define that quantity here, which is simply the supremum of a map with values in |
| 26 | +`α →ₘ[μ] β` (see MeasureTheory/AEEqFun.lean). |
| 27 | +
|
| 28 | +## Main definitions |
| 29 | +
|
| 30 | +* `essSup f μ := μ.ae.limsup f` |
| 31 | +* `essInf f μ := μ.ae.liminf f` |
| 32 | +-/ |
| 33 | + |
| 34 | + |
| 35 | +open MeasureTheory Filter Set TopologicalSpace |
| 36 | + |
| 37 | +open ENNReal MeasureTheory NNReal |
| 38 | + |
| 39 | +variable {α β : Type _} {m : MeasurableSpace α} {μ ν : Measure α} |
| 40 | + |
| 41 | +section ConditionallyCompleteLattice |
| 42 | + |
| 43 | +variable [ConditionallyCompleteLattice β] |
| 44 | + |
| 45 | +/-- Essential supremum of `f` with respect to measure `μ`: the smallest `c : β` such that |
| 46 | +`f x ≤ c` a.e. -/ |
| 47 | +def essSup {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) := |
| 48 | + μ.ae.limsup f |
| 49 | +#align ess_sup essSup |
| 50 | + |
| 51 | +/-- Essential infimum of `f` with respect to measure `μ`: the greatest `c : β` such that |
| 52 | +`c ≤ f x` a.e. -/ |
| 53 | +def essInf {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) := |
| 54 | + μ.ae.liminf f |
| 55 | +#align ess_inf essInf |
| 56 | + |
| 57 | +theorem essSup_congr_ae {f g : α → β} (hfg : f =ᵐ[μ] g) : essSup f μ = essSup g μ := |
| 58 | + limsup_congr hfg |
| 59 | +#align ess_sup_congr_ae essSup_congr_ae |
| 60 | + |
| 61 | +theorem essInf_congr_ae {f g : α → β} (hfg : f =ᵐ[μ] g) : essInf f μ = essInf g μ := |
| 62 | + @essSup_congr_ae α βᵒᵈ _ _ _ _ _ hfg |
| 63 | +#align ess_inf_congr_ae essInf_congr_ae |
| 64 | + |
| 65 | +@[simp] |
| 66 | +theorem essSup_const' [μ.ae.NeBot] (c : β) : essSup (fun _ : α => c) μ = c := |
| 67 | + limsup_const _ |
| 68 | +#align ess_sup_const' essSup_const' |
| 69 | + |
| 70 | +@[simp] |
| 71 | +theorem essInf_const' [μ.ae.NeBot] (c : β) : essInf (fun _ : α => c) μ = c := |
| 72 | + liminf_const _ |
| 73 | +#align ess_inf_const' essInf_const' |
| 74 | + |
| 75 | +theorem essSup_const (c : β) (hμ : μ ≠ 0) : essSup (fun _ : α => c) μ = c := by |
| 76 | + rw [← ae_neBot] at hμ |
| 77 | + exact essSup_const' _ |
| 78 | +#align ess_sup_const essSup_const |
| 79 | + |
| 80 | +theorem essInf_const (c : β) (hμ : μ ≠ 0) : essInf (fun _ : α => c) μ = c := by |
| 81 | + rw [← ae_neBot] at hμ |
| 82 | + exact essInf_const' _ |
| 83 | +#align ess_inf_const essInf_const |
| 84 | + |
| 85 | +end ConditionallyCompleteLattice |
| 86 | + |
| 87 | +section ConditionallyCompleteLinearOrder |
| 88 | + |
| 89 | +variable [ConditionallyCompleteLinearOrder β] {x : β} {f : α → β} |
| 90 | + |
| 91 | +theorem essSup_eq_sInf {m : MeasurableSpace α} (μ : Measure α) (f : α → β) : |
| 92 | + essSup f μ = sInf { a | μ { x | a < f x } = 0 } := by |
| 93 | + dsimp [essSup, limsup, limsSup] |
| 94 | + simp only [eventually_map, ae_iff, not_le] |
| 95 | +#align ess_sup_eq_Inf essSup_eq_sInf |
| 96 | + |
| 97 | +theorem essInf_eq_sSup {m : MeasurableSpace α} (μ : Measure α) (f : α → β) : |
| 98 | + essInf f μ = sSup { a | μ { x | f x < a } = 0 } := by |
| 99 | + dsimp [essInf, liminf, limsInf] |
| 100 | + simp only [eventually_map, ae_iff, not_le] |
| 101 | +#align ess_inf_eq_Sup essInf_eq_sSup |
| 102 | + |
| 103 | +theorem ae_lt_of_essSup_lt (hx : essSup f μ < x) |
| 104 | + (hf : IsBoundedUnder (· ≤ ·) μ.ae f := by isBoundedDefault) : |
| 105 | + ∀ᵐ y ∂μ, f y < x := |
| 106 | + eventually_lt_of_limsup_lt hx hf |
| 107 | +#align ae_lt_of_ess_sup_lt ae_lt_of_essSup_lt |
| 108 | + |
| 109 | +theorem ae_lt_of_lt_essInf (hx : x < essInf f μ) |
| 110 | + (hf : IsBoundedUnder (· ≥ ·) μ.ae f := by isBoundedDefault) : |
| 111 | + ∀ᵐ y ∂μ, x < f y := |
| 112 | + eventually_lt_of_lt_liminf hx hf |
| 113 | +#align ae_lt_of_lt_ess_inf ae_lt_of_lt_essInf |
| 114 | + |
| 115 | +variable [TopologicalSpace β] [FirstCountableTopology β] [OrderTopology β] |
| 116 | + |
| 117 | +theorem ae_le_essSup |
| 118 | + (hf : IsBoundedUnder (· ≤ ·) μ.ae f := by isBoundedDefault) : |
| 119 | + ∀ᵐ y ∂μ, f y ≤ essSup f μ := |
| 120 | + eventually_le_limsup hf |
| 121 | +#align ae_le_ess_sup ae_le_essSup |
| 122 | + |
| 123 | +theorem ae_essInf_le |
| 124 | + (hf : IsBoundedUnder (· ≥ ·) μ.ae f := by isBoundedDefault) : |
| 125 | + ∀ᵐ y ∂μ, essInf f μ ≤ f y := |
| 126 | + eventually_liminf_le hf |
| 127 | +#align ae_ess_inf_le ae_essInf_le |
| 128 | + |
| 129 | +theorem meas_essSup_lt |
| 130 | + (hf : IsBoundedUnder (· ≤ ·) μ.ae f := by isBoundedDefault) : |
| 131 | + μ { y | essSup f μ < f y } = 0 := by |
| 132 | + simp_rw [← not_le] |
| 133 | + exact ae_le_essSup hf |
| 134 | +#align meas_ess_sup_lt meas_essSup_lt |
| 135 | + |
| 136 | +theorem meas_lt_essInf |
| 137 | + (hf : IsBoundedUnder (· ≥ ·) μ.ae f := by isBoundedDefault) : |
| 138 | + μ { y | f y < essInf f μ } = 0 := by |
| 139 | + simp_rw [← not_le] |
| 140 | + exact ae_essInf_le hf |
| 141 | +#align meas_lt_ess_inf meas_lt_essInf |
| 142 | + |
| 143 | +end ConditionallyCompleteLinearOrder |
| 144 | + |
| 145 | +section CompleteLattice |
| 146 | + |
| 147 | +variable [CompleteLattice β] |
| 148 | + |
| 149 | +@[simp] |
| 150 | +theorem essSup_measure_zero {m : MeasurableSpace α} {f : α → β} : essSup f (0 : Measure α) = ⊥ := |
| 151 | + le_bot_iff.mp (sInf_le (by simp [Set.mem_setOf_eq, EventuallyLE, ae_iff])) |
| 152 | +#align ess_sup_measure_zero essSup_measure_zero |
| 153 | + |
| 154 | +@[simp] |
| 155 | +theorem essInf_measure_zero {_ : MeasurableSpace α} {f : α → β} : essInf f (0 : Measure α) = ⊤ := |
| 156 | + @essSup_measure_zero α βᵒᵈ _ _ _ |
| 157 | +#align ess_inf_measure_zero essInf_measure_zero |
| 158 | + |
| 159 | +theorem essSup_mono_ae {f g : α → β} (hfg : f ≤ᵐ[μ] g) : essSup f μ ≤ essSup g μ := |
| 160 | + limsup_le_limsup hfg |
| 161 | +#align ess_sup_mono_ae essSup_mono_ae |
| 162 | + |
| 163 | +theorem essInf_mono_ae {f g : α → β} (hfg : f ≤ᵐ[μ] g) : essInf f μ ≤ essInf g μ := |
| 164 | + liminf_le_liminf hfg |
| 165 | +#align ess_inf_mono_ae essInf_mono_ae |
| 166 | + |
| 167 | +theorem essSup_le_of_ae_le {f : α → β} (c : β) (hf : f ≤ᵐ[μ] fun _ => c) : essSup f μ ≤ c := by |
| 168 | + refine' (essSup_mono_ae hf).trans _ |
| 169 | + by_cases hμ : μ = 0 |
| 170 | + · simp [hμ] |
| 171 | + · rwa [essSup_const] |
| 172 | +#align ess_sup_le_of_ae_le essSup_le_of_ae_le |
| 173 | + |
| 174 | +theorem le_essInf_of_ae_le {f : α → β} (c : β) (hf : (fun _ => c) ≤ᵐ[μ] f) : c ≤ essInf f μ := |
| 175 | + @essSup_le_of_ae_le α βᵒᵈ _ _ _ _ c hf |
| 176 | +#align le_ess_inf_of_ae_le le_essInf_of_ae_le |
| 177 | + |
| 178 | +theorem essSup_const_bot : essSup (fun _ : α => (⊥ : β)) μ = (⊥ : β) := |
| 179 | + limsup_const_bot |
| 180 | +#align ess_sup_const_bot essSup_const_bot |
| 181 | + |
| 182 | +theorem essInf_const_top : essInf (fun _ : α => (⊤ : β)) μ = (⊤ : β) := |
| 183 | + liminf_const_top |
| 184 | +#align ess_inf_const_top essInf_const_top |
| 185 | + |
| 186 | +theorem OrderIso.essSup_apply {m : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β) |
| 187 | + (μ : Measure α) (g : β ≃o γ) : g (essSup f μ) = essSup (fun x => g (f x)) μ := by |
| 188 | + refine' OrderIso.limsup_apply g _ _ _ _ |
| 189 | + all_goals isBoundedDefault |
| 190 | +#align order_iso.ess_sup_apply OrderIso.essSup_apply |
| 191 | + |
| 192 | +theorem OrderIso.essInf_apply {_ : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β) |
| 193 | + (μ : Measure α) (g : β ≃o γ) : g (essInf f μ) = essInf (fun x => g (f x)) μ := |
| 194 | + @OrderIso.essSup_apply α βᵒᵈ _ _ γᵒᵈ _ _ _ g.dual |
| 195 | +#align order_iso.ess_inf_apply OrderIso.essInf_apply |
| 196 | + |
| 197 | +theorem essSup_mono_measure {f : α → β} (hμν : ν ≪ μ) : essSup f ν ≤ essSup f μ := by |
| 198 | + refine' limsup_le_limsup_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _ |
| 199 | + all_goals isBoundedDefault |
| 200 | +#align ess_sup_mono_measure essSup_mono_measure |
| 201 | + |
| 202 | +theorem essSup_mono_measure' {α : Type _} {β : Type _} {_ : MeasurableSpace α} |
| 203 | + {μ ν : MeasureTheory.Measure α} [CompleteLattice β] {f : α → β} (hμν : ν ≤ μ) : |
| 204 | + essSup f ν ≤ essSup f μ := |
| 205 | + essSup_mono_measure (Measure.absolutelyContinuous_of_le hμν) |
| 206 | +#align ess_sup_mono_measure' essSup_mono_measure' |
| 207 | + |
| 208 | +theorem essInf_antitone_measure {f : α → β} (hμν : μ ≪ ν) : essInf f ν ≤ essInf f μ := by |
| 209 | + refine' liminf_le_liminf_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _ |
| 210 | + all_goals isBoundedDefault |
| 211 | +#align ess_inf_antitone_measure essInf_antitone_measure |
| 212 | + |
| 213 | +theorem essSup_smul_measure {f : α → β} {c : ℝ≥0∞} (hc : c ≠ 0) : |
| 214 | + essSup f (c • μ) = essSup f μ := by |
| 215 | + simp_rw [essSup] |
| 216 | + suffices h_smul : (c • μ).ae = μ.ae; · rw [h_smul] |
| 217 | + ext1 |
| 218 | + simp_rw [mem_ae_iff] |
| 219 | + simp [hc] |
| 220 | +#align ess_sup_smul_measure essSup_smul_measure |
| 221 | + |
| 222 | +section TopologicalSpace |
| 223 | + |
| 224 | +variable {γ : Type _} {mγ : MeasurableSpace γ} {f : α → γ} {g : γ → β} |
| 225 | + |
| 226 | +theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) : |
| 227 | + essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by |
| 228 | + refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault) |
| 229 | + simp_rw [Filter.mem_map] |
| 230 | + have : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t) := by |
| 231 | + ext1 x |
| 232 | + simp_rw [Set.mem_preimage, Function.comp] |
| 233 | + rw [this] |
| 234 | + exact fun h => mem_ae_of_mem_ae_map hf h |
| 235 | +#align ess_sup_comp_le_ess_sup_map_measure essSup_comp_le_essSup_map_measure |
| 236 | + |
| 237 | +theorem MeasurableEmbedding.essSup_map_measure (hf : MeasurableEmbedding f) : |
| 238 | + essSup g (Measure.map f μ) = essSup (g ∘ f) μ := by |
| 239 | + refine' le_antisymm _ (essSup_comp_le_essSup_map_measure hf.measurable.aemeasurable) |
| 240 | + refine' limsSup_le_limsSup (by isBoundedDefault) (by isBoundedDefault) (fun c h_le => _) |
| 241 | + rw [eventually_map] at h_le ⊢ |
| 242 | + exact hf.ae_map_iff.mpr h_le |
| 243 | +#align measurable_embedding.ess_sup_map_measure MeasurableEmbedding.essSup_map_measure |
| 244 | + |
| 245 | +variable [MeasurableSpace β] [TopologicalSpace β] [SecondCountableTopology β] |
| 246 | + [OrderClosedTopology β] [OpensMeasurableSpace β] |
| 247 | + |
| 248 | +theorem essSup_map_measure_of_measurable (hg : Measurable g) (hf : AEMeasurable f μ) : |
| 249 | + essSup g (Measure.map f μ) = essSup (g ∘ f) μ := by |
| 250 | + refine' le_antisymm _ (essSup_comp_le_essSup_map_measure hf) |
| 251 | + refine' limsSup_le_limsSup (by isBoundedDefault) (by isBoundedDefault) (fun c h_le => _) |
| 252 | + rw [eventually_map] at h_le ⊢ |
| 253 | + rw [ae_map_iff hf (measurableSet_le hg measurable_const)] |
| 254 | + exact h_le |
| 255 | +#align ess_sup_map_measure_of_measurable essSup_map_measure_of_measurable |
| 256 | + |
| 257 | +theorem essSup_map_measure (hg : AEMeasurable g (Measure.map f μ)) (hf : AEMeasurable f μ) : |
| 258 | + essSup g (Measure.map f μ) = essSup (g ∘ f) μ := by |
| 259 | + rw [essSup_congr_ae hg.ae_eq_mk, essSup_map_measure_of_measurable hg.measurable_mk hf] |
| 260 | + refine' essSup_congr_ae _ |
| 261 | + have h_eq := ae_of_ae_map hf hg.ae_eq_mk |
| 262 | + rw [← EventuallyEq] at h_eq |
| 263 | + exact h_eq.symm |
| 264 | +#align ess_sup_map_measure essSup_map_measure |
| 265 | + |
| 266 | +end TopologicalSpace |
| 267 | + |
| 268 | +end CompleteLattice |
| 269 | + |
| 270 | +section CompleteLinearOrder |
| 271 | + |
| 272 | +variable [CompleteLinearOrder β] |
| 273 | +theorem essSup_indicator_eq_essSup_restrict [Zero β] {s : Set α} {f : α → β} |
| 274 | + (hf : 0 ≤ᵐ[μ.restrict s] f) (hs : MeasurableSet s) (hs_not_null : μ s ≠ 0) : |
| 275 | + essSup (s.indicator f) μ = essSup f (μ.restrict s) := by |
| 276 | + refine' |
| 277 | + le_antisymm _ |
| 278 | + (limsSup_le_limsSup_of_le (map_restrict_ae_le_map_indicator_ae hs) |
| 279 | + (by isBoundedDefault) (by isBoundedDefault) ) |
| 280 | + refine' limsSup_le_limsSup (by isBoundedDefault) (by isBoundedDefault) (fun c h_restrict_le => _) |
| 281 | + rw [eventually_map] at h_restrict_le⊢ |
| 282 | + rw [ae_restrict_iff' hs] at h_restrict_le |
| 283 | + have hc : 0 ≤ c := by |
| 284 | + rsuffices ⟨x, hx⟩ : ∃ x, 0 ≤ f x ∧ f x ≤ c |
| 285 | + exact hx.1.trans hx.2 |
| 286 | + refine' Frequently.exists _ |
| 287 | + · exact μ.ae |
| 288 | + rw [EventuallyLE, ae_restrict_iff' hs] at hf |
| 289 | + have hs' : ∃ᵐ x ∂μ, x ∈ s := by |
| 290 | + contrapose! hs_not_null |
| 291 | + rw [not_frequently, ae_iff] at hs_not_null |
| 292 | + suffices { a : α | ¬a ∉ s } = s by rwa [← this] |
| 293 | + simp |
| 294 | + refine' hs'.mp (hf.mp (h_restrict_le.mono fun x hxs_imp_c hxf_nonneg hxs => _)) |
| 295 | + rw [Pi.zero_apply] at hxf_nonneg |
| 296 | + exact ⟨hxf_nonneg hxs, hxs_imp_c hxs⟩ |
| 297 | + refine' h_restrict_le.mono fun x hxc => _ |
| 298 | + by_cases hxs : x ∈ s |
| 299 | + · simpa [hxs] using hxc hxs |
| 300 | + · simpa [hxs] using hc |
| 301 | +#align ess_sup_indicator_eq_ess_sup_restrict essSup_indicator_eq_essSup_restrict |
| 302 | + |
| 303 | +end CompleteLinearOrder |
| 304 | + |
| 305 | +namespace ENNReal |
| 306 | + |
| 307 | +variable {f : α → ℝ≥0∞} |
| 308 | + |
| 309 | +theorem ae_le_essSup (f : α → ℝ≥0∞) : ∀ᵐ y ∂μ, f y ≤ essSup f μ := |
| 310 | + eventually_le_limsup f |
| 311 | +#align ennreal.ae_le_ess_sup ENNReal.ae_le_essSup |
| 312 | + |
| 313 | +@[simp] |
| 314 | +theorem essSup_eq_zero_iff : essSup f μ = 0 ↔ f =ᵐ[μ] 0 := |
| 315 | + limsup_eq_zero_iff |
| 316 | +#align ennreal.ess_sup_eq_zero_iff ENNReal.essSup_eq_zero_iff |
| 317 | + |
| 318 | +theorem essSup_const_mul {a : ℝ≥0∞} : essSup (fun x : α => a * f x) μ = a * essSup f μ := |
| 319 | + limsup_const_mul |
| 320 | +#align ennreal.ess_sup_const_mul ENNReal.essSup_const_mul |
| 321 | + |
| 322 | +theorem essSup_mul_le (f g : α → ℝ≥0∞) : essSup (f * g) μ ≤ essSup f μ * essSup g μ := |
| 323 | + limsup_mul_le f g |
| 324 | +#align ennreal.ess_sup_mul_le ENNReal.essSup_mul_le |
| 325 | + |
| 326 | +theorem essSup_add_le (f g : α → ℝ≥0∞) : essSup (f + g) μ ≤ essSup f μ + essSup g μ := |
| 327 | + limsup_add_le f g |
| 328 | +#align ennreal.ess_sup_add_le ENNReal.essSup_add_le |
| 329 | + |
| 330 | +theorem essSup_liminf_le {ι} [Countable ι] [LinearOrder ι] (f : ι → α → ℝ≥0∞) : |
| 331 | + essSup (fun x => atTop.liminf fun n => f n x) μ ≤ |
| 332 | + atTop.liminf fun n => essSup (fun x => f n x) μ := by |
| 333 | + simp_rw [essSup] |
| 334 | + exact ENNReal.limsup_liminf_le_liminf_limsup fun a b => f b a |
| 335 | +#align ennreal.ess_sup_liminf_le ENNReal.essSup_liminf_le |
| 336 | + |
| 337 | +theorem coe_essSup {f : α → ℝ≥0} (hf : IsBoundedUnder (· ≤ ·) μ.ae f) : |
| 338 | + ((essSup f μ : ℝ≥0) : ℝ≥0∞) = essSup (fun x => (f x : ℝ≥0∞)) μ := |
| 339 | + (ENNReal.coe_sInf <| hf).trans <| |
| 340 | + eq_of_forall_le_iff fun r => by |
| 341 | + simp [essSup, limsup, limsSup, eventually_map, ENNReal.forall_ennreal]; rfl |
| 342 | +#align ennreal.coe_ess_sup ENNReal.coe_essSup |
| 343 | + |
| 344 | +end ENNReal |
0 commit comments