@@ -4,262 +4,54 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Johannes Hölzl, Yury Kudryashov
5
5
-/
6
6
import measure_theory.constructions.pi
7
+ import measure_theory.measure.stieltjes
7
8
8
9
/-!
9
10
# Lebesgue measure on the real line and on `ℝⁿ`
11
+
12
+ We construct Lebesgue measure on the real line, as a particular case of Stieltjes measure associated
13
+ to the function `x ↦ x`. We obtain as a consequence Lebesgue measure on `ℝⁿ`. We prove their
14
+ basic properties.
10
15
-/
11
16
12
17
noncomputable theory
13
- open classical set filter
18
+ open classical set filter measure_theory
14
19
open ennreal (of_real)
15
- open_locale big_operators ennreal nnreal
16
-
17
- namespace measure_theory
18
-
19
- /-!
20
- ### Preliminary definitions
21
- -/
22
-
23
- /-- Length of an interval. This is the largest monotonic function which correctly
24
- measures all intervals. -/
25
- def lebesgue_length (s : set ℝ) : ℝ≥0 ∞ := ⨅a b (h : s ⊆ Ico a b), of_real (b - a)
26
-
27
- @[simp] lemma lebesgue_length_empty : lebesgue_length ∅ = 0 :=
28
- nonpos_iff_eq_zero.1 $ infi_le_of_le 0 $ infi_le_of_le 0 $ by simp
29
-
30
- @[simp] lemma lebesgue_length_Ico (a b : ℝ) :
31
- lebesgue_length (Ico a b) = of_real (b - a) :=
32
- begin
33
- refine le_antisymm (infi_le_of_le a $ binfi_le b (subset.refl _))
34
- (le_infi $ λ a', le_infi $ λ b', le_infi $ λ h, ennreal.coe_le_coe.2 _),
35
- cases le_or_lt b a with ab ab,
36
- { rw real.to_nnreal_of_nonpos (sub_nonpos.2 ab), apply zero_le },
37
- cases (Ico_subset_Ico_iff ab).1 h with h₁ h₂,
38
- exact real.to_nnreal_le_to_nnreal (sub_le_sub h₂ h₁)
39
- end
40
-
41
- lemma lebesgue_length_mono {s₁ s₂ : set ℝ} (h : s₁ ⊆ s₂) :
42
- lebesgue_length s₁ ≤ lebesgue_length s₂ :=
43
- infi_le_infi $ λ a, infi_le_infi $ λ b, infi_le_infi2 $ λ h', ⟨subset.trans h h', le_refl _⟩
44
-
45
- lemma lebesgue_length_eq_infi_Ioo (s) :
46
- lebesgue_length s = ⨅a b (h : s ⊆ Ioo a b), of_real (b - a) :=
47
- begin
48
- refine le_antisymm
49
- (infi_le_infi $ λ a, infi_le_infi $ λ b, infi_le_infi2 $ λ h,
50
- ⟨subset.trans h Ioo_subset_Ico_self, le_refl _⟩) _,
51
- refine le_infi (λ a, le_infi $ λ b, le_infi $ λ h, _),
52
- refine ennreal.le_of_forall_pos_le_add (λ ε ε0 _, _),
53
- refine infi_le_of_le (a - ε) (infi_le_of_le b $ infi_le_of_le
54
- (subset.trans h $ Ico_subset_Ioo_left $ (sub_lt_self_iff _).2 ε0 ) _),
55
- rw ← sub_add,
56
- refine le_trans ennreal.of_real_add_le (add_le_add_left _ _),
57
- simp only [ennreal.of_real_coe_nnreal, le_refl]
58
- end
59
-
60
- @[simp] lemma lebesgue_length_Ioo (a b : ℝ) :
61
- lebesgue_length (Ioo a b) = of_real (b - a) :=
62
- begin
63
- rw ← lebesgue_length_Ico,
64
- refine le_antisymm (lebesgue_length_mono Ioo_subset_Ico_self) _,
65
- rw lebesgue_length_eq_infi_Ioo (Ioo a b),
66
- refine (le_infi $ λ a', le_infi $ λ b', le_infi $ λ h, _),
67
- cases le_or_lt b a with ab ab, {simp [ab]},
68
- cases (Ioo_subset_Ioo_iff ab).1 h with h₁ h₂,
69
- rw [lebesgue_length_Ico],
70
- exact ennreal.of_real_le_of_real (sub_le_sub h₂ h₁)
71
- end
72
-
73
- lemma lebesgue_length_eq_infi_Icc (s) :
74
- lebesgue_length s = ⨅a b (h : s ⊆ Icc a b), of_real (b - a) :=
75
- begin
76
- refine le_antisymm _
77
- (infi_le_infi $ λ a, infi_le_infi $ λ b, infi_le_infi2 $ λ h,
78
- ⟨subset.trans h Ico_subset_Icc_self, le_refl _⟩),
79
- refine le_infi (λ a, le_infi $ λ b, le_infi $ λ h, _),
80
- refine ennreal.le_of_forall_pos_le_add (λ ε ε0 _, _),
81
- refine infi_le_of_le a (infi_le_of_le (b + ε) $ infi_le_of_le
82
- (subset.trans h $ Icc_subset_Ico_right $ (lt_add_iff_pos_right _).2 ε0 ) _),
83
- rw [← sub_add_eq_add_sub],
84
- refine le_trans ennreal.of_real_add_le (add_le_add_left _ _),
85
- simp only [ennreal.of_real_coe_nnreal, le_refl]
86
- end
87
-
88
- @[simp] lemma lebesgue_length_Icc (a b : ℝ) :
89
- lebesgue_length (Icc a b) = of_real (b - a) :=
90
- begin
91
- rw ← lebesgue_length_Ico,
92
- refine le_antisymm _ (lebesgue_length_mono Ico_subset_Icc_self),
93
- rw lebesgue_length_eq_infi_Icc (Icc a b),
94
- exact infi_le_of_le a (infi_le_of_le b $ infi_le_of_le (by refl) (by simp [le_refl]))
95
- end
96
-
97
- /-- The Lebesgue outer measure, as an outer measure of ℝ. -/
98
- def lebesgue_outer : outer_measure ℝ :=
99
- outer_measure.of_function lebesgue_length lebesgue_length_empty
100
-
101
- lemma lebesgue_outer_le_length (s : set ℝ) : lebesgue_outer s ≤ lebesgue_length s :=
102
- outer_measure.of_function_le _
103
-
104
- lemma lebesgue_length_subadditive {a b : ℝ} {c d : ℕ → ℝ}
105
- (ss : Icc a b ⊆ ⋃i, Ioo (c i) (d i)) :
106
- (of_real (b - a) : ℝ≥0 ∞) ≤ ∑' i, of_real (d i - c i) :=
107
- begin
108
- suffices : ∀ (s:finset ℕ) b
109
- (cv : Icc a b ⊆ ⋃ i ∈ (↑s:set ℕ), Ioo (c i) (d i)),
110
- (of_real (b - a) : ℝ≥0 ∞) ≤ ∑ i in s, of_real (d i - c i),
111
- { rcases is_compact_Icc.elim_finite_subcover_image (λ (i : ℕ) (_ : i ∈ univ),
112
- @is_open_Ioo _ _ _ _ (c i) (d i)) (by simpa using ss) with ⟨s, su, hf, hs⟩,
113
- have e : (⋃ i ∈ (↑hf.to_finset:set ℕ),
114
- Ioo (c i) (d i)) = (⋃ i ∈ s, Ioo (c i) (d i)), {simp [set.ext_iff]},
115
- rw ennreal.tsum_eq_supr_sum,
116
- refine le_trans _ (le_supr _ hf.to_finset),
117
- exact this hf.to_finset _ (by simpa [e]) },
118
- clear ss b,
119
- refine λ s, finset.strong_induction_on s (λ s IH b cv, _),
120
- cases le_total b a with ab ab,
121
- { rw ennreal.of_real_eq_zero.2 (sub_nonpos.2 ab), exact zero_le _ },
122
- have := cv ⟨ab, le_refl _⟩, simp at this ,
123
- rcases this with ⟨i, is, cb, bd⟩,
124
- rw [← finset.insert_erase is] at cv ⊢,
125
- rw [finset.coe_insert, bUnion_insert] at cv,
126
- rw [finset.sum_insert (finset.not_mem_erase _ _)],
127
- refine le_trans _ (add_le_add_left (IH _ (finset.erase_ssubset is) (c i) _) _),
128
- { refine le_trans (ennreal.of_real_le_of_real _) ennreal.of_real_add_le,
129
- rw sub_add_sub_cancel,
130
- exact sub_le_sub_right (le_of_lt bd) _ },
131
- { rintro x ⟨h₁, h₂⟩,
132
- refine (cv ⟨h₁, le_trans h₂ (le_of_lt cb)⟩).resolve_left
133
- (mt and.left (not_lt_of_le h₂)) }
134
- end
135
-
136
- @[simp] lemma lebesgue_outer_Icc (a b : ℝ) :
137
- lebesgue_outer (Icc a b) = of_real (b - a) :=
138
- begin
139
- refine le_antisymm (by rw ← lebesgue_length_Icc; apply lebesgue_outer_le_length)
140
- (le_binfi $ λ f hf, ennreal.le_of_forall_pos_le_add $ λ ε ε0 h, _),
141
- rcases ennreal.exists_pos_sum_of_encodable
142
- (ennreal.zero_lt_coe_iff.2 ε0 ) ℕ with ⟨ε', ε'0 , hε⟩,
143
- refine le_trans _ (add_le_add_left (le_of_lt hε) _),
144
- rw ← ennreal.tsum_add,
145
- choose g hg using show
146
- ∀ i, ∃ p:ℝ×ℝ, f i ⊆ Ioo p.1 p.2 ∧ (of_real (p.2 - p.1 ) : ℝ≥0 ∞) <
147
- lebesgue_length (f i) + ε' i,
148
- { intro i,
149
- have := (ennreal.lt_add_right (lt_of_le_of_lt (ennreal.le_tsum i) h)
150
- (ennreal.zero_lt_coe_iff.2 (ε'0 i))),
151
- conv at this {to_lhs, rw lebesgue_length_eq_infi_Ioo},
152
- simpa [infi_lt_iff] },
153
- refine le_trans _ (ennreal.tsum_le_tsum $ λ i, le_of_lt (hg i).2 ),
154
- exact lebesgue_length_subadditive (subset.trans hf $
155
- Union_subset_Union $ λ i, (hg i).1 )
156
- end
157
-
158
- @[simp] lemma lebesgue_outer_singleton (a : ℝ) : lebesgue_outer {a} = 0 :=
159
- by simpa using lebesgue_outer_Icc a a
160
-
161
- @[simp] lemma lebesgue_outer_Ico (a b : ℝ) :
162
- lebesgue_outer (Ico a b) = of_real (b - a) :=
163
- by rw [← Icc_diff_right, lebesgue_outer.diff_null _ (lebesgue_outer_singleton _),
164
- lebesgue_outer_Icc]
165
-
166
- @[simp] lemma lebesgue_outer_Ioo (a b : ℝ) :
167
- lebesgue_outer (Ioo a b) = of_real (b - a) :=
168
- by rw [← Ico_diff_left, lebesgue_outer.diff_null _ (lebesgue_outer_singleton _), lebesgue_outer_Ico]
169
-
170
- @[simp] lemma lebesgue_outer_Ioc (a b : ℝ) :
171
- lebesgue_outer (Ioc a b) = of_real (b - a) :=
172
- by rw [← Icc_diff_left, lebesgue_outer.diff_null _ (lebesgue_outer_singleton _), lebesgue_outer_Icc]
173
-
174
- lemma is_lebesgue_measurable_Iio {c : ℝ} :
175
- lebesgue_outer.caratheodory.measurable_set' (Iio c) :=
176
- outer_measure.of_function_caratheodory $ λ t,
177
- le_infi $ λ a, le_infi $ λ b, le_infi $ λ h, begin
178
- refine le_trans (add_le_add
179
- (lebesgue_length_mono $ inter_subset_inter_left _ h)
180
- (lebesgue_length_mono $ diff_subset_diff_left h)) _,
181
- cases le_total a c with hac hca; cases le_total b c with hbc hcb;
182
- simp [*, -sub_eq_add_neg, sub_add_sub_cancel', le_refl],
183
- { simp [*, ← ennreal.of_real_add, -sub_eq_add_neg, sub_add_sub_cancel', le_refl] },
184
- { simp only [ennreal.of_real_eq_zero.2 (sub_nonpos.2 (le_trans hbc hca)), zero_add, le_refl] }
185
- end
186
-
187
- theorem lebesgue_outer_trim : lebesgue_outer.trim = lebesgue_outer :=
188
- begin
189
- refine le_antisymm (λ s, _) (outer_measure.le_trim _),
190
- rw outer_measure.trim_eq_infi,
191
- refine le_infi (λ f, le_infi $ λ hf,
192
- ennreal.le_of_forall_pos_le_add $ λ ε ε0 h, _),
193
- rcases ennreal.exists_pos_sum_of_encodable
194
- (ennreal.zero_lt_coe_iff.2 ε0 ) ℕ with ⟨ε', ε'0 , hε⟩,
195
- refine le_trans _ (add_le_add_left (le_of_lt hε) _),
196
- rw ← ennreal.tsum_add,
197
- choose g hg using show
198
- ∀ i, ∃ s, f i ⊆ s ∧ measurable_set s ∧
199
- lebesgue_outer s ≤ lebesgue_length (f i) + of_real (ε' i),
200
- { intro i,
201
- have := (ennreal.lt_add_right (lt_of_le_of_lt (ennreal.le_tsum i) h)
202
- (ennreal.zero_lt_coe_iff.2 (ε'0 i))),
203
- conv at this {to_lhs, rw lebesgue_length},
204
- simp only [infi_lt_iff] at this ,
205
- rcases this with ⟨a, b, h₁, h₂⟩,
206
- rw ← lebesgue_outer_Ico at h₂,
207
- exact ⟨_, h₁, measurable_set_Ico, le_of_lt $ by simpa using h₂⟩ },
208
- simp at hg,
209
- apply infi_le_of_le (Union g) _,
210
- apply infi_le_of_le (subset.trans hf $ Union_subset_Union (λ i, (hg i).1 )) _,
211
- apply infi_le_of_le (measurable_set.Union (λ i, (hg i).2 .1 )) _,
212
- exact le_trans (lebesgue_outer.Union _) (ennreal.tsum_le_tsum $ λ i, (hg i).2 .2 )
213
- end
214
-
215
- lemma borel_le_lebesgue_measurable : borel ℝ ≤ lebesgue_outer.caratheodory :=
216
- begin
217
- rw real.borel_eq_generate_from_Iio_rat,
218
- refine measurable_space.generate_from_le _,
219
- simp [is_lebesgue_measurable_Iio] { contextual := tt }
220
- end
20
+ open_locale big_operators ennreal nnreal topological_space
221
21
222
22
/-!
223
23
### Definition of the Lebesgue measure and lengths of intervals
224
24
-/
225
25
226
- /-- Lebesgue measure on the Borel sets
227
-
228
- The outer Lebesgue measure is the completion of this measure. (TODO: proof this)
229
- -/
26
+ /-- Lebesgue measure on the Borel sigma algebra, giving measure `b - a` to the interval `[a, b]`. -/
230
27
instance real.measure_space : measure_space ℝ :=
231
- ⟨{to_outer_measure := lebesgue_outer,
232
- m_Union := λ f hf, lebesgue_outer.Union_eq_of_caratheodory $
233
- λ i, borel_le_lebesgue_measurable _ (hf i),
234
- trimmed := lebesgue_outer_trim }⟩
235
-
236
- @[simp] theorem lebesgue_to_outer_measure :
237
- (volume : measure ℝ).to_outer_measure = lebesgue_outer := rfl
238
-
239
- end measure_theory
240
-
241
- open measure_theory
28
+ ⟨stieltjes_function.id.measure⟩
242
29
243
30
namespace real
244
31
245
32
variables {ι : Type *} [fintype ι]
246
33
247
34
open_locale topological_space
248
35
249
- theorem volume_val (s) : volume s = lebesgue_outer s := rfl
36
+ theorem volume_val (s) : volume s = stieltjes_function.id.measure s := rfl
250
37
251
- instance has_no_atoms_volume : has_no_atoms ( volume : measure ℝ ) :=
252
- ⟨lebesgue_outer_singleton⟩
38
+ @[simp] lemma volume_Ico {a b : ℝ} : volume (Ico a b) = of_real (b - a ) :=
39
+ by simp [volume_val]
253
40
254
- @[simp] lemma volume_Ico {a b : ℝ} : volume (Ico a b) = of_real (b - a) := lebesgue_outer_Ico a b
41
+ @[simp] lemma volume_Icc {a b : ℝ} : volume (Icc a b) = of_real (b - a) :=
42
+ by simp [volume_val]
255
43
256
- @[simp] lemma volume_Icc {a b : ℝ} : volume (Icc a b) = of_real (b - a) := lebesgue_outer_Icc a b
44
+ @[simp] lemma volume_Ioo {a b : ℝ} : volume (Ioo a b) = of_real (b - a) :=
45
+ by simp [volume_val]
257
46
258
- @[simp] lemma volume_Ioo {a b : ℝ} : volume (Ioo a b) = of_real (b - a) := lebesgue_outer_Ioo a b
47
+ @[simp] lemma volume_Ioc {a b : ℝ} : volume (Ioc a b) = of_real (b - a) :=
48
+ by simp [volume_val]
259
49
260
- @[simp] lemma volume_Ioc {a b : ℝ} : volume (Ioc a b) = of_real (b - a) := lebesgue_outer_Ioc a b
50
+ @[simp] lemma volume_singleton {a : ℝ} : volume ({a} : set ℝ) = 0 :=
51
+ by simp [volume_val]
261
52
262
- @[simp] lemma volume_singleton {a : ℝ} : volume ({a} : set ℝ) = 0 := lebesgue_outer_singleton a
53
+ instance has_no_atoms_volume : has_no_atoms (volume : measure ℝ) :=
54
+ ⟨λ x, volume_singleton⟩
263
55
264
56
@[simp] lemma volume_interval {a b : ℝ} : volume (interval a b) = of_real (abs (b - a)) :=
265
57
by rw [interval, volume_Icc, max_sub_min_eq_abs]
0 commit comments