Skip to content

Commit e647009

Browse files
committed
feat: more API for the variation of vector measures (#39616)
Prompted by the extension of the API around integrals wrt vector measures in #39113 Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
1 parent 515b108 commit e647009

5 files changed

Lines changed: 219 additions & 20 deletions

File tree

Mathlib/Data/ENNReal/Action.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ instance : PosSMulStrictMono ℝ≥0 ℝ≥0∞ where
104104
instance : SMulPosMono ℝ≥0 ℝ≥0where
105105
smul_le_smul_of_nonneg_right _r _ _a _b hab := _root_.mul_le_mul_left (coe_le_coe.2 hab) _
106106

107+
instance : CovariantClass ℝ≥0∞ ℝ≥0∞ (· • ·) (· ≤ ·) :=
108+
inferInstanceAs <| CovariantClass ℝ≥0∞ ℝ≥0∞ (· * ·) (· ≤ ·)
109+
110+
instance : CovariantClass ℝ≥0 ℝ≥0∞ (· • ·) (· ≤ ·) :=
111+
fun x x y hxy ↦ by simpa [ENNReal.smul_def] using mul_le_mul_right hxy _⟩
112+
107113
end Actions
108114

109115
end ENNReal

Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,12 @@ protected theorem le_add_left (h : μ ≤ ν) : μ ≤ ν' + ν := fun s => le_a
10811081

10821082
protected theorem le_add_right (h : μ ≤ ν) : μ ≤ ν + ν' := fun s => le_add_right (h s)
10831083

1084+
instance [SMul R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞] [CovariantClass R ℝ≥0∞ (· • ·) (· ≤ ·)] :
1085+
CovariantClass R (Measure α) (· • ·) (· ≤ ·) where
1086+
elim c μ ν hμν s := by
1087+
simp only [smul_apply]
1088+
gcongr
1089+
10841090
section sInf
10851091

10861092
variable {m : Set (Measure α)}
@@ -1496,3 +1502,5 @@ end
14961502
end MeasureTheory
14971503

14981504
end
1505+
1506+
set_option linter.style.longFile 1700

Mathlib/MeasureTheory/VectorMeasure/Basic.lean

Lines changed: 67 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@ def dirac (x : β) (v : M) : VectorMeasure β M where
425425
@[simp] lemma dirac_apply_of_notMem (hx : x ∉ s) : dirac x v s = 0 := by
426426
simp [dirac, hx]
427427

428+
@[simp] lemma dirac_zero : dirac x (0 : M) = 0 := by
429+
ext s hs
430+
simp [dirac]
431+
428432
end Dirac
429433

430434
end VectorMeasure
@@ -648,25 +652,30 @@ end ContinuousAdd
648652
section Module
649653

650654
variable {R : Type*} [Semiring R] [Module R M] [Module R N]
651-
variable [ContinuousAdd M] [ContinuousAdd N] [ContinuousConstSMul R M] [ContinuousConstSMul R N]
655+
656+
variable [ContinuousConstSMul R M] [ContinuousConstSMul R N]
657+
658+
@[simp]
659+
theorem mapRange_smul {v : VectorMeasure α M} {f : M →ₗ[R] N} (hf : Continuous f) {c : R} :
660+
(c • v).mapRange f.toAddMonoidHom hf = c • (v.mapRange f.toAddMonoidHom hf) := by
661+
ext; simp
662+
663+
variable [ContinuousAdd M] [ContinuousAdd N]
652664

653665
/-- Given a continuous linear map `f : M → N`, `mapRangeₗ` is the linear map mapping the
654666
vector measure `v` on `M` to the vector measure `f ∘ v` on `N`. -/
655667
def mapRangeₗ (f : M →ₗ[R] N) (hf : Continuous f) : VectorMeasure α M →ₗ[R] VectorMeasure α N where
656668
toFun v := v.mapRange f.toAddMonoidHom hf
657669
map_add' _ _ := mapRange_add hf
658-
map_smul' := by
659-
intros
660-
ext
661-
simp
670+
map_smul' _ _ := mapRange_smul hf
662671

663672
end Module
664673

665674
end
666675

667676
open Classical in
668677
/-- The restriction of a vector measure on some set. -/
669-
def restrict (v : VectorMeasure α M) (i : Set α) : VectorMeasure α M :=
678+
@[no_expose] def restrict (v : VectorMeasure α M) (i : Set α) : VectorMeasure α M :=
670679
if hi : MeasurableSet i then
671680
{ measureOf' := fun s => if MeasurableSet s then v (s ∩ i) else 0
672681
empty' := by simp
@@ -708,6 +717,39 @@ theorem restrict_zero {i : Set α} : (0 : VectorMeasure α M).restrict i = 0 :=
708717
rw [restrict_apply 0 hi hj, zero_apply, zero_apply]
709718
· exact dif_neg hi
710719

720+
theorem restrict_dirac {s : Set α} {x : α} {m : M} (hs : MeasurableSet s) [Decidable (x ∈ s)] :
721+
(dirac x m).restrict s = if x ∈ s then dirac x m else 0 := by
722+
classical
723+
ext t ht
724+
simp only [hs, ht, restrict_apply]
725+
split_ifs with has <;> simp [dirac, ht, ht.inter hs, has]
726+
727+
@[simp]
728+
theorem restrict_dirac_of_mem {s : Set α} {x : α} {m : M} (hs : MeasurableSet s) (hx : x ∈ s) :
729+
(dirac x m).restrict s = dirac x m := by
730+
classical
731+
simp [restrict_dirac, hs, hx]
732+
733+
@[simp]
734+
theorem restrict_dirac_of_notMem {s : Set α} {x : α} {m : M} (hx : x ∉ s) :
735+
(dirac x m).restrict s = 0 := by
736+
classical
737+
by_cases hs : MeasurableSet s
738+
· simp [restrict_dirac, hs, hx]
739+
· simp [restrict, hs]
740+
741+
@[simp]
742+
theorem restrict_singleton {a : α} : v.restrict {a} = dirac a (v {a}) := by
743+
by_cases h : MeasurableSet {a}
744+
· ext s hs
745+
by_cases ha : a ∈ s <;> simp [*, restrict_apply]
746+
· simp [restrict, h]
747+
748+
theorem restrict_restrict {s t : Set α} (hs : MeasurableSet s) (ht : MeasurableSet t) :
749+
(v.restrict t).restrict s = v.restrict (s ∩ t) := by
750+
ext u hu
751+
simp [restrict_apply, hs, hu, ht, Set.inter_assoc]
752+
711753
section ContinuousAdd
712754

713755
variable [ContinuousAdd M]
@@ -745,7 +787,7 @@ end ContinuousAdd
745787
section Partition
746788

747789
variable {M : Type*} [TopologicalSpace M] [AddCommMonoid M] [T2Space M] [ContinuousAdd M]
748-
variable (v : VectorMeasure α M) {i : Set α}
790+
variable {v : VectorMeasure α M} {i s t : Set α}
749791

750792
@[simp]
751793
theorem restrict_add_restrict_compl (hi : MeasurableSet i) :
@@ -756,6 +798,23 @@ theorem restrict_add_restrict_compl (hi : MeasurableSet i) :
756798
· simp
757799
· exact disjoint_compl_right.inter_right' A |>.inter_left' A
758800

801+
theorem restrict_inter_add_diff (hs : MeasurableSet s) (ht : MeasurableSet t) :
802+
v.restrict (s ∩ t) + v.restrict (s \ t) = v.restrict s := by
803+
ext u hu
804+
simp only [add_apply, restrict_apply, hs, hu, hs.inter ht, hs.diff ht]
805+
rw [← of_union (by grind) (hu.inter (hs.inter ht)) (hu.inter (hs.diff ht))]
806+
congr
807+
grind
808+
809+
theorem restrict_union_add_inter (hs : MeasurableSet s) (ht : MeasurableSet t) :
810+
v.restrict (s ∪ t) + v.restrict (s ∩ t) = v.restrict s + v.restrict t := by
811+
rw [← v.restrict_inter_add_diff (hs.union ht) ht, union_inter_cancel_right, union_diff_right,
812+
← v.restrict_inter_add_diff hs ht, add_comm, ← add_assoc, add_right_comm]
813+
814+
theorem restrict_union (h : Disjoint s t) (hs : MeasurableSet s) (ht : MeasurableSet t) :
815+
v.restrict (s ∪ t) = v.restrict s + v.restrict t := by
816+
simp [← v.restrict_union_add_inter hs ht, disjoint_iff_inter_eq_empty.mp h]
817+
759818
end Partition
760819

761820
section Sub
@@ -1063,7 +1122,7 @@ theorem trans {u : VectorMeasure α L} {v : VectorMeasure α M} {w : VectorMeasu
10631122
fun _ hs => huv <| hvw hs
10641123

10651124
theorem zero (v : VectorMeasure α N) : (0 : VectorMeasure α M) ≪ᵥ v :=
1066-
fun s _ => VectorMeasure.zero_apply s
1125+
fun s _ => zero_apply s
10671126

10681127
theorem neg_left {M : Type*} [AddCommGroup M] [TopologicalSpace M] [IsTopologicalAddGroup M]
10691128
{v : VectorMeasure α M} {w : VectorMeasure α N} (h : v ≪ᵥ w) : -v ≪ᵥ w := by

Mathlib/MeasureTheory/VectorMeasure/Decomposition/JordanSub.lean

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,19 @@ theorem sub_toSignedMeasure_eq_toSignedMeasure_sub :
7676
sub_apply_eq_zero_of_isHahnDecomposition hs
7777
have h₂' := toSignedMeasure_congr <| restrict_eq_zero.mpr <|
7878
sub_apply_eq_zero_of_isHahnDecomposition hsc
79-
have partition₁ := VectorMeasure.restrict_add_restrict_compl (μ - ν).toSignedMeasure
79+
have partition₁ := VectorMeasure.restrict_add_restrict_compl (v := (μ - ν).toSignedMeasure)
8080
hs.measurableSet
81-
have partition₂ := VectorMeasure.restrict_add_restrict_compl (ν - μ).toSignedMeasure
81+
have partition₂ := VectorMeasure.restrict_add_restrict_compl (v := (ν - μ).toSignedMeasure)
8282
hs.measurableSet
8383
rw [toSignedMeasure_restrict_eq_restrict_toSignedMeasure _ _ hs.measurableSet,
8484
toSignedMeasure_restrict_eq_restrict_toSignedMeasure _ _ hs.measurableSet.compl]
8585
at partition₁ partition₂
8686
rw [h₁', h₂] at partition₁
8787
rw [h₁, h₂'] at partition₂
8888
simp only [toSignedMeasure_zero, zero_add] at partition₁ partition₂
89-
rw [← VectorMeasure.restrict_add_restrict_compl μ.toSignedMeasure hs.measurableSet,
90-
← VectorMeasure.restrict_add_restrict_compl ν.toSignedMeasure hs.measurableSet,
89+
rw [← VectorMeasure.restrict_add_restrict_compl (v := μ.toSignedMeasure) hs.measurableSet,
90+
← VectorMeasure.restrict_add_restrict_compl (v := ν.toSignedMeasure) hs.measurableSet,
9191
← partition₁, ← partition₂]
92-
repeat rw [sub_eq_add_neg]
9392
abel
9493

9594
/-- The Jordan decomposition associated to the pair of mutually singular measures `μ - ν`

Mathlib/MeasureTheory/VectorMeasure/Variation/Basic.lean

Lines changed: 134 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Authors: Oliver Butterley, Yoh Tanimoto
55
-/
66
module
77

8+
public import Mathlib.Analysis.Normed.Module.Basic
9+
public import Mathlib.MeasureTheory.Measure.Dirac
810
public import Mathlib.MeasureTheory.VectorMeasure.Variation.Defs
911

1012
/-!
@@ -30,7 +32,7 @@ such vector-valued measures.
3032

3133
public section
3234

33-
open Finset
35+
open Finset Set
3436
open scoped ENNReal
3537

3638
namespace MeasureTheory.VectorMeasure
@@ -39,9 +41,9 @@ variable {X V : Type*} {mX : MeasurableSpace X}
3941

4042
section Basic
4143

42-
variable [TopologicalSpace V] [ENormedAddCommMonoid V] [T2Space V] {μ ν : VectorMeasure X V}
44+
variable [TopologicalSpace V] [ENormedAddCommMonoid V] [T2Space V]
45+
{μ ν : VectorMeasure X V} {s : Set X}
4346

44-
@[simp]
4547
lemma variation_apply (μ : VectorMeasure X V) (s : Set X) :
4648
μ.variation s = preVariation (‖μ ·‖ₑ) (isSigmaSubadditiveSetFun_enorm μ) (by simp) s := rfl
4749

@@ -96,14 +98,15 @@ lemma absolutelyContinuous (μ : VectorMeasure X V) : μ ≪ᵥ μ.ennrealVariat
9698
grw [enorm_measure_le_variation, ← ennrealVariation_apply _ hsm, hs]
9799
· exact μ.not_measurable' hsm
98100

99-
lemma variation_le_of_forall_enorm_le {m : Measure X} (h : ∀ E, MeasurableSet E → ‖μ E‖ₑ ≤ m E) :
100-
μ.variation ≤ m := by
101-
refine Measure.le_intro fun s hs _ => ?_
101+
lemma variation_apply_le_of_forall_enorm_le {m : Measure X} (hs : MeasurableSet s)
102+
(h : ∀ E, MeasurableSet E → E ⊆ s → ‖μ E‖ₑ ≤ m E) :
103+
μ.variation s ≤ m s := by
102104
simp only [variation_apply, preVariation, ennrealToMeasure_apply hs, ennrealPreVariation_apply,
103105
preVariationFun, hs, dite_true, iSup_le_iff]
104106
intro i
105107
calc
106-
∑ x ∈ i.parts, ‖μ x‖ₑ ≤ ∑ x ∈ i.parts, m x := Finset.sum_le_sum (fun s hs => h s s.property)
108+
∑ x ∈ i.parts, ‖μ x‖ₑ ≤ ∑ x ∈ i.parts, m x := Finset.sum_le_sum
109+
(fun s hs => h s s.property (i.le hs))
107110
_ = m (i.parts.sup Subtype.val) := by
108111
rw [sup_set_eq_biUnion]
109112
refine (MeasureTheory.measure_biUnion_finset ?_ fun b _ => b.property).symm
@@ -113,6 +116,10 @@ lemma variation_le_of_forall_enorm_le {m : Measure X} (h : ∀ E, MeasurableSet
113116
rw [sup_set_eq_biUnion]
114117
exact measure_mono <| Set.iUnion₂_subset fun _ hp => Subtype.coe_le_coe.mpr (i.le hp)
115118

119+
lemma variation_le_of_forall_enorm_le {m : Measure X} (h : ∀ E, MeasurableSet E → ‖μ E‖ₑ ≤ m E) :
120+
μ.variation ≤ m :=
121+
Measure.le_intro fun _ hs _ => variation_apply_le_of_forall_enorm_le hs (fun E hE _ ↦ h E hE)
122+
116123
lemma variation_add_le [ContinuousAdd V] : variation (μ + ν) ≤ variation μ + variation ν := by
117124
refine variation_le_of_forall_enorm_le fun E _ => ?_
118125
calc
@@ -129,6 +136,90 @@ lemma variation_finsetSum_le [ContinuousAdd V] {ι} (s : Finset ι) (μ : ι →
129136
simpa [Finset.sum_insert his] using
130137
variation_add_le.trans (add_le_add_right ih ((μ i).variation))
131138

139+
lemma variation_apply_eq_zero (hs : MeasurableSet s) :
140+
μ.variation s = 0 ↔ ∀ t, t ⊆ s → MeasurableSet t → μ t = 0 := by
141+
refine ⟨fun h t hts ht ↦ ?_, fun h ↦ ?_⟩
142+
· rw [← enorm_eq_zero, ← le_zero_iff, ← h]
143+
apply (enorm_measure_le_variation _ _).trans (measure_mono hts)
144+
· suffices μ.variation s ≤ (0 : Measure X) s by simpa
145+
apply variation_apply_le_of_forall_enorm_le hs (fun t ht hts ↦ ?_)
146+
simp [h t hts ht]
147+
148+
@[simp] lemma variation_eq_zero :
149+
μ.variation = 0 ↔ μ = 0 where
150+
mp h := by
151+
ext s hs
152+
apply enorm_eq_zero.1
153+
apply le_antisymm ?_ (by simp)
154+
grw [enorm_measure_le_variation]
155+
simp [h]
156+
mpr h := by simp [h]
157+
158+
lemma variation_restrict (hs : MeasurableSet s) :
159+
(μ.restrict s).variation = μ.variation.restrict s := by
160+
apply le_antisymm
161+
· apply variation_le_of_forall_enorm_le (fun t ht ↦ ?_)
162+
simp only [ht, Measure.restrict_apply, VectorMeasure.restrict_apply, hs]
163+
apply enorm_measure_le_variation
164+
· apply Measure.le_iff.2 (fun t ht ↦ ?_)
165+
simp only [ht, Measure.restrict_apply]
166+
calc μ.variation (t ∩ s)
167+
_ ≤ (μ.restrict s).variation (t ∩ s) := by
168+
apply variation_apply_le_of_forall_enorm_le (ht.inter hs) (fun u u_meas hu ↦ ?_)
169+
have : μ u = μ.restrict s u :=
170+
(VectorMeasure.restrict_eq_self _ hs u_meas (hu.trans inter_subset_right)).symm
171+
rw [this]
172+
apply enorm_measure_le_variation
173+
_ ≤ (μ.restrict s).variation t := by
174+
gcongr
175+
exact Set.inter_subset_left
176+
177+
lemma variation_restrict_le : (μ.restrict s).variation ≤ μ.variation.restrict s := by
178+
by_cases hs : MeasurableSet s
179+
· simp [variation_restrict hs]
180+
· simp [restrict_not_measurable _ hs, Measure.zero_le]
181+
182+
instance [IsFiniteMeasure μ.variation] : IsFiniteMeasure (μ.restrict s).variation :=
183+
isFiniteMeasure_of_le _ variation_restrict_le
184+
185+
variable {Y : Type*} [MeasurableSpace Y] {φ : X → Y}
186+
187+
lemma variation_map_le : (μ.map φ).variation ≤ μ.variation.map φ := by
188+
by_cases hφ : Measurable φ; swap
189+
· simp [VectorMeasure.map, hφ, Measure.zero_le]
190+
apply variation_le_of_forall_enorm_le (fun s hs ↦ ?_)
191+
simp [VectorMeasure.map_apply _ hφ hs, Measure.map_apply hφ hs, enorm_measure_le_variation]
192+
193+
instance [IsFiniteMeasure μ.variation] : IsFiniteMeasure (μ.map φ).variation :=
194+
isFiniteMeasure_of_le _ variation_map_le
195+
196+
theorem _root_.MeasurableEmbedding.variation_map (hφ : MeasurableEmbedding φ) :
197+
(μ.map φ).variation = μ.variation.map φ := by
198+
apply le_antisymm variation_map_le ?_
199+
apply Measure.le_iff.2 (fun s hs ↦ ?_)
200+
simp only [hφ.measurable, hs, Measure.map_apply]
201+
have : (μ.map φ).variation s = (μ.map φ).variation (s ∩ range φ) := by
202+
nth_rw 1 [← inter_union_diff s (range φ)]
203+
have : (μ.map φ).variation (s \ range φ) = 0 := by
204+
apply (variation_apply_eq_zero (hs.diff hφ.measurableSet_range)).2 (fun t ht t_meas ↦ ?_)
205+
have : φ ⁻¹' t = ∅ := by grind
206+
simp [map_apply, t_meas, hφ.measurable, this]
207+
rw [measure_union (by grind) (hs.diff hφ.measurableSet_range), this, add_zero]
208+
rw [this, ← hφ.comap_preimage]
209+
apply variation_le_of_forall_enorm_le (fun t ht ↦ ?_)
210+
simp only [hφ.comap_apply]
211+
apply le_trans ?_ (enorm_measure_le_variation _ _)
212+
rw [map_apply _ hφ.measurable (hφ.measurableSet_image.2 ht), preimage_image_eq _ hφ.injective]
213+
214+
@[simp] lemma variation_dirac {x : X} {v : V} :
215+
(VectorMeasure.dirac x v).variation = ‖v‖ₑ • Measure.dirac x := by
216+
apply le_antisymm
217+
· apply variation_le_of_forall_enorm_le (fun s hs ↦ ?_)
218+
by_cases hx : x ∈ s <;> simp [hs, hx]
219+
· apply Measure.le_iff.2 (fun s hs ↦ ?_)
220+
apply le_trans ?_ (enorm_measure_le_variation _ _)
221+
by_cases hx : x ∈ s <;> simp [hs, hx]
222+
132223
end Basic
133224

134225
section NormedAddCommGroup
@@ -147,6 +238,42 @@ lemma variation_neg : (-μ).variation = μ.variation := by simp [variation]
147238
lemma variation_sub_le : (μ - ν).variation ≤ μ.variation + ν.variation := by
148239
grw [sub_eq_add_neg, variation_add_le, variation_neg]
149240

241+
private lemma variation_smul_le {𝕜 : Type*} [NormedField 𝕜] [NormedSpace 𝕜 V] {c : 𝕜} :
242+
(c • μ).variation ≤ ‖c‖₊ • μ.variation := by
243+
apply variation_le_of_forall_enorm_le (fun s hs ↦ ?_)
244+
simp only [coe_smul, Pi.smul_apply, enorm_smul, Measure.smul_apply, Measure.nnreal_smul_coe_apply]
245+
grw [enorm_measure_le_variation, enorm_eq_nnnorm]
246+
247+
lemma variation_smul {𝕜 : Type*} [NormedField 𝕜] [NormedSpace 𝕜 V] {c : 𝕜} :
248+
(c • μ).variation = ‖c‖₊ • μ.variation := by
249+
apply le_antisymm variation_smul_le ?_
250+
rcases eq_or_ne c 0 with rfl | hc
251+
· simp
252+
calc ‖c‖₊ • μ.variation
253+
_ = ‖c‖₊ • (c⁻¹ • (c • μ)).variation := by simp [smul_smul, inv_mul_cancel₀ hc]
254+
_ ≤ ‖c‖₊ • ‖c⁻¹‖₊ • (c • μ).variation := by
255+
gcongr
256+
exact variation_smul_le
257+
_ = (c • μ).variation := by
258+
simp [smul_smul, mul_inv_cancel₀ (nnnorm_ne_zero_iff.mpr hc)]
259+
260+
instance {𝕜 : Type*} [NormedField 𝕜] [NormedSpace 𝕜 V] {c : 𝕜} [IsFiniteMeasure μ.variation] :
261+
IsFiniteMeasure (c • μ).variation := by
262+
simp only [variation_smul]
263+
infer_instance
264+
265+
instance [Finite X] : IsFiniteMeasure μ.variation where
266+
measure_univ_lt_top := by
267+
classical
268+
let : Fintype X := Fintype.ofFinite X
269+
simp only [variation_apply, preVariation_apply, MeasurableSet.univ, ennrealToMeasure_apply,
270+
ennrealPreVariation_apply, preVariationFun, ↓reduceDIte, ← sup_univ_eq_ciSup]
271+
exact (Finset.sup_lt_iff (by simp)).2 (fun b hb ↦ by simp [ENNReal.sum_lt_top, enorm_lt_top])
272+
273+
instance {x : X} {v : V} : IsFiniteMeasure (VectorMeasure.dirac x v).variation := by
274+
simp only [variation_dirac, enorm_eq_nnnorm, Measure.coe_nnreal_smul]
275+
infer_instance
276+
150277
end NormedAddCommGroup
151278

152279
end MeasureTheory.VectorMeasure

0 commit comments

Comments
 (0)