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