diff -r 0d97ef1d6de9 -r de72bbe42190 src/HOL/Probability/Independent_Family.thy --- a/src/HOL/Probability/Independent_Family.thy Thu Nov 22 10:09:54 2012 +0100 +++ b/src/HOL/Probability/Independent_Family.thy Tue Nov 27 11:29:47 2012 +0100 @@ -186,11 +186,11 @@ using G by auto have "prob ((\j\J. A j) \ (space M - X)) = prob ((\j\J. A j) - (\i\insert j J. (A(j := X)) i))" - using A_sets sets_into_space[of _ M] X `J \ {}` + using A_sets sets.sets_into_space[of _ M] X `J \ {}` by (auto intro!: arg_cong[where f=prob] split: split_if_asm) also have "\ = prob (\j\J. A j) - prob (\i\insert j J. (A(j := X)) i)" - using J `J \ {}` `j \ J` A_sets X sets_into_space - by (auto intro!: finite_measure_Diff finite_INT split: split_if_asm) + using J `J \ {}` `j \ J` A_sets X sets.sets_into_space + by (auto intro!: finite_measure_Diff sets.finite_INT split: split_if_asm) finally have "prob ((\j\J. A j) \ (space M - X)) = prob (\j\J. A j) - prob (\i\insert j J. (A(j := X)) i)" . moreover { @@ -224,7 +224,7 @@ show "disjoint_family (\k. \i\insert j J. (A(j := F k)) i)" using disj by (rule disjoint_family_on_bisimulation) auto show "range (\k. \i\insert j J. (A(j := F k)) i) \ events" - using A_sets F `finite J` `J \ {}` `j \ J` by (auto intro!: Int) + using A_sets F `finite J` `J \ {}` `j \ J` by (auto intro!: sets.Int) qed moreover { fix k from J A `j \ K` have "prob (\i\insert j J. (A(j := F k)) i) = prob (F k) * (\i\J. prob (A i))" @@ -243,7 +243,7 @@ show "prob ((\j\J. A j) \ (\k. F k)) = prob (\k. F k) * (\j\J. prob (A j))" by (auto dest!: sums_unique) qed (insert F, auto) - qed (insert sets_into_space, auto) + qed (insert sets.sets_into_space, auto) then have mono: "dynkin (space M) (G j) \ {E \ events. indep_sets (G(j := {E})) K}" proof (rule dynkin_system.dynkin_subset, safe) fix X assume "X \ G j" @@ -291,7 +291,7 @@ proof (rule indep_sets_mono_sets, subst sigma_eq_dynkin, simp_all add: stable) fix i assume "i \ I" with indep have "F i \ events" by (auto simp: indep_sets_def) - with sets_into_space show "F i \ Pow (space M)" by auto + with sets.sets_into_space show "F i \ Pow (space M)" by auto qed qed @@ -394,7 +394,7 @@ let ?S = "sigma_sets (space M) (\i\I j. E i)" assume "j \ J" from E[OF this] interpret S: sigma_algebra "space M" ?S - using sets_into_space[of _ M] by (intro sigma_algebra_sigma_sets) auto + using sets.sets_into_space[of _ M] by (intro sigma_algebra_sigma_sets) auto have "sigma_sets (space M) (\i\I j. E i) = sigma_sets (space M) (?E j)" proof (rule sigma_sets_eqI) @@ -416,7 +416,7 @@ proof (rule indep_sets_sigma) show "indep_sets ?E J" proof (intro indep_setsI) - fix j assume "j \ J" with E show "?E j \ events" by (force intro!: finite_INT) + fix j assume "j \ J" with E show "?E j \ events" by (force intro!: sets.finite_INT) next fix K A assume K: "K \ {}" "K \ J" "finite K" and "\j\K. A j \ ?E j" @@ -533,7 +533,7 @@ interpret D: dynkin_system "space M" ?D proof (rule dynkin_systemI) fix D assume "D \ ?D" then show "D \ space M" - using sets_into_space by auto + using sets.sets_into_space by auto next show "space M \ ?D" using prob_space `X \ space M` by (simp add: Int_absorb2) @@ -546,7 +546,7 @@ also have "\ = prob X * prob (space M) - prob X * prob A" using A prob_space by auto also have "\ = prob X * prob (space M - A)" - using X_in A sets_into_space + using X_in A sets.sets_into_space by (subst finite_measure_Diff) (auto simp: field_simps) finally show "space M - A \ ?D" using A `X \ space M` by auto @@ -611,14 +611,14 @@ proof (rule sigma_eq_dynkin) { fix B n assume "B \ sigma_sets (space M) (\m\{..n}. A m)" then have "B \ space M" - by induct (insert A sets_into_space[of _ M], auto) } + by induct (insert A sets.sets_into_space[of _ M], auto) } then show "?A \ Pow (space M)" by auto show "Int_stable ?A" proof (rule Int_stableI) fix a assume "a \ ?A" then guess n .. note a = this fix b assume "b \ ?A" then guess m .. note b = this interpret Amn: sigma_algebra "space M" "sigma_sets (space M) (\i\{..max m n}. A i)" - using A sets_into_space[of _ M] by (intro sigma_algebra_sigma_sets) auto + using A sets.sets_into_space[of _ M] by (intro sigma_algebra_sigma_sets) auto have "sigma_sets (space M) (\i\{..n}. A i) \ sigma_sets (space M) (\i\{..max m n}. A i)" by (intro sigma_sets_subseteq UN_mono) auto with a have "a \ sigma_sets (space M) (\i\{..max m n}. A i)" by auto @@ -644,7 +644,7 @@ have F1: "range F \ events" using F2 by (simp add: indep_events_def subset_eq) { fix i show "sigma_algebra (space M) (sigma_sets (space M) {F i})" - using sigma_algebra_sigma_sets[of "{F i}" "space M"] F1 sets_into_space + using sigma_algebra_sigma_sets[of "{F i}" "space M"] F1 sets.sets_into_space by auto } show "indep_sets (\i. sigma_sets (space M) {F i}) UNIV" proof (rule indep_sets_sigma) @@ -659,12 +659,12 @@ proof fix j interpret S: sigma_algebra "space M" "sigma_sets (space M) (\i\{j..}. sigma_sets (space M) {F i})" - using order_trans[OF F1 space_closed] + using order_trans[OF F1 sets.space_closed] by (intro sigma_algebra_sigma_sets) (simp add: sigma_sets_singleton subset_eq) have "(\n. ?Q n) = (\n\{j..}. ?Q n)" by (intro decseq_SucI INT_decseq_offset UN_mono) auto also have "\ \ sigma_sets (space M) (\i\{j..}. sigma_sets (space M) {F i})" - using order_trans[OF F1 space_closed] + using order_trans[OF F1 sets.space_closed] by (safe intro!: S.countable_INT S.countable_UN) (auto simp: sigma_sets_singleton intro!: sigma_sets.Basic bexI) finally show "(\n. ?Q n) \ sigma_sets (space M) (\i\{j..}. sigma_sets (space M) {F i})" @@ -688,7 +688,7 @@ assume A: "\j\J. A j \ F j" let ?A = "\j. if j \ J then A j else space M" have "prob (\j\I. ?A j) = prob (\j\J. A j)" - using subset_trans[OF F(1) space_closed] J A + using subset_trans[OF F(1) sets.space_closed] J A by (auto intro!: arg_cong[where f=prob] split: split_if_asm) blast also from A F have "(\j. if j \ J then A j else space M) \ Pi I F" (is "?A \ _") @@ -882,7 +882,7 @@ show "indep_vars M' X I" unfolding indep_vars_def proof (intro conjI indep_setsI ballI rv) fix i show "sigma_sets (space M) {X i -` A \ space M |A. A \ sets (M' i)} \ events" - by (auto intro!: sigma_sets_subset measurable_sets rv) + by (auto intro!: sets.sigma_sets_subset measurable_sets rv) next fix J Y' assume J: "J \ {}" "J \ I" "finite J" assume Y': "\j\J. Y' j \ sigma_sets (space M) {X j -` A \ space M |A. A \ sets (M' j)}" @@ -892,7 +892,7 @@ from Y'[rule_format, OF this] rv[of j] show "\Y. Y' j = X j -` Y \ space M \ Y \ sets (M' j)" by (subst (asm) sigma_sets_vimage_commute[symmetric, of _ _ "space (M' j)"]) - (auto dest: measurable_space simp: sigma_sets_eq) + (auto dest: measurable_space simp: sets.sigma_sets_eq) qed from bchoice[OF this] obtain Y where Y: "\j. j \ J \ Y' j = X j -` Y j \ space M" "\j. j \ J \ Y j \ sets (M' j)" by auto