Skip to content

Commit 18d2099

Browse files
authored
feat: add Integrable.piecewise (#8080)
1 parent 1c4e5ae commit 18d2099

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed

Mathlib/MeasureTheory/Function/LpSeminorm.lean

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ theorem snorm'_exponent_zero {f : α → F} : snorm' f 0 μ = 1 := by
176176
theorem snorm_exponent_zero {f : α → F} : snorm f 0 μ = 0 := by simp [snorm]
177177
#align measure_theory.snorm_exponent_zero MeasureTheory.snorm_exponent_zero
178178

179+
@[simp]
179180
theorem memℒp_zero_iff_aestronglyMeasurable {f : α → E} : Memℒp f 0 μ ↔ AEStronglyMeasurable f μ :=
180181
by simp [Memℒp, snorm_exponent_zero]
181182
#align measure_theory.mem_ℒp_zero_iff_ae_strongly_measurable MeasureTheory.memℒp_zero_iff_aestronglyMeasurable
@@ -908,6 +909,34 @@ theorem meas_snormEssSup_lt {f : α → F} : μ { y | snormEssSup f μ < ‖f y
908909
meas_essSup_lt
909910
#align measure_theory.meas_snorm_ess_sup_lt MeasureTheory.meas_snormEssSup_lt
910911

912+
lemma snormEssSup_piecewise_le {s : Set α} (f g : α → E) [DecidablePred (· ∈ s)]
913+
(hs : MeasurableSet s) :
914+
snormEssSup (Set.piecewise s f g) μ
915+
≤ max (snormEssSup f (μ.restrict s)) (snormEssSup g (μ.restrict sᶜ)) := by
916+
refine essSup_le_of_ae_le (max (snormEssSup f (μ.restrict s)) (snormEssSup g (μ.restrict sᶜ))) ?_
917+
have hf : ∀ᵐ y ∂(μ.restrict s), ↑‖f y‖₊ ≤ snormEssSup f (μ.restrict s) :=
918+
ae_le_snormEssSup (μ := μ.restrict s) (f := f)
919+
have hg : ∀ᵐ y ∂(μ.restrict sᶜ), ↑‖g y‖₊ ≤ snormEssSup g (μ.restrict sᶜ) :=
920+
ae_le_snormEssSup (μ := μ.restrict sᶜ) (f := g)
921+
refine ae_of_ae_restrict_of_ae_restrict_compl s ?_ ?_
922+
· rw [ae_restrict_iff' hs] at hf ⊢
923+
filter_upwards [hf] with x hx
924+
intro hx_mem
925+
simp only [hx_mem, Set.piecewise_eq_of_mem]
926+
exact (hx hx_mem).trans (le_max_left _ _)
927+
· rw [ae_restrict_iff' hs.compl] at hg ⊢
928+
filter_upwards [hg] with x hx
929+
intro hx_mem
930+
rw [Set.mem_compl_iff] at hx_mem
931+
simp only [hx_mem, not_false_eq_true, Set.piecewise_eq_of_not_mem]
932+
exact (hx hx_mem).trans (le_max_right _ _)
933+
934+
lemma snorm_top_piecewise_le {s : Set α} (f g : α → E) [DecidablePred (· ∈ s)]
935+
(hs : MeasurableSet s) :
936+
snorm (Set.piecewise s f g) ∞ μ
937+
≤ max (snorm f ∞ (μ.restrict s)) (snorm g ∞ (μ.restrict sᶜ)) :=
938+
snormEssSup_piecewise_le f g hs
939+
911940
section MapMeasure
912941

913942
variable {β : Type*} {mβ : MeasurableSpace β} {f : α → β} {g : β → E}

Mathlib/MeasureTheory/Function/LpSpace.lean

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,35 @@ theorem exists_snorm_indicator_le (hp : p ≠ ∞) (c : E) {ε : ℝ≥0∞} (h
732732
exact mul_le_mul_left' (ENNReal.rpow_le_rpow hs hp₀') _
733733
#align measure_theory.exists_snorm_indicator_le MeasureTheory.exists_snorm_indicator_le
734734

735+
lemma Memℒp.piecewise [DecidablePred (· ∈ s)]
736+
(hs : MeasurableSet s) (hf : Memℒp f p (μ.restrict s)) (hg : Memℒp g p (μ.restrict sᶜ)) :
737+
Memℒp (s.piecewise f g) p μ := by
738+
by_cases hp_zero : p = 0
739+
· simp only [hp_zero, memℒp_zero_iff_aestronglyMeasurable]
740+
exact AEStronglyMeasurable.piecewise hs hf.1 hg.1
741+
refine ⟨AEStronglyMeasurable.piecewise hs hf.1 hg.1, ?_⟩
742+
by_cases hp_top : p = ∞
743+
· have hf2 := hf.2
744+
have hg2 := hg.2
745+
simp only [hp_top] at hf2 hg2 ⊢
746+
exact (snorm_top_piecewise_le f g hs).trans_lt (max_lt_iff.mpr ⟨hf2, hg2⟩)
747+
rw [snorm_lt_top_iff_lintegral_rpow_nnnorm_lt_top hp_zero hp_top, ← lintegral_add_compl _ hs,
748+
ENNReal.add_lt_top]
749+
constructor
750+
· have h : ∀ᵐ (x : α) ∂μ, x ∈ s →
751+
(‖Set.piecewise s f g x‖₊ : ℝ≥0∞) ^ p.toReal = (‖f x‖₊ : ℝ≥0∞) ^ p.toReal := by
752+
refine ae_of_all _ (fun a ha ↦ ?_)
753+
simp [ha]
754+
rw [set_lintegral_congr_fun hs h]
755+
exact lintegral_rpow_nnnorm_lt_top_of_snorm_lt_top hp_zero hp_top hf.2
756+
· have h : ∀ᵐ (x : α) ∂μ, x ∈ sᶜ →
757+
(‖Set.piecewise s f g x‖₊ : ℝ≥0∞) ^ p.toReal = (‖g x‖₊ : ℝ≥0∞) ^ p.toReal := by
758+
refine ae_of_all _ (fun a ha ↦ ?_)
759+
have ha' : a ∉ s := ha
760+
simp [ha']
761+
rw [set_lintegral_congr_fun hs.compl h]
762+
exact lintegral_rpow_nnnorm_lt_top_of_snorm_lt_top hp_zero hp_top hg.2
763+
735764
end Indicator
736765

737766
section IndicatorConstLp

Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,27 @@ theorem _root_.exists_stronglyMeasurable_limit_of_tendsto_ae [PseudoMetrizableSp
17201720
rwa [h'x] at hx
17211721
#align exists_strongly_measurable_limit_of_tendsto_ae exists_stronglyMeasurable_limit_of_tendsto_ae
17221722

1723+
theorem piecewise {s : Set α} [DecidablePred (· ∈ s)]
1724+
(hs : MeasurableSet s) (hf : AEStronglyMeasurable f (μ.restrict s))
1725+
(hg : AEStronglyMeasurable g (μ.restrict sᶜ)) :
1726+
AEStronglyMeasurable (s.piecewise f g) μ := by
1727+
refine ⟨s.piecewise (hf.mk f) (hg.mk g),
1728+
StronglyMeasurable.piecewise hs hf.stronglyMeasurable_mk hg.stronglyMeasurable_mk, ?_⟩
1729+
refine ae_of_ae_restrict_of_ae_restrict_compl s ?_ ?_
1730+
· have h := hf.ae_eq_mk
1731+
rw [Filter.EventuallyEq, ae_restrict_iff' hs] at h
1732+
rw [ae_restrict_iff' hs]
1733+
filter_upwards [h] with x hx
1734+
intro hx_mem
1735+
simp only [hx_mem, Set.piecewise_eq_of_mem, hx hx_mem]
1736+
· have h := hg.ae_eq_mk
1737+
rw [Filter.EventuallyEq, ae_restrict_iff' hs.compl] at h
1738+
rw [ae_restrict_iff' hs.compl]
1739+
filter_upwards [h] with x hx
1740+
intro hx_mem
1741+
rw [Set.mem_compl_iff] at hx_mem
1742+
simp only [hx_mem, not_false_eq_true, Set.piecewise_eq_of_not_mem, hx hx_mem]
1743+
17231744
theorem sum_measure [PseudoMetrizableSpace β] {m : MeasurableSpace α} {μ : ι → Measure α}
17241745
(h : ∀ i, AEStronglyMeasurable f (μ i)) : AEStronglyMeasurable f (Measure.sum μ) := by
17251746
borelize β

Mathlib/MeasureTheory/Integral/IntegrableOn.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ theorem IntegrableOn.restrict (h : IntegrableOn f s μ) (hs : MeasurableSet s) :
169169
rw [IntegrableOn, Measure.restrict_restrict hs]; exact h.mono_set (inter_subset_left _ _)
170170
#align measure_theory.integrable_on.restrict MeasureTheory.IntegrableOn.restrict
171171

172+
lemma Integrable.piecewise [DecidablePred (· ∈ s)]
173+
(hs : MeasurableSet s) (hf : IntegrableOn f s μ) (hg : IntegrableOn g sᶜ μ) :
174+
Integrable (s.piecewise f g) μ := by
175+
rw [IntegrableOn] at hf hg
176+
rw [← memℒp_one_iff_integrable] at hf hg ⊢
177+
exact Memℒp.piecewise hs hf hg
178+
172179
theorem IntegrableOn.left_of_union (h : IntegrableOn f (s ∪ t) μ) : IntegrableOn f s μ :=
173180
h.mono_set <| subset_union_left _ _
174181
#align measure_theory.integrable_on.left_of_union MeasureTheory.IntegrableOn.left_of_union

0 commit comments

Comments
 (0)