diff -r f9ff311992b6 -r 3e39b0e730d6 src/HOL/Probability/Complete_Measure.thy --- a/src/HOL/Probability/Complete_Measure.thy Wed Feb 02 10:35:41 2011 +0100 +++ b/src/HOL/Probability/Complete_Measure.thy Wed Feb 02 12:34:45 2011 +0100 @@ -7,9 +7,24 @@ locale completeable_measure_space = measure_space -definition (in completeable_measure_space) completion :: "'a algebra" where +definition (in completeable_measure_space) + "split_completion A p = (\N'. A = fst p \ snd p \ fst p \ snd p = {} \ + fst p \ sets M \ snd p \ N' \ N' \ null_sets)" + +definition (in completeable_measure_space) + "main_part A = fst (Eps (split_completion A))" + +definition (in completeable_measure_space) + "null_part A = snd (Eps (split_completion A))" + +abbreviation (in completeable_measure_space) "\' A \ \ (main_part A)" + +definition (in completeable_measure_space) completion :: "('a, 'b) measure_space_scheme" where "completion = \ space = space M, - sets = { S \ N |S N N'. S \ sets M \ N' \ null_sets \ N \ N' } \" + sets = { S \ N |S N N'. S \ sets M \ N' \ null_sets \ N \ N' }, + measure = \', + \ = more M \" + lemma (in completeable_measure_space) space_completion[simp]: "space completion = space M" unfolding completion_def by simp @@ -58,16 +73,6 @@ auto qed auto -definition (in completeable_measure_space) - "split_completion A p = (\N'. A = fst p \ snd p \ fst p \ snd p = {} \ - fst p \ sets M \ snd p \ N' \ N' \ null_sets)" - -definition (in completeable_measure_space) - "main_part A = fst (Eps (split_completion A))" - -definition (in completeable_measure_space) - "null_part A = snd (Eps (split_completion A))" - lemma (in completeable_measure_space) split_completion: assumes "A \ sets completion" shows "split_completion A (main_part A, null_part A)" @@ -108,17 +113,15 @@ show "\ (null_part S) = 0" by auto qed -definition (in completeable_measure_space) "\' A = \ (main_part A)" - lemma (in completeable_measure_space) \'_set[simp]: assumes "S \ sets M" shows "\' S = \ S" proof - have S: "S \ sets completion" using assms by auto then have "\ S = \ (main_part S \ null_part S)" by simp - also have "\ = \ (main_part S)" + also have "\ = \' S" using S assms measure_additive[of "main_part S" "null_part S"] by (auto simp: measure_additive) - finally show ?thesis unfolding \'_def by simp + finally show ?thesis by simp qed lemma (in completeable_measure_space) sets_completionI_sub: @@ -154,7 +157,7 @@ unfolding * .. also have "\ = \ (\i. main_part (S i))" using null_set S by (intro measure_Un_null_set) auto - finally show ?thesis unfolding \'_def . + finally show ?thesis . qed lemma (in completeable_measure_space) \_main_part_Un: @@ -168,30 +171,35 @@ unfolding range_binary_eq Un_range_binary UN by auto qed -sublocale completeable_measure_space \ completion!: measure_space completion \' -proof - show "\' {} = 0" by auto -next - show "countably_additive completion \'" - proof (unfold countably_additive_def, intro allI conjI impI) - fix A :: "nat \ 'a set" assume A: "range A \ sets completion" "disjoint_family A" - have "disjoint_family (\i. main_part (A i))" - proof (intro disjoint_family_on_bisimulation[OF A(2)]) - fix n m assume "A n \ A m = {}" - then have "(main_part (A n) \ null_part (A n)) \ (main_part (A m) \ null_part (A m)) = {}" - using A by (subst (1 2) main_part_null_part_Un) auto - then show "main_part (A n) \ main_part (A m) = {}" by auto +sublocale completeable_measure_space \ completion!: measure_space completion + where "measure completion = \'" +proof - + show "measure_space completion" + proof + show "measure completion {} = 0" by (auto simp: completion_def) + next + show "countably_additive completion (measure completion)" + proof (intro countably_additiveI) + fix A :: "nat \ 'a set" assume A: "range A \ sets completion" "disjoint_family A" + have "disjoint_family (\i. main_part (A i))" + proof (intro disjoint_family_on_bisimulation[OF A(2)]) + fix n m assume "A n \ A m = {}" + then have "(main_part (A n) \ null_part (A n)) \ (main_part (A m) \ null_part (A m)) = {}" + using A by (subst (1 2) main_part_null_part_Un) auto + then show "main_part (A n) \ main_part (A m) = {}" by auto + qed + then have "(\\<^isub>\n. measure completion (A n)) = \ (\i. main_part (A i))" + unfolding completion_def using A by (auto intro!: measure_countably_additive) + then show "(\\<^isub>\n. measure completion (A n)) = measure completion (UNION UNIV A)" + by (simp add: completion_def \_main_part_UN[OF A(1)]) qed - then have "(\\<^isub>\n. \' (A n)) = \ (\i. main_part (A i))" - unfolding \'_def using A by (intro measure_countably_additive) auto - then show "(\\<^isub>\n. \' (A n)) = \' (UNION UNIV A)" - unfolding \_main_part_UN[OF A(1)] . qed + show "measure completion = \'" unfolding completion_def by simp qed lemma (in completeable_measure_space) completion_ex_simple_function: - assumes f: "completion.simple_function f" - shows "\f'. simple_function f' \ (AE x. f x = f' x)" + assumes f: "simple_function completion f" + shows "\f'. simple_function M f' \ (AE x. f x = f' x)" proof - let "?F x" = "f -` {x} \ space M" have F: "\x. ?F x \ sets completion" and fin: "finite (f`space M)" @@ -248,11 +256,11 @@ shows "\g'\borel_measurable M. (AE x. g x = g' x)" proof - from g[THEN completion.borel_measurable_implies_simple_function_sequence] - obtain f where "\i. completion.simple_function (f i)" "f \ g" by auto - then have "\i. \f'. simple_function f' \ (AE x. f i x = f' x)" + obtain f where "\i. simple_function completion (f i)" "f \ g" by auto + then have "\i. \f'. simple_function M f' \ (AE x. f i x = f' x)" using completion_ex_simple_function by auto from this[THEN choice] obtain f' where - sf: "\i. simple_function (f' i)" and + sf: "\i. simple_function M (f' i)" and AE: "\i. AE x. f i x = f' i x" by auto show ?thesis proof (intro bexI)