state
stringlengths
0
159k
srcUpToTactic
stringlengths
387
167k
nextTactic
stringlengths
3
9k
declUpToTactic
stringlengths
22
11.5k
declId
stringlengths
38
95
decl
stringlengths
16
1.89k
file_tag
stringlengths
17
73
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f : α → E s : Set α μ : Measure α C : ℝ hs : ↑↑μ s < ⊤ hf : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C ⊢ ↑↑(Measure.restrict μ s) univ < ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by
rwa [Measure.restrict_apply_univ]
theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by
Mathlib.MeasureTheory.Integral.IntegrableOn.79_0.qIpN2P2TD1gUH4J
theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α ⊢ IntegrableOn f ∅
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by
simp [IntegrableOn, integrable_zero_measure]
@[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.105_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α ⊢ IntegrableOn f univ ↔ Integrable f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by
rw [IntegrableOn, Measure.restrict_univ]
@[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.109_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α C : E ⊢ C = 0 ∨ ↑↑(Measure.restrict μ s) univ < ⊤ ↔ C = 0 ∨ ↑↑μ s < ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by
rw [Measure.restrict_apply_univ]
@[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by
Mathlib.MeasureTheory.Integral.IntegrableOn.118_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α h : IntegrableOn f s hs : MeasurableSet s ⊢ IntegrableOn f s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by
rw [IntegrableOn, Measure.restrict_restrict hs]
theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by
Mathlib.MeasureTheory.Integral.IntegrableOn.167_0.qIpN2P2TD1gUH4J
theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α h : IntegrableOn f s hs : MeasurableSet s ⊢ Integrable f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs];
exact h.mono_set (inter_subset_left _ _)
theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs];
Mathlib.MeasureTheory.Integral.IntegrableOn.167_0.qIpN2P2TD1gUH4J
theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α h : IntegrableOn f s ⊢ IntegrableOn f (s ∩ t)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by
have := h.mono_set (inter_subset_left s t)
theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.172_0.qIpN2P2TD1gUH4J
theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α h : IntegrableOn f s this : IntegrableOn f (s ∩ t) ⊢ IntegrableOn f (s ∩ t)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t)
rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this
theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t)
Mathlib.MeasureTheory.Integral.IntegrableOn.172_0.qIpN2P2TD1gUH4J
theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α inst✝ : DecidablePred fun x => x ∈ s hs : MeasurableSet s hf : IntegrableOn f s hg : IntegrableOn g sᶜ ⊢ Integrable (Set.piecewise s f g)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by
rw [IntegrableOn] at hf hg
lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.177_0.qIpN2P2TD1gUH4J
lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α inst✝ : DecidablePred fun x => x ∈ s hs : MeasurableSet s hf : Integrable f hg : Integrable g ⊢ Integrable (Set.piecewise s f g)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg
rw [← memℒp_one_iff_integrable] at hf hg ⊢
lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg
Mathlib.MeasureTheory.Integral.IntegrableOn.177_0.qIpN2P2TD1gUH4J
lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α inst✝ : DecidablePred fun x => x ∈ s hs : MeasurableSet s hf : Memℒp f 1 hg : Memℒp g 1 ⊢ Memℒp (Set.piecewise s f g) 1
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢
exact Memℒp.piecewise hs hf hg
lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢
Mathlib.MeasureTheory.Integral.IntegrableOn.177_0.qIpN2P2TD1gUH4J
lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α x : α inst✝ : MeasurableSingletonClass α ⊢ IntegrableOn f {x} ↔ f x = 0 ∨ ↑↑μ {x} < ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by
have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha]
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.202_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α x : α inst✝ : MeasurableSingletonClass α ⊢ f =ᵐ[Measure.restrict μ {x}] fun x_1 => f x
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by
filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by
Mathlib.MeasureTheory.Integral.IntegrableOn.202_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞
Mathlib_MeasureTheory_Integral_IntegrableOn
case h α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α x : α inst✝ : MeasurableSingletonClass α a✝ : α ha : a✝ ∈ {x} ⊢ f a✝ = f x
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha
simp only [mem_singleton_iff.1 ha]
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha
Mathlib.MeasureTheory.Integral.IntegrableOn.202_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α x : α inst✝ : MeasurableSingletonClass α this : f =ᵐ[Measure.restrict μ {x}] fun x_1 => f x ⊢ IntegrableOn f {x} ↔ f x = 0 ∨ ↑↑μ {x} < ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha]
rw [IntegrableOn, integrable_congr this, integrable_const_iff]
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha]
Mathlib.MeasureTheory.Integral.IntegrableOn.202_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α x : α inst✝ : MeasurableSingletonClass α this : f =ᵐ[Measure.restrict μ {x}] fun x_1 => f x ⊢ f x = 0 ∨ ↑↑(Measure.restrict μ {x}) univ < ⊤ ↔ f x = 0 ∨ ↑↑μ {x} < ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff]
simp
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff]
Mathlib.MeasureTheory.Integral.IntegrableOn.202_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s✝ t✝ : Set α μ ν : Measure α s : Set β hs : Set.Finite s t : β → Set α ⊢ IntegrableOn f (⋃ i ∈ s, t i) ↔ ∀ i ∈ s, IntegrableOn f (t i)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by
refine hs.induction_on ?_ ?_
@[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.212_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case refine_1 α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s✝ t✝ : Set α μ ν : Measure α s : Set β hs : Set.Finite s t : β → Set α ⊢ IntegrableOn f (⋃ i ∈ ∅, t i) ↔ ∀ i ∈ ∅, IntegrableOn f (t i)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ ·
simp
@[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ ·
Mathlib.MeasureTheory.Integral.IntegrableOn.212_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case refine_2 α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s✝ t✝ : Set α μ ν : Measure α s : Set β hs : Set.Finite s t : β → Set α ⊢ ∀ {a : β} {s : Set β}, a ∉ s → Set.Finite s → (IntegrableOn f (⋃ i ∈ s, t i) ↔ ∀ i ∈ s, IntegrableOn f (t i)) → (IntegrableOn f (⋃ i ∈ insert a s, t i) ↔ ∀ i ∈ insert a s, IntegrableOn f (t i))
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp ·
intro a s _ _ hf
@[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp ·
Mathlib.MeasureTheory.Integral.IntegrableOn.212_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case refine_2 α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s✝¹ t✝ : Set α μ ν : Measure α s✝ : Set β hs : Set.Finite s✝ t : β → Set α a : β s : Set β a✝¹ : a ∉ s a✝ : Set.Finite s hf : IntegrableOn f (⋃ i ∈ s, t i) ↔ ∀ i ∈ s, IntegrableOn f (t i) ⊢ IntegrableOn f (⋃ i ∈ insert a s, t i) ↔ ∀ i ∈ insert a s, IntegrableOn f (t i)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf;
simp [hf, or_imp, forall_and]
@[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf;
Mathlib.MeasureTheory.Integral.IntegrableOn.212_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t✝ : Set α μ ν : Measure α inst✝ : Finite β t : β → Set α ⊢ IntegrableOn f (⋃ i, t i) ↔ ∀ (i : β), IntegrableOn f (t i)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by
cases nonempty_fintype β
@[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.226_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f g : α → E s t✝ : Set α μ ν : Measure α inst✝ : Finite β t : β → Set α val✝ : Fintype β ⊢ IntegrableOn f (⋃ i, t i) ↔ ∀ (i : β), IntegrableOn f (t i)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β
simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t
@[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β
Mathlib.MeasureTheory.Integral.IntegrableOn.226_0.qIpN2P2TD1gUH4J
@[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hμ : IntegrableOn f s hν : IntegrableOn f s ⊢ IntegrableOn f s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by
delta IntegrableOn
theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by
Mathlib.MeasureTheory.Integral.IntegrableOn.233_0.qIpN2P2TD1gUH4J
theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hμ : IntegrableOn f s hν : IntegrableOn f s ⊢ Integrable f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn;
rw [Measure.restrict_add]
theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn;
Mathlib.MeasureTheory.Integral.IntegrableOn.233_0.qIpN2P2TD1gUH4J
theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hμ : IntegrableOn f s hν : IntegrableOn f s ⊢ Integrable f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add];
exact hμ.integrable.add_measure hν
theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add];
Mathlib.MeasureTheory.Integral.IntegrableOn.233_0.qIpN2P2TD1gUH4J
theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ✝ ν : Measure α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E μ : Measure α s : Set β ⊢ IntegrableOn f s ↔ IntegrableOn (f ∘ e) (e ⁻¹' s)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by
simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff]
theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.246_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ✝ ν : Measure α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E μ : Measure β s : Set β hs : s ⊆ range e ⊢ IntegrableOn f s ↔ IntegrableOn (f ∘ e) (e ⁻¹' s)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by
simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs]
theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by
Mathlib.MeasureTheory.Integral.IntegrableOn.252_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ✝ ν : Measure α inst✝ : MeasurableSpace β e : α ≃ᵐ β f : β → E μ : Measure α s : Set β ⊢ IntegrableOn f s ↔ IntegrableOn (f ∘ ⇑e) (⇑e ⁻¹' s)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by
simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e]
theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.258_0.qIpN2P2TD1gUH4J
theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hs : MeasurableSet s ⊢ Integrable (indicator s f) ↔ IntegrableOn f s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by
simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs]
theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.275_0.qIpN2P2TD1gUH4J
theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E✝ : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E✝ f g : α → E✝ s✝ t : Set α μ ν : Measure α E : Type u_5 inst✝ : NormedAddCommGroup E p : ℝ≥0∞ s : Set α hs : MeasurableSet s hμs : ↑↑μ s ≠ ⊤ c : E ⊢ Integrable ↑↑(indicatorConstLp p hs hμs c)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by
rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top]
theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.296_0.qIpN2P2TD1gUH4J
theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E✝ : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E✝ f g : α → E✝ s✝ t : Set α μ ν : Measure α E : Type u_5 inst✝ : NormedAddCommGroup E p : ℝ≥0∞ s : Set α hs : MeasurableSet s hμs : ↑↑μ s ≠ ⊤ c : E ⊢ c = 0 ∨ ↑↑(Measure.restrict μ s) univ ≠ ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top]
right
theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top]
Mathlib.MeasureTheory.Integral.IntegrableOn.296_0.qIpN2P2TD1gUH4J
theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case h α : Type u_1 β : Type u_2 E✝ : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E✝ f g : α → E✝ s✝ t : Set α μ ν : Measure α E : Type u_5 inst✝ : NormedAddCommGroup E p : ℝ≥0∞ s : Set α hs : MeasurableSet s hμs : ↑↑μ s ≠ ⊤ c : E ⊢ ↑↑(Measure.restrict μ s) univ ≠ ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right
simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs
theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right
Mathlib.MeasureTheory.Integral.IntegrableOn.296_0.qIpN2P2TD1gUH4J
theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 ⊢ Measure.restrict μ (toMeasurable μ s) = Measure.restrict μ s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by
rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro.intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) ⊢ Measure.restrict μ (toMeasurable μ s) = Measure.restrict μ s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩
let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ }
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro.intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} ⊢ Measure.restrict μ (toMeasurable μ s) = Measure.restrict μ s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ }
have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ }
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} ⊢ ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by
intro n
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} n : ℕ ⊢ ↑↑μ (s ∩ v n) ≠ ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n
rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable]
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} n : ℕ ⊢ ↑↑(Measure.restrict μ s) {x | u n ≤ ‖f x‖} ≠ ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable]
exact (hf.measure_norm_ge_lt_top (u_pos n)).ne
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable]
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro.intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ ⊢ Measure.restrict μ (toMeasurable μ s) = Measure.restrict μ s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne
apply Measure.restrict_toMeasurable_of_cover _ A
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ ⊢ s ⊆ ⋃ n, v n
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A
intro x hx
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ x : α hx : x ∈ s ⊢ x ∈ ⋃ n, v n
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx
have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff]
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ x : α hx : x ∈ s ⊢ 0 < ‖f x‖
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by
simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff]
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ x : α hx : x ∈ s this : 0 < ‖f x‖ ⊢ x ∈ ⋃ n, v n
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff]
obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff]
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ x : α hx : x ∈ s this : 0 < ‖f x‖ ⊢ ∃ n, u n < ‖f x‖ case intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ x : α hx : x ∈ s this : 0 < ‖f x‖ n : ℕ hn : u n < ‖f x‖ ⊢ x ∈ ⋃ n, v n
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖;
exact ((tendsto_order.1 u_lim).2 _ this).exists
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖;
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ x : α hx : x ∈ s this : 0 < ‖f x‖ n : ℕ hn : u n < ‖f x‖ ⊢ x ∈ ⋃ n, v n
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists
refine' mem_iUnion.2 ⟨n, _⟩
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h's : ∀ x ∈ s, f x ≠ 0 u : ℕ → ℝ left✝ : StrictAnti u u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖} A : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤ x : α hx : x ∈ s this : 0 < ‖f x‖ n : ℕ hn : u n < ‖f x‖ ⊢ x ∈ v n
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩
exact subset_toMeasurable _ _ hn.le
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.306_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 ⊢ IntegrableOn f t
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by
let u := { x ∈ s | f x ≠ 0 }
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} ⊢ IntegrableOn f t
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 }
have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 }
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u ⊢ IntegrableOn f t
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1
let v := toMeasurable μ u
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u ⊢ IntegrableOn f t
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u
have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u ⊢ IntegrableOn f v
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by
rw [IntegrableOn, hu.restrict_toMeasurable]
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u ⊢ Integrable f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] ·
exact hu
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] ·
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u ⊢ ∀ x ∈ u, f x ≠ 0
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu ·
intro x hx
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu ·
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u x : α hx : x ∈ u ⊢ f x ≠ 0
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx;
exact hx.2
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx;
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v ⊢ IntegrableOn f t
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2
have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v ⊢ IntegrableOn f (t \ v)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by
apply integrableOn_zero.congr
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v ⊢ (fun x => 0) =ᵐ[Measure.restrict μ (t \ v)] f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr
filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case h α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v x : α hxt : x ∈ t \ s → f x = 0 hx : x ∈ t \ v ⊢ 0 = f x
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx
by_cases h'x : x ∈ s
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case pos α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v x : α hxt : x ∈ t \ s → f x = 0 hx : x ∈ t \ v h'x : x ∈ s ⊢ 0 = f x
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s ·
by_contra H
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s ·
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case pos α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v x : α hxt : x ∈ t \ s → f x = 0 hx : x ∈ t \ v h'x : x ∈ s H : ¬0 = f x ⊢ False
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H
exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩)
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case neg α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v x : α hxt : x ∈ t \ s → f x = 0 hx : x ∈ t \ v h'x : x ∉ s ⊢ 0 = f x
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) ·
exact (hxt ⟨hx.1, h'x⟩).symm
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) ·
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v B : IntegrableOn f (t \ v) ⊢ IntegrableOn f t
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm
apply (A.union B).mono_set _
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v B : IntegrableOn f (t \ v) ⊢ t ⊆ v ∪ t \ v
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _
rw [union_diff_self]
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s ht : NullMeasurableSet t h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0 u : Set α := {x | x ∈ s ∧ f x ≠ 0} hu : IntegrableOn f u v : Set α := toMeasurable μ u A : IntegrableOn f v B : IntegrableOn f (t \ v) ⊢ t ⊆ v ∪ t
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self]
exact subset_union_right _ _
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self]
Mathlib.MeasureTheory.Integral.IntegrableOn.326_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h't : ∀ᵐ (x : α) ∂μ, x ∉ s → f x = 0 ⊢ Integrable f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by
rw [← integrableOn_univ]
/-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.357_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h't : ∀ᵐ (x : α) ∂μ, x ∉ s → f x = 0 ⊢ IntegrableOn f univ
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ]
apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ
/-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ]
Mathlib.MeasureTheory.Integral.IntegrableOn.357_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α hf : IntegrableOn f s h't : ∀ᵐ (x : α) ∂μ, x ∉ s → f x = 0 ⊢ ∀ᵐ (x : α) ∂μ, x ∈ univ \ s → f x = 0
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ
filter_upwards [h't] with x hx h'x using hx h'x.2
/-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ
Mathlib.MeasureTheory.Integral.IntegrableOn.357_0.qIpN2P2TD1gUH4J
/-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α h1s : support f ⊆ s ⊢ IntegrableOn f s ↔ Integrable f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by
refine' ⟨fun h => _, fun h => h.integrableOn⟩
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.373_0.qIpN2P2TD1gUH4J
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α h1s : support f ⊆ s h : IntegrableOn f s ⊢ Integrable f
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩
refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.373_0.qIpN2P2TD1gUH4J
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α h1s : support f ⊆ s h : IntegrableOn f s x : α hx : x ∉ s ⊢ f x = 0
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_
contrapose! hx
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_
Mathlib.MeasureTheory.Integral.IntegrableOn.373_0.qIpN2P2TD1gUH4J
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α h1s : support f ⊆ s h : IntegrableOn f s x : α hx : f x ≠ 0 ⊢ x ∈ s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx
exact h1s (mem_support.2 hx)
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx
Mathlib.MeasureTheory.Integral.IntegrableOn.373_0.qIpN2P2TD1gUH4J
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E✝ : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E✝ f✝ g : α → E✝ s✝ t : Set α μ ν : Measure α E : Type u_5 inst✝ : NormedAddCommGroup E p : ℝ≥0∞ s : Set α f : ↥(Lp E p) hp : 1 ≤ p hμs : ↑↑μ s ≠ ⊤ ⊢ IntegrableOn (↑↑f) s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by
refine' memℒp_one_iff_integrable.mp _
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.381_0.qIpN2P2TD1gUH4J
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E✝ : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E✝ f✝ g : α → E✝ s✝ t : Set α μ ν : Measure α E : Type u_5 inst✝ : NormedAddCommGroup E p : ℝ≥0∞ s : Set α f : ↥(Lp E p) hp : 1 ≤ p hμs : ↑↑μ s ≠ ⊤ ⊢ Memℒp (↑↑f) 1
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _
have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top]
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _
Mathlib.MeasureTheory.Integral.IntegrableOn.381_0.qIpN2P2TD1gUH4J
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E✝ : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E✝ f✝ g : α → E✝ s✝ t : Set α μ ν : Measure α E : Type u_5 inst✝ : NormedAddCommGroup E p : ℝ≥0∞ s : Set α f : ↥(Lp E p) hp : 1 ≤ p hμs : ↑↑μ s ≠ ⊤ ⊢ ↑↑(Measure.restrict μ s) univ < ⊤
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by
simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top]
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.381_0.qIpN2P2TD1gUH4J
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E✝ : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E✝ f✝ g : α → E✝ s✝ t : Set α μ ν : Measure α E : Type u_5 inst✝ : NormedAddCommGroup E p : ℝ≥0∞ s : Set α f : ↥(Lp E p) hp : 1 ≤ p hμs : ↑↑μ s ≠ ⊤ hμ_restrict_univ : ↑↑(Measure.restrict μ s) univ < ⊤ ⊢ Memℒp (↑↑f) 1
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top]
haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top]
Mathlib.MeasureTheory.Integral.IntegrableOn.381_0.qIpN2P2TD1gUH4J
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E✝ : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E✝ f✝ g : α → E✝ s✝ t : Set α μ ν : Measure α E : Type u_5 inst✝ : NormedAddCommGroup E p : ℝ≥0∞ s : Set α f : ↥(Lp E p) hp : 1 ≤ p hμs : ↑↑μ s ≠ ⊤ hμ_restrict_univ : ↑↑(Measure.restrict μ s) univ < ⊤ hμ_finite : IsFiniteMeasure (Measure.restrict μ s) ⊢ Memℒp (↑↑f) 1
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩
exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.381_0.qIpN2P2TD1gUH4J
theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E ⊢ IntegrableAtFilter f (map e l) ↔ IntegrableAtFilter (f ∘ e) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by
simp_rw [IntegrableAtFilter, he.integrableOn_map_iff]
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.411_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E ⊢ (∃ s ∈ map e l, IntegrableOn (f ∘ e) (e ⁻¹' s)) ↔ ∃ s ∈ l, IntegrableOn (f ∘ e) s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff]
constructor
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff]
Mathlib.MeasureTheory.Integral.IntegrableOn.411_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case mp α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E ⊢ (∃ s ∈ map e l, IntegrableOn (f ∘ e) (e ⁻¹' s)) → ∃ s ∈ l, IntegrableOn (f ∘ e) s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;>
rintro ⟨s, hs⟩
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;>
Mathlib.MeasureTheory.Integral.IntegrableOn.411_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case mpr α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E ⊢ (∃ s ∈ l, IntegrableOn (f ∘ e) s) → ∃ s ∈ map e l, IntegrableOn (f ∘ e) (e ⁻¹' s)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;>
rintro ⟨s, hs⟩
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;>
Mathlib.MeasureTheory.Integral.IntegrableOn.411_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case mp.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E s : Set β hs : s ∈ map e l ∧ IntegrableOn (f ∘ e) (e ⁻¹' s) ⊢ ∃ s ∈ l, IntegrableOn (f ∘ e) s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ ·
exact ⟨_, hs⟩
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ ·
Mathlib.MeasureTheory.Integral.IntegrableOn.411_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case mpr.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E s : Set α hs : s ∈ l ∧ IntegrableOn (f ∘ e) s ⊢ ∃ s ∈ map e l, IntegrableOn (f ∘ e) (e ⁻¹' s)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ ·
exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ ·
Mathlib.MeasureTheory.Integral.IntegrableOn.411_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E s : Set α hs : s ∈ l ∧ IntegrableOn (f ∘ e) s ⊢ e '' s ∈ map e l ∧ IntegrableOn (f ∘ e) (e ⁻¹' (e '' s))
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by
rwa [mem_map, he.injective.preimage_image]
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by
Mathlib.MeasureTheory.Integral.IntegrableOn.411_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ✝ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E μ : Measure β ⊢ IntegrableAtFilter f (map e l) ↔ IntegrableAtFilter (f ∘ e) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by
simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap]
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by
Mathlib.MeasureTheory.Integral.IntegrableOn.419_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ✝ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E μ : Measure β ⊢ (∃ s ∈ map e l, IntegrableOn f s) ↔ ∃ s ∈ map e l, IntegrableOn f s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap]
constructor
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap]
Mathlib.MeasureTheory.Integral.IntegrableOn.419_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e)
Mathlib_MeasureTheory_Integral_IntegrableOn
case mp α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ✝ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E μ : Measure β ⊢ (∃ s ∈ map e l, IntegrableOn f s) → ∃ s ∈ map e l, IntegrableOn f s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;>
rintro ⟨s, hs, int⟩
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;>
Mathlib.MeasureTheory.Integral.IntegrableOn.419_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e)
Mathlib_MeasureTheory_Integral_IntegrableOn
case mpr α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ✝ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E μ : Measure β ⊢ (∃ s ∈ map e l, IntegrableOn f s) → ∃ s ∈ map e l, IntegrableOn f s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;>
rintro ⟨s, hs, int⟩
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;>
Mathlib.MeasureTheory.Integral.IntegrableOn.419_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e)
Mathlib_MeasureTheory_Integral_IntegrableOn
case mp.intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ✝ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E μ : Measure β s : Set β hs : s ∈ map e l int : IntegrableOn f s ⊢ ∃ s ∈ map e l, IntegrableOn f s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ ·
exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ ·
Mathlib.MeasureTheory.Integral.IntegrableOn.419_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e)
Mathlib_MeasureTheory_Integral_IntegrableOn
case mpr.intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝² : MeasurableSpace α inst✝¹ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ✝ ν : Measure α l l' : Filter α inst✝ : MeasurableSpace β e : α → β he : MeasurableEmbedding e f : β → E μ : Measure β s : Set β hs : s ∈ map e l int : IntegrableOn f s ⊢ ∃ s ∈ map e l, IntegrableOn f s
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ ·
exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ ·
Mathlib.MeasureTheory.Integral.IntegrableOn.419_0.qIpN2P2TD1gUH4J
theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e)
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f✝ g✝ : α → E s t : Set α μ ν : Measure α l l' : Filter α f g : α → E hf : IntegrableAtFilter f l hg : IntegrableAtFilter g l ⊢ IntegrableAtFilter (f + g) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by
rcases hf with ⟨s, sl, hs⟩
protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.437_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f✝ g✝ : α → E s✝ t : Set α μ ν : Measure α l l' : Filter α f g : α → E hg : IntegrableAtFilter g l s : Set α sl : s ∈ l hs : IntegrableOn f s ⊢ IntegrableAtFilter (f + g) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩
rcases hg with ⟨t, tl, ht⟩
protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.437_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro.intro.intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f✝ g✝ : α → E s✝ t✝ : Set α μ ν : Measure α l l' : Filter α f g : α → E s : Set α sl : s ∈ l hs : IntegrableOn f s t : Set α tl : t ∈ l ht : IntegrableOn g t ⊢ IntegrableAtFilter (f + g) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩
refine ⟨s ∩ t, inter_mem sl tl, ?_⟩
protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.437_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro.intro.intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f✝ g✝ : α → E s✝ t✝ : Set α μ ν : Measure α l l' : Filter α f g : α → E s : Set α sl : s ∈ l hs : IntegrableOn f s t : Set α tl : t ∈ l ht : IntegrableOn g t ⊢ IntegrableOn (f + g) (s ∩ t)
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩
exact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _))
protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.437_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ ν : Measure α l l' : Filter α f : α → E hf : IntegrableAtFilter f l ⊢ IntegrableAtFilter (-f) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩ exact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _)) protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by
rcases hf with ⟨s, sl, hs⟩
protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.445_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ ν : Measure α l l' : Filter α f : α → E s : Set α sl : s ∈ l hs : IntegrableOn f s ⊢ IntegrableAtFilter (-f) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩ exact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _)) protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by rcases hf with ⟨s, sl, hs⟩
exact ⟨s, sl, hs.neg⟩
protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by rcases hf with ⟨s, sl, hs⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.445_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f✝ g✝ : α → E s t : Set α μ ν : Measure α l l' : Filter α f g : α → E hf : IntegrableAtFilter f l hg : IntegrableAtFilter g l ⊢ IntegrableAtFilter (f - g) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩ exact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _)) protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by rcases hf with ⟨s, sl, hs⟩ exact ⟨s, sl, hs.neg⟩ protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ := by
rw [sub_eq_add_neg]
protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.450_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f✝ g✝ : α → E s t : Set α μ ν : Measure α l l' : Filter α f g : α → E hf : IntegrableAtFilter f l hg : IntegrableAtFilter g l ⊢ IntegrableAtFilter (f + -g) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩ exact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _)) protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by rcases hf with ⟨s, sl, hs⟩ exact ⟨s, sl, hs.neg⟩ protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ := by rw [sub_eq_add_neg]
exact hf.add hg.neg
protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ := by rw [sub_eq_add_neg]
Mathlib.MeasureTheory.Integral.IntegrableOn.450_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝⁴ : MeasurableSpace α inst✝³ : NormedAddCommGroup E f✝ g : α → E s t : Set α μ ν : Measure α l l' : Filter α 𝕜 : Type u_5 inst✝² : NormedAddCommGroup 𝕜 inst✝¹ : SMulZeroClass 𝕜 E inst✝ : BoundedSMul 𝕜 E f : α → E hf : IntegrableAtFilter f l c : 𝕜 ⊢ IntegrableAtFilter (c • f) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩ exact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _)) protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by rcases hf with ⟨s, sl, hs⟩ exact ⟨s, sl, hs.neg⟩ protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ := by rw [sub_eq_add_neg] exact hf.add hg.neg protected theorem IntegrableAtFilter.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E] [BoundedSMul 𝕜 E] {f : α → E} (hf : IntegrableAtFilter f l μ) (c : 𝕜) : IntegrableAtFilter (c • f) l μ := by
rcases hf with ⟨s, sl, hs⟩
protected theorem IntegrableAtFilter.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E] [BoundedSMul 𝕜 E] {f : α → E} (hf : IntegrableAtFilter f l μ) (c : 𝕜) : IntegrableAtFilter (c • f) l μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.456_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E] [BoundedSMul 𝕜 E] {f : α → E} (hf : IntegrableAtFilter f l μ) (c : 𝕜) : IntegrableAtFilter (c • f) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
case intro.intro α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝⁴ : MeasurableSpace α inst✝³ : NormedAddCommGroup E f✝ g : α → E s✝ t : Set α μ ν : Measure α l l' : Filter α 𝕜 : Type u_5 inst✝² : NormedAddCommGroup 𝕜 inst✝¹ : SMulZeroClass 𝕜 E inst✝ : BoundedSMul 𝕜 E f : α → E c : 𝕜 s : Set α sl : s ∈ l hs : IntegrableOn f s ⊢ IntegrableAtFilter (c • f) l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩ exact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _)) protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by rcases hf with ⟨s, sl, hs⟩ exact ⟨s, sl, hs.neg⟩ protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ := by rw [sub_eq_add_neg] exact hf.add hg.neg protected theorem IntegrableAtFilter.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E] [BoundedSMul 𝕜 E] {f : α → E} (hf : IntegrableAtFilter f l μ) (c : 𝕜) : IntegrableAtFilter (c • f) l μ := by rcases hf with ⟨s, sl, hs⟩
exact ⟨s, sl, hs.smul c⟩
protected theorem IntegrableAtFilter.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E] [BoundedSMul 𝕜 E] {f : α → E} (hf : IntegrableAtFilter f l μ) (c : 𝕜) : IntegrableAtFilter (c • f) l μ := by rcases hf with ⟨s, sl, hs⟩
Mathlib.MeasureTheory.Integral.IntegrableOn.456_0.qIpN2P2TD1gUH4J
protected theorem IntegrableAtFilter.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E] [BoundedSMul 𝕜 E] {f : α → E} (hf : IntegrableAtFilter f l μ) (c : 𝕜) : IntegrableAtFilter (c • f) l μ
Mathlib_MeasureTheory_Integral_IntegrableOn
α : Type u_1 β : Type u_2 E : Type u_3 F : Type u_4 inst✝¹ : MeasurableSpace α inst✝ : NormedAddCommGroup E f g : α → E s t : Set α μ ν : Measure α l✝ l' l : Filter α ⊢ IntegrableAtFilter f (l ⊓ Measure.ae μ) ↔ IntegrableAtFilter f l
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" /-! # Functions integrable on a set and at a filter We define `IntegrableOn f s μ := Integrable f (μ.restrict s)` and prove theorems like `integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ`. Next we define a predicate `IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α)` saying that `f` is integrable at some set `s ∈ l` and prove that a measurable function is integrable at `l` with respect to `μ` provided that `f` is bounded above at `l ⊓ μ.ae` and `μ` is finite at `l`. -/ noncomputable section open Set Filter TopologicalSpace MeasureTheory Function open scoped Classical Topology Interval BigOperators Filter ENNReal MeasureTheory variable {α β E F : Type*} [MeasurableSpace α] section variable [TopologicalSpace β] {l l' : Filter α} {f g : α → β} {μ ν : Measure α} /-- A function `f` is strongly measurable at a filter `l` w.r.t. a measure `μ` if it is ae strongly measurable w.r.t. `μ.restrict s` for some `s ∈ l`. -/ def StronglyMeasurableAtFilter (f : α → β) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, AEStronglyMeasurable f (μ.restrict s) #align strongly_measurable_at_filter StronglyMeasurableAtFilter @[simp] theorem stronglyMeasurableAt_bot {f : α → β} : StronglyMeasurableAtFilter f ⊥ μ := ⟨∅, mem_bot, by simp⟩ #align strongly_measurable_at_bot stronglyMeasurableAt_bot protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) : ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s) := (eventually_smallSets' fun _ _ => AEStronglyMeasurable.mono_set).2 h #align strongly_measurable_at_filter.eventually StronglyMeasurableAtFilter.eventually protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ) (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ := let ⟨s, hsl, hs⟩ := h ⟨s, h' hsl, hs⟩ #align strongly_measurable_at_filter.filter_mono StronglyMeasurableAtFilter.filter_mono protected theorem MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter (h : AEStronglyMeasurable f μ) : StronglyMeasurableAtFilter f l μ := ⟨univ, univ_mem, by rwa [Measure.restrict_univ]⟩ #align measure_theory.ae_strongly_measurable.strongly_measurable_at_filter MeasureTheory.AEStronglyMeasurable.stronglyMeasurableAtFilter theorem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem {s} (h : AEStronglyMeasurable f (μ.restrict s)) (hl : s ∈ l) : StronglyMeasurableAtFilter f l μ := ⟨s, hl, h⟩ #align ae_strongly_measurable.strongly_measurable_at_filter_of_mem AeStronglyMeasurable.stronglyMeasurableAtFilter_of_mem protected theorem MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter (h : StronglyMeasurable f) : StronglyMeasurableAtFilter f l μ := h.aestronglyMeasurable.stronglyMeasurableAtFilter #align measure_theory.strongly_measurable.strongly_measurable_at_filter MeasureTheory.StronglyMeasurable.stronglyMeasurableAtFilter end namespace MeasureTheory section NormedAddCommGroup theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α} {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) : HasFiniteIntegral f (μ.restrict s) := haveI : IsFiniteMeasure (μ.restrict s) := ⟨by rwa [Measure.restrict_apply_univ]⟩ hasFiniteIntegral_of_bounded hf #align measure_theory.has_finite_integral_restrict_of_bounded MeasureTheory.hasFiniteIntegral_restrict_of_bounded variable [NormedAddCommGroup E] {f g : α → E} {s t : Set α} {μ ν : Measure α} /-- A function is `IntegrableOn` a set `s` if it is almost everywhere strongly measurable on `s` and if the integral of its pointwise norm over `s` is less than infinity. -/ def IntegrableOn (f : α → E) (s : Set α) (μ : Measure α := by volume_tac) : Prop := Integrable f (μ.restrict s) #align measure_theory.integrable_on MeasureTheory.IntegrableOn -- Porting note: TODO Delete this when leanprover/lean4#2243 is fixed. theorem integrableOn_def (f : α → E) (s : Set α) (μ : Measure α) : IntegrableOn f s μ ↔ Integrable f (μ.restrict s) := Iff.rfl attribute [eqns integrableOn_def] IntegrableOn theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s) := h #align measure_theory.integrable_on.integrable MeasureTheory.IntegrableOn.integrable @[simp] theorem integrableOn_empty : IntegrableOn f ∅ μ := by simp [IntegrableOn, integrable_zero_measure] #align measure_theory.integrable_on_empty MeasureTheory.integrableOn_empty @[simp] theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by rw [IntegrableOn, Measure.restrict_univ] #align measure_theory.integrable_on_univ MeasureTheory.integrableOn_univ theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ := integrable_zero _ _ _ #align measure_theory.integrable_on_zero MeasureTheory.integrableOn_zero @[simp] theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞ := integrable_const_iff.trans <| by rw [Measure.restrict_apply_univ] #align measure_theory.integrable_on_const MeasureTheory.integrableOn_const theorem IntegrableOn.mono (h : IntegrableOn f t ν) (hs : s ⊆ t) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_mono hs hμ #align measure_theory.integrable_on.mono MeasureTheory.IntegrableOn.mono theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ := h.mono hst le_rfl #align measure_theory.integrable_on.mono_set MeasureTheory.IntegrableOn.mono_set theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ := h.mono (Subset.refl _) hμ #align measure_theory.integrable_on.mono_measure MeasureTheory.IntegrableOn.mono_measure theorem IntegrableOn.mono_set_ae (h : IntegrableOn f t μ) (hst : s ≤ᵐ[μ] t) : IntegrableOn f s μ := h.integrable.mono_measure <| Measure.restrict_mono_ae hst #align measure_theory.integrable_on.mono_set_ae MeasureTheory.IntegrableOn.mono_set_ae theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ := h.mono_set_ae hst.le #align measure_theory.integrable_on.congr_set_ae MeasureTheory.IntegrableOn.congr_set_ae theorem IntegrableOn.congr_fun_ae (h : IntegrableOn f s μ) (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn g s μ := Integrable.congr h hst #align measure_theory.integrable_on.congr_fun_ae MeasureTheory.IntegrableOn.congr_fun_ae theorem integrableOn_congr_fun_ae (hst : f =ᵐ[μ.restrict s] g) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun_ae hst, fun h => h.congr_fun_ae hst.symm⟩ #align measure_theory.integrable_on_congr_fun_ae MeasureTheory.integrableOn_congr_fun_ae theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn g s μ := h.congr_fun_ae ((ae_restrict_iff' hs).2 (eventually_of_forall hst)) #align measure_theory.integrable_on.congr_fun MeasureTheory.IntegrableOn.congr_fun theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) : IntegrableOn f s μ ↔ IntegrableOn g s μ := ⟨fun h => h.congr_fun hst hs, fun h => h.congr_fun hst.symm hs⟩ #align measure_theory.integrable_on_congr_fun MeasureTheory.integrableOn_congr_fun theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ := h.mono_measure <| Measure.restrict_le_self #align measure_theory.integrable.integrable_on MeasureTheory.Integrable.integrableOn theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) : IntegrableOn f s (μ.restrict t) := by rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _) #align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict theorem IntegrableOn.inter_of_restrict (h : IntegrableOn f s (μ.restrict t)) : IntegrableOn f (s ∩ t) μ := by have := h.mono_set (inter_subset_left s t) rwa [IntegrableOn, μ.restrict_restrict_of_subset (inter_subset_right s t)] at this lemma Integrable.piecewise [DecidablePred (· ∈ s)] (hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) : Integrable (s.piecewise f g) μ := by rw [IntegrableOn] at hf hg rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact Memℒp.piecewise hs hf hg theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ := h.mono_set <| subset_union_left _ _ #align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union theorem IntegrableOn.right_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f t μ := h.mono_set <| subset_union_right _ _ #align measure_theory.integrable_on.right_of_union MeasureTheory.IntegrableOn.right_of_union theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) : IntegrableOn f (s ∪ t) μ := (hs.add_measure ht).mono_measure <| Measure.restrict_union_le _ _ #align measure_theory.integrable_on.union MeasureTheory.IntegrableOn.union @[simp] theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ := ⟨fun h => ⟨h.left_of_union, h.right_of_union⟩, fun h => h.1.union h.2⟩ #align measure_theory.integrable_on_union MeasureTheory.integrableOn_union @[simp] theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] : IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞ := by have : f =ᵐ[μ.restrict {x}] fun _ => f x := by filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha simp only [mem_singleton_iff.1 ha] rw [IntegrableOn, integrable_congr this, integrable_const_iff] simp #align measure_theory.integrable_on_singleton_iff MeasureTheory.integrableOn_singleton_iff @[simp] theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := by refine hs.induction_on ?_ ?_ · simp · intro a s _ _ hf; simp [hf, or_imp, forall_and] #align measure_theory.integrable_on_finite_bUnion MeasureTheory.integrableOn_finite_biUnion @[simp] theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} : IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ := integrableOn_finite_biUnion s.finite_toSet #align measure_theory.integrable_on_finset_Union MeasureTheory.integrableOn_finset_iUnion @[simp] theorem integrableOn_finite_iUnion [Finite β] {t : β → Set α} : IntegrableOn f (⋃ i, t i) μ ↔ ∀ i, IntegrableOn f (t i) μ := by cases nonempty_fintype β simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t #align measure_theory.integrable_on_finite_Union MeasureTheory.integrableOn_finite_iUnion theorem IntegrableOn.add_measure (hμ : IntegrableOn f s μ) (hν : IntegrableOn f s ν) : IntegrableOn f s (μ + ν) := by delta IntegrableOn; rw [Measure.restrict_add]; exact hμ.integrable.add_measure hν #align measure_theory.integrable_on.add_measure MeasureTheory.IntegrableOn.add_measure @[simp] theorem integrableOn_add_measure : IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν := ⟨fun h => ⟨h.mono_measure (Measure.le_add_right le_rfl), h.mono_measure (Measure.le_add_left le_rfl)⟩, fun h => h.1.add_measure h.2⟩ #align measure_theory.integrable_on_add_measure MeasureTheory.integrableOn_add_measure theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp_rw [IntegrableOn, he.restrict_map, he.integrable_map_iff] #align measurable_embedding.integrable_on_map_iff MeasurableEmbedding.integrableOn_map_iff theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) : IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e) := by simp_rw [← he.integrableOn_map_iff, he.map_comap, IntegrableOn, Measure.restrict_restrict_of_subset hs] theorem integrableOn_map_equiv [MeasurableSpace β] (e : α ≃ᵐ β) {f : β → E} {μ : Measure α} {s : Set β} : IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ := by simp only [IntegrableOn, e.restrict_map, integrable_map_equiv e] #align measure_theory.integrable_on_map_equiv MeasureTheory.integrableOn_map_equiv theorem MeasurePreserving.integrableOn_comp_preimage [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set β} : IntegrableOn (f ∘ e) (e ⁻¹' s) μ ↔ IntegrableOn f s ν := (h₁.restrict_preimage_emb h₂ s).integrable_comp_emb h₂ #align measure_theory.measure_preserving.integrable_on_comp_preimage MeasureTheory.MeasurePreserving.integrableOn_comp_preimage theorem MeasurePreserving.integrableOn_image [MeasurableSpace β] {e : α → β} {ν} (h₁ : MeasurePreserving e μ ν) (h₂ : MeasurableEmbedding e) {f : β → E} {s : Set α} : IntegrableOn f (e '' s) ν ↔ IntegrableOn (f ∘ e) s μ := ((h₁.restrict_image_emb h₂ s).integrable_comp_emb h₂).symm #align measure_theory.measure_preserving.integrable_on_image MeasureTheory.MeasurePreserving.integrableOn_image theorem integrable_indicator_iff (hs : MeasurableSet s) : Integrable (indicator s f) μ ↔ IntegrableOn f s μ := by simp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator, lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs] #align measure_theory.integrable_indicator_iff MeasureTheory.integrable_indicator_iff theorem IntegrableOn.integrable_indicator (h : IntegrableOn f s μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := (integrable_indicator_iff hs).2 h #align measure_theory.integrable_on.integrable_indicator MeasureTheory.IntegrableOn.integrable_indicator theorem Integrable.indicator (h : Integrable f μ) (hs : MeasurableSet s) : Integrable (indicator s f) μ := h.integrableOn.integrable_indicator hs #align measure_theory.integrable.indicator MeasureTheory.Integrable.indicator theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) : IntegrableOn (indicator t f) s μ := Integrable.indicator h ht #align measure_theory.integrable_on.indicator MeasureTheory.IntegrableOn.indicator theorem integrable_indicatorConstLp {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) : Integrable (indicatorConstLp p hs hμs c) μ := by rw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff, lt_top_iff_ne_top] right simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs set_option linter.uppercaseLean3 false in #align measure_theory.integrable_indicator_const_Lp MeasureTheory.integrable_indicatorConstLp /-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction to `s`. -/ theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) : μ.restrict (toMeasurable μ s) = μ.restrict s := by rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩ let v n := toMeasurable (μ.restrict s) { x | u n ≤ ‖f x‖ } have A : ∀ n, μ (s ∩ v n) ≠ ∞ := by intro n rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] exact (hf.measure_norm_ge_lt_top (u_pos n)).ne apply Measure.restrict_toMeasurable_of_cover _ A intro x hx have : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff] obtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖; exact ((tendsto_order.1 u_lim).2 _ this).exists refine' mem_iUnion.2 ⟨n, _⟩ exact subset_toMeasurable _ _ hn.le #align measure_theory.integrable_on.restrict_to_measurable MeasureTheory.IntegrableOn.restrict_toMeasurable /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is null-measurable. -/ theorem IntegrableOn.of_ae_diff_eq_zero (hf : IntegrableOn f s μ) (ht : NullMeasurableSet t μ) (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) : IntegrableOn f t μ := by let u := { x ∈ s | f x ≠ 0 } have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1 let v := toMeasurable μ u have A : IntegrableOn f v μ := by rw [IntegrableOn, hu.restrict_toMeasurable] · exact hu · intro x hx; exact hx.2 have B : IntegrableOn f (t \ v) μ := by apply integrableOn_zero.congr filter_upwards [ae_restrict_of_ae h't, ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx by_cases h'x : x ∈ s · by_contra H exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩) · exact (hxt ⟨hx.1, h'x⟩).symm apply (A.union B).mono_set _ rw [union_diff_self] exact subset_union_right _ _ #align measure_theory.integrable_on.of_ae_diff_eq_zero MeasureTheory.IntegrableOn.of_ae_diff_eq_zero /-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t` if `t` is measurable. -/ theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t) (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ := hf.of_ae_diff_eq_zero ht.nullMeasurableSet (eventually_of_forall h't) #align measure_theory.integrable_on.of_forall_diff_eq_zero MeasureTheory.IntegrableOn.of_forall_diff_eq_zero /-- If a function is integrable on a set `s` and vanishes almost everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_ae_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable f μ := by rw [← integrableOn_univ] apply hf.of_ae_diff_eq_zero nullMeasurableSet_univ filter_upwards [h't] with x hx h'x using hx h'x.2 #align measure_theory.integrable_on.integrable_of_ae_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_ae_not_mem_eq_zero /-- If a function is integrable on a set `s` and vanishes everywhere on its complement, then it is integrable. -/ theorem IntegrableOn.integrable_of_forall_not_mem_eq_zero (hf : IntegrableOn f s μ) (h't : ∀ x, x ∉ s → f x = 0) : Integrable f μ := hf.integrable_of_ae_not_mem_eq_zero (eventually_of_forall fun x hx => h't x hx) #align measure_theory.integrable_on.integrable_of_forall_not_mem_eq_zero MeasureTheory.IntegrableOn.integrable_of_forall_not_mem_eq_zero theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) : IntegrableOn f s μ ↔ Integrable f μ := by refine' ⟨fun h => _, fun h => h.integrableOn⟩ refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_ contrapose! hx exact h1s (mem_support.2 hx) #align measure_theory.integrable_on_iff_integrable_of_support_subset MeasureTheory.integrableOn_iff_integrable_of_support_subset theorem integrableOn_Lp_of_measure_ne_top {E} [NormedAddCommGroup E] {p : ℝ≥0∞} {s : Set α} (f : Lp E p μ) (hp : 1 ≤ p) (hμs : μ s ≠ ∞) : IntegrableOn f s μ := by refine' memℒp_one_iff_integrable.mp _ have hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top] haveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩ exact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp set_option linter.uppercaseLean3 false in #align measure_theory.integrable_on_Lp_of_measure_ne_top MeasureTheory.integrableOn_Lp_of_measure_ne_top theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞ := calc (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ∫⁻ x, ↑‖f x‖₊ ∂μ := lintegral_ofReal_le_lintegral_nnnorm f _ < ∞ := hf.2 #align measure_theory.integrable.lintegral_lt_top MeasureTheory.Integrable.lintegral_lt_top theorem IntegrableOn.set_lintegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) : (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞ := Integrable.lintegral_lt_top hf #align measure_theory.integrable_on.set_lintegral_lt_top MeasureTheory.IntegrableOn.set_lintegral_lt_top /-- We say that a function `f` is *integrable at filter* `l` if it is integrable on some set `s ∈ l`. Equivalently, it is eventually integrable on `s` in `l.smallSets`. -/ def IntegrableAtFilter (f : α → E) (l : Filter α) (μ : Measure α := by volume_tac) := ∃ s ∈ l, IntegrableOn f s μ #align measure_theory.integrable_at_filter MeasureTheory.IntegrableAtFilter variable {l l' : Filter α} theorem _root_.MeasurableEmbedding.integrableAtFilter_map_iff [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} : IntegrableAtFilter f (l.map e) (μ.map e) ↔ IntegrableAtFilter (f ∘ e) l μ := by simp_rw [IntegrableAtFilter, he.integrableOn_map_iff] constructor <;> rintro ⟨s, hs⟩ · exact ⟨_, hs⟩ · exact ⟨e '' s, by rwa [mem_map, he.injective.preimage_image]⟩ theorem _root_.MeasurableEmbedding.integrableAtFilter_iff_comap [MeasurableSpace β] {e : α → β} (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} : IntegrableAtFilter f (l.map e) μ ↔ IntegrableAtFilter (f ∘ e) l (μ.comap e) := by simp_rw [← he.integrableAtFilter_map_iff, IntegrableAtFilter, he.map_comap] constructor <;> rintro ⟨s, hs, int⟩ · exact ⟨s, hs, int.mono_measure <| μ.restrict_le_self⟩ · exact ⟨_, inter_mem hs range_mem_map, int.inter_of_restrict⟩ theorem Integrable.integrableAtFilter (h : Integrable f μ) (l : Filter α) : IntegrableAtFilter f l μ := ⟨univ, Filter.univ_mem, integrableOn_univ.2 h⟩ #align measure_theory.integrable.integrable_at_filter MeasureTheory.Integrable.integrableAtFilter protected theorem IntegrableAtFilter.eventually (h : IntegrableAtFilter f l μ) : ∀ᶠ s in l.smallSets, IntegrableOn f s μ := Iff.mpr (eventually_smallSets' fun _s _t hst ht => ht.mono_set hst) h #align measure_theory.integrable_at_filter.eventually MeasureTheory.IntegrableAtFilter.eventually protected theorem IntegrableAtFilter.add {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f + g) l μ := by rcases hf with ⟨s, sl, hs⟩ rcases hg with ⟨t, tl, ht⟩ refine ⟨s ∩ t, inter_mem sl tl, ?_⟩ exact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _)) protected theorem IntegrableAtFilter.neg {f : α → E} (hf : IntegrableAtFilter f l μ) : IntegrableAtFilter (-f) l μ := by rcases hf with ⟨s, sl, hs⟩ exact ⟨s, sl, hs.neg⟩ protected theorem IntegrableAtFilter.sub {f g : α → E} (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) : IntegrableAtFilter (f - g) l μ := by rw [sub_eq_add_neg] exact hf.add hg.neg protected theorem IntegrableAtFilter.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E] [BoundedSMul 𝕜 E] {f : α → E} (hf : IntegrableAtFilter f l μ) (c : 𝕜) : IntegrableAtFilter (c • f) l μ := by rcases hf with ⟨s, sl, hs⟩ exact ⟨s, sl, hs.smul c⟩ theorem IntegrableAtFilter.filter_mono (hl : l ≤ l') (hl' : IntegrableAtFilter f l' μ) : IntegrableAtFilter f l μ := let ⟨s, hs, hsf⟩ := hl' ⟨s, hl hs, hsf⟩ #align measure_theory.integrable_at_filter.filter_mono MeasureTheory.IntegrableAtFilter.filter_mono theorem IntegrableAtFilter.inf_of_left (hl : IntegrableAtFilter f l μ) : IntegrableAtFilter f (l ⊓ l') μ := hl.filter_mono inf_le_left #align measure_theory.integrable_at_filter.inf_of_left MeasureTheory.IntegrableAtFilter.inf_of_left theorem IntegrableAtFilter.inf_of_right (hl : IntegrableAtFilter f l μ) : IntegrableAtFilter f (l' ⊓ l) μ := hl.filter_mono inf_le_right #align measure_theory.integrable_at_filter.inf_of_right MeasureTheory.IntegrableAtFilter.inf_of_right @[simp] theorem IntegrableAtFilter.inf_ae_iff {l : Filter α} : IntegrableAtFilter f (l ⊓ μ.ae) μ ↔ IntegrableAtFilter f l μ := by
refine' ⟨_, fun h => h.filter_mono inf_le_left⟩
@[simp] theorem IntegrableAtFilter.inf_ae_iff {l : Filter α} : IntegrableAtFilter f (l ⊓ μ.ae) μ ↔ IntegrableAtFilter f l μ := by
Mathlib.MeasureTheory.Integral.IntegrableOn.478_0.qIpN2P2TD1gUH4J
@[simp] theorem IntegrableAtFilter.inf_ae_iff {l : Filter α} : IntegrableAtFilter f (l ⊓ μ.ae) μ ↔ IntegrableAtFilter f l μ
Mathlib_MeasureTheory_Integral_IntegrableOn