1 (* Title: HOL/Analysis/Complete_Measure.thy |
1 (* Title: HOL/Analysis/Complete_Measure.thy |
2 Author: Robert Himmelmann, Johannes Hoelzl, TU Muenchen |
2 Author: Robert Himmelmann, Johannes Hoelzl, TU Muenchen |
3 *) |
3 *) |
4 |
4 section \<open>Complete Measures\<close> |
5 theory Complete_Measure |
5 theory Complete_Measure |
6 imports Bochner_Integration |
6 imports Bochner_Integration |
7 begin |
7 begin |
8 |
8 |
9 locale complete_measure = |
9 locale%important complete_measure = |
10 fixes M :: "'a measure" |
10 fixes M :: "'a measure" |
11 assumes complete: "\<And>A B. B \<subseteq> A \<Longrightarrow> A \<in> null_sets M \<Longrightarrow> B \<in> sets M" |
11 assumes complete: "\<And>A B. B \<subseteq> A \<Longrightarrow> A \<in> null_sets M \<Longrightarrow> B \<in> sets M" |
12 |
12 |
13 definition |
13 definition%important |
14 "split_completion M A p = (if A \<in> sets M then p = (A, {}) else |
14 "split_completion M A p = (if A \<in> sets M then p = (A, {}) else |
15 \<exists>N'. A = fst p \<union> snd p \<and> fst p \<inter> snd p = {} \<and> fst p \<in> sets M \<and> snd p \<subseteq> N' \<and> N' \<in> null_sets M)" |
15 \<exists>N'. A = fst p \<union> snd p \<and> fst p \<inter> snd p = {} \<and> fst p \<in> sets M \<and> snd p \<subseteq> N' \<and> N' \<in> null_sets M)" |
16 |
16 |
17 definition |
17 definition%important |
18 "main_part M A = fst (Eps (split_completion M A))" |
18 "main_part M A = fst (Eps (split_completion M A))" |
19 |
19 |
20 definition |
20 definition%important |
21 "null_part M A = snd (Eps (split_completion M A))" |
21 "null_part M A = snd (Eps (split_completion M A))" |
22 |
22 |
23 definition completion :: "'a measure \<Rightarrow> 'a measure" where |
23 definition%important completion :: "'a measure \<Rightarrow> 'a measure" where |
24 "completion M = measure_of (space M) { S \<union> N |S N N'. S \<in> sets M \<and> N' \<in> null_sets M \<and> N \<subseteq> N' } |
24 "completion M = measure_of (space M) { S \<union> N |S N N'. S \<in> sets M \<and> N' \<in> null_sets M \<and> N \<subseteq> N' } |
25 (emeasure M \<circ> main_part M)" |
25 (emeasure M \<circ> main_part M)" |
26 |
26 |
27 lemma completion_into_space: |
27 lemma completion_into_space: |
28 "{ S \<union> N |S N N'. S \<in> sets M \<and> N' \<in> null_sets M \<and> N \<subseteq> N' } \<subseteq> Pow (space M)" |
28 "{ S \<union> N |S N N'. S \<in> sets M \<and> N' \<in> null_sets M \<and> N \<subseteq> N' } \<subseteq> Pow (space M)" |
65 then show "\<Union>(A ` UNIV) \<in> ?A" |
65 then show "\<Union>(A ` UNIV) \<in> ?A" |
66 using null_sets_UN[of N'] |
66 using null_sets_UN[of N'] |
67 by (intro completionI[of _ "\<Union>(S ` UNIV)" "\<Union>(N ` UNIV)" "\<Union>(N' ` UNIV)"]) auto |
67 by (intro completionI[of _ "\<Union>(S ` UNIV)" "\<Union>(N ` UNIV)" "\<Union>(N' ` UNIV)"]) auto |
68 qed |
68 qed |
69 |
69 |
70 lemma sets_completion: |
70 lemma%important sets_completion: |
71 "sets (completion M) = { S \<union> N |S N N'. S \<in> sets M \<and> N' \<in> null_sets M \<and> N \<subseteq> N' }" |
71 "sets (completion M) = { S \<union> N |S N N'. S \<in> sets M \<and> N' \<in> null_sets M \<and> N \<subseteq> N' }" |
72 using sigma_algebra.sets_measure_of_eq[OF sigma_algebra_completion] by (simp add: completion_def) |
72 using%unimportant sigma_algebra.sets_measure_of_eq[OF sigma_algebra_completion] |
|
73 by (simp add: completion_def) |
73 |
74 |
74 lemma sets_completionE: |
75 lemma sets_completionE: |
75 assumes "A \<in> sets (completion M)" |
76 assumes "A \<in> sets (completion M)" |
76 obtains S N N' where "A = S \<union> N" "N \<subseteq> N'" "N' \<in> null_sets M" "S \<in> sets M" |
77 obtains S N N' where "A = S \<union> N" "N \<subseteq> N'" "N' \<in> null_sets M" "S \<in> sets M" |
77 using assms unfolding sets_completion by auto |
78 using assms unfolding sets_completion by auto |
83 |
84 |
84 lemma sets_completionI_sets[intro, simp]: |
85 lemma sets_completionI_sets[intro, simp]: |
85 "A \<in> sets M \<Longrightarrow> A \<in> sets (completion M)" |
86 "A \<in> sets M \<Longrightarrow> A \<in> sets (completion M)" |
86 unfolding sets_completion by force |
87 unfolding sets_completion by force |
87 |
88 |
88 lemma measurable_completion: "f \<in> M \<rightarrow>\<^sub>M N \<Longrightarrow> f \<in> completion M \<rightarrow>\<^sub>M N" |
89 lemma%important measurable_completion: "f \<in> M \<rightarrow>\<^sub>M N \<Longrightarrow> f \<in> completion M \<rightarrow>\<^sub>M N" |
89 by (auto simp: measurable_def) |
90 by%unimportant (auto simp: measurable_def) |
90 |
91 |
91 lemma null_sets_completion: |
92 lemma null_sets_completion: |
92 assumes "N' \<in> null_sets M" "N \<subseteq> N'" shows "N \<in> sets (completion M)" |
93 assumes "N' \<in> null_sets M" "N \<subseteq> N'" shows "N \<in> sets (completion M)" |
93 using assms by (intro sets_completionI[of N "{}" N N']) auto |
94 using assms by (intro sets_completionI[of N "{}" N N']) auto |
94 |
95 |
95 lemma split_completion: |
96 lemma%important split_completion: |
96 assumes "A \<in> sets (completion M)" |
97 assumes "A \<in> sets (completion M)" |
97 shows "split_completion M A (main_part M A, null_part M A)" |
98 shows "split_completion M A (main_part M A, null_part M A)" |
98 proof cases |
99 proof%unimportant cases |
99 assume "A \<in> sets M" then show ?thesis |
100 assume "A \<in> sets M" then show ?thesis |
100 by (simp add: split_completion_def[abs_def] main_part_def null_part_def) |
101 by (simp add: split_completion_def[abs_def] main_part_def null_part_def) |
101 next |
102 next |
102 assume nA: "A \<notin> sets M" |
103 assume nA: "A \<notin> sets M" |
103 show ?thesis |
104 show ?thesis |
178 also have "\<dots> = emeasure M (\<Union>i. main_part M (S i))" |
179 also have "\<dots> = emeasure M (\<Union>i. main_part M (S i))" |
179 using null_set S by (intro emeasure_Un_null_set) auto |
180 using null_set S by (intro emeasure_Un_null_set) auto |
180 finally show ?thesis . |
181 finally show ?thesis . |
181 qed |
182 qed |
182 |
183 |
183 lemma emeasure_completion[simp]: |
184 lemma%important emeasure_completion[simp]: |
184 assumes S: "S \<in> sets (completion M)" shows "emeasure (completion M) S = emeasure M (main_part M S)" |
185 assumes S: "S \<in> sets (completion M)" |
185 proof (subst emeasure_measure_of[OF completion_def completion_into_space]) |
186 shows "emeasure (completion M) S = emeasure M (main_part M S)" |
|
187 proof%unimportant (subst emeasure_measure_of[OF completion_def completion_into_space]) |
186 let ?\<mu> = "emeasure M \<circ> main_part M" |
188 let ?\<mu> = "emeasure M \<circ> main_part M" |
187 show "S \<in> sets (completion M)" "?\<mu> S = emeasure M (main_part M S) " using S by simp_all |
189 show "S \<in> sets (completion M)" "?\<mu> S = emeasure M (main_part M S) " using S by simp_all |
188 show "positive (sets (completion M)) ?\<mu>" |
190 show "positive (sets (completion M)) ?\<mu>" |
189 by (simp add: positive_def) |
191 by (simp add: positive_def) |
190 show "countably_additive (sets (completion M)) ?\<mu>" |
192 show "countably_additive (sets (completion M)) ?\<mu>" |
279 show "AE x in M. f x = ?f' x" |
281 show "AE x in M. f x = ?f' x" |
280 by (rule AE_I', rule sets) auto |
282 by (rule AE_I', rule sets) auto |
281 qed |
283 qed |
282 qed |
284 qed |
283 |
285 |
284 lemma completion_ex_borel_measurable: |
286 lemma%important completion_ex_borel_measurable: |
285 fixes g :: "'a \<Rightarrow> ennreal" |
287 fixes g :: "'a \<Rightarrow> ennreal" |
286 assumes g: "g \<in> borel_measurable (completion M)" |
288 assumes g: "g \<in> borel_measurable (completion M)" |
287 shows "\<exists>g'\<in>borel_measurable M. (AE x in M. g x = g' x)" |
289 shows "\<exists>g'\<in>borel_measurable M. (AE x in M. g x = g' x)" |
288 proof - |
290 proof%unimportant - |
289 from g[THEN borel_measurable_implies_simple_function_sequence'] guess f . note f = this |
291 from g[THEN borel_measurable_implies_simple_function_sequence'] guess f . note f = this |
290 from this(1)[THEN completion_ex_simple_function] |
292 from this(1)[THEN completion_ex_simple_function] |
291 have "\<forall>i. \<exists>f'. simple_function M f' \<and> (AE x in M. f i x = f' x)" .. |
293 have "\<forall>i. \<exists>f'. simple_function M f' \<and> (AE x in M. f i x = f' x)" .. |
292 from this[THEN choice] obtain f' where |
294 from this[THEN choice] obtain f' where |
293 sf: "\<And>i. simple_function M (f' i)" and |
295 sf: "\<And>i. simple_function M (f' i)" and |
438 lemma integral_completion: |
440 lemma integral_completion: |
439 fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}" |
441 fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}" |
440 assumes f: "f \<in> M \<rightarrow>\<^sub>M borel" shows "integral\<^sup>L (completion M) f = integral\<^sup>L M f" |
442 assumes f: "f \<in> M \<rightarrow>\<^sub>M borel" shows "integral\<^sup>L (completion M) f = integral\<^sup>L M f" |
441 by (rule integral_subalgebra[symmetric]) (auto intro: f) |
443 by (rule integral_subalgebra[symmetric]) (auto intro: f) |
442 |
444 |
443 locale semifinite_measure = |
445 locale%important semifinite_measure = |
444 fixes M :: "'a measure" |
446 fixes M :: "'a measure" |
445 assumes semifinite: |
447 assumes semifinite: |
446 "\<And>A. A \<in> sets M \<Longrightarrow> emeasure M A = \<infinity> \<Longrightarrow> \<exists>B\<in>sets M. B \<subseteq> A \<and> emeasure M B < \<infinity>" |
448 "\<And>A. A \<in> sets M \<Longrightarrow> emeasure M A = \<infinity> \<Longrightarrow> \<exists>B\<in>sets M. B \<subseteq> A \<and> emeasure M B < \<infinity>" |
447 |
449 |
448 locale locally_determined_measure = semifinite_measure + |
450 locale%important locally_determined_measure = semifinite_measure + |
449 assumes locally_determined: |
451 assumes locally_determined: |
450 "\<And>A. A \<subseteq> space M \<Longrightarrow> (\<And>B. B \<in> sets M \<Longrightarrow> emeasure M B < \<infinity> \<Longrightarrow> A \<inter> B \<in> sets M) \<Longrightarrow> A \<in> sets M" |
452 "\<And>A. A \<subseteq> space M \<Longrightarrow> (\<And>B. B \<in> sets M \<Longrightarrow> emeasure M B < \<infinity> \<Longrightarrow> A \<inter> B \<in> sets M) \<Longrightarrow> A \<in> sets M" |
451 |
453 |
452 locale cld_measure = complete_measure M + locally_determined_measure M for M :: "'a measure" |
454 locale%important cld_measure = |
453 |
455 complete_measure M + locally_determined_measure M for M :: "'a measure" |
454 definition outer_measure_of :: "'a measure \<Rightarrow> 'a set \<Rightarrow> ennreal" |
456 |
|
457 definition%important outer_measure_of :: "'a measure \<Rightarrow> 'a set \<Rightarrow> ennreal" |
455 where "outer_measure_of M A = (INF B \<in> {B\<in>sets M. A \<subseteq> B}. emeasure M B)" |
458 where "outer_measure_of M A = (INF B \<in> {B\<in>sets M. A \<subseteq> B}. emeasure M B)" |
456 |
459 |
457 lemma outer_measure_of_eq[simp]: "A \<in> sets M \<Longrightarrow> outer_measure_of M A = emeasure M A" |
460 lemma outer_measure_of_eq[simp]: "A \<in> sets M \<Longrightarrow> outer_measure_of M A = emeasure M A" |
458 by (auto simp: outer_measure_of_def intro!: INF_eqI emeasure_mono) |
461 by (auto simp: outer_measure_of_def intro!: INF_eqI emeasure_mono) |
459 |
462 |
548 using F by (simp add: SUP_emeasure_incseq subset_eq) |
551 using F by (simp add: SUP_emeasure_incseq subset_eq) |
549 finally show "outer_measure_of M (\<Union>n. A n) \<le> (SUP n. outer_measure_of M (A n))" |
552 finally show "outer_measure_of M (\<Union>n. A n) \<le> (SUP n. outer_measure_of M (A n))" |
550 by (simp add: eq F) |
553 by (simp add: eq F) |
551 qed (auto intro: SUP_least outer_measure_of_mono) |
554 qed (auto intro: SUP_least outer_measure_of_mono) |
552 |
555 |
553 definition measurable_envelope :: "'a measure \<Rightarrow> 'a set \<Rightarrow> 'a set \<Rightarrow> bool" |
556 definition%important measurable_envelope :: "'a measure \<Rightarrow> 'a set \<Rightarrow> 'a set \<Rightarrow> bool" |
554 where "measurable_envelope M A E \<longleftrightarrow> |
557 where "measurable_envelope M A E \<longleftrightarrow> |
555 (A \<subseteq> E \<and> E \<in> sets M \<and> (\<forall>F\<in>sets M. emeasure M (F \<inter> E) = outer_measure_of M (F \<inter> A)))" |
558 (A \<subseteq> E \<and> E \<in> sets M \<and> (\<forall>F\<in>sets M. emeasure M (F \<inter> E) = outer_measure_of M (F \<inter> A)))" |
556 |
559 |
557 lemma measurable_envelopeD: |
560 lemma measurable_envelopeD: |
558 assumes "measurable_envelope M A E" |
561 assumes "measurable_envelope M A E" |
613 by (auto simp: measurable_envelope_def) |
616 by (auto simp: measurable_envelope_def) |
614 with measurable_envelopeD[OF E] show "emeasure M E = outer_measure_of M A" |
617 with measurable_envelopeD[OF E] show "emeasure M E = outer_measure_of M A" |
615 by (auto simp: Int_absorb1) |
618 by (auto simp: Int_absorb1) |
616 qed |
619 qed |
617 |
620 |
618 lemma measurable_envelope_eq2: |
621 lemma%important measurable_envelope_eq2: |
619 assumes "A \<subseteq> E" "E \<in> sets M" "emeasure M E < \<infinity>" |
622 assumes "A \<subseteq> E" "E \<in> sets M" "emeasure M E < \<infinity>" |
620 shows "measurable_envelope M A E \<longleftrightarrow> (emeasure M E = outer_measure_of M A)" |
623 shows "measurable_envelope M A E \<longleftrightarrow> (emeasure M E = outer_measure_of M A)" |
621 proof safe |
624 proof safe |
622 assume *: "emeasure M E = outer_measure_of M A" |
625 assume *: "emeasure M E = outer_measure_of M A" |
623 show "measurable_envelope M A E" |
626 show "measurable_envelope M A E" |