/-
Copyright (c) 2023 Kalle Kytölä. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kalle Kytölä
-/
module
public import Mathlib.MeasureTheory.Integral.Lebesgue.DominatedConvergence
import Mathlib.MeasureTheory.Constructions.BorelSpace.Metrizable
/-!
# Results about indicator functions, their integrals, and measures
This file has a few measure-theoretic or integration-related results on indicator functions.
## Implementation notes
This file exists to avoid importing `Mathlib/MeasureTheory/Constructions/BorelSpace/Metrizable.lean`
in `Mathlib/MeasureTheory/Integral/Lebesgue/Basic.lean`.
## TODO
The result `MeasureTheory.tendsto_measure_of_tendsto_indicator` here could be proved without
integration, if we had convergence of measures results for countably generated filters. Ideally,
the present file would then become unnecessary: lemmas such as
`MeasureTheory.tendsto_measure_of_ae_tendsto_indicator` would not need integration so could be
moved out of `Mathlib/MeasureTheory/Integral/Lebesgue/Basic.lean`, and the lemmas in this file could
be moved to, e.g., `Mathlib/MeasureTheory/Constructions/BorelSpace/Metrizable.lean`.
-/
public section
namespace MeasureTheory
section TendstoIndicator
open Set Filter ENNReal
open scoped Topology
variable {α : Type*} [MeasurableSpace α] {A : Set α}
variable {ι : Type*} (L : Filter ι) [IsCountablyGenerated L] {As : ι → Set α}
/-- If the indicators of measurable sets `Aᵢ` tend pointwise almost everywhere to the indicator
of a measurable set `A` and we eventually have `Aᵢ ⊆ B` for some set `B` of finite measure, then
the measures of `Aᵢ` tend to the measure of `A`. -/
lemma tendsto_measure_of_ae_tendsto_indicator {μ : Measure α} (A_mble : MeasurableSet A)
(As_mble : ∀ i, MeasurableSet (As i)) {B : Set α} (B_mble : MeasurableSet B)
(B_finmeas : μ B ≠ ∞) (As_le_B : ∀ᶠ i in L, As i ⊆ B)
(h_lim : ∀ᵐ x ∂μ, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
Tendsto (fun i ↦ μ (As i)) L ( (μ A)) := by
simp_rw [← MeasureTheory.lintegral_indicator_one A_mble,
← MeasureTheory.lintegral_indicator_one (As_mble _)]
refine tendsto_lintegral_filter_of_dominated_convergence (B.indicator (1 : α → ℝ≥0∞))
(Eventually.of_forall ?_) ?_ ?_ ?_
· exact fun i ↦ Measurable.indicator measurable_const (As_mble i)
· filter_upwards [As_le_B] with i hi
exact Eventually.of_forall fun x ↦ by grw [hi]
· rwa [← lintegral_indicator_one B_mble] at B_finmeas
· simpa only [Pi.one_def, tendsto_indicator_const_apply_iff_eventually] using h_lim
/-- If `μ` is a finite measure and the indicators of measurable sets `Aᵢ` tend pointwise
almost everywhere to the indicator of a measurable set `A`, then the measures `μ Aᵢ` tend to
the measure `μ A`. -/
lemma tendsto_measure_of_ae_tendsto_indicator_of_isFiniteMeasure
{μ : Measure α} [IsFiniteMeasure μ] (A_mble : MeasurableSet A)
(As_mble : ∀ i, MeasurableSet (As i)) (h_lim : ∀ᵐ x ∂μ, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
Tendsto (fun i ↦ μ (As i)) L ( (μ A)) :=
tendsto_measure_of_ae_tendsto_indicator L A_mble As_mble MeasurableSet.univ
(by finiteness) (Eventually.of_forall (fun i ↦ subset_univ (As i))) h_lim
/-- If the indicators of measurable sets `Aᵢ` tend pointwise to the indicator of a set `A`
and we eventually have `Aᵢ ⊆ B` for some set `B` of finite measure, then the measures of `Aᵢ`
tend to the measure of `A`. -/
lemma tendsto_measure_of_tendsto_indicator {μ : Measure α}
(As_mble : ∀ i, MeasurableSet (As i)) {B : Set α} (B_mble : MeasurableSet B)
(B_finmeas : μ B ≠ ∞) (As_le_B : ∀ᶠ i in L, As i ⊆ B)
(h_lim : ∀ x, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
Tendsto (fun i ↦ μ (As i)) L ( (μ A)) := by
rcases L.eq_or_neBot with rfl | _
· exact tendsto_bot
apply tendsto_measure_of_ae_tendsto_indicator L ?_ As_mble B_mble B_finmeas As_le_B
(ae_of_all μ h_lim)
exact measurableSet_of_tendsto_indicator L As_mble h_lim
/-- If `μ` is a finite measure and the indicators of measurable sets `Aᵢ` tend pointwise to
the indicator of a set `A`, then the measures `μ Aᵢ` tend to the measure `μ A`. -/
lemma tendsto_measure_of_tendsto_indicator_of_isFiniteMeasure
(μ : Measure α) [IsFiniteMeasure μ] (As_mble : ∀ i, MeasurableSet (As i))
(h_lim : ∀ x, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
Tendsto (fun i ↦ μ (As i)) L ( (μ A)) := by
rcases L.eq_or_neBot with rfl | _
· exact tendsto_bot
apply tendsto_measure_of_ae_tendsto_indicator_of_isFiniteMeasure L ?_ As_mble (ae_of_all μ h_lim)
exact measurableSet_of_tendsto_indicator L As_mble h_lim
end TendstoIndicator -- section
end MeasureTheory
¤ Dauer der Verarbeitung: 0.7 Sekunden
¤
*© Formatika GbR, Deutschland