@@ -24,32 +24,127 @@ structure outer_measure (α : Type*) :=
24
24
(measure_of : set α → ennreal)
25
25
(empty : measure_of ∅ = 0 )
26
26
(mono : ∀{s₁ s₂}, s₁ ⊆ s₂ → measure_of s₁ ≤ measure_of s₂)
27
- (Union_nat : ∀{ s:ℕ → set α} , measure_of (⋃i, s i) ≤ (∑i, measure_of (s i)))
27
+ (Union_nat : ∀( s:ℕ → set α) , measure_of (⋃i, s i) ≤ (∑i, measure_of (s i)))
28
28
29
29
namespace outer_measure
30
- section
31
- parameters {α : Type *} (m : outer_measure α)
32
- include m
33
-
34
- variables {s s₁ s₂ : set α}
35
30
36
- local notation `μ ` := m.measure_of
31
+ section basic
32
+ variables {α : Type *} {ms : set (outer_measure α)} {m : outer_measure α}
37
33
38
- lemma subadditive : μ (s₁ ∪ s₂) ≤ μ s₁ + μ s₂ :=
34
+ lemma subadditive (m : outer_measure α) {s₁ s₂ : set α} :
35
+ m.measure_of (s₁ ∪ s₂) ≤ m.measure_of s₁ + m.measure_of s₂ :=
39
36
let s := λi, ([s₁, s₂].nth i).get_or_else ∅ in
40
- calc μ (s₁ ∪ s₂) ≤ μ (⋃i, s i) :
37
+ calc m.measure_of (s₁ ∪ s₂) ≤ m.measure_of (⋃i, s i) :
41
38
m.mono $ union_subset (subset_Union s 0 ) (subset_Union s 1 )
42
- ... ≤ (∑i, μ (s i)) : @outer_measure .Union_nat α m s
43
- ... = (insert 0 {1 } : finset ℕ).sum (μ ∘ s) : tsum_eq_sum $ assume n h,
39
+ ... ≤ (∑i, m.measure_of (s i)) : m .Union_nat s
40
+ ... = (insert 0 {1 } : finset ℕ).sum (m.measure_of ∘ s) : tsum_eq_sum $ assume n h,
44
41
match n, h with
45
42
| 0 , h := by simp at h; contradiction
46
43
| 1 , h := by simp at h; contradiction
47
44
| nat.succ (nat.succ n), h := m.empty
48
45
end
49
- ... = μ s₁ + μ s₂ : by simp [-add_comm]; refl
50
-
46
+ ... = m.measure_of s₁ + m.measure_of s₂ : by simp [-add_comm]; refl
47
+
48
+ lemma outer_measure_eq : ∀{μ₁ μ₂ : outer_measure α},
49
+ (∀s, μ₁.measure_of s = μ₂.measure_of s) → μ₁ = μ₂
50
+ | ⟨m₁, e₁, _, u₁⟩ ⟨m₂, e₂, _, u₂⟩ h :=
51
+ have m₁ = m₂, from funext $ assume s, h s,
52
+ by simp [this ]
53
+
54
+ instance : has_zero (outer_measure α) :=
55
+ ⟨{ measure_of := λ_, 0 ,
56
+ empty := rfl,
57
+ mono := assume _ _ _, le_refl 0 ,
58
+ Union_nat := assume s, ennreal.zero_le }⟩
59
+
60
+ instance : inhabited (outer_measure α) := ⟨0 ⟩
61
+
62
+ instance : has_add (outer_measure α) :=
63
+ ⟨λm₁ m₂,
64
+ { measure_of := λs, m₁.measure_of s + m₂.measure_of s,
65
+ empty := show m₁.measure_of ∅ + m₂.measure_of ∅ = 0 , by simp [outer_measure.empty],
66
+ mono := assume s₁ s₂ h, add_le_add' (m₁.mono h) (m₂.mono h),
67
+ Union_nat := assume s,
68
+ calc m₁.measure_of (⋃i, s i) + m₂.measure_of (⋃i, s i) ≤
69
+ (∑i, m₁.measure_of (s i)) + (∑i, m₂.measure_of (s i)) :
70
+ add_le_add' (m₁.Union_nat s) (m₂.Union_nat s)
71
+ ... = _ : (tsum_add ennreal.has_sum ennreal.has_sum).symm}⟩
72
+
73
+ instance : add_comm_monoid (outer_measure α) :=
74
+ { zero := 0 ,
75
+ add := (+),
76
+ add_comm := assume a b, outer_measure_eq $ assume s, add_comm _ _,
77
+ add_assoc := assume a b c, outer_measure_eq $ assume s, add_assoc _ _ _,
78
+ add_zero := assume a, outer_measure_eq $ assume s, add_zero _,
79
+ zero_add := assume a, outer_measure_eq $ assume s, zero_add _ }
80
+
81
+ instance : has_bot (outer_measure α) := ⟨0 ⟩
82
+
83
+ instance outer_measure.order_bot : order_bot (outer_measure α) :=
84
+ { le := λm₁ m₂, ∀s, m₁.measure_of s ≤ m₂.measure_of s,
85
+ bot := 0 ,
86
+ le_refl := assume a s, le_refl _,
87
+ le_trans := assume a b c hab hbc s, le_trans (hab s) (hbc s),
88
+ le_antisymm := assume a b hab hba, outer_measure_eq $ assume s, le_antisymm (hab s) (hba s),
89
+ bot_le := assume a s, ennreal.zero_le }
90
+
91
+ section supremum
92
+
93
+ private def sup (ms : set (outer_measure α)) (h : ms ≠ ∅) :=
94
+ { outer_measure .
95
+ measure_of := λs, ⨆m:ms, m.val.measure_of s,
96
+ empty :=
97
+ let ⟨m, hm⟩ := set.exists_mem_of_ne_empty h in
98
+ have ms := ⟨m, hm⟩,
99
+ by simp [outer_measure.empty]; exact @supr_const _ _ _ _ ⟨this ⟩,
100
+ mono := assume s₁ s₂ hs, supr_le_supr $ assume ⟨m, hm⟩, m.mono hs,
101
+ Union_nat := assume f, supr_le $ assume m,
102
+ calc m.val.measure_of (⋃i, f i) ≤ (∑ (i : ℕ), m.val.measure_of (f i)) : m.val.Union_nat _
103
+ ... ≤ (∑i, ⨆m:ms, m.val.measure_of (f i)) :
104
+ ennreal.tsum_le_tsum $ assume i, le_supr (λm:ms, m.val.measure_of (f i)) m }
105
+
106
+ instance : has_Sup (outer_measure α) := ⟨λs, if h : s = ∅ then ⊥ else sup s h⟩
107
+
108
+ private lemma le_Sup (hm : m ∈ ms) : m ≤ Sup ms :=
109
+ show m ≤ (if h : ms = ∅ then ⊥ else sup ms h),
110
+ by rw [dif_neg (set.ne_empty_of_mem hm)];
111
+ exact assume s, le_supr (λm:ms, m.val.measure_of s) ⟨m, hm⟩
112
+
113
+ private lemma Sup_le (hm : ∀m' ∈ ms, m' ≤ m) : Sup ms ≤ m :=
114
+ show (if h : ms = ∅ then ⊥ else sup ms h) ≤ m,
115
+ begin
116
+ by_cases ms = ∅,
117
+ { rw [dif_pos h], exact bot_le },
118
+ { rw [dif_neg h], exact assume s, (supr_le $ assume ⟨m', h'⟩, (hm m' h') s) }
51
119
end
52
120
121
+ instance : has_Inf (outer_measure α) := ⟨λs, Sup {m | ∀m'∈s, m ≤ m'}⟩
122
+ private lemma Inf_le (hm : m ∈ ms) : Inf ms ≤ m := Sup_le $ assume m' h', h' _ hm
123
+ private lemma le_Inf (hm : ∀m' ∈ ms, m ≤ m') : m ≤ Inf ms := le_Sup hm
124
+
125
+ instance : complete_lattice (outer_measure α) :=
126
+ { top := Sup univ,
127
+ le_top := assume a, le_Sup (mem_univ a),
128
+ Sup := Sup,
129
+ Sup_le := assume s m, Sup_le,
130
+ le_Sup := assume s m, le_Sup,
131
+ Inf := Inf,
132
+ Inf_le := assume s m, Inf_le,
133
+ le_Inf := assume s m, le_Inf,
134
+ sup := λa b, Sup {a, b},
135
+ le_sup_left := assume a b, le_Sup $ by simp,
136
+ le_sup_right := assume a b, le_Sup $ by simp,
137
+ sup_le := assume a b c ha hb, Sup_le $ by simp [or_imp_distrib, ha, hb] {contextual:=tt},
138
+ inf := λa b, Inf {a, b},
139
+ inf_le_left := assume a b, Inf_le $ by simp,
140
+ inf_le_right := assume a b, Inf_le $ by simp,
141
+ le_inf := assume a b c ha hb, le_Inf $ by simp [or_imp_distrib, ha, hb] {contextual:=tt},
142
+ .. outer_measure.order_bot }
143
+
144
+ end supremum
145
+
146
+ end basic
147
+
53
148
section of_function
54
149
set_option eqn_compiler.zeta true
55
150
@@ -212,7 +307,7 @@ suffices μ t ≥ μ (t ∩ (⋃i, s i)) + μ (t \ (⋃i, s i)),
212
307
this ,
213
308
have hp : μ (t ∩ ⋃i, s i) ≤ (⨆n, μ (t ∩ ⋃i<n, s i)),
214
309
from calc μ (t ∩ ⋃i, s i) = μ (⋃i, t ∩ s i) : by rw [inter_distrib_Union_left]
215
- ... ≤ ∑i, μ (t ∩ s i) : @outer_measure .Union_nat α m _
310
+ ... ≤ ∑i, μ (t ∩ s i) : m .Union_nat _
216
311
... = ⨆n, (finset.range n).sum (λi, μ (t ∩ s i)) : ennreal.tsum_eq_supr_nat
217
312
... = ⨆n, μ (t ∩ ⋃i<n, s i) : congr_arg _ $ funext $ assume n, C_sum h hd,
218
313
have hn : ∀n, μ (t \ (⋃i<n, s i)) ≥ μ (t \ (⋃i, s i)),
@@ -236,7 +331,7 @@ have ∀n, (finset.range n).sum (λ (i : ℕ), μ (s i)) ≤ μ (⋃ (i : ℕ),
236
331
by rw [C_sum _ h hd, univ_inter]
237
332
... ≤ μ (⋃ (i : ℕ), s i) : m.mono $ bUnion_subset $ assume i _, le_supr s i,
238
333
suffices μ (⋃i, s i) ≥ ∑i, μ (s i),
239
- from le_antisymm (@outer_measure .Union_nat α m s) this ,
334
+ from le_antisymm (m .Union_nat s) this ,
240
335
calc (∑i, μ (s i)) = (⨆n, (finset.range n).sum (λi, μ (s i))) : ennreal.tsum_eq_supr_nat
241
336
... ≤ _ : supr_le this
242
337
0 commit comments