Skip to content

Commit

Permalink
feat(measure_theory/integral/integral_eq_improper): Covering finite i…
Browse files Browse the repository at this point in the history
…ntervals by finite intervals (#13514)

Currently, the ability to prove facts about improper integrals only allows for at least one infinite endpoint. However, it is a common need to work with functions that blow up at an end point (e.g., x^r on [0, 1] for r in (-1, 0)). As a step toward allowing that, we introduce `ae_cover`s that allow exhausting finite intervals by finite intervals.

Partially addresses: #12666
  • Loading branch information
khwilson committed May 24, 2022
1 parent 0973ad4 commit 93df724
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 1 deletion.
94 changes: 94 additions & 0 deletions src/measure_theory/integral/integral_eq_improper.lean
Expand Up @@ -151,6 +151,100 @@ lemma ae_cover_Iio [no_max_order α] :

end linear_order_α

section finite_intervals

variables [linear_order α] [topological_space α] [order_closed_topology α]
[opens_measurable_space α] {a b : ι → α} {A B : α}
(ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B))

lemma ae_cover_Ioo_of_Icc :
ae_cover (μ.restrict $ Ioo A B) l (λ i, Icc (a i) (b i)) :=
{ ae_eventually_mem := (ae_restrict_iff' measurable_set_Ioo).mpr (
ae_of_all μ (λ x hx,
(ha.eventually $ eventually_le_nhds hx.left).mp $
(hb.eventually $ eventually_ge_nhds hx.right).mono $
λ i hbi hai, ⟨hai, hbi⟩)),
measurable := λ i, measurable_set_Icc, }

lemma ae_cover_Ioo_of_Ico :
ae_cover (μ.restrict $ Ioo A B) l (λ i, Ico (a i) (b i)) :=
{ ae_eventually_mem := (ae_restrict_iff' measurable_set_Ioo).mpr (
ae_of_all μ (λ x hx,
(ha.eventually $ eventually_le_nhds hx.left).mp $
(hb.eventually $ eventually_gt_nhds hx.right).mono $
λ i hbi hai, ⟨hai, hbi⟩)),
measurable := λ i, measurable_set_Ico, }

lemma ae_cover_Ioo_of_Ioc :
ae_cover (μ.restrict $ Ioo A B) l (λ i, Ioc (a i) (b i)) :=
{ ae_eventually_mem := (ae_restrict_iff' measurable_set_Ioo).mpr (
ae_of_all μ (λ x hx,
(ha.eventually $ eventually_lt_nhds hx.left).mp $
(hb.eventually $ eventually_ge_nhds hx.right).mono $
λ i hbi hai, ⟨hai, hbi⟩)),
measurable := λ i, measurable_set_Ioc, }

lemma ae_cover_Ioo_of_Ioo :
ae_cover (μ.restrict $ Ioo A B) l (λ i, Ioo (a i) (b i)) :=
{ ae_eventually_mem := (ae_restrict_iff' measurable_set_Ioo).mpr (
ae_of_all μ (λ x hx,
(ha.eventually $ eventually_lt_nhds hx.left).mp $
(hb.eventually $ eventually_gt_nhds hx.right).mono $
λ i hbi hai, ⟨hai, hbi⟩)),
measurable := λ i, measurable_set_Ioo, }

variables [has_no_atoms μ]

lemma ae_cover_Ioc_of_Icc (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Ioc A B) l (λ i, Icc (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Ioc.symm, ae_cover_Ioo_of_Icc ha hb]

lemma ae_cover_Ioc_of_Ico (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Ioc A B) l (λ i, Ico (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Ioc.symm, ae_cover_Ioo_of_Ico ha hb]

lemma ae_cover_Ioc_of_Ioc (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Ioc A B) l (λ i, Ioc (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Ioc.symm, ae_cover_Ioo_of_Ioc ha hb]

lemma ae_cover_Ioc_of_Ioo (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Ioc A B) l (λ i, Ioo (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Ioc.symm, ae_cover_Ioo_of_Ioo ha hb]

lemma ae_cover_Ico_of_Icc (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Ico A B) l (λ i, Icc (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Ico.symm, ae_cover_Ioo_of_Icc ha hb]

lemma ae_cover_Ico_of_Ico (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Ico A B) l (λ i, Ico (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Ico.symm, ae_cover_Ioo_of_Ico ha hb]

lemma ae_cover_Ico_of_Ioc (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Ico A B) l (λ i, Ioc (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Ico.symm, ae_cover_Ioo_of_Ioc ha hb]

lemma ae_cover_Ico_of_Ioo (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Ico A B) l (λ i, Ioo (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Ico.symm, ae_cover_Ioo_of_Ioo ha hb]

lemma ae_cover_Icc_of_Icc (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Icc A B) l (λ i, Icc (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Icc.symm, ae_cover_Ioo_of_Icc ha hb]

lemma ae_cover_Icc_of_Ico (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Icc A B) l (λ i, Ico (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Icc.symm, ae_cover_Ioo_of_Ico ha hb]

lemma ae_cover_Icc_of_Ioc (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Icc A B) l (λ i, Ioc (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Icc.symm, ae_cover_Ioo_of_Ioc ha hb]

lemma ae_cover_Icc_of_Ioo (ha : tendsto a l (𝓝 A)) (hb : tendsto b l (𝓝 B)) :
ae_cover (μ.restrict $ Icc A B) l (λ i, Ioo (a i) (b i)) :=
by simp [measure.restrict_congr_set Ioo_ae_eq_Icc.symm, ae_cover_Ioo_of_Ioo ha hb]

end finite_intervals

lemma ae_cover.restrict {φ : ι → set α} (hφ : ae_cover μ l φ) {s : set α} :
ae_cover (μ.restrict s) l φ :=
{ ae_eventually_mem := ae_restrict_of_ae hφ.ae_eventually_mem,
Expand Down
13 changes: 13 additions & 0 deletions src/measure_theory/measure/measure_space.lean
Expand Up @@ -2043,6 +2043,19 @@ lemma self_mem_ae_restrict {s} (hs : measurable_set s) : s ∈ (μ.restrict s).a
by simp only [ae_restrict_eq hs, exists_prop, mem_principal, mem_inf_iff];
exact ⟨_, univ_mem, s, subset.rfl, (univ_inter s).symm⟩

/-- If two measurable sets are ae_eq then any proposition that is almost everywhere true on one
is almost everywhere true on the other -/
lemma ae_restrict_of_ae_eq_of_ae_restrict {s t} (hst : s =ᵐ[μ] t) {p : α → Prop} :
(∀ᵐ x ∂μ.restrict s, p x) → (∀ᵐ x ∂μ.restrict t, p x) :=
by simp [measure.restrict_congr_set hst]

/-- If two measurable sets are ae_eq then any proposition that is almost everywhere true on one
is almost everywhere true on the other -/
lemma ae_restrict_congr_set {s t} (hst : s =ᵐ[μ] t) {p : α → Prop} :
(∀ᵐ x ∂μ.restrict s, p x) ↔ (∀ᵐ x ∂μ.restrict t, p x) :=
⟨ae_restrict_of_ae_eq_of_ae_restrict hst, ae_restrict_of_ae_eq_of_ae_restrict hst.symm⟩


/-- A version of the **Borel-Cantelli lemma**: if `pᵢ` is a sequence of predicates such that
`∑ μ {x | pᵢ x}` is finite, then the measure of `x` such that `pᵢ x` holds frequently as `i → ∞` (or
equivalently, `pᵢ x` holds for infinitely many `i`) is equal to zero. -/
Expand Down
23 changes: 22 additions & 1 deletion src/topology/algebra/order/basic.lean
Expand Up @@ -980,8 +980,27 @@ lemma tendsto_nhds_bot_mono' [topological_space β] [partial_order β] [order_bo
tendsto_nhds_bot_mono hf (eventually_of_forall hg)

section linear_order
variables [topological_space α] [linear_order α]

variables [topological_space α] [linear_order α] [order_topology α]
section order_closed_topology
variables [order_closed_topology α] {a b : α}

lemma eventually_le_nhds (hab : a < b) : ∀ᶠ x in 𝓝 a, x ≤ b :=
eventually_iff.mpr (mem_nhds_iff.mpr ⟨Iio b, Iio_subset_Iic_self, is_open_Iio, hab⟩)

lemma eventually_lt_nhds (hab : a < b) : ∀ᶠ x in 𝓝 a, x < b :=
eventually_iff.mpr (mem_nhds_iff.mpr ⟨Iio b, rfl.subset, is_open_Iio, hab⟩)

lemma eventually_ge_nhds (hab : b < a) : ∀ᶠ x in 𝓝 a, b ≤ x :=
eventually_iff.mpr (mem_nhds_iff.mpr ⟨Ioi b, Ioi_subset_Ici_self, is_open_Ioi, hab⟩)

lemma eventually_gt_nhds (hab : b < a) : ∀ᶠ x in 𝓝 a, b < x :=
eventually_iff.mpr (mem_nhds_iff.mpr ⟨Ioi b, rfl.subset, is_open_Ioi, hab⟩)

end order_closed_topology

section order_topology
variables [order_topology α]

lemma exists_Ioc_subset_of_mem_nhds' {a : α} {s : set α} (hs : s ∈ 𝓝 a) {l : α} (hl : l < a) :
∃ l' ∈ Ico l a, Ioc l' a ⊆ s :=
Expand Down Expand Up @@ -1497,6 +1516,8 @@ begin
exact ⟨l, la, subset.trans Ioc_subset_Icc_self as⟩ }
end

end order_topology

end linear_order

section linear_ordered_add_comm_group
Expand Down

0 comments on commit 93df724

Please sign in to comment.