Skip to content

Commit b8fc37d

Browse files
committed
feat(MeasureTheory): add singularPart and rnDeriv lemmas (#11883)
Also golf and move `rnDeriv_restrict`.
1 parent 6212c09 commit b8fc37d

File tree

5 files changed

+47
-12
lines changed

5 files changed

+47
-12
lines changed

Mathlib/MeasureTheory/Decomposition/Lebesgue.lean

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ theorem singularPart_zero (ν : Measure α) : (0 : Measure α).singularPart ν =
238238
singularPart_eq_zero_of_ac (AbsolutelyContinuous.zero _)
239239
#align measure_theory.measure.singular_part_zero MeasureTheory.Measure.singularPart_zero
240240

241+
@[simp]
242+
lemma singularPart_zero_right (μ : Measure α) : μ.singularPart 0 = μ := by
243+
conv_rhs => rw [haveLebesgueDecomposition_add μ 0]
244+
simp
245+
241246
lemma singularPart_eq_zero (μ ν : Measure α) [μ.HaveLebesgueDecomposition ν] :
242247
μ.singularPart ν = 0 ↔ μ ≪ ν := by
243248
have h_dec := haveLebesgueDecomposition_add μ ν
@@ -306,6 +311,12 @@ lemma singularPart_eq_self [μ.HaveLebesgueDecomposition ν] : μ.singularPart
306311
· conv_rhs => rw [h_dec]
307312
rw [(withDensity_rnDeriv_eq_zero _ _).mpr h, add_zero]
308313

314+
@[simp]
315+
lemma singularPart_singularPart (μ ν : Measure α) :
316+
(μ.singularPart ν).singularPart ν = μ.singularPart ν := by
317+
rw [Measure.singularPart_eq_self]
318+
exact Measure.mutuallySingular_singularPart _ _
319+
309320
instance singularPart.instIsFiniteMeasure [IsFiniteMeasure μ] :
310321
IsFiniteMeasure (μ.singularPart ν) :=
311322
isFiniteMeasure_of_le μ <| singularPart_le μ ν
@@ -462,6 +473,16 @@ theorem singularPart_add (μ₁ μ₂ ν : Measure α) [HaveLebesgueDecompositio
462473
← haveLebesgueDecomposition_add μ₂ ν]
463474
#align measure_theory.measure.singular_part_add MeasureTheory.Measure.singularPart_add
464475

476+
lemma singularPart_restrict (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
477+
{s : Set α} (hs : MeasurableSet s) :
478+
(μ.restrict s).singularPart ν = (μ.singularPart ν).restrict s := by
479+
refine (Measure.eq_singularPart (f := s.indicator (μ.rnDeriv ν)) ?_ ?_ ?_).symm
480+
· exact (μ.measurable_rnDeriv ν).indicator hs
481+
· exact (Measure.mutuallySingular_singularPart μ ν).restrict s
482+
· ext t
483+
rw [withDensity_indicator hs, ← restrict_withDensity hs, ← Measure.restrict_add,
484+
← μ.haveLebesgueDecomposition_add ν]
485+
465486
/-- Given measures `μ` and `ν`, if `s` is a measure mutually singular to `ν` and `f` is a
466487
measurable function such that `μ = s + fν`, then `f = μ.rnDeriv ν`.
467488
@@ -545,6 +566,14 @@ theorem rnDeriv_withDensity (ν : Measure α) [SigmaFinite ν] {f : α → ℝ
545566
rnDeriv_withDensity₀ ν hf.aemeasurable
546567
#align measure_theory.measure.rn_deriv_with_density MeasureTheory.Measure.rnDeriv_withDensity
547568

569+
lemma rnDeriv_restrict (μ ν : Measure α) [HaveLebesgueDecomposition μ ν] [SigmaFinite ν]
570+
{s : Set α} (hs : MeasurableSet s) :
571+
(μ.restrict s).rnDeriv ν =ᵐ[ν] s.indicator (μ.rnDeriv ν) := by
572+
refine (eq_rnDeriv (s := (μ.restrict s).singularPart ν)
573+
((measurable_rnDeriv _ _).indicator hs) (mutuallySingular_singularPart _ _) ?_).symm
574+
rw [singularPart_restrict _ _ hs, withDensity_indicator hs, ← restrict_withDensity hs,
575+
← Measure.restrict_add, ← μ.haveLebesgueDecomposition_add ν]
576+
548577
/-- The Radon-Nikodym derivative of the restriction of a measure to a measurable set is the
549578
indicator function of this set. -/
550579
theorem rnDeriv_restrict_self (ν : Measure α) [SigmaFinite ν] {s : Set α} (hs : MeasurableSet s) :

Mathlib/MeasureTheory/Decomposition/RadonNikodym.lean

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,6 @@ lemma rnDeriv_withDensity_right (μ ν : Measure α) [SigmaFinite μ] [SigmaFini
189189

190190
end rnDeriv_withDensity_leftRight
191191

192-
theorem rnDeriv_restrict (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν]
193-
{s : Set α} (hs : MeasurableSet s) :
194-
(μ.restrict s).rnDeriv ν =ᵐ[ν] s.indicator (μ.rnDeriv ν) := by
195-
rw [← withDensity_indicator_one hs]
196-
refine (rnDeriv_withDensity_left ?_ ?_ ?_).trans (ae_of_all _ (fun x ↦ ?_))
197-
· exact measurable_one.aemeasurable.indicator hs
198-
· exact measurable_one.aemeasurable.indicator hs
199-
· filter_upwards with x
200-
simp only [Set.indicator_apply, Pi.one_apply, ne_eq]
201-
split_ifs <;> simp [ENNReal.zero_ne_top]
202-
· simp [Set.indicator_apply]
203-
204192
lemma rnDeriv_eq_zero_of_mutuallySingular [SigmaFinite μ] {ν' : Measure α}
205193
[SigmaFinite ν'] (h : μ ⟂ₘ ν) (hνν' : ν ≪ ν') :
206194
μ.rnDeriv ν' =ᵐ[ν] 0 := by

Mathlib/MeasureTheory/Measure/MutuallySingular.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ theorem smul_nnreal (r : ℝ≥0) (h : ν ⟂ₘ μ) : r • ν ⟂ₘ μ :=
151151
h.smul r
152152
#align measure_theory.measure.mutually_singular.smul_nnreal MeasureTheory.Measure.MutuallySingular.smul_nnreal
153153

154+
lemma restrict (h : μ ⟂ₘ ν) (s : Set α) : μ.restrict s ⟂ₘ ν := by
155+
refine ⟨h.nullSet, h.measurableSet_nullSet, ?_, h.measure_compl_nullSet⟩
156+
rw [Measure.restrict_apply h.measurableSet_nullSet]
157+
exact measure_mono_null (Set.inter_subset_left _ _) h.measure_nullSet
158+
154159
end MutuallySingular
155160

156161
lemma eq_zero_of_absolutelyContinuous_of_mutuallySingular {μ ν : Measure α}

Mathlib/MeasureTheory/Measure/Trim.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,10 @@ theorem sigmaFinite_trim_bot_iff : SigmaFinite (μ.trim bot_le) ↔ IsFiniteMeas
129129
· rwa [trim_measurableSet_eq bot_le MeasurableSet.univ]
130130
#align measure_theory.sigma_finite_trim_bot_iff MeasureTheory.sigmaFinite_trim_bot_iff
131131

132+
lemma Measure.AbsolutelyContinuous.trim {ν : Measure α} (hμν : μ ≪ ν) (hm : m ≤ m0) :
133+
μ.trim hm ≪ ν.trim hm := by
134+
refine Measure.AbsolutelyContinuous.mk (fun s hs hsν ↦ ?_)
135+
rw [trim_measurableSet_eq hm hs] at hsν ⊢
136+
exact hμν hsν
137+
132138
end MeasureTheory

Mathlib/MeasureTheory/Measure/WithDensity.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@ theorem restrict_withDensity' [SFinite μ] (s : Set α) (f : α → ℝ≥0∞)
220220
rw [restrict_apply ht, withDensity_apply _ ht, withDensity_apply' _ (t ∩ s),
221221
restrict_restrict ht]
222222

223+
lemma trim_withDensity {m m0 : MeasurableSpace α} {μ : Measure α}
224+
(hm : m ≤ m0) {f : α → ℝ≥0∞} (hf : Measurable[m] f) :
225+
(μ.withDensity f).trim hm = (μ.trim hm).withDensity f := by
226+
refine @Measure.ext _ m _ _ (fun s hs ↦ ?_)
227+
rw [withDensity_apply _ hs, restrict_trim _ _ hs, lintegral_trim _ hf, trim_measurableSet_eq _ hs,
228+
withDensity_apply _ (hm s hs)]
229+
223230
lemma Measure.MutuallySingular.withDensity {ν : Measure α} {f : α → ℝ≥0∞} (h : μ ⟂ₘ ν) :
224231
μ.withDensity f ⟂ₘ ν :=
225232
MutuallySingular.mono_ac h (withDensity_absolutelyContinuous _ _) AbsolutelyContinuous.rfl

0 commit comments

Comments
 (0)