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

Commit ae98aad

Browse files
committed
chore(measure_theory/measure): review API of mutually_singular (#10186)
1 parent 7a8a914 commit ae98aad

File tree

5 files changed

+69
-56
lines changed

5 files changed

+69
-56
lines changed

src/measure_theory/decomposition/jordan.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ end
556556
lemma total_variation_mutually_singular_iff (s : signed_measure α) (μ : measure α) :
557557
s.total_variation ⊥ₘ μ ↔
558558
s.to_jordan_decomposition.pos_part ⊥ₘ μ ∧ s.to_jordan_decomposition.neg_part ⊥ₘ μ :=
559-
measure.mutually_singular.add_iff
559+
measure.mutually_singular.add_left_iff
560560

561561
end signed_measure
562562

src/measure_theory/decomposition/lebesgue.lean

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,8 @@ begin
288288
{ haveI := hl,
289289
refine (eq_singular_part ((measurable_rn_deriv μ ν).const_smul (r : ℝ≥0∞))
290290
(mutually_singular.smul r (have_lebesgue_decomposition_spec _ _).2.1) _).symm,
291-
rw with_density_smul _ (measurable_rn_deriv _ _),
292-
change _ = _ + r • _,
293-
rw [← smul_add, ← have_lebesgue_decomposition_add μ ν] },
291+
rw [with_density_smul _ (measurable_rn_deriv _ _), ← smul_add,
292+
← have_lebesgue_decomposition_add μ ν, ennreal.smul_def] },
294293
{ rw [singular_part, singular_part, dif_neg hl, dif_neg, smul_zero],
295294
refine λ hl', hl _,
296295
rw ← inv_smul_smul₀ hr μ,
@@ -303,7 +302,7 @@ lemma singular_part_add (μ₁ μ₂ ν : measure α)
303302
begin
304303
refine (eq_singular_part
305304
((measurable_rn_deriv μ₁ ν).add (measurable_rn_deriv μ₂ ν))
306-
((have_lebesgue_decomposition_spec _ _).2.1.add (have_lebesgue_decomposition_spec _ _).2.1)
305+
((have_lebesgue_decomposition_spec _ _).2.1.add_left (have_lebesgue_decomposition_spec _ _).2.1)
307306
_).symm,
308307
erw with_density_add (measurable_rn_deriv μ₁ ν) (measurable_rn_deriv μ₂ ν),
309308
conv_rhs { rw [add_assoc, add_comm (μ₂.singular_part ν), ← add_assoc, ← add_assoc] },
@@ -910,7 +909,7 @@ end
910909
/-- Given a signed measure `s` and a measure `μ`, `s.singular_part μ` is the signed measure
911910
such that `s.singular_part μ + μ.with_densityᵥ (s.rn_deriv μ) = s` and
912911
`s.singular_part μ` is mutually singular with respect to `μ`. -/
913-
def singular_part(s : signed_measure α) (μ : measure α) : signed_measure α :=
912+
def singular_part (s : signed_measure α) (μ : measure α) : signed_measure α :=
914913
(s.to_jordan_decomposition.pos_part.singular_part μ).to_signed_measure -
915914
(s.to_jordan_decomposition.neg_part.singular_part μ).to_signed_measure
916915

@@ -955,8 +954,7 @@ begin
955954
rw [mutually_singular_ennreal_iff, singular_part_total_variation],
956955
change _ ⊥ₘ vector_measure.equiv_measure.to_fun (vector_measure.equiv_measure.inv_fun μ),
957956
rw vector_measure.equiv_measure.right_inv μ,
958-
exact measure.mutually_singular.add
959-
(mutually_singular_singular_part _ _) (mutually_singular_singular_part _ _),
957+
exact (mutually_singular_singular_part _ _).add_left (mutually_singular_singular_part _ _)
960958
end
961959

962960
end
@@ -1024,10 +1022,10 @@ begin
10241022
change _ ⊥ₘ vector_measure.equiv_measure.to_fun (vector_measure.equiv_measure.inv_fun μ) ∧
10251023
_ ⊥ₘ vector_measure.equiv_measure.to_fun (vector_measure.equiv_measure.inv_fun μ) at htμ,
10261024
rw [vector_measure.equiv_measure.right_inv] at htμ,
1027-
exact ((jordan_decomposition.mutually_singular _).symm.add
1028-
(htμ.1.symm.of_absolutely_continuous (with_density_absolutely_continuous _ _))).symm.add
1029-
((htμ.2.symm.of_absolutely_continuous (with_density_absolutely_continuous _ _)).symm.add
1030-
(with_density_of_real_mutually_singular hf).symm).symm
1025+
exact ((jordan_decomposition.mutually_singular _).add_right
1026+
(htμ.1.mono_ac (refl _) (with_density_absolutely_continuous _ _))).add_left
1027+
((htμ.2.symm.mono_ac (with_density_absolutely_continuous _ _) (refl _)).add_right
1028+
(with_density_of_real_mutually_singular hf))
10311029
end
10321030

10331031
lemma to_jordan_decomposition_eq_of_eq_add_with_density

src/measure_theory/integral/lebesgue.lean

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,19 +2078,11 @@ begin
20782078
set S : set α := { x | f x < 0 } with hSdef,
20792079
have hS : measurable_set S := measurable_set_lt hf measurable_const,
20802080
refine ⟨S, hS, _, _⟩,
2081-
{ rw [with_density_apply _ hS, hSdef],
2082-
have hf0 : ∀ᵐ x ∂μ, x ∈ S → ennreal.of_real (f x) = 0,
2083-
{ refine ae_of_all _ (λ _ hx, _),
2084-
rw [ennreal.of_real_eq_zero.2 (le_of_lt hx)] },
2085-
rw set_lintegral_congr_fun hS hf0,
2086-
exact lintegral_zero },
2087-
{ rw [with_density_apply _ hS.compl, hSdef],
2088-
have hf0 : ∀ᵐ x ∂μ, x ∈ Sᶜ → ennreal.of_real (-f x) = 0,
2089-
{ refine ae_of_all _ (λ x hx, _),
2090-
rw ennreal.of_real_eq_zero.2,
2091-
rwa [neg_le, neg_zero, ← not_lt] },
2092-
rw set_lintegral_congr_fun hS.compl hf0,
2093-
exact lintegral_zero },
2081+
{ rw [with_density_apply _ hS, lintegral_eq_zero_iff hf.ennreal_of_real, eventually_eq],
2082+
exact (ae_restrict_mem hS).mono (λ x hx, ennreal.of_real_eq_zero.2 (le_of_lt hx)) },
2083+
{ rw [with_density_apply _ hS.compl, lintegral_eq_zero_iff hf.neg.ennreal_of_real, eventually_eq],
2084+
exact (ae_restrict_mem hS.compl).mono (λ x hx, ennreal.of_real_eq_zero.2
2085+
(not_lt.1 $ mt neg_pos.1 hx)) },
20942086
end
20952087

20962088
lemma restrict_with_density {s : set α} (hs : measurable_set s) (f : α → ℝ≥0∞) :

src/measure_theory/measure/measure_space.lean

Lines changed: 51 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,9 @@ ext $ λ s hs, by simp [hs, tsum_fintype]
12131213
(sum μ).restrict s = sum (λ i, (μ i).restrict s) :=
12141214
ext $ λ t ht, by simp only [sum_apply, restrict_apply, ht, ht.inter hs]
12151215

1216+
@[simp] lemma sum_of_empty [is_empty ι] (μ : ι → measure α) : sum μ = 0 :=
1217+
by rw [← measure_univ_eq_zero, sum_apply _ measurable_set.univ, tsum_empty]
1218+
12161219
lemma sum_congr {μ ν : ℕ → measure α} (h : ∀ n, μ n = ν n) : sum μ = sum ν :=
12171220
by { congr, ext1 n, exact h n }
12181221

@@ -1339,6 +1342,8 @@ rfl.absolutely_continuous
13391342

13401343
protected lemma rfl : μ ≪ μ := λ s hs, hs
13411344

1345+
instance [measurable_space α] : is_refl (measure α) (≪) := ⟨λ μ, absolutely_continuous.rfl⟩
1346+
13421347
@[trans] protected lemma trans (h1 : μ₁ ≪ μ₂) (h2 : μ₂ ≪ μ₃) : μ₁ ≪ μ₃ :=
13431348
λ s hs, h1 $ h2 hs
13441349

@@ -1449,45 +1454,60 @@ localized "infix ` ⊥ₘ `:60 := measure_theory.measure.mutually_singular" in m
14491454

14501455
namespace mutually_singular
14511456

1452-
lemma zero_right : μ ⊥ₘ 0 :=
1453-
⟨∅, measurable_set.empty, measure_empty, rfl⟩
1457+
lemma mk {s t : set α} (hs : μ s = 0) (ht : ν t = 0) (hst : univ ⊆ s ∪ t) :
1458+
mutually_singular μ ν :=
1459+
begin
1460+
use [to_measurable μ s, measurable_set_to_measurable _ _, (measure_to_measurable _).trans hs],
1461+
refine measure_mono_null (λ x hx, (hst trivial).resolve_left $ λ hxs, hx _) ht,
1462+
exact subset_to_measurable _ _ hxs
1463+
end
1464+
1465+
@[simp] lemma zero_right : μ ⊥ₘ 0 := ⟨∅, measurable_set.empty, measure_empty, rfl⟩
14541466

1455-
lemma symm (h : ν ⊥ₘ μ) : μ ⊥ₘ ν :=
1456-
let ⟨i, hi, his, hit⟩ := h in
1457-
⟨iᶜ, measurable_set.compl hi, hit, (compl_compl i).symm ▸ his⟩
1467+
@[symm] lemma symm (h : ν ⊥ₘ μ) : μ ⊥ₘ ν :=
1468+
let ⟨i, hi, his, hit⟩ := h in ⟨iᶜ, hi.compl, hit, (compl_compl i).symm ▸ his⟩
14581469

1459-
lemma zero_left : 0 ⊥ₘ μ :=
1460-
zero_right.symm
1470+
lemma comm : μ ⊥ₘ ν ↔ ν ⊥ₘ μ := ⟨λ h, h.symm, λ h, h.symm⟩
14611471

1462-
lemma add (h₁ : ν₁ ⊥ₘ μ) (h₂ : ν₂ ⊥ₘ μ) : ν₁ + ν₂ ⊥ₘ μ :=
1463-
begin
1464-
obtain ⟨s, hs, hs0, hs0'⟩ := h₁,
1465-
obtain ⟨t, ht, ht0, ht0'⟩ := h₂,
1466-
refine ⟨s ∩ t, hs.inter ht, _, _⟩,
1467-
{ simp only [pi.add_apply, add_eq_zero_iff, coe_add],
1468-
exact ⟨measure_mono_null (inter_subset_left s t) hs0,
1469-
measure_mono_null (inter_subset_right s t) ht0⟩ },
1470-
{ rw [compl_inter, ← nonpos_iff_eq_zero],
1471-
refine le_trans (measure_union_le _ _) _,
1472-
rw [hs0', ht0', zero_add],
1473-
exact le_refl _ }
1474-
end
1472+
@[simp] lemma zero_left : 0 ⊥ₘ μ := zero_right.symm
1473+
1474+
lemma mono_ac (h : μ₁ ⊥ₘ ν₁) (hμ : μ₂ ≪ μ₁) (hν : ν₂ ≪ ν₁) : μ₂ ⊥ₘ ν₂ :=
1475+
let ⟨s, hs, h₁, h₂⟩ := h in ⟨s, hs, hμ h₁, hν h₂⟩
14751476

1476-
lemma add_iff : ν₁ + ν₂ ⊥ₘ μ ↔ ν₁ ⊥ₘ μ ∧ ν₂ ⊥ₘ μ :=
1477+
lemma mono (h : μ₁ ⊥ₘ ν₁) (hμ : μ₂ ≤ μ₁) (hν : ν₂ ≤ ν₁) : μ₂ ⊥ₘ ν₂ :=
1478+
h.mono_ac hμ.absolutely_continuous hν.absolutely_continuous
1479+
1480+
@[simp] lemma sum_left {ι : Type*} [encodable ι] {μ : ι → measure α} :
1481+
(sum μ) ⊥ₘ ν ↔ ∀ i, μ i ⊥ₘ ν :=
14771482
begin
1478-
split,
1479-
{ rintro ⟨u, hmeas, hu₁, hu₂⟩,
1480-
rw [measure.add_apply, add_eq_zero_iff] at hu₁,
1481-
exact ⟨⟨u, hmeas, hu₁.1, hu₂⟩, u, hmeas, hu₁.2, hu₂⟩ },
1482-
{ exact λ ⟨h₁, h₂⟩, h₁.add h₂ }
1483+
refine ⟨λ h i, h.mono (le_sum _ _) le_rfl, λ H, _⟩,
1484+
choose s hsm hsμ hsν using H,
1485+
refine ⟨⋂ i, s i, measurable_set.Inter hsm, _, _⟩,
1486+
{ rw [sum_apply _ (measurable_set.Inter hsm), ennreal.tsum_eq_zero],
1487+
exact λ i, measure_mono_null (Inter_subset _ _) (hsμ i) },
1488+
{ rwa [compl_Inter, measure_Union_null_iff], }
14831489
end
14841490

1485-
lemma smul (r : ℝ≥0) (h : ν ⊥ₘ μ) : r • ν ⊥ₘ μ :=
1486-
let ⟨s, hs, hs0, hs0'⟩ := h in
1487-
⟨s, hs, by simp only [coe_nnreal_smul, pi.smul_apply, hs0, smul_zero], hs0'⟩
1491+
@[simp] lemma sum_right {ι : Type*} [encodable ι] {ν : ι → measure α} :
1492+
μ ⊥ₘ sum ν ↔ ∀ i, μ ⊥ₘ ν i :=
1493+
comm.trans $ sum_left.trans $ forall_congr $ λ i, comm
1494+
1495+
@[simp] lemma add_left_iff : μ₁ + μ₂ ⊥ₘ ν ↔ μ₁ ⊥ₘ ν ∧ μ₂ ⊥ₘ ν :=
1496+
by rw [← sum_cond, sum_left, bool.forall_bool, cond, cond, and.comm]
1497+
1498+
@[simp] lemma add_right_iff : μ ⊥ₘ ν₁ + ν₂ ↔ μ ⊥ₘ ν₁ ∧ μ ⊥ₘ ν₂ :=
1499+
comm.trans $ add_left_iff.trans $ and_congr comm comm
1500+
1501+
lemma add_left (h₁ : ν₁ ⊥ₘ μ) (h₂ : ν₂ ⊥ₘ μ) : ν₁ + ν₂ ⊥ₘ μ :=
1502+
add_left_iff.2 ⟨h₁, h₂⟩
1503+
1504+
lemma add_right (h₁ : μ ⊥ₘ ν₁) (h₂ : μ ⊥ₘ ν₂) : μ ⊥ₘ ν₁ + ν₂ :=
1505+
add_right_iff.2 ⟨h₁, h₂⟩
1506+
1507+
lemma smul (r : ℝ≥0∞) (h : ν ⊥ₘ μ) : r • ν ⊥ₘ μ :=
1508+
h.mono_ac (absolutely_continuous.rfl.smul r) absolutely_continuous.rfl
14881509

1489-
lemma of_absolutely_continuous (hms : ν₂ ⊥ₘ μ) (hac : ν₁ ≪ ν₂) : ν₁ ⊥ₘ μ :=
1490-
let ⟨u, hmeas, hu₁, hu₂⟩ := hms in ⟨u, hmeas, hac hu₁, hu₂⟩
1510+
lemma smul_nnreal (r : ℝ≥0) (h : ν ⊥ₘ μ) : r • ν ⊥ₘ μ := h.smul r
14911511

14921512
end mutually_singular
14931513

src/topology/instances/ennreal.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,9 @@ end
615615
protected lemma le_tsum (a : α) : f a ≤ ∑'a, f a :=
616616
le_tsum' ennreal.summable a
617617

618+
@[simp] protected lemma tsum_eq_zero : ∑' i, f i = 0 ↔ ∀ i, f i = 0 :=
619+
⟨λ h i, nonpos_iff_eq_zero.1 $ h ▸ ennreal.le_tsum i, λ h, by simp [h]⟩
620+
618621
protected lemma tsum_eq_top_of_eq_top : (∃ a, f a = ∞) → ∑' a, f a = ∞
619622
| ⟨a, ha⟩ := top_unique $ ha ▸ ennreal.le_tsum a
620623

0 commit comments

Comments
 (0)