Skip to content

Commit 58a5d52

Browse files
committed
refactor(MeasureTheory): golf Mathlib/MeasureTheory/Function/AEEqOfIntegral (#38350)
- refactors `MeasureTheory/Function/AEEqOfIntegral` by reusing the `AEFinStronglyMeasurable` zero-integral criterion for the integrable case - rewrites the integrable set-integral equality lemmas to delegate to the `AEFinStronglyMeasurable` versions instead of rebuilding the `Lp` and subtraction arguments inline Extracted from #38104 [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
1 parent e1f3ae3 commit 58a5d52

1 file changed

Lines changed: 6 additions & 17 deletions

File tree

Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -357,27 +357,16 @@ theorem ae_eq_zero_of_forall_setIntegral_eq_of_finStronglyMeasurable_trim (hm :
357357
exact hf_zero _ (hs.inter ht_meas) hμs
358358

359359
theorem Integrable.ae_eq_zero_of_forall_setIntegral_eq_zero {f : α → E} (hf : Integrable f μ)
360-
(hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) : f =ᵐ[μ] 0 := by
361-
have hf_Lp : MemLp f 1 μ := memLp_one_iff_integrable.mpr hf
362-
let f_Lp := hf_Lp.toLp f
363-
have hf_f_Lp : f =ᵐ[μ] f_Lp := (MemLp.coeFn_toLp hf_Lp).symm
364-
refine hf_f_Lp.trans ?_
365-
refine Lp.ae_eq_zero_of_forall_setIntegral_eq_zero f_Lp one_ne_zero ENNReal.coe_ne_top ?_ ?_
366-
· exact fun s _ _ => Integrable.integrableOn (L1.integrable_coeFn _)
367-
· intro s hs hμs
368-
rw [integral_congr_ae (ae_restrict_of_ae hf_f_Lp.symm)]
369-
exact hf_zero s hs hμs
360+
(hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) : f =ᵐ[μ] 0 :=
361+
hf.aefinStronglyMeasurable.ae_eq_zero_of_forall_setIntegral_eq_zero
362+
(fun _ _ _ => hf.integrableOn) hf_zero
370363

371364
theorem Integrable.ae_eq_of_forall_setIntegral_eq (f g : α → E) (hf : Integrable f μ)
372365
(hg : Integrable g μ)
373366
(hfg : ∀ s : Set α, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = ∫ x in s, g x ∂μ) :
374-
f =ᵐ[μ] g := by
375-
rw [← sub_ae_eq_zero]
376-
have hfg' : ∀ s : Set α, MeasurableSet s → μ s < ∞ → (∫ x in s, (f - g) x ∂μ) = 0 := by
377-
intro s hs hμs
378-
rw [integral_sub' hf.integrableOn hg.integrableOn]
379-
exact sub_eq_zero.mpr (hfg s hs hμs)
380-
exact Integrable.ae_eq_zero_of_forall_setIntegral_eq_zero (hf.sub hg) hfg'
367+
f =ᵐ[μ] g :=
368+
AEFinStronglyMeasurable.ae_eq_of_forall_setIntegral_eq (fun _ _ _ => hf.integrableOn)
369+
(fun _ _ _ => hg.integrableOn) hfg hf.aefinStronglyMeasurable hg.aefinStronglyMeasurable
381370

382371
variable {β : Type*} [TopologicalSpace β] [MeasurableSpace β] [BorelSpace β]
383372

0 commit comments

Comments
 (0)