# HG changeset patch # User hoelzl # Date 1349863947 -7200 # Node ID e0a4cb91a8a9333a8aab00ac94f263dca3302e4f # Parent 3c10763f5cb42ed41ff7f0ebea71702314671f8a add induction rule for intersection-stable sigma-sets diff -r 3c10763f5cb4 -r e0a4cb91a8a9 src/HOL/Probability/Binary_Product_Measure.thy --- a/src/HOL/Probability/Binary_Product_Measure.thy Wed Oct 10 12:12:26 2012 +0200 +++ b/src/HOL/Probability/Binary_Product_Measure.thy Wed Oct 10 12:12:27 2012 +0200 @@ -33,15 +33,18 @@ {a \ b | a b. a \ sets A \ b \ sets B} (\X. \\<^isup>+x. (\\<^isup>+y. indicator X (x,y) \B) \A)" +lemma pair_measure_closed: "{a \ b | a b. a \ sets A \ b \ sets B} \ Pow (space A \ space B)" + using space_closed[of A] space_closed[of B] by auto + lemma space_pair_measure: "space (A \\<^isub>M B) = space A \ space B" - unfolding pair_measure_def using space_closed[of A] space_closed[of B] - by (intro space_measure_of) auto + unfolding pair_measure_def using pair_measure_closed[of A B] + by (rule space_measure_of) lemma sets_pair_measure: "sets (A \\<^isub>M B) = sigma_sets (space A \ space B) {a \ b | a b. a \ sets A \ b \ sets B}" - unfolding pair_measure_def using space_closed[of A] space_closed[of B] - by (intro sets_measure_of) auto + unfolding pair_measure_def using pair_measure_closed[of A B] + by (rule sets_measure_of) lemma sets_pair_measure_cong[cong]: "sets M1 = sets M1' \ sets M2 = sets M2' \ sets (M1 \\<^isub>M M2) = sets (M1' \\<^isub>M M2')" @@ -162,40 +165,24 @@ assumes "Q \ sets (N \\<^isub>M M)" shows "(\x. emeasure M (Pair x -` Q)) \ borel_measurable N" (is "?s Q \ _") -proof - - let ?\ = "space N \ space M" and ?D = "{A\sets (N \\<^isub>M M). ?s A \ borel_measurable N}" - note space_pair_measure[simp] - interpret dynkin_system ?\ ?D - proof (intro dynkin_systemI) - fix A assume "A \ ?D" then show "A \ ?\" - using sets_into_space[of A "N \\<^isub>M M"] by simp - next - from top show "?\ \ ?D" - by (auto simp add: if_distrib intro!: measurable_If) - next - fix A assume "A \ ?D" - with sets_into_space have "\x. emeasure M (Pair x -` (?\ - A)) = - (if x \ space N then emeasure M (space M) - ?s A x else 0)" - by (auto intro!: emeasure_compl simp: vimage_Diff sets_Pair1) - with `A \ ?D` top show "?\ - A \ ?D" - by (auto intro!: measurable_If) - next - fix F :: "nat \ ('b\'a) set" assume "disjoint_family F" "range F \ ?D" - moreover then have "\x. emeasure M (\i. Pair x -` F i) = (\i. ?s (F i) x)" - by (intro suminf_emeasure[symmetric]) (auto simp: disjoint_family_on_def sets_Pair1) - ultimately show "(\i. F i) \ ?D" - by (auto simp: vimage_UN intro!: borel_measurable_psuminf) - qed - let ?G = "{a \ b | a b. a \ sets N \ b \ sets M}" - have "sigma_sets ?\ ?G = ?D" - proof (rule dynkin_lemma) - show "?G \ ?D" - by (auto simp: if_distrib Int_def[symmetric] intro!: measurable_If) - qed (auto simp: sets_pair_measure Int_stable_pair_measure_generator) - with `Q \ sets (N \\<^isub>M M)` have "Q \ ?D" - by (simp add: sets_pair_measure[symmetric]) - then show "?s Q \ borel_measurable N" by simp -qed + using Int_stable_pair_measure_generator pair_measure_closed assms + unfolding sets_pair_measure +proof (induct rule: sigma_sets_induct_disjoint) + case (compl A) + with sets_into_space have "\x. emeasure M (Pair x -` ((space N \ space M) - A)) = + (if x \ space N then emeasure M (space M) - ?s A x else 0)" + unfolding sets_pair_measure[symmetric] + by (auto intro!: emeasure_compl simp: vimage_Diff sets_Pair1) + with compl top show ?case + by (auto intro!: measurable_If simp: space_pair_measure) +next + case (union F) + moreover then have "\x. emeasure M (\i. Pair x -` F i) = (\i. ?s (F i) x)" + unfolding sets_pair_measure[symmetric] + by (intro suminf_emeasure[symmetric]) (auto simp: disjoint_family_on_def sets_Pair1) + ultimately show ?case + by (auto simp: vimage_UN) +qed (auto simp add: if_distrib Int_def[symmetric] intro!: measurable_If) lemma (in sigma_finite_measure) measurable_emeasure_Pair: assumes Q: "Q \ sets (N \\<^isub>M M)" shows "(\x. emeasure M (Pair x -` Q)) \ borel_measurable N" (is "?s Q \ _") diff -r 3c10763f5cb4 -r e0a4cb91a8a9 src/HOL/Probability/Measure_Space.thy --- a/src/HOL/Probability/Measure_Space.thy Wed Oct 10 12:12:26 2012 +0200 +++ b/src/HOL/Probability/Measure_Space.thy Wed Oct 10 12:12:27 2012 +0200 @@ -633,48 +633,45 @@ proof - let ?\ = "emeasure M" and ?\ = "emeasure N" interpret S: sigma_algebra \ "sigma_sets \ E" by (rule sigma_algebra_sigma_sets) fact - { fix F assume "F \ E" and "?\ F \ \" + have "space M = \" + using top[of M] space_closed[of M] S.top S.space_closed `sets M = sigma_sets \ E` by blast + + { fix F D assume "F \ E" and "?\ F \ \" then have [intro]: "F \ sigma_sets \ E" by auto - let ?D = "{D \ sigma_sets \ E. ?\ (F \ D) = ?\ (F \ D)}" have "?\ F \ \" using `?\ F \ \` `F \ E` eq by simp - interpret D: dynkin_system \ ?D - proof (rule dynkin_systemI, simp_all) - fix A assume "A \ sigma_sets \ E \ ?\ (F \ A) = ?\ (F \ A)" - then show "A \ \" using S.sets_into_space by auto + assume "D \ sets M" + with `Int_stable E` `E \ Pow \` have "emeasure M (F \ D) = emeasure N (F \ D)" + unfolding M + proof (induct rule: sigma_sets_induct_disjoint) + case (basic A) + then have "F \ A \ E" using `Int_stable E` `F \ E` by (auto simp: Int_stable_def) + then show ?case using eq by auto next - have "F \ \ = F" using `F \ E` `E \ Pow \` by auto - then show "?\ (F \ \) = ?\ (F \ \)" - using `F \ E` eq by (auto intro: sigma_sets_top) + case empty then show ?case by simp next - fix A assume *: "A \ sigma_sets \ E \ ?\ (F \ A) = ?\ (F \ A)" + case (compl A) then have **: "F \ (\ - A) = F - (F \ A)" and [intro]: "F \ A \ sigma_sets \ E" - using `F \ E` S.sets_into_space by auto + using `F \ E` S.sets_into_space by (auto simp: M) have "?\ (F \ A) \ ?\ F" by (auto intro!: emeasure_mono simp: M N) then have "?\ (F \ A) \ \" using `?\ F \ \` by auto have "?\ (F \ A) \ ?\ F" by (auto intro!: emeasure_mono simp: M N) then have "?\ (F \ A) \ \" using `?\ F \ \` by auto then have "?\ (F \ (\ - A)) = ?\ F - ?\ (F \ A)" unfolding ** using `F \ A \ sigma_sets \ E` by (auto intro!: emeasure_Diff simp: M N) - also have "\ = ?\ F - ?\ (F \ A)" using eq `F \ E` * by simp + also have "\ = ?\ F - ?\ (F \ A)" using eq `F \ E` compl by simp also have "\ = ?\ (F \ (\ - A))" unfolding ** using `F \ A \ sigma_sets \ E` `?\ (F \ A) \ \` by (auto intro!: emeasure_Diff[symmetric] simp: M N) - finally show "\ - A \ sigma_sets \ E \ ?\ (F \ (\ - A)) = ?\ (F \ (\ - A))" - using * by auto + finally show ?case + using `space M = \` by auto next - fix A :: "nat \ 'a set" - assume "disjoint_family A" and A: "range A \ {X \ sigma_sets \ E. ?\ (F \ X) = ?\ (F \ X)}" + case (union A) then have "?\ (\x. F \ A x) = ?\ (\x. F \ A x)" by (subst (1 2) suminf_emeasure[symmetric]) (auto simp: disjoint_family_on_def subset_eq M N) - with A show "(\x. A x) \ sigma_sets \ E \ ?\ (F \ (\x. A x)) = ?\ (F \ (\x. A x))" + with A show ?case by auto - qed - have *: "sigma_sets \ E = ?D" - using `F \ E` `Int_stable E` - by (intro D.dynkin_lemma) (auto simp add: Int_stable_def eq) - have "\D. D \ sets M \ emeasure M (F \ D) = emeasure N (F \ D)" - unfolding M by (subst (asm) *) auto } + qed } note * = this show "M = N" proof (rule measure_eqI) @@ -684,9 +681,7 @@ using A(1) by (auto simp: subset_eq M) fix F assume "F \ sets M" let ?D = "disjointed (\i. F \ A i)" - have "space M = \" - using top[of M] space_closed[of M] S.top S.space_closed `sets M = sigma_sets \ E` by blast - then have F_eq: "F = (\i. ?D i)" + from `space M = \` have F_eq: "F = (\i. ?D i)" using `F \ sets M`[THEN sets_into_space] A(2)[symmetric] by (auto simp: UN_disjointed_eq) have [simp, intro]: "\i. ?D i \ sets M" using range_disjointed_sets[of "\i. F \ A i" M] `F \ sets M` diff -r 3c10763f5cb4 -r e0a4cb91a8a9 src/HOL/Probability/Sigma_Algebra.thy --- a/src/HOL/Probability/Sigma_Algebra.thy Wed Oct 10 12:12:26 2012 +0200 +++ b/src/HOL/Probability/Sigma_Algebra.thy Wed Oct 10 12:12:27 2012 +0200 @@ -2041,4 +2041,25 @@ using assms by (auto simp: dynkin_def) qed +lemma sigma_sets_induct_disjoint[consumes 3, case_names basic empty compl union]: + assumes "Int_stable G" + and closed: "G \ Pow \" + and A: "A \ sigma_sets \ G" + assumes basic: "\A. A \ G \ P A" + and empty: "P {}" + and compl: "\A. A \ sigma_sets \ G \ P A \ P (\ - A)" + and union: "\A. disjoint_family A \ range A \ sigma_sets \ G \ (\i. P (A i)) \ P (\i::nat. A i)" + shows "P A" +proof - + let ?D = "{ A \ sigma_sets \ G. P A }" + interpret sigma_algebra \ "sigma_sets \ G" + using closed by (rule sigma_algebra_sigma_sets) + from compl[OF _ empty] closed have space: "P \" by simp + interpret dynkin_system \ ?D + by default (auto dest: sets_into_space intro!: space compl union) + have "sigma_sets \ G = ?D" + by (rule dynkin_lemma) (auto simp: basic `Int_stable G`) + with A show ?thesis by auto +qed + end