Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 4afd667

Browse files
committed
feat(measure_theory/integral): add integral_sum_measure (#12090)
Also add supporting lemmas about finite and infinite sums of measures.
1 parent 20cf3ca commit 4afd667

File tree

6 files changed

+118
-37
lines changed

6 files changed

+118
-37
lines changed

src/measure_theory/function/l1_space.lean

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,15 @@ h.mono_measure $ measure.le_add_left $ le_rfl
456456
integrable f (μ + ν) ↔ integrable f μ ∧ integrable f ν :=
457457
⟨λ h, ⟨h.left_of_add_measure, h.right_of_add_measure⟩, λ h, h.1.add_measure h.2
458458

459+
@[simp] lemma integrable_zero_measure {m : measurable_space α} {f : α → β} :
460+
integrable f (0 : measure α) :=
461+
⟨ae_measurable_zero_measure, has_finite_integral_zero_measure f⟩
462+
463+
theorem integrable_finset_sum_measure {ι} {m : measurable_space α} {f : α → β}
464+
{μ : ι → measure α} {s : finset ι} :
465+
integrable f (∑ i in s, μ i) ↔ ∀ i ∈ s, integrable f (μ i) :=
466+
by induction s using finset.induction_on; simp [*]
467+
459468
lemma integrable.smul_measure {f : α → β} (h : integrable f μ) {c : ℝ≥0∞} (hc : c ≠ ∞) :
460469
integrable f (c • μ) :=
461470
⟨h.ae_measurable.smul_measure c, h.has_finite_integral.smul_measure hc⟩
@@ -979,14 +988,6 @@ end measure_theory
979988

980989
open measure_theory
981990

982-
lemma integrable_zero_measure {m : measurable_space α} [measurable_space β] {f : α → β} :
983-
integrable f (0 : measure α) :=
984-
begin
985-
apply (integrable_zero _ _ _).congr,
986-
change (0 : measure α) {x | 0 ≠ f x} = 0,
987-
refl,
988-
end
989-
990991
variables {E : Type*} [normed_group E] [measurable_space E] [borel_space E]
991992
{𝕜 : Type*} [nondiscrete_normed_field 𝕜] [normed_space 𝕜 E]
992993
{H : Type*} [normed_group H] [normed_space 𝕜 H]

src/measure_theory/group/fundamental_domain.lean

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,23 @@ lemma null_measurable_set_smul {ν : measure α} (h : is_fundamental_domain G s
9595
variables [smul_invariant_measure G α μ]
9696

9797
@[to_additive] lemma pairwise_ae_disjoint (h : is_fundamental_domain G s μ) :
98-
pairwise (λ g₁ g₂ : G, μ (g₁ • sg₂ • s) = 0) :=
98+
pairwise (λ g₁ g₂ : G, ae_disjoint μ (g₁ • s) (g₂ • s)) :=
9999
λ g₁ g₂ hne,
100100
calc μ (g₁ • s ∩ g₂ • s) = μ (g₂ • ((g₂⁻¹ * g₁) • s ∩ s)) :
101-
by rw [smul_set_inter, ← mul_smul, mul_inv_cancel_left]
101+
by rw [smul_set_inter, smul_smul, mul_inv_cancel_left]
102102
... = μ ((g₂⁻¹ * g₁) • s ∩ s) : measure_smul_set _ _ _
103103
... = 0 : h.ae_disjoint _ $ mt inv_mul_eq_one.1 hne.symm
104104

105+
@[to_additive] lemma pairwise_ae_disjoint_of_ac {ν : measure α} (h : is_fundamental_domain G s μ)
106+
(hle : ν ≪ μ) :
107+
pairwise (λ g₁ g₂ : G, ae_disjoint ν (g₁ • s) (g₂ • s)) :=
108+
h.pairwise_ae_disjoint.mono $ λ g₁ g₂ h, hle h
109+
105110
variables [encodable G] {ν : measure α}
106111

107112
@[to_additive] lemma sum_restrict_of_ac (h : is_fundamental_domain G s μ) (hν : ν ≪ μ) :
108113
sum (λ g : G, ν.restrict (g • s)) = ν :=
109-
by rw [← restrict_Union_ae (h.pairwise_ae_disjoint.mono $ λ i j h, hν h) h.null_measurable_set_smul,
114+
by rw [← restrict_Union_ae (h.pairwise_ae_disjoint_of_ac hν) h.null_measurable_set_smul,
110115
restrict_congr_set (hν h.Union_smul_ae_eq), restrict_univ]
111116

112117
@[to_additive] lemma lintegral_eq_tsum_of_ac (h : is_fundamental_domain G s μ) (hν : ν ≪ μ)
@@ -227,8 +232,8 @@ begin
227232
calc ∫ x in s, f x ∂μ = ∫ x in ⋃ g : G, g • t, f x ∂(μ.restrict s) :
228233
by rw [restrict_congr_set (hac ht.Union_smul_ae_eq), restrict_univ]
229234
... = ∑' g : G, ∫ x in g • t, f x ∂(μ.restrict s) :
230-
integral_Union_of_null_inter (λ g, (ht.measurable_set_smul g).null_measurable_set)
231-
(ht.pairwise_ae_disjoint.mono $ λ i j h, hac h) hfs.integrable.integrable_on
235+
integral_Union_ae ht.null_measurable_set_smul (ht.pairwise_ae_disjoint_of_ac hac)
236+
hfs.integrable.integrable_on
232237
... = ∑' g : G, ∫ x in s ∩ g • t, f x ∂μ :
233238
by simp only [restrict_restrict (ht.measurable_set_smul _), inter_comm]
234239
... = ∑' g : G, ∫ x in s ∩ g⁻¹ • t, f x ∂μ : ((equiv.inv G).tsum_eq _).symm
@@ -240,8 +245,8 @@ begin
240245
... = ∑' g : G, ∫ x in g • s, f x ∂(μ.restrict t) :
241246
by simp only [hf, restrict_restrict (hs.measurable_set_smul _)]
242247
... = ∫ x in ⋃ g : G, g • s, f x ∂(μ.restrict t) :
243-
(integral_Union_of_null_inter (λ g, (hs.measurable_set_smul g).null_measurable_set)
244-
(hs.pairwise_ae_disjoint.mono $ λ i j h, hac h) hft.integrable.integrable_on).symm
248+
(integral_Union_ae hs.null_measurable_set_smul (hs.pairwise_ae_disjoint_of_ac hac)
249+
hft.integrable.integrable_on).symm
245250
... = ∫ x in t, f x ∂μ :
246251
by rw [restrict_congr_set (hac hs.Union_smul_ae_eq), restrict_univ] },
247252
{ rw [integral_undef hfs, integral_undef],

src/measure_theory/integral/bochner.lean

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,53 @@ end
12081208
∫ x, f x ∂(0 : measure α) = 0 :=
12091209
set_to_fun_measure_zero (dominated_fin_meas_additive_weighted_smul _) rfl
12101210

1211+
theorem integral_finset_sum_measure {ι} {m : measurable_space α} {f : α → E}
1212+
{μ : ι → measure α} {s : finset ι} (hf : ∀ i ∈ s, integrable f (μ i)) :
1213+
∫ a, f a ∂(∑ i in s, μ i) = ∑ i in s, ∫ a, f a ∂μ i :=
1214+
begin
1215+
classical,
1216+
refine finset.induction_on' s _ _, -- `induction s using finset.induction_on'` fails
1217+
{ simp },
1218+
{ intros i t hi ht hit iht,
1219+
simp only [finset.sum_insert hit, ← iht],
1220+
exact integral_add_measure (hf _ hi) (integrable_finset_sum_measure.2 $ λ j hj, hf j (ht hj)) }
1221+
end
1222+
1223+
lemma nndist_integral_add_measure_le_lintegral (h₁ : integrable f μ) (h₂ : integrable f ν) :
1224+
(nndist (∫ x, f x ∂μ) (∫ x, f x ∂(μ + ν)) : ℝ≥0∞) ≤ ∫⁻ x, ∥f x∥₊ ∂ν :=
1225+
begin
1226+
rw [integral_add_measure h₁ h₂, nndist_comm, nndist_eq_nnnorm, add_sub_cancel'],
1227+
exact ennnorm_integral_le_lintegral_ennnorm _
1228+
end
1229+
1230+
theorem has_sum_integral_measure {ι} {m : measurable_space α} {f : α → E} {μ : ι → measure α}
1231+
(hf : integrable f (measure.sum μ)) :
1232+
has_sum (λ i, ∫ a, f a ∂μ i) (∫ a, f a ∂measure.sum μ) :=
1233+
begin
1234+
have hfi : ∀ i, integrable f (μ i) := λ i, hf.mono_measure (measure.le_sum _ _),
1235+
simp only [has_sum, ← integral_finset_sum_measure (λ i _, hfi i)],
1236+
refine metric.nhds_basis_ball.tendsto_right_iff.mpr (λ ε ε0, _),
1237+
lift ε to ℝ≥0 using ε0.le,
1238+
have hf_lt : ∫⁻ x, ∥f x∥₊ ∂(measure.sum μ) < ∞ := hf.2,
1239+
have hmem : ∀ᶠ y in 𝓝 ∫⁻ x, ∥f x∥₊ ∂(measure.sum μ), ∫⁻ x, ∥f x∥₊ ∂(measure.sum μ) < y + ε,
1240+
{ refine tendsto_id.add tendsto_const_nhds (lt_mem_nhds $ ennreal.lt_add_right _ _),
1241+
exacts [hf_lt.ne, ennreal.coe_ne_zero.2 (nnreal.coe_ne_zero.1 ε0.ne')] },
1242+
refine ((has_sum_lintegral_measure (λ x, ∥f x∥₊) μ).eventually hmem).mono (λ s hs, _),
1243+
obtain ⟨ν, hν⟩ : ∃ ν, (∑ i in s, μ i) + ν = measure.sum μ,
1244+
{ refine ⟨measure.sum (λ i : ↥(sᶜ : set ι), μ i), _⟩,
1245+
simpa only [← measure.sum_coe_finset] using measure.sum_add_sum_compl (s : set ι) μ },
1246+
rw [metric.mem_ball, ← coe_nndist, nnreal.coe_lt_coe, ← ennreal.coe_lt_coe, ← hν],
1247+
rw [← hν, integrable_add_measure] at hf,
1248+
refine (nndist_integral_add_measure_le_lintegral hf.1 hf.2).trans_lt _,
1249+
rw [← hν, lintegral_add_measure, lintegral_finset_sum_measure] at hs,
1250+
exact lt_of_add_lt_add_left hs
1251+
end
1252+
1253+
theorem integral_sum_measure {ι} {m : measurable_space α} {f : α → E} {μ : ι → measure α}
1254+
(hf : integrable f (measure.sum μ)) :
1255+
∫ a, f a ∂measure.sum μ = ∑' i, ∫ a, f a ∂μ i :=
1256+
(has_sum_integral_measure hf).tsum_eq.symm
1257+
12111258
@[simp] lemma integral_smul_measure (f : α → E) (c : ℝ≥0∞) :
12121259
∫ x, f x ∂(c • μ) = c.to_real • ∫ x, f x ∂μ :=
12131260
begin

src/measure_theory/integral/lebesgue.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,10 +1376,19 @@ begin
13761376
(finset.sum_le_sum $ λ j hj, simple_func.lintegral_mono le_sup_right le_rfl)⟩
13771377
end
13781378

1379+
theorem has_sum_lintegral_measure {ι} {m : measurable_space α} (f : α → ℝ≥0∞) (μ : ι → measure α) :
1380+
has_sum (λ i, ∫⁻ a, f a ∂(μ i)) (∫⁻ a, f a ∂(measure.sum μ)) :=
1381+
(lintegral_sum_measure f μ).symm ▸ ennreal.summable.has_sum
1382+
13791383
@[simp] lemma lintegral_add_measure {m : measurable_space α} (f : α → ℝ≥0∞) (μ ν : measure α) :
13801384
∫⁻ a, f a ∂ (μ + ν) = ∫⁻ a, f a ∂μ + ∫⁻ a, f a ∂ν :=
13811385
by simpa [tsum_fintype] using lintegral_sum_measure f (λ b, cond b μ ν)
13821386

1387+
@[simp] lemma lintegral_finset_sum_measure {ι} {m : measurable_space α} (s : finset ι)
1388+
(f : α → ℝ≥0∞) (μ : ι → measure α) :
1389+
∫⁻ a, f a ∂(∑ i in s, μ i) = ∑ i in s, ∫⁻ a, f a ∂μ i :=
1390+
by { rw [← measure.sum_coe_finset, lintegral_sum_measure, ← finset.tsum_subtype'], refl }
1391+
13831392
@[simp] lemma lintegral_zero_measure {m : measurable_space α} (f : α → ℝ≥0∞) :
13841393
∫⁻ a, f a ∂(0 : measure α) = 0 :=
13851394
bot_unique $ by simp [lintegral]

src/measure_theory/integral/set_integral.lean

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -165,40 +165,32 @@ begin
165165
(hi.2.trans_lt $ ennreal.add_lt_top.2 ⟨hfi', ennreal.coe_lt_top⟩).ne]
166166
end
167167

168-
lemma has_sum_integral_Union {ι : Type*} [encodable ι] {s : ι → set α} {f : α → E}
169-
(hm : ∀ i, measurable_set (s i)) (hd : pairwise (disjoint on s))
168+
lemma has_sum_integral_Union_ae {ι : Type*} [encodable ι] {s : ι → set α} {f : α → E}
169+
(hm : ∀ i, null_measurable_set (s i) μ) (hd : pairwise (ae_disjoint μ on s))
170170
(hfi : integrable_on f (⋃ i, s i) μ) :
171171
has_sum (λ n, ∫ a in s n, f a ∂ μ) (∫ a in ⋃ n, s n, f a ∂μ) :=
172172
begin
173-
have hfi' : ∀ i, integrable_on f (s i) μ, from λ i, hfi.mono_set (subset_Union _ _),
174-
simp only [has_sum, ← integral_finset_bUnion _ (λ i _, hm i) (hd.set_pairwise _) (λ i _, hfi' i)],
175-
rw Union_eq_Union_finset at hfi ⊢,
176-
exact tendsto_set_integral_of_monotone (λ t, t.measurable_set_bUnion (λ i _, hm i))
177-
(λ t₁ t₂ h, bUnion_subset_bUnion_left h) hfi
173+
simp only [integrable_on, measure.restrict_Union_ae hd hm] at hfi ⊢,
174+
exact has_sum_integral_measure hfi
178175
end
179176

177+
lemma has_sum_integral_Union {ι : Type*} [encodable ι] {s : ι → set α} {f : α → E}
178+
(hm : ∀ i, measurable_set (s i)) (hd : pairwise (disjoint on s))
179+
(hfi : integrable_on f (⋃ i, s i) μ) :
180+
has_sum (λ n, ∫ a in s n, f a ∂ μ) (∫ a in ⋃ n, s n, f a ∂μ) :=
181+
has_sum_integral_Union_ae (λ i, (hm i).null_measurable_set) (hd.mono (λ i j h, h.ae_disjoint)) hfi
182+
180183
lemma integral_Union {ι : Type*} [encodable ι] {s : ι → set α} {f : α → E}
181184
(hm : ∀ i, measurable_set (s i)) (hd : pairwise (disjoint on s))
182185
(hfi : integrable_on f (⋃ i, s i) μ) :
183186
(∫ a in (⋃ n, s n), f a ∂μ) = ∑' n, ∫ a in s n, f a ∂ μ :=
184187
(has_sum.tsum_eq (has_sum_integral_Union hm hd hfi)).symm
185188

186-
lemma has_sum_integral_Union_of_null_inter {ι : Type*} [encodable ι] {s : ι → set α} {f : α → E}
187-
(hm : ∀ i, null_measurable_set (s i) μ) (hd : pairwise (ae_disjoint μ on s))
188-
(hfi : integrable_on f (⋃ i, s i) μ) :
189-
has_sum (λ n, ∫ a in s n, f a ∂ μ) (∫ a in ⋃ n, s n, f a ∂μ) :=
190-
begin
191-
rcases exists_subordinate_pairwise_disjoint hm hd with ⟨t, ht_sub, ht_eq, htm, htd⟩,
192-
have htU_eq : (⋃ i, s i) =ᵐ[μ] ⋃ i, t i := eventually_eq.countable_Union ht_eq,
193-
simp only [set_integral_congr_set_ae (ht_eq _), set_integral_congr_set_ae htU_eq, htU_eq],
194-
exact has_sum_integral_Union htm htd (hfi.congr_set_ae htU_eq.symm)
195-
end
196-
197-
lemma integral_Union_of_null_inter {ι : Type*} [encodable ι] {s : ι → set α} {f : α → E}
189+
lemma integral_Union_ae {ι : Type*} [encodable ι] {s : ι → set α} {f : α → E}
198190
(hm : ∀ i, null_measurable_set (s i) μ) (hd : pairwise (ae_disjoint μ on s))
199191
(hfi : integrable_on f (⋃ i, s i) μ) :
200192
(∫ a in (⋃ n, s n), f a ∂μ) = ∑' n, ∫ a in s n, f a ∂ μ :=
201-
(has_sum.tsum_eq (has_sum_integral_Union_of_null_inter hm hd hfi)).symm
193+
(has_sum.tsum_eq (has_sum_integral_Union_ae hm hd hfi)).symm
202194

203195
lemma set_integral_eq_zero_of_forall_eq_zero {f : α → E} (hf : measurable f)
204196
(ht_eq : ∀ x ∈ t, f x = 0) :

src/measure_theory/measure/measure_space.lean

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,18 @@ instance add_comm_monoid [measurable_space α] : add_comm_monoid (measure α) :=
626626
to_outer_measure_injective.add_comm_monoid to_outer_measure zero_to_outer_measure
627627
add_to_outer_measure
628628

629+
/-- Coercion to function as an additive monoid homomorphism. -/
630+
def coe_add_hom {m : measurable_space α} : measure α →+ (set α → ℝ≥0∞) :=
631+
⟨coe_fn, coe_zero, coe_add⟩
632+
633+
@[simp] lemma coe_finset_sum {m : measurable_space α} (I : finset ι) (μ : ι → measure α) :
634+
⇑(∑ i in I, μ i) = ∑ i in I, μ i :=
635+
(@coe_add_hom α m).map_sum _ _
636+
637+
theorem finset_sum_apply {m : measurable_space α} (I : finset ι) (μ : ι → measure α) (s : set α) :
638+
(∑ i in I, μ i) s = ∑ i in I, μ i s :=
639+
by rw [coe_finset_sum, finset.sum_apply]
640+
629641
instance [measurable_space α] : has_scalar ℝ≥0∞ (measure α) :=
630642
⟨λ c μ,
631643
{ to_outer_measure := c • μ.to_outer_measure,
@@ -1390,11 +1402,18 @@ lemma ae_sum_iff' {μ : ι → measure α} {p : α → Prop} (h : measurable_set
13901402
(∀ᵐ x ∂(sum μ), p x) ↔ ∀ i, ∀ᵐ x ∂(μ i), p x :=
13911403
sum_apply_eq_zero' h.compl
13921404

1405+
@[simp] lemma sum_fintype [fintype ι] (μ : ι → measure α) : sum μ = ∑ i, μ i :=
1406+
by { ext1 s hs, simp only [sum_apply, finset_sum_apply, hs, tsum_fintype] }
1407+
1408+
@[simp] lemma sum_coe_finset (s : finset ι) (μ : ι → measure α) :
1409+
sum (λ i : s, μ i) = ∑ i in s, μ i :=
1410+
by simpa only [sum_fintype] using @fintype.sum_finset_coe _ _ s μ _
1411+
13931412
@[simp] lemma ae_sum_eq [encodable ι] (μ : ι → measure α) : (sum μ).ae = ⨆ i, (μ i).ae :=
13941413
filter.ext $ λ s, ae_sum_iff.trans mem_supr.symm
13951414

13961415
@[simp] lemma sum_bool (f : bool → measure α) : sum f = f tt + f ff :=
1397-
ext $ λ s hs, by simp [hs, tsum_fintype]
1416+
by rw [sum_fintype, fintype.sum_bool]
13981417

13991418
@[simp] lemma sum_cond (μ ν : measure α) : sum (λ b, cond b μ ν) = μ + ν := sum_bool _
14001419

@@ -1405,8 +1424,16 @@ ext $ λ t ht, by simp only [sum_apply, restrict_apply, ht, ht.inter hs]
14051424
@[simp] lemma sum_of_empty [is_empty ι] (μ : ι → measure α) : sum μ = 0 :=
14061425
by rw [← measure_univ_eq_zero, sum_apply _ measurable_set.univ, tsum_empty]
14071426

1427+
lemma sum_add_sum_compl (s : set ι) (μ : ι → measure α) :
1428+
sum (λ i : s, μ i) + sum (λ i : sᶜ, μ i) = sum μ :=
1429+
begin
1430+
ext1 t ht,
1431+
simp only [add_apply, sum_apply _ ht],
1432+
exact @tsum_add_tsum_compl ℝ≥0∞ ι _ _ _ (λ i, μ i t) _ s ennreal.summable ennreal.summable
1433+
end
1434+
14081435
lemma sum_congr {μ ν : ℕ → measure α} (h : ∀ n, μ n = ν n) : sum μ = sum ν :=
1409-
by { congr, ext1 n, exact h n }
1436+
congr_arg sum (funext h)
14101437

14111438
lemma sum_add_sum (μ ν : ℕ → measure α) : sum μ + sum ν = sum (λ n, μ n + ν n) :=
14121439
begin

0 commit comments

Comments
 (0)