Skip to content

Commit 7c77f1a

Browse files
committed
feat: the product of vector measures (leanprover-community#41546)
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
1 parent ce27956 commit 7c77f1a

3 files changed

Lines changed: 238 additions & 16 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5663,6 +5663,7 @@ public import Mathlib.MeasureTheory.VectorMeasure.Decomposition.JordanSub
56635663
public import Mathlib.MeasureTheory.VectorMeasure.Decomposition.Lebesgue
56645664
public import Mathlib.MeasureTheory.VectorMeasure.Decomposition.RadonNikodym
56655665
public import Mathlib.MeasureTheory.VectorMeasure.Integral
5666+
public import Mathlib.MeasureTheory.VectorMeasure.Prod
56665667
public import Mathlib.MeasureTheory.VectorMeasure.SetIntegral
56675668
public import Mathlib.MeasureTheory.VectorMeasure.Variation.Basic
56685669
public import Mathlib.MeasureTheory.VectorMeasure.Variation.Defs

Mathlib/MeasureTheory/VectorMeasure/Basic.lean

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,30 @@ theorem hasSum_of_disjoint_iUnion (hm : ∀ i, MeasurableSet (f i)) (hd : Pairwi
133133
· simp [Function.apply_extend MeasurableSet, Function.comp_def, hm]
134134
· exact hd.disjoint_extend_bot (he.factorsThrough _)
135135

136+
theorem of_if {ι : Type*} {x : ι} {B : Set ι} {A : Set α} [Decidable (x ∈ B)] :
137+
v (if x ∈ B then A else ∅) = indicator B (fun _ => v A) x := by
138+
split_ifs with h <;> simp [h]
139+
136140
variable [T2Space M]
137141

138142
theorem of_disjoint_iUnion (hm : ∀ i, MeasurableSet (f i)) (hd : Pairwise (Disjoint on f)) :
139143
v (⋃ i, f i) = ∑' i, v (f i) :=
140144
(hasSum_of_disjoint_iUnion hm hd).tsum_eq.symm
141145

146+
theorem of_biUnion {ι : Type*} {s : Set ι} {f : ι → Set α} (hs : s.Countable)
147+
(hd : s.Pairwise (Disjoint on f)) (h : ∀ b ∈ s, MeasurableSet (f b)) :
148+
v (⋃ b ∈ s, f b) = ∑' p : s, v (f p) := by
149+
haveI := hs.toEncodable
150+
rw [biUnion_eq_iUnion]
151+
apply of_disjoint_iUnion
152+
· exact fun x ↦ h x x.2
153+
· exact hd.on_injective Subtype.coe_injective fun x => x.2
154+
155+
theorem of_biUnion_finset {ι : Type*} {s : Finset ι} {f : ι → Set α} (hd : PairwiseDisjoint (↑s) f)
156+
(hm : ∀ b ∈ s, MeasurableSet (f b)) : v (⋃ b ∈ s, f b) = ∑ p ∈ s, v (f p) := by
157+
rw [← Finset.sum_attach, Finset.attach_eq_univ, ← tsum_fintype (L := .unconditional s)]
158+
exact of_biUnion s.countable_toSet hd hm
159+
142160
theorem of_union {A B : Set α} (h : Disjoint A B) (hA : MeasurableSet A) (hB : MeasurableSet B) :
143161
v (A ∪ B) = v A + v B := by
144162
rw [Set.union_eq_iUnion, of_disjoint_iUnion, tsum_fintype, Fintype.sum_bool, cond, cond]
@@ -206,22 +224,6 @@ theorem of_nonpos_disjoint_union_eq_zero {s : SignedMeasure α} {A B : Set α} (
206224
rw [of_union h hA₁ hB₁] at hAB
207225
linarith
208226

209-
lemma of_biUnion_finset {ι : Type*} {s : Finset ι} {f : ι → Set α} (hd : PairwiseDisjoint (↑s) f)
210-
(hm : ∀ b ∈ s, MeasurableSet (f b)) : v (⋃ b ∈ s, f b) = ∑ p ∈ s, v (f p) := by
211-
classical
212-
induction s using Finset.induction with
213-
| empty => simp
214-
| insert a s has ih =>
215-
simp only [Finset.mem_insert, iUnion_iUnion_eq_or_left, has, not_false_eq_true,
216-
Finset.sum_insert]
217-
rw [of_union, ih]
218-
· exact hd.subset (by simp)
219-
· grind
220-
· simp only [disjoint_iUnion_right]
221-
exact fun i hi ↦ hd (by simp) (by simp [hi]) (by grind)
222-
· apply hm _ (by simp)
223-
· apply Finset.measurableSet_biUnion _ (by grind)
224-
225227
theorem tendsto_vectorMeasure_iUnion_atTop_nat
226228
{s : ℕ → Set α} (hm : Monotone s) (hs : ∀ i, MeasurableSet (s i)) :
227229
Tendsto (fun n ↦ v (s n)) atTop (𝓝 (v (⋃ n, s n))) := by
@@ -250,6 +252,22 @@ theorem tendsto_vectorMeasure_iInter_atTop_nat
250252
exact tendsto_vectorMeasure_iUnion_atTop_nat (fun i j hij ↦ by simpa using hm hij)
251253
(fun i ↦ (hs i).compl)
252254

255+
/-- If two vector measures give the same mass to the whole space and coincide on a
256+
generating π-system, then they coincide. -/
257+
theorem ext_of_generateFrom {M : Type*} [AddCommGroup M] [TopologicalSpace M] [T2Space M]
258+
{X : Type*} {mX : MeasurableSpace X} {μ ν : VectorMeasure X M}
259+
(C : Set (Set X)) (hμν : ∀ s ∈ C, μ s = ν s)
260+
(hA : mX = MeasurableSpace.generateFrom C) (hC : IsPiSystem C)
261+
(h_univ : μ Set.univ = ν Set.univ) : μ = ν := by
262+
ext s hs
263+
induction s, hs using MeasurableSpace.induction_on_inter hA hC with
264+
| empty => simp
265+
| basic t ht => exact hμν t ht
266+
| compl t htm iht =>
267+
simp [of_compl, iht, htm, h_univ]
268+
| iUnion f hfd hfm ihf =>
269+
simp [of_disjoint_iUnion, hfm, hfd, ihf]
270+
253271
end
254272

255273
section SMul
@@ -714,6 +732,12 @@ theorem restrict_apply {i : Set α} (hi : MeasurableSet i) {j : Set α} (hj : Me
714732
rw [restrict, dif_pos hi]
715733
exact if_pos hj
716734

735+
@[simp] theorem restrict_apply_univ {i : Set α} :
736+
v.restrict i univ = v i := by
737+
by_cases hi : MeasurableSet i
738+
· simp [restrict_apply, hi]
739+
· simp [restrict_not_measurable, hi]
740+
717741
theorem restrict_eq_self {i : Set α} (hi : MeasurableSet i) {j : Set α} (hj : MeasurableSet j)
718742
(hij : j ⊆ i) : v.restrict i j = v j := by
719743
rw [restrict_apply v hi hj, Set.inter_eq_left.2 hij]
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
/-
2+
Copyright (c) 2026 Sébastien Gouëzel. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Sébastien Gouëzel
5+
-/
6+
module
7+
8+
public import Mathlib.MeasureTheory.Integral.Prod
9+
public import Mathlib.MeasureTheory.VectorMeasure.SetIntegral
10+
public import Mathlib.MeasureTheory.VectorMeasure.Variation.Semivariation
11+
12+
/-!
13+
# Product of vector measures
14+
15+
Given two vector measures, we define their product `μ.prod ν B` as the vector measure assigning
16+
to a measurable product `s × t` the mass `B (μ s) (ν t)`, if such a vector measure exists.
17+
We show that it exists when either `μ` or `ν` has finite variation.
18+
19+
The API is modelled on the one for the product of positive measures.
20+
-/
21+
22+
public section
23+
24+
open Filter Function MeasureTheory RCLike Set TopologicalSpace Topology
25+
open scoped ENNReal NNReal Finset
26+
27+
variable {ι X Y E F G H I J : Type*} {mX : MeasurableSpace X} {mY : MeasurableSpace Y}
28+
[NormedAddCommGroup E] [NormedSpace ℝ E]
29+
[NormedAddCommGroup F] [NormedSpace ℝ F]
30+
[NormedAddCommGroup G] [NormedSpace ℝ G]
31+
[NormedAddCommGroup H] [NormedSpace ℝ H]
32+
[NormedAddCommGroup I] [NormedSpace ℝ I]
33+
[NormedAddCommGroup J] [NormedSpace ℝ J]
34+
{μ : VectorMeasure X E} {ν : VectorMeasure Y F} {B : E →L[ℝ] F →L[ℝ] G}
35+
36+
namespace MeasureTheory.VectorMeasure
37+
38+
/-- Two vector measures `μ` and `ν` have a product with respect to `B` if there exists a
39+
measure giving mass `B (μ s) (ν t)` to any measurable product set `s × t`.
40+
This is satisfied whenever `μ` or `ν` has finite variation. -/
41+
class HasProd (μ : VectorMeasure X E) (ν : VectorMeasure Y F) (B : E →L[ℝ] F →L[ℝ] G) : Prop where
42+
exists_prod : ∃ ρ : VectorMeasure (X × Y) G, ∀ (s : Set X) (t : Set Y),
43+
MeasurableSet s → MeasurableSet t → ρ (s ×ˢ t) = B (μ s) (ν t)
44+
45+
/-- The product of two vector measures `μ` and `ν` with respect to a continuous bilinear map `B`,
46+
giving mass `B (μ s) (ν t)` to any measurable product set `s × t`.
47+
If such a measure does not exist, we use the junk value `0`. -/
48+
noncomputable def prod (μ : VectorMeasure X E) (ν : VectorMeasure Y F) (B : E →L[ℝ] F →L[ℝ] G) :
49+
VectorMeasure (X × Y) G :=
50+
open scoped Classical in if h : HasProd μ ν B then h.exists_prod.choose else 0
51+
52+
lemma prod_eq_zero_of_not_hasProd (h : ¬HasProd μ ν B) :
53+
μ.prod ν B = 0 := by
54+
grind [HasProd, prod]
55+
56+
@[simp] lemma prod_apply [h : HasProd μ ν B] {s : Set X} {t : Set Y} :
57+
μ.prod ν B (s ×ˢ t) = B (μ s) (ν t) := by
58+
rcases eq_or_ne s ∅ with rfl | hs
59+
· simp
60+
rcases eq_or_ne t ∅ with rfl | ht
61+
· simp
62+
by_cases h's : MeasurableSet s; swap
63+
· simp only [h's, not_false_eq_true, not_measurable, _root_.map_zero, _root_.zero_apply]
64+
rw [not_measurable]
65+
simp [measurableSet_prod, hs, ht, h's]
66+
by_cases h't : MeasurableSet t; swap
67+
· simp only [h't, not_false_eq_true, not_measurable, _root_.map_zero]
68+
rw [not_measurable]
69+
simp [measurableSet_prod, hs, ht, h't]
70+
simpa [prod, h] using h.exists_prod.choose_spec s t h's h't
71+
72+
lemma HasProd.flip [HasProd μ ν B] : HasProd ν μ B.flip where
73+
exists_prod := by
74+
refine ⟨(μ.prod ν B).map Prod.swap, fun s t hs ht ↦ ?_⟩
75+
rw [map_apply _ (by fun_prop) (hs.prod ht)]
76+
simp
77+
78+
lemma hasProd_flip_iff : HasProd ν μ B.flip ↔ HasProd μ ν B :=
79+
fun h ↦ by simpa using HasProd.flip (μ := ν) (ν := μ) (B := B.flip), fun h ↦ HasProd.flip⟩
80+
81+
omit [NormedSpace ℝ F] in
82+
/-- If `ν` is a vector measure, and `s ⊆ X × Y` is measurable, then `x ↦ ν { y | (x, y) ∈ s }` is
83+
a strongly measurable function. -/
84+
theorem stronglyMeasurable_vectorMeasure_prodMk_left {s : Set (X × Y)}
85+
(hs : MeasurableSet s) : StronglyMeasurable fun x ↦ ν (Prod.mk x ⁻¹' s) := by
86+
induction s, hs
87+
using MeasurableSpace.induction_on_inter generateFrom_prod.symm isPiSystem_prod with
88+
| empty => simp [stronglyMeasurable_const]
89+
| basic s hs =>
90+
obtain ⟨s, hs, t, -, rfl⟩ := hs
91+
classical
92+
simpa [mk_preimage_prod_right_eq_if, of_if] using stronglyMeasurable_const.indicator hs
93+
| compl s hs ihs =>
94+
simp_rw [preimage_compl, VectorMeasure.of_compl (measurable_prodMk_left hs)]
95+
exact stronglyMeasurable_const.sub ihs
96+
| iUnion f hfd hfm ihf =>
97+
have (a : X) : HasSum (fun i ↦ ν (Prod.mk a ⁻¹' f i)) (ν (Prod.mk a ⁻¹' ⋃ i, f i)) := by
98+
rw [preimage_iUnion]
99+
apply hasSum_of_disjoint_iUnion
100+
exacts [fun i ↦ measurable_prodMk_left (hfm i), hfd.mono fun _ _ ↦ .preimage _]
101+
exact StronglyMeasurable.hasSum ihf this
102+
103+
omit [NormedSpace ℝ E] in
104+
theorem integrable_vectorMeasure_prodMk_left [IsFiniteMeasure μ.variation]
105+
{s : Set (X × Y)} (hs : MeasurableSet s) :
106+
μ.Integrable fun x ↦ ν (Prod.mk x ⁻¹' s) := by
107+
refine Integrable.of_bound (μ := μ.variation) ?_ ν.bound ?_
108+
· exact (stronglyMeasurable_vectorMeasure_prodMk_left hs).aestronglyMeasurable
109+
· exact Eventually.of_forall (fun x ↦ norm_apply_le_bound)
110+
111+
/-- The product of two vector measures when the first one has finite variation, obtained by
112+
integrating the measure of the fibers, as in the definition of the product of positive measures.
113+
*Do not use*: This is only used to instantiate the typeclass `HasProd`. Instead, use `μ.prod ν B`,
114+
which uses the typeclass instance. -/
115+
private noncomputable def prodOfIsFiniteMeasureLeft
116+
(μ : VectorMeasure X E) (ν : VectorMeasure Y F) (B : E →L[ℝ] F →L[ℝ] G)
117+
[IsFiniteMeasure μ.variation] :
118+
VectorMeasure (X × Y) G where
119+
measureOf' s := open scoped Classical in
120+
if MeasurableSet s then ∫ᵛ x, ν (Prod.mk x ⁻¹' s) ∂[B.flip; μ] else 0
121+
empty' := by simp
122+
not_measurable' := by simp +contextual
123+
m_iUnion' f f_meas f_disj := by
124+
simp only [f_meas, ↓reduceIte, implies_true, MeasurableSet.iUnion, preimage_iUnion,
125+
HasSum, SummationFilter.unconditional_filter]
126+
have A (a : Finset ℕ) : ∑ y ∈ a, ∫ᵛ x, ν (Prod.mk x ⁻¹' f y) ∂[B.flip; μ]
127+
= ∫ᵛ x, ∑ y ∈ a, ν (Prod.mk x ⁻¹' f y) ∂[B.flip; μ] := by
128+
rw [integral_finsetSum _ (fun i hi ↦ integrable_vectorMeasure_prodMk_left (f_meas i))]
129+
simp_rw [A]
130+
apply tendsto_integral_filter_of_dominated_convergence (bound := fun x ↦ ν.bound)
131+
· apply Eventually.of_forall (fun a ↦ ?_)
132+
apply StronglyMeasurable.aestronglyMeasurable
133+
apply Finset.stronglyMeasurable_fun_sum _ (fun i hi ↦ ?_)
134+
apply stronglyMeasurable_vectorMeasure_prodMk_left (f_meas i)
135+
· filter_upwards with a
136+
filter_upwards with x
137+
rw [← VectorMeasure.of_biUnion_finset]
138+
· apply norm_apply_le_bound
139+
· exact fun i hi j hj hij ↦ (f_disj hij).preimage _
140+
· exact fun i hi ↦ measurable_prodMk_left (f_meas i)
141+
· apply integrable_const
142+
· filter_upwards with x
143+
apply hasSum_of_disjoint_iUnion
144+
· exact fun i ↦ measurable_prodMk_left (f_meas i)
145+
· exact fun i j hij ↦ (f_disj hij).preimage _
146+
147+
instance [CompleteSpace G] [IsFiniteMeasure μ.variation] : HasProd μ ν B where
148+
exists_prod := by
149+
classical
150+
refine ⟨prodOfIsFiniteMeasureLeft μ ν B, fun s t hs ht ↦ ?_⟩
151+
simp [prodOfIsFiniteMeasureLeft, hs.prod ht, ↓reduceIte, mk_preimage_prod_right_eq_if,
152+
of_if, integral_indicator hs, ContinuousLinearMap.flip_apply, hs, restrict_apply]
153+
154+
instance [CompleteSpace G] [h : IsFiniteMeasure ν.variation] : HasProd μ ν B :=
155+
hasProd_flip_iff.1 inferInstance
156+
157+
lemma prod_eq_of_forall_apply_prod {ρ : VectorMeasure (X × Y) G} (hρ : ∀ (s : Set X) (t : Set Y),
158+
MeasurableSet s → MeasurableSet t → ρ (s ×ˢ t) = B (μ s) (ν t)) :
159+
μ.prod ν B = ρ := by
160+
have : HasProd μ ν B := ⟨ρ, hρ⟩
161+
apply ext_of_generateFrom _ _ generateFrom_prod.symm isPiSystem_prod
162+
· rw [← univ_prod_univ, hρ _ _ MeasurableSet.univ MeasurableSet.univ, prod_apply]
163+
· rintro - ⟨s, hs, t, ht, rfl⟩
164+
rw [prod_apply, hρ _ _ hs ht]
165+
166+
lemma prod_apply_eq_integral [CompleteSpace G] [IsFiniteMeasure μ.variation]
167+
{s : Set (X × Y)} (hs : MeasurableSet s) :
168+
μ.prod ν B s = ∫ᵛ x, ν (Prod.mk x ⁻¹' s) ∂[B.flip; μ] := by
169+
have : μ.prod ν B = prodOfIsFiniteMeasureLeft μ ν B := by
170+
classical
171+
apply prod_eq_of_forall_apply_prod (fun s t hs ht ↦ ?_)
172+
simp [prodOfIsFiniteMeasureLeft, hs.prod ht, ↓reduceIte, mk_preimage_prod_right_eq_if,
173+
of_if, integral_indicator hs, ContinuousLinearMap.flip_apply, restrict_apply, hs]
174+
rw [this]
175+
simp [prodOfIsFiniteMeasureLeft, hs]
176+
177+
lemma prod_flip_apply_eq_integral [CompleteSpace G] [IsFiniteMeasure μ.variation]
178+
{B : F →L[ℝ] E →L[ℝ] G} {s : Set (X × Y)} (hs : MeasurableSet s) :
179+
μ.prod ν B.flip s = ∫ᵛ x, ν (Prod.mk x ⁻¹' s) ∂[B; μ] := by
180+
simp [prod_apply_eq_integral hs]
181+
182+
lemma variation_prod_le [CompleteSpace G] [IsFiniteMeasure μ.variation] [SFinite ν.variation] :
183+
(μ.prod ν B).variation ≤ ‖B‖ₑ • μ.variation.prod ν.variation := by
184+
apply variation_le_of_forall_enorm_le (fun s hs ↦ ?_)
185+
rw [prod_apply_eq_integral hs]
186+
simp only [Measure.smul_apply, smul_eq_mul, Measure.prod_apply hs]
187+
grw [enorm_integral_le_lintegral_enorm, ContinuousLinearMap.opENorm_flip,
188+
enorm_measure_le_variation]
189+
190+
instance [CompleteSpace G] [IsFiniteMeasure μ.variation] [IsFiniteMeasure ν.variation] :
191+
IsFiniteMeasure (μ.prod ν B).variation := by
192+
have : IsFiniteMeasure (‖B‖ₑ • μ.variation.prod ν.variation) := by
193+
simp only [enorm_eq_nnnorm, Measure.coe_nnreal_smul]
194+
infer_instance
195+
exact isFiniteMeasure_of_le _ variation_prod_le
196+
197+
end MeasureTheory.VectorMeasure

0 commit comments

Comments
 (0)