| author | wenzelm | 
| Tue, 05 Jan 2021 16:24:59 +0100 | |
| changeset 73057 | 45a34cc581b8 | 
| parent 71840 | 8ed78bb0b915 | 
| child 73536 | 5131c388a9b0 | 
| permissions | -rw-r--r-- | 
| 63627 | 1  | 
(* Title: HOL/Analysis/Measure_Space.thy  | 
| 47694 | 2  | 
Author: Lawrence C Paulson  | 
3  | 
Author: Johannes Hölzl, TU München  | 
|
4  | 
Author: Armin Heller, TU München  | 
|
5  | 
*)  | 
|
6  | 
||
| 69517 | 7  | 
section \<open>Measure Spaces\<close>  | 
| 47694 | 8  | 
|
9  | 
theory Measure_Space  | 
|
10  | 
imports  | 
|
| 
66453
 
cc19f7ca2ed6
session-qualified theory imports: isabelle imports -U -i -d '~~/src/Benchmarks' -a;
 
wenzelm 
parents: 
64911 
diff
changeset
 | 
11  | 
Measurable "HOL-Library.Extended_Nonnegative_Real"  | 
| 47694 | 12  | 
begin  | 
13  | 
||
| 70136 | 14  | 
subsection\<^marker>\<open>tag unimportant\<close> "Relate extended reals and the indicator function"  | 
| 50104 | 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)"  | 
| 64267 | 24  | 
by (auto simp: sum.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  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
29  | 
qed (insert assms, simp)  | 
| 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  | 
||
| 64267 | 44  | 
lemma sum_indicator_disjoint_family:  | 
| 60727 | 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  | 
|
| 64267 | 54  | 
by (simp add: if_distrib sum.If_cases[OF \<open>finite P\<close>])  | 
| 60727 | 55  | 
qed  | 
56  | 
||
| 61808 | 57  | 
text \<open>  | 
| 69597 | 58  | 
The type for emeasure spaces is already defined in \<^theory>\<open>HOL-Analysis.Sigma_Algebra\<close>, as it  | 
| 68484 | 59  | 
is also used to represent sigma algebras (with an arbitrary emeasure).  | 
| 61808 | 60  | 
\<close>  | 
| 47694 | 61  | 
|
| 70136 | 62  | 
subsection\<^marker>\<open>tag unimportant\<close> "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  | 
||
| 70136 | 94  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Properties of a premeasure \<^term>\<open>\<mu>\<close>\<close>  | 
| 47694 | 95  | 
|
| 61808 | 96  | 
text \<open>  | 
| 69597 | 97  | 
The definitions for \<^const>\<open>positive\<close> and \<^const>\<open>countably_additive\<close> should be here, by they are  | 
98  | 
necessary to define \<^typ>\<open>'a measure\<close> in \<^theory>\<open>HOL-Analysis.Sigma_Algebra\<close>.  | 
|
| 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))"
 | 
| 64267 | 305  | 
using fin_not_empty F_subset by (rule sum.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  | 
| 69313 | 320  | 
assume count_sum: "\<forall>A. range A \<subseteq> M \<longrightarrow> disjoint_family A \<longrightarrow> \<Union>(A ` UNIV) \<in> M \<longrightarrow> (\<Sum>i. f (A i)) = f (\<Union>(A ` UNIV))"  | 
| 
49773
 
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  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
328  | 
by (auto intro!: summable_LIMSEQ)  | 
| 
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  | 
| 
68532
 
f8b98d31ad45
Incorporating new/strengthened proofs from Library and AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
68484 
diff
changeset
 | 
392  | 
from INF_Lim[OF decseq_f this]  | 
| 
49773
 
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  | 
|
| 70136 | 445  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Properties of \<^const>\<open>emeasure\<close>\<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  | 
||
| 
70723
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
475  | 
lemma emeasure_Un:  | 
| 
63968
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
476  | 
"A \<in> sets M \<Longrightarrow> B \<in> sets M \<Longrightarrow> emeasure M (A \<union> B) = emeasure M A + emeasure M (B - A)"  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
477  | 
using plus_emeasure[of A M "B - A"] by auto  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
478  | 
|
| 
70723
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
479  | 
lemma emeasure_Un_Int:  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
480  | 
assumes "A \<in> sets M" "B \<in> sets M"  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
481  | 
shows "emeasure M A + emeasure M B = emeasure M (A \<union> B) + emeasure M (A \<inter> B)"  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
482  | 
proof -  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
483  | 
have "A = (A-B) \<union> (A \<inter> B)" by auto  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
484  | 
then have "emeasure M A = emeasure M (A-B) + emeasure M (A \<inter> B)"  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
485  | 
by (metis Diff_Diff_Int Diff_disjoint assms plus_emeasure sets.Diff)  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
486  | 
moreover have "A \<union> B = (A-B) \<union> B" by auto  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
487  | 
then have "emeasure M (A \<union> B) = emeasure M (A-B) + emeasure M B"  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
488  | 
by (metis Diff_disjoint Int_commute assms plus_emeasure sets.Diff)  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
489  | 
ultimately show ?thesis by (metis add.assoc add.commute)  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
490  | 
qed  | 
| 
 
4e39d87c9737
imported new material mostly due to Sébastien Gouëzel
 
paulson <lp15@cam.ac.uk> 
parents: 
70722 
diff
changeset
 | 
491  | 
|
| 64267 | 492  | 
lemma sum_emeasure:  | 
| 47694 | 493  | 
"F`I \<subseteq> sets M \<Longrightarrow> disjoint_family_on F I \<Longrightarrow> finite I \<Longrightarrow>  | 
494  | 
(\<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
 | 
495  | 
by (metis sets.additive_sum emeasure_positive emeasure_additive)  | 
| 47694 | 496  | 
|
497  | 
lemma emeasure_mono:  | 
|
498  | 
"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
 | 
499  | 
by (metis zero_le sets.additive_increasing emeasure_additive emeasure_notin_sets emeasure_positive increasingD)  | 
| 47694 | 500  | 
|
501  | 
lemma emeasure_space:  | 
|
502  | 
"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
 | 
503  | 
by (metis emeasure_mono emeasure_notin_sets sets.sets_into_space sets.top zero_le)  | 
| 47694 | 504  | 
|
505  | 
lemma emeasure_Diff:  | 
|
506  | 
assumes finite: "emeasure M B \<noteq> \<infinity>"  | 
|
| 
50002
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
507  | 
and [measurable]: "A \<in> sets M" "B \<in> sets M" and "B \<subseteq> A"  | 
| 47694 | 508  | 
shows "emeasure M (A - B) = emeasure M A - emeasure M B"  | 
509  | 
proof -  | 
|
| 61808 | 510  | 
have "(A - B) \<union> B = A" using \<open>B \<subseteq> A\<close> by auto  | 
| 47694 | 511  | 
then have "emeasure M A = emeasure M ((A - B) \<union> B)" by simp  | 
512  | 
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
 | 
513  | 
by (subst plus_emeasure[symmetric]) auto  | 
| 47694 | 514  | 
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
 | 
515  | 
using finite by simp  | 
| 47694 | 516  | 
qed  | 
517  | 
||
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
518  | 
lemma emeasure_compl:  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
519  | 
"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
 | 
520  | 
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
 | 
521  | 
|
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
522  | 
lemma Lim_emeasure_incseq:  | 
| 61969 | 523  | 
"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
 | 
524  | 
using emeasure_countably_additive  | 
| 
50244
 
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
 
immler 
parents: 
50104 
diff
changeset
 | 
525  | 
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
 | 
526  | 
emeasure_additive)  | 
| 47694 | 527  | 
|
528  | 
lemma incseq_emeasure:  | 
|
529  | 
assumes "range B \<subseteq> sets M" "incseq B"  | 
|
530  | 
shows "incseq (\<lambda>i. emeasure M (B i))"  | 
|
531  | 
using assms by (auto simp: incseq_def intro!: emeasure_mono)  | 
|
532  | 
||
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
533  | 
lemma SUP_emeasure_incseq:  | 
| 47694 | 534  | 
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
 | 
535  | 
shows "(SUP n. emeasure M (A n)) = emeasure M (\<Union>i. A i)"  | 
| 51000 | 536  | 
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
 | 
537  | 
by (simp add: LIMSEQ_unique)  | 
| 47694 | 538  | 
|
539  | 
lemma decseq_emeasure:  | 
|
540  | 
assumes "range B \<subseteq> sets M" "decseq B"  | 
|
541  | 
shows "decseq (\<lambda>i. emeasure M (B i))"  | 
|
542  | 
using assms by (auto simp: decseq_def intro!: emeasure_mono)  | 
|
543  | 
||
544  | 
lemma INF_emeasure_decseq:  | 
|
545  | 
assumes A: "range A \<subseteq> sets M" and "decseq A"  | 
|
546  | 
and finite: "\<And>i. emeasure M (A i) \<noteq> \<infinity>"  | 
|
547  | 
shows "(INF n. emeasure M (A n)) = emeasure M (\<Inter>i. A i)"  | 
|
548  | 
proof -  | 
|
549  | 
have le_MI: "emeasure M (\<Inter>i. A i) \<le> emeasure M (A 0)"  | 
|
550  | 
using A by (auto intro!: emeasure_mono)  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
551  | 
hence *: "emeasure M (\<Inter>i. A i) \<noteq> \<infinity>" using finite[of 0] by (auto simp: top_unique)  | 
| 47694 | 552  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
553  | 
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
 | 
554  | 
by (simp add: ennreal_INF_const_minus)  | 
| 47694 | 555  | 
also have "\<dots> = (SUP n. emeasure M (A 0 - A n))"  | 
| 61808 | 556  | 
using A finite \<open>decseq A\<close>[unfolded decseq_def] by (subst emeasure_Diff) auto  | 
| 47694 | 557  | 
also have "\<dots> = emeasure M (\<Union>i. A 0 - A i)"  | 
558  | 
proof (rule SUP_emeasure_incseq)  | 
|
559  | 
show "range (\<lambda>n. A 0 - A n) \<subseteq> sets M"  | 
|
560  | 
using A by auto  | 
|
561  | 
show "incseq (\<lambda>n. A 0 - A n)"  | 
|
| 61808 | 562  | 
using \<open>decseq A\<close> by (auto simp add: incseq_def decseq_def)  | 
| 47694 | 563  | 
qed  | 
564  | 
also have "\<dots> = emeasure M (A 0) - emeasure M (\<Inter>i. A i)"  | 
|
565  | 
using A finite * by (simp, subst emeasure_Diff) auto  | 
|
566  | 
finally show ?thesis  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
567  | 
by (rule ennreal_minus_cancel[rotated 3])  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
568  | 
(insert finite A, auto intro: INF_lower emeasure_mono)  | 
| 47694 | 569  | 
qed  | 
570  | 
||
| 
63940
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
571  | 
lemma INF_emeasure_decseq':  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
572  | 
assumes A: "\<And>i. A i \<in> sets M" and "decseq A"  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
573  | 
and finite: "\<exists>i. emeasure M (A i) \<noteq> \<infinity>"  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
574  | 
shows "(INF n. emeasure M (A n)) = emeasure M (\<Inter>i. A i)"  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
575  | 
proof -  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
576  | 
from finite obtain i where i: "emeasure M (A i) < \<infinity>"  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
577  | 
by (auto simp: less_top)  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
578  | 
have fin: "i \<le> j \<Longrightarrow> emeasure M (A j) < \<infinity>" for j  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
579  | 
by (rule le_less_trans[OF emeasure_mono i]) (auto intro!: decseqD[OF \<open>decseq A\<close>] A)  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
580  | 
|
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
581  | 
have "(INF n. emeasure M (A n)) = (INF n. emeasure M (A (n + i)))"  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
582  | 
proof (rule INF_eq)  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
583  | 
show "\<exists>j\<in>UNIV. emeasure M (A (j + i)) \<le> emeasure M (A i')" for i'  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
584  | 
by (intro bexI[of _ i'] emeasure_mono decseqD[OF \<open>decseq A\<close>] A) auto  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
585  | 
qed auto  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
586  | 
also have "\<dots> = emeasure M (INF n. (A (n + i)))"  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
587  | 
using A \<open>decseq A\<close> fin by (intro INF_emeasure_decseq) (auto simp: decseq_def less_top)  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
588  | 
also have "(INF n. (A (n + i))) = (INF n. A n)"  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
589  | 
by (meson INF_eq UNIV_I assms(2) decseqD le_add1)  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
590  | 
finally show ?thesis .  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
591  | 
qed  | 
| 
 
0d82c4c94014
prove HK-integrable implies Lebesgue measurable; prove HK-integral equals Lebesgue integral for nonneg functions
 
hoelzl 
parents: 
63658 
diff
changeset
 | 
592  | 
|
| 
61359
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
593  | 
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
 | 
594  | 
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
 | 
595  | 
  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
 | 
596  | 
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
 | 
597  | 
and fin: "\<And>i. i \<in> I \<Longrightarrow> emeasure M (F i) \<noteq> \<infinity>"  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
598  | 
shows "emeasure M (\<Inter>i\<in>I. F i) = (INF i\<in>I. emeasure M (F i))"  | 
| 
61359
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
599  | 
proof cases  | 
| 
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
600  | 
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
 | 
601  | 
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
 | 
602  | 
using I \<open>finite I\<close> by (intro antisym INF_lower INF_greatest F) auto  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
603  | 
moreover have "(INF i\<in>I. emeasure M (F i)) = emeasure M (F (Max I))"  | 
| 
61359
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
604  | 
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
 | 
605  | 
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
 | 
606  | 
by simp  | 
| 
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
607  | 
next  | 
| 
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
608  | 
assume "infinite I"  | 
| 63040 | 609  | 
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
 | 
610  | 
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
 | 
611  | 
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
 | 
612  | 
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
 | 
613  | 
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
 | 
614  | 
      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
 | 
615  | 
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
 | 
616  | 
qed  | 
| 
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
617  | 
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
 | 
618  | 
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
 | 
619  | 
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
 | 
620  | 
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
 | 
621  | 
|
| 
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
622  | 
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
 | 
623  | 
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
 | 
624  | 
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
 | 
625  | 
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
 | 
626  | 
qed (insert L fin, auto)  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
627  | 
also have "\<dots> = (INF i\<in>I. emeasure M (F i))"  | 
| 
61359
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
628  | 
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
 | 
629  | 
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
 | 
630  | 
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
 | 
631  | 
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
 | 
632  | 
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
 | 
633  | 
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
 | 
634  | 
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
 | 
635  | 
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
 | 
636  | 
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
 | 
637  | 
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
 | 
638  | 
qed  | 
| 
 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 
hoelzl 
parents: 
61166 
diff
changeset
 | 
639  | 
|
| 47694 | 640  | 
lemma Lim_emeasure_decseq:  | 
641  | 
assumes A: "range A \<subseteq> sets M" "decseq A" and fin: "\<And>i. emeasure M (A i) \<noteq> \<infinity>"  | 
|
| 61969 | 642  | 
shows "(\<lambda>i. emeasure M (A i)) \<longlonglongrightarrow> emeasure M (\<Inter>i. A i)"  | 
| 51351 | 643  | 
using LIMSEQ_INF[OF decseq_emeasure, OF A]  | 
| 47694 | 644  | 
using INF_emeasure_decseq[OF A fin] by simp  | 
645  | 
||
| 
60636
 
ee18efe9b246
add named theorems order_continuous_intros; lfp/gfp_funpow; bounded variant for lfp/gfp transfer
 
hoelzl 
parents: 
60585 
diff
changeset
 | 
646  | 
lemma emeasure_lfp'[consumes 1, case_names cont measurable]:  | 
| 59000 | 647  | 
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
 | 
648  | 
assumes cont: "sup_continuous F"  | 
| 59000 | 649  | 
assumes *: "\<And>M A. P M \<Longrightarrow> (\<And>N. P N \<Longrightarrow> Measurable.pred N A) \<Longrightarrow> Measurable.pred M (F A)"  | 
650  | 
  shows "emeasure M {x\<in>space M. lfp F x} = (SUP i. emeasure M {x\<in>space M. (F ^^ i) (\<lambda>x. False) x})"
 | 
|
651  | 
proof -  | 
|
652  | 
  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
 | 
653  | 
using sup_continuous_lfp[OF cont] by (auto simp add: bot_fun_def intro!: arg_cong2[where f=emeasure])  | 
| 61808 | 654  | 
  moreover { fix i from \<open>P M\<close> have "{x\<in>space M. (F ^^ i) (\<lambda>x. False) x} \<in> sets M"
 | 
| 59000 | 655  | 
by (induct i arbitrary: M) (auto simp add: pred_def[symmetric] intro: *) }  | 
656  | 
  moreover have "incseq (\<lambda>i. {x\<in>space M. (F ^^ i) (\<lambda>x. False) x})"
 | 
|
657  | 
proof (rule incseq_SucI)  | 
|
658  | 
fix i  | 
|
659  | 
have "(F ^^ i) (\<lambda>x. False) \<le> (F ^^ (Suc i)) (\<lambda>x. False)"  | 
|
660  | 
proof (induct i)  | 
|
661  | 
case 0 show ?case by (simp add: le_fun_def)  | 
|
662  | 
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
 | 
663  | 
case Suc thus ?case using monoD[OF sup_continuous_mono[OF cont] Suc] by auto  | 
| 59000 | 664  | 
qed  | 
665  | 
    then show "{x \<in> space M. (F ^^ i) (\<lambda>x. False) x} \<subseteq> {x \<in> space M. (F ^^ Suc i) (\<lambda>x. False) x}"
 | 
|
666  | 
by auto  | 
|
667  | 
qed  | 
|
668  | 
ultimately show ?thesis  | 
|
669  | 
by (subst SUP_emeasure_incseq) auto  | 
|
670  | 
qed  | 
|
671  | 
||
| 
60636
 
ee18efe9b246
add named theorems order_continuous_intros; lfp/gfp_funpow; bounded variant for lfp/gfp transfer
 
hoelzl 
parents: 
60585 
diff
changeset
 | 
672  | 
lemma emeasure_lfp:  | 
| 
 
ee18efe9b246
add named theorems order_continuous_intros; lfp/gfp_funpow; bounded variant for lfp/gfp transfer
 
hoelzl 
parents: 
60585 
diff
changeset
 | 
673  | 
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
 | 
674  | 
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
 | 
675  | 
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
 | 
676  | 
  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
 | 
677  | 
  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
 | 
678  | 
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
 | 
679  | 
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
 | 
680  | 
  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
 | 
681  | 
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
 | 
682  | 
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
 | 
683  | 
qed (auto simp add: iter le_fun_def SUP_apply[abs_def] intro!: meas cont)  | 
| 47694 | 684  | 
|
685  | 
lemma emeasure_subadditive_finite:  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
686  | 
"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
 | 
687  | 
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
 | 
688  | 
|
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
689  | 
lemma emeasure_subadditive:  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
690  | 
"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
 | 
691  | 
  using emeasure_subadditive_finite[of "{True, False}" "\<lambda>True \<Rightarrow> A | False \<Rightarrow> B" M] by simp
 | 
| 47694 | 692  | 
|
693  | 
lemma emeasure_subadditive_countably:  | 
|
694  | 
assumes "range f \<subseteq> sets M"  | 
|
695  | 
shows "emeasure M (\<Union>i. f i) \<le> (\<Sum>i. emeasure M (f i))"  | 
|
696  | 
proof -  | 
|
697  | 
have "emeasure M (\<Union>i. f i) = emeasure M (\<Union>i. disjointed f i)"  | 
|
698  | 
unfolding UN_disjointed_eq ..  | 
|
699  | 
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
 | 
700  | 
using sets.range_disjointed_sets[OF assms] suminf_emeasure[of "disjointed f"]  | 
| 47694 | 701  | 
by (simp add: disjoint_family_disjointed comp_def)  | 
702  | 
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
 | 
703  | 
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
 | 
704  | 
by (auto intro!: suminf_le emeasure_mono disjointed_subset)  | 
| 47694 | 705  | 
finally show ?thesis .  | 
706  | 
qed  | 
|
707  | 
||
708  | 
lemma emeasure_insert:  | 
|
709  | 
  assumes sets: "{x} \<in> sets M" "A \<in> sets M" and "x \<notin> A"
 | 
|
710  | 
  shows "emeasure M (insert x A) = emeasure M {x} + emeasure M A"
 | 
|
711  | 
proof -  | 
|
| 61808 | 712  | 
  have "{x} \<inter> A = {}" using \<open>x \<notin> A\<close> by auto
 | 
| 47694 | 713  | 
from plus_emeasure[OF sets this] show ?thesis by simp  | 
714  | 
qed  | 
|
715  | 
||
| 
57447
 
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
 
hoelzl 
parents: 
57446 
diff
changeset
 | 
716  | 
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
 | 
717  | 
  "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
 | 
718  | 
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
 | 
719  | 
|
| 64267 | 720  | 
lemma emeasure_eq_sum_singleton:  | 
| 47694 | 721  | 
  assumes "finite S" "\<And>x. x \<in> S \<Longrightarrow> {x} \<in> sets M"
 | 
722  | 
  shows "emeasure M S = (\<Sum>x\<in>S. emeasure M {x})"
 | 
|
| 64267 | 723  | 
  using sum_emeasure[of "\<lambda>x. {x}" S M] assms
 | 
| 47694 | 724  | 
by (auto simp: disjoint_family_on_def subset_eq)  | 
725  | 
||
| 64267 | 726  | 
lemma sum_emeasure_cover:  | 
| 47694 | 727  | 
assumes "finite S" and "A \<in> sets M" and br_in_M: "B ` S \<subseteq> sets M"  | 
728  | 
assumes A: "A \<subseteq> (\<Union>i\<in>S. B i)"  | 
|
729  | 
assumes disj: "disjoint_family_on B S"  | 
|
730  | 
shows "emeasure M A = (\<Sum>i\<in>S. emeasure M (A \<inter> (B i)))"  | 
|
731  | 
proof -  | 
|
732  | 
have "(\<Sum>i\<in>S. emeasure M (A \<inter> (B i))) = emeasure M (\<Union>i\<in>S. A \<inter> (B i))"  | 
|
| 64267 | 733  | 
proof (rule sum_emeasure)  | 
| 47694 | 734  | 
show "disjoint_family_on (\<lambda>i. A \<inter> B i) S"  | 
| 61808 | 735  | 
using \<open>disjoint_family_on B S\<close>  | 
| 47694 | 736  | 
unfolding disjoint_family_on_def by auto  | 
737  | 
qed (insert assms, auto)  | 
|
738  | 
also have "(\<Union>i\<in>S. A \<inter> (B i)) = A"  | 
|
739  | 
using A by auto  | 
|
740  | 
finally show ?thesis by simp  | 
|
741  | 
qed  | 
|
742  | 
||
743  | 
lemma emeasure_eq_0:  | 
|
744  | 
"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
 | 
745  | 
by (metis emeasure_mono order_eq_iff zero_le)  | 
| 47694 | 746  | 
|
747  | 
lemma emeasure_UN_eq_0:  | 
|
748  | 
assumes "\<And>i::nat. emeasure M (N i) = 0" and "range N \<subseteq> sets M"  | 
|
| 60585 | 749  | 
shows "emeasure M (\<Union>i. N i) = 0"  | 
| 47694 | 750  | 
proof -  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
751  | 
have "emeasure M (\<Union>i. N i) \<le> 0"  | 
| 47694 | 752  | 
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
 | 
753  | 
then show ?thesis  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
754  | 
by (auto intro: antisym zero_le)  | 
| 47694 | 755  | 
qed  | 
756  | 
||
757  | 
lemma measure_eqI_finite:  | 
|
758  | 
assumes [simp]: "sets M = Pow A" "sets N = Pow A" and "finite A"  | 
|
759  | 
  assumes eq: "\<And>a. a \<in> A \<Longrightarrow> emeasure M {a} = emeasure N {a}"
 | 
|
760  | 
shows "M = N"  | 
|
761  | 
proof (rule measure_eqI)  | 
|
762  | 
fix X assume "X \<in> sets M"  | 
|
763  | 
then have X: "X \<subseteq> A" by auto  | 
|
764  | 
  then have "emeasure M X = (\<Sum>a\<in>X. emeasure M {a})"
 | 
|
| 64267 | 765  | 
using \<open>finite A\<close> by (subst emeasure_eq_sum_singleton) (auto dest: finite_subset)  | 
| 47694 | 766  | 
  also have "\<dots> = (\<Sum>a\<in>X. emeasure N {a})"
 | 
| 64267 | 767  | 
using X eq by (auto intro!: sum.cong)  | 
| 47694 | 768  | 
also have "\<dots> = emeasure N X"  | 
| 64267 | 769  | 
using X \<open>finite A\<close> by (subst emeasure_eq_sum_singleton) (auto dest: finite_subset)  | 
| 47694 | 770  | 
finally show "emeasure M X = emeasure N X" .  | 
771  | 
qed simp  | 
|
772  | 
||
773  | 
lemma measure_eqI_generator_eq:  | 
|
774  | 
fixes M N :: "'a measure" and E :: "'a set set" and A :: "nat \<Rightarrow> 'a set"  | 
|
775  | 
assumes "Int_stable E" "E \<subseteq> Pow \<Omega>"  | 
|
776  | 
and eq: "\<And>X. X \<in> E \<Longrightarrow> emeasure M X = emeasure N X"  | 
|
777  | 
and M: "sets M = sigma_sets \<Omega> E"  | 
|
778  | 
and N: "sets N = sigma_sets \<Omega> E"  | 
|
| 
49784
 
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
 
hoelzl 
parents: 
49773 
diff
changeset
 | 
779  | 
and A: "range A \<subseteq> E" "(\<Union>i. A i) = \<Omega>" "\<And>i. emeasure M (A i) \<noteq> \<infinity>"  | 
| 47694 | 780  | 
shows "M = N"  | 
781  | 
proof -  | 
|
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
782  | 
let ?\<mu> = "emeasure M" and ?\<nu> = "emeasure N"  | 
| 47694 | 783  | 
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
 | 
784  | 
have "space M = \<Omega>"  | 
| 61808 | 785  | 
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
 | 
786  | 
by blast  | 
| 
49789
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
787  | 
|
| 
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
788  | 
  { fix F D assume "F \<in> E" and "?\<mu> F \<noteq> \<infinity>"
 | 
| 47694 | 789  | 
then have [intro]: "F \<in> sigma_sets \<Omega> E" by auto  | 
| 61808 | 790  | 
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
 | 
791  | 
assume "D \<in> sets M"  | 
| 61808 | 792  | 
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
 | 
793  | 
unfolding M  | 
| 
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
794  | 
proof (induct rule: sigma_sets_induct_disjoint)  | 
| 
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
795  | 
case (basic A)  | 
| 61808 | 796  | 
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
 | 
797  | 
then show ?case using eq by auto  | 
| 47694 | 798  | 
next  | 
| 
49789
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
799  | 
case empty then show ?case by simp  | 
| 47694 | 800  | 
next  | 
| 
49789
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
801  | 
case (compl A)  | 
| 47694 | 802  | 
then have **: "F \<inter> (\<Omega> - A) = F - (F \<inter> A)"  | 
803  | 
and [intro]: "F \<inter> A \<in> sigma_sets \<Omega> E"  | 
|
| 61808 | 804  | 
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
 | 
805  | 
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
 | 
806  | 
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
 | 
807  | 
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
 | 
808  | 
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
 | 
809  | 
then have "?\<mu> (F \<inter> (\<Omega> - A)) = ?\<mu> F - ?\<mu> (F \<inter> A)" unfolding **  | 
| 61808 | 810  | 
using \<open>F \<inter> A \<in> sigma_sets \<Omega> E\<close> by (auto intro!: emeasure_Diff simp: M N)  | 
811  | 
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
 | 
812  | 
also have "\<dots> = ?\<nu> (F \<inter> (\<Omega> - A))" unfolding **  | 
| 61808 | 813  | 
using \<open>F \<inter> A \<in> sigma_sets \<Omega> E\<close> \<open>?\<nu> (F \<inter> A) \<noteq> \<infinity>\<close>  | 
| 47694 | 814  | 
by (auto intro!: emeasure_Diff[symmetric] simp: M N)  | 
| 
49789
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
815  | 
finally show ?case  | 
| 61808 | 816  | 
using \<open>space M = \<Omega>\<close> by auto  | 
| 47694 | 817  | 
next  | 
| 
49789
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
818  | 
case (union A)  | 
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
819  | 
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
 | 
820  | 
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
 | 
821  | 
with A show ?case  | 
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
822  | 
by auto  | 
| 
49789
 
e0a4cb91a8a9
add induction rule for intersection-stable sigma-sets
 
hoelzl 
parents: 
49784 
diff
changeset
 | 
823  | 
qed }  | 
| 47694 | 824  | 
note * = this  | 
825  | 
show "M = N"  | 
|
826  | 
proof (rule measure_eqI)  | 
|
827  | 
show "sets M = sets N"  | 
|
828  | 
using M N by simp  | 
|
| 
49784
 
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
 
hoelzl 
parents: 
49773 
diff
changeset
 | 
829  | 
have [simp, intro]: "\<And>i. A i \<in> sets M"  | 
| 
 
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
 
hoelzl 
parents: 
49773 
diff
changeset
 | 
830  | 
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
 | 
831  | 
fix F assume "F \<in> sets M"  | 
| 
49784
 
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
 
hoelzl 
parents: 
49773 
diff
changeset
 | 
832  | 
let ?D = "disjointed (\<lambda>i. F \<inter> A i)"  | 
| 61808 | 833  | 
from \<open>space M = \<Omega>\<close> have F_eq: "F = (\<Union>i. ?D i)"  | 
834  | 
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
 | 
835  | 
have [simp, intro]: "\<And>i. ?D i \<in> sets M"  | 
| 61808 | 836  | 
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
 | 
837  | 
by (auto simp: subset_eq)  | 
| 
 
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
 
hoelzl 
parents: 
49773 
diff
changeset
 | 
838  | 
have "disjoint_family ?D"  | 
| 
 
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
 
hoelzl 
parents: 
49773 
diff
changeset
 | 
839  | 
by (auto simp: disjoint_family_disjointed)  | 
| 
50002
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
840  | 
moreover  | 
| 
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
841  | 
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
 | 
842  | 
proof (intro arg_cong[where f=suminf] ext)  | 
| 
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
843  | 
fix i  | 
| 
49784
 
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
 
hoelzl 
parents: 
49773 
diff
changeset
 | 
844  | 
have "A i \<inter> ?D i = ?D i"  | 
| 
 
5e5b2da42a69
remove incseq assumption from measure_eqI_generator_eq
 
hoelzl 
parents: 
49773 
diff
changeset
 | 
845  | 
by (auto simp: disjointed_def)  | 
| 
50002
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
846  | 
then show "emeasure M (?D i) = emeasure N (?D i)"  | 
| 
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
847  | 
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
 | 
848  | 
qed  | 
| 
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
849  | 
ultimately show "emeasure M F = emeasure N F"  | 
| 61808 | 850  | 
by (simp add: image_subset_iff \<open>sets M = sets N\<close>[symmetric] F_eq[symmetric] suminf_emeasure)  | 
| 47694 | 851  | 
qed  | 
852  | 
qed  | 
|
853  | 
||
| 
64008
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
854  | 
lemma space_empty: "space M = {} \<Longrightarrow> M = count_space {}"
 | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
855  | 
by (rule measure_eqI) (simp_all add: space_empty_iff)  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
856  | 
|
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
857  | 
lemma measure_eqI_generator_eq_countable:  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
858  | 
fixes M N :: "'a measure" and E :: "'a set set" and A :: "'a set set"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
859  | 
assumes E: "Int_stable E" "E \<subseteq> Pow \<Omega>" "\<And>X. X \<in> E \<Longrightarrow> emeasure M X = emeasure N X"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
860  | 
and sets: "sets M = sigma_sets \<Omega> E" "sets N = sigma_sets \<Omega> E"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
861  | 
and A: "A \<subseteq> E" "(\<Union>A) = \<Omega>" "countable A" "\<And>a. a \<in> A \<Longrightarrow> emeasure M a \<noteq> \<infinity>"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
862  | 
shows "M = N"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
863  | 
proof cases  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
864  | 
  assume "\<Omega> = {}"
 | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
865  | 
have *: "sigma_sets \<Omega> E = sets (sigma \<Omega> E)"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
866  | 
using E(2) by simp  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
867  | 
have "space M = \<Omega>" "space N = \<Omega>"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
868  | 
using sets E(2) unfolding * by (auto dest: sets_eq_imp_space_eq simp del: sets_measure_of)  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
869  | 
then show "M = N"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
870  | 
    unfolding \<open>\<Omega> = {}\<close> by (auto dest: space_empty)
 | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
871  | 
next  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
872  | 
  assume "\<Omega> \<noteq> {}" with \<open>\<Union>A = \<Omega>\<close> have "A \<noteq> {}" by auto
 | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
873  | 
from this \<open>countable A\<close> have rng: "range (from_nat_into A) = A"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
874  | 
by (rule range_from_nat_into)  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
875  | 
show "M = N"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
876  | 
proof (rule measure_eqI_generator_eq[OF E sets])  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
877  | 
show "range (from_nat_into A) \<subseteq> E"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
878  | 
unfolding rng using \<open>A \<subseteq> E\<close> .  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
879  | 
show "(\<Union>i. from_nat_into A i) = \<Omega>"  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
880  | 
unfolding rng using \<open>\<Union>A = \<Omega>\<close> .  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
881  | 
show "emeasure M (from_nat_into A i) \<noteq> \<infinity>" for i  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
882  | 
using rng by (intro A) auto  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
883  | 
qed  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
884  | 
qed  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
885  | 
|
| 47694 | 886  | 
lemma measure_of_of_measure: "measure_of (space M) (sets M) (emeasure M) = M"  | 
887  | 
proof (intro measure_eqI emeasure_measure_of_sigma)  | 
|
888  | 
show "sigma_algebra (space M) (sets M)" ..  | 
|
889  | 
show "positive (sets M) (emeasure M)"  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
890  | 
by (simp add: positive_def)  | 
| 47694 | 891  | 
show "countably_additive (sets M) (emeasure M)"  | 
892  | 
by (simp add: emeasure_countably_additive)  | 
|
893  | 
qed simp_all  | 
|
894  | 
||
| 61808 | 895  | 
subsection \<open>\<open>\<mu>\<close>-null sets\<close>  | 
| 47694 | 896  | 
|
| 70136 | 897  | 
definition\<^marker>\<open>tag important\<close> null_sets :: "'a measure \<Rightarrow> 'a set set" where  | 
| 47694 | 898  | 
  "null_sets M = {N\<in>sets M. emeasure M N = 0}"
 | 
899  | 
||
900  | 
lemma null_setsD1[dest]: "A \<in> null_sets M \<Longrightarrow> emeasure M A = 0"  | 
|
901  | 
by (simp add: null_sets_def)  | 
|
902  | 
||
903  | 
lemma null_setsD2[dest]: "A \<in> null_sets M \<Longrightarrow> A \<in> sets M"  | 
|
904  | 
unfolding null_sets_def by simp  | 
|
905  | 
||
906  | 
lemma null_setsI[intro]: "emeasure M A = 0 \<Longrightarrow> A \<in> sets M \<Longrightarrow> A \<in> null_sets M"  | 
|
907  | 
unfolding null_sets_def by simp  | 
|
908  | 
||
909  | 
interpretation null_sets: ring_of_sets "space M" "null_sets M" for M  | 
|
| 47762 | 910  | 
proof (rule ring_of_setsI)  | 
| 47694 | 911  | 
show "null_sets M \<subseteq> Pow (space M)"  | 
| 
50244
 
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
 
immler 
parents: 
50104 
diff
changeset
 | 
912  | 
using sets.sets_into_space by auto  | 
| 47694 | 913  | 
  show "{} \<in> null_sets M"
 | 
914  | 
by auto  | 
|
| 
53374
 
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
 
wenzelm 
parents: 
51351 
diff
changeset
 | 
915  | 
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
 | 
916  | 
then have sets: "A \<in> sets M" "B \<in> sets M"  | 
| 47694 | 917  | 
by auto  | 
| 
53374
 
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
 
wenzelm 
parents: 
51351 
diff
changeset
 | 
918  | 
then have *: "emeasure M (A \<union> B) \<le> emeasure M A + emeasure M B"  | 
| 47694 | 919  | 
"emeasure M (A - B) \<le> emeasure M A"  | 
920  | 
by (auto intro!: emeasure_subadditive emeasure_mono)  | 
|
| 
53374
 
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
 
wenzelm 
parents: 
51351 
diff
changeset
 | 
921  | 
then have "emeasure M B = 0" "emeasure M A = 0"  | 
| 
 
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
 
wenzelm 
parents: 
51351 
diff
changeset
 | 
922  | 
using null_sets by auto  | 
| 
 
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
 
wenzelm 
parents: 
51351 
diff
changeset
 | 
923  | 
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
 | 
924  | 
by (auto intro!: antisym zero_le)  | 
| 47694 | 925  | 
qed  | 
926  | 
||
| 
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
 | 
927  | 
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
 | 
928  | 
  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
 | 
929  | 
shows "(\<Union>i\<in>I. N i) = (\<Union>i. N (from_nat_into I i))"  | 
| 47694 | 930  | 
proof -  | 
| 
57275
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
931  | 
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
 | 
932  | 
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
 | 
933  | 
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
 | 
934  | 
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
 | 
935  | 
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
 | 
936  | 
qed  | 
| 
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
937  | 
|
| 
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
938  | 
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
 | 
939  | 
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
 | 
940  | 
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
 | 
941  | 
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
 | 
942  | 
proof cases  | 
| 
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
943  | 
  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
 | 
944  | 
next  | 
| 
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
945  | 
  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
 | 
946  | 
show ?thesis  | 
| 
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
947  | 
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
 | 
948  | 
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
 | 
949  | 
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
 | 
950  | 
have "emeasure M (\<Union>i\<in>I. N i) \<le> (\<Sum>n. emeasure M (N (from_nat_into I n)))"  | 
| 61808 | 951  | 
      unfolding UN_from_nat_into[OF \<open>countable I\<close> \<open>I \<noteq> {}\<close>]
 | 
952  | 
      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
 | 
953  | 
also have "(\<lambda>n. emeasure M (N (from_nat_into I n))) = (\<lambda>_. 0)"  | 
| 61808 | 954  | 
      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
 | 
955  | 
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
 | 
956  | 
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
 | 
957  | 
qed  | 
| 47694 | 958  | 
qed  | 
959  | 
||
960  | 
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
 | 
961  | 
"(\<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
 | 
962  | 
by (rule null_sets_UN') auto  | 
| 47694 | 963  | 
|
964  | 
lemma null_set_Int1:  | 
|
965  | 
assumes "B \<in> null_sets M" "A \<in> sets M" shows "A \<inter> B \<in> null_sets M"  | 
|
966  | 
proof (intro CollectI conjI null_setsI)  | 
|
967  | 
show "emeasure M (A \<inter> B) = 0" using assms  | 
|
968  | 
by (intro emeasure_eq_0[of B _ "A \<inter> B"]) auto  | 
|
969  | 
qed (insert assms, auto)  | 
|
970  | 
||
971  | 
lemma null_set_Int2:  | 
|
972  | 
assumes "B \<in> null_sets M" "A \<in> sets M" shows "B \<inter> A \<in> null_sets M"  | 
|
973  | 
using assms by (subst Int_commute) (rule null_set_Int1)  | 
|
974  | 
||
975  | 
lemma emeasure_Diff_null_set:  | 
|
976  | 
assumes "B \<in> null_sets M" "A \<in> sets M"  | 
|
977  | 
shows "emeasure M (A - B) = emeasure M A"  | 
|
978  | 
proof -  | 
|
979  | 
have *: "A - B = (A - (A \<inter> B))" by auto  | 
|
980  | 
have "A \<inter> B \<in> null_sets M" using assms by (rule null_set_Int1)  | 
|
981  | 
then show ?thesis  | 
|
982  | 
unfolding * using assms  | 
|
983  | 
by (subst emeasure_Diff) auto  | 
|
984  | 
qed  | 
|
985  | 
||
986  | 
lemma null_set_Diff:  | 
|
987  | 
assumes "B \<in> null_sets M" "A \<in> sets M" shows "B - A \<in> null_sets M"  | 
|
988  | 
proof (intro CollectI conjI null_setsI)  | 
|
989  | 
show "emeasure M (B - A) = 0" using assms by (intro emeasure_eq_0[of B _ "B - A"]) auto  | 
|
990  | 
qed (insert assms, auto)  | 
|
991  | 
||
992  | 
lemma emeasure_Un_null_set:  | 
|
993  | 
assumes "A \<in> sets M" "B \<in> null_sets M"  | 
|
994  | 
shows "emeasure M (A \<union> B) = emeasure M A"  | 
|
995  | 
proof -  | 
|
996  | 
have *: "A \<union> B = A \<union> (B - A)" by auto  | 
|
997  | 
have "B - A \<in> null_sets M" using assms(2,1) by (rule null_set_Diff)  | 
|
998  | 
then show ?thesis  | 
|
999  | 
unfolding * using assms  | 
|
1000  | 
by (subst plus_emeasure[symmetric]) auto  | 
|
1001  | 
qed  | 
|
1002  | 
||
| 
70722
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1003  | 
lemma emeasure_Un':  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1004  | 
assumes "A \<in> sets M" "B \<in> sets M" "A \<inter> B \<in> null_sets M"  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1005  | 
shows "emeasure M (A \<union> B) = emeasure M A + emeasure M B"  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1006  | 
proof -  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1007  | 
have "A \<union> B = A \<union> (B - A \<inter> B)" by blast  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1008  | 
also have "emeasure M \<dots> = emeasure M A + emeasure M (B - A \<inter> B)"  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1009  | 
using assms by (subst plus_emeasure) auto  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1010  | 
also have "emeasure M (B - A \<inter> B) = emeasure M B"  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1011  | 
using assms by (intro emeasure_Diff_null_set) auto  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1012  | 
finally show ?thesis .  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1013  | 
qed  | 
| 
 
ae2528273eeb
A couple of new theorems, stolen from AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
70614 
diff
changeset
 | 
1014  | 
|
| 61808 | 1015  | 
subsection \<open>The almost everywhere filter (i.e.\ quantifier)\<close>  | 
| 47694 | 1016  | 
|
| 70136 | 1017  | 
definition\<^marker>\<open>tag important\<close> ae_filter :: "'a measure \<Rightarrow> 'a filter" where  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
1018  | 
"ae_filter M = (INF N\<in>null_sets M. principal (space M - N))"  | 
| 47694 | 1019  | 
|
| 57276 | 1020  | 
abbreviation almost_everywhere :: "'a measure \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where
 | 
| 47694 | 1021  | 
"almost_everywhere M P \<equiv> eventually P (ae_filter M)"  | 
1022  | 
||
1023  | 
syntax  | 
|
1024  | 
  "_almost_everywhere" :: "pttrn \<Rightarrow> 'a \<Rightarrow> bool \<Rightarrow> bool" ("AE _ in _. _" [0,0,10] 10)
 | 
|
1025  | 
||
1026  | 
translations  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1027  | 
"AE x in M. P" \<rightleftharpoons> "CONST almost_everywhere M (\<lambda>x. P)"  | 
| 47694 | 1028  | 
|
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1029  | 
abbreviation  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1030  | 
"set_almost_everywhere A M P \<equiv> AE x in M. x \<in> A \<longrightarrow> P x"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1031  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1032  | 
syntax  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1033  | 
"_set_almost_everywhere" :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'a \<Rightarrow> bool \<Rightarrow> bool"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1034  | 
  ("AE _\<in>_ in _./ _" [0,0,0,10] 10)
 | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1035  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1036  | 
translations  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1037  | 
"AE x\<in>A in M. P" \<rightleftharpoons> "CONST set_almost_everywhere A M (\<lambda>x. P)"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1038  | 
|
| 57276 | 1039  | 
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)"
 | 
1040  | 
unfolding ae_filter_def by (subst eventually_INF_base) (auto simp: eventually_principal subset_eq)  | 
|
| 47694 | 1041  | 
|
1042  | 
lemma AE_I':  | 
|
1043  | 
  "N \<in> null_sets M \<Longrightarrow> {x\<in>space M. \<not> P x} \<subseteq> N \<Longrightarrow> (AE x in M. P x)"
 | 
|
1044  | 
unfolding eventually_ae_filter by auto  | 
|
1045  | 
||
1046  | 
lemma AE_iff_null:  | 
|
1047  | 
  assumes "{x\<in>space M. \<not> P x} \<in> sets M" (is "?P \<in> sets M")
 | 
|
1048  | 
  shows "(AE x in M. P x) \<longleftrightarrow> {x\<in>space M. \<not> P x} \<in> null_sets M"
 | 
|
1049  | 
proof  | 
|
1050  | 
assume "AE x in M. P x" then obtain N where N: "N \<in> sets M" "?P \<subseteq> N" "emeasure M N = 0"  | 
|
1051  | 
unfolding eventually_ae_filter by auto  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1052  | 
have "emeasure M ?P \<le> emeasure M N"  | 
| 47694 | 1053  | 
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
 | 
1054  | 
then have "emeasure M ?P = 0"  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1055  | 
unfolding \<open>emeasure M N = 0\<close> by auto  | 
| 47694 | 1056  | 
then show "?P \<in> null_sets M" using assms by auto  | 
1057  | 
next  | 
|
1058  | 
assume "?P \<in> null_sets M" with assms show "AE x in M. P x" by (auto intro: AE_I')  | 
|
1059  | 
qed  | 
|
1060  | 
||
1061  | 
lemma AE_iff_null_sets:  | 
|
1062  | 
"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
 | 
1063  | 
using Int_absorb1[OF sets.sets_into_space, of N M]  | 
| 47694 | 1064  | 
by (subst AE_iff_null) (auto simp: Int_def[symmetric])  | 
1065  | 
||
| 47761 | 1066  | 
lemma AE_not_in:  | 
1067  | 
"N \<in> null_sets M \<Longrightarrow> AE x in M. x \<notin> N"  | 
|
1068  | 
by (metis AE_iff_null_sets null_setsD2)  | 
|
1069  | 
||
| 47694 | 1070  | 
lemma AE_iff_measurable:  | 
1071  | 
  "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"
 | 
|
1072  | 
using AE_iff_null[of _ P] by auto  | 
|
1073  | 
||
1074  | 
lemma AE_E[consumes 1]:  | 
|
1075  | 
assumes "AE x in M. P x"  | 
|
1076  | 
  obtains N where "{x \<in> space M. \<not> P x} \<subseteq> N" "emeasure M N = 0" "N \<in> sets M"
 | 
|
1077  | 
using assms unfolding eventually_ae_filter by auto  | 
|
1078  | 
||
1079  | 
lemma AE_E2:  | 
|
1080  | 
  assumes "AE x in M. P x" "{x\<in>space M. P x} \<in> sets M"
 | 
|
1081  | 
  shows "emeasure M {x\<in>space M. \<not> P x} = 0" (is "emeasure M ?P = 0")
 | 
|
1082  | 
proof -  | 
|
1083  | 
  have "{x\<in>space M. \<not> P x} = space M - {x\<in>space M. P x}" by auto
 | 
|
1084  | 
with AE_iff_null[of M P] assms show ?thesis by auto  | 
|
1085  | 
qed  | 
|
1086  | 
||
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1087  | 
lemma AE_E3:  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1088  | 
assumes "AE x in M. P x"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1089  | 
obtains N where "\<And>x. x \<in> space M - N \<Longrightarrow> P x" "N \<in> null_sets M"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1090  | 
using assms unfolding eventually_ae_filter by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1091  | 
|
| 47694 | 1092  | 
lemma AE_I:  | 
1093  | 
  assumes "{x \<in> space M. \<not> P x} \<subseteq> N" "emeasure M N = 0" "N \<in> sets M"
 | 
|
1094  | 
shows "AE x in M. P x"  | 
|
1095  | 
using assms unfolding eventually_ae_filter by auto  | 
|
1096  | 
||
1097  | 
lemma AE_mp[elim!]:  | 
|
1098  | 
assumes AE_P: "AE x in M. P x" and AE_imp: "AE x in M. P x \<longrightarrow> Q x"  | 
|
1099  | 
shows "AE x in M. Q x"  | 
|
1100  | 
proof -  | 
|
1101  | 
  from AE_P obtain A where P: "{x\<in>space M. \<not> P x} \<subseteq> A"
 | 
|
1102  | 
and A: "A \<in> sets M" "emeasure M A = 0"  | 
|
1103  | 
by (auto elim!: AE_E)  | 
|
1104  | 
||
1105  | 
  from AE_imp obtain B where imp: "{x\<in>space M. P x \<and> \<not> Q x} \<subseteq> B"
 | 
|
1106  | 
and B: "B \<in> sets M" "emeasure M B = 0"  | 
|
1107  | 
by (auto elim!: AE_E)  | 
|
1108  | 
||
1109  | 
show ?thesis  | 
|
1110  | 
proof (intro AE_I)  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1111  | 
have "emeasure M (A \<union> B) \<le> 0"  | 
| 47694 | 1112  | 
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
 | 
1113  | 
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
 | 
1114  | 
using A B by auto  | 
| 47694 | 1115  | 
    show "{x\<in>space M. \<not> Q x} \<subseteq> A \<union> B"
 | 
1116  | 
using P imp by auto  | 
|
1117  | 
qed  | 
|
1118  | 
qed  | 
|
1119  | 
||
| 64911 | 1120  | 
text \<open>The next lemma is convenient to combine with a lemma whose conclusion is of the  | 
| 69566 | 1121  | 
form \<open>AE x in M. P x = Q x\<close>: for such a lemma, there is no \<open>[symmetric]\<close> variant,  | 
| 64911 | 1122  | 
but using \<open>AE_symmetric[OF...]\<close> will replace it.\<close>  | 
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1123  | 
|
| 47694 | 1124  | 
(* depricated replace by laws about eventually *)  | 
1125  | 
lemma  | 
|
1126  | 
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"  | 
|
1127  | 
and AE_disjI1: "AE x in M. P x \<Longrightarrow> AE x in M. P x \<or> Q x"  | 
|
1128  | 
and AE_disjI2: "AE x in M. Q x \<Longrightarrow> AE x in M. P x \<or> Q x"  | 
|
1129  | 
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"  | 
|
1130  | 
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)"  | 
|
1131  | 
by auto  | 
|
1132  | 
||
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1133  | 
lemma AE_symmetric:  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1134  | 
assumes "AE x in M. P x = Q x"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1135  | 
shows "AE x in M. Q x = P x"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1136  | 
using assms by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1137  | 
|
| 47694 | 1138  | 
lemma AE_impI:  | 
1139  | 
"(P \<Longrightarrow> AE x in M. Q x) \<Longrightarrow> AE x in M. P \<longrightarrow> Q x"  | 
|
| 
70380
 
2b0dca68c3ee
More analysis / measure theory material
 
paulson <lp15@cam.ac.uk> 
parents: 
70136 
diff
changeset
 | 
1140  | 
by fastforce  | 
| 47694 | 1141  | 
|
1142  | 
lemma AE_measure:  | 
|
1143  | 
  assumes AE: "AE x in M. P x" and sets: "{x\<in>space M. P x} \<in> sets M" (is "?P \<in> sets M")
 | 
|
1144  | 
  shows "emeasure M {x\<in>space M. P x} = emeasure M (space M)"
 | 
|
1145  | 
proof -  | 
|
1146  | 
from AE_E[OF AE] guess N . note N = this  | 
|
1147  | 
with sets have "emeasure M (space M) \<le> emeasure M (?P \<union> N)"  | 
|
1148  | 
by (intro emeasure_mono) auto  | 
|
1149  | 
also have "\<dots> \<le> emeasure M ?P + emeasure M N"  | 
|
1150  | 
using sets N by (intro emeasure_subadditive) auto  | 
|
1151  | 
also have "\<dots> = emeasure M ?P" using N by simp  | 
|
1152  | 
finally show "emeasure M ?P = emeasure M (space M)"  | 
|
1153  | 
using emeasure_space[of M "?P"] by auto  | 
|
1154  | 
qed  | 
|
1155  | 
||
1156  | 
lemma AE_space: "AE x in M. x \<in> space M"  | 
|
1157  | 
  by (rule AE_I[where N="{}"]) auto
 | 
|
1158  | 
||
1159  | 
lemma AE_I2[simp, intro]:  | 
|
1160  | 
"(\<And>x. x \<in> space M \<Longrightarrow> P x) \<Longrightarrow> AE x in M. P x"  | 
|
1161  | 
using AE_space by force  | 
|
1162  | 
||
1163  | 
lemma AE_Ball_mp:  | 
|
1164  | 
"\<forall>x\<in>space M. P x \<Longrightarrow> AE x in M. P x \<longrightarrow> Q x \<Longrightarrow> AE x in M. Q x"  | 
|
1165  | 
by auto  | 
|
1166  | 
||
1167  | 
lemma AE_cong[cong]:  | 
|
1168  | 
"(\<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)"  | 
|
1169  | 
by auto  | 
|
1170  | 
||
| 
69546
 
27dae626822b
prefer naming convention from datatype package for strong congruence rules
 
haftmann 
parents: 
69541 
diff
changeset
 | 
1171  | 
lemma AE_cong_simp: "M = N \<Longrightarrow> (\<And>x. x \<in> space N =simp=> P x = Q x) \<Longrightarrow> (AE x in M. P x) \<longleftrightarrow> (AE x in N. Q x)"  | 
| 
64008
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
1172  | 
by (auto simp: simp_implies_def)  | 
| 
 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 
hoelzl 
parents: 
63968 
diff
changeset
 | 
1173  | 
|
| 47694 | 1174  | 
lemma AE_all_countable:  | 
1175  | 
"(AE x in M. \<forall>i. P i x) \<longleftrightarrow> (\<forall>i::'i::countable. AE x in M. P i x)"  | 
|
1176  | 
proof  | 
|
1177  | 
assume "\<forall>i. AE x in M. P i x"  | 
|
1178  | 
from this[unfolded eventually_ae_filter Bex_def, THEN choice]  | 
|
1179  | 
  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
 | 
|
1180  | 
  have "{x\<in>space M. \<not> (\<forall>i. P i x)} \<subseteq> (\<Union>i. {x\<in>space M. \<not> P i x})" by auto
 | 
|
1181  | 
also have "\<dots> \<subseteq> (\<Union>i. N i)" using N by auto  | 
|
1182  | 
  finally have "{x\<in>space M. \<not> (\<forall>i. P i x)} \<subseteq> (\<Union>i. N i)" .
 | 
|
1183  | 
moreover from N have "(\<Union>i. N i) \<in> null_sets M"  | 
|
1184  | 
by (intro null_sets_UN) auto  | 
|
1185  | 
ultimately show "AE x in M. \<forall>i. P i x"  | 
|
1186  | 
unfolding eventually_ae_filter by auto  | 
|
1187  | 
qed auto  | 
|
1188  | 
||
| 
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
 | 
1189  | 
lemma AE_ball_countable:  | 
| 59000 | 1190  | 
assumes [intro]: "countable X"  | 
1191  | 
shows "(AE x in M. \<forall>y\<in>X. P x y) \<longleftrightarrow> (\<forall>y\<in>X. AE x in M. P x y)"  | 
|
1192  | 
proof  | 
|
1193  | 
assume "\<forall>y\<in>X. AE x in M. P x y"  | 
|
1194  | 
from this[unfolded eventually_ae_filter Bex_def, THEN bchoice]  | 
|
1195  | 
  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"
 | 
|
1196  | 
by auto  | 
|
1197  | 
  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})"
 | 
|
1198  | 
by auto  | 
|
1199  | 
also have "\<dots> \<subseteq> (\<Union>y\<in>X. N y)"  | 
|
1200  | 
using N by auto  | 
|
1201  | 
  finally have "{x\<in>space M. \<not> (\<forall>y\<in>X. P x y)} \<subseteq> (\<Union>y\<in>X. N y)" .
 | 
|
1202  | 
moreover from N have "(\<Union>y\<in>X. N y) \<in> null_sets M"  | 
|
1203  | 
by (intro null_sets_UN') auto  | 
|
1204  | 
ultimately show "AE x in M. \<forall>y\<in>X. P x y"  | 
|
1205  | 
unfolding eventually_ae_filter by auto  | 
|
1206  | 
qed auto  | 
|
1207  | 
||
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1208  | 
lemma AE_ball_countable':  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1209  | 
"(\<And>N. N \<in> I \<Longrightarrow> AE x in M. P N x) \<Longrightarrow> countable I \<Longrightarrow> AE x in M. \<forall>N \<in> I. P N x"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1210  | 
unfolding AE_ball_countable by simp  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1211  | 
|
| 
63959
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1212  | 
lemma AE_pairwise: "countable F \<Longrightarrow> pairwise (\<lambda>A B. AE x in M. R x A B) F \<longleftrightarrow> (AE x in M. pairwise (R x) F)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1213  | 
unfolding pairwise_alt by (simp add: AE_ball_countable)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1214  | 
|
| 
57275
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
1215  | 
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
 | 
1216  | 
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
 | 
1217  | 
  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
 | 
1218  | 
  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
 | 
1219  | 
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
 | 
1220  | 
proof -  | 
| 
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
1221  | 
  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
 | 
1222  | 
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
 | 
1223  | 
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
 | 
1224  | 
by auto  | 
| 
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
1225  | 
qed  | 
| 
 
0ddb5b755cdc
moved lemmas from the proof of the Central Limit Theorem by Jeremy Avigad and Luke Serafin
 
hoelzl 
parents: 
57235 
diff
changeset
 | 
1226  | 
|
| 47694 | 1227  | 
lemma AE_finite_all:  | 
1228  | 
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)"  | 
|
1229  | 
using f by induct auto  | 
|
1230  | 
||
1231  | 
lemma AE_finite_allI:  | 
|
1232  | 
assumes "finite S"  | 
|
1233  | 
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 | 1234  | 
using AE_finite_all[OF \<open>finite S\<close>] by auto  | 
| 47694 | 1235  | 
|
1236  | 
lemma emeasure_mono_AE:  | 
|
1237  | 
assumes imp: "AE x in M. x \<in> A \<longrightarrow> x \<in> B"  | 
|
1238  | 
and B: "B \<in> sets M"  | 
|
1239  | 
shows "emeasure M A \<le> emeasure M B"  | 
|
1240  | 
proof cases  | 
|
1241  | 
assume A: "A \<in> sets M"  | 
|
1242  | 
  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"
 | 
|
1243  | 
by (auto simp: eventually_ae_filter)  | 
|
1244  | 
have "emeasure M A = emeasure M (A - N)"  | 
|
1245  | 
using N A by (subst emeasure_Diff_null_set) auto  | 
|
1246  | 
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
 | 
1247  | 
using N A B sets.sets_into_space by (auto intro!: emeasure_mono)  | 
| 47694 | 1248  | 
also have "emeasure M (B - N) = emeasure M B"  | 
1249  | 
using N B by (subst emeasure_Diff_null_set) auto  | 
|
1250  | 
finally show ?thesis .  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1251  | 
qed (simp add: emeasure_notin_sets)  | 
| 47694 | 1252  | 
|
1253  | 
lemma emeasure_eq_AE:  | 
|
1254  | 
assumes iff: "AE x in M. x \<in> A \<longleftrightarrow> x \<in> B"  | 
|
1255  | 
assumes A: "A \<in> sets M" and B: "B \<in> sets M"  | 
|
1256  | 
shows "emeasure M A = emeasure M B"  | 
|
1257  | 
using assms by (safe intro!: antisym emeasure_mono_AE) auto  | 
|
1258  | 
||
| 59000 | 1259  | 
lemma emeasure_Collect_eq_AE:  | 
1260  | 
"AE x in M. P x \<longleftrightarrow> Q x \<Longrightarrow> Measurable.pred M Q \<Longrightarrow> Measurable.pred M P \<Longrightarrow>  | 
|
1261  | 
   emeasure M {x\<in>space M. P x} = emeasure M {x\<in>space M. Q x}"
 | 
|
1262  | 
by (intro emeasure_eq_AE) auto  | 
|
1263  | 
||
1264  | 
lemma emeasure_eq_0_AE: "AE x in M. \<not> P x \<Longrightarrow> emeasure M {x\<in>space M. P x} = 0"
 | 
|
1265  | 
using AE_iff_measurable[OF _ refl, of M "\<lambda>x. \<not> P x"]  | 
|
1266  | 
  by (cases "{x\<in>space M. P x} \<in> sets M") (simp_all add: emeasure_notin_sets)
 | 
|
1267  | 
||
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1268  | 
lemma emeasure_0_AE:  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1269  | 
assumes "emeasure M (space M) = 0"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1270  | 
shows "AE x in M. P x"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1271  | 
using eventually_ae_filter assms by blast  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1272  | 
|
| 60715 | 1273  | 
lemma emeasure_add_AE:  | 
1274  | 
assumes [measurable]: "A \<in> sets M" "B \<in> sets M" "C \<in> sets M"  | 
|
1275  | 
assumes 1: "AE x in M. x \<in> C \<longleftrightarrow> x \<in> A \<or> x \<in> B"  | 
|
1276  | 
assumes 2: "AE x in M. \<not> (x \<in> A \<and> x \<in> B)"  | 
|
1277  | 
shows "emeasure M C = emeasure M A + emeasure M B"  | 
|
1278  | 
proof -  | 
|
1279  | 
have "emeasure M C = emeasure M (A \<union> B)"  | 
|
1280  | 
by (rule emeasure_eq_AE) (insert 1, auto)  | 
|
1281  | 
also have "\<dots> = emeasure M A + emeasure M (B - A)"  | 
|
1282  | 
by (subst plus_emeasure) auto  | 
|
1283  | 
also have "emeasure M (B - A) = emeasure M B"  | 
|
1284  | 
by (rule emeasure_eq_AE) (insert 2, auto)  | 
|
1285  | 
finally show ?thesis .  | 
|
1286  | 
qed  | 
|
1287  | 
||
| 61808 | 1288  | 
subsection \<open>\<open>\<sigma>\<close>-finite Measures\<close>  | 
| 47694 | 1289  | 
|
| 70136 | 1290  | 
locale\<^marker>\<open>tag important\<close> sigma_finite_measure =  | 
| 47694 | 1291  | 
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
 | 
1292  | 
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
 | 
1293  | 
"\<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
 | 
1294  | 
|
| 
 
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
 
hoelzl 
parents: 
57446 
diff
changeset
 | 
1295  | 
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
 | 
1296  | 
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
 | 
1297  | 
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
 | 
1298  | 
proof -  | 
| 
 
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
 
hoelzl 
parents: 
57446 
diff
changeset
 | 
1299  | 
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
 | 
1300  | 
[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
 | 
1301  | 
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
 | 
1302  | 
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
 | 
1303  | 
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
 | 
1304  | 
proof cases  | 
| 61808 | 1305  | 
    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
 | 
1306  | 
      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
 | 
1307  | 
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
 | 
1308  | 
    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
 | 
1309  | 
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
 | 
1310  | 
proof  | 
| 
 
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
 
hoelzl 
parents: 
57446 
diff
changeset
 | 
1311  | 
show "range (from_nat_into A) \<subseteq> sets M"  | 
| 61808 | 1312  | 
        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
 | 
1313  | 
have "(\<Union>i. from_nat_into A i) = \<Union>A"  | 
| 61808 | 1314  | 
        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
 | 
1315  | 
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
 | 
1316  | 
by auto  | 
| 61808 | 1317  | 
    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
 | 
1318  | 
qed  | 
| 
 
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
 
hoelzl 
parents: 
57446 
diff
changeset
 | 
1319  | 
qed  | 
| 47694 | 1320  | 
|
1321  | 
lemma (in sigma_finite_measure) sigma_finite_disjoint:  | 
|
1322  | 
obtains A :: "nat \<Rightarrow> 'a set"  | 
|
1323  | 
where "range A \<subseteq> sets M" "(\<Union>i. A i) = space M" "\<And>i. emeasure M (A i) \<noteq> \<infinity>" "disjoint_family A"  | 
|
| 60580 | 1324  | 
proof -  | 
| 47694 | 1325  | 
obtain A :: "nat \<Rightarrow> 'a set" where  | 
1326  | 
range: "range A \<subseteq> sets M" and  | 
|
1327  | 
space: "(\<Union>i. A i) = space M" and  | 
|
1328  | 
measure: "\<And>i. emeasure M (A i) \<noteq> \<infinity>"  | 
|
| 
62343
 
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
 
haftmann 
parents: 
61969 
diff
changeset
 | 
1329  | 
using sigma_finite by blast  | 
| 60580 | 1330  | 
show thesis  | 
1331  | 
proof (rule that[of "disjointed A"])  | 
|
1332  | 
show "range (disjointed A) \<subseteq> sets M"  | 
|
1333  | 
by (rule sets.range_disjointed_sets[OF range])  | 
|
1334  | 
show "(\<Union>i. disjointed A i) = space M"  | 
|
1335  | 
and "disjoint_family (disjointed A)"  | 
|
1336  | 
using disjoint_family_disjointed UN_disjointed_eq[of A] space range  | 
|
1337  | 
by auto  | 
|
1338  | 
show "emeasure M (disjointed A i) \<noteq> \<infinity>" for i  | 
|
1339  | 
proof -  | 
|
1340  | 
have "emeasure M (disjointed A i) \<le> emeasure M (A i)"  | 
|
1341  | 
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
 | 
1342  | 
then show ?thesis using measure[of i] by (auto simp: top_unique)  | 
| 60580 | 1343  | 
qed  | 
1344  | 
qed  | 
|
| 47694 | 1345  | 
qed  | 
1346  | 
||
1347  | 
lemma (in sigma_finite_measure) sigma_finite_incseq:  | 
|
1348  | 
obtains A :: "nat \<Rightarrow> 'a set"  | 
|
1349  | 
where "range A \<subseteq> sets M" "(\<Union>i. A i) = space M" "\<And>i. emeasure M (A i) \<noteq> \<infinity>" "incseq A"  | 
|
| 60580 | 1350  | 
proof -  | 
| 47694 | 1351  | 
obtain F :: "nat \<Rightarrow> 'a set" where  | 
1352  | 
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
 | 
1353  | 
using sigma_finite by blast  | 
| 60580 | 1354  | 
show thesis  | 
1355  | 
proof (rule that[of "\<lambda>n. \<Union>i\<le>n. F i"])  | 
|
1356  | 
show "range (\<lambda>n. \<Union>i\<le>n. F i) \<subseteq> sets M"  | 
|
1357  | 
using F by (force simp: incseq_def)  | 
|
1358  | 
show "(\<Union>n. \<Union>i\<le>n. F i) = space M"  | 
|
1359  | 
proof -  | 
|
1360  | 
from F have "\<And>x. x \<in> space M \<Longrightarrow> \<exists>i. x \<in> F i" by auto  | 
|
1361  | 
with F show ?thesis by fastforce  | 
|
1362  | 
qed  | 
|
| 60585 | 1363  | 
show "emeasure M (\<Union>i\<le>n. F i) \<noteq> \<infinity>" for n  | 
| 60580 | 1364  | 
proof -  | 
| 60585 | 1365  | 
have "emeasure M (\<Union>i\<le>n. F i) \<le> (\<Sum>i\<le>n. emeasure M (F i))"  | 
| 60580 | 1366  | 
using F by (auto intro!: emeasure_subadditive_finite)  | 
1367  | 
also have "\<dots> < \<infinity>"  | 
|
| 64267 | 1368  | 
using F by (auto simp: sum_Pinfty less_top)  | 
| 60580 | 1369  | 
finally show ?thesis by simp  | 
1370  | 
qed  | 
|
1371  | 
show "incseq (\<lambda>n. \<Union>i\<le>n. F i)"  | 
|
1372  | 
by (force simp: incseq_def)  | 
|
1373  | 
qed  | 
|
| 47694 | 1374  | 
qed  | 
1375  | 
||
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1376  | 
lemma (in sigma_finite_measure) approx_PInf_emeasure_with_finite:  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1377  | 
fixes C::real  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1378  | 
assumes W_meas: "W \<in> sets M"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1379  | 
and W_inf: "emeasure M W = \<infinity>"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1380  | 
obtains Z where "Z \<in> sets M" "Z \<subseteq> W" "emeasure M Z < \<infinity>" "emeasure M Z > C"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1381  | 
proof -  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1382  | 
obtain A :: "nat \<Rightarrow> 'a set"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1383  | 
where A: "range A \<subseteq> sets M" "(\<Union>i. A i) = space M" "\<And>i. emeasure M (A i) \<noteq> \<infinity>" "incseq A"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1384  | 
using sigma_finite_incseq by blast  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1385  | 
define B where "B = (\<lambda>i. W \<inter> A i)"  | 
| 64911 | 1386  | 
have B_meas: "\<And>i. B i \<in> sets M" using W_meas \<open>range A \<subseteq> sets M\<close> B_def by blast  | 
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1387  | 
have b: "\<And>i. B i \<subseteq> W" using B_def by blast  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1388  | 
|
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1389  | 
  { fix i
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1390  | 
have "emeasure M (B i) \<le> emeasure M (A i)"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1391  | 
using A by (intro emeasure_mono) (auto simp: B_def)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1392  | 
also have "emeasure M (A i) < \<infinity>"  | 
| 64911 | 1393  | 
using \<open>\<And>i. emeasure M (A i) \<noteq> \<infinity>\<close> by (simp add: less_top)  | 
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1394  | 
finally have "emeasure M (B i) < \<infinity>" . }  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1395  | 
note c = this  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1396  | 
|
| 64911 | 1397  | 
have "W = (\<Union>i. B i)" using B_def \<open>(\<Union>i. A i) = space M\<close> W_meas by auto  | 
1398  | 
moreover have "incseq B" using B_def \<open>incseq A\<close> by (simp add: incseq_def subset_eq)  | 
|
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1399  | 
ultimately have "(\<lambda>i. emeasure M (B i)) \<longlonglongrightarrow> emeasure M W" using W_meas B_meas  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1400  | 
by (simp add: B_meas Lim_emeasure_incseq image_subset_iff)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1401  | 
then have "(\<lambda>i. emeasure M (B i)) \<longlonglongrightarrow> \<infinity>" using W_inf by simp  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1402  | 
from order_tendstoD(1)[OF this, of C]  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1403  | 
obtain i where d: "emeasure M (B i) > C"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1404  | 
by (auto simp: eventually_sequentially)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1405  | 
have "B i \<in> sets M" "B i \<subseteq> W" "emeasure M (B i) < \<infinity>" "emeasure M (B i) > C"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1406  | 
using B_meas b c d by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1407  | 
then show ?thesis using that by blast  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1408  | 
qed  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
1409  | 
|
| 69597 | 1410  | 
subsection \<open>Measure space induced by distribution of \<^const>\<open>measurable\<close>-functions\<close>  | 
| 47694 | 1411  | 
|
| 70136 | 1412  | 
definition\<^marker>\<open>tag important\<close> distr :: "'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b measure" where
 | 
| 69564 | 1413  | 
"distr M N f =  | 
1414  | 
measure_of (space N) (sets N) (\<lambda>A. emeasure M (f -` A \<inter> space M))"  | 
|
| 47694 | 1415  | 
|
1416  | 
lemma  | 
|
| 59048 | 1417  | 
shows sets_distr[simp, measurable_cong]: "sets (distr M N f) = sets N"  | 
| 47694 | 1418  | 
and space_distr[simp]: "space (distr M N f) = space N"  | 
1419  | 
by (auto simp: distr_def)  | 
|
1420  | 
||
1421  | 
lemma  | 
|
1422  | 
shows measurable_distr_eq1[simp]: "measurable (distr Mf Nf f) Mf' = measurable Nf Mf'"  | 
|
1423  | 
and measurable_distr_eq2[simp]: "measurable Mg' (distr Mg Ng g) = measurable Mg' Ng"  | 
|
1424  | 
by (auto simp: measurable_def)  | 
|
1425  | 
||
| 54417 | 1426  | 
lemma distr_cong:  | 
1427  | 
"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"  | 
|
1428  | 
using sets_eq_imp_space_eq[of N L] by (simp add: distr_def Int_def cong: rev_conj_cong)  | 
|
1429  | 
||
| 47694 | 1430  | 
lemma emeasure_distr:  | 
1431  | 
fixes f :: "'a \<Rightarrow> 'b"  | 
|
1432  | 
assumes f: "f \<in> measurable M N" and A: "A \<in> sets N"  | 
|
1433  | 
shows "emeasure (distr M N f) A = emeasure M (f -` A \<inter> space M)" (is "_ = ?\<mu> A")  | 
|
1434  | 
unfolding distr_def  | 
|
1435  | 
proof (rule emeasure_measure_of_sigma)  | 
|
1436  | 
show "positive (sets N) ?\<mu>"  | 
|
1437  | 
by (auto simp: positive_def)  | 
|
1438  | 
||
1439  | 
show "countably_additive (sets N) ?\<mu>"  | 
|
1440  | 
proof (intro countably_additiveI)  | 
|
1441  | 
fix A :: "nat \<Rightarrow> 'b set" assume "range A \<subseteq> sets N" "disjoint_family A"  | 
|
1442  | 
then have A: "\<And>i. A i \<in> sets N" "(\<Union>i. A i) \<in> sets N" by auto  | 
|
1443  | 
then have *: "range (\<lambda>i. f -` (A i) \<inter> space M) \<subseteq> sets M"  | 
|
1444  | 
using f by (auto simp: measurable_def)  | 
|
1445  | 
moreover have "(\<Union>i. f -` A i \<inter> space M) \<in> sets M"  | 
|
1446  | 
using * by blast  | 
|
1447  | 
moreover have **: "disjoint_family (\<lambda>i. f -` A i \<inter> space M)"  | 
|
| 61808 | 1448  | 
using \<open>disjoint_family A\<close> by (auto simp: disjoint_family_on_def)  | 
| 47694 | 1449  | 
ultimately show "(\<Sum>i. ?\<mu> (A i)) = ?\<mu> (\<Union>i. A i)"  | 
1450  | 
using suminf_emeasure[OF _ **] A f  | 
|
1451  | 
by (auto simp: comp_def vimage_UN)  | 
|
1452  | 
qed  | 
|
1453  | 
show "sigma_algebra (space N) (sets N)" ..  | 
|
1454  | 
qed fact  | 
|
1455  | 
||
| 59000 | 1456  | 
lemma emeasure_Collect_distr:  | 
1457  | 
assumes X[measurable]: "X \<in> measurable M N" "Measurable.pred N P"  | 
|
1458  | 
  shows "emeasure (distr M N X) {x\<in>space N. P x} = emeasure M {x\<in>space M. P (X x)}"
 | 
|
1459  | 
by (subst emeasure_distr)  | 
|
1460  | 
(auto intro!: arg_cong2[where f=emeasure] X(1)[THEN measurable_space])  | 
|
1461  | 
||
1462  | 
lemma emeasure_lfp2[consumes 1, case_names cont f measurable]:  | 
|
1463  | 
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
 | 
1464  | 
assumes cont: "sup_continuous F"  | 
| 59000 | 1465  | 
assumes f: "\<And>M. P M \<Longrightarrow> f \<in> measurable M' M"  | 
1466  | 
assumes *: "\<And>M A. P M \<Longrightarrow> (\<And>N. P N \<Longrightarrow> Measurable.pred N A) \<Longrightarrow> Measurable.pred M (F A)"  | 
|
1467  | 
  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)})"
 | 
|
1468  | 
proof (subst (1 2) emeasure_Collect_distr[symmetric, where X=f])  | 
|
1469  | 
show "f \<in> measurable M' M" "f \<in> measurable M' M"  | 
|
| 61808 | 1470  | 
using f[OF \<open>P M\<close>] by auto  | 
| 59000 | 1471  | 
  { fix i show "Measurable.pred M ((F ^^ i) (\<lambda>x. False))"
 | 
| 61808 | 1472  | 
using \<open>P M\<close> by (induction i arbitrary: M) (auto intro!: *) }  | 
| 59000 | 1473  | 
show "Measurable.pred M (lfp F)"  | 
| 61808 | 1474  | 
using \<open>P M\<close> cont * by (rule measurable_lfp_coinduct[of P])  | 
| 59000 | 1475  | 
|
1476  | 
  have "emeasure (distr M' M f) {x \<in> space (distr M' M f). lfp F x} =
 | 
|
1477  | 
    (SUP i. emeasure (distr M' M f) {x \<in> space (distr M' M f). (F ^^ i) (\<lambda>x. False) x})"
 | 
|
| 61808 | 1478  | 
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
 | 
1479  | 
proof (coinduction arbitrary: M rule: emeasure_lfp')  | 
| 59000 | 1480  | 
case (measurable A N) then have "\<And>N. P N \<Longrightarrow> Measurable.pred (distr M' N f) A"  | 
1481  | 
by metis  | 
|
1482  | 
then have "\<And>N. P N \<Longrightarrow> Measurable.pred N A"  | 
|
1483  | 
by simp  | 
|
| 61808 | 1484  | 
with \<open>P N\<close>[THEN *] show ?case  | 
| 59000 | 1485  | 
by auto  | 
1486  | 
qed fact  | 
|
1487  | 
  then show "emeasure (distr M' M f) {x \<in> space M. lfp F x} =
 | 
|
1488  | 
    (SUP i. emeasure (distr M' M f) {x \<in> space M. (F ^^ i) (\<lambda>x. False) x})"
 | 
|
1489  | 
by simp  | 
|
1490  | 
qed  | 
|
1491  | 
||
| 50104 | 1492  | 
lemma distr_id[simp]: "distr N N (\<lambda>x. x) = N"  | 
1493  | 
by (rule measure_eqI) (auto simp: emeasure_distr)  | 
|
1494  | 
||
| 
64320
 
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
 
hoelzl 
parents: 
64283 
diff
changeset
 | 
1495  | 
lemma distr_id2: "sets M = sets N \<Longrightarrow> distr N M (\<lambda>x. x) = N"  | 
| 
 
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
 
hoelzl 
parents: 
64283 
diff
changeset
 | 
1496  | 
by (rule measure_eqI) (auto simp: emeasure_distr)  | 
| 
 
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
 
hoelzl 
parents: 
64283 
diff
changeset
 | 
1497  | 
|
| 
50001
 
382bd3173584
add syntax and a.e.-rules for (conditional) probability on predicates
 
hoelzl 
parents: 
49789 
diff
changeset
 | 
1498  | 
lemma measure_distr:  | 
| 
 
382bd3173584
add syntax and a.e.-rules for (conditional) probability on predicates
 
hoelzl 
parents: 
49789 
diff
changeset
 | 
1499  | 
"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
 | 
1500  | 
by (simp add: emeasure_distr measure_def)  | 
| 
 
382bd3173584
add syntax and a.e.-rules for (conditional) probability on predicates
 
hoelzl 
parents: 
49789 
diff
changeset
 | 
1501  | 
|
| 
57447
 
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
 
hoelzl 
parents: 
57446 
diff
changeset
 | 
1502  | 
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
 | 
1503  | 
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
 | 
1504  | 
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
 | 
1505  | 
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
 | 
1506  | 
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
 | 
1507  | 
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
 | 
1508  | 
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
 | 
1509  | 
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
 | 
1510  | 
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
 | 
1511  | 
|
| 47694 | 1512  | 
lemma AE_distrD:  | 
1513  | 
assumes f: "f \<in> measurable M M'"  | 
|
1514  | 
and AE: "AE x in distr M M' f. P x"  | 
|
1515  | 
shows "AE x in M. P (f x)"  | 
|
1516  | 
proof -  | 
|
1517  | 
from AE[THEN AE_E] guess N .  | 
|
1518  | 
with f show ?thesis  | 
|
1519  | 
unfolding eventually_ae_filter  | 
|
1520  | 
by (intro bexI[of _ "f -` N \<inter> space M"])  | 
|
1521  | 
(auto simp: emeasure_distr measurable_def)  | 
|
1522  | 
qed  | 
|
1523  | 
||
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
1524  | 
lemma AE_distr_iff:  | 
| 
50002
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
1525  | 
  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
 | 
1526  | 
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
 | 
1527  | 
proof (subst (1 2) AE_iff_measurable[OF _ refl])  | 
| 
50002
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
1528  | 
  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
 | 
1529  | 
using f[THEN measurable_space] by auto  | 
| 
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
1530  | 
  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
 | 
1531  | 
    (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
 | 
1532  | 
by (simp add: emeasure_distr)  | 
| 
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
1533  | 
qed auto  | 
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
1534  | 
|
| 47694 | 1535  | 
lemma null_sets_distr_iff:  | 
1536  | 
"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
 | 
1537  | 
by (auto simp add: null_sets_def emeasure_distr)  | 
| 47694 | 1538  | 
|
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68532 
diff
changeset
 | 
1539  | 
proposition distr_distr:  | 
| 
50002
 
ce0d316b5b44
add measurability prover; add support for Borel sets
 
hoelzl 
parents: 
50001 
diff
changeset
 | 
1540  | 
"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
 | 
1541  | 
by (auto simp add: emeasure_distr measurable_space  | 
| 47694 | 1542  | 
intro!: arg_cong[where f="emeasure M"] measure_eqI)  | 
1543  | 
||
| 70136 | 1544  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Real measure values\<close>  | 
| 47694 | 1545  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1546  | 
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
 | 
1547  | 
proof (rule ring_of_setsI)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1548  | 
  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
 | 
1549  | 
    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
 | 
1550  | 
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
 | 
1551  | 
|
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1552  | 
  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
 | 
1553  | 
    a - b \<in> {A \<in> sets M. emeasure M A \<noteq> top}" for a b
 | 
| 69286 | 1554  | 
using emeasure_mono[of "a - b" a M] by (auto simp: top_unique)  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1555  | 
qed (auto dest: sets.sets_into_space)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1556  | 
|
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1557  | 
lemma measure_nonneg[simp]: "0 \<le> measure M A"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
1558  | 
unfolding measure_def by auto  | 
| 47694 | 1559  | 
|
| 
67982
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1560  | 
lemma measure_nonneg' [simp]: "\<not> measure M A < 0"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1561  | 
using measure_nonneg not_le by blast  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1562  | 
|
| 
61880
 
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
 
hoelzl 
parents: 
61808 
diff
changeset
 | 
1563  | 
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
 | 
1564  | 
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
 | 
1565  | 
|
| 59000 | 1566  | 
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
 | 
1567  | 
using measure_nonneg[of M X] by linarith  | 
| 59000 | 1568  | 
|
| 47694 | 1569  | 
lemma measure_empty[simp]: "measure M {} = 0"
 | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1570  | 
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
 | 
1571  | 
|
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1572  | 
lemma emeasure_eq_ennreal_measure:  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1573  | 
"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
 | 
1574  | 
by (cases "emeasure M A" rule: ennreal_cases) (auto simp: measure_def)  | 
| 47694 | 1575  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1576  | 
lemma measure_zero_top: "emeasure M A = top \<Longrightarrow> measure M A = 0"  | 
| 71633 | 1577  | 
by (simp add: measure_def)  | 
| 47694 | 1578  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1579  | 
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
 | 
1580  | 
using emeasure_eq_ennreal_measure[of M A]  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1581  | 
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
 | 
1582  | 
|
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1583  | 
lemma enn2real_plus:"a < top \<Longrightarrow> b < top \<Longrightarrow> enn2real (a + b) = enn2real a + enn2real b"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
1584  | 
by (simp add: enn2real_def plus_ennreal.rep_eq real_of_ereal_add less_top  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1585  | 
del: real_of_ereal_enn2ereal)  | 
| 61633 | 1586  | 
|
| 
70380
 
2b0dca68c3ee
More analysis / measure theory material
 
paulson <lp15@cam.ac.uk> 
parents: 
70136 
diff
changeset
 | 
1587  | 
lemma enn2real_sum:"(\<And>i. i \<in> I \<Longrightarrow> f i < top) \<Longrightarrow> enn2real (sum f I) = sum (enn2real \<circ> f) I"  | 
| 
 
2b0dca68c3ee
More analysis / measure theory material
 
paulson <lp15@cam.ac.uk> 
parents: 
70136 
diff
changeset
 | 
1588  | 
by (induction I rule: infinite_finite_induct) (auto simp: enn2real_plus)  | 
| 
 
2b0dca68c3ee
More analysis / measure theory material
 
paulson <lp15@cam.ac.uk> 
parents: 
70136 
diff
changeset
 | 
1589  | 
|
| 
63959
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1590  | 
lemma measure_eq_AE:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1591  | 
assumes iff: "AE x in M. x \<in> A \<longleftrightarrow> x \<in> B"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1592  | 
assumes A: "A \<in> sets M" and B: "B \<in> sets M"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1593  | 
shows "measure M A = measure M B"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1594  | 
using assms emeasure_eq_AE[OF assms] by (simp add: measure_def)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1595  | 
|
| 47694 | 1596  | 
lemma measure_Union:  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1597  | 
  "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
 | 
1598  | 
measure M (A \<union> B) = measure M A + measure M B"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
1599  | 
by (simp add: measure_def plus_emeasure[symmetric] enn2real_plus less_top)  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1600  | 
|
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1601  | 
lemma disjoint_family_on_insert:  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1602  | 
  "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
 | 
1603  | 
by (fastforce simp: disjoint_family_on_def)  | 
| 47694 | 1604  | 
|
1605  | 
lemma measure_finite_Union:  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1606  | 
"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
 | 
1607  | 
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
 | 
1608  | 
by (induction S rule: finite_induct)  | 
| 64267 | 1609  | 
(auto simp: disjoint_family_on_insert measure_Union sum_emeasure[symmetric] sets.countable_UN'[OF countable_finite])  | 
| 47694 | 1610  | 
|
1611  | 
lemma measure_Diff:  | 
|
1612  | 
assumes finite: "emeasure M A \<noteq> \<infinity>"  | 
|
1613  | 
and measurable: "A \<in> sets M" "B \<in> sets M" "B \<subseteq> A"  | 
|
1614  | 
shows "measure M (A - B) = measure M A - measure M B"  | 
|
1615  | 
proof -  | 
|
1616  | 
have "emeasure M (A - B) \<le> emeasure M A" "emeasure M B \<le> emeasure M A"  | 
|
1617  | 
using measurable by (auto intro!: emeasure_mono)  | 
|
1618  | 
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
 | 
1619  | 
using measurable finite by (rule_tac measure_Union) (auto simp: top_unique)  | 
| 61808 | 1620  | 
thus ?thesis using \<open>B \<subseteq> A\<close> by (auto simp: Un_absorb2)  | 
| 47694 | 1621  | 
qed  | 
1622  | 
||
1623  | 
lemma measure_UNION:  | 
|
1624  | 
assumes measurable: "range A \<subseteq> sets M" "disjoint_family A"  | 
|
1625  | 
assumes finite: "emeasure M (\<Union>i. A i) \<noteq> \<infinity>"  | 
|
1626  | 
shows "(\<lambda>i. measure M (A i)) sums (measure M (\<Union>i. A i))"  | 
|
1627  | 
proof -  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1628  | 
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
 | 
1629  | 
unfolding suminf_emeasure[OF measurable, symmetric] by (simp add: summable_sums)  | 
| 47694 | 1630  | 
moreover  | 
1631  | 
  { fix i
 | 
|
1632  | 
have "emeasure M (A i) \<le> emeasure M (\<Union>i. A i)"  | 
|
1633  | 
using measurable by (auto intro!: emeasure_mono)  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1634  | 
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
 | 
1635  | 
using finite by (intro emeasure_eq_ennreal_measure) (auto simp: top_unique) }  | 
| 47694 | 1636  | 
ultimately show ?thesis using finite  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
1637  | 
by (subst (asm) (2) emeasure_eq_ennreal_measure) simp_all  | 
| 47694 | 1638  | 
qed  | 
1639  | 
||
1640  | 
lemma measure_subadditive:  | 
|
1641  | 
assumes measurable: "A \<in> sets M" "B \<in> sets M"  | 
|
1642  | 
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
 | 
1643  | 
shows "measure M (A \<union> B) \<le> measure M A + measure M B"  | 
| 47694 | 1644  | 
proof -  | 
1645  | 
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
 | 
1646  | 
using emeasure_subadditive[OF measurable] fin by (auto simp: top_unique)  | 
| 47694 | 1647  | 
then show "(measure M (A \<union> B)) \<le> (measure M A) + (measure M B)"  | 
1648  | 
using emeasure_subadditive[OF measurable] fin  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1649  | 
apply simp  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1650  | 
apply (subst (asm) (2 3 4) emeasure_eq_ennreal_measure)  | 
| 68403 | 1651  | 
apply (auto simp flip: ennreal_plus)  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1652  | 
done  | 
| 47694 | 1653  | 
qed  | 
1654  | 
||
1655  | 
lemma measure_subadditive_finite:  | 
|
1656  | 
assumes A: "finite I" "A`I \<subseteq> sets M" and fin: "\<And>i. i \<in> I \<Longrightarrow> emeasure M (A i) \<noteq> \<infinity>"  | 
|
1657  | 
shows "measure M (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. measure M (A i))"  | 
|
1658  | 
proof -  | 
|
1659  | 
  { have "emeasure M (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. emeasure M (A i))"
 | 
|
1660  | 
using emeasure_subadditive_finite[OF A] .  | 
|
1661  | 
also have "\<dots> < \<infinity>"  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1662  | 
using fin by (simp add: less_top A)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1663  | 
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
 | 
1664  | 
note * = this  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1665  | 
show ?thesis  | 
| 47694 | 1666  | 
using emeasure_subadditive_finite[OF A] fin  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1667  | 
unfolding emeasure_eq_ennreal_measure[OF *]  | 
| 64267 | 1668  | 
by (simp_all add: sum_nonneg emeasure_eq_ennreal_measure)  | 
| 47694 | 1669  | 
qed  | 
1670  | 
||
1671  | 
lemma measure_subadditive_countably:  | 
|
1672  | 
assumes A: "range A \<subseteq> sets M" and fin: "(\<Sum>i. emeasure M (A i)) \<noteq> \<infinity>"  | 
|
1673  | 
shows "measure M (\<Union>i. A i) \<le> (\<Sum>i. measure M (A i))"  | 
|
1674  | 
proof -  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1675  | 
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
 | 
1676  | 
using ennreal_suminf_lessD[of "\<lambda>i. emeasure M (A i)"] by (simp add: less_top)  | 
| 47694 | 1677  | 
  { have "emeasure M (\<Union>i. A i) \<le> (\<Sum>i. emeasure M (A i))"
 | 
1678  | 
using emeasure_subadditive_countably[OF A] .  | 
|
1679  | 
also have "\<dots> < \<infinity>"  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1680  | 
using fin by (simp add: less_top)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1681  | 
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
 | 
1682  | 
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
 | 
1683  | 
by (rule emeasure_eq_ennreal_measure[symmetric])  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1684  | 
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
 | 
1685  | 
using emeasure_subadditive_countably[OF A] .  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1686  | 
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
 | 
1687  | 
using fin unfolding emeasure_eq_ennreal_measure[OF **]  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1688  | 
by (subst suminf_ennreal) (auto simp: **)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1689  | 
finally show ?thesis  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1690  | 
apply (rule ennreal_le_iff[THEN iffD1, rotated])  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1691  | 
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
 | 
1692  | 
using fin  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1693  | 
apply (simp add: emeasure_eq_ennreal_measure[OF **])  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1694  | 
done  | 
| 47694 | 1695  | 
qed  | 
1696  | 
||
| 
63959
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1697  | 
lemma measure_Un_null_set: "A \<in> sets M \<Longrightarrow> B \<in> null_sets M \<Longrightarrow> measure M (A \<union> B) = measure M A"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1698  | 
by (simp add: measure_def emeasure_Un_null_set)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1699  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1700  | 
lemma measure_Diff_null_set: "A \<in> sets M \<Longrightarrow> B \<in> null_sets M \<Longrightarrow> measure M (A - B) = measure M A"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1701  | 
by (simp add: measure_def emeasure_Diff_null_set)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1702  | 
|
| 64267 | 1703  | 
lemma measure_eq_sum_singleton:  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1704  | 
  "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
 | 
1705  | 
    measure M S = (\<Sum>x\<in>S. measure M {x})"
 | 
| 64267 | 1706  | 
using emeasure_eq_sum_singleton[of S M]  | 
1707  | 
by (intro measure_eq_emeasure_eq_ennreal) (auto simp: sum_nonneg emeasure_eq_ennreal_measure)  | 
|
| 47694 | 1708  | 
|
1709  | 
lemma Lim_measure_incseq:  | 
|
1710  | 
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
 | 
1711  | 
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
 | 
1712  | 
proof (rule tendsto_ennrealD)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1713  | 
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
 | 
1714  | 
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
 | 
1715  | 
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
 | 
1716  | 
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
 | 
1717  | 
by (intro emeasure_eq_ennreal_measure[symmetric]) (auto simp: less_top UN_upper intro: le_less_trans)  | 
| 
67982
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1718  | 
ultimately show "(\<lambda>x. ennreal (measure M (A x))) \<longlonglongrightarrow> ennreal (measure M (\<Union>i. A i))"  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1719  | 
using A by (auto intro!: Lim_emeasure_incseq)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1720  | 
qed auto  | 
| 47694 | 1721  | 
|
1722  | 
lemma Lim_measure_decseq:  | 
|
1723  | 
assumes A: "range A \<subseteq> sets M" "decseq A" and fin: "\<And>i. emeasure M (A i) \<noteq> \<infinity>"  | 
|
| 61969 | 1724  | 
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
 | 
1725  | 
proof (rule tendsto_ennrealD)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1726  | 
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
 | 
1727  | 
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
 | 
1728  | 
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
 | 
1729  | 
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
 | 
1730  | 
using A fin[of i] by (intro emeasure_eq_ennreal_measure[symmetric]) auto  | 
| 
67982
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1731  | 
ultimately show "(\<lambda>x. ennreal (measure M (A x))) \<longlonglongrightarrow> ennreal (measure M (\<Inter>i. A i))"  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
1732  | 
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
 | 
1733  | 
qed auto  | 
| 47694 | 1734  | 
|
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1735  | 
subsection \<open>Set of measurable sets with finite measure\<close>  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1736  | 
|
| 70136 | 1737  | 
definition\<^marker>\<open>tag important\<close> fmeasurable :: "'a measure \<Rightarrow> 'a set set" where  | 
| 69564 | 1738  | 
"fmeasurable M = {A\<in>sets M. emeasure M A < \<infinity>}"
 | 
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1739  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1740  | 
lemma fmeasurableD[dest, measurable_dest]: "A \<in> fmeasurable M \<Longrightarrow> A \<in> sets M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1741  | 
by (auto simp: fmeasurable_def)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1742  | 
|
| 
63959
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1743  | 
lemma fmeasurableD2: "A \<in> fmeasurable M \<Longrightarrow> emeasure M A \<noteq> top"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1744  | 
by (auto simp: fmeasurable_def)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1745  | 
|
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1746  | 
lemma fmeasurableI: "A \<in> sets M \<Longrightarrow> emeasure M A < \<infinity> \<Longrightarrow> A \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1747  | 
by (auto simp: fmeasurable_def)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1748  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1749  | 
lemma fmeasurableI_null_sets: "A \<in> null_sets M \<Longrightarrow> A \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1750  | 
by (auto simp: fmeasurable_def)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1751  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1752  | 
lemma fmeasurableI2: "A \<in> fmeasurable M \<Longrightarrow> B \<subseteq> A \<Longrightarrow> B \<in> sets M \<Longrightarrow> B \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1753  | 
using emeasure_mono[of B A M] by (auto simp: fmeasurable_def)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1754  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1755  | 
lemma measure_mono_fmeasurable:  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1756  | 
"A \<subseteq> B \<Longrightarrow> A \<in> sets M \<Longrightarrow> B \<in> fmeasurable M \<Longrightarrow> measure M A \<le> measure M B"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1757  | 
by (auto simp: measure_def fmeasurable_def intro!: emeasure_mono enn2real_mono)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1758  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1759  | 
lemma emeasure_eq_measure2: "A \<in> fmeasurable M \<Longrightarrow> emeasure M A = measure M A"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1760  | 
by (simp add: emeasure_eq_ennreal_measure fmeasurable_def less_top)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1761  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1762  | 
interpretation fmeasurable: ring_of_sets "space M" "fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1763  | 
proof (rule ring_of_setsI)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1764  | 
  show "fmeasurable M \<subseteq> Pow (space M)" "{} \<in> fmeasurable M"
 | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1765  | 
by (auto simp: fmeasurable_def dest: sets.sets_into_space)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1766  | 
fix a b assume *: "a \<in> fmeasurable M" "b \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1767  | 
then have "emeasure M (a \<union> b) \<le> emeasure M a + emeasure M b"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1768  | 
by (intro emeasure_subadditive) auto  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1769  | 
also have "\<dots> < top"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1770  | 
using * by (auto simp: fmeasurable_def)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1771  | 
finally show "a \<union> b \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1772  | 
using * by (auto intro: fmeasurableI)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1773  | 
show "a - b \<in> fmeasurable M"  | 
| 69286 | 1774  | 
using emeasure_mono[of "a - b" a M] * by (auto simp: fmeasurable_def)  | 
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1775  | 
qed  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1776  | 
|
| 70136 | 1777  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Measurable sets formed by unions and intersections\<close>  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1778  | 
|
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1779  | 
lemma fmeasurable_Diff: "A \<in> fmeasurable M \<Longrightarrow> B \<in> sets M \<Longrightarrow> A - B \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1780  | 
using fmeasurableI2[of A M "A - B"] by auto  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1781  | 
|
| 
67673
 
c8caefb20564
lots of new material, ultimately related to measure theory
 
paulson <lp15@cam.ac.uk> 
parents: 
67399 
diff
changeset
 | 
1782  | 
lemma fmeasurable_Int_fmeasurable:  | 
| 
 
c8caefb20564
lots of new material, ultimately related to measure theory
 
paulson <lp15@cam.ac.uk> 
parents: 
67399 
diff
changeset
 | 
1783  | 
"\<lbrakk>S \<in> fmeasurable M; T \<in> sets M\<rbrakk> \<Longrightarrow> (S \<inter> T) \<in> fmeasurable M"  | 
| 
 
c8caefb20564
lots of new material, ultimately related to measure theory
 
paulson <lp15@cam.ac.uk> 
parents: 
67399 
diff
changeset
 | 
1784  | 
by (meson fmeasurableD fmeasurableI2 inf_le1 sets.Int)  | 
| 
 
c8caefb20564
lots of new material, ultimately related to measure theory
 
paulson <lp15@cam.ac.uk> 
parents: 
67399 
diff
changeset
 | 
1785  | 
|
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1786  | 
lemma fmeasurable_UN:  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1787  | 
assumes "countable I" "\<And>i. i \<in> I \<Longrightarrow> F i \<subseteq> A" "\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M" "A \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1788  | 
shows "(\<Union>i\<in>I. F i) \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1789  | 
proof (rule fmeasurableI2)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1790  | 
show "A \<in> fmeasurable M" "(\<Union>i\<in>I. F i) \<subseteq> A" using assms by auto  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1791  | 
show "(\<Union>i\<in>I. F i) \<in> sets M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1792  | 
using assms by (intro sets.countable_UN') auto  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1793  | 
qed  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1794  | 
|
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1795  | 
lemma fmeasurable_INT:  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1796  | 
assumes "countable I" "i \<in> I" "\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M" "F i \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1797  | 
shows "(\<Inter>i\<in>I. F i) \<in> fmeasurable M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1798  | 
proof (rule fmeasurableI2)  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1799  | 
show "F i \<in> fmeasurable M" "(\<Inter>i\<in>I. F i) \<subseteq> F i"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1800  | 
using assms by auto  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1801  | 
show "(\<Inter>i\<in>I. F i) \<in> sets M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1802  | 
using assms by (intro sets.countable_INT') auto  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1803  | 
qed  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
1804  | 
|
| 
67982
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1805  | 
lemma measurable_measure_Diff:  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1806  | 
assumes "A \<in> fmeasurable M" "B \<in> sets M" "B \<subseteq> A"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1807  | 
shows "measure M (A - B) = measure M A - measure M B"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1808  | 
by (simp add: assms fmeasurableD fmeasurableD2 measure_Diff)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1809  | 
|
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1810  | 
lemma measurable_Un_null_set:  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1811  | 
assumes "B \<in> null_sets M"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1812  | 
shows "(A \<union> B \<in> fmeasurable M \<and> A \<in> sets M) \<longleftrightarrow> A \<in> fmeasurable M"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1813  | 
using assms by (fastforce simp add: fmeasurable.Un fmeasurableI_null_sets intro: fmeasurableI2)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1814  | 
|
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1815  | 
lemma measurable_Diff_null_set:  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1816  | 
assumes "B \<in> null_sets M"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1817  | 
shows "(A - B) \<in> fmeasurable M \<and> A \<in> sets M \<longleftrightarrow> A \<in> fmeasurable M"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1818  | 
using assms  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1819  | 
by (metis Un_Diff_cancel2 fmeasurable.Diff fmeasurableD fmeasurableI_null_sets measurable_Un_null_set)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1820  | 
|
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1821  | 
lemma fmeasurable_Diff_D:  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1822  | 
assumes m: "T - S \<in> fmeasurable M" "S \<in> fmeasurable M" and sub: "S \<subseteq> T"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1823  | 
shows "T \<in> fmeasurable M"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1824  | 
proof -  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1825  | 
have "T = S \<union> (T - S)"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1826  | 
using assms by blast  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1827  | 
then show ?thesis  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1828  | 
by (metis m fmeasurable.Un)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1829  | 
qed  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1830  | 
|
| 
63959
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1831  | 
lemma measure_Un2:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1832  | 
"A \<in> fmeasurable M \<Longrightarrow> B \<in> fmeasurable M \<Longrightarrow> measure M (A \<union> B) = measure M A + measure M (B - A)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1833  | 
using measure_Union[of M A "B - A"] by (auto simp: fmeasurableD2 fmeasurable.Diff)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1834  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1835  | 
lemma measure_Un3:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1836  | 
assumes "A \<in> fmeasurable M" "B \<in> fmeasurable M"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1837  | 
shows "measure M (A \<union> B) = measure M A + measure M B - measure M (A \<inter> B)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1838  | 
proof -  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1839  | 
have "measure M (A \<union> B) = measure M A + measure M (B - A)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1840  | 
using assms by (rule measure_Un2)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1841  | 
also have "B - A = B - (A \<inter> B)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1842  | 
by auto  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1843  | 
also have "measure M (B - (A \<inter> B)) = measure M B - measure M (A \<inter> B)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1844  | 
using assms by (intro measure_Diff) (auto simp: fmeasurable_def)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1845  | 
finally show ?thesis  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1846  | 
by simp  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1847  | 
qed  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1848  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1849  | 
lemma measure_Un_AE:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1850  | 
"AE x in M. x \<notin> A \<or> x \<notin> B \<Longrightarrow> A \<in> fmeasurable M \<Longrightarrow> B \<in> fmeasurable M \<Longrightarrow>  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1851  | 
measure M (A \<union> B) = measure M A + measure M B"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1852  | 
by (subst measure_Un2) (auto intro!: measure_eq_AE)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1853  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1854  | 
lemma measure_UNION_AE:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1855  | 
assumes I: "finite I"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1856  | 
shows "(\<And>i. i \<in> I \<Longrightarrow> F i \<in> fmeasurable M) \<Longrightarrow> pairwise (\<lambda>i j. AE x in M. x \<notin> F i \<or> x \<notin> F j) I \<Longrightarrow>  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1857  | 
measure M (\<Union>i\<in>I. F i) = (\<Sum>i\<in>I. measure M (F i))"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1858  | 
unfolding AE_pairwise[OF countable_finite, OF I]  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1859  | 
using I  | 
| 
67982
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1860  | 
proof (induction I rule: finite_induct)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1861  | 
case (insert x I)  | 
| 69313 | 1862  | 
have "measure M (F x \<union> \<Union>(F ` I)) = measure M (F x) + measure M (\<Union>(F ` I))"  | 
| 
67982
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1863  | 
by (rule measure_Un_AE) (use insert in \<open>auto simp: pairwise_insert\<close>)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1864  | 
with insert show ?case  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1865  | 
by (simp add: pairwise_insert )  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
1866  | 
qed simp  | 
| 
63959
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1867  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1868  | 
lemma measure_UNION':  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1869  | 
"finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> F i \<in> fmeasurable M) \<Longrightarrow> pairwise (\<lambda>i j. disjnt (F i) (F j)) I \<Longrightarrow>  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1870  | 
measure M (\<Union>i\<in>I. F i) = (\<Sum>i\<in>I. measure M (F i))"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1871  | 
by (intro measure_UNION_AE) (auto simp: disjnt_def elim!: pairwise_mono intro!: always_eventually)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1872  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1873  | 
lemma measure_Union_AE:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1874  | 
"finite F \<Longrightarrow> (\<And>S. S \<in> F \<Longrightarrow> S \<in> fmeasurable M) \<Longrightarrow> pairwise (\<lambda>S T. AE x in M. x \<notin> S \<or> x \<notin> T) F \<Longrightarrow>  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1875  | 
measure M (\<Union>F) = (\<Sum>S\<in>F. measure M S)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1876  | 
using measure_UNION_AE[of F "\<lambda>x. x" M] by simp  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1877  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1878  | 
lemma measure_Union':  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1879  | 
"finite F \<Longrightarrow> (\<And>S. S \<in> F \<Longrightarrow> S \<in> fmeasurable M) \<Longrightarrow> pairwise disjnt F \<Longrightarrow> measure M (\<Union>F) = (\<Sum>S\<in>F. measure M S)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1880  | 
using measure_UNION'[of F "\<lambda>x. x" M] by simp  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1881  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1882  | 
lemma measure_Un_le:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1883  | 
assumes "A \<in> sets M" "B \<in> sets M" shows "measure M (A \<union> B) \<le> measure M A + measure M B"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1884  | 
proof cases  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1885  | 
assume "A \<in> fmeasurable M \<and> B \<in> fmeasurable M"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1886  | 
with measure_subadditive[of A M B] assms show ?thesis  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1887  | 
by (auto simp: fmeasurableD2)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1888  | 
next  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1889  | 
assume "\<not> (A \<in> fmeasurable M \<and> B \<in> fmeasurable M)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1890  | 
then have "A \<union> B \<notin> fmeasurable M"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1891  | 
using fmeasurableI2[of "A \<union> B" M A] fmeasurableI2[of "A \<union> B" M B] assms by auto  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1892  | 
with assms show ?thesis  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1893  | 
by (auto simp: fmeasurable_def measure_def less_top[symmetric])  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1894  | 
qed  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1895  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1896  | 
lemma measure_UNION_le:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1897  | 
"finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> measure M (\<Union>i\<in>I. F i) \<le> (\<Sum>i\<in>I. measure M (F i))"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1898  | 
proof (induction I rule: finite_induct)  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1899  | 
case (insert i I)  | 
| 
71840
 
8ed78bb0b915
Tuned some proofs in HOL-Analysis
 
Manuel Eberl <eberlm@in.tum.de> 
parents: 
71633 
diff
changeset
 | 
1900  | 
then have "measure M (\<Union>i\<in>insert i I. F i) = measure M (F i \<union> \<Union> (F ` I))"  | 
| 
 
8ed78bb0b915
Tuned some proofs in HOL-Analysis
 
Manuel Eberl <eberlm@in.tum.de> 
parents: 
71633 
diff
changeset
 | 
1901  | 
by simp  | 
| 
 
8ed78bb0b915
Tuned some proofs in HOL-Analysis
 
Manuel Eberl <eberlm@in.tum.de> 
parents: 
71633 
diff
changeset
 | 
1902  | 
also from insert have "measure M (F i \<union> \<Union> (F ` I)) \<le> measure M (F i) + measure M (\<Union> (F ` I))"  | 
| 
 
8ed78bb0b915
Tuned some proofs in HOL-Analysis
 
Manuel Eberl <eberlm@in.tum.de> 
parents: 
71633 
diff
changeset
 | 
1903  | 
by (intro measure_Un_le sets.finite_Union) auto  | 
| 
63959
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1904  | 
also have "measure M (\<Union>i\<in>I. F i) \<le> (\<Sum>i\<in>I. measure M (F i))"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1905  | 
using insert by auto  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1906  | 
finally show ?case  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1907  | 
using insert by simp  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1908  | 
qed simp  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1909  | 
|
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1910  | 
lemma measure_Union_le:  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1911  | 
"finite F \<Longrightarrow> (\<And>S. S \<in> F \<Longrightarrow> S \<in> sets M) \<Longrightarrow> measure M (\<Union>F) \<le> (\<Sum>S\<in>F. measure M S)"  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1912  | 
using measure_UNION_le[of F "\<lambda>x. x" M] by simp  | 
| 
 
f77dca1abf1b
HOL-Analysis: prove that a starlike set is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63958 
diff
changeset
 | 
1913  | 
|
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1914  | 
text\<open>Version for indexed union over a countable set\<close>  | 
| 
63968
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1915  | 
lemma  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1916  | 
assumes "countable I" and I: "\<And>i. i \<in> I \<Longrightarrow> A i \<in> fmeasurable M"  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1917  | 
and bound: "\<And>I'. I' \<subseteq> I \<Longrightarrow> finite I' \<Longrightarrow> measure M (\<Union>i\<in>I'. A i) \<le> B"  | 
| 
63968
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1918  | 
shows fmeasurable_UN_bound: "(\<Union>i\<in>I. A i) \<in> fmeasurable M" (is ?fm)  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1919  | 
and measure_UN_bound: "measure M (\<Union>i\<in>I. A i) \<le> B" (is ?m)  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1920  | 
proof -  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1921  | 
have "B \<ge> 0"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1922  | 
using bound by force  | 
| 
63968
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1923  | 
have "?fm \<and> ?m"  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1924  | 
proof cases  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1925  | 
    assume "I = {}"
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1926  | 
with \<open>B \<ge> 0\<close> show ?thesis  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1927  | 
by simp  | 
| 
63968
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1928  | 
next  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1929  | 
    assume "I \<noteq> {}"
 | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1930  | 
have "(\<Union>i\<in>I. A i) = (\<Union>i. (\<Union>n\<le>i. A (from_nat_into I n)))"  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1931  | 
      by (subst range_from_nat_into[symmetric, OF \<open>I \<noteq> {}\<close> \<open>countable I\<close>]) auto
 | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1932  | 
then have "emeasure M (\<Union>i\<in>I. A i) = emeasure M (\<Union>i. (\<Union>n\<le>i. A (from_nat_into I n)))" by simp  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1933  | 
also have "\<dots> = (SUP i. emeasure M (\<Union>n\<le>i. A (from_nat_into I n)))"  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1934  | 
      using I \<open>I \<noteq> {}\<close>[THEN from_nat_into] by (intro SUP_emeasure_incseq[symmetric]) (fastforce simp: incseq_Suc_iff)+
 | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1935  | 
also have "\<dots> \<le> B"  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1936  | 
proof (intro SUP_least)  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1937  | 
fix i :: nat  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1938  | 
have "emeasure M (\<Union>n\<le>i. A (from_nat_into I n)) = measure M (\<Union>n\<le>i. A (from_nat_into I n))"  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1939  | 
        using I \<open>I \<noteq> {}\<close>[THEN from_nat_into] by (intro emeasure_eq_measure2 fmeasurable.finite_UN) auto
 | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1940  | 
      also have "\<dots> = measure M (\<Union>n\<in>from_nat_into I ` {..i}. A n)"
 | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1941  | 
by simp  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1942  | 
also have "\<dots> \<le> B"  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1943  | 
        by (intro ennreal_leI bound) (auto intro:  from_nat_into[OF \<open>I \<noteq> {}\<close>])
 | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1944  | 
finally show "emeasure M (\<Union>n\<le>i. A (from_nat_into I n)) \<le> ennreal B" .  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1945  | 
qed  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1946  | 
finally have *: "emeasure M (\<Union>i\<in>I. A i) \<le> B" .  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1947  | 
then have ?fm  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1948  | 
using I \<open>countable I\<close> by (intro fmeasurableI conjI) (auto simp: less_top[symmetric] top_unique)  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1949  | 
with * \<open>0\<le>B\<close> show ?thesis  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1950  | 
by (simp add: emeasure_eq_measure2)  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1951  | 
qed  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1952  | 
then show ?fm ?m by auto  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1953  | 
qed  | 
| 
 
4359400adfe7
HOL-Analysis: the image of a negligible set under a Lipschitz continuous function is negligible (based on HOL Light proof ported by L. C. Paulson)
 
hoelzl 
parents: 
63959 
diff
changeset
 | 
1954  | 
|
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1955  | 
text\<open>Version for big union of a countable set\<close>  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1956  | 
lemma  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1957  | 
assumes "countable \<D>"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1958  | 
and meas: "\<And>D. D \<in> \<D> \<Longrightarrow> D \<in> fmeasurable M"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1959  | 
and bound: "\<And>\<E>. \<lbrakk>\<E> \<subseteq> \<D>; finite \<E>\<rbrakk> \<Longrightarrow> measure M (\<Union>\<E>) \<le> B"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1960  | 
shows fmeasurable_Union_bound: "\<Union>\<D> \<in> fmeasurable M" (is ?fm)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1961  | 
and measure_Union_bound: "measure M (\<Union>\<D>) \<le> B" (is ?m)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1962  | 
proof -  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1963  | 
have "B \<ge> 0"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1964  | 
using bound by force  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1965  | 
have "?fm \<and> ?m"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1966  | 
  proof (cases "\<D> = {}")
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1967  | 
case True  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1968  | 
with \<open>B \<ge> 0\<close> show ?thesis  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1969  | 
by auto  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1970  | 
next  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1971  | 
case False  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1972  | 
then obtain D :: "nat \<Rightarrow> 'a set" where D: "\<D> = range D"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1973  | 
using \<open>countable \<D>\<close> uncountable_def by force  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1974  | 
have 1: "\<And>i. D i \<in> fmeasurable M"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1975  | 
by (simp add: D meas)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1976  | 
have 2: "\<And>I'. finite I' \<Longrightarrow> measure M (\<Union>x\<in>I'. D x) \<le> B"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1977  | 
by (simp add: D bound image_subset_iff)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1978  | 
show ?thesis  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1979  | 
unfolding D  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1980  | 
by (intro conjI fmeasurable_UN_bound [OF _ 1 2] measure_UN_bound [OF _ 1 2]) auto  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1981  | 
qed  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1982  | 
then show ?fm ?m by auto  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1983  | 
qed  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1984  | 
|
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1985  | 
text\<open>Version for indexed union over the type of naturals\<close>  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1986  | 
lemma  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1987  | 
fixes S :: "nat \<Rightarrow> 'a set"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1988  | 
assumes S: "\<And>i. S i \<in> fmeasurable M" and B: "\<And>n. measure M (\<Union>i\<le>n. S i) \<le> B"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1989  | 
shows fmeasurable_countable_Union: "(\<Union>i. S i) \<in> fmeasurable M"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1990  | 
and measure_countable_Union_le: "measure M (\<Union>i. S i) \<le> B"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1991  | 
proof -  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1992  | 
have mB: "measure M (\<Union>i\<in>I. S i) \<le> B" if "finite I" for I  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1993  | 
proof -  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1994  | 
have "(\<Union>i\<in>I. S i) \<subseteq> (\<Union>i\<le>Max I. S i)"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1995  | 
using Max_ge that by force  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1996  | 
then have "measure M (\<Union>i\<in>I. S i) \<le> measure M (\<Union>i \<le> Max I. S i)"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1997  | 
by (rule measure_mono_fmeasurable) (use S in \<open>blast+\<close>)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1998  | 
then show ?thesis  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
1999  | 
using B order_trans by blast  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
2000  | 
qed  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
2001  | 
show "(\<Union>i. S i) \<in> fmeasurable M"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
2002  | 
by (auto intro: fmeasurable_UN_bound [OF _ S mB])  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
2003  | 
show "measure M (\<Union>n. S n) \<le> B"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
2004  | 
by (auto intro: measure_UN_bound [OF _ S mB])  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
2005  | 
qed  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67982 
diff
changeset
 | 
2006  | 
|
| 
67982
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2007  | 
lemma measure_diff_le_measure_setdiff:  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2008  | 
assumes "S \<in> fmeasurable M" "T \<in> fmeasurable M"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2009  | 
shows "measure M S - measure M T \<le> measure M (S - T)"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2010  | 
proof -  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2011  | 
have "measure M S \<le> measure M ((S - T) \<union> T)"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2012  | 
by (simp add: assms fmeasurable.Un fmeasurableD measure_mono_fmeasurable)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2013  | 
also have "\<dots> \<le> measure M (S - T) + measure M T"  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2014  | 
using assms by (blast intro: measure_Un_le)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2015  | 
finally show ?thesis  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2016  | 
by (simp add: algebra_simps)  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2017  | 
qed  | 
| 
 
7643b005b29a
various new results on measures, integrals, etc., and some simplified proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
67962 
diff
changeset
 | 
2018  | 
|
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2019  | 
lemma suminf_exist_split2:  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2020  | 
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2021  | 
assumes "summable f"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2022  | 
shows "(\<lambda>n. (\<Sum>k. f(k+n))) \<longlonglongrightarrow> 0"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2023  | 
by (subst lim_sequentially, auto simp add: dist_norm suminf_exist_split[OF _ assms])  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2024  | 
|
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2025  | 
lemma emeasure_union_summable:  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2026  | 
assumes [measurable]: "\<And>n. A n \<in> sets M"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2027  | 
and "\<And>n. emeasure M (A n) < \<infinity>" "summable (\<lambda>n. measure M (A n))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2028  | 
shows "emeasure M (\<Union>n. A n) < \<infinity>" "emeasure M (\<Union>n. A n) \<le> (\<Sum>n. measure M (A n))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2029  | 
proof -  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2030  | 
  define B where "B = (\<lambda>N. (\<Union>n\<in>{..<N}. A n))"
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2031  | 
have [measurable]: "B N \<in> sets M" for N unfolding B_def by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2032  | 
have "(\<lambda>N. emeasure M (B N)) \<longlonglongrightarrow> emeasure M (\<Union>N. B N)"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2033  | 
apply (rule Lim_emeasure_incseq) unfolding B_def by (auto simp add: SUP_subset_mono incseq_def)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2034  | 
moreover have "emeasure M (B N) \<le> ennreal (\<Sum>n. measure M (A n))" for N  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2035  | 
proof -  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2036  | 
    have *: "(\<Sum>n\<in>{..<N}. measure M (A n)) \<le> (\<Sum>n. measure M (A n))"
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2037  | 
using assms(3) measure_nonneg sum_le_suminf by blast  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2038  | 
|
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2039  | 
    have "emeasure M (B N) \<le> (\<Sum>n\<in>{..<N}. emeasure M (A n))"
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2040  | 
unfolding B_def by (rule emeasure_subadditive_finite, auto)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2041  | 
    also have "... = (\<Sum>n\<in>{..<N}. ennreal(measure M (A n)))"
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2042  | 
using assms(2) by (simp add: emeasure_eq_ennreal_measure less_top)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2043  | 
    also have "... = ennreal (\<Sum>n\<in>{..<N}. measure M (A n))"
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2044  | 
by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2045  | 
also have "... \<le> ennreal (\<Sum>n. measure M (A n))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2046  | 
using * by (auto simp: ennreal_leI)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2047  | 
finally show ?thesis by simp  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2048  | 
qed  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2049  | 
ultimately have "emeasure M (\<Union>N. B N) \<le> ennreal (\<Sum>n. measure M (A n))"  | 
| 
68532
 
f8b98d31ad45
Incorporating new/strengthened proofs from Library and AFP entries
 
paulson <lp15@cam.ac.uk> 
parents: 
68484 
diff
changeset
 | 
2050  | 
by (simp add: Lim_bounded)  | 
| 
64283
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2051  | 
then show "emeasure M (\<Union>n. A n) \<le> (\<Sum>n. measure M (A n))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2052  | 
unfolding B_def by (metis UN_UN_flatten UN_lessThan_UNIV)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2053  | 
then show "emeasure M (\<Union>n. A n) < \<infinity>"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2054  | 
by (auto simp: less_top[symmetric] top_unique)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2055  | 
qed  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2056  | 
|
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2057  | 
lemma borel_cantelli_limsup1:  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2058  | 
assumes [measurable]: "\<And>n. A n \<in> sets M"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2059  | 
and "\<And>n. emeasure M (A n) < \<infinity>" "summable (\<lambda>n. measure M (A n))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2060  | 
shows "limsup A \<in> null_sets M"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2061  | 
proof -  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2062  | 
have "emeasure M (limsup A) \<le> 0"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2063  | 
proof (rule LIMSEQ_le_const)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2064  | 
have "(\<lambda>n. (\<Sum>k. measure M (A (k+n)))) \<longlonglongrightarrow> 0" by (rule suminf_exist_split2[OF assms(3)])  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2065  | 
then show "(\<lambda>n. ennreal (\<Sum>k. measure M (A (k+n)))) \<longlonglongrightarrow> 0"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2066  | 
unfolding ennreal_0[symmetric] by (intro tendsto_ennrealI)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2067  | 
have "emeasure M (limsup A) \<le> (\<Sum>k. measure M (A (k+n)))" for n  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2068  | 
proof -  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2069  | 
      have I: "(\<Union>k\<in>{n..}. A k) = (\<Union>k. A (k+n))" by (auto, metis le_add_diff_inverse2, fastforce)
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2070  | 
      have "emeasure M (limsup A) \<le> emeasure M (\<Union>k\<in>{n..}. A k)"
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2071  | 
by (rule emeasure_mono, auto simp add: limsup_INF_SUP)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2072  | 
also have "... = emeasure M (\<Union>k. A (k+n))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2073  | 
using I by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2074  | 
also have "... \<le> (\<Sum>k. measure M (A (k+n)))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2075  | 
apply (rule emeasure_union_summable)  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2076  | 
using assms summable_ignore_initial_segment[OF assms(3), of n] by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2077  | 
finally show ?thesis by simp  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2078  | 
qed  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2079  | 
then show "\<exists>N. \<forall>n\<ge>N. emeasure M (limsup A) \<le> (\<Sum>k. measure M (A (k+n)))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2080  | 
by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2081  | 
qed  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2082  | 
then show ?thesis using assms(1) measurable_limsup by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2083  | 
qed  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2084  | 
|
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2085  | 
lemma borel_cantelli_AE1:  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2086  | 
assumes [measurable]: "\<And>n. A n \<in> sets M"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2087  | 
and "\<And>n. emeasure M (A n) < \<infinity>" "summable (\<lambda>n. measure M (A n))"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2088  | 
shows "AE x in M. eventually (\<lambda>n. x \<in> space M - A n) sequentially"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2089  | 
proof -  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2090  | 
have "AE x in M. x \<notin> limsup A"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2091  | 
using borel_cantelli_limsup1[OF assms] unfolding eventually_ae_filter by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2092  | 
moreover  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2093  | 
  {
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2094  | 
fix x assume "x \<notin> limsup A"  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2095  | 
    then obtain N where "x \<notin> (\<Union>n\<in>{N..}. A n)" unfolding limsup_INF_SUP by blast
 | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2096  | 
then have "eventually (\<lambda>n. x \<notin> A n) sequentially" using eventually_sequentially by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2097  | 
}  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2098  | 
ultimately show ?thesis by auto  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2099  | 
qed  | 
| 
 
979cdfdf7a79
HOL-Probability: move conditional expectation from AFP/Ergodic_Theory
 
hoelzl 
parents: 
64267 
diff
changeset
 | 
2100  | 
|
| 69597 | 2101  | 
subsection \<open>Measure spaces with \<^term>\<open>emeasure M (space M) < \<infinity>\<close>\<close>  | 
| 47694 | 2102  | 
|
| 70136 | 2103  | 
locale\<^marker>\<open>tag important\<close> 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
 | 
2104  | 
assumes finite_emeasure_space: "emeasure M (space M) \<noteq> top"  | 
| 47694 | 2105  | 
|
2106  | 
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
 | 
2107  | 
"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
 | 
2108  | 
  proof qed (auto intro!: exI[of _ "{space M}"])
 | 
| 47694 | 2109  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2110  | 
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
 | 
2111  | 
using finite_emeasure_space emeasure_space[of M A] by (auto simp: top_unique)  | 
| 47694 | 2112  | 
|
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
2113  | 
lemma (in finite_measure) fmeasurable_eq_sets: "fmeasurable M = sets M"  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
2114  | 
by (auto simp: fmeasurable_def less_top[symmetric])  | 
| 
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
2115  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2116  | 
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
 | 
2117  | 
by (intro emeasure_eq_ennreal_measure) simp  | 
| 47694 | 2118  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2119  | 
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
 | 
2120  | 
using emeasure_finite[of A] by (cases "emeasure M A" rule: ennreal_cases) auto  | 
| 47694 | 2121  | 
|
2122  | 
lemma (in finite_measure) bounded_measure: "measure M A \<le> measure M (space M)"  | 
|
2123  | 
using emeasure_space[of M A] emeasure_real[of A] emeasure_real[of "space M"] by (auto simp: measure_def)  | 
|
2124  | 
||
2125  | 
lemma (in finite_measure) finite_measure_Diff:  | 
|
2126  | 
assumes sets: "A \<in> sets M" "B \<in> sets M" and "B \<subseteq> A"  | 
|
2127  | 
shows "measure M (A - B) = measure M A - measure M B"  | 
|
2128  | 
using measure_Diff[OF _ assms] by simp  | 
|
2129  | 
||
2130  | 
lemma (in finite_measure) finite_measure_Union:  | 
|
2131  | 
  assumes sets: "A \<in> sets M" "B \<in> sets M" and "A \<inter> B = {}"
 | 
|
2132  | 
shows "measure M (A \<union> B) = measure M A + measure M B"  | 
|
2133  | 
using measure_Union[OF _ _ assms] by simp  | 
|
2134  | 
||
2135  | 
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
 | 
2136  | 
assumes measurable: "finite S" "A`S \<subseteq> sets M" "disjoint_family_on A S"  | 
| 47694 | 2137  | 
shows "measure M (\<Union>i\<in>S. A i) = (\<Sum>i\<in>S. measure M (A i))"  | 
2138  | 
using measure_finite_Union[OF assms] by simp  | 
|
2139  | 
||
2140  | 
lemma (in finite_measure) finite_measure_UNION:  | 
|
2141  | 
assumes A: "range A \<subseteq> sets M" "disjoint_family A"  | 
|
2142  | 
shows "(\<lambda>i. measure M (A i)) sums (measure M (\<Union>i. A i))"  | 
|
2143  | 
using measure_UNION[OF A] by simp  | 
|
2144  | 
||
2145  | 
lemma (in finite_measure) finite_measure_mono:  | 
|
2146  | 
assumes "A \<subseteq> B" "B \<in> sets M" shows "measure M A \<le> measure M B"  | 
|
2147  | 
using emeasure_mono[OF assms] emeasure_real[of A] emeasure_real[of B] by (auto simp: measure_def)  | 
|
2148  | 
||
2149  | 
lemma (in finite_measure) finite_measure_subadditive:  | 
|
2150  | 
assumes m: "A \<in> sets M" "B \<in> sets M"  | 
|
2151  | 
shows "measure M (A \<union> B) \<le> measure M A + measure M B"  | 
|
2152  | 
using measure_subadditive[OF m] by simp  | 
|
2153  | 
||
2154  | 
lemma (in finite_measure) finite_measure_subadditive_finite:  | 
|
2155  | 
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))"  | 
|
2156  | 
using measure_subadditive_finite[OF assms] by simp  | 
|
2157  | 
||
2158  | 
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
 | 
2159  | 
"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
 | 
2160  | 
by (rule measure_subadditive_countably)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2161  | 
(simp_all add: ennreal_suminf_neq_top emeasure_eq_measure)  | 
| 47694 | 2162  | 
|
| 64267 | 2163  | 
lemma (in finite_measure) finite_measure_eq_sum_singleton:  | 
| 47694 | 2164  | 
  assumes "finite S" and *: "\<And>x. x \<in> S \<Longrightarrow> {x} \<in> sets M"
 | 
2165  | 
  shows "measure M S = (\<Sum>x\<in>S. measure M {x})"
 | 
|
| 64267 | 2166  | 
using measure_eq_sum_singleton[OF assms] by simp  | 
| 47694 | 2167  | 
|
2168  | 
lemma (in finite_measure) finite_Lim_measure_incseq:  | 
|
2169  | 
assumes A: "range A \<subseteq> sets M" "incseq A"  | 
|
| 61969 | 2170  | 
shows "(\<lambda>i. measure M (A i)) \<longlonglongrightarrow> measure M (\<Union>i. A i)"  | 
| 47694 | 2171  | 
using Lim_measure_incseq[OF A] by simp  | 
2172  | 
||
2173  | 
lemma (in finite_measure) finite_Lim_measure_decseq:  | 
|
2174  | 
assumes A: "range A \<subseteq> sets M" "decseq A"  | 
|
| 61969 | 2175  | 
shows "(\<lambda>n. measure M (A n)) \<longlonglongrightarrow> measure M (\<Inter>i. A i)"  | 
| 47694 | 2176  | 
using Lim_measure_decseq[OF A] by simp  | 
2177  | 
||
2178  | 
lemma (in finite_measure) finite_measure_compl:  | 
|
2179  | 
assumes S: "S \<in> sets M"  | 
|
2180  | 
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
 | 
2181  | 
using measure_Diff[OF _ sets.top S sets.sets_into_space] S by simp  | 
| 47694 | 2182  | 
|
2183  | 
lemma (in finite_measure) finite_measure_mono_AE:  | 
|
2184  | 
assumes imp: "AE x in M. x \<in> A \<longrightarrow> x \<in> B" and B: "B \<in> sets M"  | 
|
2185  | 
shows "measure M A \<le> measure M B"  | 
|
2186  | 
using assms emeasure_mono_AE[OF imp B]  | 
|
2187  | 
by (simp add: emeasure_eq_measure)  | 
|
2188  | 
||
2189  | 
lemma (in finite_measure) finite_measure_eq_AE:  | 
|
2190  | 
assumes iff: "AE x in M. x \<in> A \<longleftrightarrow> x \<in> B"  | 
|
2191  | 
assumes A: "A \<in> sets M" and B: "B \<in> sets M"  | 
|
2192  | 
shows "measure M A = measure M B"  | 
|
2193  | 
using assms emeasure_eq_AE[OF assms] by (simp add: emeasure_eq_measure)  | 
|
2194  | 
||
| 50104 | 2195  | 
lemma (in finite_measure) measure_increasing: "increasing M (measure M)"  | 
2196  | 
by (auto intro!: finite_measure_mono simp: increasing_def)  | 
|
2197  | 
||
2198  | 
lemma (in finite_measure) measure_zero_union:  | 
|
2199  | 
assumes "s \<in> sets M" "t \<in> sets M" "measure M t = 0"  | 
|
2200  | 
shows "measure M (s \<union> t) = measure M s"  | 
|
2201  | 
using assms  | 
|
2202  | 
proof -  | 
|
2203  | 
have "measure M (s \<union> t) \<le> measure M s"  | 
|
2204  | 
using finite_measure_subadditive[of s t] assms by auto  | 
|
2205  | 
moreover have "measure M (s \<union> t) \<ge> measure M s"  | 
|
2206  | 
using assms by (blast intro: finite_measure_mono)  | 
|
2207  | 
ultimately show ?thesis by simp  | 
|
2208  | 
qed  | 
|
2209  | 
||
2210  | 
lemma (in finite_measure) measure_eq_compl:  | 
|
2211  | 
assumes "s \<in> sets M" "t \<in> sets M"  | 
|
2212  | 
assumes "measure M (space M - s) = measure M (space M - t)"  | 
|
2213  | 
shows "measure M s = measure M t"  | 
|
2214  | 
using assms finite_measure_compl by auto  | 
|
2215  | 
||
2216  | 
lemma (in finite_measure) measure_eq_bigunion_image:  | 
|
2217  | 
assumes "range f \<subseteq> sets M" "range g \<subseteq> sets M"  | 
|
2218  | 
assumes "disjoint_family f" "disjoint_family g"  | 
|
2219  | 
assumes "\<And> n :: nat. measure M (f n) = measure M (g n)"  | 
|
| 60585 | 2220  | 
shows "measure M (\<Union>i. f i) = measure M (\<Union>i. g i)"  | 
| 50104 | 2221  | 
using assms  | 
2222  | 
proof -  | 
|
| 60585 | 2223  | 
have a: "(\<lambda> i. measure M (f i)) sums (measure M (\<Union>i. f i))"  | 
| 50104 | 2224  | 
by (rule finite_measure_UNION[OF assms(1,3)])  | 
| 60585 | 2225  | 
have b: "(\<lambda> i. measure M (g i)) sums (measure M (\<Union>i. g i))"  | 
| 50104 | 2226  | 
by (rule finite_measure_UNION[OF assms(2,4)])  | 
2227  | 
show ?thesis using sums_unique[OF b] sums_unique[OF a] assms by simp  | 
|
2228  | 
qed  | 
|
2229  | 
||
2230  | 
lemma (in finite_measure) measure_countably_zero:  | 
|
2231  | 
assumes "range c \<subseteq> sets M"  | 
|
2232  | 
assumes "\<And> i. measure M (c i) = 0"  | 
|
| 60585 | 2233  | 
shows "measure M (\<Union>i :: nat. c i) = 0"  | 
| 50104 | 2234  | 
proof (rule antisym)  | 
| 60585 | 2235  | 
show "measure M (\<Union>i :: nat. c i) \<le> 0"  | 
| 50104 | 2236  | 
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
 | 
2237  | 
qed simp  | 
| 50104 | 2238  | 
|
2239  | 
lemma (in finite_measure) measure_space_inter:  | 
|
2240  | 
assumes events:"s \<in> sets M" "t \<in> sets M"  | 
|
2241  | 
assumes "measure M t = measure M (space M)"  | 
|
2242  | 
shows "measure M (s \<inter> t) = measure M s"  | 
|
2243  | 
proof -  | 
|
2244  | 
have "measure M ((space M - s) \<union> (space M - t)) = measure M (space M - s)"  | 
|
2245  | 
using events assms finite_measure_compl[of "t"] by (auto intro!: measure_zero_union)  | 
|
2246  | 
also have "(space M - s) \<union> (space M - t) = space M - (s \<inter> t)"  | 
|
2247  | 
by blast  | 
|
2248  | 
finally show "measure M (s \<inter> t) = measure M s"  | 
|
2249  | 
using events by (auto intro!: measure_eq_compl[of "s \<inter> t" s])  | 
|
2250  | 
qed  | 
|
2251  | 
||
2252  | 
lemma (in finite_measure) measure_equiprobable_finite_unions:  | 
|
2253  | 
  assumes s: "finite s" "\<And>x. x \<in> s \<Longrightarrow> {x} \<in> sets M"
 | 
|
2254  | 
  assumes "\<And> x y. \<lbrakk>x \<in> s; y \<in> s\<rbrakk> \<Longrightarrow> measure M {x} = measure M {y}"
 | 
|
2255  | 
  shows "measure M s = real (card s) * measure M {SOME x. x \<in> s}"
 | 
|
2256  | 
proof cases  | 
|
2257  | 
  assume "s \<noteq> {}"
 | 
|
2258  | 
then have "\<exists> x. x \<in> s" by blast  | 
|
2259  | 
from someI_ex[OF this] assms  | 
|
2260  | 
  have prob_some: "\<And> x. x \<in> s \<Longrightarrow> measure M {x} = measure M {SOME y. y \<in> s}" by blast
 | 
|
2261  | 
  have "measure M s = (\<Sum> x \<in> s. measure M {x})"
 | 
|
| 64267 | 2262  | 
using finite_measure_eq_sum_singleton[OF s] by simp  | 
| 50104 | 2263  | 
  also have "\<dots> = (\<Sum> x \<in> s. measure M {SOME y. y \<in> s})" using prob_some by auto
 | 
2264  | 
  also have "\<dots> = real (card s) * measure M {(SOME x. x \<in> s)}"
 | 
|
| 64267 | 2265  | 
using sum_constant assms by simp  | 
| 50104 | 2266  | 
finally show ?thesis by simp  | 
2267  | 
qed simp  | 
|
2268  | 
||
2269  | 
lemma (in finite_measure) measure_real_sum_image_fn:  | 
|
2270  | 
assumes "e \<in> sets M"  | 
|
2271  | 
assumes "\<And> x. x \<in> s \<Longrightarrow> e \<inter> f x \<in> sets M"  | 
|
2272  | 
assumes "finite s"  | 
|
2273  | 
  assumes disjoint: "\<And> x y. \<lbrakk>x \<in> s ; y \<in> s ; x \<noteq> y\<rbrakk> \<Longrightarrow> f x \<inter> f y = {}"
 | 
|
| 60585 | 2274  | 
assumes upper: "space M \<subseteq> (\<Union>i \<in> s. f i)"  | 
| 50104 | 2275  | 
shows "measure M e = (\<Sum> x \<in> s. measure M (e \<inter> f x))"  | 
2276  | 
proof -  | 
|
| 
62343
 
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
 
haftmann 
parents: 
61969 
diff
changeset
 | 
2277  | 
have "e \<subseteq> (\<Union>i\<in>s. f i)"  | 
| 61808 | 2278  | 
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
 | 
2279  | 
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
 | 
2280  | 
by auto  | 
| 60585 | 2281  | 
hence "measure M e = measure M (\<Union>i \<in> s. e \<inter> f i)" by simp  | 
| 50104 | 2282  | 
also have "\<dots> = (\<Sum> x \<in> s. measure M (e \<inter> f x))"  | 
2283  | 
proof (rule finite_measure_finite_Union)  | 
|
2284  | 
show "finite s" by fact  | 
|
2285  | 
show "(\<lambda>i. e \<inter> f i)`s \<subseteq> sets M" using assms(2) by auto  | 
|
2286  | 
show "disjoint_family_on (\<lambda>i. e \<inter> f i) s"  | 
|
2287  | 
using disjoint by (auto simp: disjoint_family_on_def)  | 
|
2288  | 
qed  | 
|
2289  | 
finally show ?thesis .  | 
|
2290  | 
qed  | 
|
2291  | 
||
2292  | 
lemma (in finite_measure) measure_exclude:  | 
|
2293  | 
assumes "A \<in> sets M" "B \<in> sets M"  | 
|
2294  | 
  assumes "measure M A = measure M (space M)" "A \<inter> B = {}"
 | 
|
2295  | 
shows "measure M B = 0"  | 
|
2296  | 
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
 | 
2297  | 
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
 | 
2298  | 
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
 | 
2299  | 
shows "finite_measure (distr M M' f)"  | 
| 
 
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
 
hoelzl 
parents: 
57137 
diff
changeset
 | 
2300  | 
proof (rule finite_measureI)  | 
| 
 
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
 
hoelzl 
parents: 
57137 
diff
changeset
 | 
2301  | 
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
 | 
2302  | 
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
 | 
2303  | 
qed  | 
| 
 
b0b9a10e4bf4
properties of Erlang and exponentially distributed random variables (by Sudeep Kanav)
 
hoelzl 
parents: 
57137 
diff
changeset
 | 
2304  | 
|
| 
60636
 
ee18efe9b246
add named theorems order_continuous_intros; lfp/gfp_funpow; bounded variant for lfp/gfp transfer
 
hoelzl 
parents: 
60585 
diff
changeset
 | 
2305  | 
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
 | 
2306  | 
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
 | 
2307  | 
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
 | 
2308  | 
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
 | 
2309  | 
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
 | 
2310  | 
  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
 | 
2311  | 
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
 | 
2312  | 
  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
 | 
2313  | 
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
 | 
2314  | 
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
 | 
2315  | 
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
 | 
2316  | 
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
 | 
2317  | 
  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
 | 
2318  | 
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
 | 
2319  | 
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
 | 
2320  | 
next  | 
| 
 
ee18efe9b246
add named theorems order_continuous_intros; lfp/gfp_funpow; bounded variant for lfp/gfp transfer
 
hoelzl 
parents: 
60585 
diff
changeset
 | 
2321  | 
  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
 | 
2322  | 
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
 | 
2323  | 
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
 | 
2324  | 
|
| 70136 | 2325  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Counting space\<close>  | 
| 47694 | 2326  | 
|
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2327  | 
lemma strict_monoI_Suc:  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2328  | 
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
 | 
2329  | 
unfolding strict_mono_def  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2330  | 
proof safe  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2331  | 
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
 | 
2332  | 
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
 | 
2333  | 
qed  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2334  | 
|
| 47694 | 2335  | 
lemma emeasure_count_space:  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2336  | 
assumes "X \<subseteq> A" shows "emeasure (count_space A) X = (if finite X then of_nat (card X) else \<infinity>)"  | 
| 47694 | 2337  | 
(is "_ = ?M X")  | 
2338  | 
unfolding count_space_def  | 
|
2339  | 
proof (rule emeasure_measure_of_sigma)  | 
|
| 61808 | 2340  | 
show "X \<in> Pow A" using \<open>X \<subseteq> A\<close> by auto  | 
| 47694 | 2341  | 
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
 | 
2342  | 
show positive: "positive (Pow A) ?M"  | 
| 47694 | 2343  | 
by (auto simp: positive_def)  | 
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2344  | 
have additive: "additive (Pow A) ?M"  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2345  | 
by (auto simp: card_Un_disjoint additive_def)  | 
| 47694 | 2346  | 
|
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2347  | 
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
 | 
2348  | 
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
 | 
2349  | 
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
 | 
2350  | 
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
 | 
2351  | 
proof safe  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2352  | 
fix F :: "nat \<Rightarrow> 'a set" assume "incseq F"  | 
| 61969 | 2353  | 
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
 | 
2354  | 
proof cases  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2355  | 
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
 | 
2356  | 
then guess i .. note i = this  | 
| 61808 | 2357  | 
      { 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
 | 
2358  | 
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
 | 
2359  | 
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
 | 
2360  | 
by auto  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2361  | 
with i show ?thesis  | 
| 
70532
 
fcf3b891ccb1
new material; rotated premises of Lim_transform_eventually
 
paulson <lp15@cam.ac.uk> 
parents: 
70380 
diff
changeset
 | 
2362  | 
by (auto intro!: Lim_transform_eventually[OF tendsto_const] eventually_sequentiallyI[where c=i])  | 
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2363  | 
next  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2364  | 
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
 | 
2365  | 
then obtain f where f: "\<And>i. i \<le> f i" "\<And>i. F i \<noteq> F (f i)" by metis  | 
| 61808 | 2366  | 
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
 | 
2367  | 
with f have *: "\<And>i. F i \<subset> F (f i)" by auto  | 
| 47694 | 2368  | 
|
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2369  | 
have "incseq (\<lambda>i. ?M (F i))"  | 
| 61808 | 2370  | 
using \<open>incseq F\<close> unfolding incseq_def by (auto simp: card_mono dest: finite_subset)  | 
| 61969 | 2371  | 
then have "(\<lambda>i. ?M (F i)) \<longlonglongrightarrow> (SUP n. ?M (F n))"  | 
| 51000 | 2372  | 
by (rule LIMSEQ_SUP)  | 
| 47694 | 2373  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2374  | 
moreover have "(SUP n. ?M (F n)) = top"  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2375  | 
proof (rule ennreal_SUP_eq_top)  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2376  | 
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
 | 
2377  | 
proof (induct n)  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2378  | 
case (Suc n)  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2379  | 
then guess k .. note k = this  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2380  | 
moreover have "finite (F k) \<Longrightarrow> finite (F (f k)) \<Longrightarrow> card (F k) < card (F (f k))"  | 
| 61808 | 2381  | 
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
 | 
2382  | 
moreover have "finite (F (f k)) \<Longrightarrow> finite (F k)"  | 
| 61808 | 2383  | 
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
 | 
2384  | 
ultimately show ?case  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2385  | 
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
 | 
2386  | 
qed auto  | 
| 47694 | 2387  | 
qed  | 
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2388  | 
|
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2389  | 
moreover  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2390  | 
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
 | 
2391  | 
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
 | 
2392  | 
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
 | 
2393  | 
by (rule range_inj_infinite)  | 
| 
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2394  | 
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
 | 
2395  | 
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
 | 
2396  | 
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
 | 
2397  | 
by auto  | 
| 69661 | 2398  | 
ultimately show ?thesis by (simp only:) simp  | 
2399  | 
||
| 
49773
 
16907431e477
tuned measurable_If; moved countably_additive equalities to Measure_Space; tuned proofs
 
hoelzl 
parents: 
47762 
diff
changeset
 | 
2400  | 
qed  | 
| 47694 | 2401  | 
qed  | 
2402  | 
qed  | 
|
2403  | 
||
| 
59011
 
4902a2fec434
add reindex rules for distr and nn_integral on count_space
 
hoelzl 
parents: 
59000 
diff
changeset
 | 
2404  | 
lemma distr_bij_count_space:  | 
| 
 
4902a2fec434
add reindex rules for distr and nn_integral on count_space
 
hoelzl 
parents: 
59000 
diff
changeset
 | 
2405  | 
assumes f: "bij_betw f A B"  | 
| 
 
4902a2fec434
add reindex rules for distr and nn_integral on count_space
 
hoelzl 
parents: 
59000 
diff
changeset
 | 
2406  | 
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
 | 
2407  | 
proof (rule measure_eqI)  | 
| 
 
4902a2fec434
add reindex rules for distr and nn_integral on count_space
 
hoelzl 
parents: 
59000 
diff
changeset
 | 
2408  | 
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
 | 
2409  | 
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
 | 
2410  | 
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
 | 
2411  | 
then have X: "X \<in> sets (count_space B)" by auto  | 
| 63540 | 2412  | 
moreover from X have "f -` X \<inter> A = the_inv_into A f ` X"  | 
| 
59011
 
4902a2fec434
add reindex rules for distr and nn_integral on count_space
 
hoelzl 
parents: 
59000 
diff
changeset
 | 
2413  | 
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
 | 
2414  | 
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
 | 
2415  | 
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
 | 
2416  | 
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
 | 
2417  | 
by (auto intro: subset_inj_on)  | 
| 
 
4902a2fec434
add reindex rules for distr and nn_integral on count_space
 
hoelzl 
parents: 
59000 
diff
changeset
 | 
2418  | 
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
 | 
2419  | 
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
 | 
2420  | 
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
 | 
2421  | 
qed simp  | 
| 
 
4902a2fec434
add reindex rules for distr and nn_integral on count_space
 
hoelzl 
parents: 
59000 
diff
changeset
 | 
2422  | 
|
| 47694 | 2423  | 
lemma emeasure_count_space_finite[simp]:  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2424  | 
"X \<subseteq> A \<Longrightarrow> finite X \<Longrightarrow> emeasure (count_space A) X = of_nat (card X)"  | 
| 47694 | 2425  | 
using emeasure_count_space[of X A] by simp  | 
2426  | 
||
2427  | 
lemma emeasure_count_space_infinite[simp]:  | 
|
2428  | 
"X \<subseteq> A \<Longrightarrow> infinite X \<Longrightarrow> emeasure (count_space A) X = \<infinity>"  | 
|
2429  | 
using emeasure_count_space[of X A] by simp  | 
|
2430  | 
||
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2431  | 
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
 | 
2432  | 
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
 | 
2433  | 
measure_zero_top measure_eq_emeasure_eq_ennreal)  | 
| 58606 | 2434  | 
|
| 47694 | 2435  | 
lemma emeasure_count_space_eq_0:  | 
2436  | 
  "emeasure (count_space A) X = 0 \<longleftrightarrow> (X \<subseteq> A \<longrightarrow> X = {})"
 | 
|
2437  | 
proof cases  | 
|
2438  | 
assume X: "X \<subseteq> A"  | 
|
2439  | 
then show ?thesis  | 
|
2440  | 
proof (intro iffI impI)  | 
|
2441  | 
assume "emeasure (count_space A) X = 0"  | 
|
2442  | 
    with X show "X = {}"
 | 
|
| 62390 | 2443  | 
by (subst (asm) emeasure_count_space) (auto split: if_split_asm)  | 
| 47694 | 2444  | 
qed simp  | 
2445  | 
qed (simp add: emeasure_notin_sets)  | 
|
2446  | 
||
2447  | 
lemma null_sets_count_space: "null_sets (count_space A) = { {} }"
 | 
|
2448  | 
unfolding null_sets_def by (auto simp add: emeasure_count_space_eq_0)  | 
|
2449  | 
||
2450  | 
lemma AE_count_space: "(AE x in count_space A. P x) \<longleftrightarrow> (\<forall>x\<in>A. P x)"  | 
|
2451  | 
unfolding eventually_ae_filter by (auto simp add: null_sets_count_space)  | 
|
2452  | 
||
| 57025 | 2453  | 
lemma sigma_finite_measure_count_space_countable:  | 
2454  | 
assumes A: "countable A"  | 
|
| 47694 | 2455  | 
shows "sigma_finite_measure (count_space A)"  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2456  | 
  proof qed (insert A, auto intro!: exI[of _ "(\<lambda>a. {a}) ` A"])
 | 
| 47694 | 2457  | 
|
| 57025 | 2458  | 
lemma sigma_finite_measure_count_space:  | 
2459  | 
fixes A :: "'a::countable set" shows "sigma_finite_measure (count_space A)"  | 
|
2460  | 
by (rule sigma_finite_measure_count_space_countable) auto  | 
|
2461  | 
||
| 47694 | 2462  | 
lemma finite_measure_count_space:  | 
2463  | 
assumes [simp]: "finite A"  | 
|
2464  | 
shows "finite_measure (count_space A)"  | 
|
2465  | 
by rule simp  | 
|
2466  | 
||
2467  | 
lemma sigma_finite_measure_count_space_finite:  | 
|
2468  | 
assumes A: "finite A" shows "sigma_finite_measure (count_space A)"  | 
|
2469  | 
proof -  | 
|
2470  | 
interpret finite_measure "count_space A" using A by (rule finite_measure_count_space)  | 
|
2471  | 
show "sigma_finite_measure (count_space A)" ..  | 
|
2472  | 
qed  | 
|
2473  | 
||
| 70136 | 2474  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Measure restricted to space\<close>  | 
| 54417 | 2475  | 
|
2476  | 
lemma emeasure_restrict_space:  | 
|
| 57025 | 2477  | 
assumes "\<Omega> \<inter> space M \<in> sets M" "A \<subseteq> \<Omega>"  | 
| 54417 | 2478  | 
shows "emeasure (restrict_space M \<Omega>) A = emeasure M A"  | 
| 63540 | 2479  | 
proof (cases "A \<in> sets M")  | 
2480  | 
case True  | 
|
| 57025 | 2481  | 
show ?thesis  | 
| 54417 | 2482  | 
proof (rule emeasure_measure_of[OF restrict_space_def])  | 
| 67399 | 2483  | 
show "(\<inter>) \<Omega> ` sets M \<subseteq> Pow (\<Omega> \<inter> space M)" "A \<in> sets (restrict_space M \<Omega>)"  | 
| 61808 | 2484  | 
using \<open>A \<subseteq> \<Omega>\<close> \<open>A \<in> sets M\<close> sets.space_closed by (auto simp: sets_restrict_space)  | 
| 57025 | 2485  | 
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
 | 
2486  | 
by (auto simp: positive_def)  | 
| 57025 | 2487  | 
show "countably_additive (sets (restrict_space M \<Omega>)) (emeasure M)"  | 
| 54417 | 2488  | 
proof (rule countably_additiveI)  | 
2489  | 
fix A :: "nat \<Rightarrow> _" assume "range A \<subseteq> sets (restrict_space M \<Omega>)" "disjoint_family A"  | 
|
2490  | 
with assms have "\<And>i. A i \<in> sets M" "\<And>i. A i \<subseteq> space M" "disjoint_family A"  | 
|
| 57025 | 2491  | 
by (fastforce simp: sets_restrict_space_iff[OF assms(1)] image_subset_iff  | 
2492  | 
dest: sets.sets_into_space)+  | 
|
2493  | 
then show "(\<Sum>i. emeasure M (A i)) = emeasure M (\<Union>i. A i)"  | 
|
| 54417 | 2494  | 
by (subst suminf_emeasure) (auto simp: disjoint_family_subset)  | 
2495  | 
qed  | 
|
2496  | 
qed  | 
|
2497  | 
next  | 
|
| 63540 | 2498  | 
case False  | 
2499  | 
with assms have "A \<notin> sets (restrict_space M \<Omega>)"  | 
|
| 54417 | 2500  | 
by (simp add: sets_restrict_space_iff)  | 
| 63540 | 2501  | 
with False show ?thesis  | 
| 54417 | 2502  | 
by (simp add: emeasure_notin_sets)  | 
2503  | 
qed  | 
|
2504  | 
||
| 57137 | 2505  | 
lemma measure_restrict_space:  | 
2506  | 
assumes "\<Omega> \<inter> space M \<in> sets M" "A \<subseteq> \<Omega>"  | 
|
2507  | 
shows "measure (restrict_space M \<Omega>) A = measure M A"  | 
|
2508  | 
using emeasure_restrict_space[OF assms] by (simp add: measure_def)  | 
|
2509  | 
||
2510  | 
lemma AE_restrict_space_iff:  | 
|
2511  | 
assumes "\<Omega> \<inter> space M \<in> sets M"  | 
|
2512  | 
shows "(AE x in restrict_space M \<Omega>. P x) \<longleftrightarrow> (AE x in M. x \<in> \<Omega> \<longrightarrow> P x)"  | 
|
2513  | 
proof -  | 
|
2514  | 
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)"  | 
|
2515  | 
by auto  | 
|
2516  | 
  { fix X assume X: "X \<in> sets M" "emeasure M X = 0"
 | 
|
2517  | 
then have "emeasure M (\<Omega> \<inter> space M \<inter> X) \<le> emeasure M X"  | 
|
2518  | 
by (intro emeasure_mono) auto  | 
|
2519  | 
then have "emeasure M (\<Omega> \<inter> space M \<inter> X) = 0"  | 
|
2520  | 
using X by (auto intro!: antisym) }  | 
|
2521  | 
with assms show ?thesis  | 
|
2522  | 
unfolding eventually_ae_filter  | 
|
2523  | 
by (auto simp add: space_restrict_space null_sets_def sets_restrict_space_iff  | 
|
2524  | 
emeasure_restrict_space cong: conj_cong  | 
|
2525  | 
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
 | 
2526  | 
qed  | 
| 57137 | 2527  | 
|
| 57025 | 2528  | 
lemma restrict_restrict_space:  | 
2529  | 
assumes "A \<inter> space M \<in> sets M" "B \<inter> space M \<in> sets M"  | 
|
2530  | 
shows "restrict_space (restrict_space M A) B = restrict_space M (A \<inter> B)" (is "?l = ?r")  | 
|
2531  | 
proof (rule measure_eqI[symmetric])  | 
|
2532  | 
show "sets ?r = sets ?l"  | 
|
2533  | 
unfolding sets_restrict_space image_comp by (intro image_cong) auto  | 
|
2534  | 
next  | 
|
2535  | 
fix X assume "X \<in> sets (restrict_space M (A \<inter> B))"  | 
|
2536  | 
then obtain Y where "Y \<in> sets M" "X = Y \<inter> A \<inter> B"  | 
|
2537  | 
by (auto simp: sets_restrict_space)  | 
|
2538  | 
with assms sets.Int[OF assms] show "emeasure ?r X = emeasure ?l X"  | 
|
2539  | 
by (subst (1 2) emeasure_restrict_space)  | 
|
2540  | 
(auto simp: space_restrict_space sets_restrict_space_iff emeasure_restrict_space ac_simps)  | 
|
2541  | 
qed  | 
|
2542  | 
||
2543  | 
lemma restrict_count_space: "restrict_space (count_space B) A = count_space (A \<inter> B)"  | 
|
| 54417 | 2544  | 
proof (rule measure_eqI)  | 
| 57025 | 2545  | 
show "sets (restrict_space (count_space B) A) = sets (count_space (A \<inter> B))"  | 
2546  | 
by (subst sets_restrict_space) auto  | 
|
| 54417 | 2547  | 
moreover fix X assume "X \<in> sets (restrict_space (count_space B) A)"  | 
| 57025 | 2548  | 
ultimately have "X \<subseteq> A \<inter> B" by auto  | 
2549  | 
then show "emeasure (restrict_space (count_space B) A) X = emeasure (count_space (A \<inter> B)) X"  | 
|
| 54417 | 2550  | 
by (cases "finite X") (auto simp add: emeasure_restrict_space)  | 
2551  | 
qed  | 
|
2552  | 
||
| 60063 | 2553  | 
lemma sigma_finite_measure_restrict_space:  | 
2554  | 
assumes "sigma_finite_measure M"  | 
|
2555  | 
and A: "A \<in> sets M"  | 
|
2556  | 
shows "sigma_finite_measure (restrict_space M A)"  | 
|
2557  | 
proof -  | 
|
2558  | 
interpret sigma_finite_measure M by fact  | 
|
2559  | 
from sigma_finite_countable obtain C  | 
|
2560  | 
where C: "countable C" "C \<subseteq> sets M" "(\<Union>C) = space M" "\<forall>a\<in>C. emeasure M a \<noteq> \<infinity>"  | 
|
2561  | 
by blast  | 
|
| 67399 | 2562  | 
let ?C = "(\<inter>) A ` C"  | 
| 60063 | 2563  | 
from C have "countable ?C" "?C \<subseteq> sets (restrict_space M A)" "(\<Union>?C) = space (restrict_space M A)"  | 
2564  | 
by(auto simp add: sets_restrict_space space_restrict_space)  | 
|
2565  | 
  moreover {
 | 
|
2566  | 
fix a  | 
|
2567  | 
assume "a \<in> ?C"  | 
|
2568  | 
then obtain a' where "a = A \<inter> a'" "a' \<in> C" ..  | 
|
2569  | 
then have "emeasure (restrict_space M A) a \<le> emeasure M a'"  | 
|
2570  | 
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
 | 
2571  | 
also have "\<dots> < \<infinity>" using C(4)[rule_format, of a'] \<open>a' \<in> C\<close> by (simp add: less_top)  | 
| 60063 | 2572  | 
finally have "emeasure (restrict_space M A) a \<noteq> \<infinity>" by simp }  | 
2573  | 
ultimately show ?thesis  | 
|
2574  | 
by unfold_locales (rule exI conjI|assumption|blast)+  | 
|
2575  | 
qed  | 
|
2576  | 
||
2577  | 
lemma finite_measure_restrict_space:  | 
|
2578  | 
assumes "finite_measure M"  | 
|
2579  | 
and A: "A \<in> sets M"  | 
|
2580  | 
shows "finite_measure (restrict_space M A)"  | 
|
2581  | 
proof -  | 
|
2582  | 
interpret finite_measure M by fact  | 
|
2583  | 
show ?thesis  | 
|
2584  | 
by(rule finite_measureI)(simp add: emeasure_restrict_space A space_restrict_space)  | 
|
2585  | 
qed  | 
|
2586  | 
||
| 
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
 | 
2587  | 
lemma restrict_distr:  | 
| 57137 | 2588  | 
assumes [measurable]: "f \<in> measurable M N"  | 
2589  | 
assumes [simp]: "\<Omega> \<inter> space N \<in> sets N" and restrict: "f \<in> space M \<rightarrow> \<Omega>"  | 
|
2590  | 
shows "restrict_space (distr M N f) \<Omega> = distr M (restrict_space N \<Omega>) f"  | 
|
2591  | 
(is "?l = ?r")  | 
|
2592  | 
proof (rule measure_eqI)  | 
|
2593  | 
fix A assume "A \<in> sets (restrict_space (distr M N f) \<Omega>)"  | 
|
2594  | 
with restrict show "emeasure ?l A = emeasure ?r A"  | 
|
2595  | 
by (subst emeasure_distr)  | 
|
2596  | 
(auto simp: sets_restrict_space_iff emeasure_restrict_space emeasure_distr  | 
|
2597  | 
intro!: measurable_restrict_space2)  | 
|
2598  | 
qed (simp add: sets_restrict_space)  | 
|
2599  | 
||
| 59000 | 2600  | 
lemma measure_eqI_restrict_generator:  | 
2601  | 
assumes E: "Int_stable E" "E \<subseteq> Pow \<Omega>" "\<And>X. X \<in> E \<Longrightarrow> emeasure M X = emeasure N X"  | 
|
2602  | 
assumes sets_eq: "sets M = sets N" and \<Omega>: "\<Omega> \<in> sets M"  | 
|
2603  | 
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
 | 
2604  | 
assumes "sets (restrict_space N \<Omega>) = sigma_sets \<Omega> E"  | 
| 59000 | 2605  | 
assumes ae: "AE x in M. x \<in> \<Omega>" "AE x in N. x \<in> \<Omega>"  | 
2606  | 
  assumes A: "countable A" "A \<noteq> {}" "A \<subseteq> E" "\<Union>A = \<Omega>" "\<And>a. a \<in> A \<Longrightarrow> emeasure M a \<noteq> \<infinity>"
 | 
|
2607  | 
shows "M = N"  | 
|
2608  | 
proof (rule measure_eqI)  | 
|
2609  | 
fix X assume X: "X \<in> sets M"  | 
|
2610  | 
then have "emeasure M X = emeasure (restrict_space M \<Omega>) (X \<inter> \<Omega>)"  | 
|
2611  | 
using ae \<Omega> by (auto simp add: emeasure_restrict_space intro!: emeasure_eq_AE)  | 
|
2612  | 
also have "restrict_space M \<Omega> = restrict_space N \<Omega>"  | 
|
2613  | 
proof (rule measure_eqI_generator_eq)  | 
|
2614  | 
fix X assume "X \<in> E"  | 
|
2615  | 
then show "emeasure (restrict_space M \<Omega>) X = emeasure (restrict_space N \<Omega>) X"  | 
|
2616  | 
using E \<Omega> by (subst (1 2) emeasure_restrict_space) (auto simp: sets_eq sets_eq[THEN sets_eq_imp_space_eq])  | 
|
2617  | 
next  | 
|
2618  | 
show "range (from_nat_into A) \<subseteq> E" "(\<Union>i. from_nat_into A i) = \<Omega>"  | 
|
| 
69546
 
27dae626822b
prefer naming convention from datatype package for strong congruence rules
 
haftmann 
parents: 
69541 
diff
changeset
 | 
2619  | 
using A by (auto cong del: SUP_cong_simp)  | 
| 59000 | 2620  | 
next  | 
2621  | 
fix i  | 
|
2622  | 
have "emeasure (restrict_space M \<Omega>) (from_nat_into A i) = emeasure M (from_nat_into A i)"  | 
|
2623  | 
using A \<Omega> by (subst emeasure_restrict_space)  | 
|
2624  | 
(auto simp: sets_eq sets_eq[THEN sets_eq_imp_space_eq] intro: from_nat_into)  | 
|
2625  | 
with A show "emeasure (restrict_space M \<Omega>) (from_nat_into A i) \<noteq> \<infinity>"  | 
|
2626  | 
by (auto intro: from_nat_into)  | 
|
2627  | 
qed fact+  | 
|
2628  | 
also have "emeasure (restrict_space N \<Omega>) (X \<inter> \<Omega>) = emeasure N X"  | 
|
2629  | 
using X ae \<Omega> by (auto simp add: emeasure_restrict_space sets_eq intro!: emeasure_eq_AE)  | 
|
2630  | 
finally show "emeasure M X = emeasure N X" .  | 
|
2631  | 
qed fact  | 
|
2632  | 
||
| 70136 | 2633  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Null measure\<close>  | 
| 59425 | 2634  | 
|
| 69564 | 2635  | 
definition null_measure :: "'a measure \<Rightarrow> 'a measure" where  | 
2636  | 
"null_measure M = sigma (space M) (sets M)"  | 
|
| 59425 | 2637  | 
|
2638  | 
lemma space_null_measure[simp]: "space (null_measure M) = space M"  | 
|
2639  | 
by (simp add: null_measure_def)  | 
|
2640  | 
||
| 
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
 | 
2641  | 
lemma sets_null_measure[simp, measurable_cong]: "sets (null_measure M) = sets M"  | 
| 59425 | 2642  | 
by (simp add: null_measure_def)  | 
2643  | 
||
2644  | 
lemma emeasure_null_measure[simp]: "emeasure (null_measure M) X = 0"  | 
|
2645  | 
by (cases "X \<in> sets M", rule emeasure_measure_of)  | 
|
2646  | 
(auto simp: positive_def countably_additive_def emeasure_notin_sets null_measure_def  | 
|
2647  | 
dest: sets.sets_into_space)  | 
|
2648  | 
||
2649  | 
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
 | 
2650  | 
by (intro measure_eq_emeasure_eq_ennreal) auto  | 
| 59425 | 2651  | 
|
| 61633 | 2652  | 
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
 | 
2653  | 
by(rule measure_eqI) simp_all  | 
| 61633 | 2654  | 
|
| 61634 | 2655  | 
subsection \<open>Scaling a measure\<close>  | 
2656  | 
||
| 70136 | 2657  | 
definition\<^marker>\<open>tag important\<close> scale_measure :: "ennreal \<Rightarrow> 'a measure \<Rightarrow> 'a measure" where  | 
| 69564 | 2658  | 
"scale_measure r M = measure_of (space M) (sets M) (\<lambda>A. r * emeasure M A)"  | 
| 61634 | 2659  | 
|
2660  | 
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
 | 
2661  | 
by (simp add: scale_measure_def)  | 
| 61634 | 2662  | 
|
2663  | 
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
 | 
2664  | 
by (simp add: scale_measure_def)  | 
| 61634 | 2665  | 
|
2666  | 
lemma emeasure_scale_measure [simp]:  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2667  | 
"emeasure (scale_measure r M) A = r * emeasure M A"  | 
| 61634 | 2668  | 
(is "_ = ?\<mu> A")  | 
2669  | 
proof(cases "A \<in> sets M")  | 
|
2670  | 
case True  | 
|
2671  | 
show ?thesis unfolding scale_measure_def  | 
|
2672  | 
proof(rule emeasure_measure_of_sigma)  | 
|
2673  | 
show "sigma_algebra (space M) (sets M)" ..  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2674  | 
show "positive (sets M) ?\<mu>" by (simp add: positive_def)  | 
| 61634 | 2675  | 
show "countably_additive (sets M) ?\<mu>"  | 
2676  | 
proof (rule countably_additiveI)  | 
|
2677  | 
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
 | 
2678  | 
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
 | 
2679  | 
by simp  | 
| 61634 | 2680  | 
also have "\<dots> = ?\<mu> (\<Union>i. A i)" using * by(simp add: suminf_emeasure)  | 
2681  | 
finally show "(\<Sum>i. ?\<mu> (A i)) = ?\<mu> (\<Union>i. A i)" .  | 
|
2682  | 
qed  | 
|
2683  | 
qed(fact True)  | 
|
2684  | 
qed(simp add: emeasure_notin_sets)  | 
|
2685  | 
||
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2686  | 
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
 | 
2687  | 
by(rule measure_eqI) simp_all  | 
| 61634 | 2688  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2689  | 
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
 | 
2690  | 
by(rule measure_eqI) simp_all  | 
| 61634 | 2691  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2692  | 
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
 | 
2693  | 
using emeasure_scale_measure[of r M A]  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2694  | 
emeasure_eq_ennreal_measure[of M A]  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2695  | 
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
 | 
2696  | 
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
 | 
2697  | 
(auto simp del: emeasure_scale_measure  | 
| 
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2698  | 
simp: ennreal_top_eq_mult_iff ennreal_mult_eq_top_iff measure_zero_top ennreal_mult[symmetric])  | 
| 61634 | 2699  | 
|
2700  | 
lemma scale_scale_measure [simp]:  | 
|
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
2701  | 
"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
 | 
2702  | 
by (rule measure_eqI) (simp_all add: max_def mult.assoc)  | 
| 61634 | 2703  | 
|
2704  | 
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
 | 
2705  | 
by (rule measure_eqI) simp_all  | 
| 61634 | 2706  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2707  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2708  | 
subsection \<open>Complete lattice structure on measures\<close>  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2709  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2710  | 
lemma (in finite_measure) finite_measure_Diff':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2711  | 
"A \<in> sets M \<Longrightarrow> B \<in> sets M \<Longrightarrow> measure M (A - B) = measure M A - measure M (A \<inter> B)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2712  | 
using finite_measure_Diff[of A "A \<inter> B"] by (auto simp: Diff_Int)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2713  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2714  | 
lemma (in finite_measure) finite_measure_Union':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2715  | 
"A \<in> sets M \<Longrightarrow> B \<in> sets M \<Longrightarrow> measure M (A \<union> B) = measure M A + measure M (B - A)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2716  | 
using finite_measure_Union[of A "B - A"] by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2717  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2718  | 
lemma finite_unsigned_Hahn_decomposition:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2719  | 
assumes "finite_measure M" "finite_measure N" and [simp]: "sets N = sets M"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2720  | 
  shows "\<exists>Y\<in>sets M. (\<forall>X\<in>sets M. X \<subseteq> Y \<longrightarrow> N X \<le> M X) \<and> (\<forall>X\<in>sets M. X \<inter> Y = {} \<longrightarrow> M X \<le> N X)"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2721  | 
proof -  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2722  | 
interpret M: finite_measure M by fact  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2723  | 
interpret N: finite_measure N by fact  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2724  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2725  | 
define d where "d X = measure M X - measure N X" for X  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2726  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2727  | 
have [intro]: "bdd_above (d`sets M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2728  | 
using sets.sets_into_space[of _ M]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2729  | 
by (intro bdd_aboveI[where M="measure M (space M)"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2730  | 
(auto simp: d_def field_simps subset_eq intro!: add_increasing M.finite_measure_mono)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2731  | 
|
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
2732  | 
define \<gamma> where "\<gamma> = (SUP X\<in>sets M. d X)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2733  | 
have le_\<gamma>[intro]: "X \<in> sets M \<Longrightarrow> d X \<le> \<gamma>" for X  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2734  | 
by (auto simp: \<gamma>_def intro!: cSUP_upper)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2735  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2736  | 
have "\<exists>f. \<forall>n. f n \<in> sets M \<and> d (f n) > \<gamma> - 1 / 2^n"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2737  | 
proof (intro choice_iff[THEN iffD1] allI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2738  | 
fix n  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2739  | 
have "\<exists>X\<in>sets M. \<gamma> - 1 / 2^n < d X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2740  | 
unfolding \<gamma>_def by (intro less_cSUP_iff[THEN iffD1]) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2741  | 
then show "\<exists>y. y \<in> sets M \<and> \<gamma> - 1 / 2 ^ n < d y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2742  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2743  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2744  | 
then obtain E where [measurable]: "E n \<in> sets M" and E: "d (E n) > \<gamma> - 1 / 2^n" for n  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2745  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2746  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2747  | 
  define F where "F m n = (if m \<le> n then \<Inter>i\<in>{m..n}. E i else space M)" for m n
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2748  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2749  | 
have [measurable]: "m \<le> n \<Longrightarrow> F m n \<in> sets M" for m n  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2750  | 
by (auto simp: F_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2751  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2752  | 
have 1: "\<gamma> - 2 / 2 ^ m + 1 / 2 ^ n \<le> d (F m n)" if "m \<le> n" for m n  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2753  | 
using that  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2754  | 
proof (induct rule: dec_induct)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2755  | 
case base with E[of m] show ?case  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2756  | 
by (simp add: F_def field_simps)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2757  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2758  | 
case (step i)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2759  | 
have F_Suc: "F m (Suc i) = F m i \<inter> E (Suc i)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2760  | 
using \<open>m \<le> i\<close> by (auto simp: F_def le_Suc_eq)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2761  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2762  | 
have "\<gamma> + (\<gamma> - 2 / 2^m + 1 / 2 ^ Suc i) \<le> (\<gamma> - 1 / 2^Suc i) + (\<gamma> - 2 / 2^m + 1 / 2^i)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2763  | 
by (simp add: field_simps)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2764  | 
also have "\<dots> \<le> d (E (Suc i)) + d (F m i)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2765  | 
using E[of "Suc i"] by (intro add_mono step) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2766  | 
also have "\<dots> = d (E (Suc i)) + d (F m i - E (Suc i)) + d (F m (Suc i))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2767  | 
using \<open>m \<le> i\<close> by (simp add: d_def field_simps F_Suc M.finite_measure_Diff' N.finite_measure_Diff')  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2768  | 
also have "\<dots> = d (E (Suc i) \<union> F m i) + d (F m (Suc i))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2769  | 
using \<open>m \<le> i\<close> by (simp add: d_def field_simps M.finite_measure_Union' N.finite_measure_Union')  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2770  | 
also have "\<dots> \<le> \<gamma> + d (F m (Suc i))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2771  | 
using \<open>m \<le> i\<close> by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2772  | 
finally show ?case  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2773  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2774  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2775  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2776  | 
  define F' where "F' m = (\<Inter>i\<in>{m..}. E i)" for m
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2777  | 
have F'_eq: "F' m = (\<Inter>i. F m (i + m))" for m  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2778  | 
by (fastforce simp: le_iff_add[of m] F'_def F_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2779  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2780  | 
have [measurable]: "F' m \<in> sets M" for m  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2781  | 
by (auto simp: F'_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2782  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2783  | 
have \<gamma>_le: "\<gamma> - 0 \<le> d (\<Union>m. F' m)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2784  | 
proof (rule LIMSEQ_le)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2785  | 
show "(\<lambda>n. \<gamma> - 2 / 2 ^ n) \<longlonglongrightarrow> \<gamma> - 0"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2786  | 
by (intro tendsto_intros LIMSEQ_divide_realpow_zero) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2787  | 
have "incseq F'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2788  | 
by (auto simp: incseq_def F'_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2789  | 
then show "(\<lambda>m. d (F' m)) \<longlonglongrightarrow> d (\<Union>m. F' m)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2790  | 
unfolding d_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2791  | 
by (intro tendsto_diff M.finite_Lim_measure_incseq N.finite_Lim_measure_incseq) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2792  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2793  | 
have "\<gamma> - 2 / 2 ^ m + 0 \<le> d (F' m)" for m  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2794  | 
proof (rule LIMSEQ_le)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2795  | 
have *: "decseq (\<lambda>n. F m (n + m))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2796  | 
by (auto simp: decseq_def F_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2797  | 
show "(\<lambda>n. d (F m n)) \<longlonglongrightarrow> d (F' m)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2798  | 
unfolding d_def F'_eq  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2799  | 
by (rule LIMSEQ_offset[where k=m])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2800  | 
(auto intro!: tendsto_diff M.finite_Lim_measure_decseq N.finite_Lim_measure_decseq *)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2801  | 
show "(\<lambda>n. \<gamma> - 2 / 2 ^ m + 1 / 2 ^ n) \<longlonglongrightarrow> \<gamma> - 2 / 2 ^ m + 0"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2802  | 
by (intro tendsto_add LIMSEQ_divide_realpow_zero tendsto_const) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2803  | 
show "\<exists>N. \<forall>n\<ge>N. \<gamma> - 2 / 2 ^ m + 1 / 2 ^ n \<le> d (F m n)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2804  | 
using 1[of m] by (intro exI[of _ m]) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2805  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2806  | 
then show "\<exists>N. \<forall>n\<ge>N. \<gamma> - 2 / 2 ^ n \<le> d (F' n)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2807  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2808  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2809  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2810  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2811  | 
proof (safe intro!: bexI[of _ "\<Union>m. F' m"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2812  | 
fix X assume [measurable]: "X \<in> sets M" and X: "X \<subseteq> (\<Union>m. F' m)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2813  | 
have "d (\<Union>m. F' m) - d X = d ((\<Union>m. F' m) - X)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2814  | 
using X by (auto simp: d_def M.finite_measure_Diff N.finite_measure_Diff)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2815  | 
also have "\<dots> \<le> \<gamma>"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2816  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2817  | 
finally have "0 \<le> d X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2818  | 
using \<gamma>_le by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2819  | 
then show "emeasure N X \<le> emeasure M X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2820  | 
by (auto simp: d_def M.emeasure_eq_measure N.emeasure_eq_measure)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2821  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2822  | 
    fix X assume [measurable]: "X \<in> sets M" and X: "X \<inter> (\<Union>m. F' m) = {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2823  | 
then have "d (\<Union>m. F' m) + d X = d (X \<union> (\<Union>m. F' m))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2824  | 
by (auto simp: d_def M.finite_measure_Union N.finite_measure_Union)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2825  | 
also have "\<dots> \<le> \<gamma>"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2826  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2827  | 
finally have "d X \<le> 0"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2828  | 
using \<gamma>_le by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2829  | 
then show "emeasure M X \<le> emeasure N X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2830  | 
by (auto simp: d_def M.emeasure_eq_measure N.emeasure_eq_measure)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2831  | 
qed auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2832  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2833  | 
|
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68532 
diff
changeset
 | 
2834  | 
proposition unsigned_Hahn_decomposition:  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2835  | 
assumes [simp]: "sets N = sets M" and [measurable]: "A \<in> sets M"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2836  | 
and [simp]: "emeasure M A \<noteq> top" "emeasure N A \<noteq> top"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2837  | 
  shows "\<exists>Y\<in>sets M. Y \<subseteq> A \<and> (\<forall>X\<in>sets M. X \<subseteq> Y \<longrightarrow> N X \<le> M X) \<and> (\<forall>X\<in>sets M. X \<subseteq> A \<longrightarrow> X \<inter> Y = {} \<longrightarrow> M X \<le> N X)"
 | 
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68532 
diff
changeset
 | 
2838  | 
proof -  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2839  | 
have "\<exists>Y\<in>sets (restrict_space M A).  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2840  | 
(\<forall>X\<in>sets (restrict_space M A). X \<subseteq> Y \<longrightarrow> (restrict_space N A) X \<le> (restrict_space M A) X) \<and>  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2841  | 
    (\<forall>X\<in>sets (restrict_space M A). X \<inter> Y = {} \<longrightarrow> (restrict_space M A) X \<le> (restrict_space N A) X)"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2842  | 
proof (rule finite_unsigned_Hahn_decomposition)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2843  | 
show "finite_measure (restrict_space M A)" "finite_measure (restrict_space N A)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2844  | 
by (auto simp: space_restrict_space emeasure_restrict_space less_top intro!: finite_measureI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2845  | 
qed (simp add: sets_restrict_space)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2846  | 
then guess Y ..  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2847  | 
then show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2848  | 
apply (intro bexI[of _ Y] conjI ballI conjI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2849  | 
apply (simp_all add: sets_restrict_space emeasure_restrict_space)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2850  | 
apply safe  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2851  | 
subgoal for X Z  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2852  | 
by (erule ballE[of _ _ X]) (auto simp add: Int_absorb1)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2853  | 
subgoal for X Z  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2854  | 
by (erule ballE[of _ _ X]) (auto simp add: Int_absorb1 ac_simps)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2855  | 
apply auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2856  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2857  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2858  | 
|
| 70136 | 2859  | 
text\<^marker>\<open>tag important\<close> \<open>  | 
| 69597 | 2860  | 
Define a lexicographical order on \<^type>\<open>measure\<close>, in the order space, sets and measure. The parts  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2861  | 
of the lexicographical order are point-wise ordered.  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2862  | 
\<close>  | 
| 60772 | 2863  | 
|
| 68617 | 2864  | 
instantiation measure :: (type) order_bot  | 
| 60772 | 2865  | 
begin  | 
2866  | 
||
2867  | 
inductive less_eq_measure :: "'a measure \<Rightarrow> 'a measure \<Rightarrow> bool" where  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2868  | 
"space M \<subset> space N \<Longrightarrow> less_eq_measure M N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2869  | 
| "space M = space N \<Longrightarrow> sets M \<subset> sets N \<Longrightarrow> less_eq_measure M N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2870  | 
| "space M = space N \<Longrightarrow> sets M = sets N \<Longrightarrow> emeasure M \<le> emeasure N \<Longrightarrow> less_eq_measure M N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2871  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2872  | 
lemma le_measure_iff:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2873  | 
"M \<le> N \<longleftrightarrow> (if space M = space N then  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2874  | 
if sets M = sets N then emeasure M \<le> emeasure N else sets M \<subseteq> sets N else space M \<subseteq> space N)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2875  | 
by (auto elim: less_eq_measure.cases intro: less_eq_measure.intros)  | 
| 60772 | 2876  | 
|
| 70136 | 2877  | 
definition\<^marker>\<open>tag important\<close> less_measure :: "'a measure \<Rightarrow> 'a measure \<Rightarrow> bool" where  | 
| 60772 | 2878  | 
"less_measure M N \<longleftrightarrow> (M \<le> N \<and> \<not> N \<le> M)"  | 
2879  | 
||
| 70136 | 2880  | 
definition\<^marker>\<open>tag important\<close> bot_measure :: "'a measure" where  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2881  | 
  "bot_measure = sigma {} {}"
 | 
| 60772 | 2882  | 
|
2883  | 
lemma  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2884  | 
  shows space_bot[simp]: "space bot = {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2885  | 
    and sets_bot[simp]: "sets bot = {{}}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2886  | 
and emeasure_bot[simp]: "emeasure bot X = 0"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2887  | 
by (auto simp: bot_measure_def sigma_sets_empty_eq emeasure_sigma)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2888  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2889  | 
instance  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2890  | 
proof standard  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2891  | 
show "bot \<le> a" for a :: "'a measure"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2892  | 
by (simp add: le_measure_iff bot_measure_def sigma_sets_empty_eq emeasure_sigma le_fun_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2893  | 
qed (auto simp: le_measure_iff less_measure_def split: if_split_asm intro: measure_eqI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2894  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2895  | 
end  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2896  | 
|
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68532 
diff
changeset
 | 
2897  | 
proposition le_measure: "sets M = sets N \<Longrightarrow> M \<le> N \<longleftrightarrow> (\<forall>A\<in>sets M. emeasure M A \<le> emeasure N A)"  | 
| 
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68532 
diff
changeset
 | 
2898  | 
apply -  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2899  | 
apply (auto simp: le_measure_iff le_fun_def dest: sets_eq_imp_space_eq)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2900  | 
subgoal for X  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2901  | 
by (cases "X \<in> sets M") (auto simp: emeasure_notin_sets)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2902  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2903  | 
|
| 70136 | 2904  | 
definition\<^marker>\<open>tag important\<close> sup_measure' :: "'a measure \<Rightarrow> 'a measure \<Rightarrow> 'a measure" where  | 
| 69564 | 2905  | 
"sup_measure' A B =  | 
2906  | 
measure_of (space A) (sets A)  | 
|
2907  | 
(\<lambda>X. SUP Y\<in>sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2908  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2909  | 
lemma assumes [simp]: "sets B = sets A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2910  | 
shows space_sup_measure'[simp]: "space (sup_measure' A B) = space A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2911  | 
and sets_sup_measure'[simp]: "sets (sup_measure' A B) = sets A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2912  | 
using sets_eq_imp_space_eq[OF assms] by (simp_all add: sup_measure'_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2913  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2914  | 
lemma emeasure_sup_measure':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2915  | 
assumes sets_eq[simp]: "sets B = sets A" and [simp, intro]: "X \<in> sets A"  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
2916  | 
shows "emeasure (sup_measure' A B) X = (SUP Y\<in>sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2917  | 
(is "_ = ?S X")  | 
| 60772 | 2918  | 
proof -  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2919  | 
note sets_eq_imp_space_eq[OF sets_eq, simp]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2920  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2921  | 
using sup_measure'_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2922  | 
proof (rule emeasure_measure_of)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2923  | 
let ?d = "\<lambda>X Y. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y)"  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
2924  | 
show "countably_additive (sets (sup_measure' A B)) (\<lambda>X. SUP Y \<in> sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2925  | 
proof (rule countably_additiveI, goal_cases)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2926  | 
case (1 X)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2927  | 
then have [measurable]: "\<And>i. X i \<in> sets A" and "disjoint_family X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2928  | 
by auto  | 
| 69661 | 2929  | 
have disjoint: "disjoint_family (\<lambda>i. X i \<inter> Y)" "disjoint_family (\<lambda>i. X i - Y)" for Y  | 
2930  | 
by (auto intro: disjoint_family_on_bisimulation [OF \<open>disjoint_family X\<close>, simplified])  | 
|
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
2931  | 
have "(\<Sum>i. ?S (X i)) = (SUP Y\<in>sets A. \<Sum>i. ?d (X i) Y)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2932  | 
proof (rule ennreal_suminf_SUP_eq_directed)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2933  | 
fix J :: "nat set" and a b assume "finite J" and [measurable]: "a \<in> sets A" "b \<in> sets A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2934  | 
have "\<exists>c\<in>sets A. c \<subseteq> X i \<and> (\<forall>a\<in>sets A. ?d (X i) a \<le> ?d (X i) c)" for i  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2935  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2936  | 
assume "emeasure A (X i) = top \<or> emeasure B (X i) = top"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2937  | 
then show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2938  | 
proof  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2939  | 
assume "emeasure A (X i) = top" then show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2940  | 
by (intro bexI[of _ "X i"]) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2941  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2942  | 
assume "emeasure B (X i) = top" then show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2943  | 
              by (intro bexI[of _ "{}"]) auto
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2944  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2945  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2946  | 
assume finite: "\<not> (emeasure A (X i) = top \<or> emeasure B (X i) = top)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2947  | 
          then have "\<exists>Y\<in>sets A. Y \<subseteq> X i \<and> (\<forall>C\<in>sets A. C \<subseteq> Y \<longrightarrow> B C \<le> A C) \<and> (\<forall>C\<in>sets A. C \<subseteq> X i \<longrightarrow> C \<inter> Y = {} \<longrightarrow> A C \<le> B C)"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2948  | 
using unsigned_Hahn_decomposition[of B A "X i"] by simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2949  | 
then obtain Y where [measurable]: "Y \<in> sets A" and [simp]: "Y \<subseteq> X i"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2950  | 
and B_le_A: "\<And>C. C \<in> sets A \<Longrightarrow> C \<subseteq> Y \<Longrightarrow> B C \<le> A C"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2951  | 
            and A_le_B: "\<And>C. C \<in> sets A \<Longrightarrow> C \<subseteq> X i \<Longrightarrow> C \<inter> Y = {} \<Longrightarrow> A C \<le> B C"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2952  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2953  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2954  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2955  | 
proof (intro bexI[of _ Y] ballI conjI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2956  | 
fix a assume [measurable]: "a \<in> sets A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2957  | 
have *: "(X i \<inter> a \<inter> Y \<union> (X i \<inter> a - Y)) = X i \<inter> a" "(X i - a) \<inter> Y \<union> (X i - a - Y) = X i \<inter> - a"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2958  | 
for a Y by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2959  | 
then have "?d (X i) a =  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2960  | 
(A (X i \<inter> a \<inter> Y) + A (X i \<inter> a \<inter> - Y)) + (B (X i \<inter> - a \<inter> Y) + B (X i \<inter> - a \<inter> - Y))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2961  | 
by (subst (1 2) plus_emeasure) (auto simp: Diff_eq[symmetric])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2962  | 
also have "\<dots> \<le> (A (X i \<inter> a \<inter> Y) + B (X i \<inter> a \<inter> - Y)) + (A (X i \<inter> - a \<inter> Y) + B (X i \<inter> - a \<inter> - Y))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2963  | 
by (intro add_mono order_refl B_le_A A_le_B) (auto simp: Diff_eq[symmetric])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2964  | 
also have "\<dots> \<le> (A (X i \<inter> Y \<inter> a) + A (X i \<inter> Y \<inter> - a)) + (B (X i \<inter> - Y \<inter> a) + B (X i \<inter> - Y \<inter> - a))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2965  | 
by (simp add: ac_simps)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2966  | 
also have "\<dots> \<le> A (X i \<inter> Y) + B (X i \<inter> - Y)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2967  | 
by (subst (1 2) plus_emeasure) (auto simp: Diff_eq[symmetric] *)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2968  | 
finally show "?d (X i) a \<le> ?d (X i) Y" .  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2969  | 
qed auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2970  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2971  | 
then obtain C where [measurable]: "C i \<in> sets A" and "C i \<subseteq> X i"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2972  | 
and C: "\<And>a. a \<in> sets A \<Longrightarrow> ?d (X i) a \<le> ?d (X i) (C i)" for i  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2973  | 
by metis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2974  | 
have *: "X i \<inter> (\<Union>i. C i) = X i \<inter> C i" for i  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2975  | 
proof safe  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2976  | 
fix x j assume "x \<in> X i" "x \<in> C j"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2977  | 
          moreover have "i = j \<or> X i \<inter> X j = {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2978  | 
using \<open>disjoint_family X\<close> by (auto simp: disjoint_family_on_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2979  | 
ultimately show "x \<in> C i"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2980  | 
using \<open>C i \<subseteq> X i\<close> \<open>C j \<subseteq> X j\<close> by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2981  | 
qed auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2982  | 
have **: "X i \<inter> - (\<Union>i. C i) = X i \<inter> - C i" for i  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2983  | 
proof safe  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2984  | 
fix x j assume "x \<in> X i" "x \<notin> C i" "x \<in> C j"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2985  | 
          moreover have "i = j \<or> X i \<inter> X j = {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2986  | 
using \<open>disjoint_family X\<close> by (auto simp: disjoint_family_on_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2987  | 
ultimately show False  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2988  | 
using \<open>C i \<subseteq> X i\<close> \<open>C j \<subseteq> X j\<close> by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2989  | 
qed auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2990  | 
show "\<exists>c\<in>sets A. \<forall>i\<in>J. ?d (X i) a \<le> ?d (X i) c \<and> ?d (X i) b \<le> ?d (X i) c"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2991  | 
apply (intro bexI[of _ "\<Union>i. C i"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2992  | 
unfolding * **  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2993  | 
apply (intro C ballI conjI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2994  | 
apply auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2995  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2996  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
2997  | 
also have "\<dots> = ?S (\<Union>i. X i)"  | 
| 69661 | 2998  | 
apply (simp only: UN_extend_simps(4))  | 
2999  | 
apply (rule arg_cong [of _ _ Sup])  | 
|
3000  | 
apply (rule image_cong)  | 
|
3001  | 
apply (fact refl)  | 
|
3002  | 
using disjoint  | 
|
3003  | 
apply (auto simp add: suminf_add [symmetric] Diff_eq [symmetric] image_subset_iff suminf_emeasure simp del: UN_simps)  | 
|
3004  | 
done  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3005  | 
finally show "(\<Sum>i. ?S (X i)) = ?S (\<Union>i. X i)" .  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3006  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3007  | 
qed (auto dest: sets.sets_into_space simp: positive_def intro!: SUP_const)  | 
| 60772 | 3008  | 
qed  | 
3009  | 
||
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3010  | 
lemma le_emeasure_sup_measure'1:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3011  | 
assumes "sets B = sets A" "X \<in> sets A" shows "emeasure A X \<le> emeasure (sup_measure' A B) X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3012  | 
by (subst emeasure_sup_measure'[OF assms]) (auto intro!: SUP_upper2[of "X"] assms)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3013  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3014  | 
lemma le_emeasure_sup_measure'2:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3015  | 
assumes "sets B = sets A" "X \<in> sets A" shows "emeasure B X \<le> emeasure (sup_measure' A B) X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3016  | 
  by (subst emeasure_sup_measure'[OF assms]) (auto intro!: SUP_upper2[of "{}"] assms)
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3017  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3018  | 
lemma emeasure_sup_measure'_le2:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3019  | 
assumes [simp]: "sets B = sets C" "sets A = sets C" and [measurable]: "X \<in> sets C"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3020  | 
assumes A: "\<And>Y. Y \<subseteq> X \<Longrightarrow> Y \<in> sets A \<Longrightarrow> emeasure A Y \<le> emeasure C Y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3021  | 
assumes B: "\<And>Y. Y \<subseteq> X \<Longrightarrow> Y \<in> sets A \<Longrightarrow> emeasure B Y \<le> emeasure C Y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3022  | 
shows "emeasure (sup_measure' A B) X \<le> emeasure C X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3023  | 
proof (subst emeasure_sup_measure')  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3024  | 
show "(SUP Y\<in>sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y)) \<le> emeasure C X"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3025  | 
unfolding \<open>sets A = sets C\<close>  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3026  | 
proof (intro SUP_least)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3027  | 
fix Y assume [measurable]: "Y \<in> sets C"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3028  | 
have [simp]: "X \<inter> Y \<union> (X - Y) = X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3029  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3030  | 
have "emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y) \<le> emeasure C (X \<inter> Y) + emeasure C (X \<inter> - Y)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3031  | 
by (intro add_mono A B) (auto simp: Diff_eq[symmetric])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3032  | 
also have "\<dots> = emeasure C X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3033  | 
by (subst plus_emeasure) (auto simp: Diff_eq[symmetric])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3034  | 
finally show "emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y) \<le> emeasure C X" .  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3035  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3036  | 
qed simp_all  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3037  | 
|
| 70136 | 3038  | 
definition\<^marker>\<open>tag important\<close> sup_lexord :: "'a \<Rightarrow> 'a \<Rightarrow> ('a \<Rightarrow> 'b::order) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a" where
 | 
| 69564 | 3039  | 
"sup_lexord A B k s c =  | 
3040  | 
(if k A = k B then c else  | 
|
3041  | 
if \<not> k A \<le> k B \<and> \<not> k B \<le> k A then s else  | 
|
3042  | 
if k B \<le> k A then A else B)"  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3043  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3044  | 
lemma sup_lexord:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3045  | 
"(k A < k B \<Longrightarrow> P B) \<Longrightarrow> (k B < k A \<Longrightarrow> P A) \<Longrightarrow> (k A = k B \<Longrightarrow> P c) \<Longrightarrow>  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3046  | 
(\<not> k B \<le> k A \<Longrightarrow> \<not> k A \<le> k B \<Longrightarrow> P s) \<Longrightarrow> P (sup_lexord A B k s c)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3047  | 
by (auto simp: sup_lexord_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3048  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3049  | 
lemmas le_sup_lexord = sup_lexord[where P="\<lambda>a. c \<le> a" for c]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3050  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3051  | 
lemma sup_lexord1: "k A = k B \<Longrightarrow> sup_lexord A B k s c = c"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3052  | 
by (simp add: sup_lexord_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3053  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3054  | 
lemma sup_lexord_commute: "sup_lexord A B k s c = sup_lexord B A k s c"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3055  | 
by (auto simp: sup_lexord_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3056  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3057  | 
lemma sigma_sets_le_sets_iff: "(sigma_sets (space x) \<A> \<subseteq> sets x) = (\<A> \<subseteq> sets x)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3058  | 
using sets.sigma_sets_subset[of \<A> x] by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3059  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3060  | 
lemma sigma_le_iff: "\<A> \<subseteq> Pow \<Omega> \<Longrightarrow> sigma \<Omega> \<A> \<le> x \<longleftrightarrow> (\<Omega> \<subseteq> space x \<and> (space x = \<Omega> \<longrightarrow> \<A> \<subseteq> sets x))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3061  | 
by (cases "\<Omega> = space x")  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3062  | 
(simp_all add: eq_commute[of _ "sets x"] le_measure_iff emeasure_sigma le_fun_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3063  | 
sigma_sets_superset_generator sigma_sets_le_sets_iff)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3064  | 
|
| 68617 | 3065  | 
instantiation measure :: (type) semilattice_sup  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3066  | 
begin  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3067  | 
|
| 70136 | 3068  | 
definition\<^marker>\<open>tag important\<close> sup_measure :: "'a measure \<Rightarrow> 'a measure \<Rightarrow> 'a measure" where  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3069  | 
"sup_measure A B =  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3070  | 
    sup_lexord A B space (sigma (space A \<union> space B) {})
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3071  | 
(sup_lexord A B sets (sigma (space A) (sets A \<union> sets B)) (sup_measure' A B))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3072  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3073  | 
instance  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3074  | 
proof  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3075  | 
fix x y z :: "'a measure"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3076  | 
show "x \<le> sup x y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3077  | 
unfolding sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3078  | 
proof (intro le_sup_lexord)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3079  | 
assume "space x = space y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3080  | 
then have *: "sets x \<union> sets y \<subseteq> Pow (space x)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3081  | 
using sets.space_closed by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3082  | 
assume "\<not> sets y \<subseteq> sets x" "\<not> sets x \<subseteq> sets y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3083  | 
then have "sets x \<subset> sets x \<union> sets y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3084  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3085  | 
also have "\<dots> \<le> sigma (space x) (sets x \<union> sets y)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3086  | 
by (subst sets_measure_of[OF *]) (rule sigma_sets_superset_generator)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3087  | 
finally show "x \<le> sigma (space x) (sets x \<union> sets y)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3088  | 
by (simp add: space_measure_of[OF *] less_eq_measure.intros(2))  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3089  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3090  | 
assume "\<not> space y \<subseteq> space x" "\<not> space x \<subseteq> space y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3091  | 
    then show "x \<le> sigma (space x \<union> space y) {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3092  | 
by (intro less_eq_measure.intros) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3093  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3094  | 
assume "sets x = sets y" then show "x \<le> sup_measure' x y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3095  | 
by (simp add: le_measure le_emeasure_sup_measure'1)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3096  | 
qed (auto intro: less_eq_measure.intros)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3097  | 
show "y \<le> sup x y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3098  | 
unfolding sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3099  | 
proof (intro le_sup_lexord)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3100  | 
assume **: "space x = space y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3101  | 
then have *: "sets x \<union> sets y \<subseteq> Pow (space y)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3102  | 
using sets.space_closed by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3103  | 
assume "\<not> sets y \<subseteq> sets x" "\<not> sets x \<subseteq> sets y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3104  | 
then have "sets y \<subset> sets x \<union> sets y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3105  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3106  | 
also have "\<dots> \<le> sigma (space y) (sets x \<union> sets y)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3107  | 
by (subst sets_measure_of[OF *]) (rule sigma_sets_superset_generator)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3108  | 
finally show "y \<le> sigma (space x) (sets x \<union> sets y)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3109  | 
by (simp add: ** space_measure_of[OF *] less_eq_measure.intros(2))  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3110  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3111  | 
assume "\<not> space y \<subseteq> space x" "\<not> space x \<subseteq> space y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3112  | 
    then show "y \<le> sigma (space x \<union> space y) {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3113  | 
by (intro less_eq_measure.intros) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3114  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3115  | 
assume "sets x = sets y" then show "y \<le> sup_measure' x y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3116  | 
by (simp add: le_measure le_emeasure_sup_measure'2)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3117  | 
qed (auto intro: less_eq_measure.intros)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3118  | 
show "x \<le> y \<Longrightarrow> z \<le> y \<Longrightarrow> sup x z \<le> y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3119  | 
unfolding sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3120  | 
proof (intro sup_lexord[where P="\<lambda>x. x \<le> y"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3121  | 
assume "x \<le> y" "z \<le> y" and [simp]: "space x = space z" "sets x = sets z"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3122  | 
from \<open>x \<le> y\<close> show "sup_measure' x z \<le> y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3123  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3124  | 
case 1 then show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3125  | 
by (intro less_eq_measure.intros(1)) simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3126  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3127  | 
case 2 then show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3128  | 
by (intro less_eq_measure.intros(2)) simp_all  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3129  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3130  | 
case 3 with \<open>z \<le> y\<close> \<open>x \<le> y\<close> show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3131  | 
by (auto simp add: le_measure intro!: emeasure_sup_measure'_le2)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3132  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3133  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3134  | 
assume **: "x \<le> y" "z \<le> y" "space x = space z" "\<not> sets z \<subseteq> sets x" "\<not> sets x \<subseteq> sets z"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3135  | 
then have *: "sets x \<union> sets z \<subseteq> Pow (space x)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3136  | 
using sets.space_closed by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3137  | 
show "sigma (space x) (sets x \<union> sets z) \<le> y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3138  | 
unfolding sigma_le_iff[OF *] using ** by (auto simp: le_measure_iff split: if_split_asm)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3139  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3140  | 
assume "x \<le> y" "z \<le> y" "\<not> space z \<subseteq> space x" "\<not> space x \<subseteq> space z"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3141  | 
then have "space x \<subseteq> space y" "space z \<subseteq> space y"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3142  | 
by (auto simp: le_measure_iff split: if_split_asm)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3143  | 
    then show "sigma (space x \<union> space z) {} \<le> y"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3144  | 
by (simp add: sigma_le_iff)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3145  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3146  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3147  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3148  | 
end  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3149  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3150  | 
lemma space_empty_eq_bot: "space a = {} \<longleftrightarrow> a = bot"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3151  | 
using space_empty[of a] by (auto intro!: measure_eqI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3152  | 
|
| 63657 | 3153  | 
lemma sets_eq_iff_bounded: "A \<le> B \<Longrightarrow> B \<le> C \<Longrightarrow> sets A = sets C \<Longrightarrow> sets B = sets A"  | 
3154  | 
by (auto dest: sets_eq_imp_space_eq simp add: le_measure_iff split: if_split_asm)  | 
|
3155  | 
||
3156  | 
lemma sets_sup: "sets A = sets M \<Longrightarrow> sets B = sets M \<Longrightarrow> sets (sup A B) = sets M"  | 
|
3157  | 
by (auto simp add: sup_measure_def sup_lexord_def dest: sets_eq_imp_space_eq)  | 
|
3158  | 
||
3159  | 
lemma le_measureD1: "A \<le> B \<Longrightarrow> space A \<le> space B"  | 
|
3160  | 
by (auto simp: le_measure_iff split: if_split_asm)  | 
|
3161  | 
||
3162  | 
lemma le_measureD2: "A \<le> B \<Longrightarrow> space A = space B \<Longrightarrow> sets A \<le> sets B"  | 
|
3163  | 
by (auto simp: le_measure_iff split: if_split_asm)  | 
|
3164  | 
||
3165  | 
lemma le_measureD3: "A \<le> B \<Longrightarrow> sets A = sets B \<Longrightarrow> emeasure A X \<le> emeasure B X"  | 
|
3166  | 
by (auto simp: le_measure_iff le_fun_def dest: sets_eq_imp_space_eq split: if_split_asm)  | 
|
3167  | 
||
| 69313 | 3168  | 
lemma UN_space_closed: "\<Union>(sets ` S) \<subseteq> Pow (\<Union>(space ` S))"  | 
| 63657 | 3169  | 
using sets.space_closed by auto  | 
3170  | 
||
| 70136 | 3171  | 
definition\<^marker>\<open>tag important\<close>  | 
| 69564 | 3172  | 
  Sup_lexord :: "('a \<Rightarrow> 'b::complete_lattice) \<Rightarrow> ('a set \<Rightarrow> 'a) \<Rightarrow> ('a set \<Rightarrow> 'a) \<Rightarrow> 'a set \<Rightarrow> 'a"
 | 
| 63657 | 3173  | 
where  | 
| 69564 | 3174  | 
"Sup_lexord k c s A =  | 
3175  | 
(let U = (SUP a\<in>A. k a)  | 
|
3176  | 
   in if \<exists>a\<in>A. k a = U then c {a\<in>A. k a = U} else s A)"
 | 
|
| 63657 | 3177  | 
|
3178  | 
lemma Sup_lexord:  | 
|
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3179  | 
  "(\<And>a S. a \<in> A \<Longrightarrow> k a = (SUP a\<in>A. k a) \<Longrightarrow> S = {a'\<in>A. k a' = k a} \<Longrightarrow> P (c S)) \<Longrightarrow> ((\<And>a. a \<in> A \<Longrightarrow> k a \<noteq> (SUP a\<in>A. k a)) \<Longrightarrow> P (s A)) \<Longrightarrow>
 | 
| 63657 | 3180  | 
P (Sup_lexord k c s A)"  | 
3181  | 
by (auto simp: Sup_lexord_def Let_def)  | 
|
3182  | 
||
3183  | 
lemma Sup_lexord1:  | 
|
3184  | 
  assumes A: "A \<noteq> {}" "(\<And>a. a \<in> A \<Longrightarrow> k a = (\<Union>a\<in>A. k a))" "P (c A)"
 | 
|
3185  | 
shows "P (Sup_lexord k c s A)"  | 
|
3186  | 
unfolding Sup_lexord_def Let_def  | 
|
3187  | 
proof (clarsimp, safe)  | 
|
3188  | 
show "\<forall>a\<in>A. k a \<noteq> (\<Union>x\<in>A. k x) \<Longrightarrow> P (s A)"  | 
|
3189  | 
by (metis assms(1,2) ex_in_conv)  | 
|
3190  | 
next  | 
|
3191  | 
fix a assume "a \<in> A" "k a = (\<Union>x\<in>A. k x)"  | 
|
3192  | 
  then have "{a \<in> A. k a = (\<Union>x\<in>A. k x)} = {a \<in> A. k a = k a}"
 | 
|
3193  | 
by (metis A(2)[symmetric])  | 
|
3194  | 
  then show "P (c {a \<in> A. k a = (\<Union>x\<in>A. k x)})"
 | 
|
3195  | 
by (simp add: A(3))  | 
|
3196  | 
qed  | 
|
3197  | 
||
| 68617 | 3198  | 
instantiation measure :: (type) complete_lattice  | 
| 
63658
 
7faa9bf9860b
epheremal interpretation keeps auxiliary definition localized
 
haftmann 
parents: 
63657 
diff
changeset
 | 
3199  | 
begin  | 
| 
 
7faa9bf9860b
epheremal interpretation keeps auxiliary definition localized
 
haftmann 
parents: 
63657 
diff
changeset
 | 
3200  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3201  | 
interpretation sup_measure: comm_monoid_set sup "bot :: 'a measure"  | 
| 
63658
 
7faa9bf9860b
epheremal interpretation keeps auxiliary definition localized
 
haftmann 
parents: 
63657 
diff
changeset
 | 
3202  | 
by standard (auto intro!: antisym)  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3203  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3204  | 
lemma sup_measure_F_mono':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3205  | 
"finite J \<Longrightarrow> finite I \<Longrightarrow> sup_measure.F id I \<le> sup_measure.F id (I \<union> J)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3206  | 
proof (induction J rule: finite_induct)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3207  | 
case empty then show ?case  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3208  | 
by simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3209  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3210  | 
case (insert i J)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3211  | 
show ?case  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3212  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3213  | 
assume "i \<in> I" with insert show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3214  | 
by (auto simp: insert_absorb)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3215  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3216  | 
assume "i \<notin> I"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3217  | 
have "sup_measure.F id I \<le> sup_measure.F id (I \<union> J)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3218  | 
by (intro insert)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3219  | 
also have "\<dots> \<le> sup_measure.F id (insert i (I \<union> J))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3220  | 
using insert \<open>i \<notin> I\<close> by (subst sup_measure.insert) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3221  | 
finally show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3222  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3223  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3224  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3225  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3226  | 
lemma sup_measure_F_mono: "finite I \<Longrightarrow> J \<subseteq> I \<Longrightarrow> sup_measure.F id J \<le> sup_measure.F id I"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3227  | 
using sup_measure_F_mono'[of I J] by (auto simp: finite_subset Un_absorb1)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3228  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3229  | 
lemma sets_sup_measure_F:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3230  | 
  "finite I \<Longrightarrow> I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> sets i = sets M) \<Longrightarrow> sets (sup_measure.F id I) = sets M"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3231  | 
by (induction I rule: finite_ne_induct) (simp_all add: sets_sup)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3232  | 
|
| 70136 | 3233  | 
definition\<^marker>\<open>tag important\<close> Sup_measure' :: "'a measure set \<Rightarrow> 'a measure" where  | 
| 69564 | 3234  | 
"Sup_measure' M =  | 
3235  | 
measure_of (\<Union>a\<in>M. space a) (\<Union>a\<in>M. sets a)  | 
|
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3236  | 
    (\<lambda>X. (SUP P\<in>{P. finite P \<and> P \<subseteq> M }. sup_measure.F id P X))"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3237  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3238  | 
lemma space_Sup_measure'2: "space (Sup_measure' M) = (\<Union>m\<in>M. space m)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3239  | 
unfolding Sup_measure'_def by (intro space_measure_of[OF UN_space_closed])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3240  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3241  | 
lemma sets_Sup_measure'2: "sets (Sup_measure' M) = sigma_sets (\<Union>m\<in>M. space m) (\<Union>m\<in>M. sets m)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3242  | 
unfolding Sup_measure'_def by (intro sets_measure_of[OF UN_space_closed])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3243  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3244  | 
lemma sets_Sup_measure':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3245  | 
  assumes sets_eq[simp]: "\<And>m. m \<in> M \<Longrightarrow> sets m = sets A" and "M \<noteq> {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3246  | 
shows "sets (Sup_measure' M) = sets A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3247  | 
  using sets_eq[THEN sets_eq_imp_space_eq, simp] \<open>M \<noteq> {}\<close> by (simp add: Sup_measure'_def)
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3248  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3249  | 
lemma space_Sup_measure':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3250  | 
  assumes sets_eq[simp]: "\<And>m. m \<in> M \<Longrightarrow> sets m = sets A" and "M \<noteq> {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3251  | 
shows "space (Sup_measure' M) = space A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3252  | 
  using sets_eq[THEN sets_eq_imp_space_eq, simp] \<open>M \<noteq> {}\<close>
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3253  | 
by (simp add: Sup_measure'_def )  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3254  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3255  | 
lemma emeasure_Sup_measure':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3256  | 
  assumes sets_eq[simp]: "\<And>m. m \<in> M \<Longrightarrow> sets m = sets A" and "X \<in> sets A" "M \<noteq> {}"
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3257  | 
  shows "emeasure (Sup_measure' M) X = (SUP P\<in>{P. finite P \<and> P \<subseteq> M}. sup_measure.F id P X)"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3258  | 
(is "_ = ?S X")  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3259  | 
using Sup_measure'_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3260  | 
proof (rule emeasure_measure_of)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3261  | 
note sets_eq[THEN sets_eq_imp_space_eq, simp]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3262  | 
have *: "sets (Sup_measure' M) = sets A" "space (Sup_measure' M) = space A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3263  | 
    using \<open>M \<noteq> {}\<close> by (simp_all add: Sup_measure'_def)
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3264  | 
let ?\<mu> = "sup_measure.F id"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3265  | 
show "countably_additive (sets (Sup_measure' M)) ?S"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3266  | 
proof (rule countably_additiveI, goal_cases)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3267  | 
case (1 F)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3268  | 
then have **: "range F \<subseteq> sets A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3269  | 
by (auto simp: *)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3270  | 
show "(\<Sum>i. ?S (F i)) = ?S (\<Union>i. F i)"  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
3271  | 
proof (subst ennreal_suminf_SUP_eq_directed)  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3272  | 
      fix i j and N :: "nat set" assume ij: "i \<in> {P. finite P \<and> P \<subseteq> M}" "j \<in> {P. finite P \<and> P \<subseteq> M}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3273  | 
      have "(i \<noteq> {} \<longrightarrow> sets (?\<mu> i) = sets A) \<and> (j \<noteq> {} \<longrightarrow> sets (?\<mu> j) = sets A) \<and>
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3274  | 
        (i \<noteq> {} \<or> j \<noteq> {} \<longrightarrow> sets (?\<mu> (i \<union> j)) = sets A)"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3275  | 
using ij by (intro impI sets_sup_measure_F conjI) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3276  | 
then have "?\<mu> j (F n) \<le> ?\<mu> (i \<union> j) (F n) \<and> ?\<mu> i (F n) \<le> ?\<mu> (i \<union> j) (F n)" for n  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3277  | 
using ij  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3278  | 
        by (cases "i = {}"; cases "j = {}")
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3279  | 
(auto intro!: le_measureD3 sup_measure_F_mono simp: sets_sup_measure_F  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3280  | 
simp del: id_apply)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3281  | 
      with ij show "\<exists>k\<in>{P. finite P \<and> P \<subseteq> M}. \<forall>n\<in>N. ?\<mu> i (F n) \<le> ?\<mu> k (F n) \<and> ?\<mu> j (F n) \<le> ?\<mu> k (F n)"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3282  | 
by (safe intro!: bexI[of _ "i \<union> j"]) auto  | 
| 60772 | 3283  | 
next  | 
| 69313 | 3284  | 
      show "(SUP P \<in> {P. finite P \<and> P \<subseteq> M}. \<Sum>n. ?\<mu> P (F n)) = (SUP P \<in> {P. finite P \<and> P \<subseteq> M}. ?\<mu> P (\<Union>(F ` UNIV)))"
 | 
| 69661 | 3285  | 
proof (intro arg_cong [of _ _ Sup] image_cong refl)  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3286  | 
        fix i assume i: "i \<in> {P. finite P \<and> P \<subseteq> M}"
 | 
| 69313 | 3287  | 
show "(\<Sum>n. ?\<mu> i (F n)) = ?\<mu> i (\<Union>(F ` UNIV))"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3288  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3289  | 
          assume "i \<noteq> {}" with i ** show ?thesis
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3290  | 
apply (intro suminf_emeasure \<open>disjoint_family F\<close>)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3291  | 
apply (subst sets_sup_measure_F[OF _ _ sets_eq])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3292  | 
apply auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3293  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3294  | 
qed simp  | 
| 60772 | 3295  | 
qed  | 
| 
62975
 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 
hoelzl 
parents: 
62390 
diff
changeset
 | 
3296  | 
qed  | 
| 60772 | 3297  | 
qed  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3298  | 
show "positive (sets (Sup_measure' M)) ?S"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3299  | 
by (auto simp: positive_def bot_ennreal[symmetric])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3300  | 
show "X \<in> sets (Sup_measure' M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3301  | 
using assms * by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3302  | 
qed (rule UN_space_closed)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3303  | 
|
| 70136 | 3304  | 
definition\<^marker>\<open>tag important\<close> Sup_measure :: "'a measure set \<Rightarrow> 'a measure" where  | 
| 69564 | 3305  | 
"Sup_measure =  | 
3306  | 
Sup_lexord space  | 
|
3307  | 
(Sup_lexord sets Sup_measure'  | 
|
3308  | 
(\<lambda>U. sigma (\<Union>u\<in>U. space u) (\<Union>u\<in>U. sets u)))  | 
|
3309  | 
    (\<lambda>U. sigma (\<Union>u\<in>U. space u) {})"
 | 
|
3310  | 
||
| 70136 | 3311  | 
definition\<^marker>\<open>tag important\<close> Inf_measure :: "'a measure set \<Rightarrow> 'a measure" where  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3312  | 
  "Inf_measure A = Sup {x. \<forall>a\<in>A. x \<le> a}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3313  | 
|
| 70136 | 3314  | 
definition\<^marker>\<open>tag important\<close> inf_measure :: "'a measure \<Rightarrow> 'a measure \<Rightarrow> 'a measure" where  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3315  | 
  "inf_measure a b = Inf {a, b}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3316  | 
|
| 70136 | 3317  | 
definition\<^marker>\<open>tag important\<close> top_measure :: "'a measure" where  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3318  | 
  "top_measure = Inf {}"
 | 
| 60772 | 3319  | 
|
3320  | 
instance  | 
|
3321  | 
proof  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3322  | 
note UN_space_closed [simp]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3323  | 
show upper: "x \<le> Sup A" if x: "x \<in> A" for x :: "'a measure" and A  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3324  | 
unfolding Sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3325  | 
proof (intro Sup_lexord[where P="\<lambda>y. x \<le> y"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3326  | 
assume "\<And>a. a \<in> A \<Longrightarrow> space a \<noteq> (\<Union>a\<in>A. space a)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3327  | 
    from this[OF \<open>x \<in> A\<close>] \<open>x \<in> A\<close> show "x \<le> sigma (\<Union>a\<in>A. space a) {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3328  | 
by (intro less_eq_measure.intros) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3329  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3330  | 
    fix a S assume "a \<in> A" and a: "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3331  | 
and neq: "\<And>aa. aa \<in> S \<Longrightarrow> sets aa \<noteq> (\<Union>a\<in>S. sets a)"  | 
| 69313 | 3332  | 
have sp_a: "space a = (\<Union>(space ` S))"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3333  | 
using \<open>a\<in>A\<close> by (auto simp: S)  | 
| 69313 | 3334  | 
show "x \<le> sigma (\<Union>(space ` S)) (\<Union>(sets ` S))"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3335  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3336  | 
assume [simp]: "space x = space a"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3337  | 
have "sets x \<subset> (\<Union>a\<in>S. sets a)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3338  | 
using \<open>x\<in>A\<close> neq[of x] by (auto simp: S)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3339  | 
also have "\<dots> \<subseteq> sigma_sets (\<Union>x\<in>S. space x) (\<Union>x\<in>S. sets x)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3340  | 
by (rule sigma_sets_superset_generator)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3341  | 
finally show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3342  | 
by (intro less_eq_measure.intros(2)) (simp_all add: sp_a)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3343  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3344  | 
assume "space x \<noteq> space a"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3345  | 
moreover have "space x \<le> space a"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3346  | 
unfolding a using \<open>x\<in>A\<close> by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3347  | 
ultimately show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3348  | 
by (intro less_eq_measure.intros) (simp add: less_le sp_a)  | 
| 60772 | 3349  | 
qed  | 
3350  | 
next  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3351  | 
    fix a b S S' assume "a \<in> A" and a: "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3352  | 
      and "b \<in> S" and b: "sets b = (\<Union>a\<in>S. sets a)" and S': "S' = {a' \<in> S. sets a' = sets b}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3353  | 
    then have "S' \<noteq> {}" "space b = space a"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3354  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3355  | 
have sets_eq: "\<And>x. x \<in> S' \<Longrightarrow> sets x = sets b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3356  | 
by (auto simp: S')  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3357  | 
note sets_eq[THEN sets_eq_imp_space_eq, simp]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3358  | 
have *: "sets (Sup_measure' S') = sets b" "space (Sup_measure' S') = space b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3359  | 
      using \<open>S' \<noteq> {}\<close> by (simp_all add: Sup_measure'_def sets_eq)
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3360  | 
show "x \<le> Sup_measure' S'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3361  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3362  | 
assume "x \<in> S"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3363  | 
with \<open>b \<in> S\<close> have "space x = space b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3364  | 
by (simp add: S)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3365  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3366  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3367  | 
assume "x \<in> S'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3368  | 
show "x \<le> Sup_measure' S'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3369  | 
proof (intro le_measure[THEN iffD2] ballI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3370  | 
show "sets x = sets (Sup_measure' S')"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3371  | 
using \<open>x\<in>S'\<close> * by (simp add: S')  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3372  | 
fix X assume "X \<in> sets x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3373  | 
show "emeasure x X \<le> emeasure (Sup_measure' S') X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3374  | 
proof (subst emeasure_Sup_measure'[OF _ \<open>X \<in> sets x\<close>])  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3375  | 
            show "emeasure x X \<le> (SUP P \<in> {P. finite P \<and> P \<subseteq> S'}. emeasure (sup_measure.F id P) X)"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3376  | 
              using \<open>x\<in>S'\<close> by (intro SUP_upper2[where i="{x}"]) auto
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3377  | 
qed (insert \<open>x\<in>S'\<close> S', auto)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3378  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3379  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3380  | 
assume "x \<notin> S'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3381  | 
then have "sets x \<noteq> sets b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3382  | 
using \<open>x\<in>S\<close> by (auto simp: S')  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3383  | 
moreover have "sets x \<le> sets b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3384  | 
using \<open>x\<in>S\<close> unfolding b by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3385  | 
ultimately show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3386  | 
using * \<open>x \<in> S\<close>  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3387  | 
by (intro less_eq_measure.intros(2))  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3388  | 
(simp_all add: * \<open>space x = space b\<close> less_le)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3389  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3390  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3391  | 
assume "x \<notin> S"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3392  | 
with \<open>x\<in>A\<close> \<open>x \<notin> S\<close> \<open>space b = space a\<close> show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3393  | 
by (intro less_eq_measure.intros)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3394  | 
(simp_all add: * less_le a SUP_upper S)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3395  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3396  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3397  | 
show least: "Sup A \<le> x" if x: "\<And>z. z \<in> A \<Longrightarrow> z \<le> x" for x :: "'a measure" and A  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3398  | 
unfolding Sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3399  | 
proof (intro Sup_lexord[where P="\<lambda>y. y \<le> x"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3400  | 
assume "\<And>a. a \<in> A \<Longrightarrow> space a \<noteq> (\<Union>a\<in>A. space a)"  | 
| 69313 | 3401  | 
    show "sigma (\<Union>(space ` A)) {} \<le> x"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3402  | 
using x[THEN le_measureD1] by (subst sigma_le_iff) auto  | 
| 60772 | 3403  | 
next  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3404  | 
    fix a S assume "a \<in> A" "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3405  | 
"\<And>a. a \<in> S \<Longrightarrow> sets a \<noteq> (\<Union>a\<in>S. sets a)"  | 
| 69313 | 3406  | 
have "\<Union>(space ` S) \<subseteq> space x"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3407  | 
using S le_measureD1[OF x] by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3408  | 
moreover  | 
| 69313 | 3409  | 
have "\<Union>(space ` S) = space a"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3410  | 
using \<open>a\<in>A\<close> S by auto  | 
| 69313 | 3411  | 
then have "space x = \<Union>(space ` S) \<Longrightarrow> \<Union>(sets ` S) \<subseteq> sets x"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3412  | 
using \<open>a \<in> A\<close> le_measureD2[OF x] by (auto simp: S)  | 
| 69313 | 3413  | 
ultimately show "sigma (\<Union>(space ` S)) (\<Union>(sets ` S)) \<le> x"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3414  | 
by (subst sigma_le_iff) simp_all  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3415  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3416  | 
    fix a b S S' assume "a \<in> A" and a: "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3417  | 
      and "b \<in> S" and b: "sets b = (\<Union>a\<in>S. sets a)" and S': "S' = {a' \<in> S. sets a' = sets b}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3418  | 
    then have "S' \<noteq> {}" "space b = space a"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3419  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3420  | 
have sets_eq: "\<And>x. x \<in> S' \<Longrightarrow> sets x = sets b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3421  | 
by (auto simp: S')  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3422  | 
note sets_eq[THEN sets_eq_imp_space_eq, simp]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3423  | 
have *: "sets (Sup_measure' S') = sets b" "space (Sup_measure' S') = space b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3424  | 
      using \<open>S' \<noteq> {}\<close> by (simp_all add: Sup_measure'_def sets_eq)
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3425  | 
show "Sup_measure' S' \<le> x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3426  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3427  | 
assume "space x = space a"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3428  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3429  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3430  | 
assume **: "sets x = sets b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3431  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3432  | 
proof (intro le_measure[THEN iffD2] ballI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3433  | 
show ***: "sets (Sup_measure' S') = sets x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3434  | 
by (simp add: * **)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3435  | 
fix X assume "X \<in> sets (Sup_measure' S')"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3436  | 
show "emeasure (Sup_measure' S') X \<le> emeasure x X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3437  | 
unfolding ***  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3438  | 
proof (subst emeasure_Sup_measure'[OF _ \<open>X \<in> sets (Sup_measure' S')\<close>])  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3439  | 
            show "(SUP P \<in> {P. finite P \<and> P \<subseteq> S'}. emeasure (sup_measure.F id P) X) \<le> emeasure x X"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3440  | 
proof (safe intro!: SUP_least)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3441  | 
fix P assume P: "finite P" "P \<subseteq> S'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3442  | 
show "emeasure (sup_measure.F id P) X \<le> emeasure x X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3443  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3444  | 
                assume "P = {}" then show ?thesis
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3445  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3446  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3447  | 
                assume "P \<noteq> {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3448  | 
from P have "finite P" "P \<subseteq> A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3449  | 
unfolding S' S by (simp_all add: subset_eq)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3450  | 
then have "sup_measure.F id P \<le> x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3451  | 
by (induction P) (auto simp: x)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3452  | 
moreover have "sets (sup_measure.F id P) = sets x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3453  | 
                  using \<open>finite P\<close> \<open>P \<noteq> {}\<close> \<open>P \<subseteq> S'\<close> \<open>sets x = sets b\<close>
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3454  | 
by (intro sets_sup_measure_F) (auto simp: S')  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3455  | 
ultimately show "emeasure (sup_measure.F id P) X \<le> emeasure x X"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3456  | 
by (rule le_measureD3)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3457  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3458  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3459  | 
show "m \<in> S' \<Longrightarrow> sets m = sets (Sup_measure' S')" for m  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3460  | 
unfolding * by (simp add: S')  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3461  | 
qed fact  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3462  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3463  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3464  | 
assume "sets x \<noteq> sets b"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3465  | 
moreover have "sets b \<le> sets x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3466  | 
unfolding b S using x[THEN le_measureD2] \<open>space x = space a\<close> by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3467  | 
ultimately show "Sup_measure' S' \<le> x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3468  | 
using \<open>space x = space a\<close> \<open>b \<in> S\<close>  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3469  | 
by (intro less_eq_measure.intros(2)) (simp_all add: * S)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3470  | 
qed  | 
| 60772 | 3471  | 
next  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3472  | 
assume "space x \<noteq> space a"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3473  | 
then have "space a < space x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3474  | 
using le_measureD1[OF x[OF \<open>a\<in>A\<close>]] by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3475  | 
then show "Sup_measure' S' \<le> x"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3476  | 
by (intro less_eq_measure.intros) (simp add: * \<open>space b = space a\<close>)  | 
| 60772 | 3477  | 
qed  | 
3478  | 
qed  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3479  | 
  show "Sup {} = (bot::'a measure)" "Inf {} = (top::'a measure)"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3480  | 
by (auto intro!: antisym least simp: top_measure_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3481  | 
show lower: "x \<in> A \<Longrightarrow> Inf A \<le> x" for x :: "'a measure" and A  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3482  | 
unfolding Inf_measure_def by (intro least) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3483  | 
show greatest: "(\<And>z. z \<in> A \<Longrightarrow> x \<le> z) \<Longrightarrow> x \<le> Inf A" for x :: "'a measure" and A  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3484  | 
unfolding Inf_measure_def by (intro upper) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3485  | 
show "inf x y \<le> x" "inf x y \<le> y" "x \<le> y \<Longrightarrow> x \<le> z \<Longrightarrow> x \<le> inf y z" for x y z :: "'a measure"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3486  | 
by (auto simp: inf_measure_def intro!: lower greatest)  | 
| 60772 | 3487  | 
qed  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3488  | 
|
| 60772 | 3489  | 
end  | 
3490  | 
||
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3491  | 
lemma sets_SUP:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3492  | 
assumes "\<And>x. x \<in> I \<Longrightarrow> sets (M x) = sets N"  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3493  | 
  shows "I \<noteq> {} \<Longrightarrow> sets (SUP i\<in>I. M i) = sets N"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3494  | 
unfolding Sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3495  | 
using assms assms[THEN sets_eq_imp_space_eq]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3496  | 
sets_Sup_measure'[where A=N and M="M`I"]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3497  | 
by (intro Sup_lexord1[where P="\<lambda>x. sets x = sets N"]) auto  | 
| 61633 | 3498  | 
|
3499  | 
lemma emeasure_SUP:  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3500  | 
  assumes sets: "\<And>i. i \<in> I \<Longrightarrow> sets (M i) = sets N" "X \<in> sets N" "I \<noteq> {}"
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3501  | 
  shows "emeasure (SUP i\<in>I. M i) X = (SUP J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. emeasure (SUP i\<in>J. M i) X)"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3502  | 
proof -  | 
| 
63658
 
7faa9bf9860b
epheremal interpretation keeps auxiliary definition localized
 
haftmann 
parents: 
63657 
diff
changeset
 | 
3503  | 
interpret sup_measure: comm_monoid_set sup "bot :: 'b measure"  | 
| 
 
7faa9bf9860b
epheremal interpretation keeps auxiliary definition localized
 
haftmann 
parents: 
63657 
diff
changeset
 | 
3504  | 
by standard (auto intro!: antisym)  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3505  | 
have eq: "finite J \<Longrightarrow> sup_measure.F id J = (SUP i\<in>J. i)" for J :: "'b measure set"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3506  | 
by (induction J rule: finite_induct) auto  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3507  | 
  have 1: "J \<noteq> {} \<Longrightarrow> J \<subseteq> I \<Longrightarrow> sets (SUP x\<in>J. M x) = sets N" for J
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3508  | 
by (intro sets_SUP sets) (auto )  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3509  | 
  from \<open>I \<noteq> {}\<close> obtain i where "i\<in>I" by auto
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3510  | 
  have "Sup_measure' (M`I) X = (SUP P\<in>{P. finite P \<and> P \<subseteq> M`I}. sup_measure.F id P X)"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3511  | 
using sets by (intro emeasure_Sup_measure') auto  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3512  | 
also have "Sup_measure' (M`I) = (SUP i\<in>I. M i)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3513  | 
    unfolding Sup_measure_def using \<open>I \<noteq> {}\<close> sets sets(1)[THEN sets_eq_imp_space_eq]
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3514  | 
by (intro Sup_lexord1[where P="\<lambda>x. _ = x"]) auto  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3515  | 
  also have "(SUP P\<in>{P. finite P \<and> P \<subseteq> M`I}. sup_measure.F id P X) =
 | 
| 
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3516  | 
    (SUP J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. (SUP i\<in>J. M i) X)"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3517  | 
proof (intro SUP_eq)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3518  | 
    fix J assume "J \<in> {P. finite P \<and> P \<subseteq> M`I}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3519  | 
then obtain J' where J': "J' \<subseteq> I" "finite J'" and J: "J = M`J'" and "finite J"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3520  | 
using finite_subset_image[of J M I] by auto  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3521  | 
    show "\<exists>j\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. sup_measure.F id J X \<le> (SUP i\<in>j. M i) X"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3522  | 
proof cases  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3523  | 
      assume "J' = {}" with \<open>i \<in> I\<close> show ?thesis
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3524  | 
by (auto simp add: J)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3525  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3526  | 
      assume "J' \<noteq> {}" with J J' show ?thesis
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3527  | 
by (intro bexI[of _ "J'"]) (auto simp add: eq simp del: id_apply)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3528  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3529  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3530  | 
    fix J assume J: "J \<in> {P. P \<noteq> {} \<and> finite P \<and> P \<subseteq> I}"
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3531  | 
    show "\<exists>J'\<in>{J. finite J \<and> J \<subseteq> M`I}. (SUP i\<in>J. M i) X \<le> sup_measure.F id J' X"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3532  | 
using J by (intro bexI[of _ "M`J"]) (auto simp add: eq simp del: id_apply)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3533  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3534  | 
finally show ?thesis .  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3535  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3536  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3537  | 
lemma emeasure_SUP_chain:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3538  | 
assumes sets: "\<And>i. i \<in> A \<Longrightarrow> sets (M i) = sets N" "X \<in> sets N"  | 
| 67399 | 3539  | 
  assumes ch: "Complete_Partial_Order.chain (\<le>) (M ` A)" and "A \<noteq> {}"
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3540  | 
shows "emeasure (SUP i\<in>A. M i) X = (SUP i\<in>A. emeasure (M i) X)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3541  | 
proof (subst emeasure_SUP[OF sets \<open>A \<noteq> {}\<close>])
 | 
| 69313 | 3542  | 
  show "(SUP J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}. emeasure (Sup (M ` J)) X) = (SUP i\<in>A. emeasure (M i) X)"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3543  | 
proof (rule SUP_eq)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3544  | 
    fix J assume "J \<in> {J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}"
 | 
| 67399 | 3545  | 
    then have J: "Complete_Partial_Order.chain (\<le>) (M ` J)" "finite J" "J \<noteq> {}" and "J \<subseteq> A"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3546  | 
using ch[THEN chain_subset, of "M`J"] by auto  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3547  | 
with in_chain_finite[OF J(1)] obtain j where "j \<in> J" "(SUP j\<in>J. M j) = M j"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3548  | 
by auto  | 
| 69313 | 3549  | 
with \<open>J \<subseteq> A\<close> show "\<exists>j\<in>A. emeasure (Sup (M ` J)) X \<le> emeasure (M j) X"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3550  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3551  | 
next  | 
| 69313 | 3552  | 
    fix j assume "j\<in>A" then show "\<exists>i\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}. emeasure (M j) X \<le> emeasure (Sup (M ` i)) X"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3553  | 
      by (intro bexI[of _ "{j}"]) auto
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3554  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3555  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3556  | 
|
| 70136 | 3557  | 
subsubsection\<^marker>\<open>tag unimportant\<close> \<open>Supremum of a set of \<open>\<sigma>\<close>-algebras\<close>  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3558  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3559  | 
lemma space_Sup_eq_UN: "space (Sup M) = (\<Union>x\<in>M. space x)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3560  | 
unfolding Sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3561  | 
apply (intro Sup_lexord[where P="\<lambda>x. space x = _"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3562  | 
apply (subst space_Sup_measure'2)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3563  | 
apply auto []  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3564  | 
apply (subst space_measure_of[OF UN_space_closed])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3565  | 
apply auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3566  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3567  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3568  | 
lemma sets_Sup_eq:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3569  | 
  assumes *: "\<And>m. m \<in> M \<Longrightarrow> space m = X" and "M \<noteq> {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3570  | 
shows "sets (Sup M) = sigma_sets X (\<Union>x\<in>M. sets x)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3571  | 
unfolding Sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3572  | 
apply (rule Sup_lexord1)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3573  | 
apply fact  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3574  | 
apply (simp add: assms)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3575  | 
apply (rule Sup_lexord)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3576  | 
subgoal premises that for a S  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3577  | 
unfolding that(3) that(2)[symmetric]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3578  | 
using that(1)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3579  | 
apply (subst sets_Sup_measure'2)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3580  | 
apply (intro arg_cong2[where f=sigma_sets])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3581  | 
apply (auto simp: *)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3582  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3583  | 
apply (subst sets_measure_of[OF UN_space_closed])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3584  | 
apply (simp add: assms)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3585  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3586  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3587  | 
lemma in_sets_Sup: "(\<And>m. m \<in> M \<Longrightarrow> space m = X) \<Longrightarrow> m \<in> M \<Longrightarrow> A \<in> sets m \<Longrightarrow> A \<in> sets (Sup M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3588  | 
by (subst sets_Sup_eq[where X=X]) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3589  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3590  | 
lemma Sup_lexord_rel:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3591  | 
assumes "\<And>i. i \<in> I \<Longrightarrow> k (A i) = k (B i)"  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3592  | 
    "R (c (A ` {a \<in> I. k (B a) = (SUP x\<in>I. k (B x))})) (c (B ` {a \<in> I. k (B a) = (SUP x\<in>I. k (B x))}))"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3593  | 
"R (s (A`I)) (s (B`I))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3594  | 
shows "R (Sup_lexord k c s (A`I)) (Sup_lexord k c s (B`I))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3595  | 
proof -  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3596  | 
  have "A ` {a \<in> I. k (B a) = (SUP x\<in>I. k (B x))} =  {a \<in> A ` I. k a = (SUP x\<in>I. k (B x))}"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3597  | 
using assms(1) by auto  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3598  | 
  moreover have "B ` {a \<in> I. k (B a) = (SUP x\<in>I. k (B x))} =  {a \<in> B ` I. k a = (SUP x\<in>I. k (B x))}"
 | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3599  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3600  | 
ultimately show ?thesis  | 
| 
69861
 
62e47f06d22c
avoid context-sensitive simp rules whose context-free form (image_comp) is not simp by default
 
haftmann 
parents: 
69661 
diff
changeset
 | 
3601  | 
using assms by (auto simp: Sup_lexord_def Let_def image_comp)  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3602  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3603  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3604  | 
lemma sets_SUP_cong:  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3605  | 
assumes eq: "\<And>i. i \<in> I \<Longrightarrow> sets (M i) = sets (N i)" shows "sets (SUP i\<in>I. M i) = sets (SUP i\<in>I. N i)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3606  | 
unfolding Sup_measure_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3607  | 
using eq eq[THEN sets_eq_imp_space_eq]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3608  | 
apply (intro Sup_lexord_rel[where R="\<lambda>x y. sets x = sets y"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3609  | 
apply simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3610  | 
apply simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3611  | 
apply (simp add: sets_Sup_measure'2)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3612  | 
apply (intro arg_cong2[where f="\<lambda>x y. sets (sigma x y)"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3613  | 
apply auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3614  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3615  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3616  | 
lemma sets_Sup_in_sets:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3617  | 
  assumes "M \<noteq> {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3618  | 
assumes "\<And>m. m \<in> M \<Longrightarrow> space m = space N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3619  | 
assumes "\<And>m. m \<in> M \<Longrightarrow> sets m \<subseteq> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3620  | 
shows "sets (Sup M) \<subseteq> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3621  | 
proof -  | 
| 69313 | 3622  | 
have *: "\<Union>(space ` M) = space N"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3623  | 
using assms by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3624  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3625  | 
unfolding * using assms by (subst sets_Sup_eq[of M "space N"]) (auto intro!: sets.sigma_sets_subset)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3626  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3627  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3628  | 
lemma measurable_Sup1:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3629  | 
assumes m: "m \<in> M" and f: "f \<in> measurable m N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3630  | 
and const_space: "\<And>m n. m \<in> M \<Longrightarrow> n \<in> M \<Longrightarrow> space m = space n"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3631  | 
shows "f \<in> measurable (Sup M) N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3632  | 
proof -  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3633  | 
have "space (Sup M) = space m"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3634  | 
using m by (auto simp add: space_Sup_eq_UN dest: const_space)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3635  | 
then show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3636  | 
using m f unfolding measurable_def by (auto intro: in_sets_Sup[OF const_space])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3637  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3638  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3639  | 
lemma measurable_Sup2:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3640  | 
  assumes M: "M \<noteq> {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3641  | 
assumes f: "\<And>m. m \<in> M \<Longrightarrow> f \<in> measurable N m"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3642  | 
and const_space: "\<And>m n. m \<in> M \<Longrightarrow> n \<in> M \<Longrightarrow> space m = space n"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3643  | 
shows "f \<in> measurable N (Sup M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3644  | 
proof -  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3645  | 
from M obtain m where "m \<in> M" by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3646  | 
have space_eq: "\<And>n. n \<in> M \<Longrightarrow> space n = space m"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3647  | 
by (intro const_space \<open>m \<in> M\<close>)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3648  | 
have "f \<in> measurable N (sigma (\<Union>m\<in>M. space m) (\<Union>m\<in>M. sets m))"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3649  | 
proof (rule measurable_measure_of)  | 
| 69313 | 3650  | 
show "f \<in> space N \<rightarrow> \<Union>(space ` M)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3651  | 
using measurable_space[OF f] M by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3652  | 
qed (auto intro: measurable_sets f dest: sets.sets_into_space)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3653  | 
also have "measurable N (sigma (\<Union>m\<in>M. space m) (\<Union>m\<in>M. sets m)) = measurable N (Sup M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3654  | 
apply (intro measurable_cong_sets refl)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3655  | 
apply (subst sets_Sup_eq[OF space_eq M])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3656  | 
apply simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3657  | 
apply (subst sets_measure_of[OF UN_space_closed])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3658  | 
apply (simp add: space_eq M)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3659  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3660  | 
finally show ?thesis .  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3661  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3662  | 
|
| 
64320
 
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
 
hoelzl 
parents: 
64283 
diff
changeset
 | 
3663  | 
lemma measurable_SUP2:  | 
| 
 
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
 
hoelzl 
parents: 
64283 
diff
changeset
 | 
3664  | 
  "I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> f \<in> measurable N (M i)) \<Longrightarrow>
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3665  | 
(\<And>i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> space (M i) = space (M j)) \<Longrightarrow> f \<in> measurable N (SUP i\<in>I. M i)"  | 
| 
64320
 
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
 
hoelzl 
parents: 
64283 
diff
changeset
 | 
3666  | 
by (auto intro!: measurable_Sup2)  | 
| 
 
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
 
hoelzl 
parents: 
64283 
diff
changeset
 | 
3667  | 
|
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3668  | 
lemma sets_Sup_sigma:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3669  | 
  assumes [simp]: "M \<noteq> {}" and M: "\<And>m. m \<in> M \<Longrightarrow> m \<subseteq> Pow \<Omega>"
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3670  | 
shows "sets (SUP m\<in>M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3671  | 
proof -  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3672  | 
  { fix a m assume "a \<in> sigma_sets \<Omega> m" "m \<in> M"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3673  | 
then have "a \<in> sigma_sets \<Omega> (\<Union>M)"  | 
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
3674  | 
by induction (auto intro: sigma_sets.intros(2-)) }  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3675  | 
then show "sets (SUP m\<in>M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3676  | 
apply (subst sets_Sup_eq[where X="\<Omega>"])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3677  | 
apply (auto simp add: M) []  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3678  | 
apply auto []  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3679  | 
apply (simp add: space_measure_of_conv M Union_least)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3680  | 
apply (rule sigma_sets_eqI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3681  | 
apply auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3682  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3683  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3684  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3685  | 
lemma Sup_sigma:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3686  | 
  assumes [simp]: "M \<noteq> {}" and M: "\<And>m. m \<in> M \<Longrightarrow> m \<subseteq> Pow \<Omega>"
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3687  | 
shows "(SUP m\<in>M. sigma \<Omega> m) = (sigma \<Omega> (\<Union>M))"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3688  | 
proof (intro antisym SUP_least)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3689  | 
have *: "\<Union>M \<subseteq> Pow \<Omega>"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3690  | 
using M by auto  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3691  | 
show "sigma \<Omega> (\<Union>M) \<le> (SUP m\<in>M. sigma \<Omega> m)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3692  | 
proof (intro less_eq_measure.intros(3))  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3693  | 
show "space (sigma \<Omega> (\<Union>M)) = space (SUP m\<in>M. sigma \<Omega> m)"  | 
| 
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3694  | 
"sets (sigma \<Omega> (\<Union>M)) = sets (SUP m\<in>M. sigma \<Omega> m)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3695  | 
using sets_Sup_sigma[OF assms] sets_Sup_sigma[OF assms, THEN sets_eq_imp_space_eq]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3696  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3697  | 
qed (simp add: emeasure_sigma le_fun_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3698  | 
fix m assume "m \<in> M" then show "sigma \<Omega> m \<le> sigma \<Omega> (\<Union>M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3699  | 
by (subst sigma_le_iff) (auto simp add: M *)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3700  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3701  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3702  | 
lemma SUP_sigma_sigma:  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3703  | 
  "M \<noteq> {} \<Longrightarrow> (\<And>m. m \<in> M \<Longrightarrow> f m \<subseteq> Pow \<Omega>) \<Longrightarrow> (SUP m\<in>M. sigma \<Omega> (f m)) = sigma \<Omega> (\<Union>m\<in>M. f m)"
 | 
| 
69861
 
62e47f06d22c
avoid context-sensitive simp rules whose context-free form (image_comp) is not simp by default
 
haftmann 
parents: 
69661 
diff
changeset
 | 
3704  | 
using Sup_sigma[of "f`M" \<Omega>] by (auto simp: image_comp)  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3705  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3706  | 
lemma sets_vimage_Sup_eq:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3707  | 
  assumes *: "M \<noteq> {}" "f \<in> X \<rightarrow> Y" "\<And>m. m \<in> M \<Longrightarrow> space m = Y"
 | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3708  | 
shows "sets (vimage_algebra X f (Sup M)) = sets (SUP m \<in> M. vimage_algebra X f m)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3709  | 
(is "?IS = ?SI")  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3710  | 
proof  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3711  | 
show "?IS \<subseteq> ?SI"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3712  | 
apply (intro sets_image_in_sets measurable_Sup2)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3713  | 
apply (simp add: space_Sup_eq_UN *)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3714  | 
apply (simp add: *)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3715  | 
apply (intro measurable_Sup1)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3716  | 
apply (rule imageI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3717  | 
apply assumption  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3718  | 
apply (rule measurable_vimage_algebra1)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3719  | 
apply (auto simp: *)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3720  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3721  | 
show "?SI \<subseteq> ?IS"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3722  | 
apply (intro sets_Sup_in_sets)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3723  | 
apply (auto simp: *) []  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3724  | 
apply (auto simp: *) []  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3725  | 
apply (elim imageE)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3726  | 
apply simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3727  | 
apply (rule sets_image_in_sets)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3728  | 
apply simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3729  | 
apply (simp add: measurable_def)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3730  | 
apply (simp add: * space_Sup_eq_UN sets_vimage_algebra2)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3731  | 
apply (auto intro: in_sets_Sup[OF *(3)])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3732  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3733  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3734  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3735  | 
lemma restrict_space_eq_vimage_algebra':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3736  | 
"sets (restrict_space M \<Omega>) = sets (vimage_algebra (\<Omega> \<inter> space M) (\<lambda>x. x) M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3737  | 
proof -  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3738  | 
  have *: "{A \<inter> (\<Omega> \<inter> space M) |A. A \<in> sets M} = {A \<inter> \<Omega> |A. A \<in> sets M}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3739  | 
using sets.sets_into_space[of _ M] by blast  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3740  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3741  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3742  | 
unfolding restrict_space_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3743  | 
by (subst sets_measure_of)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3744  | 
(auto simp add: image_subset_iff sets_vimage_algebra * dest: sets.sets_into_space intro!: arg_cong2[where f=sigma_sets])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3745  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3746  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3747  | 
lemma sigma_le_sets:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3748  | 
assumes [simp]: "A \<subseteq> Pow X" shows "sets (sigma X A) \<subseteq> sets N \<longleftrightarrow> X \<in> sets N \<and> A \<subseteq> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3749  | 
proof  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3750  | 
have "X \<in> sigma_sets X A" "A \<subseteq> sigma_sets X A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3751  | 
by (auto intro: sigma_sets_top)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3752  | 
moreover assume "sets (sigma X A) \<subseteq> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3753  | 
ultimately show "X \<in> sets N \<and> A \<subseteq> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3754  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3755  | 
next  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3756  | 
assume *: "X \<in> sets N \<and> A \<subseteq> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3757  | 
  { fix Y assume "Y \<in> sigma_sets X A" from this * have "Y \<in> sets N"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3758  | 
by induction auto }  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3759  | 
then show "sets (sigma X A) \<subseteq> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3760  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3761  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3762  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3763  | 
lemma measurable_iff_sets:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3764  | 
"f \<in> measurable M N \<longleftrightarrow> (f \<in> space M \<rightarrow> space N \<and> sets (vimage_algebra (space M) f N) \<subseteq> sets M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3765  | 
proof -  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3766  | 
  have *: "{f -` A \<inter> space M |A. A \<in> sets N} \<subseteq> Pow (space M)"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3767  | 
by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3768  | 
show ?thesis  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3769  | 
unfolding measurable_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3770  | 
by (auto simp add: vimage_algebra_def sigma_le_sets[OF *])  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3771  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3772  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3773  | 
lemma sets_vimage_algebra_space: "X \<in> sets (vimage_algebra X f M)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3774  | 
using sets.top[of "vimage_algebra X f M"] by simp  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3775  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3776  | 
lemma measurable_mono:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3777  | 
assumes N: "sets N' \<le> sets N" "space N = space N'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3778  | 
assumes M: "sets M \<le> sets M'" "space M = space M'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3779  | 
shows "measurable M N \<subseteq> measurable M' N'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3780  | 
unfolding measurable_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3781  | 
proof safe  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3782  | 
fix f A assume "f \<in> space M \<rightarrow> space N" "A \<in> sets N'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3783  | 
moreover assume "\<forall>y\<in>sets N. f -` y \<inter> space M \<in> sets M" note this[THEN bspec, of A]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3784  | 
ultimately show "f -` A \<inter> space M' \<in> sets M'"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3785  | 
using assms by auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3786  | 
qed (insert N M, auto)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3787  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3788  | 
lemma measurable_Sup_measurable:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3789  | 
assumes f: "f \<in> space N \<rightarrow> A"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3790  | 
  shows "f \<in> measurable N (Sup {M. space M = A \<and> f \<in> measurable N M})"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3791  | 
proof (rule measurable_Sup2)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3792  | 
  show "{M. space M = A \<and> f \<in> measurable N M} \<noteq> {}"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3793  | 
using f unfolding ex_in_conv[symmetric]  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3794  | 
    by (intro exI[of _ "sigma A {}"]) (auto intro!: measurable_measure_of)
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3795  | 
qed auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3796  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3797  | 
lemma (in sigma_algebra) sigma_sets_subset':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3798  | 
assumes a: "a \<subseteq> M" "\<Omega>' \<in> M"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3799  | 
shows "sigma_sets \<Omega>' a \<subseteq> M"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3800  | 
proof  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3801  | 
show "x \<in> M" if x: "x \<in> sigma_sets \<Omega>' a" for x  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3802  | 
using x by (induct rule: sigma_sets.induct) (insert a, auto)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3803  | 
qed  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3804  | 
|
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3805  | 
lemma in_sets_SUP: "i \<in> I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> space (M i) = Y) \<Longrightarrow> X \<in> sets (M i) \<Longrightarrow> X \<in> sets (SUP i\<in>I. M i)"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3806  | 
by (intro in_sets_Sup[where X=Y]) auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3807  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3808  | 
lemma measurable_SUP1:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3809  | 
"i \<in> I \<Longrightarrow> f \<in> measurable (M i) N \<Longrightarrow> (\<And>m n. m \<in> I \<Longrightarrow> n \<in> I \<Longrightarrow> space (M m) = space (M n)) \<Longrightarrow>  | 
| 
69260
 
0a9688695a1b
removed relics of ASCII syntax for indexed big operators
 
haftmann 
parents: 
69164 
diff
changeset
 | 
3810  | 
f \<in> measurable (SUP i\<in>I. M i) N"  | 
| 
63333
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3811  | 
by (auto intro: measurable_Sup1)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3812  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3813  | 
lemma sets_image_in_sets':  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3814  | 
assumes X: "X \<in> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3815  | 
assumes f: "\<And>A. A \<in> sets M \<Longrightarrow> f -` A \<inter> X \<in> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3816  | 
shows "sets (vimage_algebra X f M) \<subseteq> sets N"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3817  | 
unfolding sets_vimage_algebra  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3818  | 
by (rule sets.sigma_sets_subset') (auto intro!: measurable_sets X f)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3819  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3820  | 
lemma mono_vimage_algebra:  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3821  | 
"sets M \<le> sets N \<Longrightarrow> sets (vimage_algebra X f M) \<subseteq> sets (vimage_algebra X f N)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3822  | 
  using sets.top[of "sigma X {f -` A \<inter> X |A. A \<in> sets N}"]
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3823  | 
unfolding vimage_algebra_def  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3824  | 
apply (subst (asm) space_measure_of)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3825  | 
apply auto []  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3826  | 
apply (subst sigma_le_sets)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3827  | 
apply auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3828  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3829  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3830  | 
lemma mono_restrict_space: "sets M \<le> sets N \<Longrightarrow> sets (restrict_space M X) \<subseteq> sets (restrict_space N X)"  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3831  | 
unfolding sets_restrict_space by (rule image_mono)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3832  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3833  | 
lemma sets_eq_bot: "sets M = {{}} \<longleftrightarrow> M = bot"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3834  | 
apply safe  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3835  | 
apply (intro measure_eqI)  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3836  | 
apply auto  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3837  | 
done  | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3838  | 
|
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3839  | 
lemma sets_eq_bot2: "{{}} = sets M \<longleftrightarrow> M = bot"
 | 
| 
 
158ab2239496
Probability: show that measures form a complete lattice
 
hoelzl 
parents: 
63040 
diff
changeset
 | 
3840  | 
using sets_eq_bot[of M] by blast  | 
| 61633 | 3841  | 
|
| 
63626
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3842  | 
|
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3843  | 
lemma (in finite_measure) countable_support:  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3844  | 
  "countable {x. measure M {x} \<noteq> 0}"
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3845  | 
proof cases  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3846  | 
assume "measure M (space M) = 0"  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3847  | 
  with bounded_measure measure_le_0_iff have "{x. measure M {x} \<noteq> 0} = {}"
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3848  | 
by auto  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3849  | 
then show ?thesis  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3850  | 
by simp  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3851  | 
next  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3852  | 
  let ?M = "measure M (space M)" and ?m = "\<lambda>x. measure M {x}"
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3853  | 
assume "?M \<noteq> 0"  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3854  | 
  then have *: "{x. ?m x \<noteq> 0} = (\<Union>n. {x. ?M / Suc n < ?m x})"
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3855  | 
using reals_Archimedean[of "?m x / ?M" for x]  | 
| 
63958
 
02de4a58e210
HOL-Analysis: add measurable sets with finite measures, prove affine transformation rule for the Lebesgue measure
 
hoelzl 
parents: 
63940 
diff
changeset
 | 
3856  | 
by (auto simp: field_simps not_le[symmetric] divide_le_0_iff measure_le_0_iff)  | 
| 
63626
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3857  | 
  have **: "\<And>n. finite {x. ?M / Suc n < ?m x}"
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3858  | 
proof (rule ccontr)  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3859  | 
    fix n assume "infinite {x. ?M / Suc n < ?m x}" (is "infinite ?X")
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3860  | 
then obtain X where "finite X" "card X = Suc (Suc n)" "X \<subseteq> ?X"  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3861  | 
by (metis infinite_arbitrarily_large)  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3862  | 
from this(3) have *: "\<And>x. x \<in> X \<Longrightarrow> ?M / Suc n \<le> ?m x"  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3863  | 
by auto  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3864  | 
    { fix x assume "x \<in> X"
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3865  | 
from \<open>?M \<noteq> 0\<close> *[OF this] have "?m x \<noteq> 0" by (auto simp: field_simps measure_le_0_iff)  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3866  | 
      then have "{x} \<in> sets M" by (auto dest: measure_notin_sets) }
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3867  | 
note singleton_sets = this  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3868  | 
have "?M < (\<Sum>x\<in>X. ?M / Suc n)"  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3869  | 
using \<open>?M \<noteq> 0\<close>  | 
| 
63658
 
7faa9bf9860b
epheremal interpretation keeps auxiliary definition localized
 
haftmann 
parents: 
63657 
diff
changeset
 | 
3870  | 
by (simp add: \<open>card X = Suc (Suc n)\<close> field_simps less_le)  | 
| 
63626
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3871  | 
also have "\<dots> \<le> (\<Sum>x\<in>X. ?m x)"  | 
| 64267 | 3872  | 
by (rule sum_mono) fact  | 
| 
63626
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3873  | 
    also have "\<dots> = measure M (\<Union>x\<in>X. {x})"
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3874  | 
using singleton_sets \<open>finite X\<close>  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3875  | 
by (intro finite_measure_finite_Union[symmetric]) (auto simp: disjoint_family_on_def)  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3876  | 
    finally have "?M < measure M (\<Union>x\<in>X. {x})" .
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3877  | 
    moreover have "measure M (\<Union>x\<in>X. {x}) \<le> ?M"
 | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3878  | 
using singleton_sets[THEN sets.sets_into_space] by (intro finite_measure_mono) auto  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3879  | 
ultimately show False by simp  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3880  | 
qed  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3881  | 
show ?thesis  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3882  | 
unfolding * by (intro countable_UN countableI_type countable_finite[OF **])  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3883  | 
qed  | 
| 
 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 
hoelzl 
parents: 
63540 
diff
changeset
 | 
3884  | 
|
| 60772 | 3885  | 
end  |