author | wenzelm |
Sun, 13 Sep 2015 22:56:52 +0200 | |
changeset 61169 | 4de9ff3ea29a |
parent 60772 | a0cfa9050fa8 |
child 61384 | 9f5145281888 |
permissions | -rw-r--r-- |
41983 | 1 |
(* Title: HOL/Probability/Sigma_Algebra.thy |
42067 | 2 |
Author: Stefan Richter, Markus Wenzel, TU München |
3 |
Author: Johannes Hölzl, TU München |
|
41981
cdf7693bbe08
reworked Probability theory: measures are not type restricted to positive extended reals
hoelzl
parents:
41959
diff
changeset
|
4 |
Plus material from the Hurd/Coble measure theory development, |
cdf7693bbe08
reworked Probability theory: measures are not type restricted to positive extended reals
hoelzl
parents:
41959
diff
changeset
|
5 |
translated by Lawrence Paulson. |
33271
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 |
|
58876 | 8 |
section {* Describing measurable sets *} |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
9 |
|
41413
64cd30d6b0b8
explicit file specifications -- avoid secondary load path;
wenzelm
parents:
41095
diff
changeset
|
10 |
theory Sigma_Algebra |
64cd30d6b0b8
explicit file specifications -- avoid secondary load path;
wenzelm
parents:
41095
diff
changeset
|
11 |
imports |
42145 | 12 |
Complex_Main |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
13 |
"~~/src/HOL/Library/Countable_Set" |
41413
64cd30d6b0b8
explicit file specifications -- avoid secondary load path;
wenzelm
parents:
41095
diff
changeset
|
14 |
"~~/src/HOL/Library/FuncSet" |
64cd30d6b0b8
explicit file specifications -- avoid secondary load path;
wenzelm
parents:
41095
diff
changeset
|
15 |
"~~/src/HOL/Library/Indicator_Function" |
47694 | 16 |
"~~/src/HOL/Library/Extended_Real" |
60727 | 17 |
"~~/src/HOL/Library/Disjoint_Sets" |
41413
64cd30d6b0b8
explicit file specifications -- avoid secondary load path;
wenzelm
parents:
41095
diff
changeset
|
18 |
begin |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
19 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
20 |
text {* Sigma algebras are an elementary concept in measure |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
21 |
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
|
22 |
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
|
23 |
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
|
24 |
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
|
25 |
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
|
26 |
three very natural and desirable properties. *} |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
27 |
|
47762 | 28 |
subsection {* Families of sets *} |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
29 |
|
47694 | 30 |
locale subset_class = |
31 |
fixes \<Omega> :: "'a set" and M :: "'a set set" |
|
32 |
assumes space_closed: "M \<subseteq> Pow \<Omega>" |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
33 |
|
47694 | 34 |
lemma (in subset_class) sets_into_space: "x \<in> M \<Longrightarrow> x \<subseteq> \<Omega>" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
35 |
by (metis PowD contra_subsetD space_closed) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
36 |
|
56994 | 37 |
subsubsection {* Semiring of sets *} |
47762 | 38 |
|
39 |
locale semiring_of_sets = subset_class + |
|
40 |
assumes empty_sets[iff]: "{} \<in> M" |
|
41 |
assumes Int[intro]: "\<And>a b. a \<in> M \<Longrightarrow> b \<in> M \<Longrightarrow> a \<inter> b \<in> M" |
|
42 |
assumes Diff_cover: |
|
43 |
"\<And>a b. a \<in> M \<Longrightarrow> b \<in> M \<Longrightarrow> \<exists>C\<subseteq>M. finite C \<and> disjoint C \<and> a - b = \<Union>C" |
|
44 |
||
45 |
lemma (in semiring_of_sets) finite_INT[intro]: |
|
46 |
assumes "finite I" "I \<noteq> {}" "\<And>i. i \<in> I \<Longrightarrow> A i \<in> M" |
|
47 |
shows "(\<Inter>i\<in>I. A i) \<in> M" |
|
48 |
using assms by (induct rule: finite_ne_induct) auto |
|
49 |
||
50 |
lemma (in semiring_of_sets) Int_space_eq1 [simp]: "x \<in> M \<Longrightarrow> \<Omega> \<inter> x = x" |
|
51 |
by (metis Int_absorb1 sets_into_space) |
|
52 |
||
53 |
lemma (in semiring_of_sets) Int_space_eq2 [simp]: "x \<in> M \<Longrightarrow> x \<inter> \<Omega> = x" |
|
54 |
by (metis Int_absorb2 sets_into_space) |
|
55 |
||
56 |
lemma (in semiring_of_sets) sets_Collect_conj: |
|
57 |
assumes "{x\<in>\<Omega>. P x} \<in> M" "{x\<in>\<Omega>. Q x} \<in> M" |
|
58 |
shows "{x\<in>\<Omega>. Q x \<and> P x} \<in> M" |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
59 |
proof - |
47762 | 60 |
have "{x\<in>\<Omega>. Q x \<and> P x} = {x\<in>\<Omega>. Q x} \<inter> {x\<in>\<Omega>. P x}" |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
61 |
by auto |
47762 | 62 |
with assms show ?thesis by auto |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
63 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
64 |
|
50002
ce0d316b5b44
add measurability prover; add support for Borel sets
hoelzl
parents:
49834
diff
changeset
|
65 |
lemma (in semiring_of_sets) sets_Collect_finite_All': |
47762 | 66 |
assumes "\<And>i. i \<in> S \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" "finite S" "S \<noteq> {}" |
67 |
shows "{x\<in>\<Omega>. \<forall>i\<in>S. P i x} \<in> M" |
|
68 |
proof - |
|
69 |
have "{x\<in>\<Omega>. \<forall>i\<in>S. P i x} = (\<Inter>i\<in>S. {x\<in>\<Omega>. P i x})" |
|
70 |
using `S \<noteq> {}` by auto |
|
71 |
with assms show ?thesis by auto |
|
72 |
qed |
|
73 |
||
74 |
locale ring_of_sets = semiring_of_sets + |
|
75 |
assumes Un [intro]: "\<And>a b. a \<in> M \<Longrightarrow> b \<in> M \<Longrightarrow> a \<union> b \<in> M" |
|
76 |
||
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
77 |
lemma (in ring_of_sets) finite_Union [intro]: |
47694 | 78 |
"finite X \<Longrightarrow> X \<subseteq> M \<Longrightarrow> Union X \<in> M" |
38656 | 79 |
by (induct set: finite) (auto simp add: Un) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
80 |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
81 |
lemma (in ring_of_sets) finite_UN[intro]: |
47694 | 82 |
assumes "finite I" and "\<And>i. i \<in> I \<Longrightarrow> A i \<in> M" |
83 |
shows "(\<Union>i\<in>I. A i) \<in> M" |
|
41981
cdf7693bbe08
reworked Probability theory: measures are not type restricted to positive extended reals
hoelzl
parents:
41959
diff
changeset
|
84 |
using assms by induct auto |
cdf7693bbe08
reworked Probability theory: measures are not type restricted to positive extended reals
hoelzl
parents:
41959
diff
changeset
|
85 |
|
47762 | 86 |
lemma (in ring_of_sets) Diff [intro]: |
87 |
assumes "a \<in> M" "b \<in> M" shows "a - b \<in> M" |
|
88 |
using Diff_cover[OF assms] by auto |
|
89 |
||
90 |
lemma ring_of_setsI: |
|
91 |
assumes space_closed: "M \<subseteq> Pow \<Omega>" |
|
92 |
assumes empty_sets[iff]: "{} \<in> M" |
|
93 |
assumes Un[intro]: "\<And>a b. a \<in> M \<Longrightarrow> b \<in> M \<Longrightarrow> a \<union> b \<in> M" |
|
94 |
assumes Diff[intro]: "\<And>a b. a \<in> M \<Longrightarrow> b \<in> M \<Longrightarrow> a - b \<in> M" |
|
95 |
shows "ring_of_sets \<Omega> M" |
|
96 |
proof |
|
97 |
fix a b assume ab: "a \<in> M" "b \<in> M" |
|
98 |
from ab show "\<exists>C\<subseteq>M. finite C \<and> disjoint C \<and> a - b = \<Union>C" |
|
99 |
by (intro exI[of _ "{a - b}"]) (auto simp: disjoint_def) |
|
100 |
have "a \<inter> b = a - (a - b)" by auto |
|
101 |
also have "\<dots> \<in> M" using ab by auto |
|
102 |
finally show "a \<inter> b \<in> M" . |
|
103 |
qed fact+ |
|
104 |
||
105 |
lemma ring_of_sets_iff: "ring_of_sets \<Omega> M \<longleftrightarrow> M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)" |
|
106 |
proof |
|
107 |
assume "ring_of_sets \<Omega> M" |
|
108 |
then interpret ring_of_sets \<Omega> M . |
|
109 |
show "M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)" |
|
110 |
using space_closed by auto |
|
111 |
qed (auto intro!: ring_of_setsI) |
|
41981
cdf7693bbe08
reworked Probability theory: measures are not type restricted to positive extended reals
hoelzl
parents:
41959
diff
changeset
|
112 |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
113 |
lemma (in ring_of_sets) insert_in_sets: |
47694 | 114 |
assumes "{x} \<in> M" "A \<in> M" shows "insert x A \<in> M" |
38656 | 115 |
proof - |
47694 | 116 |
have "{x} \<union> A \<in> M" using assms by (rule Un) |
38656 | 117 |
thus ?thesis by auto |
118 |
qed |
|
119 |
||
42867 | 120 |
lemma (in ring_of_sets) sets_Collect_disj: |
47694 | 121 |
assumes "{x\<in>\<Omega>. P x} \<in> M" "{x\<in>\<Omega>. Q x} \<in> M" |
122 |
shows "{x\<in>\<Omega>. Q x \<or> P x} \<in> M" |
|
42867 | 123 |
proof - |
47694 | 124 |
have "{x\<in>\<Omega>. Q x \<or> P x} = {x\<in>\<Omega>. Q x} \<union> {x\<in>\<Omega>. P x}" |
42867 | 125 |
by auto |
126 |
with assms show ?thesis by auto |
|
127 |
qed |
|
128 |
||
129 |
lemma (in ring_of_sets) sets_Collect_finite_Ex: |
|
47694 | 130 |
assumes "\<And>i. i \<in> S \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" "finite S" |
131 |
shows "{x\<in>\<Omega>. \<exists>i\<in>S. P i x} \<in> M" |
|
42867 | 132 |
proof - |
47694 | 133 |
have "{x\<in>\<Omega>. \<exists>i\<in>S. P i x} = (\<Union>i\<in>S. {x\<in>\<Omega>. P i x})" |
42867 | 134 |
by auto |
135 |
with assms show ?thesis by auto |
|
136 |
qed |
|
137 |
||
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
138 |
locale algebra = ring_of_sets + |
47694 | 139 |
assumes top [iff]: "\<Omega> \<in> M" |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
140 |
|
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
141 |
lemma (in algebra) compl_sets [intro]: |
47694 | 142 |
"a \<in> M \<Longrightarrow> \<Omega> - a \<in> M" |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
143 |
by auto |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
144 |
|
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
145 |
lemma algebra_iff_Un: |
47694 | 146 |
"algebra \<Omega> M \<longleftrightarrow> |
147 |
M \<subseteq> Pow \<Omega> \<and> |
|
148 |
{} \<in> M \<and> |
|
149 |
(\<forall>a \<in> M. \<Omega> - a \<in> M) \<and> |
|
150 |
(\<forall>a \<in> M. \<forall> b \<in> M. a \<union> b \<in> M)" (is "_ \<longleftrightarrow> ?Un") |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
151 |
proof |
47694 | 152 |
assume "algebra \<Omega> M" |
153 |
then interpret algebra \<Omega> M . |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
154 |
show ?Un using sets_into_space by auto |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
155 |
next |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
156 |
assume ?Un |
47762 | 157 |
then have "\<Omega> \<in> M" by auto |
158 |
interpret ring_of_sets \<Omega> M |
|
159 |
proof (rule ring_of_setsI) |
|
160 |
show \<Omega>: "M \<subseteq> Pow \<Omega>" "{} \<in> M" |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
161 |
using `?Un` by auto |
47694 | 162 |
fix a b assume a: "a \<in> M" and b: "b \<in> M" |
163 |
then show "a \<union> b \<in> M" using `?Un` by auto |
|
164 |
have "a - b = \<Omega> - ((\<Omega> - a) \<union> b)" |
|
165 |
using \<Omega> a b by auto |
|
166 |
then show "a - b \<in> M" |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
167 |
using a b `?Un` by auto |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
168 |
qed |
47762 | 169 |
show "algebra \<Omega> M" proof qed fact |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
170 |
qed |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
171 |
|
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
172 |
lemma algebra_iff_Int: |
47694 | 173 |
"algebra \<Omega> M \<longleftrightarrow> |
174 |
M \<subseteq> Pow \<Omega> & {} \<in> M & |
|
175 |
(\<forall>a \<in> M. \<Omega> - a \<in> M) & |
|
176 |
(\<forall>a \<in> M. \<forall> b \<in> M. a \<inter> b \<in> M)" (is "_ \<longleftrightarrow> ?Int") |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
177 |
proof |
47694 | 178 |
assume "algebra \<Omega> M" |
179 |
then interpret algebra \<Omega> M . |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
180 |
show ?Int using sets_into_space by auto |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
181 |
next |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
182 |
assume ?Int |
47694 | 183 |
show "algebra \<Omega> M" |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
184 |
proof (unfold algebra_iff_Un, intro conjI ballI) |
47694 | 185 |
show \<Omega>: "M \<subseteq> Pow \<Omega>" "{} \<in> M" |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
186 |
using `?Int` by auto |
47694 | 187 |
from `?Int` show "\<And>a. a \<in> M \<Longrightarrow> \<Omega> - a \<in> M" by auto |
188 |
fix a b assume M: "a \<in> M" "b \<in> M" |
|
189 |
hence "a \<union> b = \<Omega> - ((\<Omega> - a) \<inter> (\<Omega> - b))" |
|
190 |
using \<Omega> by blast |
|
191 |
also have "... \<in> M" |
|
192 |
using M `?Int` by auto |
|
193 |
finally show "a \<union> b \<in> M" . |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
194 |
qed |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
195 |
qed |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
196 |
|
42867 | 197 |
lemma (in algebra) sets_Collect_neg: |
47694 | 198 |
assumes "{x\<in>\<Omega>. P x} \<in> M" |
199 |
shows "{x\<in>\<Omega>. \<not> P x} \<in> M" |
|
42867 | 200 |
proof - |
47694 | 201 |
have "{x\<in>\<Omega>. \<not> P x} = \<Omega> - {x\<in>\<Omega>. P x}" by auto |
42867 | 202 |
with assms show ?thesis by auto |
203 |
qed |
|
204 |
||
205 |
lemma (in algebra) sets_Collect_imp: |
|
47694 | 206 |
"{x\<in>\<Omega>. P x} \<in> M \<Longrightarrow> {x\<in>\<Omega>. Q x} \<in> M \<Longrightarrow> {x\<in>\<Omega>. Q x \<longrightarrow> P x} \<in> M" |
42867 | 207 |
unfolding imp_conv_disj by (intro sets_Collect_disj sets_Collect_neg) |
208 |
||
209 |
lemma (in algebra) sets_Collect_const: |
|
47694 | 210 |
"{x\<in>\<Omega>. P} \<in> M" |
42867 | 211 |
by (cases P) auto |
212 |
||
42984 | 213 |
lemma algebra_single_set: |
47762 | 214 |
"X \<subseteq> S \<Longrightarrow> algebra S { {}, X, S - X, S }" |
215 |
by (auto simp: algebra_iff_Int) |
|
42984 | 216 |
|
56994 | 217 |
subsubsection {* Restricted algebras *} |
39092 | 218 |
|
219 |
abbreviation (in algebra) |
|
47694 | 220 |
"restricted_space A \<equiv> (op \<inter> A) ` M" |
39092 | 221 |
|
38656 | 222 |
lemma (in algebra) restricted_algebra: |
47694 | 223 |
assumes "A \<in> M" shows "algebra A (restricted_space A)" |
47762 | 224 |
using assms by (auto simp: algebra_iff_Int) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
225 |
|
56994 | 226 |
subsubsection {* Sigma Algebras *} |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
227 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
228 |
locale sigma_algebra = algebra + |
47694 | 229 |
assumes countable_nat_UN [intro]: "\<And>A. range A \<subseteq> M \<Longrightarrow> (\<Union>i::nat. A i) \<in> M" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
230 |
|
42984 | 231 |
lemma (in algebra) is_sigma_algebra: |
47694 | 232 |
assumes "finite M" |
233 |
shows "sigma_algebra \<Omega> M" |
|
42984 | 234 |
proof |
47694 | 235 |
fix A :: "nat \<Rightarrow> 'a set" assume "range A \<subseteq> M" |
236 |
then have "(\<Union>i. A i) = (\<Union>s\<in>M \<inter> range A. s)" |
|
42984 | 237 |
by auto |
47694 | 238 |
also have "(\<Union>s\<in>M \<inter> range A. s) \<in> M" |
239 |
using `finite M` by auto |
|
240 |
finally show "(\<Union>i. A i) \<in> M" . |
|
42984 | 241 |
qed |
242 |
||
38656 | 243 |
lemma countable_UN_eq: |
244 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
|
47694 | 245 |
shows "(range A \<subseteq> M \<longrightarrow> (\<Union>i. A i) \<in> M) \<longleftrightarrow> |
246 |
(range (A \<circ> from_nat) \<subseteq> M \<longrightarrow> (\<Union>i. (A \<circ> from_nat) i) \<in> M)" |
|
38656 | 247 |
proof - |
248 |
let ?A' = "A \<circ> from_nat" |
|
249 |
have *: "(\<Union>i. ?A' i) = (\<Union>i. A i)" (is "?l = ?r") |
|
250 |
proof safe |
|
251 |
fix x i assume "x \<in> A i" thus "x \<in> ?l" |
|
252 |
by (auto intro!: exI[of _ "to_nat i"]) |
|
253 |
next |
|
254 |
fix x i assume "x \<in> ?A' i" thus "x \<in> ?r" |
|
255 |
by (auto intro!: exI[of _ "from_nat i"]) |
|
256 |
qed |
|
257 |
have **: "range ?A' = range A" |
|
40702 | 258 |
using surj_from_nat |
56154
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
54420
diff
changeset
|
259 |
by (auto simp: image_comp [symmetric] intro!: imageI) |
38656 | 260 |
show ?thesis unfolding * ** .. |
261 |
qed |
|
262 |
||
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
263 |
lemma (in sigma_algebra) countable_Union [intro]: |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
264 |
assumes "countable X" "X \<subseteq> M" shows "Union X \<in> M" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
265 |
proof cases |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
266 |
assume "X \<noteq> {}" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
267 |
hence "\<Union>X = (\<Union>n. from_nat_into X n)" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
268 |
using assms by (auto intro: from_nat_into) (metis from_nat_into_surj) |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
269 |
also have "\<dots> \<in> M" using assms |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
270 |
by (auto intro!: countable_nat_UN) (metis `X \<noteq> {}` from_nat_into set_mp) |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
271 |
finally show ?thesis . |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
272 |
qed simp |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50244
diff
changeset
|
273 |
|
38656 | 274 |
lemma (in sigma_algebra) countable_UN[intro]: |
275 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
|
47694 | 276 |
assumes "A`X \<subseteq> M" |
277 |
shows "(\<Union>x\<in>X. A x) \<in> M" |
|
38656 | 278 |
proof - |
46731 | 279 |
let ?A = "\<lambda>i. if i \<in> X then A i else {}" |
47694 | 280 |
from assms have "range ?A \<subseteq> M" by auto |
38656 | 281 |
with countable_nat_UN[of "?A \<circ> from_nat"] countable_UN_eq[of ?A M] |
47694 | 282 |
have "(\<Union>x. ?A x) \<in> M" by auto |
38656 | 283 |
moreover have "(\<Union>x. ?A x) = (\<Union>x\<in>X. A x)" by (auto split: split_if_asm) |
284 |
ultimately show ?thesis by simp |
|
285 |
qed |
|
286 |
||
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
287 |
lemma (in sigma_algebra) countable_UN': |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
288 |
fixes A :: "'i \<Rightarrow> 'a set" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
289 |
assumes X: "countable X" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
290 |
assumes A: "A`X \<subseteq> M" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
291 |
shows "(\<Union>x\<in>X. A x) \<in> M" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
292 |
proof - |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
293 |
have "(\<Union>x\<in>X. A x) = (\<Union>i\<in>to_nat_on X ` X. A (from_nat_into X i))" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
294 |
using X by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
295 |
also have "\<dots> \<in> M" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
296 |
using A X |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
297 |
by (intro countable_UN) auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
298 |
finally show ?thesis . |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
299 |
qed |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
300 |
|
33533
40b44cb20c8c
New theory Probability/Borel.thy, and some associated lemmas
paulson
parents:
33271
diff
changeset
|
301 |
lemma (in sigma_algebra) countable_INT [intro]: |
38656 | 302 |
fixes A :: "'i::countable \<Rightarrow> 'a set" |
47694 | 303 |
assumes A: "A`X \<subseteq> M" "X \<noteq> {}" |
304 |
shows "(\<Inter>i\<in>X. A i) \<in> M" |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
305 |
proof - |
47694 | 306 |
from A have "\<forall>i\<in>X. A i \<in> M" by fast |
307 |
hence "\<Omega> - (\<Union>i\<in>X. \<Omega> - A i) \<in> M" by blast |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
308 |
moreover |
47694 | 309 |
have "(\<Inter>i\<in>X. A i) = \<Omega> - (\<Union>i\<in>X. \<Omega> - A i)" using space_closed A |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
310 |
by blast |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
311 |
ultimately show ?thesis by metis |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
312 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
313 |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
314 |
lemma (in sigma_algebra) countable_INT': |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
315 |
fixes A :: "'i \<Rightarrow> 'a set" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
316 |
assumes X: "countable X" "X \<noteq> {}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
317 |
assumes A: "A`X \<subseteq> M" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
318 |
shows "(\<Inter>x\<in>X. A x) \<in> M" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
319 |
proof - |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
320 |
have "(\<Inter>x\<in>X. A x) = (\<Inter>i\<in>to_nat_on X ` X. A (from_nat_into X i))" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
321 |
using X by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
322 |
also have "\<dots> \<in> M" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
323 |
using A X |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
324 |
by (intro countable_INT) auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
325 |
finally show ?thesis . |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
326 |
qed |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
327 |
|
59088
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
328 |
lemma (in sigma_algebra) countable_INT'': |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
329 |
"UNIV \<in> M \<Longrightarrow> countable I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> F i \<in> M) \<Longrightarrow> (\<Inter>i\<in>I. F i) \<in> M" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
330 |
by (cases "I = {}") (auto intro: countable_INT') |
57275
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
331 |
|
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
332 |
lemma (in sigma_algebra) countable: |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
333 |
assumes "\<And>a. a \<in> A \<Longrightarrow> {a} \<in> M" "countable A" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
334 |
shows "A \<in> M" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
335 |
proof - |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
336 |
have "(\<Union>a\<in>A. {a}) \<in> M" |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
337 |
using assms by (intro countable_UN') auto |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
338 |
also have "(\<Union>a\<in>A. {a}) = A" by auto |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
339 |
finally show ?thesis by auto |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
340 |
qed |
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
hoelzl
parents:
57138
diff
changeset
|
341 |
|
47694 | 342 |
lemma ring_of_sets_Pow: "ring_of_sets sp (Pow sp)" |
47762 | 343 |
by (auto simp: ring_of_sets_iff) |
42145 | 344 |
|
47694 | 345 |
lemma algebra_Pow: "algebra sp (Pow sp)" |
47762 | 346 |
by (auto simp: algebra_iff_Un) |
38656 | 347 |
|
348 |
lemma sigma_algebra_iff: |
|
47694 | 349 |
"sigma_algebra \<Omega> M \<longleftrightarrow> |
350 |
algebra \<Omega> M \<and> (\<forall>A. range A \<subseteq> M \<longrightarrow> (\<Union>i::nat. A i) \<in> M)" |
|
38656 | 351 |
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
|
352 |
|
47762 | 353 |
lemma sigma_algebra_Pow: "sigma_algebra sp (Pow sp)" |
354 |
by (auto simp: sigma_algebra_iff algebra_iff_Int) |
|
355 |
||
42867 | 356 |
lemma (in sigma_algebra) sets_Collect_countable_All: |
47694 | 357 |
assumes "\<And>i. {x\<in>\<Omega>. P i x} \<in> M" |
358 |
shows "{x\<in>\<Omega>. \<forall>i::'i::countable. P i x} \<in> M" |
|
42867 | 359 |
proof - |
47694 | 360 |
have "{x\<in>\<Omega>. \<forall>i::'i::countable. P i x} = (\<Inter>i. {x\<in>\<Omega>. P i x})" by auto |
42867 | 361 |
with assms show ?thesis by auto |
362 |
qed |
|
363 |
||
364 |
lemma (in sigma_algebra) sets_Collect_countable_Ex: |
|
47694 | 365 |
assumes "\<And>i. {x\<in>\<Omega>. P i x} \<in> M" |
366 |
shows "{x\<in>\<Omega>. \<exists>i::'i::countable. P i x} \<in> M" |
|
42867 | 367 |
proof - |
47694 | 368 |
have "{x\<in>\<Omega>. \<exists>i::'i::countable. P i x} = (\<Union>i. {x\<in>\<Omega>. P i x})" by auto |
42867 | 369 |
with assms show ?thesis by auto |
370 |
qed |
|
371 |
||
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
372 |
lemma (in sigma_algebra) sets_Collect_countable_Ex': |
54418 | 373 |
assumes "\<And>i. i \<in> I \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
374 |
assumes "countable I" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
375 |
shows "{x\<in>\<Omega>. \<exists>i\<in>I. P i x} \<in> M" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
376 |
proof - |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
377 |
have "{x\<in>\<Omega>. \<exists>i\<in>I. P i x} = (\<Union>i\<in>I. {x\<in>\<Omega>. P i x})" by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
378 |
with assms show ?thesis |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
379 |
by (auto intro!: countable_UN') |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
380 |
qed |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50387
diff
changeset
|
381 |
|
54418 | 382 |
lemma (in sigma_algebra) sets_Collect_countable_All': |
383 |
assumes "\<And>i. i \<in> I \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" |
|
384 |
assumes "countable I" |
|
385 |
shows "{x\<in>\<Omega>. \<forall>i\<in>I. P i x} \<in> M" |
|
386 |
proof - |
|
387 |
have "{x\<in>\<Omega>. \<forall>i\<in>I. P i x} = (\<Inter>i\<in>I. {x\<in>\<Omega>. P i x}) \<inter> \<Omega>" by auto |
|
388 |
with assms show ?thesis |
|
389 |
by (cases "I = {}") (auto intro!: countable_INT') |
|
390 |
qed |
|
391 |
||
392 |
lemma (in sigma_algebra) sets_Collect_countable_Ex1': |
|
393 |
assumes "\<And>i. i \<in> I \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" |
|
394 |
assumes "countable I" |
|
395 |
shows "{x\<in>\<Omega>. \<exists>!i\<in>I. P i x} \<in> M" |
|
396 |
proof - |
|
397 |
have "{x\<in>\<Omega>. \<exists>!i\<in>I. P i x} = {x\<in>\<Omega>. \<exists>i\<in>I. P i x \<and> (\<forall>j\<in>I. P j x \<longrightarrow> i = j)}" |
|
398 |
by auto |
|
399 |
with assms show ?thesis |
|
400 |
by (auto intro!: sets_Collect_countable_All' sets_Collect_countable_Ex' sets_Collect_conj sets_Collect_imp sets_Collect_const) |
|
401 |
qed |
|
402 |
||
42867 | 403 |
lemmas (in sigma_algebra) sets_Collect = |
404 |
sets_Collect_imp sets_Collect_disj sets_Collect_conj sets_Collect_neg sets_Collect_const |
|
405 |
sets_Collect_countable_All sets_Collect_countable_Ex sets_Collect_countable_All |
|
406 |
||
47694 | 407 |
lemma (in sigma_algebra) sets_Collect_countable_Ball: |
408 |
assumes "\<And>i. {x\<in>\<Omega>. P i x} \<in> M" |
|
409 |
shows "{x\<in>\<Omega>. \<forall>i::'i::countable\<in>X. P i x} \<in> M" |
|
410 |
unfolding Ball_def by (intro sets_Collect assms) |
|
411 |
||
412 |
lemma (in sigma_algebra) sets_Collect_countable_Bex: |
|
413 |
assumes "\<And>i. {x\<in>\<Omega>. P i x} \<in> M" |
|
414 |
shows "{x\<in>\<Omega>. \<exists>i::'i::countable\<in>X. P i x} \<in> M" |
|
415 |
unfolding Bex_def by (intro sets_Collect assms) |
|
416 |
||
42984 | 417 |
lemma sigma_algebra_single_set: |
418 |
assumes "X \<subseteq> S" |
|
47694 | 419 |
shows "sigma_algebra S { {}, X, S - X, S }" |
42984 | 420 |
using algebra.is_sigma_algebra[OF algebra_single_set[OF `X \<subseteq> S`]] by simp |
421 |
||
56994 | 422 |
subsubsection {* Binary Unions *} |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
423 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
424 |
definition binary :: "'a \<Rightarrow> 'a \<Rightarrow> nat \<Rightarrow> 'a" |
50252 | 425 |
where "binary a b = (\<lambda>x. b)(0 := a)" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
426 |
|
38656 | 427 |
lemma range_binary_eq: "range(binary a b) = {a,b}" |
428 |
by (auto simp add: binary_def) |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
429 |
|
38656 | 430 |
lemma Un_range_binary: "a \<union> b = (\<Union>i::nat. binary a b i)" |
44106 | 431 |
by (simp add: SUP_def range_binary_eq) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
432 |
|
38656 | 433 |
lemma Int_range_binary: "a \<inter> b = (\<Inter>i::nat. binary a b i)" |
44106 | 434 |
by (simp add: INF_def range_binary_eq) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
435 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
436 |
lemma sigma_algebra_iff2: |
47694 | 437 |
"sigma_algebra \<Omega> M \<longleftrightarrow> |
438 |
M \<subseteq> Pow \<Omega> \<and> |
|
439 |
{} \<in> M \<and> (\<forall>s \<in> M. \<Omega> - s \<in> M) \<and> |
|
440 |
(\<forall>A. range A \<subseteq> M \<longrightarrow> (\<Union>i::nat. A i) \<in> M)" |
|
38656 | 441 |
by (auto simp add: range_binary_eq sigma_algebra_def sigma_algebra_axioms_def |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
442 |
algebra_iff_Un Un_range_binary) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
443 |
|
56994 | 444 |
subsubsection {* Initial Sigma Algebra *} |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
445 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
446 |
text {*Sigma algebras can naturally be created as the closure of any set of |
47694 | 447 |
M with regard to the properties just postulated. *} |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
448 |
|
51683
baefa3b461c2
generalize Borel-set properties from real/ereal/ordered_euclidean_spaces to order_topology and real_normed_vector
hoelzl
parents:
50526
diff
changeset
|
449 |
inductive_set sigma_sets :: "'a set \<Rightarrow> 'a set set \<Rightarrow> 'a set set" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
450 |
for sp :: "'a set" and A :: "'a set set" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
451 |
where |
47694 | 452 |
Basic[intro, simp]: "a \<in> A \<Longrightarrow> a \<in> sigma_sets sp A" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
453 |
| Empty: "{} \<in> sigma_sets sp A" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
454 |
| 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
|
455 |
| 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
|
456 |
|
41543 | 457 |
lemma (in sigma_algebra) sigma_sets_subset: |
47694 | 458 |
assumes a: "a \<subseteq> M" |
459 |
shows "sigma_sets \<Omega> a \<subseteq> M" |
|
41543 | 460 |
proof |
461 |
fix x |
|
47694 | 462 |
assume "x \<in> sigma_sets \<Omega> a" |
463 |
from this show "x \<in> M" |
|
41543 | 464 |
by (induct rule: sigma_sets.induct, auto) (metis a subsetD) |
465 |
qed |
|
466 |
||
467 |
lemma sigma_sets_into_sp: "A \<subseteq> Pow sp \<Longrightarrow> x \<in> sigma_sets sp A \<Longrightarrow> x \<subseteq> sp" |
|
468 |
by (erule sigma_sets.induct, auto) |
|
469 |
||
470 |
lemma sigma_algebra_sigma_sets: |
|
47694 | 471 |
"a \<subseteq> Pow \<Omega> \<Longrightarrow> sigma_algebra \<Omega> (sigma_sets \<Omega> a)" |
41543 | 472 |
by (auto simp add: sigma_algebra_iff2 dest: sigma_sets_into_sp |
473 |
intro!: sigma_sets.Union sigma_sets.Empty sigma_sets.Compl) |
|
474 |
||
475 |
lemma sigma_sets_least_sigma_algebra: |
|
476 |
assumes "A \<subseteq> Pow S" |
|
47694 | 477 |
shows "sigma_sets S A = \<Inter>{B. A \<subseteq> B \<and> sigma_algebra S B}" |
41543 | 478 |
proof safe |
47694 | 479 |
fix B X assume "A \<subseteq> B" and sa: "sigma_algebra S B" |
41543 | 480 |
and X: "X \<in> sigma_sets S A" |
481 |
from sigma_algebra.sigma_sets_subset[OF sa, simplified, OF `A \<subseteq> B`] X |
|
482 |
show "X \<in> B" by auto |
|
483 |
next |
|
47694 | 484 |
fix X assume "X \<in> \<Inter>{B. A \<subseteq> B \<and> sigma_algebra S B}" |
485 |
then have [intro!]: "\<And>B. A \<subseteq> B \<Longrightarrow> sigma_algebra S B \<Longrightarrow> X \<in> B" |
|
41543 | 486 |
by simp |
47694 | 487 |
have "A \<subseteq> sigma_sets S A" using assms by auto |
488 |
moreover have "sigma_algebra S (sigma_sets S A)" |
|
41543 | 489 |
using assms by (intro sigma_algebra_sigma_sets[of A]) auto |
490 |
ultimately show "X \<in> sigma_sets S A" by auto |
|
491 |
qed |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
492 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
493 |
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
|
494 |
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
|
495 |
|
38656 | 496 |
lemma sigma_sets_Un: |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
497 |
"a \<in> sigma_sets sp A \<Longrightarrow> b \<in> sigma_sets sp A \<Longrightarrow> a \<union> b \<in> sigma_sets sp A" |
38656 | 498 |
apply (simp add: Un_range_binary range_binary_eq) |
40859 | 499 |
apply (rule Union, simp add: binary_def) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
500 |
done |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
501 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
502 |
lemma sigma_sets_Inter: |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
503 |
assumes Asb: "A \<subseteq> Pow sp" |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
504 |
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
|
505 |
proof - |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
506 |
assume ai: "\<And>i::nat. a i \<in> sigma_sets sp A" |
38656 | 507 |
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
|
508 |
by (rule sigma_sets.Compl) |
38656 | 509 |
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
|
510 |
by (rule sigma_sets.Union) |
38656 | 511 |
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
|
512 |
by (rule sigma_sets.Compl) |
38656 | 513 |
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
|
514 |
by auto |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
515 |
also have "... = (\<Inter>i. a i)" using ai |
38656 | 516 |
by (blast dest: sigma_sets_into_sp [OF Asb]) |
517 |
finally show ?thesis . |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
518 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
519 |
|
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
520 |
lemma sigma_sets_INTER: |
38656 | 521 |
assumes Asb: "A \<subseteq> Pow sp" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
522 |
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
|
523 |
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
|
524 |
proof - |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
525 |
from ai have "\<And>i. (if i\<in>S then a i else sp) \<in> sigma_sets sp A" |
47694 | 526 |
by (simp add: sigma_sets.intros(2-) sigma_sets_top) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
527 |
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
|
528 |
by (rule sigma_sets_Inter [OF Asb]) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
529 |
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
|
530 |
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
|
531 |
finally show ?thesis . |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
532 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
533 |
|
51683
baefa3b461c2
generalize Borel-set properties from real/ereal/ordered_euclidean_spaces to order_topology and real_normed_vector
hoelzl
parents:
50526
diff
changeset
|
534 |
lemma sigma_sets_UNION: "countable B \<Longrightarrow> (\<And>b. b \<in> B \<Longrightarrow> b \<in> sigma_sets X A) \<Longrightarrow> (\<Union>B) \<in> sigma_sets X A" |
baefa3b461c2
generalize Borel-set properties from real/ereal/ordered_euclidean_spaces to order_topology and real_normed_vector
hoelzl
parents:
50526
diff
changeset
|
535 |
using from_nat_into[of B] range_from_nat_into[of B] sigma_sets.Union[of "from_nat_into B" X A] |
baefa3b461c2
generalize Borel-set properties from real/ereal/ordered_euclidean_spaces to order_topology and real_normed_vector
hoelzl
parents:
50526
diff
changeset
|
536 |
apply (cases "B = {}") |
baefa3b461c2
generalize Borel-set properties from real/ereal/ordered_euclidean_spaces to order_topology and real_normed_vector
hoelzl
parents:
50526
diff
changeset
|
537 |
apply (simp add: sigma_sets.Empty) |
baefa3b461c2
generalize Borel-set properties from real/ereal/ordered_euclidean_spaces to order_topology and real_normed_vector
hoelzl
parents:
50526
diff
changeset
|
538 |
apply (simp del: Union_image_eq add: Union_image_eq[symmetric]) |
baefa3b461c2
generalize Borel-set properties from real/ereal/ordered_euclidean_spaces to order_topology and real_normed_vector
hoelzl
parents:
50526
diff
changeset
|
539 |
done |
baefa3b461c2
generalize Borel-set properties from real/ereal/ordered_euclidean_spaces to order_topology and real_normed_vector
hoelzl
parents:
50526
diff
changeset
|
540 |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
541 |
lemma (in sigma_algebra) sigma_sets_eq: |
47694 | 542 |
"sigma_sets \<Omega> M = M" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
543 |
proof |
47694 | 544 |
show "M \<subseteq> sigma_sets \<Omega> M" |
37032 | 545 |
by (metis Set.subsetI sigma_sets.Basic) |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
546 |
next |
47694 | 547 |
show "sigma_sets \<Omega> M \<subseteq> M" |
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
548 |
by (metis sigma_sets_subset subset_refl) |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
549 |
qed |
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
550 |
|
42981 | 551 |
lemma sigma_sets_eqI: |
552 |
assumes A: "\<And>a. a \<in> A \<Longrightarrow> a \<in> sigma_sets M B" |
|
553 |
assumes B: "\<And>b. b \<in> B \<Longrightarrow> b \<in> sigma_sets M A" |
|
554 |
shows "sigma_sets M A = sigma_sets M B" |
|
555 |
proof (intro set_eqI iffI) |
|
556 |
fix a assume "a \<in> sigma_sets M A" |
|
557 |
from this A show "a \<in> sigma_sets M B" |
|
47694 | 558 |
by induct (auto intro!: sigma_sets.intros(2-) del: sigma_sets.Basic) |
42981 | 559 |
next |
560 |
fix b assume "b \<in> sigma_sets M B" |
|
561 |
from this B show "b \<in> sigma_sets M A" |
|
47694 | 562 |
by induct (auto intro!: sigma_sets.intros(2-) del: sigma_sets.Basic) |
42981 | 563 |
qed |
564 |
||
42984 | 565 |
lemma sigma_sets_subseteq: assumes "A \<subseteq> B" shows "sigma_sets X A \<subseteq> sigma_sets X B" |
566 |
proof |
|
567 |
fix x assume "x \<in> sigma_sets X A" then show "x \<in> sigma_sets X B" |
|
47694 | 568 |
by induct (insert `A \<subseteq> B`, auto intro: sigma_sets.intros(2-)) |
42984 | 569 |
qed |
570 |
||
47762 | 571 |
lemma sigma_sets_mono: assumes "A \<subseteq> sigma_sets X B" shows "sigma_sets X A \<subseteq> sigma_sets X B" |
572 |
proof |
|
573 |
fix x assume "x \<in> sigma_sets X A" then show "x \<in> sigma_sets X B" |
|
574 |
by induct (insert `A \<subseteq> sigma_sets X B`, auto intro: sigma_sets.intros(2-)) |
|
575 |
qed |
|
576 |
||
577 |
lemma sigma_sets_mono': assumes "A \<subseteq> B" shows "sigma_sets X A \<subseteq> sigma_sets X B" |
|
578 |
proof |
|
579 |
fix x assume "x \<in> sigma_sets X A" then show "x \<in> sigma_sets X B" |
|
580 |
by induct (insert `A \<subseteq> B`, auto intro: sigma_sets.intros(2-)) |
|
581 |
qed |
|
582 |
||
583 |
lemma sigma_sets_superset_generator: "A \<subseteq> sigma_sets X A" |
|
584 |
by (auto intro: sigma_sets.Basic) |
|
585 |
||
38656 | 586 |
lemma (in sigma_algebra) restriction_in_sets: |
587 |
fixes A :: "nat \<Rightarrow> 'a set" |
|
47694 | 588 |
assumes "S \<in> M" |
589 |
and *: "range A \<subseteq> (\<lambda>A. S \<inter> A) ` M" (is "_ \<subseteq> ?r") |
|
590 |
shows "range A \<subseteq> M" "(\<Union>i. A i) \<in> (\<lambda>A. S \<inter> A) ` M" |
|
38656 | 591 |
proof - |
592 |
{ fix i have "A i \<in> ?r" using * by auto |
|
47694 | 593 |
hence "\<exists>B. A i = B \<inter> S \<and> B \<in> M" by auto |
594 |
hence "A i \<subseteq> S" "A i \<in> M" using `S \<in> M` by auto } |
|
595 |
thus "range A \<subseteq> M" "(\<Union>i. A i) \<in> (\<lambda>A. S \<inter> A) ` M" |
|
38656 | 596 |
by (auto intro!: image_eqI[of _ _ "(\<Union>i. A i)"]) |
597 |
qed |
|
598 |
||
599 |
lemma (in sigma_algebra) restricted_sigma_algebra: |
|
47694 | 600 |
assumes "S \<in> M" |
601 |
shows "sigma_algebra S (restricted_space S)" |
|
38656 | 602 |
unfolding sigma_algebra_def sigma_algebra_axioms_def |
603 |
proof safe |
|
47694 | 604 |
show "algebra S (restricted_space S)" using restricted_algebra[OF assms] . |
38656 | 605 |
next |
47694 | 606 |
fix A :: "nat \<Rightarrow> 'a set" assume "range A \<subseteq> restricted_space S" |
38656 | 607 |
from restriction_in_sets[OF assms this[simplified]] |
47694 | 608 |
show "(\<Union>i. A i) \<in> restricted_space S" by simp |
38656 | 609 |
qed |
610 |
||
40859 | 611 |
lemma sigma_sets_Int: |
41689
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
612 |
assumes "A \<in> sigma_sets sp st" "A \<subseteq> sp" |
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
613 |
shows "op \<inter> A ` sigma_sets sp st = sigma_sets A (op \<inter> A ` st)" |
40859 | 614 |
proof (intro equalityI subsetI) |
615 |
fix x assume "x \<in> op \<inter> A ` sigma_sets sp st" |
|
616 |
then obtain y where "y \<in> sigma_sets sp st" "x = y \<inter> A" by auto |
|
41689
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
617 |
then have "x \<in> sigma_sets (A \<inter> sp) (op \<inter> A ` st)" |
40859 | 618 |
proof (induct arbitrary: x) |
619 |
case (Compl a) |
|
620 |
then show ?case |
|
621 |
by (force intro!: sigma_sets.Compl simp: Diff_Int_distrib ac_simps) |
|
622 |
next |
|
623 |
case (Union a) |
|
624 |
then show ?case |
|
625 |
by (auto intro!: sigma_sets.Union |
|
626 |
simp add: UN_extend_simps simp del: UN_simps) |
|
47694 | 627 |
qed (auto intro!: sigma_sets.intros(2-)) |
41689
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
628 |
then show "x \<in> sigma_sets A (op \<inter> A ` st)" |
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
629 |
using `A \<subseteq> sp` by (simp add: Int_absorb2) |
40859 | 630 |
next |
41689
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
631 |
fix x assume "x \<in> sigma_sets A (op \<inter> A ` st)" |
40859 | 632 |
then show "x \<in> op \<inter> A ` sigma_sets sp st" |
633 |
proof induct |
|
634 |
case (Compl a) |
|
635 |
then obtain x where "a = A \<inter> x" "x \<in> sigma_sets sp st" by auto |
|
41689
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
636 |
then show ?case using `A \<subseteq> sp` |
40859 | 637 |
by (force simp add: image_iff intro!: bexI[of _ "sp - x"] sigma_sets.Compl) |
638 |
next |
|
639 |
case (Union a) |
|
640 |
then have "\<forall>i. \<exists>x. x \<in> sigma_sets sp st \<and> a i = A \<inter> x" |
|
641 |
by (auto simp: image_iff Bex_def) |
|
642 |
from choice[OF this] guess f .. |
|
643 |
then show ?case |
|
644 |
by (auto intro!: bexI[of _ "(\<Union>x. f x)"] sigma_sets.Union |
|
645 |
simp add: image_iff) |
|
47694 | 646 |
qed (auto intro!: sigma_sets.intros(2-)) |
40859 | 647 |
qed |
648 |
||
47694 | 649 |
lemma sigma_sets_empty_eq: "sigma_sets A {} = {{}, A}" |
40859 | 650 |
proof (intro set_eqI iffI) |
47694 | 651 |
fix a assume "a \<in> sigma_sets A {}" then show "a \<in> {{}, A}" |
652 |
by induct blast+ |
|
653 |
qed (auto intro: sigma_sets.Empty sigma_sets_top) |
|
654 |
||
655 |
lemma sigma_sets_single[simp]: "sigma_sets A {A} = {{}, A}" |
|
656 |
proof (intro set_eqI iffI) |
|
657 |
fix x assume "x \<in> sigma_sets A {A}" |
|
658 |
then show "x \<in> {{}, A}" |
|
659 |
by induct blast+ |
|
40859 | 660 |
next |
47694 | 661 |
fix x assume "x \<in> {{}, A}" |
662 |
then show "x \<in> sigma_sets A {A}" |
|
40859 | 663 |
by (auto intro: sigma_sets.Empty sigma_sets_top) |
664 |
qed |
|
665 |
||
42987 | 666 |
lemma sigma_sets_sigma_sets_eq: |
667 |
"M \<subseteq> Pow S \<Longrightarrow> sigma_sets S (sigma_sets S M) = sigma_sets S M" |
|
47694 | 668 |
by (rule sigma_algebra.sigma_sets_eq[OF sigma_algebra_sigma_sets, of M S]) auto |
42987 | 669 |
|
42984 | 670 |
lemma sigma_sets_singleton: |
671 |
assumes "X \<subseteq> S" |
|
672 |
shows "sigma_sets S { X } = { {}, X, S - X, S }" |
|
673 |
proof - |
|
47694 | 674 |
interpret sigma_algebra S "{ {}, X, S - X, S }" |
42984 | 675 |
by (rule sigma_algebra_single_set) fact |
676 |
have "sigma_sets S { X } \<subseteq> sigma_sets S { {}, X, S - X, S }" |
|
677 |
by (rule sigma_sets_subseteq) simp |
|
678 |
moreover have "\<dots> = { {}, X, S - X, S }" |
|
47694 | 679 |
using sigma_sets_eq by simp |
42984 | 680 |
moreover |
681 |
{ fix A assume "A \<in> { {}, X, S - X, S }" |
|
682 |
then have "A \<in> sigma_sets S { X }" |
|
47694 | 683 |
by (auto intro: sigma_sets.intros(2-) sigma_sets_top) } |
42984 | 684 |
ultimately have "sigma_sets S { X } = sigma_sets S { {}, X, S - X, S }" |
685 |
by (intro antisym) auto |
|
47694 | 686 |
with sigma_sets_eq show ?thesis by simp |
42984 | 687 |
qed |
688 |
||
42863 | 689 |
lemma restricted_sigma: |
47694 | 690 |
assumes S: "S \<in> sigma_sets \<Omega> M" and M: "M \<subseteq> Pow \<Omega>" |
691 |
shows "algebra.restricted_space (sigma_sets \<Omega> M) S = |
|
692 |
sigma_sets S (algebra.restricted_space M S)" |
|
42863 | 693 |
proof - |
694 |
from S sigma_sets_into_sp[OF M] |
|
47694 | 695 |
have "S \<in> sigma_sets \<Omega> M" "S \<subseteq> \<Omega>" by auto |
42863 | 696 |
from sigma_sets_Int[OF this] |
47694 | 697 |
show ?thesis by simp |
42863 | 698 |
qed |
699 |
||
42987 | 700 |
lemma sigma_sets_vimage_commute: |
47694 | 701 |
assumes X: "X \<in> \<Omega> \<rightarrow> \<Omega>'" |
702 |
shows "{X -` A \<inter> \<Omega> |A. A \<in> sigma_sets \<Omega>' M'} |
|
703 |
= sigma_sets \<Omega> {X -` A \<inter> \<Omega> |A. A \<in> M'}" (is "?L = ?R") |
|
42987 | 704 |
proof |
705 |
show "?L \<subseteq> ?R" |
|
706 |
proof clarify |
|
47694 | 707 |
fix A assume "A \<in> sigma_sets \<Omega>' M'" |
708 |
then show "X -` A \<inter> \<Omega> \<in> ?R" |
|
42987 | 709 |
proof induct |
710 |
case Empty then show ?case |
|
711 |
by (auto intro!: sigma_sets.Empty) |
|
712 |
next |
|
713 |
case (Compl B) |
|
47694 | 714 |
have [simp]: "X -` (\<Omega>' - B) \<inter> \<Omega> = \<Omega> - (X -` B \<inter> \<Omega>)" |
42987 | 715 |
by (auto simp add: funcset_mem [OF X]) |
716 |
with Compl show ?case |
|
717 |
by (auto intro!: sigma_sets.Compl) |
|
718 |
next |
|
719 |
case (Union F) |
|
720 |
then show ?case |
|
721 |
by (auto simp add: vimage_UN UN_extend_simps(4) simp del: UN_simps |
|
722 |
intro!: sigma_sets.Union) |
|
47694 | 723 |
qed auto |
42987 | 724 |
qed |
725 |
show "?R \<subseteq> ?L" |
|
726 |
proof clarify |
|
727 |
fix A assume "A \<in> ?R" |
|
47694 | 728 |
then show "\<exists>B. A = X -` B \<inter> \<Omega> \<and> B \<in> sigma_sets \<Omega>' M'" |
42987 | 729 |
proof induct |
730 |
case (Basic B) then show ?case by auto |
|
731 |
next |
|
732 |
case Empty then show ?case |
|
47694 | 733 |
by (auto intro!: sigma_sets.Empty exI[of _ "{}"]) |
42987 | 734 |
next |
735 |
case (Compl B) |
|
47694 | 736 |
then obtain A where A: "B = X -` A \<inter> \<Omega>" "A \<in> sigma_sets \<Omega>' M'" by auto |
737 |
then have [simp]: "\<Omega> - B = X -` (\<Omega>' - A) \<inter> \<Omega>" |
|
42987 | 738 |
by (auto simp add: funcset_mem [OF X]) |
739 |
with A(2) show ?case |
|
47694 | 740 |
by (auto intro: sigma_sets.Compl) |
42987 | 741 |
next |
742 |
case (Union F) |
|
47694 | 743 |
then have "\<forall>i. \<exists>B. F i = X -` B \<inter> \<Omega> \<and> B \<in> sigma_sets \<Omega>' M'" by auto |
42987 | 744 |
from choice[OF this] guess A .. note A = this |
745 |
with A show ?case |
|
47694 | 746 |
by (auto simp: vimage_UN[symmetric] intro: sigma_sets.Union) |
42987 | 747 |
qed |
748 |
qed |
|
749 |
qed |
|
750 |
||
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
751 |
lemma (in ring_of_sets) UNION_in_sets: |
38656 | 752 |
fixes A:: "nat \<Rightarrow> 'a set" |
47694 | 753 |
assumes A: "range A \<subseteq> M" |
754 |
shows "(\<Union>i\<in>{0..<n}. A i) \<in> M" |
|
38656 | 755 |
proof (induct n) |
756 |
case 0 show ?case by simp |
|
757 |
next |
|
758 |
case (Suc n) |
|
759 |
thus ?case |
|
760 |
by (simp add: atLeastLessThanSuc) (metis A Un UNIV_I image_subset_iff) |
|
761 |
qed |
|
762 |
||
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
763 |
lemma (in ring_of_sets) range_disjointed_sets: |
47694 | 764 |
assumes A: "range A \<subseteq> M" |
765 |
shows "range (disjointed A) \<subseteq> M" |
|
38656 | 766 |
proof (auto simp add: disjointed_def) |
767 |
fix n |
|
47694 | 768 |
show "A n - (\<Union>i\<in>{0..<n}. A i) \<in> M" using UNION_in_sets |
38656 | 769 |
by (metis A Diff UNIV_I image_subset_iff) |
770 |
qed |
|
771 |
||
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
772 |
lemma (in algebra) range_disjointed_sets': |
47694 | 773 |
"range A \<subseteq> M \<Longrightarrow> range (disjointed A) \<subseteq> M" |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
774 |
using range_disjointed_sets . |
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
775 |
|
38656 | 776 |
lemma sigma_algebra_disjoint_iff: |
47694 | 777 |
"sigma_algebra \<Omega> M \<longleftrightarrow> algebra \<Omega> M \<and> |
778 |
(\<forall>A. range A \<subseteq> M \<longrightarrow> disjoint_family A \<longrightarrow> (\<Union>i::nat. A i) \<in> M)" |
|
38656 | 779 |
proof (auto simp add: sigma_algebra_iff) |
780 |
fix A :: "nat \<Rightarrow> 'a set" |
|
47694 | 781 |
assume M: "algebra \<Omega> M" |
782 |
and A: "range A \<subseteq> M" |
|
783 |
and UnA: "\<forall>A. range A \<subseteq> M \<longrightarrow> disjoint_family A \<longrightarrow> (\<Union>i::nat. A i) \<in> M" |
|
784 |
hence "range (disjointed A) \<subseteq> M \<longrightarrow> |
|
38656 | 785 |
disjoint_family (disjointed A) \<longrightarrow> |
47694 | 786 |
(\<Union>i. disjointed A i) \<in> M" by blast |
787 |
hence "(\<Union>i. disjointed A i) \<in> M" |
|
788 |
by (simp add: algebra.range_disjointed_sets'[of \<Omega>] M A disjoint_family_disjointed) |
|
789 |
thus "(\<Union>i::nat. A i) \<in> M" by (simp add: UN_disjointed_eq) |
|
790 |
qed |
|
791 |
||
56994 | 792 |
subsubsection {* Ring generated by a semiring *} |
47762 | 793 |
|
794 |
definition (in semiring_of_sets) |
|
795 |
"generated_ring = { \<Union>C | C. C \<subseteq> M \<and> finite C \<and> disjoint C }" |
|
796 |
||
797 |
lemma (in semiring_of_sets) generated_ringE[elim?]: |
|
798 |
assumes "a \<in> generated_ring" |
|
799 |
obtains C where "finite C" "disjoint C" "C \<subseteq> M" "a = \<Union>C" |
|
800 |
using assms unfolding generated_ring_def by auto |
|
801 |
||
802 |
lemma (in semiring_of_sets) generated_ringI[intro?]: |
|
803 |
assumes "finite C" "disjoint C" "C \<subseteq> M" "a = \<Union>C" |
|
804 |
shows "a \<in> generated_ring" |
|
805 |
using assms unfolding generated_ring_def by auto |
|
806 |
||
807 |
lemma (in semiring_of_sets) generated_ringI_Basic: |
|
808 |
"A \<in> M \<Longrightarrow> A \<in> generated_ring" |
|
809 |
by (rule generated_ringI[of "{A}"]) (auto simp: disjoint_def) |
|
810 |
||
811 |
lemma (in semiring_of_sets) generated_ring_disjoint_Un[intro]: |
|
812 |
assumes a: "a \<in> generated_ring" and b: "b \<in> generated_ring" |
|
813 |
and "a \<inter> b = {}" |
|
814 |
shows "a \<union> b \<in> generated_ring" |
|
815 |
proof - |
|
816 |
from a guess Ca .. note Ca = this |
|
817 |
from b guess Cb .. note Cb = this |
|
818 |
show ?thesis |
|
819 |
proof |
|
820 |
show "disjoint (Ca \<union> Cb)" |
|
821 |
using `a \<inter> b = {}` Ca Cb by (auto intro!: disjoint_union) |
|
822 |
qed (insert Ca Cb, auto) |
|
823 |
qed |
|
824 |
||
825 |
lemma (in semiring_of_sets) generated_ring_empty: "{} \<in> generated_ring" |
|
826 |
by (auto simp: generated_ring_def disjoint_def) |
|
827 |
||
828 |
lemma (in semiring_of_sets) generated_ring_disjoint_Union: |
|
829 |
assumes "finite A" shows "A \<subseteq> generated_ring \<Longrightarrow> disjoint A \<Longrightarrow> \<Union>A \<in> generated_ring" |
|
830 |
using assms by (induct A) (auto simp: disjoint_def intro!: generated_ring_disjoint_Un generated_ring_empty) |
|
831 |
||
832 |
lemma (in semiring_of_sets) generated_ring_disjoint_UNION: |
|
833 |
"finite I \<Longrightarrow> disjoint (A ` I) \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> A i \<in> generated_ring) \<Longrightarrow> UNION I A \<in> generated_ring" |
|
834 |
unfolding SUP_def by (intro generated_ring_disjoint_Union) auto |
|
835 |
||
836 |
lemma (in semiring_of_sets) generated_ring_Int: |
|
837 |
assumes a: "a \<in> generated_ring" and b: "b \<in> generated_ring" |
|
838 |
shows "a \<inter> b \<in> generated_ring" |
|
839 |
proof - |
|
840 |
from a guess Ca .. note Ca = this |
|
841 |
from b guess Cb .. note Cb = this |
|
842 |
def C \<equiv> "(\<lambda>(a,b). a \<inter> b)` (Ca\<times>Cb)" |
|
843 |
show ?thesis |
|
844 |
proof |
|
845 |
show "disjoint C" |
|
846 |
proof (simp add: disjoint_def C_def, intro ballI impI) |
|
847 |
fix a1 b1 a2 b2 assume sets: "a1 \<in> Ca" "b1 \<in> Cb" "a2 \<in> Ca" "b2 \<in> Cb" |
|
848 |
assume "a1 \<inter> b1 \<noteq> a2 \<inter> b2" |
|
849 |
then have "a1 \<noteq> a2 \<or> b1 \<noteq> b2" by auto |
|
850 |
then show "(a1 \<inter> b1) \<inter> (a2 \<inter> b2) = {}" |
|
851 |
proof |
|
852 |
assume "a1 \<noteq> a2" |
|
853 |
with sets Ca have "a1 \<inter> a2 = {}" |
|
854 |
by (auto simp: disjoint_def) |
|
855 |
then show ?thesis by auto |
|
856 |
next |
|
857 |
assume "b1 \<noteq> b2" |
|
858 |
with sets Cb have "b1 \<inter> b2 = {}" |
|
859 |
by (auto simp: disjoint_def) |
|
860 |
then show ?thesis by auto |
|
861 |
qed |
|
862 |
qed |
|
863 |
qed (insert Ca Cb, auto simp: C_def) |
|
864 |
qed |
|
865 |
||
866 |
lemma (in semiring_of_sets) generated_ring_Inter: |
|
867 |
assumes "finite A" "A \<noteq> {}" shows "A \<subseteq> generated_ring \<Longrightarrow> \<Inter>A \<in> generated_ring" |
|
868 |
using assms by (induct A rule: finite_ne_induct) (auto intro: generated_ring_Int) |
|
869 |
||
870 |
lemma (in semiring_of_sets) generated_ring_INTER: |
|
871 |
"finite I \<Longrightarrow> I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> A i \<in> generated_ring) \<Longrightarrow> INTER I A \<in> generated_ring" |
|
872 |
unfolding INF_def by (intro generated_ring_Inter) auto |
|
873 |
||
874 |
lemma (in semiring_of_sets) generating_ring: |
|
875 |
"ring_of_sets \<Omega> generated_ring" |
|
876 |
proof (rule ring_of_setsI) |
|
877 |
let ?R = generated_ring |
|
878 |
show "?R \<subseteq> Pow \<Omega>" |
|
879 |
using sets_into_space by (auto simp: generated_ring_def generated_ring_empty) |
|
880 |
show "{} \<in> ?R" by (rule generated_ring_empty) |
|
881 |
||
882 |
{ fix a assume a: "a \<in> ?R" then guess Ca .. note Ca = this |
|
883 |
fix b assume b: "b \<in> ?R" then guess Cb .. note Cb = this |
|
884 |
||
885 |
show "a - b \<in> ?R" |
|
886 |
proof cases |
|
887 |
assume "Cb = {}" with Cb `a \<in> ?R` show ?thesis |
|
888 |
by simp |
|
889 |
next |
|
890 |
assume "Cb \<noteq> {}" |
|
891 |
with Ca Cb have "a - b = (\<Union>a'\<in>Ca. \<Inter>b'\<in>Cb. a' - b')" by auto |
|
892 |
also have "\<dots> \<in> ?R" |
|
893 |
proof (intro generated_ring_INTER generated_ring_disjoint_UNION) |
|
894 |
fix a b assume "a \<in> Ca" "b \<in> Cb" |
|
895 |
with Ca Cb Diff_cover[of a b] show "a - b \<in> ?R" |
|
896 |
by (auto simp add: generated_ring_def) |
|
897 |
next |
|
898 |
show "disjoint ((\<lambda>a'. \<Inter>b'\<in>Cb. a' - b')`Ca)" |
|
899 |
using Ca by (auto simp add: disjoint_def `Cb \<noteq> {}`) |
|
900 |
next |
|
901 |
show "finite Ca" "finite Cb" "Cb \<noteq> {}" by fact+ |
|
902 |
qed |
|
903 |
finally show "a - b \<in> ?R" . |
|
904 |
qed } |
|
905 |
note Diff = this |
|
906 |
||
907 |
fix a b assume sets: "a \<in> ?R" "b \<in> ?R" |
|
908 |
have "a \<union> b = (a - b) \<union> (a \<inter> b) \<union> (b - a)" by auto |
|
909 |
also have "\<dots> \<in> ?R" |
|
910 |
by (intro sets generated_ring_disjoint_Un generated_ring_Int Diff) auto |
|
911 |
finally show "a \<union> b \<in> ?R" . |
|
912 |
qed |
|
913 |
||
914 |
lemma (in semiring_of_sets) sigma_sets_generated_ring_eq: "sigma_sets \<Omega> generated_ring = sigma_sets \<Omega> M" |
|
915 |
proof |
|
916 |
interpret M: sigma_algebra \<Omega> "sigma_sets \<Omega> M" |
|
917 |
using space_closed by (rule sigma_algebra_sigma_sets) |
|
918 |
show "sigma_sets \<Omega> generated_ring \<subseteq> sigma_sets \<Omega> M" |
|
919 |
by (blast intro!: sigma_sets_mono elim: generated_ringE) |
|
920 |
qed (auto intro!: generated_ringI_Basic sigma_sets_mono) |
|
921 |
||
56994 | 922 |
subsubsection {* A Two-Element Series *} |
38656 | 923 |
|
924 |
definition binaryset :: "'a set \<Rightarrow> 'a set \<Rightarrow> nat \<Rightarrow> 'a set " |
|
50252 | 925 |
where "binaryset A B = (\<lambda>x. {})(0 := A, Suc 0 := B)" |
38656 | 926 |
|
927 |
lemma range_binaryset_eq: "range(binaryset A B) = {A,B,{}}" |
|
928 |
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
|
929 |
apply (rule set_eqI) |
38656 | 930 |
apply (auto simp add: image_iff) |
931 |
done |
|
932 |
||
933 |
lemma UN_binaryset_eq: "(\<Union>i. binaryset A B i) = A \<union> B" |
|
44106 | 934 |
by (simp add: SUP_def range_binaryset_eq) |
38656 | 935 |
|
56994 | 936 |
subsubsection {* Closed CDI *} |
38656 | 937 |
|
47694 | 938 |
definition closed_cdi where |
939 |
"closed_cdi \<Omega> M \<longleftrightarrow> |
|
940 |
M \<subseteq> Pow \<Omega> & |
|
941 |
(\<forall>s \<in> M. \<Omega> - s \<in> M) & |
|
942 |
(\<forall>A. (range A \<subseteq> M) & (A 0 = {}) & (\<forall>n. A n \<subseteq> A (Suc n)) \<longrightarrow> |
|
943 |
(\<Union>i. A i) \<in> M) & |
|
944 |
(\<forall>A. (range A \<subseteq> M) & disjoint_family A \<longrightarrow> (\<Union>i::nat. A i) \<in> M)" |
|
38656 | 945 |
|
946 |
inductive_set |
|
47694 | 947 |
smallest_ccdi_sets :: "'a set \<Rightarrow> 'a set set \<Rightarrow> 'a set set" |
948 |
for \<Omega> M |
|
38656 | 949 |
where |
950 |
Basic [intro]: |
|
47694 | 951 |
"a \<in> M \<Longrightarrow> a \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 952 |
| Compl [intro]: |
47694 | 953 |
"a \<in> smallest_ccdi_sets \<Omega> M \<Longrightarrow> \<Omega> - a \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 954 |
| Inc: |
47694 | 955 |
"range A \<in> Pow(smallest_ccdi_sets \<Omega> M) \<Longrightarrow> A 0 = {} \<Longrightarrow> (\<And>n. A n \<subseteq> A (Suc n)) |
956 |
\<Longrightarrow> (\<Union>i. A i) \<in> smallest_ccdi_sets \<Omega> M" |
|
38656 | 957 |
| Disj: |
47694 | 958 |
"range A \<in> Pow(smallest_ccdi_sets \<Omega> M) \<Longrightarrow> disjoint_family A |
959 |
\<Longrightarrow> (\<Union>i::nat. A i) \<in> smallest_ccdi_sets \<Omega> M" |
|
38656 | 960 |
|
47694 | 961 |
lemma (in subset_class) smallest_closed_cdi1: "M \<subseteq> smallest_ccdi_sets \<Omega> M" |
962 |
by auto |
|
38656 | 963 |
|
47694 | 964 |
lemma (in subset_class) smallest_ccdi_sets: "smallest_ccdi_sets \<Omega> M \<subseteq> Pow \<Omega>" |
38656 | 965 |
apply (rule subsetI) |
966 |
apply (erule smallest_ccdi_sets.induct) |
|
967 |
apply (auto intro: range_subsetD dest: sets_into_space) |
|
968 |
done |
|
969 |
||
47694 | 970 |
lemma (in subset_class) smallest_closed_cdi2: "closed_cdi \<Omega> (smallest_ccdi_sets \<Omega> M)" |
971 |
apply (auto simp add: closed_cdi_def smallest_ccdi_sets) |
|
38656 | 972 |
apply (blast intro: smallest_ccdi_sets.Inc smallest_ccdi_sets.Disj) + |
973 |
done |
|
974 |
||
47694 | 975 |
lemma closed_cdi_subset: "closed_cdi \<Omega> M \<Longrightarrow> M \<subseteq> Pow \<Omega>" |
38656 | 976 |
by (simp add: closed_cdi_def) |
977 |
||
47694 | 978 |
lemma closed_cdi_Compl: "closed_cdi \<Omega> M \<Longrightarrow> s \<in> M \<Longrightarrow> \<Omega> - s \<in> M" |
38656 | 979 |
by (simp add: closed_cdi_def) |
980 |
||
981 |
lemma closed_cdi_Inc: |
|
47694 | 982 |
"closed_cdi \<Omega> M \<Longrightarrow> range A \<subseteq> M \<Longrightarrow> A 0 = {} \<Longrightarrow> (!!n. A n \<subseteq> A (Suc n)) \<Longrightarrow> (\<Union>i. A i) \<in> M" |
38656 | 983 |
by (simp add: closed_cdi_def) |
984 |
||
985 |
lemma closed_cdi_Disj: |
|
47694 | 986 |
"closed_cdi \<Omega> M \<Longrightarrow> range A \<subseteq> M \<Longrightarrow> disjoint_family A \<Longrightarrow> (\<Union>i::nat. A i) \<in> M" |
38656 | 987 |
by (simp add: closed_cdi_def) |
988 |
||
989 |
lemma closed_cdi_Un: |
|
47694 | 990 |
assumes cdi: "closed_cdi \<Omega> M" and empty: "{} \<in> M" |
991 |
and A: "A \<in> M" and B: "B \<in> M" |
|
38656 | 992 |
and disj: "A \<inter> B = {}" |
47694 | 993 |
shows "A \<union> B \<in> M" |
38656 | 994 |
proof - |
47694 | 995 |
have ra: "range (binaryset A B) \<subseteq> M" |
38656 | 996 |
by (simp add: range_binaryset_eq empty A B) |
997 |
have di: "disjoint_family (binaryset A B)" using disj |
|
998 |
by (simp add: disjoint_family_on_def binaryset_def Int_commute) |
|
999 |
from closed_cdi_Disj [OF cdi ra di] |
|
1000 |
show ?thesis |
|
1001 |
by (simp add: UN_binaryset_eq) |
|
1002 |
qed |
|
1003 |
||
1004 |
lemma (in algebra) smallest_ccdi_sets_Un: |
|
47694 | 1005 |
assumes A: "A \<in> smallest_ccdi_sets \<Omega> M" and B: "B \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1006 |
and disj: "A \<inter> B = {}" |
47694 | 1007 |
shows "A \<union> B \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1008 |
proof - |
47694 | 1009 |
have ra: "range (binaryset A B) \<in> Pow (smallest_ccdi_sets \<Omega> M)" |
38656 | 1010 |
by (simp add: range_binaryset_eq A B smallest_ccdi_sets.Basic) |
1011 |
have di: "disjoint_family (binaryset A B)" using disj |
|
1012 |
by (simp add: disjoint_family_on_def binaryset_def Int_commute) |
|
1013 |
from Disj [OF ra di] |
|
1014 |
show ?thesis |
|
1015 |
by (simp add: UN_binaryset_eq) |
|
1016 |
qed |
|
1017 |
||
1018 |
lemma (in algebra) smallest_ccdi_sets_Int1: |
|
47694 | 1019 |
assumes a: "a \<in> M" |
1020 |
shows "b \<in> smallest_ccdi_sets \<Omega> M \<Longrightarrow> a \<inter> b \<in> smallest_ccdi_sets \<Omega> M" |
|
38656 | 1021 |
proof (induct rule: smallest_ccdi_sets.induct) |
1022 |
case (Basic x) |
|
1023 |
thus ?case |
|
1024 |
by (metis a Int smallest_ccdi_sets.Basic) |
|
1025 |
next |
|
1026 |
case (Compl x) |
|
47694 | 1027 |
have "a \<inter> (\<Omega> - x) = \<Omega> - ((\<Omega> - a) \<union> (a \<inter> x))" |
38656 | 1028 |
by blast |
47694 | 1029 |
also have "... \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1030 |
by (metis smallest_ccdi_sets.Compl a Compl(2) Diff_Int2 Diff_Int_distrib2 |
47694 | 1031 |
Diff_disjoint Int_Diff Int_empty_right smallest_ccdi_sets_Un |
1032 |
smallest_ccdi_sets.Basic smallest_ccdi_sets.Compl) |
|
38656 | 1033 |
finally show ?case . |
1034 |
next |
|
1035 |
case (Inc A) |
|
1036 |
have 1: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) = a \<inter> (\<Union>i. A i)" |
|
1037 |
by blast |
|
47694 | 1038 |
have "range (\<lambda>i. a \<inter> A i) \<in> Pow(smallest_ccdi_sets \<Omega> M)" using Inc |
38656 | 1039 |
by blast |
1040 |
moreover have "(\<lambda>i. a \<inter> A i) 0 = {}" |
|
1041 |
by (simp add: Inc) |
|
1042 |
moreover have "!!n. (\<lambda>i. a \<inter> A i) n \<subseteq> (\<lambda>i. a \<inter> A i) (Suc n)" using Inc |
|
1043 |
by blast |
|
47694 | 1044 |
ultimately have 2: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1045 |
by (rule smallest_ccdi_sets.Inc) |
1046 |
show ?case |
|
1047 |
by (metis 1 2) |
|
1048 |
next |
|
1049 |
case (Disj A) |
|
1050 |
have 1: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) = a \<inter> (\<Union>i. A i)" |
|
1051 |
by blast |
|
47694 | 1052 |
have "range (\<lambda>i. a \<inter> A i) \<in> Pow(smallest_ccdi_sets \<Omega> M)" using Disj |
38656 | 1053 |
by blast |
1054 |
moreover have "disjoint_family (\<lambda>i. a \<inter> A i)" using Disj |
|
1055 |
by (auto simp add: disjoint_family_on_def) |
|
47694 | 1056 |
ultimately have 2: "(\<Union>i. (\<lambda>i. a \<inter> A i) i) \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1057 |
by (rule smallest_ccdi_sets.Disj) |
1058 |
show ?case |
|
1059 |
by (metis 1 2) |
|
1060 |
qed |
|
1061 |
||
1062 |
||
1063 |
lemma (in algebra) smallest_ccdi_sets_Int: |
|
47694 | 1064 |
assumes b: "b \<in> smallest_ccdi_sets \<Omega> M" |
1065 |
shows "a \<in> smallest_ccdi_sets \<Omega> M \<Longrightarrow> a \<inter> b \<in> smallest_ccdi_sets \<Omega> M" |
|
38656 | 1066 |
proof (induct rule: smallest_ccdi_sets.induct) |
1067 |
case (Basic x) |
|
1068 |
thus ?case |
|
1069 |
by (metis b smallest_ccdi_sets_Int1) |
|
1070 |
next |
|
1071 |
case (Compl x) |
|
47694 | 1072 |
have "(\<Omega> - x) \<inter> b = \<Omega> - (x \<inter> b \<union> (\<Omega> - b))" |
38656 | 1073 |
by blast |
47694 | 1074 |
also have "... \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1075 |
by (metis Compl(2) Diff_disjoint Int_Diff Int_commute Int_empty_right b |
1076 |
smallest_ccdi_sets.Compl smallest_ccdi_sets_Un) |
|
1077 |
finally show ?case . |
|
1078 |
next |
|
1079 |
case (Inc A) |
|
1080 |
have 1: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) = (\<Union>i. A i) \<inter> b" |
|
1081 |
by blast |
|
47694 | 1082 |
have "range (\<lambda>i. A i \<inter> b) \<in> Pow(smallest_ccdi_sets \<Omega> M)" using Inc |
38656 | 1083 |
by blast |
1084 |
moreover have "(\<lambda>i. A i \<inter> b) 0 = {}" |
|
1085 |
by (simp add: Inc) |
|
1086 |
moreover have "!!n. (\<lambda>i. A i \<inter> b) n \<subseteq> (\<lambda>i. A i \<inter> b) (Suc n)" using Inc |
|
1087 |
by blast |
|
47694 | 1088 |
ultimately have 2: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1089 |
by (rule smallest_ccdi_sets.Inc) |
1090 |
show ?case |
|
1091 |
by (metis 1 2) |
|
1092 |
next |
|
1093 |
case (Disj A) |
|
1094 |
have 1: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) = (\<Union>i. A i) \<inter> b" |
|
1095 |
by blast |
|
47694 | 1096 |
have "range (\<lambda>i. A i \<inter> b) \<in> Pow(smallest_ccdi_sets \<Omega> M)" using Disj |
38656 | 1097 |
by blast |
1098 |
moreover have "disjoint_family (\<lambda>i. A i \<inter> b)" using Disj |
|
1099 |
by (auto simp add: disjoint_family_on_def) |
|
47694 | 1100 |
ultimately have 2: "(\<Union>i. (\<lambda>i. A i \<inter> b) i) \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1101 |
by (rule smallest_ccdi_sets.Disj) |
1102 |
show ?case |
|
1103 |
by (metis 1 2) |
|
1104 |
qed |
|
1105 |
||
1106 |
lemma (in algebra) sigma_property_disjoint_lemma: |
|
47694 | 1107 |
assumes sbC: "M \<subseteq> C" |
1108 |
and ccdi: "closed_cdi \<Omega> C" |
|
1109 |
shows "sigma_sets \<Omega> M \<subseteq> C" |
|
38656 | 1110 |
proof - |
47694 | 1111 |
have "smallest_ccdi_sets \<Omega> M \<in> {B . M \<subseteq> B \<and> sigma_algebra \<Omega> B}" |
38656 | 1112 |
apply (auto simp add: sigma_algebra_disjoint_iff algebra_iff_Int |
1113 |
smallest_ccdi_sets_Int) |
|
1114 |
apply (metis Union_Pow_eq Union_upper subsetD smallest_ccdi_sets) |
|
1115 |
apply (blast intro: smallest_ccdi_sets.Disj) |
|
1116 |
done |
|
47694 | 1117 |
hence "sigma_sets (\<Omega>) (M) \<subseteq> smallest_ccdi_sets \<Omega> M" |
38656 | 1118 |
by clarsimp |
47694 | 1119 |
(drule sigma_algebra.sigma_sets_subset [where a="M"], auto) |
38656 | 1120 |
also have "... \<subseteq> C" |
1121 |
proof |
|
1122 |
fix x |
|
47694 | 1123 |
assume x: "x \<in> smallest_ccdi_sets \<Omega> M" |
38656 | 1124 |
thus "x \<in> C" |
1125 |
proof (induct rule: smallest_ccdi_sets.induct) |
|
1126 |
case (Basic x) |
|
1127 |
thus ?case |
|
1128 |
by (metis Basic subsetD sbC) |
|
1129 |
next |
|
1130 |
case (Compl x) |
|
1131 |
thus ?case |
|
1132 |
by (blast intro: closed_cdi_Compl [OF ccdi, simplified]) |
|
1133 |
next |
|
1134 |
case (Inc A) |
|
1135 |
thus ?case |
|
1136 |
by (auto intro: closed_cdi_Inc [OF ccdi, simplified]) |
|
1137 |
next |
|
1138 |
case (Disj A) |
|
1139 |
thus ?case |
|
1140 |
by (auto intro: closed_cdi_Disj [OF ccdi, simplified]) |
|
1141 |
qed |
|
1142 |
qed |
|
1143 |
finally show ?thesis . |
|
1144 |
qed |
|
1145 |
||
1146 |
lemma (in algebra) sigma_property_disjoint: |
|
47694 | 1147 |
assumes sbC: "M \<subseteq> C" |
1148 |
and compl: "!!s. s \<in> C \<inter> sigma_sets (\<Omega>) (M) \<Longrightarrow> \<Omega> - s \<in> C" |
|
1149 |
and inc: "!!A. range A \<subseteq> C \<inter> sigma_sets (\<Omega>) (M) |
|
38656 | 1150 |
\<Longrightarrow> A 0 = {} \<Longrightarrow> (!!n. A n \<subseteq> A (Suc n)) |
1151 |
\<Longrightarrow> (\<Union>i. A i) \<in> C" |
|
47694 | 1152 |
and disj: "!!A. range A \<subseteq> C \<inter> sigma_sets (\<Omega>) (M) |
38656 | 1153 |
\<Longrightarrow> disjoint_family A \<Longrightarrow> (\<Union>i::nat. A i) \<in> C" |
47694 | 1154 |
shows "sigma_sets (\<Omega>) (M) \<subseteq> C" |
38656 | 1155 |
proof - |
47694 | 1156 |
have "sigma_sets (\<Omega>) (M) \<subseteq> C \<inter> sigma_sets (\<Omega>) (M)" |
38656 | 1157 |
proof (rule sigma_property_disjoint_lemma) |
47694 | 1158 |
show "M \<subseteq> C \<inter> sigma_sets (\<Omega>) (M)" |
38656 | 1159 |
by (metis Int_greatest Set.subsetI sbC sigma_sets.Basic) |
1160 |
next |
|
47694 | 1161 |
show "closed_cdi \<Omega> (C \<inter> sigma_sets (\<Omega>) (M))" |
38656 | 1162 |
by (simp add: closed_cdi_def compl inc disj) |
1163 |
(metis PowI Set.subsetI le_infI2 sigma_sets_into_sp space_closed |
|
1164 |
IntE sigma_sets.Compl range_subsetD sigma_sets.Union) |
|
1165 |
qed |
|
1166 |
thus ?thesis |
|
1167 |
by blast |
|
1168 |
qed |
|
1169 |
||
56994 | 1170 |
subsubsection {* Dynkin systems *} |
40859 | 1171 |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
1172 |
locale dynkin_system = subset_class + |
47694 | 1173 |
assumes space: "\<Omega> \<in> M" |
1174 |
and compl[intro!]: "\<And>A. A \<in> M \<Longrightarrow> \<Omega> - A \<in> M" |
|
1175 |
and UN[intro!]: "\<And>A. disjoint_family A \<Longrightarrow> range A \<subseteq> M |
|
1176 |
\<Longrightarrow> (\<Union>i::nat. A i) \<in> M" |
|
40859 | 1177 |
|
47694 | 1178 |
lemma (in dynkin_system) empty[intro, simp]: "{} \<in> M" |
1179 |
using space compl[of "\<Omega>"] by simp |
|
40859 | 1180 |
|
1181 |
lemma (in dynkin_system) diff: |
|
47694 | 1182 |
assumes sets: "D \<in> M" "E \<in> M" and "D \<subseteq> E" |
1183 |
shows "E - D \<in> M" |
|
40859 | 1184 |
proof - |
47694 | 1185 |
let ?f = "\<lambda>x. if x = 0 then D else if x = Suc 0 then \<Omega> - E else {}" |
1186 |
have "range ?f = {D, \<Omega> - E, {}}" |
|
40859 | 1187 |
by (auto simp: image_iff) |
47694 | 1188 |
moreover have "D \<union> (\<Omega> - E) = (\<Union>i. ?f i)" |
40859 | 1189 |
by (auto simp: image_iff split: split_if_asm) |
1190 |
moreover |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51683
diff
changeset
|
1191 |
have "disjoint_family ?f" unfolding disjoint_family_on_def |
47694 | 1192 |
using `D \<in> M`[THEN sets_into_space] `D \<subseteq> E` by auto |
1193 |
ultimately have "\<Omega> - (D \<union> (\<Omega> - E)) \<in> M" |
|
40859 | 1194 |
using sets by auto |
47694 | 1195 |
also have "\<Omega> - (D \<union> (\<Omega> - E)) = E - D" |
40859 | 1196 |
using assms sets_into_space by auto |
1197 |
finally show ?thesis . |
|
1198 |
qed |
|
1199 |
||
1200 |
lemma dynkin_systemI: |
|
47694 | 1201 |
assumes "\<And> A. A \<in> M \<Longrightarrow> A \<subseteq> \<Omega>" "\<Omega> \<in> M" |
1202 |
assumes "\<And> A. A \<in> M \<Longrightarrow> \<Omega> - A \<in> M" |
|
1203 |
assumes "\<And> A. disjoint_family A \<Longrightarrow> range A \<subseteq> M |
|
1204 |
\<Longrightarrow> (\<Union>i::nat. A i) \<in> M" |
|
1205 |
shows "dynkin_system \<Omega> M" |
|
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
1206 |
using assms by (auto simp: dynkin_system_def dynkin_system_axioms_def subset_class_def) |
40859 | 1207 |
|
42988 | 1208 |
lemma dynkin_systemI': |
47694 | 1209 |
assumes 1: "\<And> A. A \<in> M \<Longrightarrow> A \<subseteq> \<Omega>" |
1210 |
assumes empty: "{} \<in> M" |
|
1211 |
assumes Diff: "\<And> A. A \<in> M \<Longrightarrow> \<Omega> - A \<in> M" |
|
1212 |
assumes 2: "\<And> A. disjoint_family A \<Longrightarrow> range A \<subseteq> M |
|
1213 |
\<Longrightarrow> (\<Union>i::nat. A i) \<in> M" |
|
1214 |
shows "dynkin_system \<Omega> M" |
|
42988 | 1215 |
proof - |
47694 | 1216 |
from Diff[OF empty] have "\<Omega> \<in> M" by auto |
42988 | 1217 |
from 1 this Diff 2 show ?thesis |
1218 |
by (intro dynkin_systemI) auto |
|
1219 |
qed |
|
1220 |
||
40859 | 1221 |
lemma dynkin_system_trivial: |
47694 | 1222 |
shows "dynkin_system A (Pow A)" |
40859 | 1223 |
by (rule dynkin_systemI) auto |
1224 |
||
1225 |
lemma sigma_algebra_imp_dynkin_system: |
|
47694 | 1226 |
assumes "sigma_algebra \<Omega> M" shows "dynkin_system \<Omega> M" |
40859 | 1227 |
proof - |
47694 | 1228 |
interpret sigma_algebra \<Omega> M by fact |
44890
22f665a2e91c
new fastforce replacing fastsimp - less confusing name
nipkow
parents:
44537
diff
changeset
|
1229 |
show ?thesis using sets_into_space by (fastforce intro!: dynkin_systemI) |
40859 | 1230 |
qed |
1231 |
||
56994 | 1232 |
subsubsection "Intersection sets systems" |
40859 | 1233 |
|
47694 | 1234 |
definition "Int_stable M \<longleftrightarrow> (\<forall> a \<in> M. \<forall> b \<in> M. a \<inter> b \<in> M)" |
40859 | 1235 |
|
1236 |
lemma (in algebra) Int_stable: "Int_stable M" |
|
1237 |
unfolding Int_stable_def by auto |
|
1238 |
||
42981 | 1239 |
lemma Int_stableI: |
47694 | 1240 |
"(\<And>a b. a \<in> A \<Longrightarrow> b \<in> A \<Longrightarrow> a \<inter> b \<in> A) \<Longrightarrow> Int_stable A" |
42981 | 1241 |
unfolding Int_stable_def by auto |
1242 |
||
1243 |
lemma Int_stableD: |
|
47694 | 1244 |
"Int_stable M \<Longrightarrow> a \<in> M \<Longrightarrow> b \<in> M \<Longrightarrow> a \<inter> b \<in> M" |
42981 | 1245 |
unfolding Int_stable_def by auto |
1246 |
||
40859 | 1247 |
lemma (in dynkin_system) sigma_algebra_eq_Int_stable: |
47694 | 1248 |
"sigma_algebra \<Omega> M \<longleftrightarrow> Int_stable M" |
40859 | 1249 |
proof |
47694 | 1250 |
assume "sigma_algebra \<Omega> M" then show "Int_stable M" |
40859 | 1251 |
unfolding sigma_algebra_def using algebra.Int_stable by auto |
1252 |
next |
|
1253 |
assume "Int_stable M" |
|
47694 | 1254 |
show "sigma_algebra \<Omega> M" |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
1255 |
unfolding sigma_algebra_disjoint_iff algebra_iff_Un |
40859 | 1256 |
proof (intro conjI ballI allI impI) |
47694 | 1257 |
show "M \<subseteq> Pow (\<Omega>)" using sets_into_space by auto |
40859 | 1258 |
next |
47694 | 1259 |
fix A B assume "A \<in> M" "B \<in> M" |
1260 |
then have "A \<union> B = \<Omega> - ((\<Omega> - A) \<inter> (\<Omega> - B))" |
|
1261 |
"\<Omega> - A \<in> M" "\<Omega> - B \<in> M" |
|
40859 | 1262 |
using sets_into_space by auto |
47694 | 1263 |
then show "A \<union> B \<in> M" |
40859 | 1264 |
using `Int_stable M` unfolding Int_stable_def by auto |
1265 |
qed auto |
|
1266 |
qed |
|
1267 |
||
56994 | 1268 |
subsubsection "Smallest Dynkin systems" |
40859 | 1269 |
|
41689
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
1270 |
definition dynkin where |
47694 | 1271 |
"dynkin \<Omega> M = (\<Inter>{D. dynkin_system \<Omega> D \<and> M \<subseteq> D})" |
40859 | 1272 |
|
1273 |
lemma dynkin_system_dynkin: |
|
47694 | 1274 |
assumes "M \<subseteq> Pow (\<Omega>)" |
1275 |
shows "dynkin_system \<Omega> (dynkin \<Omega> M)" |
|
40859 | 1276 |
proof (rule dynkin_systemI) |
47694 | 1277 |
fix A assume "A \<in> dynkin \<Omega> M" |
40859 | 1278 |
moreover |
47694 | 1279 |
{ fix D assume "A \<in> D" and d: "dynkin_system \<Omega> D" |
1280 |
then have "A \<subseteq> \<Omega>" by (auto simp: dynkin_system_def subset_class_def) } |
|
1281 |
moreover have "{D. dynkin_system \<Omega> D \<and> M \<subseteq> D} \<noteq> {}" |
|
44890
22f665a2e91c
new fastforce replacing fastsimp - less confusing name
nipkow
parents:
44537
diff
changeset
|
1282 |
using assms dynkin_system_trivial by fastforce |
47694 | 1283 |
ultimately show "A \<subseteq> \<Omega>" |
40859 | 1284 |
unfolding dynkin_def using assms |
47694 | 1285 |
by auto |
40859 | 1286 |
next |
47694 | 1287 |
show "\<Omega> \<in> dynkin \<Omega> M" |
44890
22f665a2e91c
new fastforce replacing fastsimp - less confusing name
nipkow
parents:
44537
diff
changeset
|
1288 |
unfolding dynkin_def using dynkin_system.space by fastforce |
40859 | 1289 |
next |
47694 | 1290 |
fix A assume "A \<in> dynkin \<Omega> M" |
1291 |
then show "\<Omega> - A \<in> dynkin \<Omega> M" |
|
40859 | 1292 |
unfolding dynkin_def using dynkin_system.compl by force |
1293 |
next |
|
1294 |
fix A :: "nat \<Rightarrow> 'a set" |
|
47694 | 1295 |
assume A: "disjoint_family A" "range A \<subseteq> dynkin \<Omega> M" |
1296 |
show "(\<Union>i. A i) \<in> dynkin \<Omega> M" unfolding dynkin_def |
|
40859 | 1297 |
proof (simp, safe) |
47694 | 1298 |
fix D assume "dynkin_system \<Omega> D" "M \<subseteq> D" |
1299 |
with A have "(\<Union>i. A i) \<in> D" |
|
40859 | 1300 |
by (intro dynkin_system.UN) (auto simp: dynkin_def) |
1301 |
then show "(\<Union>i. A i) \<in> D" by auto |
|
1302 |
qed |
|
1303 |
qed |
|
1304 |
||
47694 | 1305 |
lemma dynkin_Basic[intro]: "A \<in> M \<Longrightarrow> A \<in> dynkin \<Omega> M" |
40859 | 1306 |
unfolding dynkin_def by auto |
1307 |
||
1308 |
lemma (in dynkin_system) restricted_dynkin_system: |
|
47694 | 1309 |
assumes "D \<in> M" |
1310 |
shows "dynkin_system \<Omega> {Q. Q \<subseteq> \<Omega> \<and> Q \<inter> D \<in> M}" |
|
40859 | 1311 |
proof (rule dynkin_systemI, simp_all) |
47694 | 1312 |
have "\<Omega> \<inter> D = D" |
1313 |
using `D \<in> M` sets_into_space by auto |
|
1314 |
then show "\<Omega> \<inter> D \<in> M" |
|
1315 |
using `D \<in> M` by auto |
|
40859 | 1316 |
next |
47694 | 1317 |
fix A assume "A \<subseteq> \<Omega> \<and> A \<inter> D \<in> M" |
1318 |
moreover have "(\<Omega> - A) \<inter> D = (\<Omega> - (A \<inter> D)) - (\<Omega> - D)" |
|
40859 | 1319 |
by auto |
47694 | 1320 |
ultimately show "\<Omega> - A \<subseteq> \<Omega> \<and> (\<Omega> - A) \<inter> D \<in> M" |
1321 |
using `D \<in> M` by (auto intro: diff) |
|
40859 | 1322 |
next |
1323 |
fix A :: "nat \<Rightarrow> 'a set" |
|
47694 | 1324 |
assume "disjoint_family A" "range A \<subseteq> {Q. Q \<subseteq> \<Omega> \<and> Q \<inter> D \<in> M}" |
1325 |
then have "\<And>i. A i \<subseteq> \<Omega>" "disjoint_family (\<lambda>i. A i \<inter> D)" |
|
1326 |
"range (\<lambda>i. A i \<inter> D) \<subseteq> M" "(\<Union>x. A x) \<inter> D = (\<Union>x. A x \<inter> D)" |
|
44890
22f665a2e91c
new fastforce replacing fastsimp - less confusing name
nipkow
parents:
44537
diff
changeset
|
1327 |
by ((fastforce simp: disjoint_family_on_def)+) |
47694 | 1328 |
then show "(\<Union>x. A x) \<subseteq> \<Omega> \<and> (\<Union>x. A x) \<inter> D \<in> M" |
40859 | 1329 |
by (auto simp del: UN_simps) |
1330 |
qed |
|
1331 |
||
1332 |
lemma (in dynkin_system) dynkin_subset: |
|
47694 | 1333 |
assumes "N \<subseteq> M" |
1334 |
shows "dynkin \<Omega> N \<subseteq> M" |
|
40859 | 1335 |
proof - |
61169 | 1336 |
have "dynkin_system \<Omega> M" .. |
47694 | 1337 |
then have "dynkin_system \<Omega> M" |
42065
2b98b4c2e2f1
add ring_of_sets and subset_class as basis for algebra
hoelzl
parents:
41983
diff
changeset
|
1338 |
using assms unfolding dynkin_system_def dynkin_system_axioms_def subset_class_def by simp |
47694 | 1339 |
with `N \<subseteq> M` show ?thesis by (auto simp add: dynkin_def) |
40859 | 1340 |
qed |
1341 |
||
1342 |
lemma sigma_eq_dynkin: |
|
47694 | 1343 |
assumes sets: "M \<subseteq> Pow \<Omega>" |
40859 | 1344 |
assumes "Int_stable M" |
47694 | 1345 |
shows "sigma_sets \<Omega> M = dynkin \<Omega> M" |
40859 | 1346 |
proof - |
47694 | 1347 |
have "dynkin \<Omega> M \<subseteq> sigma_sets (\<Omega>) (M)" |
40859 | 1348 |
using sigma_algebra_imp_dynkin_system |
47694 | 1349 |
unfolding dynkin_def sigma_sets_least_sigma_algebra[OF sets] by auto |
40859 | 1350 |
moreover |
47694 | 1351 |
interpret dynkin_system \<Omega> "dynkin \<Omega> M" |
40859 | 1352 |
using dynkin_system_dynkin[OF sets] . |
47694 | 1353 |
have "sigma_algebra \<Omega> (dynkin \<Omega> M)" |
40859 | 1354 |
unfolding sigma_algebra_eq_Int_stable Int_stable_def |
1355 |
proof (intro ballI) |
|
47694 | 1356 |
fix A B assume "A \<in> dynkin \<Omega> M" "B \<in> dynkin \<Omega> M" |
1357 |
let ?D = "\<lambda>E. {Q. Q \<subseteq> \<Omega> \<and> Q \<inter> E \<in> dynkin \<Omega> M}" |
|
1358 |
have "M \<subseteq> ?D B" |
|
40859 | 1359 |
proof |
47694 | 1360 |
fix E assume "E \<in> M" |
1361 |
then have "M \<subseteq> ?D E" "E \<in> dynkin \<Omega> M" |
|
40859 | 1362 |
using sets_into_space `Int_stable M` by (auto simp: Int_stable_def) |
47694 | 1363 |
then have "dynkin \<Omega> M \<subseteq> ?D E" |
1364 |
using restricted_dynkin_system `E \<in> dynkin \<Omega> M` |
|
40859 | 1365 |
by (intro dynkin_system.dynkin_subset) simp_all |
47694 | 1366 |
then have "B \<in> ?D E" |
1367 |
using `B \<in> dynkin \<Omega> M` by auto |
|
1368 |
then have "E \<inter> B \<in> dynkin \<Omega> M" |
|
40859 | 1369 |
by (subst Int_commute) simp |
47694 | 1370 |
then show "E \<in> ?D B" |
1371 |
using sets `E \<in> M` by auto |
|
40859 | 1372 |
qed |
47694 | 1373 |
then have "dynkin \<Omega> M \<subseteq> ?D B" |
1374 |
using restricted_dynkin_system `B \<in> dynkin \<Omega> M` |
|
40859 | 1375 |
by (intro dynkin_system.dynkin_subset) simp_all |
47694 | 1376 |
then show "A \<inter> B \<in> dynkin \<Omega> M" |
1377 |
using `A \<in> dynkin \<Omega> M` sets_into_space by auto |
|
40859 | 1378 |
qed |
47694 | 1379 |
from sigma_algebra.sigma_sets_subset[OF this, of "M"] |
1380 |
have "sigma_sets (\<Omega>) (M) \<subseteq> dynkin \<Omega> M" by auto |
|
1381 |
ultimately have "sigma_sets (\<Omega>) (M) = dynkin \<Omega> M" by auto |
|
40859 | 1382 |
then show ?thesis |
47694 | 1383 |
by (auto simp: dynkin_def) |
40859 | 1384 |
qed |
1385 |
||
1386 |
lemma (in dynkin_system) dynkin_idem: |
|
47694 | 1387 |
"dynkin \<Omega> M = M" |
40859 | 1388 |
proof - |
47694 | 1389 |
have "dynkin \<Omega> M = M" |
40859 | 1390 |
proof |
47694 | 1391 |
show "M \<subseteq> dynkin \<Omega> M" |
40859 | 1392 |
using dynkin_Basic by auto |
47694 | 1393 |
show "dynkin \<Omega> M \<subseteq> M" |
40859 | 1394 |
by (intro dynkin_subset) auto |
1395 |
qed |
|
1396 |
then show ?thesis |
|
47694 | 1397 |
by (auto simp: dynkin_def) |
40859 | 1398 |
qed |
1399 |
||
1400 |
lemma (in dynkin_system) dynkin_lemma: |
|
41689
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
1401 |
assumes "Int_stable E" |
47694 | 1402 |
and E: "E \<subseteq> M" "M \<subseteq> sigma_sets \<Omega> E" |
1403 |
shows "sigma_sets \<Omega> E = M" |
|
40859 | 1404 |
proof - |
47694 | 1405 |
have "E \<subseteq> Pow \<Omega>" |
41689
3e39b0e730d6
the measure valuation is again part of the measure_space type, instead of an explicit parameter to the locale;
hoelzl
parents:
41543
diff
changeset
|
1406 |
using E sets_into_space by force |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51683
diff
changeset
|
1407 |
then have *: "sigma_sets \<Omega> E = dynkin \<Omega> E" |
40859 | 1408 |
using `Int_stable E` by (rule sigma_eq_dynkin) |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51683
diff
changeset
|
1409 |
then have "dynkin \<Omega> E = M" |
47694 | 1410 |
using assms dynkin_subset[OF E(1)] by simp |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51683
diff
changeset
|
1411 |
with * show ?thesis |
47694 | 1412 |
using assms by (auto simp: dynkin_def) |
42864 | 1413 |
qed |
1414 |
||
56994 | 1415 |
subsubsection {* Induction rule for intersection-stable generators *} |
1416 |
||
1417 |
text {* The reason to introduce Dynkin-systems is the following induction rules for $\sigma$-algebras |
|
1418 |
generated by a generator closed under intersection. *} |
|
1419 |
||
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1420 |
lemma sigma_sets_induct_disjoint[consumes 3, case_names basic empty compl union]: |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1421 |
assumes "Int_stable G" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1422 |
and closed: "G \<subseteq> Pow \<Omega>" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1423 |
and A: "A \<in> sigma_sets \<Omega> G" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1424 |
assumes basic: "\<And>A. A \<in> G \<Longrightarrow> P A" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1425 |
and empty: "P {}" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1426 |
and compl: "\<And>A. A \<in> sigma_sets \<Omega> G \<Longrightarrow> P A \<Longrightarrow> P (\<Omega> - A)" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1427 |
and union: "\<And>A. disjoint_family A \<Longrightarrow> range A \<subseteq> sigma_sets \<Omega> G \<Longrightarrow> (\<And>i. P (A i)) \<Longrightarrow> P (\<Union>i::nat. A i)" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1428 |
shows "P A" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1429 |
proof - |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1430 |
let ?D = "{ A \<in> sigma_sets \<Omega> G. P A }" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1431 |
interpret sigma_algebra \<Omega> "sigma_sets \<Omega> G" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1432 |
using closed by (rule sigma_algebra_sigma_sets) |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1433 |
from compl[OF _ empty] closed have space: "P \<Omega>" by simp |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1434 |
interpret dynkin_system \<Omega> ?D |
61169 | 1435 |
by standard (auto dest: sets_into_space intro!: space compl union) |
49789
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1436 |
have "sigma_sets \<Omega> G = ?D" |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1437 |
by (rule dynkin_lemma) (auto simp: basic `Int_stable G`) |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1438 |
with A show ?thesis by auto |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1439 |
qed |
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
hoelzl
parents:
49782
diff
changeset
|
1440 |
|
56994 | 1441 |
subsection {* Measure type *} |
1442 |
||
1443 |
definition positive :: "'a set set \<Rightarrow> ('a set \<Rightarrow> ereal) \<Rightarrow> bool" where |
|
1444 |
"positive M \<mu> \<longleftrightarrow> \<mu> {} = 0 \<and> (\<forall>A\<in>M. 0 \<le> \<mu> A)" |
|
1445 |
||
1446 |
definition countably_additive :: "'a set set \<Rightarrow> ('a set \<Rightarrow> ereal) \<Rightarrow> bool" where |
|
1447 |
"countably_additive M f \<longleftrightarrow> (\<forall>A. range A \<subseteq> M \<longrightarrow> disjoint_family A \<longrightarrow> (\<Union>i. A i) \<in> M \<longrightarrow> |
|
1448 |
(\<Sum>i. f (A i)) = f (\<Union>i. A i))" |
|
1449 |
||
1450 |
definition measure_space :: "'a set \<Rightarrow> 'a set set \<Rightarrow> ('a set \<Rightarrow> ereal) \<Rightarrow> bool" where |
|
1451 |
"measure_space \<Omega> A \<mu> \<longleftrightarrow> sigma_algebra \<Omega> A \<and> positive A \<mu> \<and> countably_additive A \<mu>" |
|
1452 |
||
1453 |
typedef 'a measure = "{(\<Omega>::'a set, A, \<mu>). (\<forall>a\<in>-A. \<mu> a = 0) \<and> measure_space \<Omega> A \<mu> }" |
|
1454 |
proof |
|
1455 |
have "sigma_algebra UNIV {{}, UNIV}" |
|
1456 |
by (auto simp: sigma_algebra_iff2) |
|
1457 |
then show "(UNIV, {{}, UNIV}, \<lambda>A. 0) \<in> {(\<Omega>, A, \<mu>). (\<forall>a\<in>-A. \<mu> a = 0) \<and> measure_space \<Omega> A \<mu>} " |
|
1458 |
by (auto simp: measure_space_def positive_def countably_additive_def) |
|
1459 |
qed |
|
1460 |
||
1461 |
definition space :: "'a measure \<Rightarrow> 'a set" where |
|
1462 |
"space M = fst (Rep_measure M)" |
|
1463 |
||
1464 |
definition sets :: "'a measure \<Rightarrow> 'a set set" where |
|
1465 |
"sets M = fst (snd (Rep_measure M))" |
|
1466 |
||
1467 |
definition emeasure :: "'a measure \<Rightarrow> 'a set \<Rightarrow> ereal" where |
|
1468 |
"emeasure M = snd (snd (Rep_measure M))" |
|
1469 |
||
1470 |
definition measure :: "'a measure \<Rightarrow> 'a set \<Rightarrow> real" where |
|
1471 |
"measure M A = real (emeasure M A)" |
|
1472 |
||
1473 |
declare [[coercion sets]] |
|
1474 |
||
1475 |
declare [[coercion measure]] |
|
1476 |
||
1477 |
declare [[coercion emeasure]] |
|
1478 |
||
1479 |
lemma measure_space: "measure_space (space M) (sets M) (emeasure M)" |
|
1480 |
by (cases M) (auto simp: space_def sets_def emeasure_def Abs_measure_inverse) |
|
1481 |
||
1482 |
interpretation sets!: sigma_algebra "space M" "sets M" for M :: "'a measure" |
|
1483 |
using measure_space[of M] by (auto simp: measure_space_def) |
|
1484 |
||
1485 |
definition measure_of :: "'a set \<Rightarrow> 'a set set \<Rightarrow> ('a set \<Rightarrow> ereal) \<Rightarrow> 'a measure" where |
|
1486 |
"measure_of \<Omega> A \<mu> = Abs_measure (\<Omega>, if A \<subseteq> Pow \<Omega> then sigma_sets \<Omega> A else {{}, \<Omega>}, |
|
1487 |
\<lambda>a. if a \<in> sigma_sets \<Omega> A \<and> measure_space \<Omega> (sigma_sets \<Omega> A) \<mu> then \<mu> a else 0)" |
|
1488 |
||
1489 |
abbreviation "sigma \<Omega> A \<equiv> measure_of \<Omega> A (\<lambda>x. 0)" |
|
1490 |
||
1491 |
lemma measure_space_0: "A \<subseteq> Pow \<Omega> \<Longrightarrow> measure_space \<Omega> (sigma_sets \<Omega> A) (\<lambda>x. 0)" |
|
1492 |
unfolding measure_space_def |
|
1493 |
by (auto intro!: sigma_algebra_sigma_sets simp: positive_def countably_additive_def) |
|
1494 |
||
1495 |
lemma sigma_algebra_trivial: "sigma_algebra \<Omega> {{}, \<Omega>}" |
|
1496 |
by unfold_locales(fastforce intro: exI[where x="{{}}"] exI[where x="{\<Omega>}"])+ |
|
1497 |
||
1498 |
lemma measure_space_0': "measure_space \<Omega> {{}, \<Omega>} (\<lambda>x. 0)" |
|
1499 |
by(simp add: measure_space_def positive_def countably_additive_def sigma_algebra_trivial) |
|
1500 |
||
1501 |
lemma measure_space_closed: |
|
1502 |
assumes "measure_space \<Omega> M \<mu>" |
|
1503 |
shows "M \<subseteq> Pow \<Omega>" |
|
1504 |
proof - |
|
1505 |
interpret sigma_algebra \<Omega> M using assms by(simp add: measure_space_def) |
|
1506 |
show ?thesis by(rule space_closed) |
|
1507 |
qed |
|
1508 |
||
1509 |
lemma (in ring_of_sets) positive_cong_eq: |
|
1510 |
"(\<And>a. a \<in> M \<Longrightarrow> \<mu>' a = \<mu> a) \<Longrightarrow> positive M \<mu>' = positive M \<mu>" |
|
1511 |
by (auto simp add: positive_def) |
|
1512 |
||
1513 |
lemma (in sigma_algebra) countably_additive_eq: |
|
1514 |
"(\<And>a. a \<in> M \<Longrightarrow> \<mu>' a = \<mu> a) \<Longrightarrow> countably_additive M \<mu>' = countably_additive M \<mu>" |
|
1515 |
unfolding countably_additive_def |
|
1516 |
by (intro arg_cong[where f=All] ext) (auto simp add: countably_additive_def subset_eq) |
|
1517 |
||
1518 |
lemma measure_space_eq: |
|
1519 |
assumes closed: "A \<subseteq> Pow \<Omega>" and eq: "\<And>a. a \<in> sigma_sets \<Omega> A \<Longrightarrow> \<mu> a = \<mu>' a" |
|
1520 |
shows "measure_space \<Omega> (sigma_sets \<Omega> A) \<mu> = measure_space \<Omega> (sigma_sets \<Omega> A) \<mu>'" |
|
1521 |
proof - |
|
1522 |
interpret sigma_algebra \<Omega> "sigma_sets \<Omega> A" using closed by (rule sigma_algebra_sigma_sets) |
|
1523 |
from positive_cong_eq[OF eq, of "\<lambda>i. i"] countably_additive_eq[OF eq, of "\<lambda>i. i"] show ?thesis |
|
1524 |
by (auto simp: measure_space_def) |
|
1525 |
qed |
|
1526 |
||
1527 |
lemma measure_of_eq: |
|
1528 |
assumes closed: "A \<subseteq> Pow \<Omega>" and eq: "(\<And>a. a \<in> sigma_sets \<Omega> A \<Longrightarrow> \<mu> a = \<mu>' a)" |
|
1529 |
shows "measure_of \<Omega> A \<mu> = measure_of \<Omega> A \<mu>'" |
|
1530 |
proof - |
|
1531 |
have "measure_space \<Omega> (sigma_sets \<Omega> A) \<mu> = measure_space \<Omega> (sigma_sets \<Omega> A) \<mu>'" |
|
1532 |
using assms by (rule measure_space_eq) |
|
1533 |
with eq show ?thesis |
|
1534 |
by (auto simp add: measure_of_def intro!: arg_cong[where f=Abs_measure]) |
|
1535 |
qed |
|
1536 |
||
1537 |
lemma |
|
1538 |
shows space_measure_of_conv: "space (measure_of \<Omega> A \<mu>) = \<Omega>" (is ?space) |
|
1539 |
and sets_measure_of_conv: |
|
1540 |
"sets (measure_of \<Omega> A \<mu>) = (if A \<subseteq> Pow \<Omega> then sigma_sets \<Omega> A else {{}, \<Omega>})" (is ?sets) |
|
1541 |
and emeasure_measure_of_conv: |
|
1542 |
"emeasure (measure_of \<Omega> A \<mu>) = |
|
1543 |
(\<lambda>B. if B \<in> sigma_sets \<Omega> A \<and> measure_space \<Omega> (sigma_sets \<Omega> A) \<mu> then \<mu> B else 0)" (is ?emeasure) |
|
1544 |
proof - |
|
1545 |
have "?space \<and> ?sets \<and> ?emeasure" |
|
1546 |
proof(cases "measure_space \<Omega> (sigma_sets \<Omega> A) \<mu>") |
|
1547 |
case True |
|
1548 |
from measure_space_closed[OF this] sigma_sets_superset_generator[of A \<Omega>] |
|
1549 |
have "A \<subseteq> Pow \<Omega>" by simp |
|
1550 |
hence "measure_space \<Omega> (sigma_sets \<Omega> A) \<mu> = measure_space \<Omega> (sigma_sets \<Omega> A) |
|
1551 |
(\<lambda>a. if a \<in> sigma_sets \<Omega> A then \<mu> a else 0)" |
|
1552 |
by(rule measure_space_eq) auto |
|
1553 |
with True `A \<subseteq> Pow \<Omega>` show ?thesis |
|
1554 |
by(simp add: measure_of_def space_def sets_def emeasure_def Abs_measure_inverse) |
|
1555 |
next |
|
1556 |
case False thus ?thesis |
|
1557 |
by(cases "A \<subseteq> Pow \<Omega>")(simp_all add: Abs_measure_inverse measure_of_def sets_def space_def emeasure_def measure_space_0 measure_space_0') |
|
1558 |
qed |
|
1559 |
thus ?space ?sets ?emeasure by simp_all |
|
1560 |
qed |
|
1561 |
||
1562 |
lemma [simp]: |
|
1563 |
assumes A: "A \<subseteq> Pow \<Omega>" |
|
1564 |
shows sets_measure_of: "sets (measure_of \<Omega> A \<mu>) = sigma_sets \<Omega> A" |
|
1565 |
and space_measure_of: "space (measure_of \<Omega> A \<mu>) = \<Omega>" |
|
1566 |
using assms |
|
1567 |
by(simp_all add: sets_measure_of_conv space_measure_of_conv) |
|
1568 |
||
1569 |
lemma (in sigma_algebra) sets_measure_of_eq[simp]: "sets (measure_of \<Omega> M \<mu>) = M" |
|
1570 |
using space_closed by (auto intro!: sigma_sets_eq) |
|
1571 |
||
1572 |
lemma (in sigma_algebra) space_measure_of_eq[simp]: "space (measure_of \<Omega> M \<mu>) = \<Omega>" |
|
1573 |
by (rule space_measure_of_conv) |
|
1574 |
||
1575 |
lemma measure_of_subset: "M \<subseteq> Pow \<Omega> \<Longrightarrow> M' \<subseteq> M \<Longrightarrow> sets (measure_of \<Omega> M' \<mu>) \<subseteq> sets (measure_of \<Omega> M \<mu>')" |
|
1576 |
by (auto intro!: sigma_sets_subseteq) |
|
1577 |
||
59000 | 1578 |
lemma emeasure_sigma: "emeasure (sigma \<Omega> A) = (\<lambda>x. 0)" |
1579 |
unfolding measure_of_def emeasure_def |
|
1580 |
by (subst Abs_measure_inverse) |
|
1581 |
(auto simp: measure_space_def positive_def countably_additive_def |
|
1582 |
intro!: sigma_algebra_sigma_sets sigma_algebra_trivial) |
|
1583 |
||
56994 | 1584 |
lemma sigma_sets_mono'': |
1585 |
assumes "A \<in> sigma_sets C D" |
|
1586 |
assumes "B \<subseteq> D" |
|
1587 |
assumes "D \<subseteq> Pow C" |
|
1588 |
shows "sigma_sets A B \<subseteq> sigma_sets C D" |
|
1589 |
proof |
|
1590 |
fix x assume "x \<in> sigma_sets A B" |
|
1591 |
thus "x \<in> sigma_sets C D" |
|
1592 |
proof induct |
|
1593 |
case (Basic a) with assms have "a \<in> D" by auto |
|
1594 |
thus ?case .. |
|
1595 |
next |
|
1596 |
case Empty show ?case by (rule sigma_sets.Empty) |
|
1597 |
next |
|
1598 |
from assms have "A \<in> sets (sigma C D)" by (subst sets_measure_of[OF `D \<subseteq> Pow C`]) |
|
1599 |
moreover case (Compl a) hence "a \<in> sets (sigma C D)" by (subst sets_measure_of[OF `D \<subseteq> Pow C`]) |
|
1600 |
ultimately have "A - a \<in> sets (sigma C D)" .. |
|
1601 |
thus ?case by (subst (asm) sets_measure_of[OF `D \<subseteq> Pow C`]) |
|
1602 |
next |
|
1603 |
case (Union a) |
|
1604 |
thus ?case by (intro sigma_sets.Union) |
|
1605 |
qed |
|
1606 |
qed |
|
1607 |
||
1608 |
lemma in_measure_of[intro, simp]: "M \<subseteq> Pow \<Omega> \<Longrightarrow> A \<in> M \<Longrightarrow> A \<in> sets (measure_of \<Omega> M \<mu>)" |
|
1609 |
by auto |
|
1610 |
||
58606 | 1611 |
lemma space_empty_iff: "space N = {} \<longleftrightarrow> sets N = {{}}" |
1612 |
by (metis Pow_empty Sup_bot_conv(1) cSup_singleton empty_iff |
|
1613 |
sets.sigma_sets_eq sets.space_closed sigma_sets_top subset_singletonD) |
|
1614 |
||
56994 | 1615 |
subsubsection {* Constructing simple @{typ "'a measure"} *} |
1616 |
||
1617 |
lemma emeasure_measure_of: |
|
1618 |
assumes M: "M = measure_of \<Omega> A \<mu>" |
|
1619 |
assumes ms: "A \<subseteq> Pow \<Omega>" "positive (sets M) \<mu>" "countably_additive (sets M) \<mu>" |
|
1620 |
assumes X: "X \<in> sets M" |
|
1621 |
shows "emeasure M X = \<mu> X" |
|
1622 |
proof - |
|
1623 |
interpret sigma_algebra \<Omega> "sigma_sets \<Omega> A" by (rule sigma_algebra_sigma_sets) fact |
|
1624 |
have "measure_space \<Omega> (sigma_sets \<Omega> A) \<mu>" |
|
1625 |
using ms M by (simp add: measure_space_def sigma_algebra_sigma_sets) |
|
1626 |
thus ?thesis using X ms |
|
1627 |
by(simp add: M emeasure_measure_of_conv sets_measure_of_conv) |
|
1628 |
qed |
|
1629 |
||
1630 |
lemma emeasure_measure_of_sigma: |
|
1631 |
assumes ms: "sigma_algebra \<Omega> M" "positive M \<mu>" "countably_additive M \<mu>" |
|
1632 |
assumes A: "A \<in> M" |
|
1633 |
shows "emeasure (measure_of \<Omega> M \<mu>) A = \<mu> A" |
|
1634 |
proof - |
|
1635 |
interpret sigma_algebra \<Omega> M by fact |
|
1636 |
have "measure_space \<Omega> (sigma_sets \<Omega> M) \<mu>" |
|
1637 |
using ms sigma_sets_eq by (simp add: measure_space_def) |
|
1638 |
thus ?thesis by(simp add: emeasure_measure_of_conv A) |
|
1639 |
qed |
|
1640 |
||
1641 |
lemma measure_cases[cases type: measure]: |
|
1642 |
obtains (measure) \<Omega> A \<mu> where "x = Abs_measure (\<Omega>, A, \<mu>)" "\<forall>a\<in>-A. \<mu> a = 0" "measure_space \<Omega> A \<mu>" |
|
1643 |
by atomize_elim (cases x, auto) |
|
1644 |
||
60772 | 1645 |
lemma sets_le_imp_space_le: "sets A \<subseteq> sets B \<Longrightarrow> space A \<subseteq> space B" |
1646 |
by (auto dest: sets.sets_into_space) |
|
1647 |
||
1648 |
lemma sets_eq_imp_space_eq: "sets M = sets M' \<Longrightarrow> space M = space M'" |
|
1649 |
by (auto intro!: antisym sets_le_imp_space_le) |
|
56994 | 1650 |
|
1651 |
lemma emeasure_notin_sets: "A \<notin> sets M \<Longrightarrow> emeasure M A = 0" |
|
1652 |
by (cases M) (auto simp: sets_def emeasure_def Abs_measure_inverse measure_space_def) |
|
1653 |
||
1654 |
lemma emeasure_neq_0_sets: "emeasure M A \<noteq> 0 \<Longrightarrow> A \<in> sets M" |
|
1655 |
using emeasure_notin_sets[of A M] by blast |
|
1656 |
||
1657 |
lemma measure_notin_sets: "A \<notin> sets M \<Longrightarrow> measure M A = 0" |
|
1658 |
by (simp add: measure_def emeasure_notin_sets) |
|
1659 |
||
1660 |
lemma measure_eqI: |
|
1661 |
fixes M N :: "'a measure" |
|
1662 |
assumes "sets M = sets N" and eq: "\<And>A. A \<in> sets M \<Longrightarrow> emeasure M A = emeasure N A" |
|
1663 |
shows "M = N" |
|
1664 |
proof (cases M N rule: measure_cases[case_product measure_cases]) |
|
1665 |
case (measure_measure \<Omega> A \<mu> \<Omega>' A' \<mu>') |
|
1666 |
interpret M: sigma_algebra \<Omega> A using measure_measure by (auto simp: measure_space_def) |
|
1667 |
interpret N: sigma_algebra \<Omega>' A' using measure_measure by (auto simp: measure_space_def) |
|
1668 |
have "A = sets M" "A' = sets N" |
|
1669 |
using measure_measure by (simp_all add: sets_def Abs_measure_inverse) |
|
1670 |
with `sets M = sets N` have AA': "A = A'" by simp |
|
1671 |
moreover from M.top N.top M.space_closed N.space_closed AA' have "\<Omega> = \<Omega>'" by auto |
|
1672 |
moreover { fix B have "\<mu> B = \<mu>' B" |
|
1673 |
proof cases |
|
1674 |
assume "B \<in> A" |
|
1675 |
with eq `A = sets M` have "emeasure M B = emeasure N B" by simp |
|
1676 |
with measure_measure show "\<mu> B = \<mu>' B" |
|
1677 |
by (simp add: emeasure_def Abs_measure_inverse) |
|
1678 |
next |
|
1679 |
assume "B \<notin> A" |
|
1680 |
with `A = sets M` `A' = sets N` `A = A'` have "B \<notin> sets M" "B \<notin> sets N" |
|
1681 |
by auto |
|
1682 |
then have "emeasure M B = 0" "emeasure N B = 0" |
|
1683 |
by (simp_all add: emeasure_notin_sets) |
|
1684 |
with measure_measure show "\<mu> B = \<mu>' B" |
|
1685 |
by (simp add: emeasure_def Abs_measure_inverse) |
|
1686 |
qed } |
|
1687 |
then have "\<mu> = \<mu>'" by auto |
|
1688 |
ultimately show "M = N" |
|
1689 |
by (simp add: measure_measure) |
|
1690 |
qed |
|
1691 |
||
1692 |
lemma sigma_eqI: |
|
1693 |
assumes [simp]: "M \<subseteq> Pow \<Omega>" "N \<subseteq> Pow \<Omega>" "sigma_sets \<Omega> M = sigma_sets \<Omega> N" |
|
1694 |
shows "sigma \<Omega> M = sigma \<Omega> N" |
|
1695 |
by (rule measure_eqI) (simp_all add: emeasure_sigma) |
|
1696 |
||
1697 |
subsubsection {* Measurable functions *} |
|
1698 |
||
1699 |
definition measurable :: "'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) set" where |
|
1700 |
"measurable A B = {f \<in> space A -> space B. \<forall>y \<in> sets B. f -` y \<inter> space A \<in> sets A}" |
|
1701 |
||
59415 | 1702 |
lemma measurableI: |
1703 |
"(\<And>x. x \<in> space M \<Longrightarrow> f x \<in> space N) \<Longrightarrow> (\<And>A. A \<in> sets N \<Longrightarrow> f -` A \<inter> space M \<in> sets M) \<Longrightarrow> |
|
1704 |
f \<in> measurable M N" |
|
1705 |
by (auto simp: measurable_def) |
|
1706 |
||
56994 | 1707 |
lemma measurable_space: |
1708 |
"f \<in> measurable M A \<Longrightarrow> x \<in> space M \<Longrightarrow> f x \<in> space A" |
|
1709 |
unfolding measurable_def by auto |
|
1710 |
||
1711 |
lemma measurable_sets: |
|
1712 |
"f \<in> measurable M A \<Longrightarrow> S \<in> sets A \<Longrightarrow> f -` S \<inter> space M \<in> sets M" |
|
1713 |
unfolding measurable_def by auto |
|
1714 |
||
1715 |
lemma measurable_sets_Collect: |
|
1716 |
assumes f: "f \<in> measurable M N" and P: "{x\<in>space N. P x} \<in> sets N" shows "{x\<in>space M. P (f x)} \<in> sets M" |
|
1717 |
proof - |
|
1718 |
have "f -` {x \<in> space N. P x} \<inter> space M = {x\<in>space M. P (f x)}" |
|
1719 |
using measurable_space[OF f] by auto |
|
1720 |
with measurable_sets[OF f P] show ?thesis |
|
1721 |
by simp |
|
1722 |
qed |
|
1723 |
||
1724 |
lemma measurable_sigma_sets: |
|
1725 |
assumes B: "sets N = sigma_sets \<Omega> A" "A \<subseteq> Pow \<Omega>" |
|
1726 |
and f: "f \<in> space M \<rightarrow> \<Omega>" |
|
1727 |
and ba: "\<And>y. y \<in> A \<Longrightarrow> (f -` y) \<inter> space M \<in> sets M" |
|
1728 |
shows "f \<in> measurable M N" |
|
1729 |
proof - |
|
1730 |
interpret A: sigma_algebra \<Omega> "sigma_sets \<Omega> A" using B(2) by (rule sigma_algebra_sigma_sets) |
|
1731 |
from B sets.top[of N] A.top sets.space_closed[of N] A.space_closed have \<Omega>: "\<Omega> = space N" by force |
|
1732 |
||
1733 |
{ fix X assume "X \<in> sigma_sets \<Omega> A" |
|
1734 |
then have "f -` X \<inter> space M \<in> sets M \<and> X \<subseteq> \<Omega>" |
|
1735 |
proof induct |
|
1736 |
case (Basic a) then show ?case |
|
1737 |
by (auto simp add: ba) (metis B(2) subsetD PowD) |
|
1738 |
next |
|
1739 |
case (Compl a) |
|
1740 |
have [simp]: "f -` \<Omega> \<inter> space M = space M" |
|
1741 |
by (auto simp add: funcset_mem [OF f]) |
|
1742 |
then show ?case |
|
1743 |
by (auto simp add: vimage_Diff Diff_Int_distrib2 sets.compl_sets Compl) |
|
1744 |
next |
|
1745 |
case (Union a) |
|
1746 |
then show ?case |
|
1747 |
by (simp add: vimage_UN, simp only: UN_extend_simps(4)) blast |
|
1748 |
qed auto } |
|
1749 |
with f show ?thesis |
|
1750 |
by (auto simp add: measurable_def B \<Omega>) |
|
1751 |
qed |
|
1752 |
||
1753 |
lemma measurable_measure_of: |
|
1754 |
assumes B: "N \<subseteq> Pow \<Omega>" |
|
1755 |
and f: "f \<in> space M \<rightarrow> \<Omega>" |
|
1756 |
and ba: "\<And>y. y \<in> N \<Longrightarrow> (f -` y) \<inter> space M \<in> sets M" |
|
1757 |
shows "f \<in> measurable M (measure_of \<Omega> N \<mu>)" |
|
1758 |
proof - |
|
1759 |
have "sets (measure_of \<Omega> N \<mu>) = sigma_sets \<Omega> N" |
|
1760 |
using B by (rule sets_measure_of) |
|
1761 |
from this assms show ?thesis by (rule measurable_sigma_sets) |
|
1762 |
qed |
|
1763 |
||
1764 |
lemma measurable_iff_measure_of: |
|
1765 |
assumes "N \<subseteq> Pow \<Omega>" "f \<in> space M \<rightarrow> \<Omega>" |
|
1766 |
shows "f \<in> measurable M (measure_of \<Omega> N \<mu>) \<longleftrightarrow> (\<forall>A\<in>N. f -` A \<inter> space M \<in> sets M)" |
|
1767 |
by (metis assms in_measure_of measurable_measure_of assms measurable_sets) |
|
1768 |
||
1769 |
lemma measurable_cong_sets: |
|
1770 |
assumes sets: "sets M = sets M'" "sets N = sets N'" |
|
1771 |
shows "measurable M N = measurable M' N'" |
|
1772 |
using sets[THEN sets_eq_imp_space_eq] sets by (simp add: measurable_def) |
|
1773 |
||
1774 |
lemma measurable_cong: |
|
59415 | 1775 |
assumes "\<And>w. w \<in> space M \<Longrightarrow> f w = g w" |
56994 | 1776 |
shows "f \<in> measurable M M' \<longleftrightarrow> g \<in> measurable M M'" |
1777 |
unfolding measurable_def using assms |
|
1778 |
by (simp cong: vimage_inter_cong Pi_cong) |
|
1779 |
||
59415 | 1780 |
lemma measurable_cong': |
1781 |
assumes "\<And>w. w \<in> space M =simp=> f w = g w" |
|
1782 |
shows "f \<in> measurable M M' \<longleftrightarrow> g \<in> measurable M M'" |
|
1783 |
unfolding measurable_def using assms |
|
1784 |
by (simp cong: vimage_inter_cong Pi_cong add: simp_implies_def) |
|
1785 |
||
56994 | 1786 |
lemma measurable_cong_strong: |
1787 |
"M = N \<Longrightarrow> M' = N' \<Longrightarrow> (\<And>w. w \<in> space M \<Longrightarrow> f w = g w) \<Longrightarrow> |
|
1788 |
f \<in> measurable M M' \<longleftrightarrow> g \<in> measurable N N'" |
|
1789 |
by (metis measurable_cong) |
|
1790 |
||
1791 |
lemma measurable_compose: |
|
1792 |
assumes f: "f \<in> measurable M N" and g: "g \<in> measurable N L" |
|
1793 |
shows "(\<lambda>x. g (f x)) \<in> measurable M L" |
|
1794 |
proof - |
|
1795 |
have "\<And>A. (\<lambda>x. g (f x)) -` A \<inter> space M = f -` (g -` A \<inter> space N) \<inter> space M" |
|
1796 |
using measurable_space[OF f] by auto |
|
1797 |
with measurable_space[OF f] measurable_space[OF g] show ?thesis |
|
1798 |
by (auto intro: measurable_sets[OF f] measurable_sets[OF g] |
|
1799 |
simp del: vimage_Int simp add: measurable_def) |
|
1800 |
qed |
|
1801 |
||
1802 |
lemma measurable_comp: |
|
1803 |
"f \<in> measurable M N \<Longrightarrow> g \<in> measurable N L \<Longrightarrow> g \<circ> f \<in> measurable M L" |
|
1804 |
using measurable_compose[of f M N g L] by (simp add: comp_def) |
|
1805 |
||
1806 |
lemma measurable_const: |
|
1807 |
"c \<in> space M' \<Longrightarrow> (\<lambda>x. c) \<in> measurable M M'" |
|
1808 |
by (auto simp add: measurable_def) |
|
1809 |
||
1810 |
lemma measurable_ident: "id \<in> measurable M M" |
|
1811 |
by (auto simp add: measurable_def) |
|
1812 |
||
59048 | 1813 |
lemma measurable_id: "(\<lambda>x. x) \<in> measurable M M" |
1814 |
by (simp add: measurable_def) |
|
1815 |
||
56994 | 1816 |
lemma measurable_ident_sets: |
1817 |
assumes eq: "sets M = sets M'" shows "(\<lambda>x. x) \<in> measurable M M'" |
|
1818 |
using measurable_ident[of M] |
|
1819 |
unfolding id_def measurable_def eq sets_eq_imp_space_eq[OF eq] . |
|
1820 |
||
1821 |
lemma sets_Least: |
|
1822 |
assumes meas: "\<And>i::nat. {x\<in>space M. P i x} \<in> M" |
|
1823 |
shows "(\<lambda>x. LEAST j. P j x) -` A \<inter> space M \<in> sets M" |
|
1824 |
proof - |
|
1825 |
{ fix i have "(\<lambda>x. LEAST j. P j x) -` {i} \<inter> space M \<in> sets M" |
|
1826 |
proof cases |
|
1827 |
assume i: "(LEAST j. False) = i" |
|
1828 |
have "(\<lambda>x. LEAST j. P j x) -` {i} \<inter> space M = |
|
1829 |
{x\<in>space M. P i x} \<inter> (space M - (\<Union>j<i. {x\<in>space M. P j x})) \<union> (space M - (\<Union>i. {x\<in>space M. P i x}))" |
|
1830 |
by (simp add: set_eq_iff, safe) |
|
1831 |
(insert i, auto dest: Least_le intro: LeastI intro!: Least_equality) |
|
1832 |
with meas show ?thesis |
|
1833 |
by (auto intro!: sets.Int) |
|
1834 |
next |
|
1835 |
assume i: "(LEAST j. False) \<noteq> i" |
|
1836 |
then have "(\<lambda>x. LEAST j. P j x) -` {i} \<inter> space M = |
|
1837 |
{x\<in>space M. P i x} \<inter> (space M - (\<Union>j<i. {x\<in>space M. P j x}))" |
|
1838 |
proof (simp add: set_eq_iff, safe) |
|
1839 |
fix x assume neq: "(LEAST j. False) \<noteq> (LEAST j. P j x)" |
|
1840 |
have "\<exists>j. P j x" |
|
1841 |
by (rule ccontr) (insert neq, auto) |
|
1842 |
then show "P (LEAST j. P j x) x" by (rule LeastI_ex) |
|
1843 |
qed (auto dest: Least_le intro!: Least_equality) |
|
1844 |
with meas show ?thesis |
|
1845 |
by auto |
|
1846 |
qed } |
|
1847 |
then have "(\<Union>i\<in>A. (\<lambda>x. LEAST j. P j x) -` {i} \<inter> space M) \<in> sets M" |
|
1848 |
by (intro sets.countable_UN) auto |
|
1849 |
moreover have "(\<Union>i\<in>A. (\<lambda>x. LEAST j. P j x) -` {i} \<inter> space M) = |
|
1850 |
(\<lambda>x. LEAST j. P j x) -` A \<inter> space M" by auto |
|
1851 |
ultimately show ?thesis by auto |
|
1852 |
qed |
|
1853 |
||
1854 |
lemma measurable_mono1: |
|
1855 |
"M' \<subseteq> Pow \<Omega> \<Longrightarrow> M \<subseteq> M' \<Longrightarrow> |
|
1856 |
measurable (measure_of \<Omega> M \<mu>) N \<subseteq> measurable (measure_of \<Omega> M' \<mu>') N" |
|
1857 |
using measure_of_subset[of M' \<Omega> M] by (auto simp add: measurable_def) |
|
1858 |
||
1859 |
subsubsection {* Counting space *} |
|
1860 |
||
1861 |
definition count_space :: "'a set \<Rightarrow> 'a measure" where |
|
1862 |
"count_space \<Omega> = measure_of \<Omega> (Pow \<Omega>) (\<lambda>A. if finite A then ereal (card A) else \<infinity>)" |
|
1863 |
||
1864 |
lemma |
|
1865 |
shows space_count_space[simp]: "space (count_space \<Omega>) = \<Omega>" |
|
1866 |
and sets_count_space[simp]: "sets (count_space \<Omega>) = Pow \<Omega>" |
|
1867 |
using sigma_sets_into_sp[of "Pow \<Omega>" \<Omega>] |
|
1868 |
by (auto simp: count_space_def) |
|
1869 |
||
1870 |
lemma measurable_count_space_eq1[simp]: |
|
1871 |
"f \<in> measurable (count_space A) M \<longleftrightarrow> f \<in> A \<rightarrow> space M" |
|
1872 |
unfolding measurable_def by simp |
|
1873 |
||
59000 | 1874 |
lemma measurable_compose_countable': |
1875 |
assumes f: "\<And>i. i \<in> I \<Longrightarrow> (\<lambda>x. f i x) \<in> measurable M N" |
|
1876 |
and g: "g \<in> measurable M (count_space I)" and I: "countable I" |
|
56994 | 1877 |
shows "(\<lambda>x. f (g x) x) \<in> measurable M N" |
1878 |
unfolding measurable_def |
|
1879 |
proof safe |
|
1880 |
fix x assume "x \<in> space M" then show "f (g x) x \<in> space N" |
|
59000 | 1881 |
using measurable_space[OF f] g[THEN measurable_space] by auto |
56994 | 1882 |
next |
1883 |
fix A assume A: "A \<in> sets N" |
|
59000 | 1884 |
have "(\<lambda>x. f (g x) x) -` A \<inter> space M = (\<Union>i\<in>I. (g -` {i} \<inter> space M) \<inter> (f i -` A \<inter> space M))" |
1885 |
using measurable_space[OF g] by auto |
|
59415 | 1886 |
also have "\<dots> \<in> sets M" |
1887 |
using f[THEN measurable_sets, OF _ A] g[THEN measurable_sets] |
|
1888 |
by (auto intro!: sets.countable_UN' I intro: sets.Int[OF measurable_sets measurable_sets]) |
|
56994 | 1889 |
finally show "(\<lambda>x. f (g x) x) -` A \<inter> space M \<in> sets M" . |
1890 |
qed |
|
1891 |
||
1892 |
lemma measurable_count_space_eq_countable: |
|
1893 |
assumes "countable A" |
|
1894 |
shows "f \<in> measurable M (count_space A) \<longleftrightarrow> (f \<in> space M \<rightarrow> A \<and> (\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M))" |
|
1895 |
proof - |
|
1896 |
{ fix X assume "X \<subseteq> A" "f \<in> space M \<rightarrow> A" |
|
1897 |
with `countable A` have "f -` X \<inter> space M = (\<Union>a\<in>X. f -` {a} \<inter> space M)" "countable X" |
|
1898 |
by (auto dest: countable_subset) |
|
1899 |
moreover assume "\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M" |
|
1900 |
ultimately have "f -` X \<inter> space M \<in> sets M" |
|
1901 |
using `X \<subseteq> A` by (auto intro!: sets.countable_UN' simp del: UN_simps) } |
|
1902 |
then show ?thesis |
|
1903 |
unfolding measurable_def by auto |
|
1904 |
qed |
|
1905 |
||
59415 | 1906 |
lemma measurable_count_space_eq2: |
1907 |
"finite A \<Longrightarrow> f \<in> measurable M (count_space A) \<longleftrightarrow> (f \<in> space M \<rightarrow> A \<and> (\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M))" |
|
1908 |
by (intro measurable_count_space_eq_countable countable_finite) |
|
1909 |
||
1910 |
lemma measurable_count_space_eq2_countable: |
|
1911 |
fixes f :: "'a => 'c::countable" |
|
1912 |
shows "f \<in> measurable M (count_space A) \<longleftrightarrow> (f \<in> space M \<rightarrow> A \<and> (\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M))" |
|
1913 |
by (intro measurable_count_space_eq_countable countableI_type) |
|
1914 |
||
1915 |
lemma measurable_compose_countable: |
|
1916 |
assumes f: "\<And>i::'i::countable. (\<lambda>x. f i x) \<in> measurable M N" and g: "g \<in> measurable M (count_space UNIV)" |
|
1917 |
shows "(\<lambda>x. f (g x) x) \<in> measurable M N" |
|
1918 |
by (rule measurable_compose_countable'[OF assms]) auto |
|
1919 |
||
1920 |
lemma measurable_count_space_const: |
|
1921 |
"(\<lambda>x. c) \<in> measurable M (count_space UNIV)" |
|
1922 |
by (simp add: measurable_const) |
|
1923 |
||
1924 |
lemma measurable_count_space: |
|
1925 |
"f \<in> measurable (count_space A) (count_space UNIV)" |
|
1926 |
by simp |
|
1927 |
||
1928 |
lemma measurable_compose_rev: |
|
1929 |
assumes f: "f \<in> measurable L N" and g: "g \<in> measurable M L" |
|
1930 |
shows "(\<lambda>x. f (g x)) \<in> measurable M N" |
|
1931 |
using measurable_compose[OF g f] . |
|
1932 |
||
58606 | 1933 |
lemma measurable_empty_iff: |
1934 |
"space N = {} \<Longrightarrow> f \<in> measurable M N \<longleftrightarrow> space M = {}" |
|
1935 |
by (auto simp add: measurable_def Pi_iff) |
|
1936 |
||
56994 | 1937 |
subsubsection {* Extend measure *} |
1938 |
||
1939 |
definition "extend_measure \<Omega> I G \<mu> = |
|
1940 |
(if (\<exists>\<mu>'. (\<forall>i\<in>I. \<mu>' (G i) = \<mu> i) \<and> measure_space \<Omega> (sigma_sets \<Omega> (G`I)) \<mu>') \<and> \<not> (\<forall>i\<in>I. \<mu> i = 0) |
|
1941 |
then measure_of \<Omega> (G`I) (SOME \<mu>'. (\<forall>i\<in>I. \<mu>' (G i) = \<mu> i) \<and> measure_space \<Omega> (sigma_sets \<Omega> (G`I)) \<mu>') |
|
1942 |
else measure_of \<Omega> (G`I) (\<lambda>_. 0))" |
|
1943 |
||
1944 |
lemma space_extend_measure: "G ` I \<subseteq> Pow \<Omega> \<Longrightarrow> space (extend_measure \<Omega> I G \<mu>) = \<Omega>" |
|
1945 |
unfolding extend_measure_def by simp |
|
1946 |
||
1947 |
lemma sets_extend_measure: "G ` I \<subseteq> Pow \<Omega> \<Longrightarrow> sets (extend_measure \<Omega> I G \<mu>) = sigma_sets \<Omega> (G`I)" |
|
1948 |
unfolding extend_measure_def by simp |
|
1949 |
||
1950 |
lemma emeasure_extend_measure: |
|
1951 |
assumes M: "M = extend_measure \<Omega> I G \<mu>" |
|
1952 |
and eq: "\<And>i. i \<in> I \<Longrightarrow> \<mu>' (G i) = \<mu> i" |
|
1953 |
and ms: "G ` I \<subseteq> Pow \<Omega>" "positive (sets M) \<mu>'" "countably_additive (sets M) \<mu>'" |
|
1954 |
and "i \<in> I" |
|
1955 |
shows "emeasure M (G i) = \<mu> i" |
|
1956 |
proof cases |
|
1957 |
assume *: "(\<forall>i\<in>I. \<mu> i = 0)" |
|
1958 |
with M have M_eq: "M = measure_of \<Omega> (G`I) (\<lambda>_. 0)" |
|
1959 |
by (simp add: extend_measure_def) |
|
1960 |
from measure_space_0[OF ms(1)] ms `i\<in>I` |
|
1961 |
have "emeasure M (G i) = 0" |
|
1962 |
by (intro emeasure_measure_of[OF M_eq]) (auto simp add: M measure_space_def sets_extend_measure) |
|
1963 |
with `i\<in>I` * show ?thesis |
|
1964 |
by simp |
|
1965 |
next |
|
1966 |
def P \<equiv> "\<lambda>\<mu>'. (\<forall>i\<in>I. \<mu>' (G i) = \<mu> i) \<and> measure_space \<Omega> (sigma_sets \<Omega> (G`I)) \<mu>'" |
|
1967 |
assume "\<not> (\<forall>i\<in>I. \<mu> i = 0)" |
|
1968 |
moreover |
|
1969 |
have "measure_space (space M) (sets M) \<mu>'" |
|
61169 | 1970 |
using ms unfolding measure_space_def by auto standard |
56994 | 1971 |
with ms eq have "\<exists>\<mu>'. P \<mu>'" |
1972 |
unfolding P_def |
|
1973 |
by (intro exI[of _ \<mu>']) (auto simp add: M space_extend_measure sets_extend_measure) |
|
1974 |
ultimately have M_eq: "M = measure_of \<Omega> (G`I) (Eps P)" |
|
1975 |
by (simp add: M extend_measure_def P_def[symmetric]) |
|
1976 |
||
1977 |
from `\<exists>\<mu>'. P \<mu>'` have P: "P (Eps P)" by (rule someI_ex) |
|
1978 |
show "emeasure M (G i) = \<mu> i" |
|
1979 |
proof (subst emeasure_measure_of[OF M_eq]) |
|
1980 |
have sets_M: "sets M = sigma_sets \<Omega> (G`I)" |
|
1981 |
using M_eq ms by (auto simp: sets_extend_measure) |
|
1982 |
then show "G i \<in> sets M" using `i \<in> I` by auto |
|
1983 |
show "positive (sets M) (Eps P)" "countably_additive (sets M) (Eps P)" "Eps P (G i) = \<mu> i" |
|
1984 |
using P `i\<in>I` by (auto simp add: sets_M measure_space_def P_def) |
|
1985 |
qed fact |
|
1986 |
qed |
|
1987 |
||
1988 |
lemma emeasure_extend_measure_Pair: |
|
1989 |
assumes M: "M = extend_measure \<Omega> {(i, j). I i j} (\<lambda>(i, j). G i j) (\<lambda>(i, j). \<mu> i j)" |
|
1990 |
and eq: "\<And>i j. I i j \<Longrightarrow> \<mu>' (G i j) = \<mu> i j" |
|
1991 |
and ms: "\<And>i j. I i j \<Longrightarrow> G i j \<in> Pow \<Omega>" "positive (sets M) \<mu>'" "countably_additive (sets M) \<mu>'" |
|
1992 |
and "I i j" |
|
1993 |
shows "emeasure M (G i j) = \<mu> i j" |
|
1994 |
using emeasure_extend_measure[OF M _ _ ms(2,3), of "(i,j)"] eq ms(1) `I i j` |
|
1995 |
by (auto simp: subset_eq) |
|
1996 |
||
58608 | 1997 |
subsubsection {* Supremum of a set of $\sigma$-algebras *} |
58588 | 1998 |
|
1999 |
definition "Sup_sigma M = sigma (\<Union>x\<in>M. space x) (\<Union>x\<in>M. sets x)" |
|
2000 |
||
2001 |
syntax |
|
2002 |
"_SUP_sigma" :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b" ("(3\<Squnion>\<^sub>\<sigma> _\<in>_./ _)" [0, 0, 10] 10) |
|
56994 | 2003 |
|
58588 | 2004 |
translations |
2005 |
"\<Squnion>\<^sub>\<sigma> x\<in>A. B" == "CONST Sup_sigma ((\<lambda>x. B) ` A)" |
|
2006 |
||
2007 |
lemma space_Sup_sigma: "space (Sup_sigma M) = (\<Union>x\<in>M. space x)" |
|
2008 |
unfolding Sup_sigma_def by (rule space_measure_of) (auto dest: sets.sets_into_space) |
|
2009 |
||
2010 |
lemma sets_Sup_sigma: "sets (Sup_sigma M) = sigma_sets (\<Union>x\<in>M. space x) (\<Union>x\<in>M. sets x)" |
|
2011 |
unfolding Sup_sigma_def by (rule sets_measure_of) (auto dest: sets.sets_into_space) |
|
2012 |
||
2013 |
lemma in_Sup_sigma: "m \<in> M \<Longrightarrow> A \<in> sets m \<Longrightarrow> A \<in> sets (Sup_sigma M)" |
|
2014 |
unfolding sets_Sup_sigma by auto |
|
56994 | 2015 |
|
59000 | 2016 |
lemma SUP_sigma_cong: |
2017 |
assumes *: "\<And>i. i \<in> I \<Longrightarrow> sets (M i) = sets (N i)" shows "sets (\<Squnion>\<^sub>\<sigma> i\<in>I. M i) = sets (\<Squnion>\<^sub>\<sigma> i\<in>I. N i)" |
|
2018 |
using * sets_eq_imp_space_eq[OF *] by (simp add: Sup_sigma_def) |
|
2019 |
||
58588 | 2020 |
lemma sets_Sup_in_sets: |
2021 |
assumes "M \<noteq> {}" |
|
2022 |
assumes "\<And>m. m \<in> M \<Longrightarrow> space m = space N" |
|
2023 |
assumes "\<And>m. m \<in> M \<Longrightarrow> sets m \<subseteq> sets N" |
|
2024 |
shows "sets (Sup_sigma M) \<subseteq> sets N" |
|
2025 |
proof - |
|
2026 |
have *: "UNION M space = space N" |
|
56994 | 2027 |
using assms by auto |
58588 | 2028 |
show ?thesis |
2029 |
unfolding sets_Sup_sigma * using assms by (auto intro!: sets.sigma_sets_subset) |
|
2030 |
qed |
|
2031 |
||
2032 |
lemma measurable_Sup_sigma1: |
|
2033 |
assumes m: "m \<in> M" and f: "f \<in> measurable m N" |
|
2034 |
and const_space: "\<And>m n. m \<in> M \<Longrightarrow> n \<in> M \<Longrightarrow> space m = space n" |
|
2035 |
shows "f \<in> measurable (Sup_sigma M) N" |
|
2036 |
proof - |
|
2037 |
have "space (Sup_sigma M) = space m" |
|
2038 |
using m by (auto simp add: space_Sup_sigma dest: const_space) |
|
2039 |
then show ?thesis |
|
2040 |
using m f unfolding measurable_def by (auto intro: in_Sup_sigma) |
|
56994 | 2041 |
qed |
2042 |
||
58588 | 2043 |
lemma measurable_Sup_sigma2: |
2044 |
assumes M: "M \<noteq> {}" |
|
2045 |
assumes f: "\<And>m. m \<in> M \<Longrightarrow> f \<in> measurable N m" |
|
2046 |
shows "f \<in> measurable N (Sup_sigma M)" |
|
2047 |
unfolding Sup_sigma_def |
|
2048 |
proof (rule measurable_measure_of) |
|
2049 |
show "f \<in> space N \<rightarrow> UNION M space" |
|
2050 |
using measurable_space[OF f] M by auto |
|
2051 |
qed (auto intro: measurable_sets f dest: sets.sets_into_space) |
|
56994 | 2052 |
|
59088
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2053 |
lemma Sup_sigma_sigma: |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2054 |
assumes [simp]: "M \<noteq> {}" and M: "\<And>m. m \<in> M \<Longrightarrow> m \<subseteq> Pow \<Omega>" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2055 |
shows "(\<Squnion>\<^sub>\<sigma> m\<in>M. sigma \<Omega> m) = sigma \<Omega> (\<Union>M)" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2056 |
proof (rule measure_eqI) |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2057 |
{ fix a m assume "a \<in> sigma_sets \<Omega> m" "m \<in> M" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2058 |
then have "a \<in> sigma_sets \<Omega> (\<Union>M)" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2059 |
by induction (auto intro: sigma_sets.intros) } |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2060 |
then show "sets (\<Squnion>\<^sub>\<sigma> m\<in>M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2061 |
apply (simp add: sets_Sup_sigma space_measure_of_conv M Union_least) |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2062 |
apply (rule sigma_sets_eqI) |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2063 |
apply auto |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2064 |
done |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2065 |
qed (simp add: Sup_sigma_def emeasure_sigma) |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2066 |
|
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2067 |
lemma SUP_sigma_sigma: |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2068 |
assumes M: "M \<noteq> {}" "\<And>m. m \<in> M \<Longrightarrow> f m \<subseteq> Pow \<Omega>" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2069 |
shows "(\<Squnion>\<^sub>\<sigma> m\<in>M. sigma \<Omega> (f m)) = sigma \<Omega> (\<Union>m\<in>M. f m)" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2070 |
proof - |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2071 |
have "Sup_sigma (sigma \<Omega> ` f ` M) = sigma \<Omega> (\<Union>(f ` M))" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2072 |
using M by (intro Sup_sigma_sigma) auto |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2073 |
then show ?thesis |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2074 |
by (simp add: image_image) |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2075 |
qed |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2076 |
|
58608 | 2077 |
subsection {* The smallest $\sigma$-algebra regarding a function *} |
56994 | 2078 |
|
58588 | 2079 |
definition |
2080 |
"vimage_algebra X f M = sigma X {f -` A \<inter> X | A. A \<in> sets M}" |
|
2081 |
||
2082 |
lemma space_vimage_algebra[simp]: "space (vimage_algebra X f M) = X" |
|
2083 |
unfolding vimage_algebra_def by (rule space_measure_of) auto |
|
56994 | 2084 |
|
58588 | 2085 |
lemma sets_vimage_algebra: "sets (vimage_algebra X f M) = sigma_sets X {f -` A \<inter> X | A. A \<in> sets M}" |
2086 |
unfolding vimage_algebra_def by (rule sets_measure_of) auto |
|
2087 |
||
2088 |
lemma sets_vimage_algebra2: |
|
2089 |
"f \<in> X \<rightarrow> space M \<Longrightarrow> sets (vimage_algebra X f M) = {f -` A \<inter> X | A. A \<in> sets M}" |
|
2090 |
using sigma_sets_vimage_commute[of f X "space M" "sets M"] |
|
2091 |
unfolding sets_vimage_algebra sets.sigma_sets_eq by simp |
|
56994 | 2092 |
|
59092
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2093 |
lemma sets_vimage_algebra_cong: "sets M = sets N \<Longrightarrow> sets (vimage_algebra X f M) = sets (vimage_algebra X f N)" |
59000 | 2094 |
by (simp add: sets_vimage_algebra) |
2095 |
||
59092
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2096 |
lemma vimage_algebra_cong: |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2097 |
assumes "X = Y" |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2098 |
assumes "\<And>x. x \<in> Y \<Longrightarrow> f x = g x" |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2099 |
assumes "sets M = sets N" |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2100 |
shows "vimage_algebra X f M = vimage_algebra Y g N" |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2101 |
by (auto simp: vimage_algebra_def assms intro!: arg_cong2[where f=sigma]) |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2102 |
|
58588 | 2103 |
lemma in_vimage_algebra: "A \<in> sets M \<Longrightarrow> f -` A \<inter> X \<in> sets (vimage_algebra X f M)" |
2104 |
by (auto simp: vimage_algebra_def) |
|
2105 |
||
2106 |
lemma sets_image_in_sets: |
|
2107 |
assumes N: "space N = X" |
|
2108 |
assumes f: "f \<in> measurable N M" |
|
2109 |
shows "sets (vimage_algebra X f M) \<subseteq> sets N" |
|
2110 |
unfolding sets_vimage_algebra N[symmetric] |
|
2111 |
by (rule sets.sigma_sets_subset) (auto intro!: measurable_sets f) |
|
2112 |
||
2113 |
lemma measurable_vimage_algebra1: "f \<in> X \<rightarrow> space M \<Longrightarrow> f \<in> measurable (vimage_algebra X f M) M" |
|
2114 |
unfolding measurable_def by (auto intro: in_vimage_algebra) |
|
2115 |
||
2116 |
lemma measurable_vimage_algebra2: |
|
2117 |
assumes g: "g \<in> space N \<rightarrow> X" and f: "(\<lambda>x. f (g x)) \<in> measurable N M" |
|
2118 |
shows "g \<in> measurable N (vimage_algebra X f M)" |
|
2119 |
unfolding vimage_algebra_def |
|
2120 |
proof (rule measurable_measure_of) |
|
2121 |
fix A assume "A \<in> {f -` A \<inter> X | A. A \<in> sets M}" |
|
2122 |
then obtain Y where Y: "Y \<in> sets M" and A: "A = f -` Y \<inter> X" |
|
2123 |
by auto |
|
2124 |
then have "g -` A \<inter> space N = (\<lambda>x. f (g x)) -` Y \<inter> space N" |
|
2125 |
using g by auto |
|
2126 |
also have "\<dots> \<in> sets N" |
|
2127 |
using f Y by (rule measurable_sets) |
|
2128 |
finally show "g -` A \<inter> space N \<in> sets N" . |
|
2129 |
qed (insert g, auto) |
|
56994 | 2130 |
|
59088
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2131 |
lemma vimage_algebra_sigma: |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2132 |
assumes X: "X \<subseteq> Pow \<Omega>'" and f: "f \<in> \<Omega> \<rightarrow> \<Omega>'" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2133 |
shows "vimage_algebra \<Omega> f (sigma \<Omega>' X) = sigma \<Omega> {f -` A \<inter> \<Omega> | A. A \<in> X }" (is "?V = ?S") |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2134 |
proof (rule measure_eqI) |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2135 |
have \<Omega>: "{f -` A \<inter> \<Omega> |A. A \<in> X} \<subseteq> Pow \<Omega>" by auto |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2136 |
show "sets ?V = sets ?S" |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2137 |
using sigma_sets_vimage_commute[OF f, of X] |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2138 |
by (simp add: space_measure_of_conv f sets_vimage_algebra2 \<Omega> X) |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2139 |
qed (simp add: vimage_algebra_def emeasure_sigma) |
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2140 |
|
59000 | 2141 |
lemma vimage_algebra_vimage_algebra_eq: |
2142 |
assumes *: "f \<in> X \<rightarrow> Y" "g \<in> Y \<rightarrow> space M" |
|
2143 |
shows "vimage_algebra X f (vimage_algebra Y g M) = vimage_algebra X (\<lambda>x. g (f x)) M" |
|
59088
ff2bd4a14ddb
generalized (borel_)measurable_SUP/INF/lfp/gfp; tuned proofs for sigma-closure of product spaces
hoelzl
parents:
59048
diff
changeset
|
2144 |
(is "?VV = ?V") |
59000 | 2145 |
proof (rule measure_eqI) |
2146 |
have "(\<lambda>x. g (f x)) \<in> X \<rightarrow> space M" "\<And>A. A \<inter> f -` Y \<inter> X = A \<inter> X" |
|
2147 |
using * by auto |
|
2148 |
with * show "sets ?VV = sets ?V" |
|
2149 |
by (simp add: sets_vimage_algebra2 ex_simps[symmetric] vimage_comp comp_def del: ex_simps) |
|
2150 |
qed (simp add: vimage_algebra_def emeasure_sigma) |
|
2151 |
||
2152 |
lemma sets_vimage_Sup_eq: |
|
2153 |
assumes *: "M \<noteq> {}" "\<And>m. m \<in> M \<Longrightarrow> f \<in> X \<rightarrow> space m" |
|
2154 |
shows "sets (vimage_algebra X f (Sup_sigma M)) = sets (\<Squnion>\<^sub>\<sigma> m \<in> M. vimage_algebra X f m)" |
|
2155 |
(is "?IS = ?SI") |
|
2156 |
proof |
|
2157 |
show "?IS \<subseteq> ?SI" |
|
2158 |
by (intro sets_image_in_sets measurable_Sup_sigma2 measurable_Sup_sigma1) |
|
2159 |
(auto simp: space_Sup_sigma measurable_vimage_algebra1 *) |
|
2160 |
{ fix m assume "m \<in> M" |
|
2161 |
moreover then have "f \<in> X \<rightarrow> space (Sup_sigma M)" "f \<in> X \<rightarrow> space m" |
|
2162 |
using * by (auto simp: space_Sup_sigma) |
|
2163 |
ultimately have "f \<in> measurable (vimage_algebra X f (Sup_sigma M)) m" |
|
2164 |
by (auto simp add: measurable_def sets_vimage_algebra2 intro: in_Sup_sigma) } |
|
2165 |
then show "?SI \<subseteq> ?IS" |
|
2166 |
by (auto intro!: sets_image_in_sets sets_Sup_in_sets del: subsetI simp: *) |
|
2167 |
qed |
|
2168 |
||
59092
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2169 |
lemma vimage_algebra_Sup_sigma: |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2170 |
assumes [simp]: "MM \<noteq> {}" and "\<And>M. M \<in> MM \<Longrightarrow> f \<in> X \<rightarrow> space M" |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2171 |
shows "vimage_algebra X f (Sup_sigma MM) = Sup_sigma (vimage_algebra X f ` MM)" |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2172 |
proof (rule measure_eqI) |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2173 |
show "sets (vimage_algebra X f (Sup_sigma MM)) = sets (Sup_sigma (vimage_algebra X f ` MM))" |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2174 |
using assms by (rule sets_vimage_Sup_eq) |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2175 |
qed (simp add: vimage_algebra_def Sup_sigma_def emeasure_sigma) |
d469103c0737
add integral substitution theorems from Manuel Eberl, Jeremy Avigad, Luke Serafin, and Sudeep Kanav
hoelzl
parents:
59088
diff
changeset
|
2176 |
|
56994 | 2177 |
subsubsection {* Restricted Space Sigma Algebra *} |
2178 |
||
57025 | 2179 |
definition restrict_space where |
2180 |
"restrict_space M \<Omega> = measure_of (\<Omega> \<inter> space M) ((op \<inter> \<Omega>) ` sets M) (emeasure M)" |
|
56994 | 2181 |
|
57025 | 2182 |
lemma space_restrict_space: "space (restrict_space M \<Omega>) = \<Omega> \<inter> space M" |
2183 |
using sets.sets_into_space unfolding restrict_space_def by (subst space_measure_of) auto |
|
2184 |
||
2185 |
lemma space_restrict_space2: "\<Omega> \<in> sets M \<Longrightarrow> space (restrict_space M \<Omega>) = \<Omega>" |
|
2186 |
by (simp add: space_restrict_space sets.sets_into_space) |
|
56994 | 2187 |
|
57025 | 2188 |
lemma sets_restrict_space: "sets (restrict_space M \<Omega>) = (op \<inter> \<Omega>) ` sets M" |
58588 | 2189 |
unfolding restrict_space_def |
2190 |
proof (subst sets_measure_of) |
|
2191 |
show "op \<inter> \<Omega> ` sets M \<subseteq> Pow (\<Omega> \<inter> space M)" |
|
2192 |
by (auto dest: sets.sets_into_space) |
|
2193 |
have "sigma_sets (\<Omega> \<inter> space M) {((\<lambda>x. x) -` X) \<inter> (\<Omega> \<inter> space M) | X. X \<in> sets M} = |
|
57025 | 2194 |
(\<lambda>X. X \<inter> (\<Omega> \<inter> space M)) ` sets M" |
58588 | 2195 |
by (subst sigma_sets_vimage_commute[symmetric, where \<Omega>' = "space M"]) |
2196 |
(auto simp add: sets.sigma_sets_eq) |
|
2197 |
moreover have "{((\<lambda>x. x) -` X) \<inter> (\<Omega> \<inter> space M) | X. X \<in> sets M} = (\<lambda>X. X \<inter> (\<Omega> \<inter> space M)) ` sets M" |
|
2198 |
by auto |
|
2199 |
moreover have "(\<lambda>X. X \<inter> (\<Omega> \<inter> space M)) ` sets M = (op \<inter> \<Omega>) ` sets M" |
|
2200 |
by (intro image_cong) (auto dest: sets.sets_into_space) |
|
2201 |
ultimately show "sigma_sets (\<Omega> \<inter> space M) (op \<inter> \<Omega> ` sets M) = op \<inter> \<Omega> ` sets M" |
|
2202 |
by simp |
|
57025 | 2203 |
qed |
56994 | 2204 |
|
60063 | 2205 |
lemma sets_restrict_space_count_space : |
2206 |
"sets (restrict_space (count_space A) B) = sets (count_space (A \<inter> B))" |
|
2207 |
by(auto simp add: sets_restrict_space) |
|
2208 |
||
59361
fd5da2434be4
piecewise measurability using restrict_space; cleanup Borel_Space
hoelzl
parents:
59092
diff
changeset
|
2209 |
lemma sets_restrict_UNIV[simp]: "sets (restrict_space M UNIV) = sets M" |
fd5da2434be4
piecewise measurability using restrict_space; cleanup Borel_Space
hoelzl
parents:
59092
diff
changeset
|
2210 |
by (auto simp add: sets_restrict_space) |
fd5da2434be4
piecewise measurability using restrict_space; cleanup Borel_Space
hoelzl
parents:
59092
diff
changeset
|
2211 |
|
59415 | 2212 |
lemma sets_restrict_restrict_space: |
2213 |
"sets (restrict_space (restrict_space M A) B) = sets (restrict_space M (A \<inter> B))" |
|
2214 |
unfolding sets_restrict_space image_comp by (intro image_cong) auto |
|
2215 |
||
56994 | 2216 |
lemma sets_restrict_space_iff: |
57025 | 2217 |
"\<Omega> \<inter> space M \<in> sets M \<Longrightarrow> A \<in> sets (restrict_space M \<Omega>) \<longleftrightarrow> (A \<subseteq> \<Omega> \<and> A \<in> sets M)" |
2218 |
proof (subst sets_restrict_space, safe) |
|
2219 |
fix A assume "\<Omega> \<inter> space M \<in> sets M" and A: "A \<in> sets M" |
|
2220 |
then have "(\<Omega> \<inter> space M) \<inter> A \<in> sets M" |
|
2221 |
by rule |
|
2222 |
also have "(\<Omega> \<inter> space M) \<inter> A = \<Omega> \<inter> A" |
|
2223 |
using sets.sets_into_space[OF A] by auto |
|
2224 |
finally show "\<Omega> \<inter> A \<in> sets M" |
|
2225 |
by auto |
|
2226 |
qed auto |
|
56994 | 2227 |
|
59000 | 2228 |
lemma sets_restrict_space_cong: "sets M = sets N \<Longrightarrow> sets (restrict_space M \<Omega>) = sets (restrict_space N \<Omega>)" |
2229 |
by (simp add: sets_restrict_space) |
|
2230 |
||
2231 |
lemma restrict_space_eq_vimage_algebra: |
|
2232 |
"\<Omega> \<subseteq> space M \<Longrightarrow> sets (restrict_space M \<Omega>) = sets (vimage_algebra \<Omega> (\<lambda>x. x) M)" |
|
2233 |
unfolding restrict_space_def |
|
2234 |
apply (subst sets_measure_of) |
|
2235 |
apply (auto simp add: image_subset_iff dest: sets.sets_into_space) [] |
|
2236 |
apply (auto simp add: sets_vimage_algebra intro!: arg_cong2[where f=sigma_sets]) |
|
2237 |
done |
|
2238 |
||
2239 |
lemma sets_Collect_restrict_space_iff: |
|
2240 |
assumes "S \<in> sets M" |
|
2241 |
shows "{x\<in>space (restrict_space M S). P x} \<in> sets (restrict_space M S) \<longleftrightarrow> {x\<in>space M. x \<in> S \<and> P x} \<in> sets M" |
|
2242 |
proof - |
|
2243 |
have "{x\<in>S. P x} = {x\<in>space M. x \<in> S \<and> P x}" |
|
2244 |
using sets.sets_into_space[OF assms] by auto |
|
2245 |
then show ?thesis |
|
2246 |
by (subst sets_restrict_space_iff) (auto simp add: space_restrict_space assms) |
|
2247 |
qed |
|
2248 |
||
56994 | 2249 |
lemma measurable_restrict_space1: |
59415 | 2250 |
assumes f: "f \<in> measurable M N" |
57025 | 2251 |
shows "f \<in> measurable (restrict_space M \<Omega>) N" |
56994 | 2252 |
unfolding measurable_def |
2253 |
proof (intro CollectI conjI ballI) |
|
2254 |
show sp: "f \<in> space (restrict_space M \<Omega>) \<rightarrow> space N" |
|
59415 | 2255 |
using measurable_space[OF f] by (auto simp: space_restrict_space) |
56994 | 2256 |
|
2257 |
fix A assume "A \<in> sets N" |
|
57025 | 2258 |
have "f -` A \<inter> space (restrict_space M \<Omega>) = (f -` A \<inter> space M) \<inter> (\<Omega> \<inter> space M)" |
59415 | 2259 |
by (auto simp: space_restrict_space) |
56994 | 2260 |
also have "\<dots> \<in> sets (restrict_space M \<Omega>)" |
59415 | 2261 |
unfolding sets_restrict_space |
2262 |
using measurable_sets[OF f `A \<in> sets N`] by blast |
|
56994 | 2263 |
finally show "f -` A \<inter> space (restrict_space M \<Omega>) \<in> sets (restrict_space M \<Omega>)" . |
2264 |
qed |
|
2265 |
||
59415 | 2266 |
lemma measurable_restrict_space2_iff: |
2267 |
"f \<in> measurable M (restrict_space N \<Omega>) \<longleftrightarrow> (f \<in> measurable M N \<and> f \<in> space M \<rightarrow> \<Omega>)" |
|
2268 |
proof - |
|
2269 |
have "\<And>A. f \<in> space M \<rightarrow> \<Omega> \<Longrightarrow> f -` \<Omega> \<inter> f -` A \<inter> space M = f -` A \<inter> space M" |
|
2270 |
by auto |
|
2271 |
then show ?thesis |
|
2272 |
by (auto simp: measurable_def space_restrict_space Pi_Int[symmetric] sets_restrict_space) |
|
2273 |
qed |
|
2274 |
||
56994 | 2275 |
lemma measurable_restrict_space2: |
59415 | 2276 |
"f \<in> space M \<rightarrow> \<Omega> \<Longrightarrow> f \<in> measurable M N \<Longrightarrow> f \<in> measurable M (restrict_space N \<Omega>)" |
2277 |
by (simp add: measurable_restrict_space2_iff) |
|
56994 | 2278 |
|
59415 | 2279 |
lemma measurable_piecewise_restrict: |
2280 |
assumes I: "countable C" |
|
2281 |
and X: "\<And>\<Omega>. \<Omega> \<in> C \<Longrightarrow> \<Omega> \<inter> space M \<in> sets M" "space M \<subseteq> \<Union>C" |
|
2282 |
and f: "\<And>\<Omega>. \<Omega> \<in> C \<Longrightarrow> f \<in> measurable (restrict_space M \<Omega>) N" |
|
2283 |
shows "f \<in> measurable M N" |
|
2284 |
proof (rule measurableI) |
|
2285 |
fix x assume "x \<in> space M" |
|
2286 |
with X obtain \<Omega> where "\<Omega> \<in> C" "x \<in> \<Omega>" "x \<in> space M" by auto |
|
2287 |
then show "f x \<in> space N" |
|
2288 |
by (auto simp: space_restrict_space intro: f measurable_space) |
|
57138
7b3146180291
generalizd measurability on restricted space; rule for integrability on compact sets
hoelzl
parents:
57137
diff
changeset
|
2289 |
next |
59415 | 2290 |
fix A assume A: "A \<in> sets N" |
2291 |
have "f -` A \<inter> space M = (\<Union>\<Omega>\<in>C. (f -` A \<inter> (\<Omega> \<inter> space M)))" |
|
2292 |
using X by (auto simp: subset_eq) |
|
57138
7b3146180291
generalizd measurability on restricted space; rule for integrability on compact sets
hoelzl
parents:
57137
diff
changeset
|
2293 |
also have "\<dots> \<in> sets M" |
59415 | 2294 |
using measurable_sets[OF f A] X I |
2295 |
by (intro sets.countable_UN') (auto simp: sets_restrict_space_iff space_restrict_space) |
|
2296 |
finally show "f -` A \<inter> space M \<in> sets M" . |
|
57138
7b3146180291
generalizd measurability on restricted space; rule for integrability on compact sets
hoelzl
parents:
57137
diff
changeset
|
2297 |
qed |
7b3146180291
generalizd measurability on restricted space; rule for integrability on compact sets
hoelzl
parents:
57137
diff
changeset
|
2298 |
|
59415 | 2299 |
lemma measurable_piecewise_restrict_iff: |
2300 |
"countable C \<Longrightarrow> (\<And>\<Omega>. \<Omega> \<in> C \<Longrightarrow> \<Omega> \<inter> space M \<in> sets M) \<Longrightarrow> space M \<subseteq> (\<Union>C) \<Longrightarrow> |
|
2301 |
f \<in> measurable M N \<longleftrightarrow> (\<forall>\<Omega>\<in>C. f \<in> measurable (restrict_space M \<Omega>) N)" |
|
2302 |
by (auto intro: measurable_piecewise_restrict measurable_restrict_space1) |
|
2303 |
||
2304 |
lemma measurable_If_restrict_space_iff: |
|
2305 |
"{x\<in>space M. P x} \<in> sets M \<Longrightarrow> |
|
2306 |
(\<lambda>x. if P x then f x else g x) \<in> measurable M N \<longleftrightarrow> |
|
2307 |
(f \<in> measurable (restrict_space M {x. P x}) N \<and> g \<in> measurable (restrict_space M {x. \<not> P x}) N)" |
|
2308 |
by (subst measurable_piecewise_restrict_iff[where C="{{x. P x}, {x. \<not> P x}}"]) |
|
2309 |
(auto simp: Int_def sets.sets_Collect_neg space_restrict_space conj_commute[of _ "x \<in> space M" for x] |
|
2310 |
cong: measurable_cong') |
|
2311 |
||
2312 |
lemma measurable_If: |
|
2313 |
"f \<in> measurable M M' \<Longrightarrow> g \<in> measurable M M' \<Longrightarrow> {x\<in>space M. P x} \<in> sets M \<Longrightarrow> |
|
2314 |
(\<lambda>x. if P x then f x else g x) \<in> measurable M M'" |
|
2315 |
unfolding measurable_If_restrict_space_iff by (auto intro: measurable_restrict_space1) |
|
2316 |
||
2317 |
lemma measurable_If_set: |
|
2318 |
assumes measure: "f \<in> measurable M M'" "g \<in> measurable M M'" |
|
2319 |
assumes P: "A \<inter> space M \<in> sets M" |
|
2320 |
shows "(\<lambda>x. if x \<in> A then f x else g x) \<in> measurable M M'" |
|
2321 |
proof (rule measurable_If[OF measure]) |
|
2322 |
have "{x \<in> space M. x \<in> A} = A \<inter> space M" by auto |
|
2323 |
thus "{x \<in> space M. x \<in> A} \<in> sets M" using `A \<inter> space M \<in> sets M` by auto |
|
2324 |
qed |
|
59361
fd5da2434be4
piecewise measurability using restrict_space; cleanup Borel_Space
hoelzl
parents:
59092
diff
changeset
|
2325 |
|
59415 | 2326 |
lemma measurable_restrict_space_iff: |
2327 |
"\<Omega> \<inter> space M \<in> sets M \<Longrightarrow> c \<in> space N \<Longrightarrow> |
|
2328 |
f \<in> measurable (restrict_space M \<Omega>) N \<longleftrightarrow> (\<lambda>x. if x \<in> \<Omega> then f x else c) \<in> measurable M N" |
|
2329 |
by (subst measurable_If_restrict_space_iff) |
|
2330 |
(simp_all add: Int_def conj_commute measurable_const) |
|
2331 |
||
2332 |
lemma restrict_space_singleton: "{x} \<in> sets M \<Longrightarrow> sets (restrict_space M {x}) = sets (count_space {x})" |
|
2333 |
using sets_restrict_space_iff[of "{x}" M] |
|
2334 |
by (auto simp add: sets_restrict_space_iff dest!: subset_singletonD) |
|
2335 |
||
2336 |
lemma measurable_restrict_countable: |
|
2337 |
assumes X[intro]: "countable X" |
|
2338 |
assumes sets[simp]: "\<And>x. x \<in> X \<Longrightarrow> {x} \<in> sets M" |
|
2339 |
assumes space[simp]: "\<And>x. x \<in> X \<Longrightarrow> f x \<in> space N" |
|
2340 |
assumes f: "f \<in> measurable (restrict_space M (- X)) N" |
|
2341 |
shows "f \<in> measurable M N" |
|
2342 |
using f sets.countable[OF sets X] |
|
2343 |
by (intro measurable_piecewise_restrict[where M=M and C="{- X} \<union> ((\<lambda>x. {x}) ` X)"]) |
|
2344 |
(auto simp: Diff_Int_distrib2 Compl_eq_Diff_UNIV Int_insert_left sets.Diff restrict_space_singleton |
|
2345 |
simp del: sets_count_space cong: measurable_cong_sets) |
|
2346 |
||
2347 |
lemma measurable_discrete_difference: |
|
2348 |
assumes f: "f \<in> measurable M N" |
|
2349 |
assumes X: "countable X" "\<And>x. x \<in> X \<Longrightarrow> {x} \<in> sets M" "\<And>x. x \<in> X \<Longrightarrow> g x \<in> space N" |
|
2350 |
assumes eq: "\<And>x. x \<in> space M \<Longrightarrow> x \<notin> X \<Longrightarrow> f x = g x" |
|
2351 |
shows "g \<in> measurable M N" |
|
2352 |
by (rule measurable_restrict_countable[OF X]) |
|
2353 |
(auto simp: eq[symmetric] space_restrict_space cong: measurable_cong' intro: f measurable_restrict_space1) |
|
59361
fd5da2434be4
piecewise measurability using restrict_space; cleanup Borel_Space
hoelzl
parents:
59092
diff
changeset
|
2354 |
|
33271
7be66dee1a5a
New theory Probability, which contains a development of measure theory
paulson
parents:
diff
changeset
|
2355 |
end |
57025 | 2356 |