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