Skip to content

Commit b4b0314

Browse files
committed
feat: more eLpNorm API (#19293)
Make more arguments to rewriting lemmas explicit, more arguments to the other lemmas implicit. Add various lemmas. From LeanAPAP
1 parent 5d0ac04 commit b4b0314

File tree

2 files changed

+73
-27
lines changed

2 files changed

+73
-27
lines changed

Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean

Lines changed: 71 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Rémy Degenne, Sébastien Gouëzel
55
-/
66
import Mathlib.Analysis.NormedSpace.IndicatorFunction
7+
import Mathlib.Data.Fintype.Order
78
import Mathlib.MeasureTheory.Function.EssSup
89
import Mathlib.MeasureTheory.Function.AEEqFun
910
import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic
@@ -37,7 +38,7 @@ noncomputable section
3738

3839
open TopologicalSpace MeasureTheory Filter
3940

40-
open scoped NNReal ENNReal Topology
41+
open scoped NNReal ENNReal Topology ComplexConjugate
4142

4243
variable {α E F G : Type*} {m m0 : MeasurableSpace α} {p : ℝ≥0∞} {q : ℝ} {μ ν : Measure α}
4344
[NormedAddCommGroup E] [NormedAddCommGroup F] [NormedAddCommGroup G]
@@ -304,19 +305,23 @@ end Zero
304305
section Neg
305306

306307
@[simp]
307-
theorem eLpNorm'_neg {f : α → F} : eLpNorm' (-f) q μ = eLpNorm' f q μ := by simp [eLpNorm']
308+
theorem eLpNorm'_neg (f : α → F) (q : ℝ) (μ : Measure α) : eLpNorm' (-f) q μ = eLpNorm' f q μ := by
309+
simp [eLpNorm']
308310

309311
@[deprecated (since := "2024-07-27")]
310312
alias snorm'_neg := eLpNorm'_neg
311313

312314
@[simp]
313-
theorem eLpNorm_neg {f : α → F} : eLpNorm (-f) p μ = eLpNorm f p μ := by
315+
theorem eLpNorm_neg (f : α → F) (p : ℝ≥0∞) (μ : Measure α) : eLpNorm (-f) p μ = eLpNorm f p μ := by
314316
by_cases h0 : p = 0
315317
· simp [h0]
316318
by_cases h_top : p = ∞
317319
· simp [h_top, eLpNormEssSup]
318320
simp [eLpNorm_eq_eLpNorm' h0 h_top]
319321

322+
lemma eLpNorm_sub_comm (f g : α → E) (p : ℝ≥0∞) (μ : Measure α) :
323+
eLpNorm (f - g) p μ = eLpNorm (g - f) p μ := by simp [← eLpNorm_neg (f := f - g)]
324+
320325
@[deprecated (since := "2024-07-27")]
321326
alias snorm_neg := eLpNorm_neg
322327

@@ -446,6 +451,8 @@ theorem memℒp_const_iff {p : ℝ≥0∞} {c : E} (hp_ne_zero : p ≠ 0) (hp_ne
446451

447452
end Const
448453

454+
variable {f : α → F}
455+
449456
lemma eLpNorm'_mono_nnnorm_ae {f : α → F} {g : α → G} (hq : 0 ≤ q) (h : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ ‖g x‖₊) :
450457
eLpNorm' f q μ ≤ eLpNorm' g q μ := by
451458
simp only [eLpNorm']
@@ -828,8 +835,9 @@ private theorem eLpNorm_smul_measure_of_ne_zero_of_ne_top {p : ℝ≥0∞} (hp_n
828835
@[deprecated (since := "2024-07-27")]
829836
alias snorm_smul_measure_of_ne_zero_of_ne_top := eLpNorm_smul_measure_of_ne_zero_of_ne_top
830837

831-
theorem eLpNorm_smul_measure_of_ne_zero {p : ℝ≥0∞} {f : α → F} {c : ℝ≥0∞} (hc : c ≠ 0) :
832-
eLpNorm f p (c • μ) = c ^ (1 / p).toReal • eLpNorm f p μ := by
838+
/-- See `eLpNorm_smul_measure_of_ne_zero'` for a version with scalar multiplication by `ℝ≥0`. -/
839+
theorem eLpNorm_smul_measure_of_ne_zero {c : ℝ≥0∞} (hc : c ≠ 0) (f : α → F) (p : ℝ≥0∞)
840+
(μ : Measure α) : eLpNorm f p (c • μ) = c ^ (1 / p).toReal • eLpNorm f p μ := by
833841
by_cases hp0 : p = 0
834842
· simp [hp0]
835843
by_cases hp_top : p = ∞
@@ -839,12 +847,24 @@ theorem eLpNorm_smul_measure_of_ne_zero {p : ℝ≥0∞} {f : α → F} {c : ℝ
839847
@[deprecated (since := "2024-07-27")]
840848
alias snorm_smul_measure_of_ne_zero := eLpNorm_smul_measure_of_ne_zero
841849

842-
theorem eLpNorm_smul_measure_of_ne_top {p : ℝ≥0∞} (hp_ne_top : p ≠ ∞) {f : α → F} (c : ℝ≥0∞) :
850+
/-- See `eLpNorm_smul_measure_of_ne_zero` for a version with scalar multiplication by `ℝ≥0∞`. -/
851+
lemma eLpNorm_smul_measure_of_ne_zero' {c : ℝ≥0} (hc : c ≠ 0) (f : α → F) (p : ℝ≥0∞)
852+
(μ : Measure α) : eLpNorm f p (c • μ) = c ^ p.toReal⁻¹ • eLpNorm f p μ :=
853+
(eLpNorm_smul_measure_of_ne_zero (ENNReal.coe_ne_zero.2 hc) ..).trans (by simp; norm_cast)
854+
855+
/-- See `eLpNorm_smul_measure_of_ne_top'` for a version with scalar multiplication by `ℝ≥0`. -/
856+
theorem eLpNorm_smul_measure_of_ne_top {p : ℝ≥0∞} (hp_ne_top : p ≠ ∞) (f : α → F) (c : ℝ≥0∞) :
843857
eLpNorm f p (c • μ) = c ^ (1 / p).toReal • eLpNorm f p μ := by
844858
by_cases hp0 : p = 0
845859
· simp [hp0]
846860
· exact eLpNorm_smul_measure_of_ne_zero_of_ne_top hp0 hp_ne_top c
847861

862+
/-- See `eLpNorm_smul_measure_of_ne_top'` for a version with scalar multiplication by `ℝ≥0∞`. -/
863+
lemma eLpNorm_smul_measure_of_ne_top' (hp : p ≠ ∞) (c : ℝ≥0) (f : α → F) :
864+
eLpNorm f p (c • μ) = c ^ p.toReal⁻¹ • eLpNorm f p μ := by
865+
have : 0 ≤ p.toReal⁻¹ := by positivity
866+
refine (eLpNorm_smul_measure_of_ne_top hp ..).trans ?_
867+
simp [ENNReal.smul_def, ENNReal.coe_rpow_of_nonneg, this]
848868
@[deprecated (since := "2024-07-27")]
849869
alias snorm_smul_measure_of_ne_top := eLpNorm_smul_measure_of_ne_top
850870

@@ -987,12 +1007,37 @@ theorem ae_le_eLpNormEssSup {f : α → F} : ∀ᵐ y ∂μ, ‖f y‖₊ ≤ eL
9871007
@[deprecated (since := "2024-07-27")]
9881008
alias ae_le_snormEssSup := ae_le_eLpNormEssSup
9891009

1010+
lemma eLpNormEssSup_lt_top_iff_isBoundedUnder :
1011+
eLpNormEssSup f μ < ⊤ ↔ IsBoundedUnder (· ≤ ·) (ae μ) fun x ↦ ‖f x‖₊ where
1012+
mp h := ⟨(eLpNormEssSup f μ).toNNReal, by
1013+
simp_rw [← ENNReal.coe_le_coe, ENNReal.coe_toNNReal h.ne]; exact ae_le_eLpNormEssSup⟩
1014+
mpr := by rintro ⟨C, hC⟩; exact eLpNormEssSup_lt_top_of_ae_nnnorm_bound (C := C) hC
1015+
9901016
theorem meas_eLpNormEssSup_lt {f : α → F} : μ { y | eLpNormEssSup f μ < ‖f y‖₊ } = 0 :=
9911017
meas_essSup_lt
9921018

9931019
@[deprecated (since := "2024-07-27")]
9941020
alias meas_snormEssSup_lt := meas_eLpNormEssSup_lt
9951021

1022+
lemma eLpNorm_lt_top_of_finite [Finite α] [IsFiniteMeasure μ] : eLpNorm f p μ < ∞ := by
1023+
obtain rfl | hp₀ := eq_or_ne p 0
1024+
· simp
1025+
obtain rfl | hp := eq_or_ne p ∞
1026+
· simp only [eLpNorm_exponent_top, eLpNormEssSup_lt_top_iff_isBoundedUnder]
1027+
exact .le_of_finite
1028+
rw [eLpNorm_lt_top_iff_lintegral_rpow_nnnorm_lt_top hp₀ hp]
1029+
refine IsFiniteMeasure.lintegral_lt_top_of_bounded_to_ennreal μ ?_
1030+
simp_rw [← ENNReal.coe_rpow_of_nonneg _ ENNReal.toReal_nonneg]
1031+
norm_cast
1032+
exact Finite.exists_le _
1033+
1034+
@[simp] lemma Memℒp.of_discrete [DiscreteMeasurableSpace α] [Finite α] [IsFiniteMeasure μ] :
1035+
Memℒp f p μ :=
1036+
let ⟨C, hC⟩ := Finite.exists_le (‖f ·‖₊); .of_bound .of_finite C <| .of_forall hC
1037+
1038+
@[simp] lemma eLpNorm_of_isEmpty [IsEmpty α] (f : α → E) (p : ℝ≥0∞) : eLpNorm f p μ = 0 := by
1039+
simp [Subsingleton.elim f 0]
1040+
9961041
lemma eLpNormEssSup_piecewise {s : Set α} (f g : α → E) [DecidablePred (· ∈ s)]
9971042
(hs : MeasurableSet s) :
9981043
eLpNormEssSup (Set.piecewise s f g) μ
@@ -1196,37 +1241,33 @@ In this section we show inequalities on the norm.
11961241
section BoundedSMul
11971242

11981243
variable {𝕜 : Type*} [NormedRing 𝕜] [MulActionWithZero 𝕜 E] [MulActionWithZero 𝕜 F]
1199-
variable [BoundedSMul 𝕜 E] [BoundedSMul 𝕜 F]
1244+
variable [BoundedSMul 𝕜 E] [BoundedSMul 𝕜 F] {c : 𝕜} {f : α → F}
12001245

1201-
theorem eLpNorm'_const_smul_le (c : 𝕜) (f : α → F) (hq_pos : 0 < q) :
1202-
eLpNorm' (c • f) q μ ≤ ‖c‖₊ • eLpNorm' f q μ :=
1203-
eLpNorm'_le_nnreal_smul_eLpNorm'_of_ae_le_mul (Eventually.of_forall fun _ => nnnorm_smul_le _ _)
1204-
hq_pos
1246+
theorem eLpNorm'_const_smul_le (hq : 0 < q) : eLpNorm' (c • f) q μ ≤ ‖c‖₊ • eLpNorm' f q μ :=
1247+
eLpNorm'_le_nnreal_smul_eLpNorm'_of_ae_le_mul (Eventually.of_forall fun _ => nnnorm_smul_le ..) hq
12051248

12061249
@[deprecated (since := "2024-07-27")]
12071250
alias snorm'_const_smul_le := eLpNorm'_const_smul_le
12081251

1209-
theorem eLpNormEssSup_const_smul_le (c : 𝕜) (f : α → F) :
1210-
eLpNormEssSup (c • f) μ ≤ ‖c‖₊ • eLpNormEssSup f μ :=
1252+
theorem eLpNormEssSup_const_smul_le : eLpNormEssSup (c • f) μ ≤ ‖c‖₊ • eLpNormEssSup f μ :=
12111253
eLpNormEssSup_le_nnreal_smul_eLpNormEssSup_of_ae_le_mul
12121254
(Eventually.of_forall fun _ => by simp [nnnorm_smul_le])
12131255

12141256
@[deprecated (since := "2024-07-27")]
12151257
alias snormEssSup_const_smul_le := eLpNormEssSup_const_smul_le
12161258

1217-
theorem eLpNorm_const_smul_le (c : 𝕜) (f : α → F) : eLpNorm (c • f) p μ ≤ ‖c‖₊ • eLpNorm f p μ :=
1259+
theorem eLpNorm_const_smul_le : eLpNorm (c • f) p μ ≤ ‖c‖₊ • eLpNorm f p μ :=
12181260
eLpNorm_le_nnreal_smul_eLpNorm_of_ae_le_mul
12191261
(Eventually.of_forall fun _ => by simp [nnnorm_smul_le]) _
12201262

12211263
@[deprecated (since := "2024-07-27")]
12221264
alias snorm_const_smul_le := eLpNorm_const_smul_le
12231265

1224-
theorem Memℒp.const_smul {f : α → E} (hf : Memℒp f p μ) (c : 𝕜) : Memℒp (c • f) p μ :=
1266+
theorem Memℒp.const_smul (hf : Memℒp f p μ) (c : 𝕜) : Memℒp (c • f) p μ :=
12251267
⟨AEStronglyMeasurable.const_smul hf.1 c,
1226-
(eLpNorm_const_smul_le c f).trans_lt (ENNReal.mul_lt_top ENNReal.coe_lt_top hf.2)⟩
1268+
eLpNorm_const_smul_le.trans_lt (ENNReal.mul_lt_top ENNReal.coe_lt_top hf.2)⟩
12271269

1228-
theorem Memℒp.const_mul {R} [NormedRing R] {f : α → R} (hf : Memℒp f p μ) (c : R) :
1229-
Memℒp (fun x => c * f x) p μ :=
1270+
theorem Memℒp.const_mul {f : α → 𝕜} (hf : Memℒp f p μ) (c : 𝕜) : Memℒp (fun x => c * f x) p μ :=
12301271
hf.const_smul c
12311272

12321273
end BoundedSMul
@@ -1246,9 +1287,8 @@ theorem eLpNorm'_const_smul {f : α → F} (c : 𝕜) (hq_pos : 0 < q) :
12461287
eLpNorm' (c • f) q μ = ‖c‖₊ • eLpNorm' f q μ := by
12471288
obtain rfl | hc := eq_or_ne c 0
12481289
· simp [eLpNorm', hq_pos]
1249-
refine le_antisymm (eLpNorm'_const_smul_le _ _ hq_pos) ?_
1250-
have : eLpNorm' _ q μ ≤ _ := eLpNorm'_const_smul_le c⁻¹ (c • f) hq_pos
1251-
rwa [inv_smul_smul₀ hc, nnnorm_inv, le_inv_smul_iff_of_pos (nnnorm_pos.2 hc)] at this
1290+
refine le_antisymm (eLpNorm'_const_smul_le hq_pos) ?_
1291+
simpa [hc, le_inv_smul_iff_of_pos] using eLpNorm'_const_smul_le (c := c⁻¹) (f := c • f) hq_pos
12521292

12531293
@[deprecated (since := "2024-07-27")]
12541294
alias snorm'_const_smul := eLpNorm'_const_smul
@@ -1260,17 +1300,20 @@ theorem eLpNormEssSup_const_smul (c : 𝕜) (f : α → F) :
12601300
@[deprecated (since := "2024-07-27")]
12611301
alias snormEssSup_const_smul := eLpNormEssSup_const_smul
12621302

1263-
theorem eLpNorm_const_smul (c : 𝕜) (f : α → F) :
1303+
theorem eLpNorm_const_smul (c : 𝕜) (f : α → F) (p : ℝ≥0∞) (μ : Measure α):
12641304
eLpNorm (c • f) p μ = (‖c‖₊ : ℝ≥0∞) * eLpNorm f p μ := by
12651305
obtain rfl | hc := eq_or_ne c 0
12661306
· simp
1267-
refine le_antisymm (eLpNorm_const_smul_le _ _) ?_
1268-
have : eLpNorm _ p μ ≤ _ := eLpNorm_const_smul_le c⁻¹ (c • f)
1269-
rwa [inv_smul_smul₀ hc, nnnorm_inv, le_inv_smul_iff_of_pos (nnnorm_pos.2 hc)] at this
1307+
refine le_antisymm eLpNorm_const_smul_le ?_
1308+
simpa [hc, le_inv_smul_iff_of_pos] using eLpNorm_const_smul_le (c := c⁻¹) (f := c • f)
12701309

12711310
@[deprecated (since := "2024-07-27")]
12721311
alias snorm_const_smul := eLpNorm_const_smul
12731312

1313+
lemma eLpNorm_nsmul [NormedSpace ℝ F] (n : ℕ) (f : α → F) :
1314+
eLpNorm (n • f) p μ = n * eLpNorm f p μ := by
1315+
simpa [Nat.cast_smul_eq_nsmul] using eLpNorm_const_smul (n : ℝ) f ..
1316+
12741317
end NormedSpace
12751318

12761319
theorem le_eLpNorm_of_bddBelow (hp : p ≠ 0) (hp' : p ≠ ∞) {f : α → F} (C : ℝ≥0) {s : Set α}
@@ -1299,6 +1342,9 @@ section RCLike
12991342

13001343
variable {𝕜 : Type*} [RCLike 𝕜] {f : α → 𝕜}
13011344

1345+
@[simp] lemma eLpNorm_conj (f : α → 𝕜) (p : ℝ≥0∞) (μ : Measure α) :
1346+
eLpNorm (conj f) p μ = eLpNorm f p μ := by simp [← eLpNorm_norm]
1347+
13021348
theorem Memℒp.re (hf : Memℒp f p μ) : Memℒp (fun x => RCLike.re (f x)) p μ := by
13031349
have : ∀ x, ‖RCLike.re (f x)‖ ≤ 1 * ‖f x‖ := by
13041350
intro x

Mathlib/MeasureTheory/Function/LpSpace.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ variable [BoundedSMul 𝕜 E] [BoundedSMul 𝕜' E]
426426

427427
theorem const_smul_mem_Lp (c : 𝕜) (f : Lp E p μ) : c • (f : α →ₘ[μ] E) ∈ Lp E p μ := by
428428
rw [mem_Lp_iff_eLpNorm_lt_top, eLpNorm_congr_ae (AEEqFun.coeFn_smul _ _)]
429-
refine (eLpNorm_const_smul_le _ _).trans_lt ?_
429+
refine eLpNorm_const_smul_le.trans_lt ?_
430430
rw [ENNReal.smul_def, smul_eq_mul, ENNReal.mul_lt_top_iff]
431431
exact Or.inl ⟨ENNReal.coe_lt_top, f.prop⟩
432432

@@ -464,7 +464,7 @@ instance instBoundedSMul [Fact (1 ≤ p)] : BoundedSMul 𝕜 (Lp E p μ) :=
464464
suffices (‖r • f‖₊ : ℝ≥0∞) ≤ ‖r‖₊ * ‖f‖₊ from mod_cast this
465465
rw [nnnorm_def, nnnorm_def, ENNReal.coe_toNNReal (Lp.eLpNorm_ne_top _),
466466
eLpNorm_congr_ae (coeFn_smul _ _), ENNReal.coe_toNNReal (Lp.eLpNorm_ne_top _)]
467-
exact eLpNorm_const_smul_le r f
467+
exact eLpNorm_const_smul_le
468468

469469
end BoundedSMul
470470

0 commit comments

Comments
 (0)