author | hoelzl |
Wed, 08 Dec 2010 16:15:14 +0100 | |
changeset 41095 | c335d880ff82 |
parent 40871 | 688f6ff859e1 |
child 41413 | 64cd30d6b0b8 |
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 = |
40859 | 26 |
fixes M :: "'a algebra" |
33271
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 |
|
38656 | 113 |
lemma countable_UN_eq: |
114 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
|
115 |
shows "(range A \<subseteq> sets M \<longrightarrow> (\<Union>i. A i) \<in> sets M) \<longleftrightarrow> |
|
116 |
(range (A \<circ> from_nat) \<subseteq> sets M \<longrightarrow> (\<Union>i. (A \<circ> from_nat) i) \<in> sets M)" |
|
117 |
proof - |
|
118 |
let ?A' = "A \<circ> from_nat" |
|
119 |
have *: "(\<Union>i. ?A' i) = (\<Union>i. A i)" (is "?l = ?r") |
|
120 |
proof safe |
|
121 |
fix x i assume "x \<in> A i" thus "x \<in> ?l" |
|
122 |
by (auto intro!: exI[of _ "to_nat i"]) |
|
123 |
next |
|
124 |
fix x i assume "x \<in> ?A' i" thus "x \<in> ?r" |
|
125 |
by (auto intro!: exI[of _ "from_nat i"]) |
|
126 |
qed |
|
127 |
have **: "range ?A' = range A" |
|
40702 | 128 |
using surj_from_nat |
38656 | 129 |
by (auto simp: image_compose intro!: imageI) |
130 |
show ?thesis unfolding * ** .. |
|
131 |
qed |
|
132 |
||
133 |
lemma (in sigma_algebra) countable_UN[intro]: |
|
134 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
|
135 |
assumes "A`X \<subseteq> sets M" |
|
136 |
shows "(\<Union>x\<in>X. A x) \<in> sets M" |
|
137 |
proof - |
|
138 |
let "?A i" = "if i \<in> X then A i else {}" |
|
139 |
from assms have "range ?A \<subseteq> sets M" by auto |
|
140 |
with countable_nat_UN[of "?A \<circ> from_nat"] countable_UN_eq[of ?A M] |
|
141 |
have "(\<Union>x. ?A x) \<in> sets M" by auto |
|
142 |
moreover have "(\<Union>x. ?A x) = (\<Union>x\<in>X. A x)" by (auto split: split_if_asm) |
|
143 |
ultimately show ?thesis by simp |
|
144 |
qed |
|
145 |
||
146 |
lemma (in sigma_algebra) finite_UN: |
|
147 |
assumes "finite I" and "\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets M" |
|
148 |
shows "(\<Union>i\<in>I. A i) \<in> sets M" |
|
149 |
using assms by induct auto |
|
150 |
||
33533
40b44cb20c8c
New theory Probability/Borel.thy, and some associated lemmas
paulson
parents:
33271
diff
changeset
|
151 |
lemma (in sigma_algebra) countable_INT [intro]: |
38656 | 152 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
153 |
assumes A: "A`X \<subseteq> sets M" "X \<noteq> {}" |
|
154 |
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
|
155 |
proof - |
38656 | 156 |
from A have "\<forall>i\<in>X. A i \<in> sets M" by fast |
157 |
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
|
158 |
moreover |
38656 | 159 |
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
|
160 |
by blast |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
161 |
ultimately show ?thesis by metis |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
162 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
163 |
|
38656 | 164 |
lemma (in sigma_algebra) finite_INT: |
165 |
assumes "finite I" "I \<noteq> {}" "\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets M" |
|
166 |
shows "(\<Inter>i\<in>I. A i) \<in> sets M" |
|
167 |
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
|
168 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
169 |
lemma algebra_Pow: |
38656 | 170 |
"algebra \<lparr> space = sp, sets = Pow sp, \<dots> = X \<rparr>" |
171 |
by (auto simp add: algebra_def) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
172 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
173 |
lemma sigma_algebra_Pow: |
38656 | 174 |
"sigma_algebra \<lparr> space = sp, sets = Pow sp, \<dots> = X \<rparr>" |
175 |
by (auto simp add: sigma_algebra_def sigma_algebra_axioms_def algebra_Pow) |
|
176 |
||
177 |
lemma sigma_algebra_iff: |
|
178 |
"sigma_algebra M \<longleftrightarrow> |
|
179 |
algebra M \<and> (\<forall>A. range A \<subseteq> sets M \<longrightarrow> (\<Union>i::nat. A i) \<in> sets M)" |
|
180 |
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
|
181 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
182 |
subsection {* Binary Unions *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
183 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
184 |
definition binary :: "'a \<Rightarrow> 'a \<Rightarrow> nat \<Rightarrow> 'a" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
185 |
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
|
186 |
|
38656 | 187 |
lemma range_binary_eq: "range(binary a b) = {a,b}" |
188 |
by (auto simp add: binary_def) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
189 |
|
38656 | 190 |
lemma Un_range_binary: "a \<union> b = (\<Union>i::nat. binary a b i)" |
191 |
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
|
192 |
|
38656 | 193 |
lemma Int_range_binary: "a \<inter> b = (\<Inter>i::nat. binary a b i)" |
194 |
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
|
195 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
196 |
lemma sigma_algebra_iff2: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
197 |
"sigma_algebra M \<longleftrightarrow> |
38656 | 198 |
sets M \<subseteq> Pow (space M) \<and> |
199 |
{} \<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
|
200 |
(\<forall>A. range A \<subseteq> sets M \<longrightarrow> (\<Union>i::nat. A i) \<in> sets M)" |
38656 | 201 |
by (auto simp add: range_binary_eq sigma_algebra_def sigma_algebra_axioms_def |
202 |
algebra_def Un_range_binary) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
203 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
204 |
subsection {* Initial Sigma Algebra *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
205 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
206 |
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
|
207 |
sets with regard to the properties just postulated. *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
208 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
209 |
inductive_set |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
210 |
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
|
211 |
for sp :: "'a set" and A :: "'a set set" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
212 |
where |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
213 |
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
|
214 |
| Empty: "{} \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
215 |
| 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
|
216 |
| 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
|
217 |
|
40859 | 218 |
definition |
219 |
"sigma M = (| space = space M, sets = sigma_sets (space M) (sets M) |)" |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
220 |
|
40859 | 221 |
lemma sets_sigma: "sets (sigma M) = sigma_sets (space M) (sets M)" |
38656 | 222 |
unfolding sigma_def by simp |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
223 |
|
40859 | 224 |
lemma space_sigma [simp]: "space (sigma M) = space M" |
38656 | 225 |
by (simp add: sigma_def) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
226 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
227 |
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
|
228 |
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
|
229 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
230 |
lemma sigma_sets_into_sp: "A \<subseteq> Pow sp \<Longrightarrow> x \<in> sigma_sets sp A \<Longrightarrow> x \<subseteq> sp" |
38656 | 231 |
by (erule sigma_sets.induct, auto) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
232 |
|
38656 | 233 |
lemma sigma_sets_Un: |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
234 |
"a \<in> sigma_sets sp A \<Longrightarrow> b \<in> sigma_sets sp A \<Longrightarrow> a \<union> b \<in> sigma_sets sp A" |
38656 | 235 |
apply (simp add: Un_range_binary range_binary_eq) |
40859 | 236 |
apply (rule Union, simp add: binary_def) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
237 |
done |
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_Inter: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
240 |
assumes Asb: "A \<subseteq> Pow sp" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
241 |
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
|
242 |
proof - |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
243 |
assume ai: "\<And>i::nat. a i \<in> sigma_sets sp A" |
38656 | 244 |
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
|
245 |
by (rule sigma_sets.Compl) |
38656 | 246 |
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
|
247 |
by (rule sigma_sets.Union) |
38656 | 248 |
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
|
249 |
by (rule sigma_sets.Compl) |
38656 | 250 |
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
|
251 |
by auto |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
252 |
also have "... = (\<Inter>i. a i)" using ai |
38656 | 253 |
by (blast dest: sigma_sets_into_sp [OF Asb]) |
254 |
finally show ?thesis . |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
255 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
256 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
257 |
lemma sigma_sets_INTER: |
38656 | 258 |
assumes Asb: "A \<subseteq> Pow sp" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
259 |
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
|
260 |
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
|
261 |
proof - |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
262 |
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
|
263 |
by (simp add: sigma_sets.intros sigma_sets_top) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
264 |
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
|
265 |
by (rule sigma_sets_Inter [OF Asb]) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
266 |
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
|
267 |
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
|
268 |
finally show ?thesis . |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
269 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
270 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
271 |
lemma (in sigma_algebra) sigma_sets_subset: |
38656 | 272 |
assumes a: "a \<subseteq> sets M" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
273 |
shows "sigma_sets (space M) a \<subseteq> sets M" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
274 |
proof |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
275 |
fix x |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
276 |
assume "x \<in> sigma_sets (space M) a" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
277 |
from this show "x \<in> sets M" |
38656 | 278 |
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
|
279 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
280 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
281 |
lemma (in sigma_algebra) sigma_sets_eq: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
282 |
"sigma_sets (space M) (sets M) = 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 |
show "sets M \<subseteq> sigma_sets (space M) (sets M)" |
37032 | 285 |
by (metis Set.subsetI sigma_sets.Basic) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
286 |
next |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
287 |
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
|
288 |
by (metis sigma_sets_subset subset_refl) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
289 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
290 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
291 |
lemma sigma_algebra_sigma_sets: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
292 |
"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
|
293 |
apply (auto simp add: sigma_algebra_def sigma_algebra_axioms_def |
38656 | 294 |
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
|
295 |
apply (blast dest: sigma_sets_into_sp) |
37032 | 296 |
apply (rule sigma_sets.Union, fast) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
297 |
done |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
298 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
299 |
lemma sigma_algebra_sigma: |
40859 | 300 |
"sets M \<subseteq> Pow (space M) \<Longrightarrow> sigma_algebra (sigma M)" |
38656 | 301 |
apply (rule sigma_algebra_sigma_sets) |
302 |
apply (auto simp add: sigma_def) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
303 |
done |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
304 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
305 |
lemma (in sigma_algebra) sigma_subset: |
40859 | 306 |
"sets N \<subseteq> sets M \<Longrightarrow> space N = space M \<Longrightarrow> sets (sigma N) \<subseteq> (sets M)" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
307 |
by (simp add: sigma_def sigma_sets_subset) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
308 |
|
40859 | 309 |
lemma sigma_sets_least_sigma_algebra: |
310 |
assumes "A \<subseteq> Pow S" |
|
311 |
shows "sigma_sets S A = \<Inter>{B. A \<subseteq> B \<and> sigma_algebra \<lparr>space = S, sets = B\<rparr>}" |
|
312 |
proof safe |
|
313 |
fix B X assume "A \<subseteq> B" and sa: "sigma_algebra \<lparr> space = S, sets = B \<rparr>" |
|
314 |
and X: "X \<in> sigma_sets S A" |
|
315 |
from sigma_algebra.sigma_sets_subset[OF sa, simplified, OF `A \<subseteq> B`] X |
|
316 |
show "X \<in> B" by auto |
|
317 |
next |
|
318 |
fix X assume "X \<in> \<Inter>{B. A \<subseteq> B \<and> sigma_algebra \<lparr>space = S, sets = B\<rparr>}" |
|
319 |
then have [intro!]: "\<And>B. A \<subseteq> B \<Longrightarrow> sigma_algebra \<lparr>space = S, sets = B\<rparr> \<Longrightarrow> X \<in> B" |
|
320 |
by simp |
|
321 |
have "A \<subseteq> sigma_sets S A" using assms |
|
322 |
by (auto intro!: sigma_sets.Basic) |
|
323 |
moreover have "sigma_algebra \<lparr>space = S, sets = sigma_sets S A\<rparr>" |
|
324 |
using assms by (intro sigma_algebra_sigma_sets[of A]) auto |
|
325 |
ultimately show "X \<in> sigma_sets S A" by auto |
|
326 |
qed |
|
327 |
||
38656 | 328 |
lemma (in sigma_algebra) restriction_in_sets: |
329 |
fixes A :: "nat \<Rightarrow> 'a set" |
|
330 |
assumes "S \<in> sets M" |
|
331 |
and *: "range A \<subseteq> (\<lambda>A. S \<inter> A) ` sets M" (is "_ \<subseteq> ?r") |
|
332 |
shows "range A \<subseteq> sets M" "(\<Union>i. A i) \<in> (\<lambda>A. S \<inter> A) ` sets M" |
|
333 |
proof - |
|
334 |
{ fix i have "A i \<in> ?r" using * by auto |
|
335 |
hence "\<exists>B. A i = B \<inter> S \<and> B \<in> sets M" by auto |
|
336 |
hence "A i \<subseteq> S" "A i \<in> sets M" using `S \<in> sets M` by auto } |
|
337 |
thus "range A \<subseteq> sets M" "(\<Union>i. A i) \<in> (\<lambda>A. S \<inter> A) ` sets M" |
|
338 |
by (auto intro!: image_eqI[of _ _ "(\<Union>i. A i)"]) |
|
339 |
qed |
|
340 |
||
341 |
lemma (in sigma_algebra) restricted_sigma_algebra: |
|
342 |
assumes "S \<in> sets M" |
|
39092 | 343 |
shows "sigma_algebra (restricted_space S)" |
38656 | 344 |
unfolding sigma_algebra_def sigma_algebra_axioms_def |
345 |
proof safe |
|
39092 | 346 |
show "algebra (restricted_space S)" using restricted_algebra[OF assms] . |
38656 | 347 |
next |
39092 | 348 |
fix A :: "nat \<Rightarrow> 'a set" assume "range A \<subseteq> sets (restricted_space S)" |
38656 | 349 |
from restriction_in_sets[OF assms this[simplified]] |
39092 | 350 |
show "(\<Union>i. A i) \<in> sets (restricted_space S)" by simp |
38656 | 351 |
qed |
352 |
||
40859 | 353 |
lemma sigma_sets_Int: |
354 |
assumes "A \<in> sigma_sets sp st" |
|
355 |
shows "op \<inter> A ` sigma_sets sp st = sigma_sets (A \<inter> sp) (op \<inter> A ` st)" |
|
356 |
proof (intro equalityI subsetI) |
|
357 |
fix x assume "x \<in> op \<inter> A ` sigma_sets sp st" |
|
358 |
then obtain y where "y \<in> sigma_sets sp st" "x = y \<inter> A" by auto |
|
359 |
then show "x \<in> sigma_sets (A \<inter> sp) (op \<inter> A ` st)" |
|
360 |
proof (induct arbitrary: x) |
|
361 |
case (Compl a) |
|
362 |
then show ?case |
|
363 |
by (force intro!: sigma_sets.Compl simp: Diff_Int_distrib ac_simps) |
|
364 |
next |
|
365 |
case (Union a) |
|
366 |
then show ?case |
|
367 |
by (auto intro!: sigma_sets.Union |
|
368 |
simp add: UN_extend_simps simp del: UN_simps) |
|
369 |
qed (auto intro!: sigma_sets.intros) |
|
370 |
next |
|
371 |
fix x assume "x \<in> sigma_sets (A \<inter> sp) (op \<inter> A ` st)" |
|
372 |
then show "x \<in> op \<inter> A ` sigma_sets sp st" |
|
373 |
proof induct |
|
374 |
case (Compl a) |
|
375 |
then obtain x where "a = A \<inter> x" "x \<in> sigma_sets sp st" by auto |
|
376 |
then show ?case |
|
377 |
by (force simp add: image_iff intro!: bexI[of _ "sp - x"] sigma_sets.Compl) |
|
378 |
next |
|
379 |
case (Union a) |
|
380 |
then have "\<forall>i. \<exists>x. x \<in> sigma_sets sp st \<and> a i = A \<inter> x" |
|
381 |
by (auto simp: image_iff Bex_def) |
|
382 |
from choice[OF this] guess f .. |
|
383 |
then show ?case |
|
384 |
by (auto intro!: bexI[of _ "(\<Union>x. f x)"] sigma_sets.Union |
|
385 |
simp add: image_iff) |
|
386 |
qed (auto intro!: sigma_sets.intros) |
|
387 |
qed |
|
388 |
||
389 |
lemma sigma_sets_single[simp]: "sigma_sets {X} {{X}} = {{}, {X}}" |
|
390 |
proof (intro set_eqI iffI) |
|
391 |
fix x assume "x \<in> sigma_sets {X} {{X}}" |
|
392 |
from sigma_sets_into_sp[OF _ this] |
|
393 |
show "x \<in> {{}, {X}}" by auto |
|
394 |
next |
|
395 |
fix x assume "x \<in> {{}, {X}}" |
|
396 |
then show "x \<in> sigma_sets {X} {{X}}" |
|
397 |
by (auto intro: sigma_sets.Empty sigma_sets_top) |
|
398 |
qed |
|
399 |
||
40869 | 400 |
lemma (in sigma_algebra) sets_sigma_subset: |
401 |
assumes "space N = space M" |
|
402 |
assumes "sets N \<subseteq> sets M" |
|
403 |
shows "sets (sigma N) \<subseteq> sets M" |
|
404 |
by (unfold assms sets_sigma, rule sigma_sets_subset, rule assms) |
|
405 |
||
40871 | 406 |
lemma in_sigma[intro, simp]: "A \<in> sets M \<Longrightarrow> A \<in> sets (sigma M)" |
407 |
unfolding sigma_def by (auto intro!: sigma_sets.Basic) |
|
408 |
||
409 |
lemma (in sigma_algebra) sigma_eq[simp]: "sigma M = M" |
|
410 |
unfolding sigma_def sigma_sets_eq by simp |
|
411 |
||
38656 | 412 |
section {* Measurable functions *} |
413 |
||
414 |
definition |
|
415 |
"measurable A B = {f \<in> space A -> space B. \<forall>y \<in> sets B. f -` y \<inter> space A \<in> sets A}" |
|
416 |
||
417 |
lemma (in sigma_algebra) measurable_sigma: |
|
40859 | 418 |
assumes B: "sets N \<subseteq> Pow (space N)" |
419 |
and f: "f \<in> space M -> space N" |
|
420 |
and ba: "\<And>y. y \<in> sets N \<Longrightarrow> (f -` y) \<inter> space M \<in> sets M" |
|
421 |
shows "f \<in> measurable M (sigma N)" |
|
38656 | 422 |
proof - |
40859 | 423 |
have "sigma_sets (space N) (sets N) \<subseteq> {y . (f -` y) \<inter> space M \<in> sets M & y \<subseteq> space N}" |
38656 | 424 |
proof clarify |
425 |
fix x |
|
40859 | 426 |
assume "x \<in> sigma_sets (space N) (sets N)" |
427 |
thus "f -` x \<inter> space M \<in> sets M \<and> x \<subseteq> space N" |
|
38656 | 428 |
proof induct |
429 |
case (Basic a) |
|
430 |
thus ?case |
|
431 |
by (auto simp add: ba) (metis B subsetD PowD) |
|
432 |
next |
|
433 |
case Empty |
|
434 |
thus ?case |
|
435 |
by auto |
|
436 |
next |
|
437 |
case (Compl a) |
|
40859 | 438 |
have [simp]: "f -` space N \<inter> space M = space M" |
38656 | 439 |
by (auto simp add: funcset_mem [OF f]) |
440 |
thus ?case |
|
441 |
by (auto simp add: vimage_Diff Diff_Int_distrib2 compl_sets Compl) |
|
442 |
next |
|
443 |
case (Union a) |
|
444 |
thus ?case |
|
40859 | 445 |
by (simp add: vimage_UN, simp only: UN_extend_simps(4)) blast |
38656 | 446 |
qed |
447 |
qed |
|
448 |
thus ?thesis |
|
449 |
by (simp add: measurable_def sigma_algebra_axioms sigma_algebra_sigma B f) |
|
450 |
(auto simp add: sigma_def) |
|
451 |
qed |
|
452 |
||
453 |
lemma measurable_cong: |
|
454 |
assumes "\<And> w. w \<in> space M \<Longrightarrow> f w = g w" |
|
455 |
shows "f \<in> measurable M M' \<longleftrightarrow> g \<in> measurable M M'" |
|
456 |
unfolding measurable_def using assms |
|
457 |
by (simp cong: vimage_inter_cong Pi_cong) |
|
458 |
||
459 |
lemma measurable_space: |
|
460 |
"f \<in> measurable M A \<Longrightarrow> x \<in> space M \<Longrightarrow> f x \<in> space A" |
|
461 |
unfolding measurable_def by auto |
|
462 |
||
463 |
lemma measurable_sets: |
|
464 |
"f \<in> measurable M A \<Longrightarrow> S \<in> sets A \<Longrightarrow> f -` S \<inter> space M \<in> sets M" |
|
465 |
unfolding measurable_def by auto |
|
466 |
||
467 |
lemma (in sigma_algebra) measurable_subset: |
|
40859 | 468 |
"(\<And>S. S \<in> sets A \<Longrightarrow> S \<subseteq> space A) \<Longrightarrow> measurable M A \<subseteq> measurable M (sigma A)" |
38656 | 469 |
by (auto intro: measurable_sigma measurable_sets measurable_space) |
470 |
||
471 |
lemma measurable_eqI: |
|
472 |
"\<lbrakk> space m1 = space m1' ; space m2 = space m2' ; |
|
473 |
sets m1 = sets m1' ; sets m2 = sets m2' \<rbrakk> |
|
474 |
\<Longrightarrow> measurable m1 m2 = measurable m1' m2'" |
|
475 |
by (simp add: measurable_def sigma_algebra_iff2) |
|
476 |
||
477 |
lemma (in sigma_algebra) measurable_const[intro, simp]: |
|
478 |
assumes "c \<in> space M'" |
|
479 |
shows "(\<lambda>x. c) \<in> measurable M M'" |
|
480 |
using assms by (auto simp add: measurable_def) |
|
481 |
||
482 |
lemma (in sigma_algebra) measurable_If: |
|
483 |
assumes measure: "f \<in> measurable M M'" "g \<in> measurable M M'" |
|
484 |
assumes P: "{x\<in>space M. P x} \<in> sets M" |
|
485 |
shows "(\<lambda>x. if P x then f x else g x) \<in> measurable M M'" |
|
486 |
unfolding measurable_def |
|
487 |
proof safe |
|
488 |
fix x assume "x \<in> space M" |
|
489 |
thus "(if P x then f x else g x) \<in> space M'" |
|
490 |
using measure unfolding measurable_def by auto |
|
491 |
next |
|
492 |
fix A assume "A \<in> sets M'" |
|
493 |
hence *: "(\<lambda>x. if P x then f x else g x) -` A \<inter> space M = |
|
494 |
((f -` A \<inter> space M) \<inter> {x\<in>space M. P x}) \<union> |
|
495 |
((g -` A \<inter> space M) \<inter> (space M - {x\<in>space M. P x}))" |
|
496 |
using measure unfolding measurable_def by (auto split: split_if_asm) |
|
497 |
show "(\<lambda>x. if P x then f x else g x) -` A \<inter> space M \<in> sets M" |
|
498 |
using `A \<in> sets M'` measure P unfolding * measurable_def |
|
499 |
by (auto intro!: Un) |
|
500 |
qed |
|
501 |
||
502 |
lemma (in sigma_algebra) measurable_If_set: |
|
503 |
assumes measure: "f \<in> measurable M M'" "g \<in> measurable M M'" |
|
504 |
assumes P: "A \<in> sets M" |
|
505 |
shows "(\<lambda>x. if x \<in> A then f x else g x) \<in> measurable M M'" |
|
506 |
proof (rule measurable_If[OF measure]) |
|
507 |
have "{x \<in> space M. x \<in> A} = A" using `A \<in> sets M` sets_into_space by auto |
|
508 |
thus "{x \<in> space M. x \<in> A} \<in> sets M" using `A \<in> sets M` by auto |
|
509 |
qed |
|
510 |
||
511 |
lemma (in algebra) measurable_ident[intro, simp]: "id \<in> measurable M M" |
|
512 |
by (auto simp add: measurable_def) |
|
513 |
||
514 |
lemma measurable_comp[intro]: |
|
515 |
fixes f :: "'a \<Rightarrow> 'b" and g :: "'b \<Rightarrow> 'c" |
|
516 |
shows "f \<in> measurable a b \<Longrightarrow> g \<in> measurable b c \<Longrightarrow> (g o f) \<in> measurable a c" |
|
517 |
apply (auto simp add: measurable_def vimage_compose) |
|
518 |
apply (subgoal_tac "f -` g -` y \<inter> space a = f -` (g -` y \<inter> space b) \<inter> space a") |
|
519 |
apply force+ |
|
520 |
done |
|
521 |
||
522 |
lemma measurable_strong: |
|
523 |
fixes f :: "'a \<Rightarrow> 'b" and g :: "'b \<Rightarrow> 'c" |
|
524 |
assumes f: "f \<in> measurable a b" and g: "g \<in> (space b -> space c)" |
|
525 |
and a: "sigma_algebra a" and b: "sigma_algebra b" and c: "sigma_algebra c" |
|
526 |
and t: "f ` (space a) \<subseteq> t" |
|
527 |
and cb: "\<And>s. s \<in> sets c \<Longrightarrow> (g -` s) \<inter> t \<in> sets b" |
|
528 |
shows "(g o f) \<in> measurable a c" |
|
529 |
proof - |
|
530 |
have fab: "f \<in> (space a -> space b)" |
|
531 |
and ba: "\<And>y. y \<in> sets b \<Longrightarrow> (f -` y) \<inter> (space a) \<in> sets a" using f |
|
532 |
by (auto simp add: measurable_def) |
|
533 |
have eq: "f -` g -` y \<inter> space a = f -` (g -` y \<inter> t) \<inter> space a" using t |
|
534 |
by force |
|
535 |
show ?thesis |
|
536 |
apply (auto simp add: measurable_def vimage_compose a c) |
|
537 |
apply (metis funcset_mem fab g) |
|
538 |
apply (subst eq, metis ba cb) |
|
539 |
done |
|
540 |
qed |
|
541 |
||
542 |
lemma measurable_mono1: |
|
543 |
"a \<subseteq> b \<Longrightarrow> sigma_algebra \<lparr>space = X, sets = b\<rparr> |
|
544 |
\<Longrightarrow> measurable \<lparr>space = X, sets = a\<rparr> c \<subseteq> measurable \<lparr>space = X, sets = b\<rparr> c" |
|
545 |
by (auto simp add: measurable_def) |
|
546 |
||
547 |
lemma measurable_up_sigma: |
|
40859 | 548 |
"measurable A M \<subseteq> measurable (sigma A) M" |
38656 | 549 |
unfolding measurable_def |
550 |
by (auto simp: sigma_def intro: sigma_sets.Basic) |
|
551 |
||
552 |
lemma (in sigma_algebra) measurable_range_reduce: |
|
553 |
"\<lbrakk> f \<in> measurable M \<lparr>space = s, sets = Pow s\<rparr> ; s \<noteq> {} \<rbrakk> |
|
554 |
\<Longrightarrow> f \<in> measurable M \<lparr>space = s \<inter> (f ` space M), sets = Pow (s \<inter> (f ` space M))\<rparr>" |
|
555 |
by (simp add: measurable_def sigma_algebra_Pow del: Pow_Int_eq) blast |
|
556 |
||
557 |
lemma (in sigma_algebra) measurable_Pow_to_Pow: |
|
558 |
"(sets M = Pow (space M)) \<Longrightarrow> f \<in> measurable M \<lparr>space = UNIV, sets = Pow UNIV\<rparr>" |
|
559 |
by (auto simp add: measurable_def sigma_algebra_def sigma_algebra_axioms_def algebra_def) |
|
560 |
||
561 |
lemma (in sigma_algebra) measurable_Pow_to_Pow_image: |
|
562 |
"sets M = Pow (space M) |
|
563 |
\<Longrightarrow> f \<in> measurable M \<lparr>space = f ` space M, sets = Pow (f ` space M)\<rparr>" |
|
564 |
by (simp add: measurable_def sigma_algebra_Pow) intro_locales |
|
565 |
||
40859 | 566 |
lemma (in sigma_algebra) measurable_iff_sigma: |
567 |
assumes "sets E \<subseteq> Pow (space E)" and "f \<in> space M \<rightarrow> space E" |
|
568 |
shows "f \<in> measurable M (sigma E) \<longleftrightarrow> (\<forall>A\<in>sets E. f -` A \<inter> space M \<in> sets M)" |
|
569 |
using measurable_sigma[OF assms] |
|
570 |
by (fastsimp simp: measurable_def sets_sigma intro: sigma_sets.intros) |
|
38656 | 571 |
|
572 |
section "Disjoint families" |
|
573 |
||
574 |
definition |
|
575 |
disjoint_family_on where |
|
576 |
"disjoint_family_on A S \<longleftrightarrow> (\<forall>m\<in>S. \<forall>n\<in>S. m \<noteq> n \<longrightarrow> A m \<inter> A n = {})" |
|
577 |
||
578 |
abbreviation |
|
579 |
"disjoint_family A \<equiv> disjoint_family_on A UNIV" |
|
580 |
||
581 |
lemma range_subsetD: "range f \<subseteq> B \<Longrightarrow> f i \<in> B" |
|
582 |
by blast |
|
583 |
||
584 |
lemma Int_Diff_disjoint: "A \<inter> B \<inter> (A - B) = {}" |
|
585 |
by blast |
|
586 |
||
587 |
lemma Int_Diff_Un: "A \<inter> B \<union> (A - B) = A" |
|
588 |
by blast |
|
589 |
||
590 |
lemma disjoint_family_subset: |
|
591 |
"disjoint_family A \<Longrightarrow> (!!x. B x \<subseteq> A x) \<Longrightarrow> disjoint_family B" |
|
592 |
by (force simp add: disjoint_family_on_def) |
|
593 |
||
40859 | 594 |
lemma disjoint_family_on_bisimulation: |
595 |
assumes "disjoint_family_on f S" |
|
596 |
and "\<And>n m. n \<in> S \<Longrightarrow> m \<in> S \<Longrightarrow> n \<noteq> m \<Longrightarrow> f n \<inter> f m = {} \<Longrightarrow> g n \<inter> g m = {}" |
|
597 |
shows "disjoint_family_on g S" |
|
598 |
using assms unfolding disjoint_family_on_def by auto |
|
599 |
||
38656 | 600 |
lemma disjoint_family_on_mono: |
601 |
"A \<subseteq> B \<Longrightarrow> disjoint_family_on f B \<Longrightarrow> disjoint_family_on f A" |
|
602 |
unfolding disjoint_family_on_def by auto |
|
603 |
||
604 |
lemma disjoint_family_Suc: |
|
605 |
assumes Suc: "!!n. A n \<subseteq> A (Suc n)" |
|
606 |
shows "disjoint_family (\<lambda>i. A (Suc i) - A i)" |
|
607 |
proof - |
|
608 |
{ |
|
609 |
fix m |
|
610 |
have "!!n. A n \<subseteq> A (m+n)" |
|
611 |
proof (induct m) |
|
612 |
case 0 show ?case by simp |
|
613 |
next |
|
614 |
case (Suc m) thus ?case |
|
615 |
by (metis Suc_eq_plus1 assms nat_add_commute nat_add_left_commute subset_trans) |
|
616 |
qed |
|
617 |
} |
|
618 |
hence "!!m n. m < n \<Longrightarrow> A m \<subseteq> A n" |
|
619 |
by (metis add_commute le_add_diff_inverse nat_less_le) |
|
620 |
thus ?thesis |
|
621 |
by (auto simp add: disjoint_family_on_def) |
|
622 |
(metis insert_absorb insert_subset le_SucE le_antisym not_leE) |
|
623 |
qed |
|
624 |
||
39092 | 625 |
lemma setsum_indicator_disjoint_family: |
626 |
fixes f :: "'d \<Rightarrow> 'e::semiring_1" |
|
627 |
assumes d: "disjoint_family_on A P" and "x \<in> A j" and "finite P" and "j \<in> P" |
|
628 |
shows "(\<Sum>i\<in>P. f i * indicator (A i) x) = f j" |
|
629 |
proof - |
|
630 |
have "P \<inter> {i. x \<in> A i} = {j}" |
|
631 |
using d `x \<in> A j` `j \<in> P` unfolding disjoint_family_on_def |
|
632 |
by auto |
|
633 |
thus ?thesis |
|
634 |
unfolding indicator_def |
|
635 |
by (simp add: if_distrib setsum_cases[OF `finite P`]) |
|
636 |
qed |
|
637 |
||
38656 | 638 |
definition disjointed :: "(nat \<Rightarrow> 'a set) \<Rightarrow> nat \<Rightarrow> 'a set " |
639 |
where "disjointed A n = A n - (\<Union>i\<in>{0..<n}. A i)" |
|
640 |
||
641 |
lemma finite_UN_disjointed_eq: "(\<Union>i\<in>{0..<n}. disjointed A i) = (\<Union>i\<in>{0..<n}. A i)" |
|
642 |
proof (induct n) |
|
643 |
case 0 show ?case by simp |
|
644 |
next |
|
645 |
case (Suc n) |
|
646 |
thus ?case by (simp add: atLeastLessThanSuc disjointed_def) |
|
647 |
qed |
|
648 |
||
649 |
lemma UN_disjointed_eq: "(\<Union>i. disjointed A i) = (\<Union>i. A i)" |
|
650 |
apply (rule UN_finite2_eq [where k=0]) |
|
651 |
apply (simp add: finite_UN_disjointed_eq) |
|
652 |
done |
|
653 |
||
654 |
lemma less_disjoint_disjointed: "m<n \<Longrightarrow> disjointed A m \<inter> disjointed A n = {}" |
|
655 |
by (auto simp add: disjointed_def) |
|
656 |
||
657 |
lemma disjoint_family_disjointed: "disjoint_family (disjointed A)" |
|
658 |
by (simp add: disjoint_family_on_def) |
|
659 |
(metis neq_iff Int_commute less_disjoint_disjointed) |
|
660 |
||
661 |
lemma disjointed_subset: "disjointed A n \<subseteq> A n" |
|
662 |
by (auto simp add: disjointed_def) |
|
663 |
||
664 |
lemma (in algebra) UNION_in_sets: |
|
665 |
fixes A:: "nat \<Rightarrow> 'a set" |
|
666 |
assumes A: "range A \<subseteq> sets M " |
|
667 |
shows "(\<Union>i\<in>{0..<n}. A i) \<in> sets M" |
|
668 |
proof (induct n) |
|
669 |
case 0 show ?case by simp |
|
670 |
next |
|
671 |
case (Suc n) |
|
672 |
thus ?case |
|
673 |
by (simp add: atLeastLessThanSuc) (metis A Un UNIV_I image_subset_iff) |
|
674 |
qed |
|
675 |
||
676 |
lemma (in algebra) range_disjointed_sets: |
|
677 |
assumes A: "range A \<subseteq> sets M " |
|
678 |
shows "range (disjointed A) \<subseteq> sets M" |
|
679 |
proof (auto simp add: disjointed_def) |
|
680 |
fix n |
|
681 |
show "A n - (\<Union>i\<in>{0..<n}. A i) \<in> sets M" using UNION_in_sets |
|
682 |
by (metis A Diff UNIV_I image_subset_iff) |
|
683 |
qed |
|
684 |
||
685 |
lemma sigma_algebra_disjoint_iff: |
|
686 |
"sigma_algebra M \<longleftrightarrow> |
|
687 |
algebra M & |
|
688 |
(\<forall>A. range A \<subseteq> sets M \<longrightarrow> disjoint_family A \<longrightarrow> |
|
689 |
(\<Union>i::nat. A i) \<in> sets M)" |
|
690 |
proof (auto simp add: sigma_algebra_iff) |
|
691 |
fix A :: "nat \<Rightarrow> 'a set" |
|
692 |
assume M: "algebra M" |
|
693 |
and A: "range A \<subseteq> sets M" |
|
694 |
and UnA: "\<forall>A. range A \<subseteq> sets M \<longrightarrow> |
|
695 |
disjoint_family A \<longrightarrow> (\<Union>i::nat. A i) \<in> sets M" |
|
696 |
hence "range (disjointed A) \<subseteq> sets M \<longrightarrow> |
|
697 |
disjoint_family (disjointed A) \<longrightarrow> |
|
698 |
(\<Union>i. disjointed A i) \<in> sets M" by blast |
|
699 |
hence "(\<Union>i. disjointed A i) \<in> sets M" |
|
700 |
by (simp add: algebra.range_disjointed_sets M A disjoint_family_disjointed) |
|
701 |
thus "(\<Union>i::nat. A i) \<in> sets M" by (simp add: UN_disjointed_eq) |
|
702 |
qed |
|
703 |
||
39090
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
704 |
subsection {* Sigma algebra generated by function preimages *} |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
705 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
706 |
definition (in sigma_algebra) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
707 |
"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
|
708 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
709 |
lemma (in sigma_algebra) in_vimage_algebra[simp]: |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
710 |
"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
|
711 |
by (simp add: vimage_algebra_def image_iff) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
712 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
713 |
lemma (in sigma_algebra) space_vimage_algebra[simp]: |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
714 |
"space (vimage_algebra S f) = S" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
715 |
by (simp add: vimage_algebra_def) |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
716 |
|
40859 | 717 |
lemma (in sigma_algebra) sigma_algebra_preimages: |
718 |
fixes f :: "'x \<Rightarrow> 'a" |
|
719 |
assumes "f \<in> A \<rightarrow> space M" |
|
720 |
shows "sigma_algebra \<lparr> space = A, sets = (\<lambda>M. f -` M \<inter> A) ` sets M \<rparr>" |
|
721 |
(is "sigma_algebra \<lparr> space = _, sets = ?F ` sets M \<rparr>") |
|
722 |
proof (simp add: sigma_algebra_iff2, safe) |
|
723 |
show "{} \<in> ?F ` sets M" by blast |
|
724 |
next |
|
725 |
fix S assume "S \<in> sets M" |
|
726 |
moreover have "A - ?F S = ?F (space M - S)" |
|
727 |
using assms by auto |
|
728 |
ultimately show "A - ?F S \<in> ?F ` sets M" |
|
729 |
by blast |
|
730 |
next |
|
731 |
fix S :: "nat \<Rightarrow> 'x set" assume *: "range S \<subseteq> ?F ` sets M" |
|
732 |
have "\<forall>i. \<exists>b. b \<in> sets M \<and> S i = ?F b" |
|
733 |
proof safe |
|
734 |
fix i |
|
735 |
have "S i \<in> ?F ` sets M" using * by auto |
|
736 |
then show "\<exists>b. b \<in> sets M \<and> S i = ?F b" by auto |
|
737 |
qed |
|
738 |
from choice[OF this] obtain b where b: "range b \<subseteq> sets M" "\<And>i. S i = ?F (b i)" |
|
739 |
by auto |
|
740 |
then have "(\<Union>i. S i) = ?F (\<Union>i. b i)" by auto |
|
741 |
then show "(\<Union>i. S i) \<in> ?F ` sets M" using b(1) by blast |
|
742 |
qed |
|
743 |
||
39090
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
744 |
lemma (in sigma_algebra) sigma_algebra_vimage: |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
745 |
fixes S :: "'c set" assumes "f \<in> S \<rightarrow> space M" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
746 |
shows "sigma_algebra (vimage_algebra S f)" |
40859 | 747 |
proof - |
748 |
from sigma_algebra_preimages[OF assms] |
|
749 |
show ?thesis unfolding vimage_algebra_def by (auto simp: sigma_algebra_iff2) |
|
750 |
qed |
|
39090
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
751 |
|
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
752 |
lemma (in sigma_algebra) measurable_vimage_algebra: |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
753 |
fixes S :: "'c set" assumes "f \<in> S \<rightarrow> space M" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
754 |
shows "f \<in> measurable (vimage_algebra S f) M" |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
755 |
unfolding measurable_def using assms by force |
a2d38b8b693e
Introduced sigma algebra generated by function preimages.
hoelzl
parents:
38656
diff
changeset
|
756 |
|
40859 | 757 |
lemma (in sigma_algebra) measurable_vimage: |
758 |
fixes g :: "'a \<Rightarrow> 'c" and f :: "'d \<Rightarrow> 'a" |
|
759 |
assumes "g \<in> measurable M M2" "f \<in> S \<rightarrow> space M" |
|
760 |
shows "(\<lambda>x. g (f x)) \<in> measurable (vimage_algebra S f) M2" |
|
761 |
proof - |
|
762 |
note measurable_vimage_algebra[OF assms(2)] |
|
763 |
from measurable_comp[OF this assms(1)] |
|
764 |
show ?thesis by (simp add: comp_def) |
|
765 |
qed |
|
766 |
||
767 |
lemma (in sigma_algebra) vimage_vimage_inv: |
|
768 |
assumes f: "bij_betw f S (space M)" |
|
769 |
assumes [simp]: "\<And>x. x \<in> space M \<Longrightarrow> f (g x) = x" and g: "g \<in> space M \<rightarrow> S" |
|
770 |
shows "sigma_algebra.vimage_algebra (vimage_algebra S f) (space M) g = M" |
|
771 |
proof - |
|
772 |
interpret T: sigma_algebra "vimage_algebra S f" |
|
773 |
using f by (safe intro!: sigma_algebra_vimage bij_betw_imp_funcset) |
|
774 |
||
775 |
have inj: "inj_on f S" and [simp]: "f`S = space M" |
|
776 |
using f unfolding bij_betw_def by auto |
|
777 |
||
778 |
{ fix A assume A: "A \<in> sets M" |
|
779 |
have "g -` f -` A \<inter> g -` S \<inter> space M = (f \<circ> g) -` A \<inter> space M" |
|
780 |
using g by auto |
|
781 |
also have "\<dots> = A" |
|
782 |
using `A \<in> sets M`[THEN sets_into_space] by auto |
|
783 |
finally have "g -` f -` A \<inter> g -` S \<inter> space M = A" . } |
|
784 |
note X = this |
|
785 |
show ?thesis |
|
786 |
unfolding T.vimage_algebra_def unfolding vimage_algebra_def |
|
787 |
by (simp add: image_compose[symmetric] comp_def X cong: image_cong) |
|
788 |
qed |
|
789 |
||
790 |
lemma (in sigma_algebra) measurable_vimage_iff: |
|
791 |
fixes f :: "'b \<Rightarrow> 'a" assumes f: "bij_betw f S (space M)" |
|
792 |
shows "g \<in> measurable M M' \<longleftrightarrow> (g \<circ> f) \<in> measurable (vimage_algebra S f) M'" |
|
793 |
proof |
|
794 |
assume "g \<in> measurable M M'" |
|
795 |
from measurable_vimage[OF this f[THEN bij_betw_imp_funcset]] |
|
796 |
show "(g \<circ> f) \<in> measurable (vimage_algebra S f) M'" unfolding comp_def . |
|
797 |
next |
|
798 |
interpret v: sigma_algebra "vimage_algebra S f" |
|
799 |
using f[THEN bij_betw_imp_funcset] by (rule sigma_algebra_vimage) |
|
800 |
note f' = f[THEN bij_betw_the_inv_into] |
|
801 |
assume "g \<circ> f \<in> measurable (vimage_algebra S f) M'" |
|
802 |
from v.measurable_vimage[OF this, unfolded space_vimage_algebra, OF f'[THEN bij_betw_imp_funcset]] |
|
803 |
show "g \<in> measurable M M'" |
|
804 |
using f f'[THEN bij_betw_imp_funcset] f[unfolded bij_betw_def] |
|
805 |
by (subst (asm) vimage_vimage_inv) |
|
806 |
(simp_all add: f_the_inv_into_f cong: measurable_cong) |
|
807 |
qed |
|
808 |
||
809 |
lemma sigma_sets_vimage: |
|
810 |
assumes "f \<in> S' \<rightarrow> S" and "A \<subseteq> Pow S" |
|
811 |
shows "sigma_sets S' ((\<lambda>X. f -` X \<inter> S') ` A) = (\<lambda>X. f -` X \<inter> S') ` sigma_sets S A" |
|
812 |
proof (intro set_eqI iffI) |
|
813 |
let ?F = "\<lambda>X. f -` X \<inter> S'" |
|
814 |
fix X assume "X \<in> sigma_sets S' (?F ` A)" |
|
815 |
then show "X \<in> ?F ` sigma_sets S A" |
|
816 |
proof induct |
|
817 |
case (Basic X) then obtain X' where "X = ?F X'" "X' \<in> A" |
|
818 |
by auto |
|
819 |
then show ?case by (auto intro!: sigma_sets.Basic) |
|
820 |
next |
|
821 |
case Empty then show ?case |
|
822 |
by (auto intro!: image_eqI[of _ _ "{}"] sigma_sets.Empty) |
|
823 |
next |
|
824 |
case (Compl X) then obtain X' where X: "X = ?F X'" and "X' \<in> sigma_sets S A" |
|
825 |
by auto |
|
826 |
then have "S - X' \<in> sigma_sets S A" |
|
827 |
by (auto intro!: sigma_sets.Compl) |
|
828 |
then show ?case |
|
829 |
using X assms by (auto intro!: image_eqI[where x="S - X'"]) |
|
830 |
next |
|
831 |
case (Union F) |
|
832 |
then have "\<forall>i. \<exists>F'. F' \<in> sigma_sets S A \<and> F i = f -` F' \<inter> S'" |
|
833 |
by (auto simp: image_iff Bex_def) |
|
834 |
from choice[OF this] obtain F' where |
|
835 |
"\<And>i. F' i \<in> sigma_sets S A" and "\<And>i. F i = f -` F' i \<inter> S'" |
|
836 |
by auto |
|
837 |
then show ?case |
|
838 |
by (auto intro!: sigma_sets.Union image_eqI[where x="\<Union>i. F' i"]) |
|
839 |
qed |
|
840 |
next |
|
841 |
let ?F = "\<lambda>X. f -` X \<inter> S'" |
|
842 |
fix X assume "X \<in> ?F ` sigma_sets S A" |
|
843 |
then obtain X' where "X' \<in> sigma_sets S A" "X = ?F X'" by auto |
|
844 |
then show "X \<in> sigma_sets S' (?F ` A)" |
|
845 |
proof (induct arbitrary: X) |
|
846 |
case (Basic X') then show ?case by (auto intro: sigma_sets.Basic) |
|
847 |
next |
|
848 |
case Empty then show ?case by (auto intro: sigma_sets.Empty) |
|
849 |
next |
|
850 |
case (Compl X') |
|
851 |
have "S' - (S' - X) \<in> sigma_sets S' (?F ` A)" |
|
852 |
apply (rule sigma_sets.Compl) |
|
853 |
using assms by (auto intro!: Compl.hyps simp: Compl.prems) |
|
854 |
also have "S' - (S' - X) = X" |
|
855 |
using assms Compl by auto |
|
856 |
finally show ?case . |
|
857 |
next |
|
858 |
case (Union F) |
|
859 |
have "(\<Union>i. f -` F i \<inter> S') \<in> sigma_sets S' (?F ` A)" |
|
860 |
by (intro sigma_sets.Union Union.hyps) simp |
|
861 |
also have "(\<Union>i. f -` F i \<inter> S') = X" |
|
862 |
using assms Union by auto |
|
863 |
finally show ?case . |
|
864 |
qed |
|
865 |
qed |
|
866 |
||
39092 | 867 |
section {* Conditional space *} |
868 |
||
869 |
definition (in algebra) |
|
870 |
"image_space X = \<lparr> space = X`space M, sets = (\<lambda>S. X`S) ` sets M \<rparr>" |
|
871 |
||
872 |
definition (in algebra) |
|
873 |
"conditional_space X A = algebra.image_space (restricted_space A) X" |
|
874 |
||
875 |
lemma (in algebra) space_conditional_space: |
|
876 |
assumes "A \<in> sets M" shows "space (conditional_space X A) = X`A" |
|
877 |
proof - |
|
878 |
interpret r: algebra "restricted_space A" using assms by (rule restricted_algebra) |
|
879 |
show ?thesis unfolding conditional_space_def r.image_space_def |
|
880 |
by simp |
|
881 |
qed |
|
882 |
||
38656 | 883 |
subsection {* A Two-Element Series *} |
884 |
||
885 |
definition binaryset :: "'a set \<Rightarrow> 'a set \<Rightarrow> nat \<Rightarrow> 'a set " |
|
886 |
where "binaryset A B = (\<lambda>\<^isup>x. {})(0 := A, Suc 0 := B)" |
|
887 |
||
888 |
lemma range_binaryset_eq: "range(binaryset A B) = {A,B,{}}" |
|
889 |
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
|
890 |
apply (rule set_eqI) |
38656 | 891 |
apply (auto simp add: image_iff) |
892 |
done |
|
893 |
||
894 |
lemma UN_binaryset_eq: "(\<Union>i. binaryset A B i) = A \<union> B" |
|
895 |
by (simp add: UNION_eq_Union_image range_binaryset_eq) |
|
896 |
||
897 |
section {* Closed CDI *} |
|
898 |
||
899 |
definition |
|
900 |
closed_cdi where |
|
901 |
"closed_cdi M \<longleftrightarrow> |
|
902 |
sets M \<subseteq> Pow (space M) & |
|
903 |
(\<forall>s \<in> sets M. space M - s \<in> sets M) & |
|
904 |
(\<forall>A. (range A \<subseteq> sets M) & (A 0 = {}) & (\<forall>n. A n \<subseteq> A (Suc n)) \<longrightarrow> |
|
905 |
(\<Union>i. A i) \<in> sets M) & |
|
906 |
(\<forall>A. (range A \<subseteq> sets M) & disjoint_family A \<longrightarrow> (\<Union>i::nat. A i) \<in> sets M)" |
|
907 |
||
908 |
||
909 |
inductive_set |
|
910 |
smallest_ccdi_sets :: "('a, 'b) algebra_scheme \<Rightarrow> 'a set set" |
|
911 |
for M |
|
912 |
where |
|
913 |
Basic [intro]: |
|
914 |
"a \<in> sets M \<Longrightarrow> a \<in> smallest_ccdi_sets M" |
|
915 |
| Compl [intro]: |
|
916 |
"a \<in> smallest_ccdi_sets M \<Longrightarrow> space M - a \<in> smallest_ccdi_sets M" |
|
917 |
| Inc: |
|
918 |
"range A \<in> Pow(smallest_ccdi_sets M) \<Longrightarrow> A 0 = {} \<Longrightarrow> (\<And>n. A n \<subseteq> A (Suc n)) |
|
919 |
\<Longrightarrow> (\<Union>i. A i) \<in> smallest_ccdi_sets M" |
|
920 |
| Disj: |
|
921 |
"range A \<in> Pow(smallest_ccdi_sets M) \<Longrightarrow> disjoint_family A |
|
922 |
\<Longrightarrow> (\<Union>i::nat. A i) \<in> smallest_ccdi_sets M" |
|
923 |
monos Pow_mono |
|
924 |
||
925 |
||
926 |
definition |
|
927 |
smallest_closed_cdi where |
|
928 |
"smallest_closed_cdi M = (|space = space M, sets = smallest_ccdi_sets M|)" |
|
929 |
||
930 |
lemma space_smallest_closed_cdi [simp]: |
|
931 |
"space (smallest_closed_cdi M) = space M" |
|
932 |
by (simp add: smallest_closed_cdi_def) |
|
933 |
||
934 |
lemma (in algebra) smallest_closed_cdi1: "sets M \<subseteq> sets (smallest_closed_cdi M)" |
|
935 |
by (auto simp add: smallest_closed_cdi_def) |
|
936 |
||
937 |
lemma (in algebra) smallest_ccdi_sets: |
|
938 |
"smallest_ccdi_sets M \<subseteq> Pow (space M)" |
|
939 |
apply (rule subsetI) |
|
940 |
apply (erule smallest_ccdi_sets.induct) |
|
941 |
apply (auto intro: range_subsetD dest: sets_into_space) |
|
942 |
done |
|
943 |
||
944 |
lemma (in algebra) smallest_closed_cdi2: "closed_cdi (smallest_closed_cdi M)" |
|
945 |
apply (auto simp add: closed_cdi_def smallest_closed_cdi_def smallest_ccdi_sets) |
|
946 |
apply (blast intro: smallest_ccdi_sets.Inc smallest_ccdi_sets.Disj) + |
|
947 |
done |
|
948 |
||
949 |
lemma (in algebra) smallest_closed_cdi3: |
|
950 |
"sets (smallest_closed_cdi M) \<subseteq> Pow (space M)" |
|
951 |
by (simp add: smallest_closed_cdi_def smallest_ccdi_sets) |
|
952 |
||
953 |
lemma closed_cdi_subset: "closed_cdi M \<Longrightarrow> sets M \<subseteq> Pow (space M)" |
|
954 |
by (simp add: closed_cdi_def) |
|
955 |
||
956 |
lemma closed_cdi_Compl: "closed_cdi M \<Longrightarrow> s \<in> sets M \<Longrightarrow> space M - s \<in> sets M" |
|
957 |
by (simp add: closed_cdi_def) |
|
958 |
||
959 |
lemma closed_cdi_Inc: |
|
960 |
"closed_cdi M \<Longrightarrow> range A \<subseteq> sets M \<Longrightarrow> A 0 = {} \<Longrightarrow> (!!n. A n \<subseteq> A (Suc n)) \<Longrightarrow> |
|
961 |
(\<Union>i. A i) \<in> sets M" |
|
962 |
by (simp add: closed_cdi_def) |
|
963 |
||
964 |
lemma closed_cdi_Disj: |
|
965 |
"closed_cdi M \<Longrightarrow> range A \<subseteq> sets M \<Longrightarrow> disjoint_family A \<Longrightarrow> (\<Union>i::nat. A i) \<in> sets M" |
|
966 |
by (simp add: closed_cdi_def) |
|
967 |
||
968 |
lemma closed_cdi_Un: |
|
969 |
assumes cdi: "closed_cdi M" and empty: "{} \<in> sets M" |
|
970 |
and A: "A \<in> sets M" and B: "B \<in> sets M" |
|
971 |
and disj: "A \<inter> B = {}" |
|
972 |
shows "A \<union> B \<in> sets M" |
|
973 |
proof - |
|
974 |
have ra: "range (binaryset A B) \<subseteq> sets M" |
|
975 |
by (simp add: range_binaryset_eq empty A B) |
|
976 |
have di: "disjoint_family (binaryset A B)" using disj |
|
977 |
by (simp add: disjoint_family_on_def binaryset_def Int_commute) |
|
978 |
from closed_cdi_Disj [OF cdi ra di] |
|
979 |
show ?thesis |
|
980 |
by (simp add: UN_binaryset_eq) |
|
981 |
qed |
|
982 |
||
983 |
lemma (in algebra) smallest_ccdi_sets_Un: |
|
984 |
assumes A: "A \<in> smallest_ccdi_sets M" and B: "B \<in> smallest_ccdi_sets M" |
|
985 |
and disj: "A \<inter> B = {}" |
|
986 |
shows "A \<union> B \<in> smallest_ccdi_sets M" |
|
987 |
proof - |
|
988 |
have ra: "range (binaryset A B) \<in> Pow (smallest_ccdi_sets M)" |
|
989 |
by (simp add: range_binaryset_eq A B smallest_ccdi_sets.Basic) |
|
990 |
have di: "disjoint_family (binaryset A B)" using disj |
|
991 |
by (simp add: disjoint_family_on_def binaryset_def Int_commute) |
|
992 |
from Disj [OF ra di] |
|
993 |
show ?thesis |
|
994 |
by (simp add: UN_binaryset_eq) |
|
995 |
qed |
|
996 |
||
997 |
lemma (in algebra) smallest_ccdi_sets_Int1: |
|
998 |
assumes a: "a \<in> sets M" |
|
999 |
shows "b \<in> smallest_ccdi_sets M \<Longrightarrow> a \<inter> b \<in> smallest_ccdi_sets M" |
|
1000 |
proof (induct rule: smallest_ccdi_sets.induct) |
|
1001 |
case (Basic x) |
|
1002 |
thus ?case |
|
1003 |
by (metis a Int smallest_ccdi_sets.Basic) |
|
1004 |
next |
|
1005 |
case (Compl x) |
|
1006 |
have "a \<inter> (space M - x) = space M - ((space M - a) \<union> (a \<inter> x))" |
|
1007 |
by blast |
|
1008 |
also have "... \<in> smallest_ccdi_sets M" |
|
1009 |
by (metis smallest_ccdi_sets.Compl a Compl(2) Diff_Int2 Diff_Int_distrib2 |
|
1010 |
Diff_disjoint Int_Diff Int_empty_right Un_commute |
|
1011 |
smallest_ccdi_sets.Basic smallest_ccdi_sets.Compl |
|
1012 |
smallest_ccdi_sets_Un) |
|
1013 |
finally show ?case . |
|
1014 |
next |
|
1015 |
case (Inc A) |
|
1016 |
have 1: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) = a \<inter> (\<Union>i. A i)" |
|
1017 |
by blast |
|
1018 |
have "range (\<lambda>i. a \<inter> A i) \<in> Pow(smallest_ccdi_sets M)" using Inc |
|
1019 |
by blast |
|
1020 |
moreover have "(\<lambda>i. a \<inter> A i) 0 = {}" |
|
1021 |
by (simp add: Inc) |
|
1022 |
moreover have "!!n. (\<lambda>i. a \<inter> A i) n \<subseteq> (\<lambda>i. a \<inter> A i) (Suc n)" using Inc |
|
1023 |
by blast |
|
1024 |
ultimately have 2: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) \<in> smallest_ccdi_sets M" |
|
1025 |
by (rule smallest_ccdi_sets.Inc) |
|
1026 |
show ?case |
|
1027 |
by (metis 1 2) |
|
1028 |
next |
|
1029 |
case (Disj A) |
|
1030 |
have 1: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) = a \<inter> (\<Union>i. A i)" |
|
1031 |
by blast |
|
1032 |
have "range (\<lambda>i. a \<inter> A i) \<in> Pow(smallest_ccdi_sets M)" using Disj |
|
1033 |
by blast |
|
1034 |
moreover have "disjoint_family (\<lambda>i. a \<inter> A i)" using Disj |
|
1035 |
by (auto simp add: disjoint_family_on_def) |
|
1036 |
ultimately have 2: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) \<in> smallest_ccdi_sets M" |
|
1037 |
by (rule smallest_ccdi_sets.Disj) |
|
1038 |
show ?case |
|
1039 |
by (metis 1 2) |
|
1040 |
qed |
|
1041 |
||
1042 |
||
1043 |
lemma (in algebra) smallest_ccdi_sets_Int: |
|
1044 |
assumes b: "b \<in> smallest_ccdi_sets M" |
|
1045 |
shows "a \<in> smallest_ccdi_sets M \<Longrightarrow> a \<inter> b \<in> smallest_ccdi_sets M" |
|
1046 |
proof (induct rule: smallest_ccdi_sets.induct) |
|
1047 |
case (Basic x) |
|
1048 |
thus ?case |
|
1049 |
by (metis b smallest_ccdi_sets_Int1) |
|
1050 |
next |
|
1051 |
case (Compl x) |
|
1052 |
have "(space M - x) \<inter> b = space M - (x \<inter> b \<union> (space M - b))" |
|
1053 |
by blast |
|
1054 |
also have "... \<in> smallest_ccdi_sets M" |
|
1055 |
by (metis Compl(2) Diff_disjoint Int_Diff Int_commute Int_empty_right b |
|
1056 |
smallest_ccdi_sets.Compl smallest_ccdi_sets_Un) |
|
1057 |
finally show ?case . |
|
1058 |
next |
|
1059 |
case (Inc A) |
|
1060 |
have 1: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) = (\<Union>i. A i) \<inter> b" |
|
1061 |
by blast |
|
1062 |
have "range (\<lambda>i. A i \<inter> b) \<in> Pow(smallest_ccdi_sets M)" using Inc |
|
1063 |
by blast |
|
1064 |
moreover have "(\<lambda>i. A i \<inter> b) 0 = {}" |
|
1065 |
by (simp add: Inc) |
|
1066 |
moreover have "!!n. (\<lambda>i. A i \<inter> b) n \<subseteq> (\<lambda>i. A i \<inter> b) (Suc n)" using Inc |
|
1067 |
by blast |
|
1068 |
ultimately have 2: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) \<in> smallest_ccdi_sets M" |
|
1069 |
by (rule smallest_ccdi_sets.Inc) |
|
1070 |
show ?case |
|
1071 |
by (metis 1 2) |
|
1072 |
next |
|
1073 |
case (Disj A) |
|
1074 |
have 1: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) = (\<Union>i. A i) \<inter> b" |
|
1075 |
by blast |
|
1076 |
have "range (\<lambda>i. A i \<inter> b) \<in> Pow(smallest_ccdi_sets M)" using Disj |
|
1077 |
by blast |
|
1078 |
moreover have "disjoint_family (\<lambda>i. A i \<inter> b)" using Disj |
|
1079 |
by (auto simp add: disjoint_family_on_def) |
|
1080 |
ultimately have 2: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) \<in> smallest_ccdi_sets M" |
|
1081 |
by (rule smallest_ccdi_sets.Disj) |
|
1082 |
show ?case |
|
1083 |
by (metis 1 2) |
|
1084 |
qed |
|
1085 |
||
1086 |
lemma (in algebra) sets_smallest_closed_cdi_Int: |
|
1087 |
"a \<in> sets (smallest_closed_cdi M) \<Longrightarrow> b \<in> sets (smallest_closed_cdi M) |
|
1088 |
\<Longrightarrow> a \<inter> b \<in> sets (smallest_closed_cdi M)" |
|
1089 |
by (simp add: smallest_ccdi_sets_Int smallest_closed_cdi_def) |
|
1090 |
||
1091 |
lemma (in algebra) sigma_property_disjoint_lemma: |
|
1092 |
assumes sbC: "sets M \<subseteq> C" |
|
1093 |
and ccdi: "closed_cdi (|space = space M, sets = C|)" |
|
1094 |
shows "sigma_sets (space M) (sets M) \<subseteq> C" |
|
1095 |
proof - |
|
1096 |
have "smallest_ccdi_sets M \<in> {B . sets M \<subseteq> B \<and> sigma_algebra (|space = space M, sets = B|)}" |
|
1097 |
apply (auto simp add: sigma_algebra_disjoint_iff algebra_iff_Int |
|
1098 |
smallest_ccdi_sets_Int) |
|
1099 |
apply (metis Union_Pow_eq Union_upper subsetD smallest_ccdi_sets) |
|
1100 |
apply (blast intro: smallest_ccdi_sets.Disj) |
|
1101 |
done |
|
1102 |
hence "sigma_sets (space M) (sets M) \<subseteq> smallest_ccdi_sets M" |
|
1103 |
by clarsimp |
|
1104 |
(drule sigma_algebra.sigma_sets_subset [where a="sets M"], auto) |
|
1105 |
also have "... \<subseteq> C" |
|
1106 |
proof |
|
1107 |
fix x |
|
1108 |
assume x: "x \<in> smallest_ccdi_sets M" |
|
1109 |
thus "x \<in> C" |
|
1110 |
proof (induct rule: smallest_ccdi_sets.induct) |
|
1111 |
case (Basic x) |
|
1112 |
thus ?case |
|
1113 |
by (metis Basic subsetD sbC) |
|
1114 |
next |
|
1115 |
case (Compl x) |
|
1116 |
thus ?case |
|
1117 |
by (blast intro: closed_cdi_Compl [OF ccdi, simplified]) |
|
1118 |
next |
|
1119 |
case (Inc A) |
|
1120 |
thus ?case |
|
1121 |
by (auto intro: closed_cdi_Inc [OF ccdi, simplified]) |
|
1122 |
next |
|
1123 |
case (Disj A) |
|
1124 |
thus ?case |
|
1125 |
by (auto intro: closed_cdi_Disj [OF ccdi, simplified]) |
|
1126 |
qed |
|
1127 |
qed |
|
1128 |
finally show ?thesis . |
|
1129 |
qed |
|
1130 |
||
1131 |
lemma (in algebra) sigma_property_disjoint: |
|
1132 |
assumes sbC: "sets M \<subseteq> C" |
|
1133 |
and compl: "!!s. s \<in> C \<inter> sigma_sets (space M) (sets M) \<Longrightarrow> space M - s \<in> C" |
|
1134 |
and inc: "!!A. range A \<subseteq> C \<inter> sigma_sets (space M) (sets M) |
|
1135 |
\<Longrightarrow> A 0 = {} \<Longrightarrow> (!!n. A n \<subseteq> A (Suc n)) |
|
1136 |
\<Longrightarrow> (\<Union>i. A i) \<in> C" |
|
1137 |
and disj: "!!A. range A \<subseteq> C \<inter> sigma_sets (space M) (sets M) |
|
1138 |
\<Longrightarrow> disjoint_family A \<Longrightarrow> (\<Union>i::nat. A i) \<in> C" |
|
1139 |
shows "sigma_sets (space M) (sets M) \<subseteq> C" |
|
1140 |
proof - |
|
1141 |
have "sigma_sets (space M) (sets M) \<subseteq> C \<inter> sigma_sets (space M) (sets M)" |
|
1142 |
proof (rule sigma_property_disjoint_lemma) |
|
1143 |
show "sets M \<subseteq> C \<inter> sigma_sets (space M) (sets M)" |
|
1144 |
by (metis Int_greatest Set.subsetI sbC sigma_sets.Basic) |
|
1145 |
next |
|
1146 |
show "closed_cdi \<lparr>space = space M, sets = C \<inter> sigma_sets (space M) (sets M)\<rparr>" |
|
1147 |
by (simp add: closed_cdi_def compl inc disj) |
|
1148 |
(metis PowI Set.subsetI le_infI2 sigma_sets_into_sp space_closed |
|
1149 |
IntE sigma_sets.Compl range_subsetD sigma_sets.Union) |
|
1150 |
qed |
|
1151 |
thus ?thesis |
|
1152 |
by blast |
|
1153 |
qed |
|
1154 |
||
40859 | 1155 |
section {* Dynkin systems *} |
1156 |
||
1157 |
locale dynkin_system = |
|
1158 |
fixes M :: "'a algebra" |
|
1159 |
assumes space_closed: "sets M \<subseteq> Pow (space M)" |
|
1160 |
and space: "space M \<in> sets M" |
|
1161 |
and compl[intro!]: "\<And>A. A \<in> sets M \<Longrightarrow> space M - A \<in> sets M" |
|
1162 |
and UN[intro!]: "\<And>A. disjoint_family A \<Longrightarrow> range A \<subseteq> sets M |
|
1163 |
\<Longrightarrow> (\<Union>i::nat. A i) \<in> sets M" |
|
1164 |
||
1165 |
lemma (in dynkin_system) sets_into_space: "\<And> A. A \<in> sets M \<Longrightarrow> A \<subseteq> space M" |
|
1166 |
using space_closed by auto |
|
1167 |
||
1168 |
lemma (in dynkin_system) empty[intro, simp]: "{} \<in> sets M" |
|
1169 |
using space compl[of "space M"] by simp |
|
1170 |
||
1171 |
lemma (in dynkin_system) diff: |
|
1172 |
assumes sets: "D \<in> sets M" "E \<in> sets M" and "D \<subseteq> E" |
|
1173 |
shows "E - D \<in> sets M" |
|
1174 |
proof - |
|
1175 |
let ?f = "\<lambda>x. if x = 0 then D else if x = Suc 0 then space M - E else {}" |
|
1176 |
have "range ?f = {D, space M - E, {}}" |
|
1177 |
by (auto simp: image_iff) |
|
1178 |
moreover have "D \<union> (space M - E) = (\<Union>i. ?f i)" |
|
1179 |
by (auto simp: image_iff split: split_if_asm) |
|
1180 |
moreover |
|
1181 |
then have "disjoint_family ?f" unfolding disjoint_family_on_def |
|
1182 |
using `D \<in> sets M`[THEN sets_into_space] `D \<subseteq> E` by auto |
|
1183 |
ultimately have "space M - (D \<union> (space M - E)) \<in> sets M" |
|
1184 |
using sets by auto |
|
1185 |
also have "space M - (D \<union> (space M - E)) = E - D" |
|
1186 |
using assms sets_into_space by auto |
|
1187 |
finally show ?thesis . |
|
1188 |
qed |
|
1189 |
||
1190 |
lemma dynkin_systemI: |
|
1191 |
assumes "\<And> A. A \<in> sets M \<Longrightarrow> A \<subseteq> space M" "space M \<in> sets M" |
|
1192 |
assumes "\<And> A. A \<in> sets M \<Longrightarrow> space M - A \<in> sets M" |
|
1193 |
assumes "\<And> A. disjoint_family A \<Longrightarrow> range A \<subseteq> sets M |
|
1194 |
\<Longrightarrow> (\<Union>i::nat. A i) \<in> sets M" |
|
1195 |
shows "dynkin_system M" |
|
1196 |
using assms by (auto simp: dynkin_system_def) |
|
1197 |
||
1198 |
lemma dynkin_system_trivial: |
|
1199 |
shows "dynkin_system \<lparr> space = A, sets = Pow A \<rparr>" |
|
1200 |
by (rule dynkin_systemI) auto |
|
1201 |
||
1202 |
lemma sigma_algebra_imp_dynkin_system: |
|
1203 |
assumes "sigma_algebra M" shows "dynkin_system M" |
|
1204 |
proof - |
|
1205 |
interpret sigma_algebra M by fact |
|
1206 |
show ?thesis using sets_into_space by (fastsimp intro!: dynkin_systemI) |
|
1207 |
qed |
|
1208 |
||
1209 |
subsection "Intersection stable algebras" |
|
1210 |
||
1211 |
definition "Int_stable M \<longleftrightarrow> (\<forall> a \<in> sets M. \<forall> b \<in> sets M. a \<inter> b \<in> sets M)" |
|
1212 |
||
1213 |
lemma (in algebra) Int_stable: "Int_stable M" |
|
1214 |
unfolding Int_stable_def by auto |
|
1215 |
||
1216 |
lemma (in dynkin_system) sigma_algebra_eq_Int_stable: |
|
1217 |
"sigma_algebra M \<longleftrightarrow> Int_stable M" |
|
1218 |
proof |
|
1219 |
assume "sigma_algebra M" then show "Int_stable M" |
|
1220 |
unfolding sigma_algebra_def using algebra.Int_stable by auto |
|
1221 |
next |
|
1222 |
assume "Int_stable M" |
|
1223 |
show "sigma_algebra M" |
|
1224 |
unfolding sigma_algebra_disjoint_iff algebra_def |
|
1225 |
proof (intro conjI ballI allI impI) |
|
1226 |
show "sets M \<subseteq> Pow (space M)" using sets_into_space by auto |
|
1227 |
next |
|
1228 |
fix A B assume "A \<in> sets M" "B \<in> sets M" |
|
1229 |
then have "A \<union> B = space M - ((space M - A) \<inter> (space M - B))" |
|
1230 |
"space M - A \<in> sets M" "space M - B \<in> sets M" |
|
1231 |
using sets_into_space by auto |
|
1232 |
then show "A \<union> B \<in> sets M" |
|
1233 |
using `Int_stable M` unfolding Int_stable_def by auto |
|
1234 |
qed auto |
|
1235 |
qed |
|
1236 |
||
1237 |
subsection "Smallest Dynkin systems" |
|
1238 |
||
1239 |
definition dynkin :: "'a algebra \<Rightarrow> 'a algebra" where |
|
1240 |
"dynkin M = \<lparr> space = space M, |
|
1241 |
sets = \<Inter>{D. dynkin_system \<lparr> space = space M, sets = D\<rparr> \<and> sets M \<subseteq> D}\<rparr>" |
|
1242 |
||
1243 |
lemma dynkin_system_dynkin: |
|
1244 |
fixes M :: "'a algebra" |
|
1245 |
assumes "sets M \<subseteq> Pow (space M)" |
|
1246 |
shows "dynkin_system (dynkin M)" |
|
1247 |
proof (rule dynkin_systemI) |
|
1248 |
fix A assume "A \<in> sets (dynkin M)" |
|
1249 |
moreover |
|
1250 |
{ fix D assume "A \<in> D" and d: "dynkin_system \<lparr> space = space M, sets = D \<rparr>" |
|
1251 |
from dynkin_system.sets_into_space[OF d] `A \<in> D` |
|
1252 |
have "A \<subseteq> space M" by auto } |
|
1253 |
moreover have "{D. dynkin_system \<lparr> space = space M, sets = D\<rparr> \<and> sets M \<subseteq> D} \<noteq> {}" |
|
1254 |
using assms dynkin_system_trivial by fastsimp |
|
1255 |
ultimately show "A \<subseteq> space (dynkin M)" |
|
1256 |
unfolding dynkin_def using assms |
|
1257 |
by simp (metis dynkin_system.sets_into_space in_mono mem_def) |
|
1258 |
next |
|
1259 |
show "space (dynkin M) \<in> sets (dynkin M)" |
|
1260 |
unfolding dynkin_def using dynkin_system.space by fastsimp |
|
1261 |
next |
|
1262 |
fix A assume "A \<in> sets (dynkin M)" |
|
1263 |
then show "space (dynkin M) - A \<in> sets (dynkin M)" |
|
1264 |
unfolding dynkin_def using dynkin_system.compl by force |
|
1265 |
next |
|
1266 |
fix A :: "nat \<Rightarrow> 'a set" |
|
1267 |
assume A: "disjoint_family A" "range A \<subseteq> sets (dynkin M)" |
|
1268 |
show "(\<Union>i. A i) \<in> sets (dynkin M)" unfolding dynkin_def |
|
1269 |
proof (simp, safe) |
|
1270 |
fix D assume "dynkin_system \<lparr>space = space M, sets = D\<rparr>" "sets M \<subseteq> D" |
|
1271 |
with A have "(\<Union>i. A i) \<in> sets \<lparr>space = space M, sets = D\<rparr>" |
|
1272 |
by (intro dynkin_system.UN) (auto simp: dynkin_def) |
|
1273 |
then show "(\<Union>i. A i) \<in> D" by auto |
|
1274 |
qed |
|
1275 |
qed |
|
1276 |
||
1277 |
lemma dynkin_Basic[intro]: |
|
1278 |
"A \<in> sets M \<Longrightarrow> A \<in> sets (dynkin M)" |
|
1279 |
unfolding dynkin_def by auto |
|
1280 |
||
1281 |
lemma dynkin_space[simp]: |
|
1282 |
"space (dynkin M) = space M" |
|
1283 |
unfolding dynkin_def by auto |
|
1284 |
||
1285 |
lemma (in dynkin_system) restricted_dynkin_system: |
|
1286 |
assumes "D \<in> sets M" |
|
1287 |
shows "dynkin_system \<lparr> space = space M, |
|
1288 |
sets = {Q. Q \<subseteq> space M \<and> Q \<inter> D \<in> sets M} \<rparr>" |
|
1289 |
proof (rule dynkin_systemI, simp_all) |
|
1290 |
have "space M \<inter> D = D" |
|
1291 |
using `D \<in> sets M` sets_into_space by auto |
|
1292 |
then show "space M \<inter> D \<in> sets M" |
|
1293 |
using `D \<in> sets M` by auto |
|
1294 |
next |
|
1295 |
fix A assume "A \<subseteq> space M \<and> A \<inter> D \<in> sets M" |
|
1296 |
moreover have "(space M - A) \<inter> D = (space M - (A \<inter> D)) - (space M - D)" |
|
1297 |
by auto |
|
1298 |
ultimately show "space M - A \<subseteq> space M \<and> (space M - A) \<inter> D \<in> sets M" |
|
1299 |
using `D \<in> sets M` by (auto intro: diff) |
|
1300 |
next |
|
1301 |
fix A :: "nat \<Rightarrow> 'a set" |
|
1302 |
assume "disjoint_family A" "range A \<subseteq> {Q. Q \<subseteq> space M \<and> Q \<inter> D \<in> sets M}" |
|
1303 |
then have "\<And>i. A i \<subseteq> space M" "disjoint_family (\<lambda>i. A i \<inter> D)" |
|
1304 |
"range (\<lambda>i. A i \<inter> D) \<subseteq> sets M" "(\<Union>x. A x) \<inter> D = (\<Union>x. A x \<inter> D)" |
|
1305 |
by ((fastsimp simp: disjoint_family_on_def)+) |
|
1306 |
then show "(\<Union>x. A x) \<subseteq> space M \<and> (\<Union>x. A x) \<inter> D \<in> sets M" |
|
1307 |
by (auto simp del: UN_simps) |
|
1308 |
qed |
|
1309 |
||
1310 |
lemma (in dynkin_system) dynkin_subset: |
|
1311 |
fixes N :: "'a algebra" |
|
1312 |
assumes "sets N \<subseteq> sets M" |
|
1313 |
assumes "space N = space M" |
|
1314 |
shows "sets (dynkin N) \<subseteq> sets M" |
|
1315 |
proof - |
|
1316 |
have *: "\<lparr>space = space N, sets = sets M\<rparr> = M" |
|
1317 |
unfolding `space N = space M` by simp |
|
1318 |
have "dynkin_system M" by default |
|
1319 |
then have "dynkin_system \<lparr>space = space N, sets = sets M\<rparr>" |
|
1320 |
using assms unfolding * by simp |
|
1321 |
with `sets N \<subseteq> sets M` show ?thesis by (auto simp add: dynkin_def) |
|
1322 |
qed |
|
1323 |
||
1324 |
lemma sigma_eq_dynkin: |
|
1325 |
fixes M :: "'a algebra" |
|
1326 |
assumes sets: "sets M \<subseteq> Pow (space M)" |
|
1327 |
assumes "Int_stable M" |
|
1328 |
shows "sigma M = dynkin M" |
|
1329 |
proof - |
|
1330 |
have "sets (dynkin M) \<subseteq> sigma_sets (space M) (sets M)" |
|
1331 |
using sigma_algebra_imp_dynkin_system |
|
1332 |
unfolding dynkin_def sigma_def sigma_sets_least_sigma_algebra[OF sets] by auto |
|
1333 |
moreover |
|
1334 |
interpret dynkin_system "dynkin M" |
|
1335 |
using dynkin_system_dynkin[OF sets] . |
|
1336 |
have "sigma_algebra (dynkin M)" |
|
1337 |
unfolding sigma_algebra_eq_Int_stable Int_stable_def |
|
1338 |
proof (intro ballI) |
|
1339 |
fix A B assume "A \<in> sets (dynkin M)" "B \<in> sets (dynkin M)" |
|
1340 |
let "?D E" = "\<lparr> space = space M, |
|
1341 |
sets = {Q. Q \<subseteq> space M \<and> Q \<inter> E \<in> sets (dynkin M)} \<rparr>" |
|
1342 |
have "sets M \<subseteq> sets (?D B)" |
|
1343 |
proof |
|
1344 |
fix E assume "E \<in> sets M" |
|
1345 |
then have "sets M \<subseteq> sets (?D E)" "E \<in> sets (dynkin M)" |
|
1346 |
using sets_into_space `Int_stable M` by (auto simp: Int_stable_def) |
|
1347 |
then have "sets (dynkin M) \<subseteq> sets (?D E)" |
|
1348 |
using restricted_dynkin_system `E \<in> sets (dynkin M)` |
|
1349 |
by (intro dynkin_system.dynkin_subset) simp_all |
|
1350 |
then have "B \<in> sets (?D E)" |
|
1351 |
using `B \<in> sets (dynkin M)` by auto |
|
1352 |
then have "E \<inter> B \<in> sets (dynkin M)" |
|
1353 |
by (subst Int_commute) simp |
|
1354 |
then show "E \<in> sets (?D B)" |
|
1355 |
using sets `E \<in> sets M` by auto |
|
1356 |
qed |
|
1357 |
then have "sets (dynkin M) \<subseteq> sets (?D B)" |
|
1358 |
using restricted_dynkin_system `B \<in> sets (dynkin M)` |
|
1359 |
by (intro dynkin_system.dynkin_subset) simp_all |
|
1360 |
then show "A \<inter> B \<in> sets (dynkin M)" |
|
1361 |
using `A \<in> sets (dynkin M)` sets_into_space by auto |
|
1362 |
qed |
|
1363 |
from sigma_algebra.sigma_sets_subset[OF this, of "sets M"] |
|
1364 |
have "sigma_sets (space M) (sets M) \<subseteq> sets (dynkin M)" by auto |
|
1365 |
ultimately have "sigma_sets (space M) (sets M) = sets (dynkin M)" by auto |
|
1366 |
then show ?thesis |
|
1367 |
by (intro algebra.equality) (simp_all add: sigma_def) |
|
1368 |
qed |
|
1369 |
||
1370 |
lemma (in dynkin_system) dynkin_idem: |
|
1371 |
"dynkin M = M" |
|
1372 |
proof - |
|
1373 |
have "sets (dynkin M) = sets M" |
|
1374 |
proof |
|
1375 |
show "sets M \<subseteq> sets (dynkin M)" |
|
1376 |
using dynkin_Basic by auto |
|
1377 |
show "sets (dynkin M) \<subseteq> sets M" |
|
1378 |
by (intro dynkin_subset) auto |
|
1379 |
qed |
|
1380 |
then show ?thesis |
|
1381 |
by (auto intro!: algebra.equality) |
|
1382 |
qed |
|
1383 |
||
1384 |
lemma (in dynkin_system) dynkin_lemma: |
|
1385 |
fixes E :: "'a algebra" |
|
1386 |
assumes "Int_stable E" and E: "sets E \<subseteq> sets M" "space E = space M" |
|
1387 |
and "sets M \<subseteq> sets (sigma E)" |
|
1388 |
shows "sigma E = M" |
|
1389 |
proof - |
|
1390 |
have "sets E \<subseteq> Pow (space E)" |
|
1391 |
using E sets_into_space by auto |
|
1392 |
then have "sigma E = dynkin E" |
|
1393 |
using `Int_stable E` by (rule sigma_eq_dynkin) |
|
1394 |
moreover then have "sets (dynkin E) = sets M" |
|
1395 |
using assms dynkin_subset[OF E] by simp |
|
1396 |
ultimately show ?thesis |
|
1397 |
using E by simp |
|
1398 |
qed |
|
1399 |
||
41095 | 1400 |
subsection "Sigma algebras on finite sets" |
1401 |
||
40859 | 1402 |
locale finite_sigma_algebra = sigma_algebra + |
1403 |
assumes finite_space: "finite (space M)" |
|
1404 |
and sets_eq_Pow[simp]: "sets M = Pow (space M)" |
|
1405 |
||
1406 |
lemma (in finite_sigma_algebra) sets_image_space_eq_Pow: |
|
1407 |
"sets (image_space X) = Pow (space (image_space X))" |
|
1408 |
proof safe |
|
1409 |
fix x S assume "S \<in> sets (image_space X)" "x \<in> S" |
|
1410 |
then show "x \<in> space (image_space X)" |
|
1411 |
using sets_into_space by (auto intro!: imageI simp: image_space_def) |
|
1412 |
next |
|
1413 |
fix S assume "S \<subseteq> space (image_space X)" |
|
1414 |
then obtain S' where "S = X`S'" "S'\<in>sets M" |
|
1415 |
by (auto simp: subset_image_iff sets_eq_Pow image_space_def) |
|
1416 |
then show "S \<in> sets (image_space X)" |
|
1417 |
by (auto simp: image_space_def) |
|
1418 |
qed |
|
1419 |
||
41095 | 1420 |
subsection "Bijective functions with inverse" |
1421 |
||
1422 |
definition "bij_inv A B f g \<longleftrightarrow> |
|
1423 |
f \<in> A \<rightarrow> B \<and> g \<in> B \<rightarrow> A \<and> (\<forall>x\<in>A. g (f x) = x) \<and> (\<forall>x\<in>B. f (g x) = x)" |
|
1424 |
||
1425 |
lemma bij_inv_symmetric[sym]: "bij_inv A B f g \<Longrightarrow> bij_inv B A g f" |
|
1426 |
unfolding bij_inv_def by auto |
|
1427 |
||
1428 |
lemma bij_invI: |
|
1429 |
assumes "f \<in> A \<rightarrow> B" "g \<in> B \<rightarrow> A" |
|
1430 |
and "\<And>x. x \<in> A \<Longrightarrow> g (f x) = x" |
|
1431 |
and "\<And>x. x \<in> B \<Longrightarrow> f (g x) = x" |
|
1432 |
shows "bij_inv A B f g" |
|
1433 |
using assms unfolding bij_inv_def by auto |
|
1434 |
||
1435 |
lemma bij_invE: |
|
1436 |
assumes "bij_inv A B f g" |
|
1437 |
"\<lbrakk> f \<in> A \<rightarrow> B ; g \<in> B \<rightarrow> A ; |
|
1438 |
(\<And>x. x \<in> A \<Longrightarrow> g (f x) = x) ; |
|
1439 |
(\<And>x. x \<in> B \<Longrightarrow> f (g x) = x) \<rbrakk> \<Longrightarrow> P" |
|
1440 |
shows P |
|
1441 |
using assms unfolding bij_inv_def by auto |
|
1442 |
||
1443 |
lemma bij_inv_bij_betw: |
|
1444 |
assumes "bij_inv A B f g" |
|
1445 |
shows "bij_betw f A B" "bij_betw g B A" |
|
1446 |
using assms by (auto intro: bij_betwI elim!: bij_invE) |
|
1447 |
||
1448 |
lemma bij_inv_vimage_vimage: |
|
1449 |
assumes "bij_inv A B f e" |
|
1450 |
shows "f -` (e -` X \<inter> B) \<inter> A = X \<inter> A" |
|
1451 |
using assms by (auto elim!: bij_invE) |
|
1452 |
||
1453 |
lemma (in sigma_algebra) measurable_vimage_iff_inv: |
|
1454 |
fixes f :: "'b \<Rightarrow> 'a" assumes "bij_inv S (space M) f g" |
|
1455 |
shows "h \<in> measurable (vimage_algebra S f) M' \<longleftrightarrow> (\<lambda>x. h (g x)) \<in> measurable M M'" |
|
1456 |
unfolding measurable_vimage_iff[OF bij_inv_bij_betw(1), OF assms] |
|
1457 |
proof (rule measurable_cong) |
|
1458 |
fix w assume "w \<in> space (vimage_algebra S f)" |
|
1459 |
then have "w \<in> S" by auto |
|
1460 |
then show "h w = ((\<lambda>x. h (g x)) \<circ> f) w" |
|
1461 |
using assms by (auto elim: bij_invE) |
|
1462 |
qed |
|
1463 |
||
1464 |
lemma vimage_algebra_sigma: |
|
1465 |
assumes bi: "bij_inv (space (sigma F)) (space (sigma E)) f e" |
|
1466 |
and "sets E \<subseteq> Pow (space E)" and F: "sets F \<subseteq> Pow (space F)" |
|
1467 |
and "f \<in> measurable F E" "e \<in> measurable E F" |
|
1468 |
shows "sigma_algebra.vimage_algebra (sigma E) (space (sigma F)) f = sigma F" |
|
1469 |
proof - |
|
1470 |
interpret sigma_algebra "sigma E" |
|
1471 |
using assms by (intro sigma_algebra_sigma) auto |
|
1472 |
have eq: "sets F = (\<lambda>X. f -` X \<inter> space F) ` sets E" |
|
1473 |
proof safe |
|
1474 |
fix X assume "X \<in> sets F" |
|
1475 |
then have "e -` X \<inter> space E \<in> sets E" |
|
1476 |
using `e \<in> measurable E F` unfolding measurable_def by auto |
|
1477 |
then show "X \<in>(\<lambda>Y. f -` Y \<inter> space F) ` sets E" |
|
1478 |
apply (rule rev_image_eqI) |
|
1479 |
unfolding bij_inv_vimage_vimage[OF bi[simplified]] |
|
1480 |
using F `X \<in> sets F` by auto |
|
1481 |
next |
|
1482 |
fix X assume "X \<in> sets E" then show "f -` X \<inter> space F \<in> sets F" |
|
1483 |
using `f \<in> measurable F E` unfolding measurable_def by auto |
|
1484 |
qed |
|
1485 |
show "vimage_algebra (space (sigma F)) f = sigma F" |
|
1486 |
unfolding vimage_algebra_def |
|
1487 |
using assms by (auto simp: bij_inv_def eq sigma_sets_vimage[symmetric] sigma_def) |
|
1488 |
qed |
|
1489 |
||
1490 |
lemma measurable_sigma_sigma: |
|
1491 |
assumes M: "sets M \<subseteq> Pow (space M)" and N: "sets N \<subseteq> Pow (space N)" |
|
1492 |
shows "f \<in> measurable M N \<Longrightarrow> f \<in> measurable (sigma M) (sigma N)" |
|
1493 |
using sigma_algebra.measurable_subset[OF sigma_algebra_sigma[OF M], of N] |
|
1494 |
using measurable_up_sigma[of M N] N by auto |
|
1495 |
||
1496 |
lemma bij_inv_the_inv_into: |
|
1497 |
assumes "bij_betw f A B" shows "bij_inv A B f (the_inv_into A f)" |
|
1498 |
proof (rule bij_invI) |
|
1499 |
show "the_inv_into A f \<in> B \<rightarrow> A" |
|
1500 |
using bij_betw_the_inv_into[OF assms] by (rule bij_betw_imp_funcset) |
|
1501 |
show "f \<in> A \<rightarrow> B" using assms by (rule bij_betw_imp_funcset) |
|
1502 |
show "\<And>x. x \<in> A \<Longrightarrow> the_inv_into A f (f x) = x" |
|
1503 |
"\<And>x. x \<in> B \<Longrightarrow> f (the_inv_into A f x) = x" |
|
1504 |
using the_inv_into_f_f[of f A] f_the_inv_into_f[of f A] |
|
1505 |
using assms by (auto simp: bij_betw_def) |
|
1506 |
qed |
|
1507 |
||
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
1508 |
end |