Skip to content

Commit

Permalink
refactor(MeasureTheory/Function/L1Space): rm hasFiniteIntegral_def
Browse files Browse the repository at this point in the history
  • Loading branch information
mo271 committed Jan 27, 2024
1 parent e4e10f9 commit 8623eae
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 27 deletions.
3 changes: 2 additions & 1 deletion Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ theorem integrable_one_add_norm [MeasureSpace E] [BorelSpace E] [(@volume E _).I
-- Lower Lebesgue integral
have : (∫⁻ a : E, ‖(1 + ‖a‖) ^ (-r)‖₊) = ∫⁻ a : E, ENNReal.ofReal ((1 + ‖a‖) ^ (-r)) :=
lintegral_nnnorm_eq_of_nonneg fun _ => rpow_nonneg (by positivity) _
rw [HasFiniteIntegral, this]
unfold HasFiniteIntegral
rw [this]
exact finite_integral_one_add_norm hnr
#align integrable_one_add_norm integrable_one_add_norm

Expand Down
28 changes: 6 additions & 22 deletions Mathlib/MeasureTheory/Function/L1Space.lean
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ def HasFiniteIntegral {_ : MeasurableSpace α} (f : α → β) (μ : Measure α
(∫⁻ a, ‖f a‖₊ ∂μ) < ∞
#align measure_theory.has_finite_integral MeasureTheory.HasFiniteIntegral

-- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed.
theorem hasFiniteIntegral_def {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) :
HasFiniteIntegral f μ ↔ ((∫⁻ a, ‖f a‖₊ ∂μ) < ∞) :=
Iff.rfl

attribute [eqns hasFiniteIntegral_def] HasFiniteIntegral

theorem hasFiniteIntegral_iff_norm (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) < ∞ := by
simp only [HasFiniteIntegral, ofReal_norm_eq_coe_nnnorm]
Expand All @@ -126,7 +119,7 @@ theorem hasFiniteIntegral_iff_edist (f : α → β) :

theorem hasFiniteIntegral_iff_ofReal {f : α → ℝ} (h : 0 ≤ᵐ[μ] f) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal (f a) ∂μ) < ∞ := by
rw [HasFiniteIntegral, lintegral_nnnorm_eq_of_ae_nonneg h]
simp only [HasFiniteIntegral, lintegral_nnnorm_eq_of_ae_nonneg h]
#align measure_theory.has_finite_integral_iff_of_real MeasureTheory.hasFiniteIntegral_iff_ofReal

theorem hasFiniteIntegral_iff_ofNNReal {f : α → ℝ≥0} :
Expand Down Expand Up @@ -252,10 +245,7 @@ theorem hasFiniteIntegral_neg_iff {f : α → β} : HasFiniteIntegral (-f) μ

theorem HasFiniteIntegral.norm {f : α → β} (hfi : HasFiniteIntegral f μ) :
HasFiniteIntegral (fun a => ‖f a‖) μ := by
have eq : (fun a => (nnnorm ‖f a‖ : ℝ≥0∞)) = fun a => (‖f a‖₊ : ℝ≥0∞) := by
funext
rw [nnnorm_norm]
rwa [HasFiniteIntegral, eq]
simpa only [HasFiniteIntegral, nnnorm_norm]
#align measure_theory.has_finite_integral.norm MeasureTheory.HasFiniteIntegral.norm

theorem hasFiniteIntegral_norm_iff (f : α → β) :
Expand Down Expand Up @@ -443,13 +433,6 @@ def Integrable {α} {_ : MeasurableSpace α} (f : α → β) (μ : Measure α :=
AEStronglyMeasurable f μ ∧ HasFiniteIntegral f μ
#align measure_theory.integrable MeasureTheory.Integrable

-- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed.
theorem integrable_def {α} {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) :
Integrable f μ ↔ (AEStronglyMeasurable f μ ∧ HasFiniteIntegral f μ) :=
Iff.rfl

attribute [eqns integrable_def] Integrable

theorem memℒp_one_iff_integrable {f : α → β} : Memℒp f 1 μ ↔ Integrable f μ := by
simp_rw [Integrable, HasFiniteIntegral, Memℒp, snorm_one_eq_lintegral_nnnorm]
#align measure_theory.mem_ℒp_one_iff_integrable MeasureTheory.memℒp_one_iff_integrable
Expand Down Expand Up @@ -499,7 +482,7 @@ theorem integrable_congr {f g : α → β} (h : f =ᵐ[μ] g) : Integrable f μ

theorem integrable_const_iff {c : β} : Integrable (fun _ : α => c) μ ↔ c = 0 ∨ μ univ < ∞ := by
have : AEStronglyMeasurable (fun _ : α => c) μ := aestronglyMeasurable_const
rw [Integrable, and_iff_right this, hasFiniteIntegral_const_iff]
simp only [Integrable, and_iff_right this, hasFiniteIntegral_const_iff]
#align measure_theory.integrable_const_iff MeasureTheory.integrable_const_iff

@[simp]
Expand Down Expand Up @@ -1215,7 +1198,8 @@ variable {H : Type*} [NormedAddCommGroup H] {m0 : MeasurableSpace α} {μ' : Mea
theorem Integrable.trim (hm : m ≤ m0) (hf_int : Integrable f μ') (hf : StronglyMeasurable[m] f) :
Integrable f (μ'.trim hm) := by
refine' ⟨hf.aestronglyMeasurable, _⟩
rw [HasFiniteIntegral, lintegral_trim hm _]
unfold HasFiniteIntegral
rw [lintegral_trim hm _]
· exact hf_int.2
· exact @StronglyMeasurable.ennnorm _ m _ _ f hf
#align measure_theory.integrable.trim MeasureTheory.Integrable.trim
Expand All @@ -1224,7 +1208,7 @@ theorem integrable_of_integrable_trim (hm : m ≤ m0) (hf_int : Integrable f (μ
Integrable f μ' := by
obtain ⟨hf_meas_ae, hf⟩ := hf_int
refine' ⟨aestronglyMeasurable_of_aestronglyMeasurable_trim hm hf_meas_ae, _⟩
rw [HasFiniteIntegral] at hf ⊢
unfold HasFiniteIntegral at hf ⊢
rwa [lintegral_trim_ae hm _] at hf
exact AEStronglyMeasurable.ennnorm hf_meas_ae
#align measure_theory.integrable_of_integrable_trim MeasureTheory.integrable_of_integrable_trim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ lemma lintegral_nnnorm_le (f : X →ᵇ E) :

lemma integrable [IsFiniteMeasure μ] (f : X →ᵇ E) :
Integrable f μ := by
refine ⟨f.continuous.measurable.aestronglyMeasurable, (hasFiniteIntegral_def _ _).mp ?_⟩
refine ⟨f.continuous.measurable.aestronglyMeasurable, ?_⟩
unfold HasFiniteIntegral
calc ∫⁻ x, ‖f x‖₊ ∂μ
_ ≤ ‖f‖₊ * (μ Set.univ) := f.lintegral_nnnorm_le μ
_ < ∞ := ENNReal.mul_lt_top ENNReal.coe_ne_top (measure_ne_top μ Set.univ)
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/MeasureTheory/Integral/SetIntegral.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ theorem integral_withDensity_eq_integral_smul {f : α → ℝ≥0} (f_meas : Mea
· exact integral_nonneg fun x => NNReal.coe_nonneg _
· refine' ⟨f_meas.coe_nnreal_real.aemeasurable.aestronglyMeasurable, _⟩
rw [withDensity_apply _ s_meas] at hs
rw [HasFiniteIntegral]
unfold HasFiniteIntegral
convert hs with x
simp only [NNReal.nnnorm_eq]
· intro u u' _ u_int u'_int h h'
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Probability/Density.lean
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ theorem integral_mul_eq_integral [HasPDF X ℙ] : ∫ x, x * (pdf X ℙ volume x
theorem hasFiniteIntegral_mul {f : ℝ → ℝ} {g : ℝ → ℝ≥0∞} (hg : pdf X ℙ =ᵐ[volume] g)
(hgi : ∫⁻ x, ‖f x‖₊ * g x ≠ ∞) :
HasFiniteIntegral fun x => f x * (pdf X ℙ volume x).toReal := by
rw [HasFiniteIntegral]
unfold HasFiniteIntegral
have : (fun x => ↑‖f x‖₊ * g x) =ᵐ[volume] fun x => ‖f x * (pdf X ℙ volume x).toReal‖₊ := by
refine' ae_eq_trans (Filter.EventuallyEq.mul (ae_eq_refl fun x => (‖f x‖₊ : ℝ≥0∞))
(ae_eq_trans hg.symm ofReal_toReal_ae_eq.symm)) _
Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Probability/Kernel/CondDistrib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ theorem _root_.MeasureTheory.Integrable.comp_snd_map_prod_mk
by_cases hX : AEMeasurable X μ
· have hf := hf_int.1.comp_snd_map_prod_mk X (mΩ := mΩ) (mβ := mβ)
refine' ⟨hf, _⟩
rw [HasFiniteIntegral, lintegral_map' hf.ennnorm (hX.prod_mk aemeasurable_id)]
unfold HasFiniteIntegral
rw [lintegral_map' hf.ennnorm (hX.prod_mk aemeasurable_id)]
exact hf_int.2
· rw [Measure.map_of_not_aemeasurable]
· simp
Expand Down

0 comments on commit 8623eae

Please sign in to comment.