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

Commit 72e5b9f

Browse files
committed
feat(measure_theory): ext lemmas for measures (#3895)
Add class `sigma_finite`. Also some cleanup. Rename `measurable_space.is_measurable` -> `measurable_space.is_measurable'`. This is to avoid name clash with `_root_.is_measurable`, which should almost always be used instead. define `is_pi_system`.
1 parent 7cf8fa6 commit 72e5b9f

File tree

9 files changed

+190
-92
lines changed

9 files changed

+190
-92
lines changed

src/data/set/basic.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,9 @@ h.left
855855
theorem not_mem_of_mem_diff {s t : set α} {x : α} (h : x ∈ s \ t) : x ∉ t :=
856856
h.right
857857

858+
theorem diff_eq_compl_inter {s t : set α} : s \ t = tᶜ ∩ s :=
859+
by rw [diff_eq, inter_comm]
860+
858861
theorem nonempty_diff {s t : set α} : (s \ t).nonempty ↔ ¬ (s ⊆ t) :=
859862
⟨λ ⟨x, xs, xt⟩, not_subset.2 ⟨x, xs, xt⟩,
860863
λ h, let ⟨x, xs, xt⟩ := not_subset.1 h in ⟨x, xs, xt⟩⟩
@@ -995,6 +998,12 @@ by rw [union_comm, union_diff_self, union_comm]
995998
theorem diff_inter_self {a b : set α} : (b \ a) ∩ a = ∅ :=
996999
by { ext, by simp [iff_def] {contextual:=tt} }
9971000

1001+
theorem diff_inter_self_eq_diff {s t : set α} : s \ (t ∩ s) = s \ t :=
1002+
by { ext, simp [iff_def] {contextual := tt} }
1003+
1004+
theorem diff_self_inter {s t : set α} : s \ (s ∩ t) = s \ t :=
1005+
by rw [inter_comm, diff_inter_self_eq_diff]
1006+
9981007
theorem diff_eq_self {s t : set α} : s \ t = s ↔ t ∩ s ⊆ ∅ :=
9991008
by finish [ext_iff, iff_def, subset_def]
10001009

src/logic/basic.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ into an automated theorem prover for first order logic. -/
168168
@[class]
169169
def fact (p : Prop) := p
170170

171+
lemma fact.elim {p : Prop} (h : fact p) : p := h
172+
171173
end miscellany
172174

173175
/-!

src/measure_theory/borel_space.lean

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ lemma borel_eq_generate_Iio (α)
9191
begin
9292
refine le_antisymm _ (generate_from_le _),
9393
{ rw borel_eq_generate_from_of_subbasis (@order_topology.topology_eq_generate_intervals α _ _ _),
94-
have H : ∀ a:α, is_measurable (measurable_space.generate_from (range Iio)) (Iio a) :=
95-
λ a, generate_measurable.basic _ ⟨_, rfl⟩,
94+
letI : measurable_space α := measurable_space.generate_from (range Iio),
95+
have H : ∀ a:α, is_measurable (Iio a) := λ a, generate_measurable.basic _ ⟨_, rfl⟩,
9696
refine generate_from_le _, rintro _ ⟨a, rfl | rfl⟩; [skip, apply H],
9797
by_cases h : ∃ a', ∀ b, a < b ↔ a' ≤ b,
9898
{ rcases h with ⟨a', ha'⟩,
99-
rw (_ : Ioi a = (Iio a')ᶜ), {exact (H _).compl _},
99+
rw (_ : Ioi a = (Iio a')ᶜ), { exact (H _).compl },
100100
simp [set.ext_iff, ha'] },
101101
{ rcases is_open_Union_countable
102102
(λ a' : {a' : α // a < a'}, {b | a'.1 < b})
@@ -112,7 +112,7 @@ begin
112112
lt_of_lt_of_le ax⟩⟩ },
113113
rw this, resetI,
114114
apply is_measurable.Union,
115-
exact λ _, (H _).compl _ } },
115+
exact λ _, (H _).compl } },
116116
{ rw forall_range_iff,
117117
intro a,
118118
exact generate_measurable.basic _ is_open_Iio }
@@ -564,8 +564,8 @@ lemma measure_ext_Ioo_rat {μ ν : measure ℝ} [locally_finite_measure μ]
564564
begin
565565
refine measure.ext_of_generate_from_of_cover_subset borel_eq_generate_from_Ioo_rat _
566566
(subset.refl _) _ _ _ _,
567-
{ simp only [mem_Union, mem_singleton_iff],
568-
rintros _ ⟨a₁, b₁, h₁, rfl⟩ _ ⟨a₂, b₂, h₂, rfl⟩ ne,
567+
{ simp only [is_pi_system, mem_Union, mem_singleton_iff],
568+
rintros _ _ ⟨a₁, b₁, h₁, rfl⟩ ⟨a₂, b₂, h₂, rfl⟩ ne,
569569
simp only [Ioo_inter_Ioo, sup_eq_max, inf_eq_min, ← rat.cast_max, ← rat.cast_min, nonempty_Ioo] at ne ⊢,
570570
refine ⟨_, _, _, rfl⟩,
571571
assumption_mod_cast },
@@ -591,8 +591,8 @@ begin
591591
simp only [mem_Union], rintro ⟨a, b, h, H⟩,
592592
rw [mem_singleton_iff.1 H],
593593
rw (set.ext (λ x, _) : Ioo (a:ℝ) b = (⋃c>a, (Iio c)ᶜ) ∩ Iio b),
594-
{ have hg : ∀q:ℚ, g.is_measurable (Iio q) :=
595-
λ q, generate_measurable.basic _ (by simp; exact ⟨_, rfl⟩),
594+
{ have hg : ∀ q : ℚ, g.is_measurable' (Iio q) :=
595+
λ q, generate_measurable.basic (Iio q) (by { simp, exact ⟨_, rfl⟩ }),
596596
refine @is_measurable.inter _ g _ _ _ (hg _),
597597
refine @is_measurable.bUnion _ _ g _ _ (countable_encodable _) (λ c h, _),
598598
exact @is_measurable.compl _ _ g (hg _) },
@@ -602,8 +602,7 @@ begin
602602
let ⟨c, ac, cx⟩ := exists_rat_btwn h in
603603
⟨c, rat.cast_lt.1 ac, le_of_lt cx⟩,
604604
λ ⟨c, ac, cx⟩, lt_of_lt_of_le (rat.cast_lt.2 ac) cx⟩ } },
605-
{ simp, rintro r rfl,
606-
exact is_open_Iio.is_measurable }
605+
{ simp, rintro r rfl, exact is_open_Iio.is_measurable }
607606
end
608607

609608
end real
@@ -695,15 +694,9 @@ begin
695694
measurable_const }
696695
end
697696

698-
lemma measurable.ennreal_add {α : Type*} [measurable_space α] {f g : α → ennreal} :
699-
measurable f → measurable g → measurable (λa, f a + g a) :=
700-
begin
701-
refine ennreal.measurable_of_measurable_nnreal_nnreal (+) _ _ _,
702-
{ simp only [ennreal.coe_add.symm],
703-
exact ennreal.measurable_coe.comp measurable_add },
704-
{ simp [measurable_const] },
705-
{ simp [measurable_const] }
706-
end
697+
lemma measurable.ennreal_add {α : Type*} [measurable_space α] {f g : α → ennreal}
698+
(hf : measurable f) (hg : measurable g) : measurable (λa, f a + g a) :=
699+
hf.add hg
707700

708701
lemma measurable.ennreal_sub {α : Type*} [measurable_space α] {f g : α → ennreal} :
709702
measurable f → measurable g → measurable (λa, f a - g a) :=

src/measure_theory/content.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ lemma is_left_invariant_of_content [group G] [topological_group G]
228228
by convert of_content_preimage h2 (homeomorph.mul_left g) (λ K, h g) A
229229

230230
lemma of_content_caratheodory (A : set G) :
231-
(of_content μ h1).caratheodory.is_measurable A ↔ ∀ (U : opens G),
231+
(of_content μ h1).caratheodory.is_measurable' A ↔ ∀ (U : opens G),
232232
of_content μ h1 (U ∩ A) + of_content μ h1 (U \ A) ≤ of_content μ h1 U :=
233233
begin
234234
dsimp [opens], rw subtype.forall,

src/measure_theory/haar_measure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ lemma haar_outer_measure_exists_compact {K₀ : positive_compacts G} {U : opens
465465
outer_measure.of_content_exists_compact echaar_sup_le hU hε
466466

467467
lemma haar_outer_measure_caratheodory {K₀ : positive_compacts G} (A : set G) :
468-
(haar_outer_measure K₀).caratheodory.is_measurable A ↔ ∀ (U : opens G),
468+
(haar_outer_measure K₀).caratheodory.is_measurable' A ↔ ∀ (U : opens G),
469469
haar_outer_measure K₀ (U ∩ A) + haar_outer_measure K₀ (U \ A) ≤ haar_outer_measure K₀ U :=
470470
outer_measure.of_content_caratheodory echaar_sup_le A
471471

src/measure_theory/lebesgue_measure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ by rw [← Ico_diff_left, lebesgue_outer.diff_null _ (lebesgue_outer_singleton _
168168
by rw [← Icc_diff_left, lebesgue_outer.diff_null _ (lebesgue_outer_singleton _), lebesgue_outer_Icc]
169169

170170
lemma is_lebesgue_measurable_Iio {c : ℝ} :
171-
lebesgue_outer.caratheodory.is_measurable (Iio c) :=
171+
lebesgue_outer.caratheodory.is_measurable' (Iio c) :=
172172
outer_measure.of_function_caratheodory $ λ t,
173173
le_infi $ λ a, le_infi $ λ b, le_infi $ λ h, begin
174174
refine le_trans (add_le_add

0 commit comments

Comments
 (0)