Skip to content

Commit

Permalink
feat: add versions of the monotone convergence theorem for the Bochne…
Browse files Browse the repository at this point in the history
…r integral (#10793)
  • Loading branch information
RemyDegenne committed Feb 22, 2024
1 parent 7bb1f49 commit eaba122
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Mathlib/MeasureTheory/Integral/Bochner.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,57 @@ lemma integral_exp_pos {μ : Measure α} {f : α → ℝ} [hμ : NeZero μ]
ext1 x
simp only [Function.mem_support, ne_eq, (Real.exp_pos _).ne', not_false_eq_true, Set.mem_univ]

/-- Monotone convergence theorem for real-valued functions and Bochner integrals -/
lemma integral_tendsto_of_tendsto_of_monotone {μ : Measure α} {f : ℕ → α → ℝ} {F : α → ℝ}
(hf : ∀ n, Integrable (f n) μ) (hF : Integrable F μ) (h_mono : ∀ᵐ x ∂μ, Monotone fun n ↦ f n x)
(h_tendsto : ∀ᵐ x ∂μ, Tendsto (fun n ↦ f n x) atTop (𝓝 (F x))) :
Tendsto (fun n ↦ ∫ x, f n x ∂μ) atTop (𝓝 (∫ x, F x ∂μ)) := by
-- switch from the Bochner to the Lebesgue integral
let f' := fun n x ↦ f n x - f 0 x
have hf'_nonneg : ∀ᵐ x ∂μ, ∀ n, 0 ≤ f' n x := by
filter_upwards [h_mono] with a ha n
simp [ha (zero_le n)]
have hf'_meas : ∀ n, Integrable (f' n) μ := fun n ↦ (hf n).sub (hf 0)
suffices Tendsto (fun n ↦ ∫ x, f' n x ∂μ) atTop (𝓝 (∫ x, (F - f 0) x ∂μ)) by
simp_rw [integral_sub (hf _) (hf _), integral_sub' hF (hf 0), tendsto_sub_const_iff] at this
exact this
have hF_ge : 0 ≤ᵐ[μ] fun x ↦ (F - f 0) x := by
filter_upwards [h_tendsto, h_mono] with x hx_tendsto hx_mono
simp only [Pi.zero_apply, Pi.sub_apply, sub_nonneg]
exact ge_of_tendsto' hx_tendsto (fun n ↦ hx_mono (zero_le _))
rw [ae_all_iff] at hf'_nonneg
simp_rw [integral_eq_lintegral_of_nonneg_ae (hf'_nonneg _) (hf'_meas _).1]
rw [integral_eq_lintegral_of_nonneg_ae hF_ge (hF.1.sub (hf 0).1)]
have h_cont := ENNReal.continuousAt_toReal (x := ∫⁻ a, ENNReal.ofReal ((F - f 0) a) ∂μ) ?_
swap
· rw [← ofReal_integral_eq_lintegral_ofReal (hF.sub (hf 0)) hF_ge]
exact ENNReal.ofReal_ne_top
refine h_cont.tendsto.comp ?_
-- use the result for the Lebesgue integral
refine lintegral_tendsto_of_tendsto_of_monotone ?_ ?_ ?_
· exact fun n ↦ ((hf n).sub (hf 0)).aemeasurable.ennreal_ofReal
· filter_upwards [h_mono] with x hx n m hnm
refine ENNReal.ofReal_le_ofReal ?_
simp only [tsub_le_iff_right, sub_add_cancel]
exact hx hnm
· filter_upwards [h_tendsto] with x hx
refine (ENNReal.continuous_ofReal.tendsto _).comp ?_
simp only [Pi.sub_apply]
exact Tendsto.sub hx tendsto_const_nhds

/-- Monotone convergence theorem for real-valued functions and Bochner integrals -/
lemma integral_tendsto_of_tendsto_of_antitone {μ : Measure α} {f : ℕ → α → ℝ} {F : α → ℝ}
(hf : ∀ n, Integrable (f n) μ) (hF : Integrable F μ) (h_mono : ∀ᵐ x ∂μ, Antitone fun n ↦ f n x)
(h_tendsto : ∀ᵐ x ∂μ, Tendsto (fun n ↦ f n x) atTop (𝓝 (F x))) :
Tendsto (fun n ↦ ∫ x, f n x ∂μ) atTop (𝓝 (∫ x, F x ∂μ)) := by
suffices Tendsto (fun n ↦ ∫ x, -f n x ∂μ) atTop (𝓝 (∫ x, -F x ∂μ)) by
suffices Tendsto (fun n ↦ ∫ x, - -f n x ∂μ) atTop (𝓝 (∫ x, - -F x ∂μ)) by
simpa [neg_neg] using this
convert this.neg <;> rw [integral_neg]
refine integral_tendsto_of_tendsto_of_monotone (fun n ↦ (hf n).neg) hF.neg ?_ ?_
· filter_upwards [h_mono] with x hx n m hnm using neg_le_neg_iff.mpr <| hx hnm
· filter_upwards [h_tendsto] with x hx using hx.neg

section NormedAddCommGroup

variable {H : Type*} [NormedAddCommGroup H]
Expand Down
21 changes: 21 additions & 0 deletions Mathlib/Topology/Algebra/Group/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1100,13 +1100,34 @@ theorem Filter.Tendsto.const_div' (b : G) {c : G} {f : α → G} {l : Filter α}
#align filter.tendsto.const_div' Filter.Tendsto.const_div'
#align filter.tendsto.const_sub Filter.Tendsto.const_sub

@[to_additive]
lemma Filter.tendsto_const_div_iff {G : Type*} [CommGroup G] [TopologicalSpace G] [ContinuousDiv G]
(b : G) {c : G} {f : α → G} {l : Filter α} :
Tendsto (fun k : α ↦ b / f k) l (𝓝 (b / c)) ↔ Tendsto f l (𝓝 c) := by
refine ⟨fun h ↦ ?_, Filter.Tendsto.const_div' b⟩
convert h.const_div' b with k <;> rw [div_div_cancel]

@[to_additive sub_const]
theorem Filter.Tendsto.div_const' {c : G} {f : α → G} {l : Filter α} (h : Tendsto f l (𝓝 c))
(b : G) : Tendsto (f · / b) l (𝓝 (c / b)) :=
h.div' tendsto_const_nhds
#align filter.tendsto.div_const' Filter.Tendsto.div_const'
#align filter.tendsto.sub_const Filter.Tendsto.sub_const

lemma Filter.tendsto_div_const_iff {G : Type*}
[CommGroupWithZero G] [TopologicalSpace G] [ContinuousDiv G]
{b : G} (hb : b ≠ 0) {c : G} {f : α → G} {l : Filter α} :
Tendsto (f · / b) l (𝓝 (c / b)) ↔ Tendsto f l (𝓝 c) := by
refine ⟨fun h ↦ ?_, fun h ↦ Filter.Tendsto.div_const' h b⟩
convert h.div_const' b⁻¹ with k <;> rw [div_div, mul_inv_cancel hb, div_one]

lemma Filter.tendsto_sub_const_iff {G : Type*}
[AddCommGroup G] [TopologicalSpace G] [ContinuousSub G]
(b : G) {c : G} {f : α → G} {l : Filter α} :
Tendsto (f · - b) l (𝓝 (c - b)) ↔ Tendsto f l (𝓝 c) := by
refine ⟨fun h ↦ ?_, fun h ↦ Filter.Tendsto.sub_const h b⟩
convert h.sub_const (-b) with k <;> rw [sub_sub, ← sub_eq_add_neg, sub_self, sub_zero]

variable [TopologicalSpace α] {f g : α → G} {s : Set α} {x : α}

@[to_additive (attr := continuity, fun_prop) sub]
Expand Down
3 changes: 3 additions & 0 deletions Mathlib/Topology/Instances/ENNReal.lean
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ theorem tendsto_toReal {a : ℝ≥0∞} (ha : a ≠ ∞) : Tendsto ENNReal.toRea
lemma continuousOn_toReal : ContinuousOn ENNReal.toReal { a | a ≠ ∞ } :=
NNReal.continuous_coe.comp_continuousOn continuousOn_toNNReal

lemma continuousAt_toReal (hx : x ≠ ∞) : ContinuousAt ENNReal.toReal x :=
continuousOn_toReal.continuousAt (isOpen_ne_top.mem_nhds_iff.mpr hx)

/-- The set of finite `ℝ≥0∞` numbers is homeomorphic to `ℝ≥0`. -/
def neTopHomeomorphNNReal : { a | a ≠ ∞ } ≃ₜ ℝ≥0 where
toEquiv := neTopEquivNNReal
Expand Down

0 comments on commit eaba122

Please sign in to comment.