Skip to content

Commit cd9fe44

Browse files
committed
feat: generalise more lemmas to enorms (#27456)
The selection of lemmas may seem eclectic, but follows a clear path: these are necessary for generalising the last section of IntegrableOn.lean to enorms.
1 parent d38d235 commit cd9fe44

8 files changed

Lines changed: 87 additions & 23 deletions

File tree

Mathlib/Analysis/BoxIntegral/Integrability.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ theorem AEContinuous.hasBoxIntegral [CompleteSpace E] {f : (ι → ℝ) → E} (
336336
isFiniteMeasure_of_le (μ.restrict (Box.Icc I))
337337
(μ.restrict_mono Box.coe_subset_Icc (le_refl μ))
338338
obtain ⟨C, hC⟩ := hb
339-
refine hasFiniteIntegral_of_bounded (C := C) (Filter.eventually_iff_exists_mem.2 ?_)
339+
refine .of_bounded (C := C) (Filter.eventually_iff_exists_mem.2 ?_)
340340
use I, self_mem_ae_restrict I.measurableSet_coe, fun y hy ↦ hC y (I.coe_subset_Icc hy)
341341

342342
end MeasureTheory

Mathlib/MeasureTheory/Function/L1Space/HasFiniteIntegral.lean

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,21 +194,27 @@ theorem HasFiniteIntegral.of_mem_Icc [IsFiniteMeasure μ] (a b : ℝ) {X : α
194194
apply (hasFiniteIntegral_const (max ‖a‖ ‖b‖)).mono'
195195
filter_upwards [h.mono fun ω h ↦ h.1, h.mono fun ω h ↦ h.2] with ω using abs_le_max_abs_abs
196196

197-
theorem hasFiniteIntegral_of_bounded_enorm [IsFiniteMeasure μ] {f : α → ε} {C : ℝ≥0}
198-
(hC : ∀ᵐ a ∂μ, ‖f a‖ₑ ≤ C) : HasFiniteIntegral f μ :=
199-
(hasFiniteIntegral_const_enorm (enorm_ne_top (x := C))).mono'_enorm hC
197+
theorem HasFiniteIntegral.of_bounded_enorm [IsFiniteMeasure μ] {f : α → ε} {C : ℝ≥0}
198+
(hC' : ‖C‖ₑ ≠ ∞ := by finiteness) (hC : ∀ᵐ a ∂μ, ‖f a‖ₑ ≤ C) : HasFiniteIntegral f μ :=
199+
(hasFiniteIntegral_const_enorm hC').mono'_enorm hC
200200

201-
theorem hasFiniteIntegral_of_bounded [IsFiniteMeasure μ] {f : α → β} {C : ℝ}
201+
@[deprecated (since := "2025-07-26")]
202+
alias hasFiniteIntegral_of_bounded_enorm := HasFiniteIntegral.of_bounded_enorm
203+
204+
theorem HasFiniteIntegral.of_bounded [IsFiniteMeasure μ] {f : α → β} {C : ℝ}
202205
(hC : ∀ᵐ a ∂μ, ‖f a‖ ≤ C) : HasFiniteIntegral f μ :=
203206
(hasFiniteIntegral_const C).mono' hC
204207

208+
@[deprecated (since := "2025-07-26")]
209+
alias hasFiniteIntegral_of_bounded := HasFiniteIntegral.of_bounded
210+
205211
-- TODO: generalise this to f with codomain ε
206212
-- requires generalising `norm_le_pi_norm` and friends to enorms
207213
@[simp]
208214
theorem HasFiniteIntegral.of_finite [Finite α] [IsFiniteMeasure μ] {f : α → β} :
209215
HasFiniteIntegral f μ :=
210216
let ⟨_⟩ := nonempty_fintype α
211-
hasFiniteIntegral_of_bounded <| ae_of_all μ <| norm_le_pi_norm f
217+
.of_bounded <| ae_of_all μ <| norm_le_pi_norm f
212218

213219
theorem HasFiniteIntegral.mono_measure {f : α → ε} (h : HasFiniteIntegral f ν) (hμ : μ ≤ ν) :
214220
HasFiniteIntegral f μ :=
@@ -445,14 +451,27 @@ variable {𝕜 : Type*}
445451

446452
@[fun_prop]
447453
theorem HasFiniteIntegral.smul [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 β] [IsBoundedSMul 𝕜 β]
448-
(c : 𝕜) {f : α → β} :
449-
HasFiniteIntegral f μ → HasFiniteIntegral (c • f) μ := by
450-
simp only [HasFiniteIntegral]; intro hfi
454+
(c : 𝕜) {f : α → β} (hf : HasFiniteIntegral f μ) :
455+
HasFiniteIntegral (c • f) μ := by
456+
simp only [HasFiniteIntegral]
451457
calc
452458
∫⁻ a : α, ‖c • f a‖ₑ ∂μ ≤ ∫⁻ a : α, ‖c‖ₑ * ‖f a‖ₑ ∂μ := lintegral_mono fun i ↦ enorm_smul_le
453459
_ < ∞ := by
454460
rw [lintegral_const_mul']
455-
exacts [mul_lt_top coe_lt_top hfi, coe_ne_top]
461+
exacts [mul_lt_top coe_lt_top hf, coe_ne_top]
462+
463+
-- TODO: weaken the hypothesis to a version of `ENormSMulClass` with `≤`,
464+
-- once such a typeclass exists.
465+
-- This will let us unify with `HasFiniteIntegral.smul` above.
466+
@[fun_prop]
467+
theorem HasFiniteIntegral.smul_enorm [NormedAddGroup 𝕜] [SMul 𝕜 ε''] [ENormSMulClass 𝕜 ε'']
468+
(c : 𝕜) {f : α → ε''} (hf : HasFiniteIntegral f μ) : HasFiniteIntegral (c • f) μ := by
469+
simp only [HasFiniteIntegral]
470+
calc
471+
∫⁻ a : α, ‖c • f a‖ₑ ∂μ = ∫⁻ a : α, ‖c‖ₑ * ‖f a‖ₑ ∂μ := lintegral_congr fun i ↦ enorm_smul _ _
472+
_ < ∞ := by
473+
rw [lintegral_const_mul']
474+
exacts [mul_lt_top coe_lt_top hf, coe_ne_top]
456475

457476
theorem hasFiniteIntegral_smul_iff [NormedRing 𝕜] [MulActionWithZero 𝕜 β] [IsBoundedSMul 𝕜 β]
458477
{c : 𝕜} (hc : IsUnit c) (f : α → β) :

Mathlib/MeasureTheory/Function/L1Space/Integrable.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ end PosPart
951951
section IsBoundedSMul
952952

953953
variable {𝕜 : Type*}
954+
{ε : Type*} [TopologicalSpace ε] [ENormedAddMonoid ε]
954955

955956
@[fun_prop]
956957
theorem Integrable.smul [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 β] [IsBoundedSMul 𝕜 β] (c : 𝕜)
@@ -962,6 +963,17 @@ theorem Integrable.fun_smul [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 β] [I
962963
{f : α → β} (hf : Integrable f μ) : Integrable (fun x ↦ c • f x) μ :=
963964
hf.smul c
964965

966+
@[fun_prop]
967+
theorem Integrable.smul_enorm
968+
[NormedAddCommGroup 𝕜] [SMul 𝕜 ε] [ContinuousConstSMul 𝕜 ε] [ENormSMulClass 𝕜 ε] (c : 𝕜)
969+
{f : α → ε} (hf : Integrable f μ) : Integrable (c • f) μ := by
970+
constructor <;> fun_prop
971+
972+
theorem Integrable.fun_smul_enorm
973+
[NormedAddCommGroup 𝕜] [SMul 𝕜 ε] [ContinuousConstSMul 𝕜 ε] [ENormSMulClass 𝕜 ε] (c : 𝕜)
974+
{f : α → ε} (hf : Integrable f μ) : Integrable (fun x ↦ c • f x) μ :=
975+
hf.smul_enorm c
976+
965977
theorem _root_.IsUnit.integrable_smul_iff [NormedRing 𝕜] [MulActionWithZero 𝕜 β]
966978
[IsBoundedSMul 𝕜 β] {c : 𝕜} (hc : IsUnit c) (f : α → β) :
967979
Integrable (c • f) μ ↔ Integrable f μ :=

Mathlib/MeasureTheory/Function/LocallyIntegrable.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ theorem ContinuousOn.integrableOn_compact'
444444
have : Fact (μ K < ∞) := ⟨hK.measure_lt_top⟩
445445
obtain ⟨C, hC⟩ : ∃ C, ∀ x ∈ f '' K, ‖x‖ ≤ C :=
446446
IsBounded.exists_norm_le (hK.image_of_continuousOn hf).isBounded
447-
apply hasFiniteIntegral_of_bounded (C := C)
447+
apply HasFiniteIntegral.of_bounded (C := C)
448448
filter_upwards [ae_restrict_mem h'K] with x hx using hC _ (mem_image_of_mem f hx)
449449

450450
theorem ContinuousOn.integrableOn_compact [T2Space X]

Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,8 +1377,7 @@ In this section we show inequalities on the norm.
13771377

13781378
section IsBoundedSMul
13791379

1380-
variable {𝕜 : Type*} [NormedRing 𝕜] [MulActionWithZero 𝕜 E] [MulActionWithZero 𝕜 F]
1381-
variable [IsBoundedSMul 𝕜 E] [IsBoundedSMul 𝕜 F] {c : 𝕜} {f : α → F}
1380+
variable {𝕜 : Type*} [NormedRing 𝕜] [MulActionWithZero 𝕜 F] [IsBoundedSMul 𝕜 F] {c : 𝕜} {f : α → F}
13821381

13831382
theorem eLpNorm'_const_smul_le (hq : 0 < q) : eLpNorm' (c • f) q μ ≤ ‖c‖ₑ * eLpNorm' f q μ :=
13841383
eLpNorm'_le_nnreal_smul_eLpNorm'_of_ae_le_mul (Eventually.of_forall fun _ => nnnorm_smul_le ..) hq
@@ -1392,8 +1391,7 @@ theorem eLpNorm_const_smul_le : eLpNorm (c • f) p μ ≤ ‖c‖ₑ * eLpNorm
13921391
(Eventually.of_forall fun _ => by simp [nnnorm_smul_le]) _
13931392

13941393
theorem MemLp.const_smul (hf : MemLp f p μ) (c : 𝕜) : MemLp (c • f) p μ :=
1395-
⟨AEStronglyMeasurable.const_smul hf.1 c,
1396-
eLpNorm_const_smul_le.trans_lt (ENNReal.mul_lt_top ENNReal.coe_lt_top hf.2)⟩
1394+
⟨hf.1.const_smul c, eLpNorm_const_smul_le.trans_lt (ENNReal.mul_lt_top ENNReal.coe_lt_top hf.2)⟩
13971395

13981396
@[deprecated (since := "2025-02-21")]
13991397
alias Memℒp.const_smul := MemLp.const_smul
@@ -1406,6 +1404,33 @@ alias Memℒp.const_mul := MemLp.const_mul
14061404

14071405
end IsBoundedSMul
14081406

1407+
section ENormSMulClass
1408+
1409+
variable {𝕜 : Type*} [NormedRing 𝕜]
1410+
{ε : Type*} [TopologicalSpace ε] [ENormedAddMonoid ε] [SMul 𝕜 ε] [ENormSMulClass 𝕜 ε]
1411+
{c : 𝕜} {f : α → ε}
1412+
1413+
theorem eLpNorm'_const_smul_le' (hq : 0 < q) : eLpNorm' (c • f) q μ ≤ ‖c‖ₑ * eLpNorm' f q μ :=
1414+
eLpNorm'_le_nnreal_smul_eLpNorm'_of_ae_le_mul'
1415+
(Eventually.of_forall fun _ ↦ le_of_eq (enorm_smul ..)) hq
1416+
1417+
theorem eLpNormEssSup_const_smul_le' : eLpNormEssSup (c • f) μ ≤ ‖c‖ₑ * eLpNormEssSup f μ :=
1418+
eLpNormEssSup_le_nnreal_smul_eLpNormEssSup_of_ae_le_mul'
1419+
(Eventually.of_forall fun _ => by simp [enorm_smul])
1420+
1421+
theorem eLpNorm_const_smul_le' : eLpNorm (c • f) p μ ≤ ‖c‖ₑ * eLpNorm f p μ :=
1422+
eLpNorm_le_nnreal_smul_eLpNorm_of_ae_le_mul'
1423+
(Eventually.of_forall fun _ => le_of_eq (enorm_smul ..)) _
1424+
1425+
theorem MemLp.const_smul' [ContinuousConstSMul 𝕜 ε] (hf : MemLp f p μ) (c : 𝕜) :
1426+
MemLp (c • f) p μ :=
1427+
⟨hf.1.const_smul c, eLpNorm_const_smul_le'.trans_lt (ENNReal.mul_lt_top ENNReal.coe_lt_top hf.2)⟩
1428+
1429+
theorem MemLp.const_mul' {f : α → 𝕜} (hf : MemLp f p μ) (c : 𝕜) : MemLp (fun x => c * f x) p μ :=
1430+
hf.const_smul c
1431+
1432+
end ENormSMulClass
1433+
14091434
/-!
14101435
### Bounded actions by normed division rings
14111436
The inequalities in the previous section are now tight.
@@ -1415,8 +1440,7 @@ TODO: do these results hold for any `NormedRing` assuming `NormSMulClass`?
14151440

14161441
section NormedSpace
14171442

1418-
variable {𝕜 : Type*} [NormedDivisionRing 𝕜] [MulActionWithZero 𝕜 E] [Module 𝕜 F]
1419-
variable [NormSMulClass 𝕜 E] [NormSMulClass 𝕜 F]
1443+
variable {𝕜 : Type*} [NormedDivisionRing 𝕜] [Module 𝕜 F] [NormSMulClass 𝕜 F]
14201444

14211445
theorem eLpNorm'_const_smul {f : α → F} (c : 𝕜) (hq_pos : 0 < q) :
14221446
eLpNorm' (c • f) q μ = ‖c‖ₑ * eLpNorm' f q μ := by

Mathlib/MeasureTheory/Integral/IntegrableOn.lean

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,24 @@ namespace MeasureTheory
7272

7373
section NormedAddCommGroup
7474

75-
theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α}
75+
theorem HasFiniteIntegral.restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α}
7676
{μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) :
7777
HasFiniteIntegral f (μ.restrict s) :=
7878
haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩
79-
hasFiniteIntegral_of_bounded hf
79+
.of_bounded hf
80+
81+
@[deprecated (since := "2025-07-26")]
82+
alias hasFiniteIntegral_restrict_of_bounded := HasFiniteIntegral.restrict_of_bounded
8083

8184
variable [NormedAddCommGroup E] {f g : α → ε} {s t : Set α} {μ ν : Measure α}
8285
[TopologicalSpace ε] [ContinuousENorm ε]
8386

87+
theorem HasFiniteIntegral.restrict_of_bounded_enorm {C : ℝ≥0∞} (hC : ‖C‖ₑ ≠ ∞ := by finiteness)
88+
(hs : μ s ≠ ∞ := by finiteness) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ₑ ≤ C) :
89+
HasFiniteIntegral f (μ.restrict s) :=
90+
haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rw [Measure.restrict_apply_univ]; exact hs.lt_top⟩
91+
.of_bounded_enorm hC hf
92+
8493
/-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s`
8594
and if the integral of its pointwise norm over `s` is less than infinity. -/
8695
def IntegrableOn (f : α → ε) (s : Set α) (μ : Measure α := by volume_tac) : Prop :=
@@ -533,7 +542,7 @@ theorem Measure.FiniteAtFilter.integrableAtFilter {f : α → E} {l : Filter α}
533542
hf.imp fun C hC => eventually_smallSets.2 ⟨_, hC, fun t => id⟩
534543
rcases (hfm.eventually.and (hμ.eventually.and hC)).exists_measurable_mem_of_smallSets with
535544
⟨s, hsl, hsm, hfm, hμ, hC⟩
536-
refine ⟨s, hsl, ⟨hfm, hasFiniteIntegral_restrict_of_bounded hμ (C := C) ?_⟩⟩
545+
refine ⟨s, hsl, ⟨hfm, .restrict_of_bounded hμ (C := C) ?_⟩⟩
537546
rw [ae_restrict_eq hsm, eventually_inf_principal]
538547
exact Eventually.of_forall hC
539548

@@ -557,7 +566,7 @@ alias _root_.Filter.Tendsto.integrableAtFilter :=
557566
lemma Measure.integrableOn_of_bounded {f : α → E} (s_finite : μ s ≠ ∞)
558567
(f_mble : AEStronglyMeasurable f μ) {M : ℝ} (f_bdd : ∀ᵐ a ∂(μ.restrict s), ‖f a‖ ≤ M) :
559568
IntegrableOn f s μ :=
560-
⟨f_mble.restrict, hasFiniteIntegral_restrict_of_bounded (C := M) s_finite.lt_top f_bdd⟩
569+
⟨f_mble.restrict, .restrict_of_bounded (C := M) s_finite.lt_top f_bdd⟩
561570

562571
theorem integrable_add_of_disjoint {f g : α → E} (h : Disjoint (support f) (support g))
563572
(hf : StronglyMeasurable f) (hg : StronglyMeasurable g) :

Mathlib/MeasureTheory/Integral/Prod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ lemma integral_integral_swap_of_hasCompactSupport
572572
apply (integrableOn_iff_integrable_of_support_subset (subset_tsupport f.uncurry)).mp
573573
refine ⟨(h'f.stronglyMeasurable_of_prod hf).aestronglyMeasurable, ?_⟩
574574
obtain ⟨C, hC⟩ : ∃ C, ∀ p, ‖f.uncurry p‖ ≤ C := hf.bounded_above_of_compact_support h'f
575-
exact hasFiniteIntegral_of_bounded (C := C) (Eventually.of_forall hC)
575+
exact .of_bounded (C := C) (.of_forall hC)
576576
_ = ∫ y, (∫ x in U, f x y ∂μ) ∂ν := by
577577
apply setIntegral_eq_integral_of_forall_compl_eq_zero (fun y hy ↦ ?_)
578578
have : ∀ x, f x y = 0 := by

Mathlib/Probability/Martingale/Upcrossing.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ theorem Adapted.integrable_upcrossingsBefore [IsFiniteMeasure μ] (hf : Adapted
750750
rw [Real.norm_eq_abs, Nat.abs_cast, Nat.cast_le]
751751
exact upcrossingsBefore_le _ _ hab
752752
⟨Measurable.aestronglyMeasurable (measurable_from_top.comp (hf.measurable_upcrossingsBefore hab)),
753-
hasFiniteIntegral_of_bounded this⟩
753+
.of_bounded this⟩
754754

755755
/-- The number of upcrossings of a realization of a stochastic process (`upcrossings` takes value
756756
in `ℝ≥0∞` and so is allowed to be `∞`). -/

0 commit comments

Comments
 (0)