author | wenzelm |
Thu, 25 Jun 2015 23:33:47 +0200 | |
changeset 60580 | 7e741e22d7fc |
parent 60172 | 423273355b55 |
child 60585 | 48fdff264eb2 |
permissions | -rw-r--r-- |
47694 | 1 |
(* Title: HOL/Probability/Measure_Space.thy |
2 |
Author: Lawrence C Paulson |
|
3 |
Author: Johannes Hölzl, TU München |
|
4 |
Author: Armin Heller, TU München |
|
5 |
*) |
|
6 |
||
58876 | 7 |
section {* Measure spaces and their properties *} |
47694 | 8 |
|
9 |
theory Measure_Space |
|
10 |
imports |
|
59593 | 11 |
Measurable "~~/src/HOL/Multivariate_Analysis/Multivariate_Analysis" |
47694 | 12 |
begin |
13 |
||
50104 | 14 |
subsection "Relate extended reals and the indicator function" |
15 |
||
47694 | 16 |
lemma suminf_cmult_indicator: |
17 |
fixes f :: "nat \<Rightarrow> ereal" |
|
18 |
assumes "disjoint_family A" "x \<in> A i" "\<And>i. 0 \<le> f i" |
|
19 |
shows "(\<Sum>n. f n * indicator (A n) x) = f i" |
|
20 |
proof - |
|
21 |
have **: "\<And>n. f n * indicator (A n) x = (if n = i then f n else 0 :: ereal)" |
|
22 |
using `x \<in> A i` assms unfolding disjoint_family_on_def indicator_def by auto |
|
23 |
then have "\<And>n. (\<Sum>j<n. f j * indicator (A j) x) = (if i < n then f i else 0 :: ereal)" |
|
57418 | 24 |
by (auto simp: setsum.If_cases) |
47694 | 25 |
moreover have "(SUP n. if i < n then f i else 0) = (f i :: ereal)" |
51000 | 26 |
proof (rule SUP_eqI) |
47694 | 27 |
fix y :: ereal assume "\<And>n. n \<in> UNIV \<Longrightarrow> (if i < n then f i else 0) \<le> y" |
28 |
from this[of "Suc i"] show "f i \<le> y" by auto |
|
29 |
qed (insert assms, simp) |
|
30 |
ultimately show ?thesis using assms |
|
56212
3253aaf73a01
consolidated theorem names containing INFI and SUPR: have INF and SUP instead uniformly
haftmann
parents:
56193
diff
changeset
|
31 |
by (subst suminf_ereal_eq_SUP) (auto simp: indicator_def) |
47694 | 32 |
qed |
33 |
||
34 |
lemma suminf_indicator: |
|
35 |
assumes "disjoint_family A" |
|
36 |
shows "(\<Sum>n. indicator (A n) x :: ereal) = indicator (\<Union>i. A i) x" |
|
37 |
proof cases |
|
38 |
assume *: "x \<in> (\<Union>i. A i)" |
|
39 |
then obtain i where "x \<in> A i" by auto |
|
40 |
from suminf_cmult_indicator[OF assms(1), OF `x \<in> A i`, of "\<lambda>k. 1"] |
|
41 |
show ?thesis using * by simp |
|
42 |
qed simp |
|
43 |
||
44 |
text {* |
|
45 |
The type for emeasure spaces is already defined in @{theory Sigma_Algebra}, as it is also used to |
|
46 |
represent sigma algebras (with an arbitrary emeasure). |
|
47 |
*} |
|
48 |
||
56994 | 49 |
subsection "Extend binary sets" |
47694 | 50 |
|
51 |
lemma LIMSEQ_binaryset: |
|
52 |
assumes f: "f {} = 0" |
|
53 |
shows "(\<lambda>n. \<Sum>i<n. f (binaryset A B i)) ----> f A + f B" |
|
54 |
proof - |
|
55 |
have "(\<lambda>n. \<Sum>i < Suc (Suc n). f (binaryset A B i)) = (\<lambda>n. f A + f B)" |
|
56 |
proof |
|
57 |
fix n |
|
58 |
show "(\<Sum>i < Suc (Suc n). f (binaryset A B i)) = f A + f B" |
|
59 |
by (induct n) (auto simp add: binaryset_def f) |
|
60 |
qed |
|
61 |
moreover |
|
62 |
have "... ----> f A + f B" by (rule tendsto_const) |
|
63 |
ultimately |
|
64 |
have "(\<lambda>n. \<Sum>i< Suc (Suc n). f (binaryset A B i)) ----> f A + f B" |
|
65 |
by metis |
|
66 |
hence "(\<lambda>n. \<Sum>i< n+2. f (binaryset A B i)) ----> f A + f B" |
|
67 |
by simp |
|
68 |
thus ?thesis by (rule LIMSEQ_offset [where k=2]) |
|
69 |
qed |
|
70 |
||
71 |
lemma binaryset_sums: |
|
72 |
assumes f: "f {} = 0" |
|
73 |
shows "(\<lambda>n. f (binaryset A B n)) sums (f A + f B)" |
|
74 |
by (simp add: sums_def LIMSEQ_binaryset [where f=f, OF f] atLeast0LessThan) |
|
75 |
||
76 |
lemma suminf_binaryset_eq: |
|
77 |
fixes f :: "'a set \<Rightarrow> 'b::{comm_monoid_add, t2_space}" |
|
78 |
shows "f {} = 0 \<Longrightarrow> (\<Sum>n. f (binaryset A B n)) = f A + f B" |
|
79 |
by (metis binaryset_sums sums_unique) |
|
80 |
||
56994 | 81 |
subsection {* Properties of a premeasure @{term \<mu>} *} |
47694 | 82 |
|
83 |
text {* |
|
84 |
The definitions for @{const positive} and @{const countably_additive} should be here, by they are |
|
85 |
necessary to define @{typ "'a measure"} in @{theory Sigma_Algebra}. |
|
86 |
*} |
|
87 |
||
88 |
definition additive where |
|
89 |
"additive M \<mu> \<longleftrightarrow> (\<forall>x\<in>M. \<forall>y\<in>M. x \<inter> y = {} \<longrightarrow> \<mu> (x \<union> y) = \<mu> x + \<mu> y)" |
|
90 |
||
91 |
definition increasing where |
|
92 |
"increasing M \<mu> \<longleftrightarrow> (\<forall>x\<in>M. \<forall>y\<in>M. x \<subseteq> y \<longrightarrow> \<mu> x \<le> \<mu> y)" |
|
93 |
||
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
94 |
lemma positiveD1: "positive M f \<Longrightarrow> f {} = 0" by (auto simp: positive_def) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
95 |
lemma positiveD2: "positive M f \<Longrightarrow> A \<in> M \<Longrightarrow> 0 \<le> f A" by (auto simp: positive_def) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
96 |
|
47694 | 97 |
lemma positiveD_empty: |
98 |
"positive M f \<Longrightarrow> f {} = 0" |
|
99 |
by (auto simp add: positive_def) |
|
100 |
||
101 |
lemma additiveD: |
|
102 |
"additive M f \<Longrightarrow> x \<inter> y = {} \<Longrightarrow> x \<in> M \<Longrightarrow> y \<in> M \<Longrightarrow> f (x \<union> y) = f x + f y" |
|
103 |
by (auto simp add: additive_def) |
|
104 |
||
105 |
lemma increasingD: |
|
106 |
"increasing M f \<Longrightarrow> x \<subseteq> y \<Longrightarrow> x\<in>M \<Longrightarrow> y\<in>M \<Longrightarrow> f x \<le> f y" |
|
107 |
by (auto simp add: increasing_def) |
|
108 |
||
50104 | 109 |
lemma countably_additiveI[case_names countably]: |
47694 | 110 |
"(\<And>A. range A \<subseteq> M \<Longrightarrow> disjoint_family A \<Longrightarrow> (\<Union>i. A i) \<in> M \<Longrightarrow> (\<Sum>i. f (A i)) = f (\<Union>i. A i)) |
111 |
\<Longrightarrow> countably_additive M f" |
|
112 |
by (simp add: countably_additive_def) |
|
113 |
||
114 |
lemma (in ring_of_sets) disjointed_additive: |
|
115 |
assumes f: "positive M f" "additive M f" and A: "range A \<subseteq> M" "incseq A" |
|
116 |
shows "(\<Sum>i\<le>n. f (disjointed A i)) = f (A n)" |
|
117 |
proof (induct n) |
|
118 |
case (Suc n) |
|
119 |
then have "(\<Sum>i\<le>Suc n. f (disjointed A i)) = f (A n) + f (disjointed A (Suc n))" |
|
120 |
by simp |
|
121 |
also have "\<dots> = f (A n \<union> disjointed A (Suc n))" |
|
122 |
using A by (subst f(2)[THEN additiveD]) (auto simp: disjointed_incseq) |
|
123 |
also have "A n \<union> disjointed A (Suc n) = A (Suc n)" |
|
124 |
using `incseq A` by (auto dest: incseq_SucD simp: disjointed_incseq) |
|
125 |
finally show ?case . |
|
126 |
qed simp |
|
127 |
||
128 |
lemma (in ring_of_sets) additive_sum: |
|
129 |
fixes A:: "'i \<Rightarrow> 'a set" |
|
130 |
assumes f: "positive M f" and ad: "additive M f" and "finite S" |
|
131 |
and A: "A`S \<subseteq> M" |
|
132 |
and disj: "disjoint_family_on A S" |
|
133 |
shows "(\<Sum>i\<in>S. f (A i)) = f (\<Union>i\<in>S. A i)" |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
134 |
using `finite S` disj A |
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
135 |
proof induct |
47694 | 136 |
case empty show ?case using f by (simp add: positive_def) |
137 |
next |
|
138 |
case (insert s S) |
|
139 |
then have "A s \<inter> (\<Union>i\<in>S. A i) = {}" |
|
140 |
by (auto simp add: disjoint_family_on_def neq_iff) |
|
141 |
moreover |
|
142 |
have "A s \<in> M" using insert by blast |
|
143 |
moreover have "(\<Union>i\<in>S. A i) \<in> M" |
|
144 |
using insert `finite S` by auto |
|
145 |
ultimately have "f (A s \<union> (\<Union>i\<in>S. A i)) = f (A s) + f(\<Union>i\<in>S. A i)" |
|
146 |
using ad UNION_in_sets A by (auto simp add: additive_def) |
|
147 |
with insert show ?case using ad disjoint_family_on_mono[of S "insert s S" A] |
|
148 |
by (auto simp add: additive_def subset_insertI) |
|
149 |
qed |
|
150 |
||
151 |
lemma (in ring_of_sets) additive_increasing: |
|
152 |
assumes posf: "positive M f" and addf: "additive M f" |
|
153 |
shows "increasing M f" |
|
154 |
proof (auto simp add: increasing_def) |
|
155 |
fix x y |
|
156 |
assume xy: "x \<in> M" "y \<in> M" "x \<subseteq> y" |
|
157 |
then have "y - x \<in> M" by auto |
|
158 |
then have "0 \<le> f (y-x)" using posf[unfolded positive_def] by auto |
|
159 |
then have "f x + 0 \<le> f x + f (y-x)" by (intro add_left_mono) auto |
|
160 |
also have "... = f (x \<union> (y-x))" using addf |
|
161 |
by (auto simp add: additive_def) (metis Diff_disjoint Un_Diff_cancel Diff xy(1,2)) |
|
162 |
also have "... = f y" |
|
163 |
by (metis Un_Diff_cancel Un_absorb1 xy(3)) |
|
164 |
finally show "f x \<le> f y" by simp |
|
165 |
qed |
|
166 |
||
50087 | 167 |
lemma (in ring_of_sets) subadditive: |
168 |
assumes f: "positive M f" "additive M f" and A: "range A \<subseteq> M" and S: "finite S" |
|
169 |
shows "f (\<Union>i\<in>S. A i) \<le> (\<Sum>i\<in>S. f (A i))" |
|
170 |
using S |
|
171 |
proof (induct S) |
|
172 |
case empty thus ?case using f by (auto simp: positive_def) |
|
173 |
next |
|
174 |
case (insert x F) |
|
175 |
hence in_M: "A x \<in> M" "(\<Union> i\<in>F. A i) \<in> M" "(\<Union> i\<in>F. A i) - A x \<in> M" using A by force+ |
|
176 |
have subs: "(\<Union> i\<in>F. A i) - A x \<subseteq> (\<Union> i\<in>F. A i)" by auto |
|
177 |
have "(\<Union> i\<in>(insert x F). A i) = A x \<union> ((\<Union> i\<in>F. A i) - A x)" by auto |
|
178 |
hence "f (\<Union> i\<in>(insert x F). A i) = f (A x \<union> ((\<Union> i\<in>F. A i) - A x))" |
|
179 |
by simp |
|
180 |
also have "\<dots> = f (A x) + f ((\<Union> i\<in>F. A i) - A x)" |
|
181 |
using f(2) by (rule additiveD) (insert in_M, auto) |
|
182 |
also have "\<dots> \<le> f (A x) + f (\<Union> i\<in>F. A i)" |
|
183 |
using additive_increasing[OF f] in_M subs by (auto simp: increasing_def intro: add_left_mono) |
|
184 |
also have "\<dots> \<le> f (A x) + (\<Sum>i\<in>F. f (A i))" using insert by (auto intro: add_left_mono) |
|
185 |
finally show "f (\<Union> i\<in>(insert x F). A i) \<le> (\<Sum>i\<in>(insert x F). f (A i))" using insert by simp |
|
186 |
qed |
|
187 |
||
47694 | 188 |
lemma (in ring_of_sets) countably_additive_additive: |
189 |
assumes posf: "positive M f" and ca: "countably_additive M f" |
|
190 |
shows "additive M f" |
|
191 |
proof (auto simp add: additive_def) |
|
192 |
fix x y |
|
193 |
assume x: "x \<in> M" and y: "y \<in> M" and "x \<inter> y = {}" |
|
194 |
hence "disjoint_family (binaryset x y)" |
|
195 |
by (auto simp add: disjoint_family_on_def binaryset_def) |
|
196 |
hence "range (binaryset x y) \<subseteq> M \<longrightarrow> |
|
197 |
(\<Union>i. binaryset x y i) \<in> M \<longrightarrow> |
|
198 |
f (\<Union>i. binaryset x y i) = (\<Sum> n. f (binaryset x y n))" |
|
199 |
using ca |
|
200 |
by (simp add: countably_additive_def) |
|
201 |
hence "{x,y,{}} \<subseteq> M \<longrightarrow> x \<union> y \<in> M \<longrightarrow> |
|
202 |
f (x \<union> y) = (\<Sum>n. f (binaryset x y n))" |
|
203 |
by (simp add: range_binaryset_eq UN_binaryset_eq) |
|
204 |
thus "f (x \<union> y) = f x + f y" using posf x y |
|
205 |
by (auto simp add: Un suminf_binaryset_eq positive_def) |
|
206 |
qed |
|
207 |
||
208 |
lemma (in algebra) increasing_additive_bound: |
|
209 |
fixes A:: "nat \<Rightarrow> 'a set" and f :: "'a set \<Rightarrow> ereal" |
|
210 |
assumes f: "positive M f" and ad: "additive M f" |
|
211 |
and inc: "increasing M f" |
|
212 |
and A: "range A \<subseteq> M" |
|
213 |
and disj: "disjoint_family A" |
|
214 |
shows "(\<Sum>i. f (A i)) \<le> f \<Omega>" |
|
215 |
proof (safe intro!: suminf_bound) |
|
216 |
fix N |
|
217 |
note disj_N = disjoint_family_on_mono[OF _ disj, of "{..<N}"] |
|
218 |
have "(\<Sum>i<N. f (A i)) = f (\<Union>i\<in>{..<N}. A i)" |
|
219 |
using A by (intro additive_sum [OF f ad _ _]) (auto simp: disj_N) |
|
220 |
also have "... \<le> f \<Omega>" using space_closed A |
|
221 |
by (intro increasingD[OF inc] finite_UN) auto |
|
222 |
finally show "(\<Sum>i<N. f (A i)) \<le> f \<Omega>" by simp |
|
223 |
qed (insert f A, auto simp: positive_def) |
|
224 |
||
225 |
lemma (in ring_of_sets) countably_additiveI_finite: |
|
226 |
assumes "finite \<Omega>" "positive M \<mu>" "additive M \<mu>" |
|
227 |
shows "countably_additive M \<mu>" |
|
228 |
proof (rule countably_additiveI) |
|
229 |
fix F :: "nat \<Rightarrow> 'a set" assume F: "range F \<subseteq> M" "(\<Union>i. F i) \<in> M" and disj: "disjoint_family F" |
|
230 |
||
231 |
have "\<forall>i\<in>{i. F i \<noteq> {}}. \<exists>x. x \<in> F i" by auto |
|
232 |
from bchoice[OF this] obtain f where f: "\<And>i. F i \<noteq> {} \<Longrightarrow> f i \<in> F i" by auto |
|
233 |
||
234 |
have inj_f: "inj_on f {i. F i \<noteq> {}}" |
|
235 |
proof (rule inj_onI, simp) |
|
236 |
fix i j a b assume *: "f i = f j" "F i \<noteq> {}" "F j \<noteq> {}" |
|
237 |
then have "f i \<in> F i" "f j \<in> F j" using f by force+ |
|
238 |
with disj * show "i = j" by (auto simp: disjoint_family_on_def) |
|
239 |
qed |
|
240 |
have "finite (\<Union>i. F i)" |
|
241 |
by (metis F(2) assms(1) infinite_super sets_into_space) |
|
242 |
||
243 |
have F_subset: "{i. \<mu> (F i) \<noteq> 0} \<subseteq> {i. F i \<noteq> {}}" |
|
244 |
by (auto simp: positiveD_empty[OF `positive M \<mu>`]) |
|
245 |
moreover have fin_not_empty: "finite {i. F i \<noteq> {}}" |
|
246 |
proof (rule finite_imageD) |
|
247 |
from f have "f`{i. F i \<noteq> {}} \<subseteq> (\<Union>i. F i)" by auto |
|
248 |
then show "finite (f`{i. F i \<noteq> {}})" |
|
249 |
by (rule finite_subset) fact |
|
250 |
qed fact |
|
251 |
ultimately have fin_not_0: "finite {i. \<mu> (F i) \<noteq> 0}" |
|
252 |
by (rule finite_subset) |
|
253 |
||
254 |
have disj_not_empty: "disjoint_family_on F {i. F i \<noteq> {}}" |
|
255 |
using disj by (auto simp: disjoint_family_on_def) |
|
256 |
||
257 |
from fin_not_0 have "(\<Sum>i. \<mu> (F i)) = (\<Sum>i | \<mu> (F i) \<noteq> 0. \<mu> (F i))" |
|
47761 | 258 |
by (rule suminf_finite) auto |
47694 | 259 |
also have "\<dots> = (\<Sum>i | F i \<noteq> {}. \<mu> (F i))" |
57418 | 260 |
using fin_not_empty F_subset by (rule setsum.mono_neutral_left) auto |
47694 | 261 |
also have "\<dots> = \<mu> (\<Union>i\<in>{i. F i \<noteq> {}}. F i)" |
262 |
using `positive M \<mu>` `additive M \<mu>` fin_not_empty disj_not_empty F by (intro additive_sum) auto |
|
263 |
also have "\<dots> = \<mu> (\<Union>i. F i)" |
|
264 |
by (rule arg_cong[where f=\<mu>]) auto |
|
265 |
finally show "(\<Sum>i. \<mu> (F i)) = \<mu> (\<Union>i. F i)" . |
|
266 |
qed |
|
267 |
||
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
268 |
lemma (in ring_of_sets) countably_additive_iff_continuous_from_below: |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
269 |
assumes f: "positive M f" "additive M f" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
270 |
shows "countably_additive M f \<longleftrightarrow> |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
271 |
(\<forall>A. range A \<subseteq> M \<longrightarrow> incseq A \<longrightarrow> (\<Union>i. A i) \<in> M \<longrightarrow> (\<lambda>i. f (A i)) ----> f (\<Union>i. A i))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
272 |
unfolding countably_additive_def |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
273 |
proof safe |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
274 |
assume count_sum: "\<forall>A. range A \<subseteq> M \<longrightarrow> disjoint_family A \<longrightarrow> UNION UNIV A \<in> M \<longrightarrow> (\<Sum>i. f (A i)) = f (UNION UNIV A)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
275 |
fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> M" "incseq A" "(\<Union>i. A i) \<in> M" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
276 |
then have dA: "range (disjointed A) \<subseteq> M" by (auto simp: range_disjointed_sets) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
277 |
with count_sum[THEN spec, of "disjointed A"] A(3) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
278 |
have f_UN: "(\<Sum>i. f (disjointed A i)) = f (\<Union>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
279 |
by (auto simp: UN_disjointed_eq disjoint_family_disjointed) |
56193
c726ecfb22b6
cleanup Series: sorted according to typeclass hierarchy, use {..<_} instead of {0..<_}
hoelzl
parents:
56154
diff
changeset
|
280 |
moreover have "(\<lambda>n. (\<Sum>i<n. f (disjointed A i))) ----> (\<Sum>i. f (disjointed A i))" |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
281 |
using f(1)[unfolded positive_def] dA |
56193
c726ecfb22b6
cleanup Series: sorted according to typeclass hierarchy, use {..<_} instead of {0..<_}
hoelzl
parents:
56154
diff
changeset
|
282 |
by (auto intro!: summable_LIMSEQ summable_ereal_pos) |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
283 |
from LIMSEQ_Suc[OF this] |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
284 |
have "(\<lambda>n. (\<Sum>i\<le>n. f (disjointed A i))) ----> (\<Sum>i. f (disjointed A i))" |
56193
c726ecfb22b6
cleanup Series: sorted according to typeclass hierarchy, use {..<_} instead of {0..<_}
hoelzl
parents:
56154
diff
changeset
|
285 |
unfolding lessThan_Suc_atMost . |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
286 |
moreover have "\<And>n. (\<Sum>i\<le>n. f (disjointed A i)) = f (A n)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
287 |
using disjointed_additive[OF f A(1,2)] . |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
288 |
ultimately show "(\<lambda>i. f (A i)) ----> f (\<Union>i. A i)" by simp |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
289 |
next |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
290 |
assume cont: "\<forall>A. range A \<subseteq> M \<longrightarrow> incseq A \<longrightarrow> (\<Union>i. A i) \<in> M \<longrightarrow> (\<lambda>i. f (A i)) ----> f (\<Union>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
291 |
fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> M" "disjoint_family A" "(\<Union>i. A i) \<in> M" |
57446
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
292 |
have *: "(\<Union>n. (\<Union>i<n. A i)) = (\<Union>i. A i)" by auto |
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
293 |
have "(\<lambda>n. f (\<Union>i<n. A i)) ----> f (\<Union>i. A i)" |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
294 |
proof (unfold *[symmetric], intro cont[rule_format]) |
57446
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
295 |
show "range (\<lambda>i. \<Union> i<i. A i) \<subseteq> M" "(\<Union>i. \<Union> i<i. A i) \<in> M" |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
296 |
using A * by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
297 |
qed (force intro!: incseq_SucI) |
57446
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
298 |
moreover have "\<And>n. f (\<Union>i<n. A i) = (\<Sum>i<n. f (A i))" |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
299 |
using A |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
300 |
by (intro additive_sum[OF f, of _ A, symmetric]) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
301 |
(auto intro: disjoint_family_on_mono[where B=UNIV]) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
302 |
ultimately |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
303 |
have "(\<lambda>i. f (A i)) sums f (\<Union>i. A i)" |
57446
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
304 |
unfolding sums_def by simp |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
305 |
from sums_unique[OF this] |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
306 |
show "(\<Sum>i. f (A i)) = f (\<Union>i. A i)" by simp |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
307 |
qed |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
308 |
|
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
309 |
lemma (in ring_of_sets) continuous_from_above_iff_empty_continuous: |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
310 |
assumes f: "positive M f" "additive M f" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
311 |
shows "(\<forall>A. range A \<subseteq> M \<longrightarrow> decseq A \<longrightarrow> (\<Inter>i. A i) \<in> M \<longrightarrow> (\<forall>i. f (A i) \<noteq> \<infinity>) \<longrightarrow> (\<lambda>i. f (A i)) ----> f (\<Inter>i. A i)) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
312 |
\<longleftrightarrow> (\<forall>A. range A \<subseteq> M \<longrightarrow> decseq A \<longrightarrow> (\<Inter>i. A i) = {} \<longrightarrow> (\<forall>i. f (A i) \<noteq> \<infinity>) \<longrightarrow> (\<lambda>i. f (A i)) ----> 0)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
313 |
proof safe |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
314 |
assume cont: "(\<forall>A. range A \<subseteq> M \<longrightarrow> decseq A \<longrightarrow> (\<Inter>i. A i) \<in> M \<longrightarrow> (\<forall>i. f (A i) \<noteq> \<infinity>) \<longrightarrow> (\<lambda>i. f (A i)) ----> f (\<Inter>i. A i))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
315 |
fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> M" "decseq A" "(\<Inter>i. A i) = {}" "\<forall>i. f (A i) \<noteq> \<infinity>" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
316 |
with cont[THEN spec, of A] show "(\<lambda>i. f (A i)) ----> 0" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
317 |
using `positive M f`[unfolded positive_def] by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
318 |
next |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
319 |
assume cont: "\<forall>A. range A \<subseteq> M \<longrightarrow> decseq A \<longrightarrow> (\<Inter>i. A i) = {} \<longrightarrow> (\<forall>i. f (A i) \<noteq> \<infinity>) \<longrightarrow> (\<lambda>i. f (A i)) ----> 0" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
320 |
fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> M" "decseq A" "(\<Inter>i. A i) \<in> M" "\<forall>i. f (A i) \<noteq> \<infinity>" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
321 |
|
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
322 |
have f_mono: "\<And>a b. a \<in> M \<Longrightarrow> b \<in> M \<Longrightarrow> a \<subseteq> b \<Longrightarrow> f a \<le> f b" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
323 |
using additive_increasing[OF f] unfolding increasing_def by simp |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
324 |
|
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
325 |
have decseq_fA: "decseq (\<lambda>i. f (A i))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
326 |
using A by (auto simp: decseq_def intro!: f_mono) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
327 |
have decseq: "decseq (\<lambda>i. A i - (\<Inter>i. A i))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
328 |
using A by (auto simp: decseq_def) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
329 |
then have decseq_f: "decseq (\<lambda>i. f (A i - (\<Inter>i. A i)))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
330 |
using A unfolding decseq_def by (auto intro!: f_mono Diff) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
331 |
have "f (\<Inter>x. A x) \<le> f (A 0)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
332 |
using A by (auto intro!: f_mono) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
333 |
then have f_Int_fin: "f (\<Inter>x. A x) \<noteq> \<infinity>" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
334 |
using A by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
335 |
{ fix i |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
336 |
have "f (A i - (\<Inter>i. A i)) \<le> f (A i)" using A by (auto intro!: f_mono) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
337 |
then have "f (A i - (\<Inter>i. A i)) \<noteq> \<infinity>" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
338 |
using A by auto } |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
339 |
note f_fin = this |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
340 |
have "(\<lambda>i. f (A i - (\<Inter>i. A i))) ----> 0" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
341 |
proof (intro cont[rule_format, OF _ decseq _ f_fin]) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
342 |
show "range (\<lambda>i. A i - (\<Inter>i. A i)) \<subseteq> M" "(\<Inter>i. A i - (\<Inter>i. A i)) = {}" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
343 |
using A by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
344 |
qed |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
345 |
from INF_Lim_ereal[OF decseq_f this] |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
346 |
have "(INF n. f (A n - (\<Inter>i. A i))) = 0" . |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
347 |
moreover have "(INF n. f (\<Inter>i. A i)) = f (\<Inter>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
348 |
by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
349 |
ultimately have "(INF n. f (A n - (\<Inter>i. A i)) + f (\<Inter>i. A i)) = 0 + f (\<Inter>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
350 |
using A(4) f_fin f_Int_fin |
56212
3253aaf73a01
consolidated theorem names containing INFI and SUPR: have INF and SUP instead uniformly
haftmann
parents:
56193
diff
changeset
|
351 |
by (subst INF_ereal_add) (auto simp: decseq_f) |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
352 |
moreover { |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
353 |
fix n |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
354 |
have "f (A n - (\<Inter>i. A i)) + f (\<Inter>i. A i) = f ((A n - (\<Inter>i. A i)) \<union> (\<Inter>i. A i))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
355 |
using A by (subst f(2)[THEN additiveD]) auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
356 |
also have "(A n - (\<Inter>i. A i)) \<union> (\<Inter>i. A i) = A n" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
357 |
by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
358 |
finally have "f (A n - (\<Inter>i. A i)) + f (\<Inter>i. A i) = f (A n)" . } |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
359 |
ultimately have "(INF n. f (A n)) = f (\<Inter>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
360 |
by simp |
51351 | 361 |
with LIMSEQ_INF[OF decseq_fA] |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
362 |
show "(\<lambda>i. f (A i)) ----> f (\<Inter>i. A i)" by simp |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
363 |
qed |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
364 |
|
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
365 |
lemma (in ring_of_sets) empty_continuous_imp_continuous_from_below: |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
366 |
assumes f: "positive M f" "additive M f" "\<forall>A\<in>M. f A \<noteq> \<infinity>" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
367 |
assumes cont: "\<forall>A. range A \<subseteq> M \<longrightarrow> decseq A \<longrightarrow> (\<Inter>i. A i) = {} \<longrightarrow> (\<lambda>i. f (A i)) ----> 0" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
368 |
assumes A: "range A \<subseteq> M" "incseq A" "(\<Union>i. A i) \<in> M" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
369 |
shows "(\<lambda>i. f (A i)) ----> f (\<Union>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
370 |
proof - |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
371 |
have "\<forall>A\<in>M. \<exists>x. f A = ereal x" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
372 |
proof |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
373 |
fix A assume "A \<in> M" with f show "\<exists>x. f A = ereal x" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
374 |
unfolding positive_def by (cases "f A") auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
375 |
qed |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
376 |
from bchoice[OF this] guess f' .. note f' = this[rule_format] |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
377 |
from A have "(\<lambda>i. f ((\<Union>i. A i) - A i)) ----> 0" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
378 |
by (intro cont[rule_format]) (auto simp: decseq_def incseq_def) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
379 |
moreover |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
380 |
{ fix i |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
381 |
have "f ((\<Union>i. A i) - A i) + f (A i) = f ((\<Union>i. A i) - A i \<union> A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
382 |
using A by (intro f(2)[THEN additiveD, symmetric]) auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
383 |
also have "(\<Union>i. A i) - A i \<union> A i = (\<Union>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
384 |
by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
385 |
finally have "f' (\<Union>i. A i) - f' (A i) = f' ((\<Union>i. A i) - A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
386 |
using A by (subst (asm) (1 2 3) f') auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
387 |
then have "f ((\<Union>i. A i) - A i) = ereal (f' (\<Union>i. A i) - f' (A i))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
388 |
using A f' by auto } |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
389 |
ultimately have "(\<lambda>i. f' (\<Union>i. A i) - f' (A i)) ----> 0" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
390 |
by (simp add: zero_ereal_def) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
391 |
then have "(\<lambda>i. f' (A i)) ----> f' (\<Union>i. A i)" |
60142 | 392 |
by (rule Lim_transform2[OF tendsto_const]) |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
393 |
then show "(\<lambda>i. f (A i)) ----> f (\<Union>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
394 |
using A by (subst (1 2) f') auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
395 |
qed |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
396 |
|
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
397 |
lemma (in ring_of_sets) empty_continuous_imp_countably_additive: |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
398 |
assumes f: "positive M f" "additive M f" and fin: "\<forall>A\<in>M. f A \<noteq> \<infinity>" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
399 |
assumes cont: "\<And>A. range A \<subseteq> M \<Longrightarrow> decseq A \<Longrightarrow> (\<Inter>i. A i) = {} \<Longrightarrow> (\<lambda>i. f (A i)) ----> 0" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
400 |
shows "countably_additive M f" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
401 |
using countably_additive_iff_continuous_from_below[OF f] |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
402 |
using empty_continuous_imp_continuous_from_below[OF f fin] cont |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
403 |
by blast |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
404 |
|
56994 | 405 |
subsection {* Properties of @{const emeasure} *} |
47694 | 406 |
|
407 |
lemma emeasure_positive: "positive (sets M) (emeasure M)" |
|
408 |
by (cases M) (auto simp: sets_def emeasure_def Abs_measure_inverse measure_space_def) |
|
409 |
||
410 |
lemma emeasure_empty[simp, intro]: "emeasure M {} = 0" |
|
411 |
using emeasure_positive[of M] by (simp add: positive_def) |
|
412 |
||
413 |
lemma emeasure_nonneg[intro!]: "0 \<le> emeasure M A" |
|
414 |
using emeasure_notin_sets[of A M] emeasure_positive[of M] |
|
415 |
by (cases "A \<in> sets M") (auto simp: positive_def) |
|
416 |
||
417 |
lemma emeasure_not_MInf[simp]: "emeasure M A \<noteq> - \<infinity>" |
|
418 |
using emeasure_nonneg[of M A] by auto |
|
50419 | 419 |
|
420 |
lemma emeasure_le_0_iff: "emeasure M A \<le> 0 \<longleftrightarrow> emeasure M A = 0" |
|
421 |
using emeasure_nonneg[of M A] by auto |
|
422 |
||
423 |
lemma emeasure_less_0_iff: "emeasure M A < 0 \<longleftrightarrow> False" |
|
424 |
using emeasure_nonneg[of M A] by auto |
|
59000 | 425 |
|
426 |
lemma emeasure_single_in_space: "emeasure M {x} \<noteq> 0 \<Longrightarrow> x \<in> space M" |
|
427 |
using emeasure_notin_sets[of "{x}" M] by (auto dest: sets.sets_into_space) |
|
428 |
||
47694 | 429 |
lemma emeasure_countably_additive: "countably_additive (sets M) (emeasure M)" |
430 |
by (cases M) (auto simp: sets_def emeasure_def Abs_measure_inverse measure_space_def) |
|
431 |
||
432 |
lemma suminf_emeasure: |
|
433 |
"range A \<subseteq> sets M \<Longrightarrow> disjoint_family A \<Longrightarrow> (\<Sum>i. emeasure M (A i)) = emeasure M (\<Union>i. A i)" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
434 |
using sets.countable_UN[of A UNIV M] emeasure_countably_additive[of M] |
47694 | 435 |
by (simp add: countably_additive_def) |
436 |
||
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
437 |
lemma sums_emeasure: |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
438 |
"disjoint_family F \<Longrightarrow> (\<And>i. F i \<in> sets M) \<Longrightarrow> (\<lambda>i. emeasure M (F i)) sums emeasure M (\<Union>i. F i)" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
439 |
unfolding sums_iff by (intro conjI summable_ereal_pos emeasure_nonneg suminf_emeasure) auto |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
440 |
|
47694 | 441 |
lemma emeasure_additive: "additive (sets M) (emeasure M)" |
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
442 |
by (metis sets.countably_additive_additive emeasure_positive emeasure_countably_additive) |
47694 | 443 |
|
444 |
lemma plus_emeasure: |
|
445 |
"a \<in> sets M \<Longrightarrow> b \<in> sets M \<Longrightarrow> a \<inter> b = {} \<Longrightarrow> emeasure M a + emeasure M b = emeasure M (a \<union> b)" |
|
446 |
using additiveD[OF emeasure_additive] .. |
|
447 |
||
448 |
lemma setsum_emeasure: |
|
449 |
"F`I \<subseteq> sets M \<Longrightarrow> disjoint_family_on F I \<Longrightarrow> finite I \<Longrightarrow> |
|
450 |
(\<Sum>i\<in>I. emeasure M (F i)) = emeasure M (\<Union>i\<in>I. F i)" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
451 |
by (metis sets.additive_sum emeasure_positive emeasure_additive) |
47694 | 452 |
|
453 |
lemma emeasure_mono: |
|
454 |
"a \<subseteq> b \<Longrightarrow> b \<in> sets M \<Longrightarrow> emeasure M a \<le> emeasure M b" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
455 |
by (metis sets.additive_increasing emeasure_additive emeasure_nonneg emeasure_notin_sets |
47694 | 456 |
emeasure_positive increasingD) |
457 |
||
458 |
lemma emeasure_space: |
|
459 |
"emeasure M A \<le> emeasure M (space M)" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
460 |
by (metis emeasure_mono emeasure_nonneg emeasure_notin_sets sets.sets_into_space sets.top) |
47694 | 461 |
|
462 |
lemma emeasure_compl: |
|
463 |
assumes s: "s \<in> sets M" and fin: "emeasure M s \<noteq> \<infinity>" |
|
464 |
shows "emeasure M (space M - s) = emeasure M (space M) - emeasure M s" |
|
465 |
proof - |
|
466 |
from s have "0 \<le> emeasure M s" by auto |
|
467 |
have "emeasure M (space M) = emeasure M (s \<union> (space M - s))" using s |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
468 |
by (metis Un_Diff_cancel Un_absorb1 s sets.sets_into_space) |
47694 | 469 |
also have "... = emeasure M s + emeasure M (space M - s)" |
470 |
by (rule plus_emeasure[symmetric]) (auto simp add: s) |
|
471 |
finally have "emeasure M (space M) = emeasure M s + emeasure M (space M - s)" . |
|
472 |
then show ?thesis |
|
473 |
using fin `0 \<le> emeasure M s` |
|
474 |
unfolding ereal_eq_minus_iff by (auto simp: ac_simps) |
|
475 |
qed |
|
476 |
||
477 |
lemma emeasure_Diff: |
|
478 |
assumes finite: "emeasure M B \<noteq> \<infinity>" |
|
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
479 |
and [measurable]: "A \<in> sets M" "B \<in> sets M" and "B \<subseteq> A" |
47694 | 480 |
shows "emeasure M (A - B) = emeasure M A - emeasure M B" |
481 |
proof - |
|
482 |
have "0 \<le> emeasure M B" using assms by auto |
|
483 |
have "(A - B) \<union> B = A" using `B \<subseteq> A` by auto |
|
484 |
then have "emeasure M A = emeasure M ((A - B) \<union> B)" by simp |
|
485 |
also have "\<dots> = emeasure M (A - B) + emeasure M B" |
|
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
486 |
by (subst plus_emeasure[symmetric]) auto |
47694 | 487 |
finally show "emeasure M (A - B) = emeasure M A - emeasure M B" |
488 |
unfolding ereal_eq_minus_iff |
|
489 |
using finite `0 \<le> emeasure M B` by auto |
|
490 |
qed |
|
491 |
||
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
492 |
lemma Lim_emeasure_incseq: |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
493 |
"range A \<subseteq> sets M \<Longrightarrow> incseq A \<Longrightarrow> (\<lambda>i. (emeasure M (A i))) ----> emeasure M (\<Union>i. A i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
494 |
using emeasure_countably_additive |
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
495 |
by (auto simp add: sets.countably_additive_iff_continuous_from_below emeasure_positive |
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
496 |
emeasure_additive) |
47694 | 497 |
|
498 |
lemma incseq_emeasure: |
|
499 |
assumes "range B \<subseteq> sets M" "incseq B" |
|
500 |
shows "incseq (\<lambda>i. emeasure M (B i))" |
|
501 |
using assms by (auto simp: incseq_def intro!: emeasure_mono) |
|
502 |
||
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
503 |
lemma SUP_emeasure_incseq: |
47694 | 504 |
assumes A: "range A \<subseteq> sets M" "incseq A" |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
505 |
shows "(SUP n. emeasure M (A n)) = emeasure M (\<Union>i. A i)" |
51000 | 506 |
using LIMSEQ_SUP[OF incseq_emeasure, OF A] Lim_emeasure_incseq[OF A] |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
507 |
by (simp add: LIMSEQ_unique) |
47694 | 508 |
|
509 |
lemma decseq_emeasure: |
|
510 |
assumes "range B \<subseteq> sets M" "decseq B" |
|
511 |
shows "decseq (\<lambda>i. emeasure M (B i))" |
|
512 |
using assms by (auto simp: decseq_def intro!: emeasure_mono) |
|
513 |
||
514 |
lemma INF_emeasure_decseq: |
|
515 |
assumes A: "range A \<subseteq> sets M" and "decseq A" |
|
516 |
and finite: "\<And>i. emeasure M (A i) \<noteq> \<infinity>" |
|
517 |
shows "(INF n. emeasure M (A n)) = emeasure M (\<Inter>i. A i)" |
|
518 |
proof - |
|
519 |
have le_MI: "emeasure M (\<Inter>i. A i) \<le> emeasure M (A 0)" |
|
520 |
using A by (auto intro!: emeasure_mono) |
|
521 |
hence *: "emeasure M (\<Inter>i. A i) \<noteq> \<infinity>" using finite[of 0] by auto |
|
522 |
||
523 |
have A0: "0 \<le> emeasure M (A 0)" using A by auto |
|
524 |
||
525 |
have "emeasure M (A 0) - (INF n. emeasure M (A n)) = emeasure M (A 0) + (SUP n. - emeasure M (A n))" |
|
56212
3253aaf73a01
consolidated theorem names containing INFI and SUPR: have INF and SUP instead uniformly
haftmann
parents:
56193
diff
changeset
|
526 |
by (simp add: ereal_SUP_uminus minus_ereal_def) |
47694 | 527 |
also have "\<dots> = (SUP n. emeasure M (A 0) - emeasure M (A n))" |
528 |
unfolding minus_ereal_def using A0 assms |
|
56212
3253aaf73a01
consolidated theorem names containing INFI and SUPR: have INF and SUP instead uniformly
haftmann
parents:
56193
diff
changeset
|
529 |
by (subst SUP_ereal_add) (auto simp add: decseq_emeasure) |
47694 | 530 |
also have "\<dots> = (SUP n. emeasure M (A 0 - A n))" |
531 |
using A finite `decseq A`[unfolded decseq_def] by (subst emeasure_Diff) auto |
|
532 |
also have "\<dots> = emeasure M (\<Union>i. A 0 - A i)" |
|
533 |
proof (rule SUP_emeasure_incseq) |
|
534 |
show "range (\<lambda>n. A 0 - A n) \<subseteq> sets M" |
|
535 |
using A by auto |
|
536 |
show "incseq (\<lambda>n. A 0 - A n)" |
|
537 |
using `decseq A` by (auto simp add: incseq_def decseq_def) |
|
538 |
qed |
|
539 |
also have "\<dots> = emeasure M (A 0) - emeasure M (\<Inter>i. A i)" |
|
540 |
using A finite * by (simp, subst emeasure_Diff) auto |
|
541 |
finally show ?thesis |
|
542 |
unfolding ereal_minus_eq_minus_iff using finite A0 by auto |
|
543 |
qed |
|
544 |
||
545 |
lemma Lim_emeasure_decseq: |
|
546 |
assumes A: "range A \<subseteq> sets M" "decseq A" and fin: "\<And>i. emeasure M (A i) \<noteq> \<infinity>" |
|
547 |
shows "(\<lambda>i. emeasure M (A i)) ----> emeasure M (\<Inter>i. A i)" |
|
51351 | 548 |
using LIMSEQ_INF[OF decseq_emeasure, OF A] |
47694 | 549 |
using INF_emeasure_decseq[OF A fin] by simp |
550 |
||
59000 | 551 |
lemma emeasure_lfp[consumes 1, case_names cont measurable]: |
552 |
assumes "P M" |
|
60172
423273355b55
rename continuous and down_continuous in Order_Continuity to sup_/inf_continuous; relate them with topological continuity
hoelzl
parents:
60142
diff
changeset
|
553 |
assumes cont: "sup_continuous F" |
59000 | 554 |
assumes *: "\<And>M A. P M \<Longrightarrow> (\<And>N. P N \<Longrightarrow> Measurable.pred N A) \<Longrightarrow> Measurable.pred M (F A)" |
555 |
shows "emeasure M {x\<in>space M. lfp F x} = (SUP i. emeasure M {x\<in>space M. (F ^^ i) (\<lambda>x. False) x})" |
|
556 |
proof - |
|
557 |
have "emeasure M {x\<in>space M. lfp F x} = emeasure M (\<Union>i. {x\<in>space M. (F ^^ i) (\<lambda>x. False) x})" |
|
60172
423273355b55
rename continuous and down_continuous in Order_Continuity to sup_/inf_continuous; relate them with topological continuity
hoelzl
parents:
60142
diff
changeset
|
558 |
using sup_continuous_lfp[OF cont] by (auto simp add: bot_fun_def intro!: arg_cong2[where f=emeasure]) |
59000 | 559 |
moreover { fix i from `P M` have "{x\<in>space M. (F ^^ i) (\<lambda>x. False) x} \<in> sets M" |
560 |
by (induct i arbitrary: M) (auto simp add: pred_def[symmetric] intro: *) } |
|
561 |
moreover have "incseq (\<lambda>i. {x\<in>space M. (F ^^ i) (\<lambda>x. False) x})" |
|
562 |
proof (rule incseq_SucI) |
|
563 |
fix i |
|
564 |
have "(F ^^ i) (\<lambda>x. False) \<le> (F ^^ (Suc i)) (\<lambda>x. False)" |
|
565 |
proof (induct i) |
|
566 |
case 0 show ?case by (simp add: le_fun_def) |
|
567 |
next |
|
60172
423273355b55
rename continuous and down_continuous in Order_Continuity to sup_/inf_continuous; relate them with topological continuity
hoelzl
parents:
60142
diff
changeset
|
568 |
case Suc thus ?case using monoD[OF sup_continuous_mono[OF cont] Suc] by auto |
59000 | 569 |
qed |
570 |
then show "{x \<in> space M. (F ^^ i) (\<lambda>x. False) x} \<subseteq> {x \<in> space M. (F ^^ Suc i) (\<lambda>x. False) x}" |
|
571 |
by auto |
|
572 |
qed |
|
573 |
ultimately show ?thesis |
|
574 |
by (subst SUP_emeasure_incseq) auto |
|
575 |
qed |
|
576 |
||
47694 | 577 |
lemma emeasure_subadditive: |
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
578 |
assumes [measurable]: "A \<in> sets M" "B \<in> sets M" |
47694 | 579 |
shows "emeasure M (A \<union> B) \<le> emeasure M A + emeasure M B" |
580 |
proof - |
|
581 |
from plus_emeasure[of A M "B - A"] |
|
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
582 |
have "emeasure M (A \<union> B) = emeasure M A + emeasure M (B - A)" by simp |
47694 | 583 |
also have "\<dots> \<le> emeasure M A + emeasure M B" |
584 |
using assms by (auto intro!: add_left_mono emeasure_mono) |
|
585 |
finally show ?thesis . |
|
586 |
qed |
|
587 |
||
588 |
lemma emeasure_subadditive_finite: |
|
589 |
assumes "finite I" "A ` I \<subseteq> sets M" |
|
590 |
shows "emeasure M (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. emeasure M (A i))" |
|
591 |
using assms proof induct |
|
592 |
case (insert i I) |
|
593 |
then have "emeasure M (\<Union>i\<in>insert i I. A i) = emeasure M (A i \<union> (\<Union>i\<in>I. A i))" |
|
594 |
by simp |
|
595 |
also have "\<dots> \<le> emeasure M (A i) + emeasure M (\<Union>i\<in>I. A i)" |
|
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
596 |
using insert by (intro emeasure_subadditive) auto |
47694 | 597 |
also have "\<dots> \<le> emeasure M (A i) + (\<Sum>i\<in>I. emeasure M (A i))" |
598 |
using insert by (intro add_mono) auto |
|
599 |
also have "\<dots> = (\<Sum>i\<in>insert i I. emeasure M (A i))" |
|
600 |
using insert by auto |
|
601 |
finally show ?case . |
|
602 |
qed simp |
|
603 |
||
604 |
lemma emeasure_subadditive_countably: |
|
605 |
assumes "range f \<subseteq> sets M" |
|
606 |
shows "emeasure M (\<Union>i. f i) \<le> (\<Sum>i. emeasure M (f i))" |
|
607 |
proof - |
|
608 |
have "emeasure M (\<Union>i. f i) = emeasure M (\<Union>i. disjointed f i)" |
|
609 |
unfolding UN_disjointed_eq .. |
|
610 |
also have "\<dots> = (\<Sum>i. emeasure M (disjointed f i))" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
611 |
using sets.range_disjointed_sets[OF assms] suminf_emeasure[of "disjointed f"] |
47694 | 612 |
by (simp add: disjoint_family_disjointed comp_def) |
613 |
also have "\<dots> \<le> (\<Sum>i. emeasure M (f i))" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
614 |
using sets.range_disjointed_sets[OF assms] assms |
47694 | 615 |
by (auto intro!: suminf_le_pos emeasure_mono disjointed_subset) |
616 |
finally show ?thesis . |
|
617 |
qed |
|
618 |
||
619 |
lemma emeasure_insert: |
|
620 |
assumes sets: "{x} \<in> sets M" "A \<in> sets M" and "x \<notin> A" |
|
621 |
shows "emeasure M (insert x A) = emeasure M {x} + emeasure M A" |
|
622 |
proof - |
|
623 |
have "{x} \<inter> A = {}" using `x \<notin> A` by auto |
|
624 |
from plus_emeasure[OF sets this] show ?thesis by simp |
|
625 |
qed |
|
626 |
||
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
627 |
lemma emeasure_insert_ne: |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
628 |
"A \<noteq> {} \<Longrightarrow> {x} \<in> sets M \<Longrightarrow> A \<in> sets M \<Longrightarrow> x \<notin> A \<Longrightarrow> emeasure M (insert x A) = emeasure M {x} + emeasure M A" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
629 |
by (rule emeasure_insert) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
630 |
|
47694 | 631 |
lemma emeasure_eq_setsum_singleton: |
632 |
assumes "finite S" "\<And>x. x \<in> S \<Longrightarrow> {x} \<in> sets M" |
|
633 |
shows "emeasure M S = (\<Sum>x\<in>S. emeasure M {x})" |
|
634 |
using setsum_emeasure[of "\<lambda>x. {x}" S M] assms |
|
635 |
by (auto simp: disjoint_family_on_def subset_eq) |
|
636 |
||
637 |
lemma setsum_emeasure_cover: |
|
638 |
assumes "finite S" and "A \<in> sets M" and br_in_M: "B ` S \<subseteq> sets M" |
|
639 |
assumes A: "A \<subseteq> (\<Union>i\<in>S. B i)" |
|
640 |
assumes disj: "disjoint_family_on B S" |
|
641 |
shows "emeasure M A = (\<Sum>i\<in>S. emeasure M (A \<inter> (B i)))" |
|
642 |
proof - |
|
643 |
have "(\<Sum>i\<in>S. emeasure M (A \<inter> (B i))) = emeasure M (\<Union>i\<in>S. A \<inter> (B i))" |
|
644 |
proof (rule setsum_emeasure) |
|
645 |
show "disjoint_family_on (\<lambda>i. A \<inter> B i) S" |
|
646 |
using `disjoint_family_on B S` |
|
647 |
unfolding disjoint_family_on_def by auto |
|
648 |
qed (insert assms, auto) |
|
649 |
also have "(\<Union>i\<in>S. A \<inter> (B i)) = A" |
|
650 |
using A by auto |
|
651 |
finally show ?thesis by simp |
|
652 |
qed |
|
653 |
||
654 |
lemma emeasure_eq_0: |
|
655 |
"N \<in> sets M \<Longrightarrow> emeasure M N = 0 \<Longrightarrow> K \<subseteq> N \<Longrightarrow> emeasure M K = 0" |
|
656 |
by (metis emeasure_mono emeasure_nonneg order_eq_iff) |
|
657 |
||
658 |
lemma emeasure_UN_eq_0: |
|
659 |
assumes "\<And>i::nat. emeasure M (N i) = 0" and "range N \<subseteq> sets M" |
|
660 |
shows "emeasure M (\<Union> i. N i) = 0" |
|
661 |
proof - |
|
662 |
have "0 \<le> emeasure M (\<Union> i. N i)" using assms by auto |
|
663 |
moreover have "emeasure M (\<Union> i. N i) \<le> 0" |
|
664 |
using emeasure_subadditive_countably[OF assms(2)] assms(1) by simp |
|
665 |
ultimately show ?thesis by simp |
|
666 |
qed |
|
667 |
||
668 |
lemma measure_eqI_finite: |
|
669 |
assumes [simp]: "sets M = Pow A" "sets N = Pow A" and "finite A" |
|
670 |
assumes eq: "\<And>a. a \<in> A \<Longrightarrow> emeasure M {a} = emeasure N {a}" |
|
671 |
shows "M = N" |
|
672 |
proof (rule measure_eqI) |
|
673 |
fix X assume "X \<in> sets M" |
|
674 |
then have X: "X \<subseteq> A" by auto |
|
675 |
then have "emeasure M X = (\<Sum>a\<in>X. emeasure M {a})" |
|
676 |
using `finite A` by (subst emeasure_eq_setsum_singleton) (auto dest: finite_subset) |
|
677 |
also have "\<dots> = (\<Sum>a\<in>X. emeasure N {a})" |
|
57418 | 678 |
using X eq by (auto intro!: setsum.cong) |
47694 | 679 |
also have "\<dots> = emeasure N X" |
680 |
using X `finite A` by (subst emeasure_eq_setsum_singleton) (auto dest: finite_subset) |
|
681 |
finally show "emeasure M X = emeasure N X" . |
|
682 |
qed simp |
|
683 |
||
684 |
lemma measure_eqI_generator_eq: |
|
685 |
fixes M N :: "'a measure" and E :: "'a set set" and A :: "nat \<Rightarrow> 'a set" |
|
686 |
assumes "Int_stable E" "E \<subseteq> Pow \<Omega>" |
|
687 |
and eq: "\<And>X. X \<in> E \<Longrightarrow> emeasure M X = emeasure N X" |
|
688 |
and M: "sets M = sigma_sets \<Omega> E" |
|
689 |
and N: "sets N = sigma_sets \<Omega> E" |
|
49784
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
690 |
and A: "range A \<subseteq> E" "(\<Union>i. A i) = \<Omega>" "\<And>i. emeasure M (A i) \<noteq> \<infinity>" |
47694 | 691 |
shows "M = N" |
692 |
proof - |
|
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
693 |
let ?\<mu> = "emeasure M" and ?\<nu> = "emeasure N" |
47694 | 694 |
interpret S: sigma_algebra \<Omega> "sigma_sets \<Omega> E" by (rule sigma_algebra_sigma_sets) fact |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
695 |
have "space M = \<Omega>" |
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
696 |
using sets.top[of M] sets.space_closed[of M] S.top S.space_closed `sets M = sigma_sets \<Omega> E` |
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
697 |
by blast |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
698 |
|
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
699 |
{ fix F D assume "F \<in> E" and "?\<mu> F \<noteq> \<infinity>" |
47694 | 700 |
then have [intro]: "F \<in> sigma_sets \<Omega> E" by auto |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
701 |
have "?\<nu> F \<noteq> \<infinity>" using `?\<mu> F \<noteq> \<infinity>` `F \<in> E` eq by simp |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
702 |
assume "D \<in> sets M" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
703 |
with `Int_stable E` `E \<subseteq> Pow \<Omega>` have "emeasure M (F \<inter> D) = emeasure N (F \<inter> D)" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
704 |
unfolding M |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
705 |
proof (induct rule: sigma_sets_induct_disjoint) |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
706 |
case (basic A) |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
707 |
then have "F \<inter> A \<in> E" using `Int_stable E` `F \<in> E` by (auto simp: Int_stable_def) |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
708 |
then show ?case using eq by auto |
47694 | 709 |
next |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
710 |
case empty then show ?case by simp |
47694 | 711 |
next |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
712 |
case (compl A) |
47694 | 713 |
then have **: "F \<inter> (\<Omega> - A) = F - (F \<inter> A)" |
714 |
and [intro]: "F \<inter> A \<in> sigma_sets \<Omega> E" |
|
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
715 |
using `F \<in> E` S.sets_into_space by (auto simp: M) |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
716 |
have "?\<nu> (F \<inter> A) \<le> ?\<nu> F" by (auto intro!: emeasure_mono simp: M N) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
717 |
then have "?\<nu> (F \<inter> A) \<noteq> \<infinity>" using `?\<nu> F \<noteq> \<infinity>` by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
718 |
have "?\<mu> (F \<inter> A) \<le> ?\<mu> F" by (auto intro!: emeasure_mono simp: M N) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
719 |
then have "?\<mu> (F \<inter> A) \<noteq> \<infinity>" using `?\<mu> F \<noteq> \<infinity>` by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
720 |
then have "?\<mu> (F \<inter> (\<Omega> - A)) = ?\<mu> F - ?\<mu> (F \<inter> A)" unfolding ** |
47694 | 721 |
using `F \<inter> A \<in> sigma_sets \<Omega> E` by (auto intro!: emeasure_Diff simp: M N) |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
722 |
also have "\<dots> = ?\<nu> F - ?\<nu> (F \<inter> A)" using eq `F \<in> E` compl by simp |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
723 |
also have "\<dots> = ?\<nu> (F \<inter> (\<Omega> - A))" unfolding ** |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
724 |
using `F \<inter> A \<in> sigma_sets \<Omega> E` `?\<nu> (F \<inter> A) \<noteq> \<infinity>` |
47694 | 725 |
by (auto intro!: emeasure_Diff[symmetric] simp: M N) |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
726 |
finally show ?case |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
727 |
using `space M = \<Omega>` by auto |
47694 | 728 |
next |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
729 |
case (union A) |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
730 |
then have "?\<mu> (\<Union>x. F \<inter> A x) = ?\<nu> (\<Union>x. F \<inter> A x)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
731 |
by (subst (1 2) suminf_emeasure[symmetric]) (auto simp: disjoint_family_on_def subset_eq M N) |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
732 |
with A show ?case |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
733 |
by auto |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
734 |
qed } |
47694 | 735 |
note * = this |
736 |
show "M = N" |
|
737 |
proof (rule measure_eqI) |
|
738 |
show "sets M = sets N" |
|
739 |
using M N by simp |
|
49784
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
740 |
have [simp, intro]: "\<And>i. A i \<in> sets M" |
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
741 |
using A(1) by (auto simp: subset_eq M) |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
742 |
fix F assume "F \<in> sets M" |
49784
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
743 |
let ?D = "disjointed (\<lambda>i. F \<inter> A i)" |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49784
diff
changeset
|
744 |
from `space M = \<Omega>` have F_eq: "F = (\<Union>i. ?D i)" |
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
745 |
using `F \<in> sets M`[THEN sets.sets_into_space] A(2)[symmetric] by (auto simp: UN_disjointed_eq) |
49784
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
746 |
have [simp, intro]: "\<And>i. ?D i \<in> sets M" |
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
747 |
using sets.range_disjointed_sets[of "\<lambda>i. F \<inter> A i" M] `F \<in> sets M` |
49784
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
748 |
by (auto simp: subset_eq) |
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
749 |
have "disjoint_family ?D" |
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
750 |
by (auto simp: disjoint_family_disjointed) |
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
751 |
moreover |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
752 |
have "(\<Sum>i. emeasure M (?D i)) = (\<Sum>i. emeasure N (?D i))" |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
753 |
proof (intro arg_cong[where f=suminf] ext) |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
754 |
fix i |
49784
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
755 |
have "A i \<inter> ?D i = ?D i" |
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
hoelzl
parents:
49773
diff
changeset
|
756 |
by (auto simp: disjointed_def) |
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
757 |
then show "emeasure M (?D i) = emeasure N (?D i)" |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
758 |
using *[of "A i" "?D i", OF _ A(3)] A(1) by auto |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
759 |
qed |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
760 |
ultimately show "emeasure M F = emeasure N F" |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
761 |
by (simp add: image_subset_iff `sets M = sets N`[symmetric] F_eq[symmetric] suminf_emeasure) |
47694 | 762 |
qed |
763 |
qed |
|
764 |
||
765 |
lemma measure_of_of_measure: "measure_of (space M) (sets M) (emeasure M) = M" |
|
766 |
proof (intro measure_eqI emeasure_measure_of_sigma) |
|
767 |
show "sigma_algebra (space M) (sets M)" .. |
|
768 |
show "positive (sets M) (emeasure M)" |
|
769 |
by (simp add: positive_def emeasure_nonneg) |
|
770 |
show "countably_additive (sets M) (emeasure M)" |
|
771 |
by (simp add: emeasure_countably_additive) |
|
772 |
qed simp_all |
|
773 |
||
56994 | 774 |
subsection {* @{text \<mu>}-null sets *} |
47694 | 775 |
|
776 |
definition null_sets :: "'a measure \<Rightarrow> 'a set set" where |
|
777 |
"null_sets M = {N\<in>sets M. emeasure M N = 0}" |
|
778 |
||
779 |
lemma null_setsD1[dest]: "A \<in> null_sets M \<Longrightarrow> emeasure M A = 0" |
|
780 |
by (simp add: null_sets_def) |
|
781 |
||
782 |
lemma null_setsD2[dest]: "A \<in> null_sets M \<Longrightarrow> A \<in> sets M" |
|
783 |
unfolding null_sets_def by simp |
|
784 |
||
785 |
lemma null_setsI[intro]: "emeasure M A = 0 \<Longrightarrow> A \<in> sets M \<Longrightarrow> A \<in> null_sets M" |
|
786 |
unfolding null_sets_def by simp |
|
787 |
||
788 |
interpretation null_sets: ring_of_sets "space M" "null_sets M" for M |
|
47762 | 789 |
proof (rule ring_of_setsI) |
47694 | 790 |
show "null_sets M \<subseteq> Pow (space M)" |
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
791 |
using sets.sets_into_space by auto |
47694 | 792 |
show "{} \<in> null_sets M" |
793 |
by auto |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
794 |
fix A B assume null_sets: "A \<in> null_sets M" "B \<in> null_sets M" |
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
795 |
then have sets: "A \<in> sets M" "B \<in> sets M" |
47694 | 796 |
by auto |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
797 |
then have *: "emeasure M (A \<union> B) \<le> emeasure M A + emeasure M B" |
47694 | 798 |
"emeasure M (A - B) \<le> emeasure M A" |
799 |
by (auto intro!: emeasure_subadditive emeasure_mono) |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
800 |
then have "emeasure M B = 0" "emeasure M A = 0" |
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
801 |
using null_sets by auto |
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
802 |
with sets * show "A - B \<in> null_sets M" "A \<union> B \<in> null_sets M" |
47694 | 803 |
by (auto intro!: antisym) |
804 |
qed |
|
805 |
||
57275
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
806 |
lemma UN_from_nat_into: |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
807 |
assumes I: "countable I" "I \<noteq> {}" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
808 |
shows "(\<Union>i\<in>I. N i) = (\<Union>i. N (from_nat_into I i))" |
47694 | 809 |
proof - |
57275
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
810 |
have "(\<Union>i\<in>I. N i) = \<Union>(N ` range (from_nat_into I))" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
811 |
using I by simp |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
812 |
also have "\<dots> = (\<Union>i. (N \<circ> from_nat_into I) i)" |
56154
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
54417
diff
changeset
|
813 |
by (simp only: SUP_def image_comp) |
57275
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
814 |
finally show ?thesis by simp |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
815 |
qed |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
816 |
|
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
817 |
lemma null_sets_UN': |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
818 |
assumes "countable I" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
819 |
assumes "\<And>i. i \<in> I \<Longrightarrow> N i \<in> null_sets M" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
820 |
shows "(\<Union>i\<in>I. N i) \<in> null_sets M" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
821 |
proof cases |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
822 |
assume "I = {}" then show ?thesis by simp |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
823 |
next |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
824 |
assume "I \<noteq> {}" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
825 |
show ?thesis |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
826 |
proof (intro conjI CollectI null_setsI) |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
827 |
show "(\<Union>i\<in>I. N i) \<in> sets M" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
828 |
using assms by (intro sets.countable_UN') auto |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
829 |
have "emeasure M (\<Union>i\<in>I. N i) \<le> (\<Sum>n. emeasure M (N (from_nat_into I n)))" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
830 |
unfolding UN_from_nat_into[OF `countable I` `I \<noteq> {}`] |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
831 |
using assms `I \<noteq> {}` by (intro emeasure_subadditive_countably) (auto intro: from_nat_into) |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
832 |
also have "(\<lambda>n. emeasure M (N (from_nat_into I n))) = (\<lambda>_. 0)" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
833 |
using assms `I \<noteq> {}` by (auto intro: from_nat_into) |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
834 |
finally show "emeasure M (\<Union>i\<in>I. N i) = 0" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
835 |
by (intro antisym emeasure_nonneg) simp |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
836 |
qed |
47694 | 837 |
qed |
838 |
||
839 |
lemma null_sets_UN[intro]: |
|
57275
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
840 |
"(\<And>i::'i::countable. N i \<in> null_sets M) \<Longrightarrow> (\<Union>i. N i) \<in> null_sets M" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
841 |
by (rule null_sets_UN') auto |
47694 | 842 |
|
843 |
lemma null_set_Int1: |
|
844 |
assumes "B \<in> null_sets M" "A \<in> sets M" shows "A \<inter> B \<in> null_sets M" |
|
845 |
proof (intro CollectI conjI null_setsI) |
|
846 |
show "emeasure M (A \<inter> B) = 0" using assms |
|
847 |
by (intro emeasure_eq_0[of B _ "A \<inter> B"]) auto |
|
848 |
qed (insert assms, auto) |
|
849 |
||
850 |
lemma null_set_Int2: |
|
851 |
assumes "B \<in> null_sets M" "A \<in> sets M" shows "B \<inter> A \<in> null_sets M" |
|
852 |
using assms by (subst Int_commute) (rule null_set_Int1) |
|
853 |
||
854 |
lemma emeasure_Diff_null_set: |
|
855 |
assumes "B \<in> null_sets M" "A \<in> sets M" |
|
856 |
shows "emeasure M (A - B) = emeasure M A" |
|
857 |
proof - |
|
858 |
have *: "A - B = (A - (A \<inter> B))" by auto |
|
859 |
have "A \<inter> B \<in> null_sets M" using assms by (rule null_set_Int1) |
|
860 |
then show ?thesis |
|
861 |
unfolding * using assms |
|
862 |
by (subst emeasure_Diff) auto |
|
863 |
qed |
|
864 |
||
865 |
lemma null_set_Diff: |
|
866 |
assumes "B \<in> null_sets M" "A \<in> sets M" shows "B - A \<in> null_sets M" |
|
867 |
proof (intro CollectI conjI null_setsI) |
|
868 |
show "emeasure M (B - A) = 0" using assms by (intro emeasure_eq_0[of B _ "B - A"]) auto |
|
869 |
qed (insert assms, auto) |
|
870 |
||
871 |
lemma emeasure_Un_null_set: |
|
872 |
assumes "A \<in> sets M" "B \<in> null_sets M" |
|
873 |
shows "emeasure M (A \<union> B) = emeasure M A" |
|
874 |
proof - |
|
875 |
have *: "A \<union> B = A \<union> (B - A)" by auto |
|
876 |
have "B - A \<in> null_sets M" using assms(2,1) by (rule null_set_Diff) |
|
877 |
then show ?thesis |
|
878 |
unfolding * using assms |
|
879 |
by (subst plus_emeasure[symmetric]) auto |
|
880 |
qed |
|
881 |
||
56994 | 882 |
subsection {* The almost everywhere filter (i.e.\ quantifier) *} |
47694 | 883 |
|
884 |
definition ae_filter :: "'a measure \<Rightarrow> 'a filter" where |
|
57276 | 885 |
"ae_filter M = (INF N:null_sets M. principal (space M - N))" |
47694 | 886 |
|
57276 | 887 |
abbreviation almost_everywhere :: "'a measure \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where |
47694 | 888 |
"almost_everywhere M P \<equiv> eventually P (ae_filter M)" |
889 |
||
890 |
syntax |
|
891 |
"_almost_everywhere" :: "pttrn \<Rightarrow> 'a \<Rightarrow> bool \<Rightarrow> bool" ("AE _ in _. _" [0,0,10] 10) |
|
892 |
||
893 |
translations |
|
57276 | 894 |
"AE x in M. P" == "CONST almost_everywhere M (\<lambda>x. P)" |
47694 | 895 |
|
57276 | 896 |
lemma eventually_ae_filter: "eventually P (ae_filter M) \<longleftrightarrow> (\<exists>N\<in>null_sets M. {x \<in> space M. \<not> P x} \<subseteq> N)" |
897 |
unfolding ae_filter_def by (subst eventually_INF_base) (auto simp: eventually_principal subset_eq) |
|
47694 | 898 |
|
899 |
lemma AE_I': |
|
900 |
"N \<in> null_sets M \<Longrightarrow> {x\<in>space M. \<not> P x} \<subseteq> N \<Longrightarrow> (AE x in M. P x)" |
|
901 |
unfolding eventually_ae_filter by auto |
|
902 |
||
903 |
lemma AE_iff_null: |
|
904 |
assumes "{x\<in>space M. \<not> P x} \<in> sets M" (is "?P \<in> sets M") |
|
905 |
shows "(AE x in M. P x) \<longleftrightarrow> {x\<in>space M. \<not> P x} \<in> null_sets M" |
|
906 |
proof |
|
907 |
assume "AE x in M. P x" then obtain N where N: "N \<in> sets M" "?P \<subseteq> N" "emeasure M N = 0" |
|
908 |
unfolding eventually_ae_filter by auto |
|
909 |
have "0 \<le> emeasure M ?P" by auto |
|
910 |
moreover have "emeasure M ?P \<le> emeasure M N" |
|
911 |
using assms N(1,2) by (auto intro: emeasure_mono) |
|
912 |
ultimately have "emeasure M ?P = 0" unfolding `emeasure M N = 0` by auto |
|
913 |
then show "?P \<in> null_sets M" using assms by auto |
|
914 |
next |
|
915 |
assume "?P \<in> null_sets M" with assms show "AE x in M. P x" by (auto intro: AE_I') |
|
916 |
qed |
|
917 |
||
918 |
lemma AE_iff_null_sets: |
|
919 |
"N \<in> sets M \<Longrightarrow> N \<in> null_sets M \<longleftrightarrow> (AE x in M. x \<notin> N)" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
920 |
using Int_absorb1[OF sets.sets_into_space, of N M] |
47694 | 921 |
by (subst AE_iff_null) (auto simp: Int_def[symmetric]) |
922 |
||
47761 | 923 |
lemma AE_not_in: |
924 |
"N \<in> null_sets M \<Longrightarrow> AE x in M. x \<notin> N" |
|
925 |
by (metis AE_iff_null_sets null_setsD2) |
|
926 |
||
47694 | 927 |
lemma AE_iff_measurable: |
928 |
"N \<in> sets M \<Longrightarrow> {x\<in>space M. \<not> P x} = N \<Longrightarrow> (AE x in M. P x) \<longleftrightarrow> emeasure M N = 0" |
|
929 |
using AE_iff_null[of _ P] by auto |
|
930 |
||
931 |
lemma AE_E[consumes 1]: |
|
932 |
assumes "AE x in M. P x" |
|
933 |
obtains N where "{x \<in> space M. \<not> P x} \<subseteq> N" "emeasure M N = 0" "N \<in> sets M" |
|
934 |
using assms unfolding eventually_ae_filter by auto |
|
935 |
||
936 |
lemma AE_E2: |
|
937 |
assumes "AE x in M. P x" "{x\<in>space M. P x} \<in> sets M" |
|
938 |
shows "emeasure M {x\<in>space M. \<not> P x} = 0" (is "emeasure M ?P = 0") |
|
939 |
proof - |
|
940 |
have "{x\<in>space M. \<not> P x} = space M - {x\<in>space M. P x}" by auto |
|
941 |
with AE_iff_null[of M P] assms show ?thesis by auto |
|
942 |
qed |
|
943 |
||
944 |
lemma AE_I: |
|
945 |
assumes "{x \<in> space M. \<not> P x} \<subseteq> N" "emeasure M N = 0" "N \<in> sets M" |
|
946 |
shows "AE x in M. P x" |
|
947 |
using assms unfolding eventually_ae_filter by auto |
|
948 |
||
949 |
lemma AE_mp[elim!]: |
|
950 |
assumes AE_P: "AE x in M. P x" and AE_imp: "AE x in M. P x \<longrightarrow> Q x" |
|
951 |
shows "AE x in M. Q x" |
|
952 |
proof - |
|
953 |
from AE_P obtain A where P: "{x\<in>space M. \<not> P x} \<subseteq> A" |
|
954 |
and A: "A \<in> sets M" "emeasure M A = 0" |
|
955 |
by (auto elim!: AE_E) |
|
956 |
||
957 |
from AE_imp obtain B where imp: "{x\<in>space M. P x \<and> \<not> Q x} \<subseteq> B" |
|
958 |
and B: "B \<in> sets M" "emeasure M B = 0" |
|
959 |
by (auto elim!: AE_E) |
|
960 |
||
961 |
show ?thesis |
|
962 |
proof (intro AE_I) |
|
963 |
have "0 \<le> emeasure M (A \<union> B)" using A B by auto |
|
964 |
moreover have "emeasure M (A \<union> B) \<le> 0" |
|
965 |
using emeasure_subadditive[of A M B] A B by auto |
|
966 |
ultimately show "A \<union> B \<in> sets M" "emeasure M (A \<union> B) = 0" using A B by auto |
|
967 |
show "{x\<in>space M. \<not> Q x} \<subseteq> A \<union> B" |
|
968 |
using P imp by auto |
|
969 |
qed |
|
970 |
qed |
|
971 |
||
972 |
(* depricated replace by laws about eventually *) |
|
973 |
lemma |
|
974 |
shows AE_iffI: "AE x in M. P x \<Longrightarrow> AE x in M. P x \<longleftrightarrow> Q x \<Longrightarrow> AE x in M. Q x" |
|
975 |
and AE_disjI1: "AE x in M. P x \<Longrightarrow> AE x in M. P x \<or> Q x" |
|
976 |
and AE_disjI2: "AE x in M. Q x \<Longrightarrow> AE x in M. P x \<or> Q x" |
|
977 |
and AE_conjI: "AE x in M. P x \<Longrightarrow> AE x in M. Q x \<Longrightarrow> AE x in M. P x \<and> Q x" |
|
978 |
and AE_conj_iff[simp]: "(AE x in M. P x \<and> Q x) \<longleftrightarrow> (AE x in M. P x) \<and> (AE x in M. Q x)" |
|
979 |
by auto |
|
980 |
||
981 |
lemma AE_impI: |
|
982 |
"(P \<Longrightarrow> AE x in M. Q x) \<Longrightarrow> AE x in M. P \<longrightarrow> Q x" |
|
983 |
by (cases P) auto |
|
984 |
||
985 |
lemma AE_measure: |
|
986 |
assumes AE: "AE x in M. P x" and sets: "{x\<in>space M. P x} \<in> sets M" (is "?P \<in> sets M") |
|
987 |
shows "emeasure M {x\<in>space M. P x} = emeasure M (space M)" |
|
988 |
proof - |
|
989 |
from AE_E[OF AE] guess N . note N = this |
|
990 |
with sets have "emeasure M (space M) \<le> emeasure M (?P \<union> N)" |
|
991 |
by (intro emeasure_mono) auto |
|
992 |
also have "\<dots> \<le> emeasure M ?P + emeasure M N" |
|
993 |
using sets N by (intro emeasure_subadditive) auto |
|
994 |
also have "\<dots> = emeasure M ?P" using N by simp |
|
995 |
finally show "emeasure M ?P = emeasure M (space M)" |
|
996 |
using emeasure_space[of M "?P"] by auto |
|
997 |
qed |
|
998 |
||
999 |
lemma AE_space: "AE x in M. x \<in> space M" |
|
1000 |
by (rule AE_I[where N="{}"]) auto |
|
1001 |
||
1002 |
lemma AE_I2[simp, intro]: |
|
1003 |
"(\<And>x. x \<in> space M \<Longrightarrow> P x) \<Longrightarrow> AE x in M. P x" |
|
1004 |
using AE_space by force |
|
1005 |
||
1006 |
lemma AE_Ball_mp: |
|
1007 |
"\<forall>x\<in>space M. P x \<Longrightarrow> AE x in M. P x \<longrightarrow> Q x \<Longrightarrow> AE x in M. Q x" |
|
1008 |
by auto |
|
1009 |
||
1010 |
lemma AE_cong[cong]: |
|
1011 |
"(\<And>x. x \<in> space M \<Longrightarrow> P x \<longleftrightarrow> Q x) \<Longrightarrow> (AE x in M. P x) \<longleftrightarrow> (AE x in M. Q x)" |
|
1012 |
by auto |
|
1013 |
||
1014 |
lemma AE_all_countable: |
|
1015 |
"(AE x in M. \<forall>i. P i x) \<longleftrightarrow> (\<forall>i::'i::countable. AE x in M. P i x)" |
|
1016 |
proof |
|
1017 |
assume "\<forall>i. AE x in M. P i x" |
|
1018 |
from this[unfolded eventually_ae_filter Bex_def, THEN choice] |
|
1019 |
obtain N where N: "\<And>i. N i \<in> null_sets M" "\<And>i. {x\<in>space M. \<not> P i x} \<subseteq> N i" by auto |
|
1020 |
have "{x\<in>space M. \<not> (\<forall>i. P i x)} \<subseteq> (\<Union>i. {x\<in>space M. \<not> P i x})" by auto |
|
1021 |
also have "\<dots> \<subseteq> (\<Union>i. N i)" using N by auto |
|
1022 |
finally have "{x\<in>space M. \<not> (\<forall>i. P i x)} \<subseteq> (\<Union>i. N i)" . |
|
1023 |
moreover from N have "(\<Union>i. N i) \<in> null_sets M" |
|
1024 |
by (intro null_sets_UN) auto |
|
1025 |
ultimately show "AE x in M. \<forall>i. P i x" |
|
1026 |
unfolding eventually_ae_filter by auto |
|
1027 |
qed auto |
|
1028 |
||
59000 | 1029 |
lemma AE_ball_countable: |
1030 |
assumes [intro]: "countable X" |
|
1031 |
shows "(AE x in M. \<forall>y\<in>X. P x y) \<longleftrightarrow> (\<forall>y\<in>X. AE x in M. P x y)" |
|
1032 |
proof |
|
1033 |
assume "\<forall>y\<in>X. AE x in M. P x y" |
|
1034 |
from this[unfolded eventually_ae_filter Bex_def, THEN bchoice] |
|
1035 |
obtain N where N: "\<And>y. y \<in> X \<Longrightarrow> N y \<in> null_sets M" "\<And>y. y \<in> X \<Longrightarrow> {x\<in>space M. \<not> P x y} \<subseteq> N y" |
|
1036 |
by auto |
|
1037 |
have "{x\<in>space M. \<not> (\<forall>y\<in>X. P x y)} \<subseteq> (\<Union>y\<in>X. {x\<in>space M. \<not> P x y})" |
|
1038 |
by auto |
|
1039 |
also have "\<dots> \<subseteq> (\<Union>y\<in>X. N y)" |
|
1040 |
using N by auto |
|
1041 |
finally have "{x\<in>space M. \<not> (\<forall>y\<in>X. P x y)} \<subseteq> (\<Union>y\<in>X. N y)" . |
|
1042 |
moreover from N have "(\<Union>y\<in>X. N y) \<in> null_sets M" |
|
1043 |
by (intro null_sets_UN') auto |
|
1044 |
ultimately show "AE x in M. \<forall>y\<in>X. P x y" |
|
1045 |
unfolding eventually_ae_filter by auto |
|
1046 |
qed auto |
|
1047 |
||
57275
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1048 |
lemma AE_discrete_difference: |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1049 |
assumes X: "countable X" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1050 |
assumes null: "\<And>x. x \<in> X \<Longrightarrow> emeasure M {x} = 0" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1051 |
assumes sets: "\<And>x. x \<in> X \<Longrightarrow> {x} \<in> sets M" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1052 |
shows "AE x in M. x \<notin> X" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1053 |
proof - |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1054 |
have "(\<Union>x\<in>X. {x}) \<in> null_sets M" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1055 |
using assms by (intro null_sets_UN') auto |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1056 |
from AE_not_in[OF this] show "AE x in M. x \<notin> X" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1057 |
by auto |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1058 |
qed |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57235
diff
changeset
|
1059 |
|
47694 | 1060 |
lemma AE_finite_all: |
1061 |
assumes f: "finite S" shows "(AE x in M. \<forall>i\<in>S. P i x) \<longleftrightarrow> (\<forall>i\<in>S. AE x in M. P i x)" |
|
1062 |
using f by induct auto |
|
1063 |
||
1064 |
lemma AE_finite_allI: |
|
1065 |
assumes "finite S" |
|
1066 |
shows "(\<And>s. s \<in> S \<Longrightarrow> AE x in M. Q s x) \<Longrightarrow> AE x in M. \<forall>s\<in>S. Q s x" |
|
1067 |
using AE_finite_all[OF `finite S`] by auto |
|
1068 |
||
1069 |
lemma emeasure_mono_AE: |
|
1070 |
assumes imp: "AE x in M. x \<in> A \<longrightarrow> x \<in> B" |
|
1071 |
and B: "B \<in> sets M" |
|
1072 |
shows "emeasure M A \<le> emeasure M B" |
|
1073 |
proof cases |
|
1074 |
assume A: "A \<in> sets M" |
|
1075 |
from imp obtain N where N: "{x\<in>space M. \<not> (x \<in> A \<longrightarrow> x \<in> B)} \<subseteq> N" "N \<in> null_sets M" |
|
1076 |
by (auto simp: eventually_ae_filter) |
|
1077 |
have "emeasure M A = emeasure M (A - N)" |
|
1078 |
using N A by (subst emeasure_Diff_null_set) auto |
|
1079 |
also have "emeasure M (A - N) \<le> emeasure M (B - N)" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
1080 |
using N A B sets.sets_into_space by (auto intro!: emeasure_mono) |
47694 | 1081 |
also have "emeasure M (B - N) = emeasure M B" |
1082 |
using N B by (subst emeasure_Diff_null_set) auto |
|
1083 |
finally show ?thesis . |
|
1084 |
qed (simp add: emeasure_nonneg emeasure_notin_sets) |
|
1085 |
||
1086 |
lemma emeasure_eq_AE: |
|
1087 |
assumes iff: "AE x in M. x \<in> A \<longleftrightarrow> x \<in> B" |
|
1088 |
assumes A: "A \<in> sets M" and B: "B \<in> sets M" |
|
1089 |
shows "emeasure M A = emeasure M B" |
|
1090 |
using assms by (safe intro!: antisym emeasure_mono_AE) auto |
|
1091 |
||
59000 | 1092 |
lemma emeasure_Collect_eq_AE: |
1093 |
"AE x in M. P x \<longleftrightarrow> Q x \<Longrightarrow> Measurable.pred M Q \<Longrightarrow> Measurable.pred M P \<Longrightarrow> |
|
1094 |
emeasure M {x\<in>space M. P x} = emeasure M {x\<in>space M. Q x}" |
|
1095 |
by (intro emeasure_eq_AE) auto |
|
1096 |
||
1097 |
lemma emeasure_eq_0_AE: "AE x in M. \<not> P x \<Longrightarrow> emeasure M {x\<in>space M. P x} = 0" |
|
1098 |
using AE_iff_measurable[OF _ refl, of M "\<lambda>x. \<not> P x"] |
|
1099 |
by (cases "{x\<in>space M. P x} \<in> sets M") (simp_all add: emeasure_notin_sets) |
|
1100 |
||
56994 | 1101 |
subsection {* @{text \<sigma>}-finite Measures *} |
47694 | 1102 |
|
1103 |
locale sigma_finite_measure = |
|
1104 |
fixes M :: "'a measure" |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1105 |
assumes sigma_finite_countable: |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1106 |
"\<exists>A::'a set set. countable A \<and> A \<subseteq> sets M \<and> (\<Union>A) = space M \<and> (\<forall>a\<in>A. emeasure M a \<noteq> \<infinity>)" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1107 |
|
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1108 |
lemma (in sigma_finite_measure) sigma_finite: |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1109 |
obtains A :: "nat \<Rightarrow> 'a set" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1110 |
where "range A \<subseteq> sets M" "(\<Union>i. A i) = space M" "\<And>i. emeasure M (A i) \<noteq> \<infinity>" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1111 |
proof - |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1112 |
obtain A :: "'a set set" where |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1113 |
[simp]: "countable A" and |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1114 |
A: "A \<subseteq> sets M" "(\<Union>A) = space M" "\<And>a. a \<in> A \<Longrightarrow> emeasure M a \<noteq> \<infinity>" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1115 |
using sigma_finite_countable by metis |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1116 |
show thesis |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1117 |
proof cases |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1118 |
assume "A = {}" with `(\<Union>A) = space M` show thesis |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1119 |
by (intro that[of "\<lambda>_. {}"]) auto |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1120 |
next |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1121 |
assume "A \<noteq> {}" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1122 |
show thesis |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1123 |
proof |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1124 |
show "range (from_nat_into A) \<subseteq> sets M" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1125 |
using `A \<noteq> {}` A by auto |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1126 |
have "(\<Union>i. from_nat_into A i) = \<Union>A" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1127 |
using range_from_nat_into[OF `A \<noteq> {}` `countable A`] by auto |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1128 |
with A show "(\<Union>i. from_nat_into A i) = space M" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1129 |
by auto |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1130 |
qed (intro A from_nat_into `A \<noteq> {}`) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1131 |
qed |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1132 |
qed |
47694 | 1133 |
|
1134 |
lemma (in sigma_finite_measure) sigma_finite_disjoint: |
|
1135 |
obtains A :: "nat \<Rightarrow> 'a set" |
|
1136 |
where "range A \<subseteq> sets M" "(\<Union>i. A i) = space M" "\<And>i. emeasure M (A i) \<noteq> \<infinity>" "disjoint_family A" |
|
60580 | 1137 |
proof - |
47694 | 1138 |
obtain A :: "nat \<Rightarrow> 'a set" where |
1139 |
range: "range A \<subseteq> sets M" and |
|
1140 |
space: "(\<Union>i. A i) = space M" and |
|
1141 |
measure: "\<And>i. emeasure M (A i) \<noteq> \<infinity>" |
|
1142 |
using sigma_finite by auto |
|
60580 | 1143 |
show thesis |
1144 |
proof (rule that[of "disjointed A"]) |
|
1145 |
show "range (disjointed A) \<subseteq> sets M" |
|
1146 |
by (rule sets.range_disjointed_sets[OF range]) |
|
1147 |
show "(\<Union>i. disjointed A i) = space M" |
|
1148 |
and "disjoint_family (disjointed A)" |
|
1149 |
using disjoint_family_disjointed UN_disjointed_eq[of A] space range |
|
1150 |
by auto |
|
1151 |
show "emeasure M (disjointed A i) \<noteq> \<infinity>" for i |
|
1152 |
proof - |
|
1153 |
have "emeasure M (disjointed A i) \<le> emeasure M (A i)" |
|
1154 |
using range disjointed_subset[of A i] by (auto intro!: emeasure_mono) |
|
1155 |
then show ?thesis using measure[of i] by auto |
|
1156 |
qed |
|
1157 |
qed |
|
47694 | 1158 |
qed |
1159 |
||
1160 |
lemma (in sigma_finite_measure) sigma_finite_incseq: |
|
1161 |
obtains A :: "nat \<Rightarrow> 'a set" |
|
1162 |
where "range A \<subseteq> sets M" "(\<Union>i. A i) = space M" "\<And>i. emeasure M (A i) \<noteq> \<infinity>" "incseq A" |
|
60580 | 1163 |
proof - |
47694 | 1164 |
obtain F :: "nat \<Rightarrow> 'a set" where |
1165 |
F: "range F \<subseteq> sets M" "(\<Union>i. F i) = space M" "\<And>i. emeasure M (F i) \<noteq> \<infinity>" |
|
1166 |
using sigma_finite by auto |
|
60580 | 1167 |
show thesis |
1168 |
proof (rule that[of "\<lambda>n. \<Union>i\<le>n. F i"]) |
|
1169 |
show "range (\<lambda>n. \<Union>i\<le>n. F i) \<subseteq> sets M" |
|
1170 |
using F by (force simp: incseq_def) |
|
1171 |
show "(\<Union>n. \<Union>i\<le>n. F i) = space M" |
|
1172 |
proof - |
|
1173 |
from F have "\<And>x. x \<in> space M \<Longrightarrow> \<exists>i. x \<in> F i" by auto |
|
1174 |
with F show ?thesis by fastforce |
|
1175 |
qed |
|
1176 |
show "emeasure M (\<Union> i\<le>n. F i) \<noteq> \<infinity>" for n |
|
1177 |
proof - |
|
1178 |
have "emeasure M (\<Union> i\<le>n. F i) \<le> (\<Sum>i\<le>n. emeasure M (F i))" |
|
1179 |
using F by (auto intro!: emeasure_subadditive_finite) |
|
1180 |
also have "\<dots> < \<infinity>" |
|
1181 |
using F by (auto simp: setsum_Pinfty) |
|
1182 |
finally show ?thesis by simp |
|
1183 |
qed |
|
1184 |
show "incseq (\<lambda>n. \<Union>i\<le>n. F i)" |
|
1185 |
by (force simp: incseq_def) |
|
1186 |
qed |
|
47694 | 1187 |
qed |
1188 |
||
56994 | 1189 |
subsection {* Measure space induced by distribution of @{const measurable}-functions *} |
47694 | 1190 |
|
1191 |
definition distr :: "'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b measure" where |
|
1192 |
"distr M N f = measure_of (space N) (sets N) (\<lambda>A. emeasure M (f -` A \<inter> space M))" |
|
1193 |
||
1194 |
lemma |
|
59048 | 1195 |
shows sets_distr[simp, measurable_cong]: "sets (distr M N f) = sets N" |
47694 | 1196 |
and space_distr[simp]: "space (distr M N f) = space N" |
1197 |
by (auto simp: distr_def) |
|
1198 |
||
1199 |
lemma |
|
1200 |
shows measurable_distr_eq1[simp]: "measurable (distr Mf Nf f) Mf' = measurable Nf Mf'" |
|
1201 |
and measurable_distr_eq2[simp]: "measurable Mg' (distr Mg Ng g) = measurable Mg' Ng" |
|
1202 |
by (auto simp: measurable_def) |
|
1203 |
||
54417 | 1204 |
lemma distr_cong: |
1205 |
"M = K \<Longrightarrow> sets N = sets L \<Longrightarrow> (\<And>x. x \<in> space M \<Longrightarrow> f x = g x) \<Longrightarrow> distr M N f = distr K L g" |
|
1206 |
using sets_eq_imp_space_eq[of N L] by (simp add: distr_def Int_def cong: rev_conj_cong) |
|
1207 |
||
47694 | 1208 |
lemma emeasure_distr: |
1209 |
fixes f :: "'a \<Rightarrow> 'b" |
|
1210 |
assumes f: "f \<in> measurable M N" and A: "A \<in> sets N" |
|
1211 |
shows "emeasure (distr M N f) A = emeasure M (f -` A \<inter> space M)" (is "_ = ?\<mu> A") |
|
1212 |
unfolding distr_def |
|
1213 |
proof (rule emeasure_measure_of_sigma) |
|
1214 |
show "positive (sets N) ?\<mu>" |
|
1215 |
by (auto simp: positive_def) |
|
1216 |
||
1217 |
show "countably_additive (sets N) ?\<mu>" |
|
1218 |
proof (intro countably_additiveI) |
|
1219 |
fix A :: "nat \<Rightarrow> 'b set" assume "range A \<subseteq> sets N" "disjoint_family A" |
|
1220 |
then have A: "\<And>i. A i \<in> sets N" "(\<Union>i. A i) \<in> sets N" by auto |
|
1221 |
then have *: "range (\<lambda>i. f -` (A i) \<inter> space M) \<subseteq> sets M" |
|
1222 |
using f by (auto simp: measurable_def) |
|
1223 |
moreover have "(\<Union>i. f -` A i \<inter> space M) \<in> sets M" |
|
1224 |
using * by blast |
|
1225 |
moreover have **: "disjoint_family (\<lambda>i. f -` A i \<inter> space M)" |
|
1226 |
using `disjoint_family A` by (auto simp: disjoint_family_on_def) |
|
1227 |
ultimately show "(\<Sum>i. ?\<mu> (A i)) = ?\<mu> (\<Union>i. A i)" |
|
1228 |
using suminf_emeasure[OF _ **] A f |
|
1229 |
by (auto simp: comp_def vimage_UN) |
|
1230 |
qed |
|
1231 |
show "sigma_algebra (space N) (sets N)" .. |
|
1232 |
qed fact |
|
1233 |
||
59000 | 1234 |
lemma emeasure_Collect_distr: |
1235 |
assumes X[measurable]: "X \<in> measurable M N" "Measurable.pred N P" |
|
1236 |
shows "emeasure (distr M N X) {x\<in>space N. P x} = emeasure M {x\<in>space M. P (X x)}" |
|
1237 |
by (subst emeasure_distr) |
|
1238 |
(auto intro!: arg_cong2[where f=emeasure] X(1)[THEN measurable_space]) |
|
1239 |
||
1240 |
lemma emeasure_lfp2[consumes 1, case_names cont f measurable]: |
|
1241 |
assumes "P M" |
|
60172
423273355b55
rename continuous and down_continuous in Order_Continuity to sup_/inf_continuous; relate them with topological continuity
hoelzl
parents:
60142
diff
changeset
|
1242 |
assumes cont: "sup_continuous F" |
59000 | 1243 |
assumes f: "\<And>M. P M \<Longrightarrow> f \<in> measurable M' M" |
1244 |
assumes *: "\<And>M A. P M \<Longrightarrow> (\<And>N. P N \<Longrightarrow> Measurable.pred N A) \<Longrightarrow> Measurable.pred M (F A)" |
|
1245 |
shows "emeasure M' {x\<in>space M'. lfp F (f x)} = (SUP i. emeasure M' {x\<in>space M'. (F ^^ i) (\<lambda>x. False) (f x)})" |
|
1246 |
proof (subst (1 2) emeasure_Collect_distr[symmetric, where X=f]) |
|
1247 |
show "f \<in> measurable M' M" "f \<in> measurable M' M" |
|
1248 |
using f[OF `P M`] by auto |
|
1249 |
{ fix i show "Measurable.pred M ((F ^^ i) (\<lambda>x. False))" |
|
1250 |
using `P M` by (induction i arbitrary: M) (auto intro!: *) } |
|
1251 |
show "Measurable.pred M (lfp F)" |
|
1252 |
using `P M` cont * by (rule measurable_lfp_coinduct[of P]) |
|
1253 |
||
1254 |
have "emeasure (distr M' M f) {x \<in> space (distr M' M f). lfp F x} = |
|
1255 |
(SUP i. emeasure (distr M' M f) {x \<in> space (distr M' M f). (F ^^ i) (\<lambda>x. False) x})" |
|
1256 |
using `P M` |
|
1257 |
proof (coinduction arbitrary: M rule: emeasure_lfp) |
|
1258 |
case (measurable A N) then have "\<And>N. P N \<Longrightarrow> Measurable.pred (distr M' N f) A" |
|
1259 |
by metis |
|
1260 |
then have "\<And>N. P N \<Longrightarrow> Measurable.pred N A" |
|
1261 |
by simp |
|
1262 |
with `P N`[THEN *] show ?case |
|
1263 |
by auto |
|
1264 |
qed fact |
|
1265 |
then show "emeasure (distr M' M f) {x \<in> space M. lfp F x} = |
|
1266 |
(SUP i. emeasure (distr M' M f) {x \<in> space M. (F ^^ i) (\<lambda>x. False) x})" |
|
1267 |
by simp |
|
1268 |
qed |
|
1269 |
||
50104 | 1270 |
lemma distr_id[simp]: "distr N N (\<lambda>x. x) = N" |
1271 |
by (rule measure_eqI) (auto simp: emeasure_distr) |
|
1272 |
||
50001
382bd3173584
add syntax and a.e.-rules for (conditional) probability on predicates
hoelzl
parents:
49789
diff
changeset
|
1273 |
lemma measure_distr: |
382bd3173584
add syntax and a.e.-rules for (conditional) probability on predicates
hoelzl
parents:
49789
diff
changeset
|
1274 |
"f \<in> measurable M N \<Longrightarrow> S \<in> sets N \<Longrightarrow> measure (distr M N f) S = measure M (f -` S \<inter> space M)" |
382bd3173584
add syntax and a.e.-rules for (conditional) probability on predicates
hoelzl
parents:
49789
diff
changeset
|
1275 |
by (simp add: emeasure_distr measure_def) |
382bd3173584
add syntax and a.e.-rules for (conditional) probability on predicates
hoelzl
parents:
49789
diff
changeset
|
1276 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1277 |
lemma distr_cong_AE: |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1278 |
assumes 1: "M = K" "sets N = sets L" and |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1279 |
2: "(AE x in M. f x = g x)" and "f \<in> measurable M N" and "g \<in> measurable K L" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1280 |
shows "distr M N f = distr K L g" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1281 |
proof (rule measure_eqI) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1282 |
fix A assume "A \<in> sets (distr M N f)" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1283 |
with assms show "emeasure (distr M N f) A = emeasure (distr K L g) A" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1284 |
by (auto simp add: emeasure_distr intro!: emeasure_eq_AE measurable_sets) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1285 |
qed (insert 1, simp) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1286 |
|
47694 | 1287 |
lemma AE_distrD: |
1288 |
assumes f: "f \<in> measurable M M'" |
|
1289 |
and AE: "AE x in distr M M' f. P x" |
|
1290 |
shows "AE x in M. P (f x)" |
|
1291 |
proof - |
|
1292 |
from AE[THEN AE_E] guess N . |
|
1293 |
with f show ?thesis |
|
1294 |
unfolding eventually_ae_filter |
|
1295 |
by (intro bexI[of _ "f -` N \<inter> space M"]) |
|
1296 |
(auto simp: emeasure_distr measurable_def) |
|
1297 |
qed |
|
1298 |
||
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1299 |
lemma AE_distr_iff: |
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1300 |
assumes f[measurable]: "f \<in> measurable M N" and P[measurable]: "{x \<in> space N. P x} \<in> sets N" |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1301 |
shows "(AE x in distr M N f. P x) \<longleftrightarrow> (AE x in M. P (f x))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1302 |
proof (subst (1 2) AE_iff_measurable[OF _ refl]) |
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1303 |
have "f -` {x\<in>space N. \<not> P x} \<inter> space M = {x \<in> space M. \<not> P (f x)}" |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1304 |
using f[THEN measurable_space] by auto |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1305 |
then show "(emeasure (distr M N f) {x \<in> space (distr M N f). \<not> P x} = 0) = |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1306 |
(emeasure M {x \<in> space M. \<not> P (f x)} = 0)" |
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1307 |
by (simp add: emeasure_distr) |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1308 |
qed auto |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1309 |
|
47694 | 1310 |
lemma null_sets_distr_iff: |
1311 |
"f \<in> measurable M N \<Longrightarrow> A \<in> null_sets (distr M N f) \<longleftrightarrow> f -` A \<inter> space M \<in> null_sets M \<and> A \<in> sets N" |
|
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1312 |
by (auto simp add: null_sets_def emeasure_distr) |
47694 | 1313 |
|
1314 |
lemma distr_distr: |
|
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1315 |
"g \<in> measurable N L \<Longrightarrow> f \<in> measurable M N \<Longrightarrow> distr (distr M N f) L g = distr M L (g \<circ> f)" |
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
50001
diff
changeset
|
1316 |
by (auto simp add: emeasure_distr measurable_space |
47694 | 1317 |
intro!: arg_cong[where f="emeasure M"] measure_eqI) |
1318 |
||
56994 | 1319 |
subsection {* Real measure values *} |
47694 | 1320 |
|
1321 |
lemma measure_nonneg: "0 \<le> measure M A" |
|
1322 |
using emeasure_nonneg[of M A] unfolding measure_def by (auto intro: real_of_ereal_pos) |
|
1323 |
||
59000 | 1324 |
lemma measure_le_0_iff: "measure M X \<le> 0 \<longleftrightarrow> measure M X = 0" |
1325 |
using measure_nonneg[of M X] by auto |
|
1326 |
||
47694 | 1327 |
lemma measure_empty[simp]: "measure M {} = 0" |
1328 |
unfolding measure_def by simp |
|
1329 |
||
1330 |
lemma emeasure_eq_ereal_measure: |
|
1331 |
"emeasure M A \<noteq> \<infinity> \<Longrightarrow> emeasure M A = ereal (measure M A)" |
|
1332 |
using emeasure_nonneg[of M A] |
|
1333 |
by (cases "emeasure M A") (auto simp: measure_def) |
|
1334 |
||
1335 |
lemma measure_Union: |
|
1336 |
assumes finite: "emeasure M A \<noteq> \<infinity>" "emeasure M B \<noteq> \<infinity>" |
|
1337 |
and measurable: "A \<in> sets M" "B \<in> sets M" "A \<inter> B = {}" |
|
1338 |
shows "measure M (A \<union> B) = measure M A + measure M B" |
|
1339 |
unfolding measure_def |
|
1340 |
using plus_emeasure[OF measurable, symmetric] finite |
|
1341 |
by (simp add: emeasure_eq_ereal_measure) |
|
1342 |
||
1343 |
lemma measure_finite_Union: |
|
1344 |
assumes measurable: "A`S \<subseteq> sets M" "disjoint_family_on A S" "finite S" |
|
1345 |
assumes finite: "\<And>i. i \<in> S \<Longrightarrow> emeasure M (A i) \<noteq> \<infinity>" |
|
1346 |
shows "measure M (\<Union>i\<in>S. A i) = (\<Sum>i\<in>S. measure M (A i))" |
|
1347 |
unfolding measure_def |
|
1348 |
using setsum_emeasure[OF measurable, symmetric] finite |
|
1349 |
by (simp add: emeasure_eq_ereal_measure) |
|
1350 |
||
1351 |
lemma measure_Diff: |
|
1352 |
assumes finite: "emeasure M A \<noteq> \<infinity>" |
|
1353 |
and measurable: "A \<in> sets M" "B \<in> sets M" "B \<subseteq> A" |
|
1354 |
shows "measure M (A - B) = measure M A - measure M B" |
|
1355 |
proof - |
|
1356 |
have "emeasure M (A - B) \<le> emeasure M A" "emeasure M B \<le> emeasure M A" |
|
1357 |
using measurable by (auto intro!: emeasure_mono) |
|
1358 |
hence "measure M ((A - B) \<union> B) = measure M (A - B) + measure M B" |
|
1359 |
using measurable finite by (rule_tac measure_Union) auto |
|
1360 |
thus ?thesis using `B \<subseteq> A` by (auto simp: Un_absorb2) |
|
1361 |
qed |
|
1362 |
||
1363 |
lemma measure_UNION: |
|
1364 |
assumes measurable: "range A \<subseteq> sets M" "disjoint_family A" |
|
1365 |
assumes finite: "emeasure M (\<Union>i. A i) \<noteq> \<infinity>" |
|
1366 |
shows "(\<lambda>i. measure M (A i)) sums (measure M (\<Union>i. A i))" |
|
1367 |
proof - |
|
1368 |
from summable_sums[OF summable_ereal_pos, of "\<lambda>i. emeasure M (A i)"] |
|
1369 |
suminf_emeasure[OF measurable] emeasure_nonneg[of M] |
|
1370 |
have "(\<lambda>i. emeasure M (A i)) sums (emeasure M (\<Union>i. A i))" by simp |
|
1371 |
moreover |
|
1372 |
{ fix i |
|
1373 |
have "emeasure M (A i) \<le> emeasure M (\<Union>i. A i)" |
|
1374 |
using measurable by (auto intro!: emeasure_mono) |
|
1375 |
then have "emeasure M (A i) = ereal ((measure M (A i)))" |
|
1376 |
using finite by (intro emeasure_eq_ereal_measure) auto } |
|
1377 |
ultimately show ?thesis using finite |
|
1378 |
unfolding sums_ereal[symmetric] by (simp add: emeasure_eq_ereal_measure) |
|
1379 |
qed |
|
1380 |
||
1381 |
lemma measure_subadditive: |
|
1382 |
assumes measurable: "A \<in> sets M" "B \<in> sets M" |
|
1383 |
and fin: "emeasure M A \<noteq> \<infinity>" "emeasure M B \<noteq> \<infinity>" |
|
1384 |
shows "(measure M (A \<union> B)) \<le> (measure M A) + (measure M B)" |
|
1385 |
proof - |
|
1386 |
have "emeasure M (A \<union> B) \<noteq> \<infinity>" |
|
1387 |
using emeasure_subadditive[OF measurable] fin by auto |
|
1388 |
then show "(measure M (A \<union> B)) \<le> (measure M A) + (measure M B)" |
|
1389 |
using emeasure_subadditive[OF measurable] fin |
|
1390 |
by (auto simp: emeasure_eq_ereal_measure) |
|
1391 |
qed |
|
1392 |
||
1393 |
lemma measure_subadditive_finite: |
|
1394 |
assumes A: "finite I" "A`I \<subseteq> sets M" and fin: "\<And>i. i \<in> I \<Longrightarrow> emeasure M (A i) \<noteq> \<infinity>" |
|
1395 |
shows "measure M (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. measure M (A i))" |
|
1396 |
proof - |
|
1397 |
{ have "emeasure M (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. emeasure M (A i))" |
|
1398 |
using emeasure_subadditive_finite[OF A] . |
|
1399 |
also have "\<dots> < \<infinity>" |
|
1400 |
using fin by (simp add: setsum_Pinfty) |
|
1401 |
finally have "emeasure M (\<Union>i\<in>I. A i) \<noteq> \<infinity>" by simp } |
|
1402 |
then show ?thesis |
|
1403 |
using emeasure_subadditive_finite[OF A] fin |
|
1404 |
unfolding measure_def by (simp add: emeasure_eq_ereal_measure suminf_ereal measure_nonneg) |
|
1405 |
qed |
|
1406 |
||
1407 |
lemma measure_subadditive_countably: |
|
1408 |
assumes A: "range A \<subseteq> sets M" and fin: "(\<Sum>i. emeasure M (A i)) \<noteq> \<infinity>" |
|
1409 |
shows "measure M (\<Union>i. A i) \<le> (\<Sum>i. measure M (A i))" |
|
1410 |
proof - |
|
1411 |
from emeasure_nonneg fin have "\<And>i. emeasure M (A i) \<noteq> \<infinity>" by (rule suminf_PInfty) |
|
1412 |
moreover |
|
1413 |
{ have "emeasure M (\<Union>i. A i) \<le> (\<Sum>i. emeasure M (A i))" |
|
1414 |
using emeasure_subadditive_countably[OF A] . |
|
1415 |
also have "\<dots> < \<infinity>" |
|
1416 |
using fin by simp |
|
1417 |
finally have "emeasure M (\<Union>i. A i) \<noteq> \<infinity>" by simp } |
|
1418 |
ultimately show ?thesis |
|
1419 |
using emeasure_subadditive_countably[OF A] fin |
|
1420 |
unfolding measure_def by (simp add: emeasure_eq_ereal_measure suminf_ereal measure_nonneg) |
|
1421 |
qed |
|
1422 |
||
1423 |
lemma measure_eq_setsum_singleton: |
|
1424 |
assumes S: "finite S" "\<And>x. x \<in> S \<Longrightarrow> {x} \<in> sets M" |
|
1425 |
and fin: "\<And>x. x \<in> S \<Longrightarrow> emeasure M {x} \<noteq> \<infinity>" |
|
1426 |
shows "(measure M S) = (\<Sum>x\<in>S. (measure M {x}))" |
|
1427 |
unfolding measure_def |
|
1428 |
using emeasure_eq_setsum_singleton[OF S] fin |
|
1429 |
by simp (simp add: emeasure_eq_ereal_measure) |
|
1430 |
||
1431 |
lemma Lim_measure_incseq: |
|
1432 |
assumes A: "range A \<subseteq> sets M" "incseq A" and fin: "emeasure M (\<Union>i. A i) \<noteq> \<infinity>" |
|
1433 |
shows "(\<lambda>i. (measure M (A i))) ----> (measure M (\<Union>i. A i))" |
|
1434 |
proof - |
|
1435 |
have "ereal ((measure M (\<Union>i. A i))) = emeasure M (\<Union>i. A i)" |
|
1436 |
using fin by (auto simp: emeasure_eq_ereal_measure) |
|
1437 |
then show ?thesis |
|
1438 |
using Lim_emeasure_incseq[OF A] |
|
1439 |
unfolding measure_def |
|
1440 |
by (intro lim_real_of_ereal) simp |
|
1441 |
qed |
|
1442 |
||
1443 |
lemma Lim_measure_decseq: |
|
1444 |
assumes A: "range A \<subseteq> sets M" "decseq A" and fin: "\<And>i. emeasure M (A i) \<noteq> \<infinity>" |
|
1445 |
shows "(\<lambda>n. measure M (A n)) ----> measure M (\<Inter>i. A i)" |
|
1446 |
proof - |
|
1447 |
have "emeasure M (\<Inter>i. A i) \<le> emeasure M (A 0)" |
|
1448 |
using A by (auto intro!: emeasure_mono) |
|
1449 |
also have "\<dots> < \<infinity>" |
|
1450 |
using fin[of 0] by auto |
|
1451 |
finally have "ereal ((measure M (\<Inter>i. A i))) = emeasure M (\<Inter>i. A i)" |
|
1452 |
by (auto simp: emeasure_eq_ereal_measure) |
|
1453 |
then show ?thesis |
|
1454 |
unfolding measure_def |
|
1455 |
using Lim_emeasure_decseq[OF A fin] |
|
1456 |
by (intro lim_real_of_ereal) simp |
|
1457 |
qed |
|
1458 |
||
56994 | 1459 |
subsection {* Measure spaces with @{term "emeasure M (space M) < \<infinity>"} *} |
47694 | 1460 |
|
1461 |
locale finite_measure = sigma_finite_measure M for M + |
|
1462 |
assumes finite_emeasure_space: "emeasure M (space M) \<noteq> \<infinity>" |
|
1463 |
||
1464 |
lemma finite_measureI[Pure.intro!]: |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1465 |
"emeasure M (space M) \<noteq> \<infinity> \<Longrightarrow> finite_measure M" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1466 |
proof qed (auto intro!: exI[of _ "{space M}"]) |
47694 | 1467 |
|
1468 |
lemma (in finite_measure) emeasure_finite[simp, intro]: "emeasure M A \<noteq> \<infinity>" |
|
1469 |
using finite_emeasure_space emeasure_space[of M A] by auto |
|
1470 |
||
1471 |
lemma (in finite_measure) emeasure_eq_measure: "emeasure M A = ereal (measure M A)" |
|
1472 |
unfolding measure_def by (simp add: emeasure_eq_ereal_measure) |
|
1473 |
||
1474 |
lemma (in finite_measure) emeasure_real: "\<exists>r. 0 \<le> r \<and> emeasure M A = ereal r" |
|
1475 |
using emeasure_finite[of A] emeasure_nonneg[of M A] by (cases "emeasure M A") auto |
|
1476 |
||
1477 |
lemma (in finite_measure) bounded_measure: "measure M A \<le> measure M (space M)" |
|
1478 |
using emeasure_space[of M A] emeasure_real[of A] emeasure_real[of "space M"] by (auto simp: measure_def) |
|
1479 |
||
1480 |
lemma (in finite_measure) finite_measure_Diff: |
|
1481 |
assumes sets: "A \<in> sets M" "B \<in> sets M" and "B \<subseteq> A" |
|
1482 |
shows "measure M (A - B) = measure M A - measure M B" |
|
1483 |
using measure_Diff[OF _ assms] by simp |
|
1484 |
||
1485 |
lemma (in finite_measure) finite_measure_Union: |
|
1486 |
assumes sets: "A \<in> sets M" "B \<in> sets M" and "A \<inter> B = {}" |
|
1487 |
shows "measure M (A \<union> B) = measure M A + measure M B" |
|
1488 |
using measure_Union[OF _ _ assms] by simp |
|
1489 |
||
1490 |
lemma (in finite_measure) finite_measure_finite_Union: |
|
1491 |
assumes measurable: "A`S \<subseteq> sets M" "disjoint_family_on A S" "finite S" |
|
1492 |
shows "measure M (\<Union>i\<in>S. A i) = (\<Sum>i\<in>S. measure M (A i))" |
|
1493 |
using measure_finite_Union[OF assms] by simp |
|
1494 |
||
1495 |
lemma (in finite_measure) finite_measure_UNION: |
|
1496 |
assumes A: "range A \<subseteq> sets M" "disjoint_family A" |
|
1497 |
shows "(\<lambda>i. measure M (A i)) sums (measure M (\<Union>i. A i))" |
|
1498 |
using measure_UNION[OF A] by simp |
|
1499 |
||
1500 |
lemma (in finite_measure) finite_measure_mono: |
|
1501 |
assumes "A \<subseteq> B" "B \<in> sets M" shows "measure M A \<le> measure M B" |
|
1502 |
using emeasure_mono[OF assms] emeasure_real[of A] emeasure_real[of B] by (auto simp: measure_def) |
|
1503 |
||
1504 |
lemma (in finite_measure) finite_measure_subadditive: |
|
1505 |
assumes m: "A \<in> sets M" "B \<in> sets M" |
|
1506 |
shows "measure M (A \<union> B) \<le> measure M A + measure M B" |
|
1507 |
using measure_subadditive[OF m] by simp |
|
1508 |
||
1509 |
lemma (in finite_measure) finite_measure_subadditive_finite: |
|
1510 |
assumes "finite I" "A`I \<subseteq> sets M" shows "measure M (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. measure M (A i))" |
|
1511 |
using measure_subadditive_finite[OF assms] by simp |
|
1512 |
||
1513 |
lemma (in finite_measure) finite_measure_subadditive_countably: |
|
1514 |
assumes A: "range A \<subseteq> sets M" and sum: "summable (\<lambda>i. measure M (A i))" |
|
1515 |
shows "measure M (\<Union>i. A i) \<le> (\<Sum>i. measure M (A i))" |
|
1516 |
proof - |
|
1517 |
from `summable (\<lambda>i. measure M (A i))` |
|
1518 |
have "(\<lambda>i. ereal (measure M (A i))) sums ereal (\<Sum>i. measure M (A i))" |
|
1519 |
by (simp add: sums_ereal) (rule summable_sums) |
|
1520 |
from sums_unique[OF this, symmetric] |
|
1521 |
measure_subadditive_countably[OF A] |
|
1522 |
show ?thesis by (simp add: emeasure_eq_measure) |
|
1523 |
qed |
|
1524 |
||
1525 |
lemma (in finite_measure) finite_measure_eq_setsum_singleton: |
|
1526 |
assumes "finite S" and *: "\<And>x. x \<in> S \<Longrightarrow> {x} \<in> sets M" |
|
1527 |
shows "measure M S = (\<Sum>x\<in>S. measure M {x})" |
|
1528 |
using measure_eq_setsum_singleton[OF assms] by simp |
|
1529 |
||
1530 |
lemma (in finite_measure) finite_Lim_measure_incseq: |
|
1531 |
assumes A: "range A \<subseteq> sets M" "incseq A" |
|
1532 |
shows "(\<lambda>i. measure M (A i)) ----> measure M (\<Union>i. A i)" |
|
1533 |
using Lim_measure_incseq[OF A] by simp |
|
1534 |
||
1535 |
lemma (in finite_measure) finite_Lim_measure_decseq: |
|
1536 |
assumes A: "range A \<subseteq> sets M" "decseq A" |
|
1537 |
shows "(\<lambda>n. measure M (A n)) ----> measure M (\<Inter>i. A i)" |
|
1538 |
using Lim_measure_decseq[OF A] by simp |
|
1539 |
||
1540 |
lemma (in finite_measure) finite_measure_compl: |
|
1541 |
assumes S: "S \<in> sets M" |
|
1542 |
shows "measure M (space M - S) = measure M (space M) - measure M S" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
1543 |
using measure_Diff[OF _ sets.top S sets.sets_into_space] S by simp |
47694 | 1544 |
|
1545 |
lemma (in finite_measure) finite_measure_mono_AE: |
|
1546 |
assumes imp: "AE x in M. x \<in> A \<longrightarrow> x \<in> B" and B: "B \<in> sets M" |
|
1547 |
shows "measure M A \<le> measure M B" |
|
1548 |
using assms emeasure_mono_AE[OF imp B] |
|
1549 |
by (simp add: emeasure_eq_measure) |
|
1550 |
||
1551 |
lemma (in finite_measure) finite_measure_eq_AE: |
|
1552 |
assumes iff: "AE x in M. x \<in> A \<longleftrightarrow> x \<in> B" |
|
1553 |
assumes A: "A \<in> sets M" and B: "B \<in> sets M" |
|
1554 |
shows "measure M A = measure M B" |
|
1555 |
using assms emeasure_eq_AE[OF assms] by (simp add: emeasure_eq_measure) |
|
1556 |
||
50104 | 1557 |
lemma (in finite_measure) measure_increasing: "increasing M (measure M)" |
1558 |
by (auto intro!: finite_measure_mono simp: increasing_def) |
|
1559 |
||
1560 |
lemma (in finite_measure) measure_zero_union: |
|
1561 |
assumes "s \<in> sets M" "t \<in> sets M" "measure M t = 0" |
|
1562 |
shows "measure M (s \<union> t) = measure M s" |
|
1563 |
using assms |
|
1564 |
proof - |
|
1565 |
have "measure M (s \<union> t) \<le> measure M s" |
|
1566 |
using finite_measure_subadditive[of s t] assms by auto |
|
1567 |
moreover have "measure M (s \<union> t) \<ge> measure M s" |
|
1568 |
using assms by (blast intro: finite_measure_mono) |
|
1569 |
ultimately show ?thesis by simp |
|
1570 |
qed |
|
1571 |
||
1572 |
lemma (in finite_measure) measure_eq_compl: |
|
1573 |
assumes "s \<in> sets M" "t \<in> sets M" |
|
1574 |
assumes "measure M (space M - s) = measure M (space M - t)" |
|
1575 |
shows "measure M s = measure M t" |
|
1576 |
using assms finite_measure_compl by auto |
|
1577 |
||
1578 |
lemma (in finite_measure) measure_eq_bigunion_image: |
|
1579 |
assumes "range f \<subseteq> sets M" "range g \<subseteq> sets M" |
|
1580 |
assumes "disjoint_family f" "disjoint_family g" |
|
1581 |
assumes "\<And> n :: nat. measure M (f n) = measure M (g n)" |
|
1582 |
shows "measure M (\<Union> i. f i) = measure M (\<Union> i. g i)" |
|
1583 |
using assms |
|
1584 |
proof - |
|
1585 |
have a: "(\<lambda> i. measure M (f i)) sums (measure M (\<Union> i. f i))" |
|
1586 |
by (rule finite_measure_UNION[OF assms(1,3)]) |
|
1587 |
have b: "(\<lambda> i. measure M (g i)) sums (measure M (\<Union> i. g i))" |
|
1588 |
by (rule finite_measure_UNION[OF assms(2,4)]) |
|
1589 |
show ?thesis using sums_unique[OF b] sums_unique[OF a] assms by simp |
|
1590 |
qed |
|
1591 |
||
1592 |
lemma (in finite_measure) measure_countably_zero: |
|
1593 |
assumes "range c \<subseteq> sets M" |
|
1594 |
assumes "\<And> i. measure M (c i) = 0" |
|
1595 |
shows "measure M (\<Union> i :: nat. c i) = 0" |
|
1596 |
proof (rule antisym) |
|
1597 |
show "measure M (\<Union> i :: nat. c i) \<le> 0" |
|
1598 |
using finite_measure_subadditive_countably[OF assms(1)] by (simp add: assms(2)) |
|
1599 |
qed (simp add: measure_nonneg) |
|
1600 |
||
1601 |
lemma (in finite_measure) measure_space_inter: |
|
1602 |
assumes events:"s \<in> sets M" "t \<in> sets M" |
|
1603 |
assumes "measure M t = measure M (space M)" |
|
1604 |
shows "measure M (s \<inter> t) = measure M s" |
|
1605 |
proof - |
|
1606 |
have "measure M ((space M - s) \<union> (space M - t)) = measure M (space M - s)" |
|
1607 |
using events assms finite_measure_compl[of "t"] by (auto intro!: measure_zero_union) |
|
1608 |
also have "(space M - s) \<union> (space M - t) = space M - (s \<inter> t)" |
|
1609 |
by blast |
|
1610 |
finally show "measure M (s \<inter> t) = measure M s" |
|
1611 |
using events by (auto intro!: measure_eq_compl[of "s \<inter> t" s]) |
|
1612 |
qed |
|
1613 |
||
1614 |
lemma (in finite_measure) measure_equiprobable_finite_unions: |
|
1615 |
assumes s: "finite s" "\<And>x. x \<in> s \<Longrightarrow> {x} \<in> sets M" |
|
1616 |
assumes "\<And> x y. \<lbrakk>x \<in> s; y \<in> s\<rbrakk> \<Longrightarrow> measure M {x} = measure M {y}" |
|
1617 |
shows "measure M s = real (card s) * measure M {SOME x. x \<in> s}" |
|
1618 |
proof cases |
|
1619 |
assume "s \<noteq> {}" |
|
1620 |
then have "\<exists> x. x \<in> s" by blast |
|
1621 |
from someI_ex[OF this] assms |
|
1622 |
have prob_some: "\<And> x. x \<in> s \<Longrightarrow> measure M {x} = measure M {SOME y. y \<in> s}" by blast |
|
1623 |
have "measure M s = (\<Sum> x \<in> s. measure M {x})" |
|
1624 |
using finite_measure_eq_setsum_singleton[OF s] by simp |
|
1625 |
also have "\<dots> = (\<Sum> x \<in> s. measure M {SOME y. y \<in> s})" using prob_some by auto |
|
1626 |
also have "\<dots> = real (card s) * measure M {(SOME x. x \<in> s)}" |
|
1627 |
using setsum_constant assms by (simp add: real_eq_of_nat) |
|
1628 |
finally show ?thesis by simp |
|
1629 |
qed simp |
|
1630 |
||
1631 |
lemma (in finite_measure) measure_real_sum_image_fn: |
|
1632 |
assumes "e \<in> sets M" |
|
1633 |
assumes "\<And> x. x \<in> s \<Longrightarrow> e \<inter> f x \<in> sets M" |
|
1634 |
assumes "finite s" |
|
1635 |
assumes disjoint: "\<And> x y. \<lbrakk>x \<in> s ; y \<in> s ; x \<noteq> y\<rbrakk> \<Longrightarrow> f x \<inter> f y = {}" |
|
1636 |
assumes upper: "space M \<subseteq> (\<Union> i \<in> s. f i)" |
|
1637 |
shows "measure M e = (\<Sum> x \<in> s. measure M (e \<inter> f x))" |
|
1638 |
proof - |
|
1639 |
have e: "e = (\<Union> i \<in> s. e \<inter> f i)" |
|
50244
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
immler
parents:
50104
diff
changeset
|
1640 |
using `e \<in> sets M` sets.sets_into_space upper by blast |
50104 | 1641 |
hence "measure M e = measure M (\<Union> i \<in> s. e \<inter> f i)" by simp |
1642 |
also have "\<dots> = (\<Sum> x \<in> s. measure M (e \<inter> f x))" |
|
1643 |
proof (rule finite_measure_finite_Union) |
|
1644 |
show "finite s" by fact |
|
1645 |
show "(\<lambda>i. e \<inter> f i)`s \<subseteq> sets M" using assms(2) by auto |
|
1646 |
show "disjoint_family_on (\<lambda>i. e \<inter> f i) s" |
|
1647 |
using disjoint by (auto simp: disjoint_family_on_def) |
|
1648 |
qed |
|
1649 |
finally show ?thesis . |
|
1650 |
qed |
|
1651 |
||
1652 |
lemma (in finite_measure) measure_exclude: |
|
1653 |
assumes "A \<in> sets M" "B \<in> sets M" |
|
1654 |
assumes "measure M A = measure M (space M)" "A \<inter> B = {}" |
|
1655 |
shows "measure M B = 0" |
|
1656 |
using measure_space_inter[of B A] assms by (auto simp: ac_simps) |
|
57235
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
hoelzl
parents:
57137
diff
changeset
|
1657 |
lemma (in finite_measure) finite_measure_distr: |
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
hoelzl
parents:
57137
diff
changeset
|
1658 |
assumes f: "f \<in> measurable M M'" |
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
hoelzl
parents:
57137
diff
changeset
|
1659 |
shows "finite_measure (distr M M' f)" |
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
hoelzl
parents:
57137
diff
changeset
|
1660 |
proof (rule finite_measureI) |
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
hoelzl
parents:
57137
diff
changeset
|
1661 |
have "f -` space M' \<inter> space M = space M" using f by (auto dest: measurable_space) |
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
hoelzl
parents:
57137
diff
changeset
|
1662 |
with f show "emeasure (distr M M' f) (space (distr M M' f)) \<noteq> \<infinity>" by (auto simp: emeasure_distr) |
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
hoelzl
parents:
57137
diff
changeset
|
1663 |
qed |
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
hoelzl
parents:
57137
diff
changeset
|
1664 |
|
56994 | 1665 |
subsection {* Counting space *} |
47694 | 1666 |
|
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1667 |
lemma strict_monoI_Suc: |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1668 |
assumes ord [simp]: "(\<And>n. f n < f (Suc n))" shows "strict_mono f" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1669 |
unfolding strict_mono_def |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1670 |
proof safe |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1671 |
fix n m :: nat assume "n < m" then show "f n < f m" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1672 |
by (induct m) (auto simp: less_Suc_eq intro: less_trans ord) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1673 |
qed |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1674 |
|
47694 | 1675 |
lemma emeasure_count_space: |
1676 |
assumes "X \<subseteq> A" shows "emeasure (count_space A) X = (if finite X then ereal (card X) else \<infinity>)" |
|
1677 |
(is "_ = ?M X") |
|
1678 |
unfolding count_space_def |
|
1679 |
proof (rule emeasure_measure_of_sigma) |
|
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1680 |
show "X \<in> Pow A" using `X \<subseteq> A` by auto |
47694 | 1681 |
show "sigma_algebra A (Pow A)" by (rule sigma_algebra_Pow) |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1682 |
show positive: "positive (Pow A) ?M" |
47694 | 1683 |
by (auto simp: positive_def) |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1684 |
have additive: "additive (Pow A) ?M" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1685 |
by (auto simp: card_Un_disjoint additive_def) |
47694 | 1686 |
|
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1687 |
interpret ring_of_sets A "Pow A" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1688 |
by (rule ring_of_setsI) auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1689 |
show "countably_additive (Pow A) ?M" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1690 |
unfolding countably_additive_iff_continuous_from_below[OF positive additive] |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1691 |
proof safe |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1692 |
fix F :: "nat \<Rightarrow> 'a set" assume "incseq F" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1693 |
show "(\<lambda>i. ?M (F i)) ----> ?M (\<Union>i. F i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1694 |
proof cases |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1695 |
assume "\<exists>i. \<forall>j\<ge>i. F i = F j" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1696 |
then guess i .. note i = this |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1697 |
{ fix j from i `incseq F` have "F j \<subseteq> F i" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1698 |
by (cases "i \<le> j") (auto simp: incseq_def) } |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1699 |
then have eq: "(\<Union>i. F i) = F i" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1700 |
by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1701 |
with i show ?thesis |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1702 |
by (auto intro!: Lim_eventually eventually_sequentiallyI[where c=i]) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1703 |
next |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1704 |
assume "\<not> (\<exists>i. \<forall>j\<ge>i. F i = F j)" |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
1705 |
then obtain f where f: "\<And>i. i \<le> f i" "\<And>i. F i \<noteq> F (f i)" by metis |
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
1706 |
then have "\<And>i. F i \<subseteq> F (f i)" using `incseq F` by (auto simp: incseq_def) |
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51351
diff
changeset
|
1707 |
with f have *: "\<And>i. F i \<subset> F (f i)" by auto |
47694 | 1708 |
|
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1709 |
have "incseq (\<lambda>i. ?M (F i))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1710 |
using `incseq F` unfolding incseq_def by (auto simp: card_mono dest: finite_subset) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1711 |
then have "(\<lambda>i. ?M (F i)) ----> (SUP n. ?M (F n))" |
51000 | 1712 |
by (rule LIMSEQ_SUP) |
47694 | 1713 |
|
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1714 |
moreover have "(SUP n. ?M (F n)) = \<infinity>" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1715 |
proof (rule SUP_PInfty) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1716 |
fix n :: nat show "\<exists>k::nat\<in>UNIV. ereal n \<le> ?M (F k)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1717 |
proof (induct n) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1718 |
case (Suc n) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1719 |
then guess k .. note k = this |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1720 |
moreover have "finite (F k) \<Longrightarrow> finite (F (f k)) \<Longrightarrow> card (F k) < card (F (f k))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1721 |
using `F k \<subset> F (f k)` by (simp add: psubset_card_mono) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1722 |
moreover have "finite (F (f k)) \<Longrightarrow> finite (F k)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1723 |
using `k \<le> f k` `incseq F` by (auto simp: incseq_def dest: finite_subset) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1724 |
ultimately show ?case |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1725 |
by (auto intro!: exI[of _ "f k"]) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1726 |
qed auto |
47694 | 1727 |
qed |
49773
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1728 |
|
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1729 |
moreover |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1730 |
have "inj (\<lambda>n. F ((f ^^ n) 0))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1731 |
by (intro strict_mono_imp_inj_on strict_monoI_Suc) (simp add: *) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1732 |
then have 1: "infinite (range (\<lambda>i. F ((f ^^ i) 0)))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1733 |
by (rule range_inj_infinite) |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1734 |
have "infinite (Pow (\<Union>i. F i))" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1735 |
by (rule infinite_super[OF _ 1]) auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1736 |
then have "infinite (\<Union>i. F i)" |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1737 |
by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1738 |
|
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1739 |
ultimately show ?thesis by auto |
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
hoelzl
parents:
47762
diff
changeset
|
1740 |
qed |
47694 | 1741 |
qed |
1742 |
qed |
|
1743 |
||
59011
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1744 |
lemma distr_bij_count_space: |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1745 |
assumes f: "bij_betw f A B" |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1746 |
shows "distr (count_space A) (count_space B) f = count_space B" |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1747 |
proof (rule measure_eqI) |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1748 |
have f': "f \<in> measurable (count_space A) (count_space B)" |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1749 |
using f unfolding Pi_def bij_betw_def by auto |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1750 |
fix X assume "X \<in> sets (distr (count_space A) (count_space B) f)" |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1751 |
then have X: "X \<in> sets (count_space B)" by auto |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1752 |
moreover then have "f -` X \<inter> A = the_inv_into A f ` X" |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1753 |
using f by (auto simp: bij_betw_def subset_image_iff image_iff the_inv_into_f_f intro: the_inv_into_f_f[symmetric]) |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1754 |
moreover have "inj_on (the_inv_into A f) B" |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1755 |
using X f by (auto simp: bij_betw_def inj_on_the_inv_into) |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1756 |
with X have "inj_on (the_inv_into A f) X" |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1757 |
by (auto intro: subset_inj_on) |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1758 |
ultimately show "emeasure (distr (count_space A) (count_space B) f) X = emeasure (count_space B) X" |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1759 |
using f unfolding emeasure_distr[OF f' X] |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1760 |
by (subst (1 2) emeasure_count_space) (auto simp: card_image dest: finite_imageD) |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1761 |
qed simp |
4902a2fec434
add reindex rules for distr and nn_integral on count_space
hoelzl
parents:
59000
diff
changeset
|
1762 |
|
47694 | 1763 |
lemma emeasure_count_space_finite[simp]: |
1764 |
"X \<subseteq> A \<Longrightarrow> finite X \<Longrightarrow> emeasure (count_space A) X = ereal (card X)" |
|
1765 |
using emeasure_count_space[of X A] by simp |
|
1766 |
||
1767 |
lemma emeasure_count_space_infinite[simp]: |
|
1768 |
"X \<subseteq> A \<Longrightarrow> infinite X \<Longrightarrow> emeasure (count_space A) X = \<infinity>" |
|
1769 |
using emeasure_count_space[of X A] by simp |
|
1770 |
||
58606 | 1771 |
lemma measure_count_space: "measure (count_space A) X = (if X \<subseteq> A then card X else 0)" |
1772 |
unfolding measure_def |
|
1773 |
by (cases "finite X") (simp_all add: emeasure_notin_sets) |
|
1774 |
||
47694 | 1775 |
lemma emeasure_count_space_eq_0: |
1776 |
"emeasure (count_space A) X = 0 \<longleftrightarrow> (X \<subseteq> A \<longrightarrow> X = {})" |
|
1777 |
proof cases |
|
1778 |
assume X: "X \<subseteq> A" |
|
1779 |
then show ?thesis |
|
1780 |
proof (intro iffI impI) |
|
1781 |
assume "emeasure (count_space A) X = 0" |
|
1782 |
with X show "X = {}" |
|
1783 |
by (subst (asm) emeasure_count_space) (auto split: split_if_asm) |
|
1784 |
qed simp |
|
1785 |
qed (simp add: emeasure_notin_sets) |
|
1786 |
||
58606 | 1787 |
lemma space_empty: "space M = {} \<Longrightarrow> M = count_space {}" |
1788 |
by (rule measure_eqI) (simp_all add: space_empty_iff) |
|
1789 |
||
47694 | 1790 |
lemma null_sets_count_space: "null_sets (count_space A) = { {} }" |
1791 |
unfolding null_sets_def by (auto simp add: emeasure_count_space_eq_0) |
|
1792 |
||
1793 |
lemma AE_count_space: "(AE x in count_space A. P x) \<longleftrightarrow> (\<forall>x\<in>A. P x)" |
|
1794 |
unfolding eventually_ae_filter by (auto simp add: null_sets_count_space) |
|
1795 |
||
57025 | 1796 |
lemma sigma_finite_measure_count_space_countable: |
1797 |
assumes A: "countable A" |
|
47694 | 1798 |
shows "sigma_finite_measure (count_space A)" |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57446
diff
changeset
|
1799 |
proof qed (auto intro!: exI[of _ "(\<lambda>a. {a}) ` A"] simp: A) |
47694 | 1800 |
|
57025 | 1801 |
lemma sigma_finite_measure_count_space: |
1802 |
fixes A :: "'a::countable set" shows "sigma_finite_measure (count_space A)" |
|
1803 |
by (rule sigma_finite_measure_count_space_countable) auto |
|
1804 |
||
47694 | 1805 |
lemma finite_measure_count_space: |
1806 |
assumes [simp]: "finite A" |
|
1807 |
shows "finite_measure (count_space A)" |
|
1808 |
by rule simp |
|
1809 |
||
1810 |
lemma sigma_finite_measure_count_space_finite: |
|
1811 |
assumes A: "finite A" shows "sigma_finite_measure (count_space A)" |
|
1812 |
proof - |
|
1813 |
interpret finite_measure "count_space A" using A by (rule finite_measure_count_space) |
|
1814 |
show "sigma_finite_measure (count_space A)" .. |
|
1815 |
qed |
|
1816 |
||
56994 | 1817 |
subsection {* Measure restricted to space *} |
54417 | 1818 |
|
1819 |
lemma emeasure_restrict_space: |
|
57025 | 1820 |
assumes "\<Omega> \<inter> space M \<in> sets M" "A \<subseteq> \<Omega>" |
54417 | 1821 |
shows "emeasure (restrict_space M \<Omega>) A = emeasure M A" |
1822 |
proof cases |
|
1823 |
assume "A \<in> sets M" |
|
57025 | 1824 |
show ?thesis |
54417 | 1825 |
proof (rule emeasure_measure_of[OF restrict_space_def]) |
57025 | 1826 |
show "op \<inter> \<Omega> ` sets M \<subseteq> Pow (\<Omega> \<inter> space M)" "A \<in> sets (restrict_space M \<Omega>)" |
1827 |
using `A \<subseteq> \<Omega>` `A \<in> sets M` sets.space_closed by (auto simp: sets_restrict_space) |
|
1828 |
show "positive (sets (restrict_space M \<Omega>)) (emeasure M)" |
|
54417 | 1829 |
by (auto simp: positive_def emeasure_nonneg) |
57025 | 1830 |
show "countably_additive (sets (restrict_space M \<Omega>)) (emeasure M)" |
54417 | 1831 |
proof (rule countably_additiveI) |
1832 |
fix A :: "nat \<Rightarrow> _" assume "range A \<subseteq> sets (restrict_space M \<Omega>)" "disjoint_family A" |
|
1833 |
with assms have "\<And>i. A i \<in> sets M" "\<And>i. A i \<subseteq> space M" "disjoint_family A" |
|
57025 | 1834 |
by (fastforce simp: sets_restrict_space_iff[OF assms(1)] image_subset_iff |
1835 |
dest: sets.sets_into_space)+ |
|
1836 |
then show "(\<Sum>i. emeasure M (A i)) = emeasure M (\<Union>i. A i)" |
|
54417 | 1837 |
by (subst suminf_emeasure) (auto simp: disjoint_family_subset) |
1838 |
qed |
|
1839 |
qed |
|
1840 |
next |
|
1841 |
assume "A \<notin> sets M" |
|
1842 |
moreover with assms have "A \<notin> sets (restrict_space M \<Omega>)" |
|
1843 |
by (simp add: sets_restrict_space_iff) |
|
1844 |
ultimately show ?thesis |
|
1845 |
by (simp add: emeasure_notin_sets) |
|
1846 |
qed |
|
1847 |
||
57137 | 1848 |
lemma measure_restrict_space: |
1849 |
assumes "\<Omega> \<inter> space M \<in> sets M" "A \<subseteq> \<Omega>" |
|
1850 |
shows "measure (restrict_space M \<Omega>) A = measure M A" |
|
1851 |
using emeasure_restrict_space[OF assms] by (simp add: measure_def) |
|
1852 |
||
1853 |
lemma AE_restrict_space_iff: |
|
1854 |
assumes "\<Omega> \<inter> space M \<in> sets M" |
|
1855 |
shows "(AE x in restrict_space M \<Omega>. P x) \<longleftrightarrow> (AE x in M. x \<in> \<Omega> \<longrightarrow> P x)" |
|
1856 |
proof - |
|
1857 |
have ex_cong: "\<And>P Q f. (\<And>x. P x \<Longrightarrow> Q x) \<Longrightarrow> (\<And>x. Q x \<Longrightarrow> P (f x)) \<Longrightarrow> (\<exists>x. P x) \<longleftrightarrow> (\<exists>x. Q x)" |
|
1858 |
by auto |
|
1859 |
{ fix X assume X: "X \<in> sets M" "emeasure M X = 0" |
|
1860 |
then have "emeasure M (\<Omega> \<inter> space M \<inter> X) \<le> emeasure M X" |
|
1861 |
by (intro emeasure_mono) auto |
|
1862 |
then have "emeasure M (\<Omega> \<inter> space M \<inter> X) = 0" |
|
1863 |
using X by (auto intro!: antisym) } |
|
1864 |
with assms show ?thesis |
|
1865 |
unfolding eventually_ae_filter |
|
1866 |
by (auto simp add: space_restrict_space null_sets_def sets_restrict_space_iff |
|
1867 |
emeasure_restrict_space cong: conj_cong |
|
1868 |
intro!: ex_cong[where f="\<lambda>X. (\<Omega> \<inter> space M) \<inter> X"]) |
|
1869 |
qed |
|
1870 |
||
57025 | 1871 |
lemma restrict_restrict_space: |
1872 |
assumes "A \<inter> space M \<in> sets M" "B \<inter> space M \<in> sets M" |
|
1873 |
shows "restrict_space (restrict_space M A) B = restrict_space M (A \<inter> B)" (is "?l = ?r") |
|
1874 |
proof (rule measure_eqI[symmetric]) |
|
1875 |
show "sets ?r = sets ?l" |
|
1876 |
unfolding sets_restrict_space image_comp by (intro image_cong) auto |
|
1877 |
next |
|
1878 |
fix X assume "X \<in> sets (restrict_space M (A \<inter> B))" |
|
1879 |
then obtain Y where "Y \<in> sets M" "X = Y \<inter> A \<inter> B" |
|
1880 |
by (auto simp: sets_restrict_space) |
|
1881 |
with assms sets.Int[OF assms] show "emeasure ?r X = emeasure ?l X" |
|
1882 |
by (subst (1 2) emeasure_restrict_space) |
|
1883 |
(auto simp: space_restrict_space sets_restrict_space_iff emeasure_restrict_space ac_simps) |
|
1884 |
qed |
|
1885 |
||
1886 |
lemma restrict_count_space: "restrict_space (count_space B) A = count_space (A \<inter> B)" |
|
54417 | 1887 |
proof (rule measure_eqI) |
57025 | 1888 |
show "sets (restrict_space (count_space B) A) = sets (count_space (A \<inter> B))" |
1889 |
by (subst sets_restrict_space) auto |
|
54417 | 1890 |
moreover fix X assume "X \<in> sets (restrict_space (count_space B) A)" |
57025 | 1891 |
ultimately have "X \<subseteq> A \<inter> B" by auto |
1892 |
then show "emeasure (restrict_space (count_space B) A) X = emeasure (count_space (A \<inter> B)) X" |
|
54417 | 1893 |
by (cases "finite X") (auto simp add: emeasure_restrict_space) |
1894 |
qed |
|
1895 |
||
60063 | 1896 |
lemma sigma_finite_measure_restrict_space: |
1897 |
assumes "sigma_finite_measure M" |
|
1898 |
and A: "A \<in> sets M" |
|
1899 |
shows "sigma_finite_measure (restrict_space M A)" |
|
1900 |
proof - |
|
1901 |
interpret sigma_finite_measure M by fact |
|
1902 |
from sigma_finite_countable obtain C |
|
1903 |
where C: "countable C" "C \<subseteq> sets M" "(\<Union>C) = space M" "\<forall>a\<in>C. emeasure M a \<noteq> \<infinity>" |
|
1904 |
by blast |
|
1905 |
let ?C = "op \<inter> A ` C" |
|
1906 |
from C have "countable ?C" "?C \<subseteq> sets (restrict_space M A)" "(\<Union>?C) = space (restrict_space M A)" |
|
1907 |
by(auto simp add: sets_restrict_space space_restrict_space) |
|
1908 |
moreover { |
|
1909 |
fix a |
|
1910 |
assume "a \<in> ?C" |
|
1911 |
then obtain a' where "a = A \<inter> a'" "a' \<in> C" .. |
|
1912 |
then have "emeasure (restrict_space M A) a \<le> emeasure M a'" |
|
1913 |
using A C by(auto simp add: emeasure_restrict_space intro: emeasure_mono) |
|
1914 |
also have "\<dots> < \<infinity>" using C(4)[rule_format, of a'] \<open>a' \<in> C\<close> by simp |
|
1915 |
finally have "emeasure (restrict_space M A) a \<noteq> \<infinity>" by simp } |
|
1916 |
ultimately show ?thesis |
|
1917 |
by unfold_locales (rule exI conjI|assumption|blast)+ |
|
1918 |
qed |
|
1919 |
||
1920 |
lemma finite_measure_restrict_space: |
|
1921 |
assumes "finite_measure M" |
|
1922 |
and A: "A \<in> sets M" |
|
1923 |
shows "finite_measure (restrict_space M A)" |
|
1924 |
proof - |
|
1925 |
interpret finite_measure M by fact |
|
1926 |
show ?thesis |
|
1927 |
by(rule finite_measureI)(simp add: emeasure_restrict_space A space_restrict_space) |
|
1928 |
qed |
|
1929 |
||
57137 | 1930 |
lemma restrict_distr: |
1931 |
assumes [measurable]: "f \<in> measurable M N" |
|
1932 |
assumes [simp]: "\<Omega> \<inter> space N \<in> sets N" and restrict: "f \<in> space M \<rightarrow> \<Omega>" |
|
1933 |
shows "restrict_space (distr M N f) \<Omega> = distr M (restrict_space N \<Omega>) f" |
|
1934 |
(is "?l = ?r") |
|
1935 |
proof (rule measure_eqI) |
|
1936 |
fix A assume "A \<in> sets (restrict_space (distr M N f) \<Omega>)" |
|
1937 |
with restrict show "emeasure ?l A = emeasure ?r A" |
|
1938 |
by (subst emeasure_distr) |
|
1939 |
(auto simp: sets_restrict_space_iff emeasure_restrict_space emeasure_distr |
|
1940 |
intro!: measurable_restrict_space2) |
|
1941 |
qed (simp add: sets_restrict_space) |
|
1942 |
||
59000 | 1943 |
lemma measure_eqI_restrict_generator: |
1944 |
assumes E: "Int_stable E" "E \<subseteq> Pow \<Omega>" "\<And>X. X \<in> E \<Longrightarrow> emeasure M X = emeasure N X" |
|
1945 |
assumes sets_eq: "sets M = sets N" and \<Omega>: "\<Omega> \<in> sets M" |
|
1946 |
assumes "sets (restrict_space M \<Omega>) = sigma_sets \<Omega> E" |
|
1947 |
assumes "sets (restrict_space N \<Omega>) = sigma_sets \<Omega> E" |
|
1948 |
assumes ae: "AE x in M. x \<in> \<Omega>" "AE x in N. x \<in> \<Omega>" |
|
1949 |
assumes A: "countable A" "A \<noteq> {}" "A \<subseteq> E" "\<Union>A = \<Omega>" "\<And>a. a \<in> A \<Longrightarrow> emeasure M a \<noteq> \<infinity>" |
|
1950 |
shows "M = N" |
|
1951 |
proof (rule measure_eqI) |
|
1952 |
fix X assume X: "X \<in> sets M" |
|
1953 |
then have "emeasure M X = emeasure (restrict_space M \<Omega>) (X \<inter> \<Omega>)" |
|
1954 |
using ae \<Omega> by (auto simp add: emeasure_restrict_space intro!: emeasure_eq_AE) |
|
1955 |
also have "restrict_space M \<Omega> = restrict_space N \<Omega>" |
|
1956 |
proof (rule measure_eqI_generator_eq) |
|
1957 |
fix X assume "X \<in> E" |
|
1958 |
then show "emeasure (restrict_space M \<Omega>) X = emeasure (restrict_space N \<Omega>) X" |
|
1959 |
using E \<Omega> by (subst (1 2) emeasure_restrict_space) (auto simp: sets_eq sets_eq[THEN sets_eq_imp_space_eq]) |
|
1960 |
next |
|
1961 |
show "range (from_nat_into A) \<subseteq> E" "(\<Union>i. from_nat_into A i) = \<Omega>" |
|
1962 |
unfolding Sup_image_eq[symmetric, where f="from_nat_into A"] using A by auto |
|
1963 |
next |
|
1964 |
fix i |
|
1965 |
have "emeasure (restrict_space M \<Omega>) (from_nat_into A i) = emeasure M (from_nat_into A i)" |
|
1966 |
using A \<Omega> by (subst emeasure_restrict_space) |
|
1967 |
(auto simp: sets_eq sets_eq[THEN sets_eq_imp_space_eq] intro: from_nat_into) |
|
1968 |
with A show "emeasure (restrict_space M \<Omega>) (from_nat_into A i) \<noteq> \<infinity>" |
|
1969 |
by (auto intro: from_nat_into) |
|
1970 |
qed fact+ |
|
1971 |
also have "emeasure (restrict_space N \<Omega>) (X \<inter> \<Omega>) = emeasure N X" |
|
1972 |
using X ae \<Omega> by (auto simp add: emeasure_restrict_space sets_eq intro!: emeasure_eq_AE) |
|
1973 |
finally show "emeasure M X = emeasure N X" . |
|
1974 |
qed fact |
|
1975 |
||
59425 | 1976 |
subsection {* Null measure *} |
1977 |
||
1978 |
definition "null_measure M = sigma (space M) (sets M)" |
|
1979 |
||
1980 |
lemma space_null_measure[simp]: "space (null_measure M) = space M" |
|
1981 |
by (simp add: null_measure_def) |
|
1982 |
||
1983 |
lemma sets_null_measure[simp, measurable_cong]: "sets (null_measure M) = sets M" |
|
1984 |
by (simp add: null_measure_def) |
|
1985 |
||
1986 |
lemma emeasure_null_measure[simp]: "emeasure (null_measure M) X = 0" |
|
1987 |
by (cases "X \<in> sets M", rule emeasure_measure_of) |
|
1988 |
(auto simp: positive_def countably_additive_def emeasure_notin_sets null_measure_def |
|
1989 |
dest: sets.sets_into_space) |
|
1990 |
||
1991 |
lemma measure_null_measure[simp]: "measure (null_measure M) X = 0" |
|
1992 |
by (simp add: measure_def) |
|
1993 |
||
47694 | 1994 |
end |
1995 |