author | nipkow |
Mon, 13 Sep 2010 11:13:15 +0200 | |
changeset 39302 | d7728f65b353 |
parent 39092 | 98de40859858 |
child 39960 | 03174b2d075c |
permissions | -rw-r--r-- |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
1 |
(* Title: Sigma_Algebra.thy |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
2 |
Author: Stefan Richter, Markus Wenzel, TU Muenchen |
38656 | 3 |
Plus material from the Hurd/Coble measure theory development, |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
4 |
translated by Lawrence Paulson. |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
5 |
*) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
6 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
7 |
header {* Sigma Algebras *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
8 |
|
39092 | 9 |
theory Sigma_Algebra imports Main Countable FuncSet Indicator_Function begin |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
10 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
11 |
text {* Sigma algebras are an elementary concept in measure |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
12 |
theory. To measure --- that is to integrate --- functions, we first have |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
13 |
to measure sets. Unfortunately, when dealing with a large universe, |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
14 |
it is often not possible to consistently assign a measure to every |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
15 |
subset. Therefore it is necessary to define the set of measurable |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
16 |
subsets of the universe. A sigma algebra is such a set that has |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
17 |
three very natural and desirable properties. *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
18 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
19 |
subsection {* Algebras *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
20 |
|
38656 | 21 |
record 'a algebra = |
22 |
space :: "'a set" |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
23 |
sets :: "'a set set" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
24 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
25 |
locale algebra = |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
26 |
fixes M |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
27 |
assumes space_closed: "sets M \<subseteq> Pow (space M)" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
28 |
and empty_sets [iff]: "{} \<in> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
29 |
and compl_sets [intro]: "!!a. a \<in> sets M \<Longrightarrow> space M - a \<in> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
30 |
and Un [intro]: "!!a b. a \<in> sets M \<Longrightarrow> b \<in> sets M \<Longrightarrow> a \<union> b \<in> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
31 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
32 |
lemma (in algebra) top [iff]: "space M \<in> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
33 |
by (metis Diff_empty compl_sets empty_sets) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
34 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
35 |
lemma (in algebra) sets_into_space: "x \<in> sets M \<Longrightarrow> x \<subseteq> space M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
36 |
by (metis PowD contra_subsetD space_closed) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
37 |
|
38656 | 38 |
lemma (in algebra) Int [intro]: |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
39 |
assumes a: "a \<in> sets M" and b: "b \<in> sets M" shows "a \<inter> b \<in> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
40 |
proof - |
38656 | 41 |
have "((space M - a) \<union> (space M - b)) \<in> sets M" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
42 |
by (metis a b compl_sets Un) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
43 |
moreover |
38656 | 44 |
have "a \<inter> b = space M - ((space M - a) \<union> (space M - b))" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
45 |
using space_closed a b |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
46 |
by blast |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
47 |
ultimately show ?thesis |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
48 |
by (metis compl_sets) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
49 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
50 |
|
38656 | 51 |
lemma (in algebra) Diff [intro]: |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
52 |
assumes a: "a \<in> sets M" and b: "b \<in> sets M" shows "a - b \<in> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
53 |
proof - |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
54 |
have "(a \<inter> (space M - b)) \<in> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
55 |
by (metis a b compl_sets Int) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
56 |
moreover |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
57 |
have "a - b = (a \<inter> (space M - b))" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
58 |
by (metis Int_Diff Int_absorb1 Int_commute a sets_into_space) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
59 |
ultimately show ?thesis |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
60 |
by metis |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
61 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
62 |
|
38656 | 63 |
lemma (in algebra) finite_union [intro]: |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
64 |
"finite X \<Longrightarrow> X \<subseteq> sets M \<Longrightarrow> Union X \<in> sets M" |
38656 | 65 |
by (induct set: finite) (auto simp add: Un) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
66 |
|
38656 | 67 |
lemma algebra_iff_Int: |
68 |
"algebra M \<longleftrightarrow> |
|
69 |
sets M \<subseteq> Pow (space M) & {} \<in> sets M & |
|
70 |
(\<forall>a \<in> sets M. space M - a \<in> sets M) & |
|
71 |
(\<forall>a \<in> sets M. \<forall> b \<in> sets M. a \<inter> b \<in> sets M)" |
|
72 |
proof (auto simp add: algebra.Int, auto simp add: algebra_def) |
|
73 |
fix a b |
|
74 |
assume ab: "sets M \<subseteq> Pow (space M)" |
|
75 |
"\<forall>a\<in>sets M. space M - a \<in> sets M" |
|
76 |
"\<forall>a\<in>sets M. \<forall>b\<in>sets M. a \<inter> b \<in> sets M" |
|
77 |
"a \<in> sets M" "b \<in> sets M" |
|
78 |
hence "a \<union> b = space M - ((space M - a) \<inter> (space M - b))" |
|
79 |
by blast |
|
80 |
also have "... \<in> sets M" |
|
81 |
by (metis ab) |
|
82 |
finally show "a \<union> b \<in> sets M" . |
|
83 |
qed |
|
84 |
||
85 |
lemma (in algebra) insert_in_sets: |
|
86 |
assumes "{x} \<in> sets M" "A \<in> sets M" shows "insert x A \<in> sets M" |
|
87 |
proof - |
|
88 |
have "{x} \<union> A \<in> sets M" using assms by (rule Un) |
|
89 |
thus ?thesis by auto |
|
90 |
qed |
|
91 |
||
92 |
lemma (in algebra) Int_space_eq1 [simp]: "x \<in> sets M \<Longrightarrow> space M \<inter> x = x" |
|
93 |
by (metis Int_absorb1 sets_into_space) |
|
94 |
||
95 |
lemma (in algebra) Int_space_eq2 [simp]: "x \<in> sets M \<Longrightarrow> x \<inter> space M = x" |
|
96 |
by (metis Int_absorb2 sets_into_space) |
|
97 |
||
39092 | 98 |
section {* Restricted algebras *} |
99 |
||
100 |
abbreviation (in algebra) |
|
101 |
"restricted_space A \<equiv> \<lparr> space = A, sets = (\<lambda>S. (A \<inter> S)) ` sets M \<rparr>" |
|
102 |
||
38656 | 103 |
lemma (in algebra) restricted_algebra: |
39092 | 104 |
assumes "A \<in> sets M" shows "algebra (restricted_space A)" |
38656 | 105 |
using assms by unfold_locales auto |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
106 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
107 |
subsection {* Sigma Algebras *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
108 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
109 |
locale sigma_algebra = algebra + |
38656 | 110 |
assumes countable_nat_UN [intro]: |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
111 |
"!!A. range A \<subseteq> sets M \<Longrightarrow> (\<Union>i::nat. A i) \<in> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
112 |
|
39092 | 113 |
lemma sigma_algebra_cong: |
114 |
fixes M :: "('a, 'b) algebra_scheme" and M' :: "('a, 'c) algebra_scheme" |
|
115 |
assumes *: "sigma_algebra M" |
|
116 |
and cong: "space M = space M'" "sets M = sets M'" |
|
117 |
shows "sigma_algebra M'" |
|
118 |
using * unfolding sigma_algebra_def algebra_def sigma_algebra_axioms_def unfolding cong . |
|
119 |
||
38656 | 120 |
lemma countable_UN_eq: |
121 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
|
122 |
shows "(range A \<subseteq> sets M \<longrightarrow> (\<Union>i. A i) \<in> sets M) \<longleftrightarrow> |
|
123 |
(range (A \<circ> from_nat) \<subseteq> sets M \<longrightarrow> (\<Union>i. (A \<circ> from_nat) i) \<in> sets M)" |
|
124 |
proof - |
|
125 |
let ?A' = "A \<circ> from_nat" |
|
126 |
have *: "(\<Union>i. ?A' i) = (\<Union>i. A i)" (is "?l = ?r") |
|
127 |
proof safe |
|
128 |
fix x i assume "x \<in> A i" thus "x \<in> ?l" |
|
129 |
by (auto intro!: exI[of _ "to_nat i"]) |
|
130 |
next |
|
131 |
fix x i assume "x \<in> ?A' i" thus "x \<in> ?r" |
|
132 |
by (auto intro!: exI[of _ "from_nat i"]) |
|
133 |
qed |
|
134 |
have **: "range ?A' = range A" |
|
135 |
using surj_range[OF surj_from_nat] |
|
136 |
by (auto simp: image_compose intro!: imageI) |
|
137 |
show ?thesis unfolding * ** .. |
|
138 |
qed |
|
139 |
||
140 |
lemma (in sigma_algebra) countable_UN[intro]: |
|
141 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
|
142 |
assumes "A`X \<subseteq> sets M" |
|
143 |
shows "(\<Union>x\<in>X. A x) \<in> sets M" |
|
144 |
proof - |
|
145 |
let "?A i" = "if i \<in> X then A i else {}" |
|
146 |
from assms have "range ?A \<subseteq> sets M" by auto |
|
147 |
with countable_nat_UN[of "?A \<circ> from_nat"] countable_UN_eq[of ?A M] |
|
148 |
have "(\<Union>x. ?A x) \<in> sets M" by auto |
|
149 |
moreover have "(\<Union>x. ?A x) = (\<Union>x\<in>X. A x)" by (auto split: split_if_asm) |
|
150 |
ultimately show ?thesis by simp |
|
151 |
qed |
|
152 |
||
153 |
lemma (in sigma_algebra) finite_UN: |
|
154 |
assumes "finite I" and "\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets M" |
|
155 |
shows "(\<Union>i\<in>I. A i) \<in> sets M" |
|
156 |
using assms by induct auto |
|
157 |
||
33533
40b44cb20c8c
New theory Probability/Borel.thy, and some associated lemmas
paulson
parents:
33271
diff
changeset
|
158 |
lemma (in sigma_algebra) countable_INT [intro]: |
38656 | 159 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
160 |
assumes A: "A`X \<subseteq> sets M" "X \<noteq> {}" |
|
161 |
shows "(\<Inter>i\<in>X. A i) \<in> sets M" |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
162 |
proof - |
38656 | 163 |
from A have "\<forall>i\<in>X. A i \<in> sets M" by fast |
164 |
hence "space M - (\<Union>i\<in>X. space M - A i) \<in> sets M" by blast |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
165 |
moreover |
38656 | 166 |
have "(\<Inter>i\<in>X. A i) = space M - (\<Union>i\<in>X. space M - A i)" using space_closed A |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
167 |
by blast |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
168 |
ultimately show ?thesis by metis |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
169 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
170 |
|
38656 | 171 |
lemma (in sigma_algebra) finite_INT: |
172 |
assumes "finite I" "I \<noteq> {}" "\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets M" |
|
173 |
shows "(\<Inter>i\<in>I. A i) \<in> sets M" |
|
174 |
using assms by (induct rule: finite_ne_induct) auto |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
175 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
176 |
lemma algebra_Pow: |
38656 | 177 |
"algebra \<lparr> space = sp, sets = Pow sp, \<dots> = X \<rparr>" |
178 |
by (auto simp add: algebra_def) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
179 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
180 |
lemma sigma_algebra_Pow: |
38656 | 181 |
"sigma_algebra \<lparr> space = sp, sets = Pow sp, \<dots> = X \<rparr>" |
182 |
by (auto simp add: sigma_algebra_def sigma_algebra_axioms_def algebra_Pow) |
|
183 |
||
184 |
lemma sigma_algebra_iff: |
|
185 |
"sigma_algebra M \<longleftrightarrow> |
|
186 |
algebra M \<and> (\<forall>A. range A \<subseteq> sets M \<longrightarrow> (\<Union>i::nat. A i) \<in> sets M)" |
|
187 |
by (simp add: sigma_algebra_def sigma_algebra_axioms_def) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
188 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
189 |
subsection {* Binary Unions *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
190 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
191 |
definition binary :: "'a \<Rightarrow> 'a \<Rightarrow> nat \<Rightarrow> 'a" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
192 |
where "binary a b = (\<lambda>\<^isup>x. b)(0 := a)" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
193 |
|
38656 | 194 |
lemma range_binary_eq: "range(binary a b) = {a,b}" |
195 |
by (auto simp add: binary_def) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
196 |
|
38656 | 197 |
lemma Un_range_binary: "a \<union> b = (\<Union>i::nat. binary a b i)" |
198 |
by (simp add: UNION_eq_Union_image range_binary_eq) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
199 |
|
38656 | 200 |
lemma Int_range_binary: "a \<inter> b = (\<Inter>i::nat. binary a b i)" |
201 |
by (simp add: INTER_eq_Inter_image range_binary_eq) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
202 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
203 |
lemma sigma_algebra_iff2: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
204 |
"sigma_algebra M \<longleftrightarrow> |
38656 | 205 |
sets M \<subseteq> Pow (space M) \<and> |
206 |
{} \<in> sets M \<and> (\<forall>s \<in> sets M. space M - s \<in> sets M) \<and> |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
207 |
(\<forall>A. range A \<subseteq> sets M \<longrightarrow> (\<Union>i::nat. A i) \<in> sets M)" |
38656 | 208 |
by (auto simp add: range_binary_eq sigma_algebra_def sigma_algebra_axioms_def |
209 |
algebra_def Un_range_binary) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
210 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
211 |
subsection {* Initial Sigma Algebra *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
212 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
213 |
text {*Sigma algebras can naturally be created as the closure of any set of |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
214 |
sets with regard to the properties just postulated. *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
215 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
216 |
inductive_set |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
217 |
sigma_sets :: "'a set \<Rightarrow> 'a set set \<Rightarrow> 'a set set" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
218 |
for sp :: "'a set" and A :: "'a set set" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
219 |
where |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
220 |
Basic: "a \<in> A \<Longrightarrow> a \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
221 |
| Empty: "{} \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
222 |
| Compl: "a \<in> sigma_sets sp A \<Longrightarrow> sp - a \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
223 |
| Union: "(\<And>i::nat. a i \<in> sigma_sets sp A) \<Longrightarrow> (\<Union>i. a i) \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
224 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
225 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
226 |
definition |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
227 |
sigma where |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
228 |
"sigma sp A = (| space = sp, sets = sigma_sets sp A |)" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
229 |
|
38656 | 230 |
lemma sets_sigma: "sets (sigma A B) = sigma_sets A B" |
231 |
unfolding sigma_def by simp |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
232 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
233 |
lemma space_sigma [simp]: "space (sigma X B) = X" |
38656 | 234 |
by (simp add: sigma_def) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
235 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
236 |
lemma sigma_sets_top: "sp \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
237 |
by (metis Diff_empty sigma_sets.Compl sigma_sets.Empty) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
238 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
239 |
lemma sigma_sets_into_sp: "A \<subseteq> Pow sp \<Longrightarrow> x \<in> sigma_sets sp A \<Longrightarrow> x \<subseteq> sp" |
38656 | 240 |
by (erule sigma_sets.induct, auto) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
241 |
|
38656 | 242 |
lemma sigma_sets_Un: |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
243 |
"a \<in> sigma_sets sp A \<Longrightarrow> b \<in> sigma_sets sp A \<Longrightarrow> a \<union> b \<in> sigma_sets sp A" |
38656 | 244 |
apply (simp add: Un_range_binary range_binary_eq) |
37032 | 245 |
apply (rule Union, simp add: binary_def COMBK_def fun_upd_apply) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
246 |
done |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
247 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
248 |
lemma sigma_sets_Inter: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
249 |
assumes Asb: "A \<subseteq> Pow sp" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
250 |
shows "(\<And>i::nat. a i \<in> sigma_sets sp A) \<Longrightarrow> (\<Inter>i. a i) \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
251 |
proof - |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
252 |
assume ai: "\<And>i::nat. a i \<in> sigma_sets sp A" |
38656 | 253 |
hence "\<And>i::nat. sp-(a i) \<in> sigma_sets sp A" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
254 |
by (rule sigma_sets.Compl) |
38656 | 255 |
hence "(\<Union>i. sp-(a i)) \<in> sigma_sets sp A" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
256 |
by (rule sigma_sets.Union) |
38656 | 257 |
hence "sp-(\<Union>i. sp-(a i)) \<in> sigma_sets sp A" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
258 |
by (rule sigma_sets.Compl) |
38656 | 259 |
also have "sp-(\<Union>i. sp-(a i)) = sp Int (\<Inter>i. a i)" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
260 |
by auto |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
261 |
also have "... = (\<Inter>i. a i)" using ai |
38656 | 262 |
by (blast dest: sigma_sets_into_sp [OF Asb]) |
263 |
finally show ?thesis . |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
264 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
265 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
266 |
lemma sigma_sets_INTER: |
38656 | 267 |
assumes Asb: "A \<subseteq> Pow sp" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
268 |
and ai: "\<And>i::nat. i \<in> S \<Longrightarrow> a i \<in> sigma_sets sp A" and non: "S \<noteq> {}" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
269 |
shows "(\<Inter>i\<in>S. a i) \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
270 |
proof - |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
271 |
from ai have "\<And>i. (if i\<in>S then a i else sp) \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
272 |
by (simp add: sigma_sets.intros sigma_sets_top) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
273 |
hence "(\<Inter>i. (if i\<in>S then a i else sp)) \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
274 |
by (rule sigma_sets_Inter [OF Asb]) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
275 |
also have "(\<Inter>i. (if i\<in>S then a i else sp)) = (\<Inter>i\<in>S. a i)" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
276 |
by auto (metis ai non sigma_sets_into_sp subset_empty subset_iff Asb)+ |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
277 |
finally show ?thesis . |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
278 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
279 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
280 |
lemma (in sigma_algebra) sigma_sets_subset: |
38656 | 281 |
assumes a: "a \<subseteq> sets M" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
282 |
shows "sigma_sets (space M) a \<subseteq> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
283 |
proof |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
284 |
fix x |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
285 |
assume "x \<in> sigma_sets (space M) a" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
286 |
from this show "x \<in> sets M" |
38656 | 287 |
by (induct rule: sigma_sets.induct, auto) (metis a subsetD) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
288 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
289 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
290 |
lemma (in sigma_algebra) sigma_sets_eq: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
291 |
"sigma_sets (space M) (sets M) = sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
292 |
proof |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
293 |
show "sets M \<subseteq> sigma_sets (space M) (sets M)" |
37032 | 294 |
by (metis Set.subsetI sigma_sets.Basic) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
295 |
next |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
296 |
show "sigma_sets (space M) (sets M) \<subseteq> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
297 |
by (metis sigma_sets_subset subset_refl) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
298 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
299 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
300 |
lemma sigma_algebra_sigma_sets: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
301 |
"a \<subseteq> Pow (space M) \<Longrightarrow> sets M = sigma_sets (space M) a \<Longrightarrow> sigma_algebra M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
302 |
apply (auto simp add: sigma_algebra_def sigma_algebra_axioms_def |
38656 | 303 |
algebra_def sigma_sets.Empty sigma_sets.Compl sigma_sets_Un) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
304 |
apply (blast dest: sigma_sets_into_sp) |
37032 | 305 |
apply (rule sigma_sets.Union, fast) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
306 |
done |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
307 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
308 |
lemma sigma_algebra_sigma: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
309 |
"a \<subseteq> Pow X \<Longrightarrow> sigma_algebra (sigma X a)" |
38656 | 310 |
apply (rule sigma_algebra_sigma_sets) |
311 |
apply (auto simp add: sigma_def) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
312 |
done |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
313 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
314 |
lemma (in sigma_algebra) sigma_subset: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
315 |
"a \<subseteq> sets M ==> sets (sigma (space M) a) \<subseteq> (sets M)" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
316 |
by (simp add: sigma_def sigma_sets_subset) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
317 |
|
38656 | 318 |
lemma (in sigma_algebra) restriction_in_sets: |
319 |
fixes A :: "nat \<Rightarrow> 'a set" |
|
320 |
assumes "S \<in> sets M" |
|
321 |
and *: "range A \<subseteq> (\<lambda>A. S \<inter> A) ` sets M" (is "_ \<subseteq> ?r") |
|
322 |
shows "range A \<subseteq> sets M" "(\<Union>i. A i) \<in> (\<lambda>A. S \<inter> A) ` sets M" |
|
323 |
proof - |
|
324 |
{ fix i have "A i \<in> ?r" using * by auto |
|
325 |
hence "\<exists>B. A i = B \<inter> S \<and> B \<in> sets M" by auto |
|
326 |
hence "A i \<subseteq> S" "A i \<in> sets M" using `S \<in> sets M` by auto } |
|
327 |
thus "range A \<subseteq> sets M" "(\<Union>i. A i) \<in> (\<lambda>A. S \<inter> A) ` sets M" |
|
328 |
by (auto intro!: image_eqI[of _ _ "(\<Union>i. A i)"]) |
|
329 |
qed |
|
330 |
||
331 |
lemma (in sigma_algebra) restricted_sigma_algebra: |
|
332 |
assumes "S \<in> sets M" |
|
39092 | 333 |
shows "sigma_algebra (restricted_space S)" |
38656 | 334 |
unfolding sigma_algebra_def sigma_algebra_axioms_def |
335 |
proof safe |
|
39092 | 336 |
show "algebra (restricted_space S)" using restricted_algebra[OF assms] . |
38656 | 337 |
next |
39092 | 338 |
fix A :: "nat \<Rightarrow> 'a set" assume "range A \<subseteq> sets (restricted_space S)" |
38656 | 339 |
from restriction_in_sets[OF assms this[simplified]] |
39092 | 340 |
show "(\<Union>i. A i) \<in> sets (restricted_space S)" by simp |
38656 | 341 |
qed |
342 |
||
343 |
section {* Measurable functions *} |
|
344 |
||
345 |
definition |
|
346 |
"measurable A B = {f \<in> space A -> space B. \<forall>y \<in> sets B. f -` y \<inter> space A \<in> sets A}" |
|
347 |
||
348 |
lemma (in sigma_algebra) measurable_sigma: |
|
349 |
assumes B: "B \<subseteq> Pow X" |
|
350 |
and f: "f \<in> space M -> X" |
|
351 |
and ba: "\<And>y. y \<in> B \<Longrightarrow> (f -` y) \<inter> space M \<in> sets M" |
|
352 |
shows "f \<in> measurable M (sigma X B)" |
|
353 |
proof - |
|
354 |
have "sigma_sets X B \<subseteq> {y . (f -` y) \<inter> space M \<in> sets M & y \<subseteq> X}" |
|
355 |
proof clarify |
|
356 |
fix x |
|
357 |
assume "x \<in> sigma_sets X B" |
|
358 |
thus "f -` x \<inter> space M \<in> sets M \<and> x \<subseteq> X" |
|
359 |
proof induct |
|
360 |
case (Basic a) |
|
361 |
thus ?case |
|
362 |
by (auto simp add: ba) (metis B subsetD PowD) |
|
363 |
next |
|
364 |
case Empty |
|
365 |
thus ?case |
|
366 |
by auto |
|
367 |
next |
|
368 |
case (Compl a) |
|
369 |
have [simp]: "f -` X \<inter> space M = space M" |
|
370 |
by (auto simp add: funcset_mem [OF f]) |
|
371 |
thus ?case |
|
372 |
by (auto simp add: vimage_Diff Diff_Int_distrib2 compl_sets Compl) |
|
373 |
next |
|
374 |
case (Union a) |
|
375 |
thus ?case |
|
376 |
by (simp add: vimage_UN, simp only: UN_extend_simps(4)) |
|
377 |
(blast intro: countable_UN) |
|
378 |
qed |
|
379 |
qed |
|
380 |
thus ?thesis |
|
381 |
by (simp add: measurable_def sigma_algebra_axioms sigma_algebra_sigma B f) |
|
382 |
(auto simp add: sigma_def) |
|
383 |
qed |
|
384 |
||
385 |
lemma measurable_cong: |
|
386 |
assumes "\<And> w. w \<in> space M \<Longrightarrow> f w = g w" |
|
387 |
shows "f \<in> measurable M M' \<longleftrightarrow> g \<in> measurable M M'" |
|
388 |
unfolding measurable_def using assms |
|
389 |
by (simp cong: vimage_inter_cong Pi_cong) |
|
390 |
||
391 |
lemma measurable_space: |
|
392 |
"f \<in> measurable M A \<Longrightarrow> x \<in> space M \<Longrightarrow> f x \<in> space A" |
|
393 |
unfolding measurable_def by auto |
|
394 |
||
395 |
lemma measurable_sets: |
|
396 |
"f \<in> measurable M A \<Longrightarrow> S \<in> sets A \<Longrightarrow> f -` S \<inter> space M \<in> sets M" |
|
397 |
unfolding measurable_def by auto |
|
398 |
||
399 |
lemma (in sigma_algebra) measurable_subset: |
|
400 |
"(\<And>S. S \<in> sets A \<Longrightarrow> S \<subseteq> space A) \<Longrightarrow> measurable M A \<subseteq> measurable M (sigma (space A) (sets A))" |
|
401 |
by (auto intro: measurable_sigma measurable_sets measurable_space) |
|
402 |
||
403 |
lemma measurable_eqI: |
|
404 |
"\<lbrakk> space m1 = space m1' ; space m2 = space m2' ; |
|
405 |
sets m1 = sets m1' ; sets m2 = sets m2' \<rbrakk> |
|
406 |
\<Longrightarrow> measurable m1 m2 = measurable m1' m2'" |
|
407 |
by (simp add: measurable_def sigma_algebra_iff2) |
|
408 |
||
409 |
lemma (in sigma_algebra) measurable_const[intro, simp]: |
|
410 |
assumes "c \<in> space M'" |
|
411 |
shows "(\<lambda>x. c) \<in> measurable M M'" |
|
412 |
using assms by (auto simp add: measurable_def) |
|
413 |
||
414 |
lemma (in sigma_algebra) measurable_If: |
|
415 |
assumes measure: "f \<in> measurable M M'" "g \<in> measurable M M'" |
|
416 |
assumes P: "{x\<in>space M. P x} \<in> sets M" |
|
417 |
shows "(\<lambda>x. if P x then f x else g x) \<in> measurable M M'" |
|
418 |
unfolding measurable_def |
|
419 |
proof safe |
|
420 |
fix x assume "x \<in> space M" |
|
421 |
thus "(if P x then f x else g x) \<in> space M'" |
|
422 |
using measure unfolding measurable_def by auto |
|
423 |
next |
|
424 |
fix A assume "A \<in> sets M'" |
|
425 |
hence *: "(\<lambda>x. if P x then f x else g x) -` A \<inter> space M = |
|
426 |
((f -` A \<inter> space M) \<inter> {x\<in>space M. P x}) \<union> |
|
427 |
((g -` A \<inter> space M) \<inter> (space M - {x\<in>space M. P x}))" |
|
428 |
using measure unfolding measurable_def by (auto split: split_if_asm) |
|
429 |
show "(\<lambda>x. if P x then f x else g x) -` A \<inter> space M \<in> sets M" |
|
430 |
using `A \<in> sets M'` measure P unfolding * measurable_def |
|
431 |
by (auto intro!: Un) |
|
432 |
qed |
|
433 |
||
434 |
lemma (in sigma_algebra) measurable_If_set: |
|
435 |
assumes measure: "f \<in> measurable M M'" "g \<in> measurable M M'" |
|
436 |
assumes P: "A \<in> sets M" |
|
437 |
shows "(\<lambda>x. if x \<in> A then f x else g x) \<in> measurable M M'" |
|
438 |
proof (rule measurable_If[OF measure]) |
|
439 |
have "{x \<in> space M. x \<in> A} = A" using `A \<in> sets M` sets_into_space by auto |
|
440 |
thus "{x \<in> space M. x \<in> A} \<in> sets M" using `A \<in> sets M` by auto |
|
441 |
qed |
|
442 |
||
443 |
lemma (in algebra) measurable_ident[intro, simp]: "id \<in> measurable M M" |
|
444 |
by (auto simp add: measurable_def) |
|
445 |
||
446 |
lemma measurable_comp[intro]: |
|
447 |
fixes f :: "'a \<Rightarrow> 'b" and g :: "'b \<Rightarrow> 'c" |
|
448 |
shows "f \<in> measurable a b \<Longrightarrow> g \<in> measurable b c \<Longrightarrow> (g o f) \<in> measurable a c" |
|
449 |
apply (auto simp add: measurable_def vimage_compose) |
|
450 |
apply (subgoal_tac "f -` g -` y \<inter> space a = f -` (g -` y \<inter> space b) \<inter> space a") |
|
451 |
apply force+ |
|
452 |
done |
|
453 |
||
454 |
lemma measurable_strong: |
|
455 |
fixes f :: "'a \<Rightarrow> 'b" and g :: "'b \<Rightarrow> 'c" |
|
456 |
assumes f: "f \<in> measurable a b" and g: "g \<in> (space b -> space c)" |
|
457 |
and a: "sigma_algebra a" and b: "sigma_algebra b" and c: "sigma_algebra c" |
|
458 |
and t: "f ` (space a) \<subseteq> t" |
|
459 |
and cb: "\<And>s. s \<in> sets c \<Longrightarrow> (g -` s) \<inter> t \<in> sets b" |
|
460 |
shows "(g o f) \<in> measurable a c" |
|
461 |
proof - |
|
462 |
have fab: "f \<in> (space a -> space b)" |
|
463 |
and ba: "\<And>y. y \<in> sets b \<Longrightarrow> (f -` y) \<inter> (space a) \<in> sets a" using f |
|
464 |
by (auto simp add: measurable_def) |
|
465 |
have eq: "f -` g -` y \<inter> space a = f -` (g -` y \<inter> t) \<inter> space a" using t |
|
466 |
by force |
|
467 |
show ?thesis |
|
468 |
apply (auto simp add: measurable_def vimage_compose a c) |
|
469 |
apply (metis funcset_mem fab g) |
|
470 |
apply (subst eq, metis ba cb) |
|
471 |
done |
|
472 |
qed |
|
473 |
||
474 |
lemma measurable_mono1: |
|
475 |
"a \<subseteq> b \<Longrightarrow> sigma_algebra \<lparr>space = X, sets = b\<rparr> |
|
476 |
\<Longrightarrow> measurable \<lparr>space = X, sets = a\<rparr> c \<subseteq> measurable \<lparr>space = X, sets = b\<rparr> c" |
|
477 |
by (auto simp add: measurable_def) |
|
478 |
||
479 |
lemma measurable_up_sigma: |
|
480 |
"measurable A M \<subseteq> measurable (sigma (space A) (sets A)) M" |
|
481 |
unfolding measurable_def |
|
482 |
by (auto simp: sigma_def intro: sigma_sets.Basic) |
|
483 |
||
484 |
lemma (in sigma_algebra) measurable_range_reduce: |
|
485 |
"\<lbrakk> f \<in> measurable M \<lparr>space = s, sets = Pow s\<rparr> ; s \<noteq> {} \<rbrakk> |
|
486 |
\<Longrightarrow> f \<in> measurable M \<lparr>space = s \<inter> (f ` space M), sets = Pow (s \<inter> (f ` space M))\<rparr>" |
|
487 |
by (simp add: measurable_def sigma_algebra_Pow del: Pow_Int_eq) blast |
|
488 |
||
489 |
lemma (in sigma_algebra) measurable_Pow_to_Pow: |
|
490 |
"(sets M = Pow (space M)) \<Longrightarrow> f \<in> measurable M \<lparr>space = UNIV, sets = Pow UNIV\<rparr>" |
|
491 |
by (auto simp add: measurable_def sigma_algebra_def sigma_algebra_axioms_def algebra_def) |
|
492 |
||
493 |
lemma (in sigma_algebra) measurable_Pow_to_Pow_image: |
|
494 |
"sets M = Pow (space M) |
|
495 |
\<Longrightarrow> f \<in> measurable M \<lparr>space = f ` space M, sets = Pow (f ` space M)\<rparr>" |
|
496 |
by (simp add: measurable_def sigma_algebra_Pow) intro_locales |
|
497 |
||
498 |
lemma (in sigma_algebra) sigma_algebra_preimages: |
|
499 |
fixes f :: "'x \<Rightarrow> 'a" |
|
500 |
assumes "f \<in> A \<rightarrow> space M" |
|
501 |
shows "sigma_algebra \<lparr> space = A, sets = (\<lambda>M. f -` M \<inter> A) ` sets M \<rparr>" |
|
502 |
(is "sigma_algebra \<lparr> space = _, sets = ?F ` sets M \<rparr>") |
|
503 |
proof (simp add: sigma_algebra_iff2, safe) |
|
504 |
show "{} \<in> ?F ` sets M" by blast |
|
505 |
next |
|
506 |
fix S assume "S \<in> sets M" |
|
507 |
moreover have "A - ?F S = ?F (space M - S)" |
|
508 |
using assms by auto |
|
509 |
ultimately show "A - ?F S \<in> ?F ` sets M" |
|
510 |
by blast |
|
511 |
next |
|
512 |
fix S :: "nat \<Rightarrow> 'x set" assume *: "range S \<subseteq> ?F ` sets M" |
|
513 |
have "\<forall>i. \<exists>b. b \<in> sets M \<and> S i = ?F b" |
|
514 |
proof safe |
|
515 |
fix i |
|
516 |
have "S i \<in> ?F ` sets M" using * by auto |
|
517 |
then show "\<exists>b. b \<in> sets M \<and> S i = ?F b" by auto |
|
518 |
qed |
|
519 |
from choice[OF this] obtain b where b: "range b \<subseteq> sets M" "\<And>i. S i = ?F (b i)" |
|
520 |
by auto |
|
521 |
then have "(\<Union>i. S i) = ?F (\<Union>i. b i)" by auto |
|
522 |
then show "(\<Union>i. S i) \<in> ?F ` sets M" using b(1) by blast |
|
523 |
qed |
|
524 |
||
525 |
section "Disjoint families" |
|
526 |
||
527 |
definition |
|
528 |
disjoint_family_on where |
|
529 |
"disjoint_family_on A S \<longleftrightarrow> (\<forall>m\<in>S. \<forall>n\<in>S. m \<noteq> n \<longrightarrow> A m \<inter> A n = {})" |
|
530 |
||
531 |
abbreviation |
|
532 |
"disjoint_family A \<equiv> disjoint_family_on A UNIV" |
|
533 |
||
534 |
lemma range_subsetD: "range f \<subseteq> B \<Longrightarrow> f i \<in> B" |
|
535 |
by blast |
|
536 |
||
537 |
lemma Int_Diff_disjoint: "A \<inter> B \<inter> (A - B) = {}" |
|
538 |
by blast |
|
539 |
||
540 |
lemma Int_Diff_Un: "A \<inter> B \<union> (A - B) = A" |
|
541 |
by blast |
|
542 |
||
543 |
lemma disjoint_family_subset: |
|
544 |
"disjoint_family A \<Longrightarrow> (!!x. B x \<subseteq> A x) \<Longrightarrow> disjoint_family B" |
|
545 |
by (force simp add: disjoint_family_on_def) |
|
546 |
||
547 |
lemma disjoint_family_on_mono: |
|
548 |
"A \<subseteq> B \<Longrightarrow> disjoint_family_on f B \<Longrightarrow> disjoint_family_on f A" |
|
549 |
unfolding disjoint_family_on_def by auto |
|
550 |
||
551 |
lemma disjoint_family_Suc: |
|
552 |
assumes Suc: "!!n. A n \<subseteq> A (Suc n)" |
|
553 |
shows "disjoint_family (\<lambda>i. A (Suc i) - A i)" |
|
554 |
proof - |
|
555 |
{ |
|
556 |
fix m |
|
557 |
have "!!n. A n \<subseteq> A (m+n)" |
|
558 |
proof (induct m) |
|
559 |
case 0 show ?case by simp |
|
560 |
next |
|
561 |
case (Suc m) thus ?case |
|
562 |
by (metis Suc_eq_plus1 assms nat_add_commute nat_add_left_commute subset_trans) |
|
563 |
qed |
|
564 |
} |
|
565 |
hence "!!m n. m < n \<Longrightarrow> A m \<subseteq> A n" |
|
566 |
by (metis add_commute le_add_diff_inverse nat_less_le) |
|
567 |
thus ?thesis |
|
568 |
by (auto simp add: disjoint_family_on_def) |
|
569 |
(metis insert_absorb insert_subset le_SucE le_antisym not_leE) |
|
570 |
qed |
|
571 |
||
39092 | 572 |
lemma setsum_indicator_disjoint_family: |
573 |
fixes f :: "'d \<Rightarrow> 'e::semiring_1" |
|
574 |
assumes d: "disjoint_family_on A P" and "x \<in> A j" and "finite P" and "j \<in> P" |
|
575 |
shows "(\<Sum>i\<in>P. f i * indicator (A i) x) = f j" |
|
576 |
proof - |
|
577 |
have "P \<inter> {i. x \<in> A i} = {j}" |
|
578 |
using d `x \<in> A j` `j \<in> P` unfolding disjoint_family_on_def |
|
579 |
by auto |
|
580 |
thus ?thesis |
|
581 |
unfolding indicator_def |
|
582 |
by (simp add: if_distrib setsum_cases[OF `finite P`]) |
|
583 |
qed |
|
584 |
||
38656 | 585 |
definition disjointed :: "(nat \<Rightarrow> 'a set) \<Rightarrow> nat \<Rightarrow> 'a set " |
586 |
where "disjointed A n = A n - (\<Union>i\<in>{0..<n}. A i)" |
|
587 |
||
588 |
lemma finite_UN_disjointed_eq: "(\<Union>i\<in>{0..<n}. disjointed A i) = (\<Union>i\<in>{0..<n}. A i)" |
|
589 |
proof (induct n) |
|
590 |
case 0 show ?case by simp |
|
591 |
next |
|
592 |
case (Suc n) |
|
593 |
thus ?case by (simp add: atLeastLessThanSuc disjointed_def) |
|
594 |
qed |
|
595 |
||
596 |
lemma UN_disjointed_eq: "(\<Union>i. disjointed A i) = (\<Union>i. A i)" |
|
597 |
apply (rule UN_finite2_eq [where k=0]) |
|
598 |
apply (simp add: finite_UN_disjointed_eq) |
|
599 |
done |
|
600 |
||
601 |
lemma less_disjoint_disjointed: "m<n \<Longrightarrow> disjointed A m \<inter> disjointed A n = {}" |
|
602 |
by (auto simp add: disjointed_def) |
|
603 |
||
604 |
lemma disjoint_family_disjointed: "disjoint_family (disjointed A)" |
|
605 |
by (simp add: disjoint_family_on_def) |
|
606 |
(metis neq_iff Int_commute less_disjoint_disjointed) |
|
607 |
||
608 |
lemma disjointed_subset: "disjointed A n \<subseteq> A n" |
|
609 |
by (auto simp add: disjointed_def) |
|
610 |
||
611 |
lemma (in algebra) UNION_in_sets: |
|
612 |
fixes A:: "nat \<Rightarrow> 'a set" |
|
613 |
assumes A: "range A \<subseteq> sets M " |
|
614 |
shows "(\<Union>i\<in>{0..<n}. A i) \<in> sets M" |
|
615 |
proof (induct n) |
|
616 |
case 0 show ?case by simp |
|
617 |
next |
|
618 |
case (Suc n) |
|
619 |
thus ?case |
|
620 |
by (simp add: atLeastLessThanSuc) (metis A Un UNIV_I image_subset_iff) |
|
621 |
qed |
|
622 |
||
623 |
lemma (in algebra) range_disjointed_sets: |
|
624 |
assumes A: "range A \<subseteq> sets M " |
|
625 |
shows "range (disjointed A) \<subseteq> sets M" |
|
626 |
proof (auto simp add: disjointed_def) |
|
627 |
fix n |
|
628 |
show "A n - (\<Union>i\<in>{0..<n}. A i) \<in> sets M" using UNION_in_sets |
|
629 |
by (metis A Diff UNIV_I image_subset_iff) |
|
630 |
qed |
|
631 |
||
632 |
lemma sigma_algebra_disjoint_iff: |
|
633 |
"sigma_algebra M \<longleftrightarrow> |
|
634 |
algebra M & |
|
635 |
(\<forall>A. range A \<subseteq> sets M \<longrightarrow> disjoint_family A \<longrightarrow> |
|
636 |
(\<Union>i::nat. A i) \<in> sets M)" |
|
637 |
proof (auto simp add: sigma_algebra_iff) |
|
638 |
fix A :: "nat \<Rightarrow> 'a set" |
|
639 |
assume M: "algebra M" |
|
640 |
and A: "range A \<subseteq> sets M" |
|
641 |
and UnA: "\<forall>A. range A \<subseteq> sets M \<longrightarrow> |
|
642 |
disjoint_family A \<longrightarrow> (\<Union>i::nat. A i) \<in> sets M" |
|
643 |
hence "range (disjointed A) \<subseteq> sets M \<longrightarrow> |
|
644 |
disjoint_family (disjointed A) \<longrightarrow> |
|
645 |
(\<Union>i. disjointed A i) \<in> sets M" by blast |
|
646 |
hence "(\<Union>i. disjointed A i) \<in> sets M" |
|
647 |
by (simp add: algebra.range_disjointed_sets M A disjoint_family_disjointed) |
|
648 |
thus "(\<Union>i::nat. A i) \<in> sets M" by (simp add: UN_disjointed_eq) |
|
649 |
qed |
|
650 |
||
39090
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
651 |
subsection {* Sigma algebra generated by function preimages *} |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
652 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
653 |
definition (in sigma_algebra) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
654 |
"vimage_algebra S f = \<lparr> space = S, sets = (\<lambda>A. f -` A \<inter> S) ` sets M \<rparr>" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
655 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
656 |
lemma (in sigma_algebra) in_vimage_algebra[simp]: |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
657 |
"A \<in> sets (vimage_algebra S f) \<longleftrightarrow> (\<exists>B\<in>sets M. A = f -` B \<inter> S)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
658 |
by (simp add: vimage_algebra_def image_iff) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
659 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
660 |
lemma (in sigma_algebra) space_vimage_algebra[simp]: |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
661 |
"space (vimage_algebra S f) = S" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
662 |
by (simp add: vimage_algebra_def) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
663 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
664 |
lemma (in sigma_algebra) sigma_algebra_vimage: |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
665 |
fixes S :: "'c set" assumes "f \<in> S \<rightarrow> space M" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
666 |
shows "sigma_algebra (vimage_algebra S f)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
667 |
proof |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
668 |
fix A assume "A \<in> sets (vimage_algebra S f)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
669 |
then guess B unfolding in_vimage_algebra .. |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
670 |
then show "space (vimage_algebra S f) - A \<in> sets (vimage_algebra S f)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
671 |
using sets_into_space assms |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
672 |
by (auto intro!: bexI[of _ "space M - B"]) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
673 |
next |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
674 |
fix A assume "A \<in> sets (vimage_algebra S f)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
675 |
then guess A' unfolding in_vimage_algebra .. note A' = this |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
676 |
fix B assume "B \<in> sets (vimage_algebra S f)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
677 |
then guess B' unfolding in_vimage_algebra .. note B' = this |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
678 |
then show "A \<union> B \<in> sets (vimage_algebra S f)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
679 |
using sets_into_space assms A' B' |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
680 |
by (auto intro!: bexI[of _ "A' \<union> B'"]) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
681 |
next |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
682 |
fix A::"nat \<Rightarrow> 'c set" assume "range A \<subseteq> sets (vimage_algebra S f)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
683 |
then have "\<forall>i. \<exists>B. A i = f -` B \<inter> S \<and> B \<in> sets M" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
684 |
by (simp add: subset_eq) blast |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
685 |
from this[THEN choice] obtain B |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
686 |
where B: "\<And>i. A i = f -` B i \<inter> S" "range B \<subseteq> sets M" by auto |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
687 |
show "(\<Union>i. A i) \<in> sets (vimage_algebra S f)" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
688 |
using B by (auto intro!: bexI[of _ "\<Union>i. B i"]) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
689 |
qed auto |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
690 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
691 |
lemma (in sigma_algebra) measurable_vimage_algebra: |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
692 |
fixes S :: "'c set" assumes "f \<in> S \<rightarrow> space M" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
693 |
shows "f \<in> measurable (vimage_algebra S f) M" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
694 |
unfolding measurable_def using assms by force |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
695 |
|
39092 | 696 |
section {* Conditional space *} |
697 |
||
698 |
definition (in algebra) |
|
699 |
"image_space X = \<lparr> space = X`space M, sets = (\<lambda>S. X`S) ` sets M \<rparr>" |
|
700 |
||
701 |
definition (in algebra) |
|
702 |
"conditional_space X A = algebra.image_space (restricted_space A) X" |
|
703 |
||
704 |
lemma (in algebra) space_conditional_space: |
|
705 |
assumes "A \<in> sets M" shows "space (conditional_space X A) = X`A" |
|
706 |
proof - |
|
707 |
interpret r: algebra "restricted_space A" using assms by (rule restricted_algebra) |
|
708 |
show ?thesis unfolding conditional_space_def r.image_space_def |
|
709 |
by simp |
|
710 |
qed |
|
711 |
||
38656 | 712 |
subsection {* A Two-Element Series *} |
713 |
||
714 |
definition binaryset :: "'a set \<Rightarrow> 'a set \<Rightarrow> nat \<Rightarrow> 'a set " |
|
715 |
where "binaryset A B = (\<lambda>\<^isup>x. {})(0 := A, Suc 0 := B)" |
|
716 |
||
717 |
lemma range_binaryset_eq: "range(binaryset A B) = {A,B,{}}" |
|
718 |
apply (simp add: binaryset_def) |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39092
diff
changeset
|
719 |
apply (rule set_eqI) |
38656 | 720 |
apply (auto simp add: image_iff) |
721 |
done |
|
722 |
||
723 |
lemma UN_binaryset_eq: "(\<Union>i. binaryset A B i) = A \<union> B" |
|
724 |
by (simp add: UNION_eq_Union_image range_binaryset_eq) |
|
725 |
||
726 |
section {* Closed CDI *} |
|
727 |
||
728 |
definition |
|
729 |
closed_cdi where |
|
730 |
"closed_cdi M \<longleftrightarrow> |
|
731 |
sets M \<subseteq> Pow (space M) & |
|
732 |
(\<forall>s \<in> sets M. space M - s \<in> sets M) & |
|
733 |
(\<forall>A. (range A \<subseteq> sets M) & (A 0 = {}) & (\<forall>n. A n \<subseteq> A (Suc n)) \<longrightarrow> |
|
734 |
(\<Union>i. A i) \<in> sets M) & |
|
735 |
(\<forall>A. (range A \<subseteq> sets M) & disjoint_family A \<longrightarrow> (\<Union>i::nat. A i) \<in> sets M)" |
|
736 |
||
737 |
||
738 |
inductive_set |
|
739 |
smallest_ccdi_sets :: "('a, 'b) algebra_scheme \<Rightarrow> 'a set set" |
|
740 |
for M |
|
741 |
where |
|
742 |
Basic [intro]: |
|
743 |
"a \<in> sets M \<Longrightarrow> a \<in> smallest_ccdi_sets M" |
|
744 |
| Compl [intro]: |
|
745 |
"a \<in> smallest_ccdi_sets M \<Longrightarrow> space M - a \<in> smallest_ccdi_sets M" |
|
746 |
| Inc: |
|
747 |
"range A \<in> Pow(smallest_ccdi_sets M) \<Longrightarrow> A 0 = {} \<Longrightarrow> (\<And>n. A n \<subseteq> A (Suc n)) |
|
748 |
\<Longrightarrow> (\<Union>i. A i) \<in> smallest_ccdi_sets M" |
|
749 |
| Disj: |
|
750 |
"range A \<in> Pow(smallest_ccdi_sets M) \<Longrightarrow> disjoint_family A |
|
751 |
\<Longrightarrow> (\<Union>i::nat. A i) \<in> smallest_ccdi_sets M" |
|
752 |
monos Pow_mono |
|
753 |
||
754 |
||
755 |
definition |
|
756 |
smallest_closed_cdi where |
|
757 |
"smallest_closed_cdi M = (|space = space M, sets = smallest_ccdi_sets M|)" |
|
758 |
||
759 |
lemma space_smallest_closed_cdi [simp]: |
|
760 |
"space (smallest_closed_cdi M) = space M" |
|
761 |
by (simp add: smallest_closed_cdi_def) |
|
762 |
||
763 |
lemma (in algebra) smallest_closed_cdi1: "sets M \<subseteq> sets (smallest_closed_cdi M)" |
|
764 |
by (auto simp add: smallest_closed_cdi_def) |
|
765 |
||
766 |
lemma (in algebra) smallest_ccdi_sets: |
|
767 |
"smallest_ccdi_sets M \<subseteq> Pow (space M)" |
|
768 |
apply (rule subsetI) |
|
769 |
apply (erule smallest_ccdi_sets.induct) |
|
770 |
apply (auto intro: range_subsetD dest: sets_into_space) |
|
771 |
done |
|
772 |
||
773 |
lemma (in algebra) smallest_closed_cdi2: "closed_cdi (smallest_closed_cdi M)" |
|
774 |
apply (auto simp add: closed_cdi_def smallest_closed_cdi_def smallest_ccdi_sets) |
|
775 |
apply (blast intro: smallest_ccdi_sets.Inc smallest_ccdi_sets.Disj) + |
|
776 |
done |
|
777 |
||
778 |
lemma (in algebra) smallest_closed_cdi3: |
|
779 |
"sets (smallest_closed_cdi M) \<subseteq> Pow (space M)" |
|
780 |
by (simp add: smallest_closed_cdi_def smallest_ccdi_sets) |
|
781 |
||
782 |
lemma closed_cdi_subset: "closed_cdi M \<Longrightarrow> sets M \<subseteq> Pow (space M)" |
|
783 |
by (simp add: closed_cdi_def) |
|
784 |
||
785 |
lemma closed_cdi_Compl: "closed_cdi M \<Longrightarrow> s \<in> sets M \<Longrightarrow> space M - s \<in> sets M" |
|
786 |
by (simp add: closed_cdi_def) |
|
787 |
||
788 |
lemma closed_cdi_Inc: |
|
789 |
"closed_cdi M \<Longrightarrow> range A \<subseteq> sets M \<Longrightarrow> A 0 = {} \<Longrightarrow> (!!n. A n \<subseteq> A (Suc n)) \<Longrightarrow> |
|
790 |
(\<Union>i. A i) \<in> sets M" |
|
791 |
by (simp add: closed_cdi_def) |
|
792 |
||
793 |
lemma closed_cdi_Disj: |
|
794 |
"closed_cdi M \<Longrightarrow> range A \<subseteq> sets M \<Longrightarrow> disjoint_family A \<Longrightarrow> (\<Union>i::nat. A i) \<in> sets M" |
|
795 |
by (simp add: closed_cdi_def) |
|
796 |
||
797 |
lemma closed_cdi_Un: |
|
798 |
assumes cdi: "closed_cdi M" and empty: "{} \<in> sets M" |
|
799 |
and A: "A \<in> sets M" and B: "B \<in> sets M" |
|
800 |
and disj: "A \<inter> B = {}" |
|
801 |
shows "A \<union> B \<in> sets M" |
|
802 |
proof - |
|
803 |
have ra: "range (binaryset A B) \<subseteq> sets M" |
|
804 |
by (simp add: range_binaryset_eq empty A B) |
|
805 |
have di: "disjoint_family (binaryset A B)" using disj |
|
806 |
by (simp add: disjoint_family_on_def binaryset_def Int_commute) |
|
807 |
from closed_cdi_Disj [OF cdi ra di] |
|
808 |
show ?thesis |
|
809 |
by (simp add: UN_binaryset_eq) |
|
810 |
qed |
|
811 |
||
812 |
lemma (in algebra) smallest_ccdi_sets_Un: |
|
813 |
assumes A: "A \<in> smallest_ccdi_sets M" and B: "B \<in> smallest_ccdi_sets M" |
|
814 |
and disj: "A \<inter> B = {}" |
|
815 |
shows "A \<union> B \<in> smallest_ccdi_sets M" |
|
816 |
proof - |
|
817 |
have ra: "range (binaryset A B) \<in> Pow (smallest_ccdi_sets M)" |
|
818 |
by (simp add: range_binaryset_eq A B smallest_ccdi_sets.Basic) |
|
819 |
have di: "disjoint_family (binaryset A B)" using disj |
|
820 |
by (simp add: disjoint_family_on_def binaryset_def Int_commute) |
|
821 |
from Disj [OF ra di] |
|
822 |
show ?thesis |
|
823 |
by (simp add: UN_binaryset_eq) |
|
824 |
qed |
|
825 |
||
826 |
lemma (in algebra) smallest_ccdi_sets_Int1: |
|
827 |
assumes a: "a \<in> sets M" |
|
828 |
shows "b \<in> smallest_ccdi_sets M \<Longrightarrow> a \<inter> b \<in> smallest_ccdi_sets M" |
|
829 |
proof (induct rule: smallest_ccdi_sets.induct) |
|
830 |
case (Basic x) |
|
831 |
thus ?case |
|
832 |
by (metis a Int smallest_ccdi_sets.Basic) |
|
833 |
next |
|
834 |
case (Compl x) |
|
835 |
have "a \<inter> (space M - x) = space M - ((space M - a) \<union> (a \<inter> x))" |
|
836 |
by blast |
|
837 |
also have "... \<in> smallest_ccdi_sets M" |
|
838 |
by (metis smallest_ccdi_sets.Compl a Compl(2) Diff_Int2 Diff_Int_distrib2 |
|
839 |
Diff_disjoint Int_Diff Int_empty_right Un_commute |
|
840 |
smallest_ccdi_sets.Basic smallest_ccdi_sets.Compl |
|
841 |
smallest_ccdi_sets_Un) |
|
842 |
finally show ?case . |
|
843 |
next |
|
844 |
case (Inc A) |
|
845 |
have 1: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) = a \<inter> (\<Union>i. A i)" |
|
846 |
by blast |
|
847 |
have "range (\<lambda>i. a \<inter> A i) \<in> Pow(smallest_ccdi_sets M)" using Inc |
|
848 |
by blast |
|
849 |
moreover have "(\<lambda>i. a \<inter> A i) 0 = {}" |
|
850 |
by (simp add: Inc) |
|
851 |
moreover have "!!n. (\<lambda>i. a \<inter> A i) n \<subseteq> (\<lambda>i. a \<inter> A i) (Suc n)" using Inc |
|
852 |
by blast |
|
853 |
ultimately have 2: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) \<in> smallest_ccdi_sets M" |
|
854 |
by (rule smallest_ccdi_sets.Inc) |
|
855 |
show ?case |
|
856 |
by (metis 1 2) |
|
857 |
next |
|
858 |
case (Disj A) |
|
859 |
have 1: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) = a \<inter> (\<Union>i. A i)" |
|
860 |
by blast |
|
861 |
have "range (\<lambda>i. a \<inter> A i) \<in> Pow(smallest_ccdi_sets M)" using Disj |
|
862 |
by blast |
|
863 |
moreover have "disjoint_family (\<lambda>i. a \<inter> A i)" using Disj |
|
864 |
by (auto simp add: disjoint_family_on_def) |
|
865 |
ultimately have 2: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) \<in> smallest_ccdi_sets M" |
|
866 |
by (rule smallest_ccdi_sets.Disj) |
|
867 |
show ?case |
|
868 |
by (metis 1 2) |
|
869 |
qed |
|
870 |
||
871 |
||
872 |
lemma (in algebra) smallest_ccdi_sets_Int: |
|
873 |
assumes b: "b \<in> smallest_ccdi_sets M" |
|
874 |
shows "a \<in> smallest_ccdi_sets M \<Longrightarrow> a \<inter> b \<in> smallest_ccdi_sets M" |
|
875 |
proof (induct rule: smallest_ccdi_sets.induct) |
|
876 |
case (Basic x) |
|
877 |
thus ?case |
|
878 |
by (metis b smallest_ccdi_sets_Int1) |
|
879 |
next |
|
880 |
case (Compl x) |
|
881 |
have "(space M - x) \<inter> b = space M - (x \<inter> b \<union> (space M - b))" |
|
882 |
by blast |
|
883 |
also have "... \<in> smallest_ccdi_sets M" |
|
884 |
by (metis Compl(2) Diff_disjoint Int_Diff Int_commute Int_empty_right b |
|
885 |
smallest_ccdi_sets.Compl smallest_ccdi_sets_Un) |
|
886 |
finally show ?case . |
|
887 |
next |
|
888 |
case (Inc A) |
|
889 |
have 1: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) = (\<Union>i. A i) \<inter> b" |
|
890 |
by blast |
|
891 |
have "range (\<lambda>i. A i \<inter> b) \<in> Pow(smallest_ccdi_sets M)" using Inc |
|
892 |
by blast |
|
893 |
moreover have "(\<lambda>i. A i \<inter> b) 0 = {}" |
|
894 |
by (simp add: Inc) |
|
895 |
moreover have "!!n. (\<lambda>i. A i \<inter> b) n \<subseteq> (\<lambda>i. A i \<inter> b) (Suc n)" using Inc |
|
896 |
by blast |
|
897 |
ultimately have 2: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) \<in> smallest_ccdi_sets M" |
|
898 |
by (rule smallest_ccdi_sets.Inc) |
|
899 |
show ?case |
|
900 |
by (metis 1 2) |
|
901 |
next |
|
902 |
case (Disj A) |
|
903 |
have 1: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) = (\<Union>i. A i) \<inter> b" |
|
904 |
by blast |
|
905 |
have "range (\<lambda>i. A i \<inter> b) \<in> Pow(smallest_ccdi_sets M)" using Disj |
|
906 |
by blast |
|
907 |
moreover have "disjoint_family (\<lambda>i. A i \<inter> b)" using Disj |
|
908 |
by (auto simp add: disjoint_family_on_def) |
|
909 |
ultimately have 2: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) \<in> smallest_ccdi_sets M" |
|
910 |
by (rule smallest_ccdi_sets.Disj) |
|
911 |
show ?case |
|
912 |
by (metis 1 2) |
|
913 |
qed |
|
914 |
||
915 |
lemma (in algebra) sets_smallest_closed_cdi_Int: |
|
916 |
"a \<in> sets (smallest_closed_cdi M) \<Longrightarrow> b \<in> sets (smallest_closed_cdi M) |
|
917 |
\<Longrightarrow> a \<inter> b \<in> sets (smallest_closed_cdi M)" |
|
918 |
by (simp add: smallest_ccdi_sets_Int smallest_closed_cdi_def) |
|
919 |
||
920 |
lemma (in algebra) sigma_property_disjoint_lemma: |
|
921 |
assumes sbC: "sets M \<subseteq> C" |
|
922 |
and ccdi: "closed_cdi (|space = space M, sets = C|)" |
|
923 |
shows "sigma_sets (space M) (sets M) \<subseteq> C" |
|
924 |
proof - |
|
925 |
have "smallest_ccdi_sets M \<in> {B . sets M \<subseteq> B \<and> sigma_algebra (|space = space M, sets = B|)}" |
|
926 |
apply (auto simp add: sigma_algebra_disjoint_iff algebra_iff_Int |
|
927 |
smallest_ccdi_sets_Int) |
|
928 |
apply (metis Union_Pow_eq Union_upper subsetD smallest_ccdi_sets) |
|
929 |
apply (blast intro: smallest_ccdi_sets.Disj) |
|
930 |
done |
|
931 |
hence "sigma_sets (space M) (sets M) \<subseteq> smallest_ccdi_sets M" |
|
932 |
by clarsimp |
|
933 |
(drule sigma_algebra.sigma_sets_subset [where a="sets M"], auto) |
|
934 |
also have "... \<subseteq> C" |
|
935 |
proof |
|
936 |
fix x |
|
937 |
assume x: "x \<in> smallest_ccdi_sets M" |
|
938 |
thus "x \<in> C" |
|
939 |
proof (induct rule: smallest_ccdi_sets.induct) |
|
940 |
case (Basic x) |
|
941 |
thus ?case |
|
942 |
by (metis Basic subsetD sbC) |
|
943 |
next |
|
944 |
case (Compl x) |
|
945 |
thus ?case |
|
946 |
by (blast intro: closed_cdi_Compl [OF ccdi, simplified]) |
|
947 |
next |
|
948 |
case (Inc A) |
|
949 |
thus ?case |
|
950 |
by (auto intro: closed_cdi_Inc [OF ccdi, simplified]) |
|
951 |
next |
|
952 |
case (Disj A) |
|
953 |
thus ?case |
|
954 |
by (auto intro: closed_cdi_Disj [OF ccdi, simplified]) |
|
955 |
qed |
|
956 |
qed |
|
957 |
finally show ?thesis . |
|
958 |
qed |
|
959 |
||
960 |
lemma (in algebra) sigma_property_disjoint: |
|
961 |
assumes sbC: "sets M \<subseteq> C" |
|
962 |
and compl: "!!s. s \<in> C \<inter> sigma_sets (space M) (sets M) \<Longrightarrow> space M - s \<in> C" |
|
963 |
and inc: "!!A. range A \<subseteq> C \<inter> sigma_sets (space M) (sets M) |
|
964 |
\<Longrightarrow> A 0 = {} \<Longrightarrow> (!!n. A n \<subseteq> A (Suc n)) |
|
965 |
\<Longrightarrow> (\<Union>i. A i) \<in> C" |
|
966 |
and disj: "!!A. range A \<subseteq> C \<inter> sigma_sets (space M) (sets M) |
|
967 |
\<Longrightarrow> disjoint_family A \<Longrightarrow> (\<Union>i::nat. A i) \<in> C" |
|
968 |
shows "sigma_sets (space M) (sets M) \<subseteq> C" |
|
969 |
proof - |
|
970 |
have "sigma_sets (space M) (sets M) \<subseteq> C \<inter> sigma_sets (space M) (sets M)" |
|
971 |
proof (rule sigma_property_disjoint_lemma) |
|
972 |
show "sets M \<subseteq> C \<inter> sigma_sets (space M) (sets M)" |
|
973 |
by (metis Int_greatest Set.subsetI sbC sigma_sets.Basic) |
|
974 |
next |
|
975 |
show "closed_cdi \<lparr>space = space M, sets = C \<inter> sigma_sets (space M) (sets M)\<rparr>" |
|
976 |
by (simp add: closed_cdi_def compl inc disj) |
|
977 |
(metis PowI Set.subsetI le_infI2 sigma_sets_into_sp space_closed |
|
978 |
IntE sigma_sets.Compl range_subsetD sigma_sets.Union) |
|
979 |
qed |
|
980 |
thus ?thesis |
|
981 |
by blast |
|
982 |
qed |
|
983 |
||
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
984 |
end |