# HG changeset patch # User immler # Date 1354020520 -3600 # Node ID dea9363887a680c0f87c9869008c1c458aac9daf # Parent de72bbe421902b25ac27b0a2bfd4cb68d70890d5 based countable topological basis on Countable_Set diff -r de72bbe42190 -r dea9363887a6 src/HOL/Library/Countable_Set.thy --- a/src/HOL/Library/Countable_Set.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Library/Countable_Set.thy Tue Nov 27 13:48:40 2012 +0100 @@ -235,6 +235,12 @@ by (auto dest: subset_range_from_nat_into countable_subset lists_mono) qed +lemma Collect_finite_eq_lists: "Collect finite = set ` lists UNIV" + using finite_list by auto + +lemma countable_Collect_finite: "countable (Collect (finite::'a::countable set\bool))" + by (simp add: Collect_finite_eq_lists) + subsection {* Misc lemmas *} lemma countable_all: diff -r de72bbe42190 -r dea9363887a6 src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy Tue Nov 27 13:48:40 2012 +0100 @@ -10,7 +10,7 @@ imports SEQ "~~/src/HOL/Library/Diagonal_Subsequence" - "~~/src/HOL/Library/Countable" + "~~/src/HOL/Library/Countable_Set" Linear_Algebra "~~/src/HOL/Library/Glbs" Norm_Arith @@ -71,147 +71,160 @@ using assms by (simp add: topological_basis_def) +lemma basis_dense: + fixes B::"'a set set" and f::"'a set \ 'a" + assumes "topological_basis B" + assumes choosefrom_basis: "\B'. B' \ {} \ f B' \ B'" + shows "(\X. open X \ X \ {} \ (\B' \ B. f B' \ X))" +proof (intro allI impI) + fix X::"'a set" assume "open X" "X \ {}" + from topological_basisE[OF `topological_basis B` `open X` choosefrom_basis[OF `X \ {}`]] + guess B' . note B' = this + thus "\B'\B. f B' \ X" by (auto intro!: choosefrom_basis) +qed + end -subsection {* Enumerable Basis *} - -locale enumerates_basis = - fixes f::"nat \ 'a::topological_space set" - assumes enumerable_basis: "topological_basis (range f)" +subsection {* Countable Basis *} + +locale countable_basis = + fixes B::"'a::topological_space set set" + assumes is_basis: "topological_basis B" + assumes countable_basis: "countable B" begin -lemma open_enumerable_basis_ex: - assumes "open X" - shows "\N. X = (\n\N. f n)" -proof - - from enumerable_basis assms obtain B' where "B' \ range f" "X = Union B'" - unfolding topological_basis_def by blast - hence "Union B' = (\n\{n. f n \ B'}. f n)" by auto - with `X = Union B'` show ?thesis by blast -qed - -lemma open_enumerable_basisE: +lemma open_countable_basis_ex: assumes "open X" - obtains N where "X = (\n\N. f n)" - using assms open_enumerable_basis_ex by (atomize_elim) simp - -lemma countable_dense_set: - shows "\x::nat \ 'a. \y. open y \ y \ {} \ (\n. x n \ y)" + shows "\B' \ B. X = Union B'" + using assms countable_basis is_basis unfolding topological_basis_def by blast + +lemma open_countable_basisE: + assumes "open X" + obtains B' where "B' \ B" "X = Union B'" + using assms open_countable_basis_ex by (atomize_elim) simp + +lemma countable_dense_exists: + shows "\D::'a set. countable D \ (\X. open X \ X \ {} \ (\d \ D. d \ X))" proof - - def x \ "\n. (SOME x::'a. x \ f n)" - have x: "\n. f n \ ({}::'a set) \ x n \ f n" unfolding x_def - by (rule someI_ex) auto - have "\y. open y \ y \ {} \ (\n. x n \ y)" - proof (intro allI impI) - fix y::"'a set" assume "open y" "y \ {}" - from open_enumerable_basisE[OF `open y`] guess N . note N = this - obtain n where n: "n \ N" "f n \ ({}::'a set)" - proof (atomize_elim, rule ccontr, clarsimp) - assume "\n. n \ N \ f n = ({}::'a set)" - hence "(\n\N. f n) = (\n\N. {}::'a set)" - by (intro UN_cong) auto - hence "y = {}" unfolding N by simp - with `y \ {}` show False by auto - qed - with x N n have "x n \ y" by auto - thus "\n. x n \ y" .. - qed - thus ?thesis by blast + let ?f = "(\B'. SOME x. x \ B')" + have "countable (?f ` B)" using countable_basis by simp + with basis_dense[OF is_basis, of ?f] show ?thesis + by (intro exI[where x="?f ` B"]) (metis (mono_tags) all_not_in_conv imageI someI) qed lemma countable_dense_setE: - obtains x :: "nat \ 'a" - where "\y. open y \ y \ {} \ \n. x n \ y" - using countable_dense_set by blast - -text {* Construction of an increasing sequence approximating open sets, therefore enumeration of - basis which is closed under union. *} - -definition enum_basis::"nat \ 'a set" - where "enum_basis n = \(set (map f (from_nat n)))" - -lemma enum_basis_basis: "topological_basis (range enum_basis)" + obtains D :: "'a set" + where "countable D" "\X. open X \ X \ {} \ \d \ D. d \ X" + using countable_dense_exists by blast + +text {* Construction of an increasing sequence approximating open sets, + therefore basis which is closed under union. *} + +definition union_closed_basis::"'a set set" where + "union_closed_basis = (\l. \set l) ` lists B" + +lemma basis_union_closed_basis: "topological_basis union_closed_basis" proof (rule topological_basisI) fix O' and x::'a assume "open O'" "x \ O'" - from topological_basisE[OF enumerable_basis this] guess B' . note B' = this - moreover then obtain n where "B' = f n" by auto - moreover hence "B' = enum_basis (to_nat [n])" by (auto simp: enum_basis_def) - ultimately show "\B'\range enum_basis. x \ B' \ B' \ O'" by blast + from topological_basisE[OF is_basis this] guess B' . note B' = this + thus "\B'\union_closed_basis. x \ B' \ B' \ O'" unfolding union_closed_basis_def + by (auto intro!: bexI[where x="[B']"]) next - fix B' assume "B' \ range enum_basis" - with topological_basis_open[OF enumerable_basis] - show "open B'" by (auto simp add: enum_basis_def intro!: open_UN) -qed - -lemmas open_enum_basis = topological_basis_open[OF enum_basis_basis] - -lemma empty_basisI[intro]: "{} \ range enum_basis" -proof - show "{} = enum_basis (to_nat ([]::nat list))" by (simp add: enum_basis_def) -qed rule + fix B' assume "B' \ union_closed_basis" + thus "open B'" + using topological_basis_open[OF is_basis] + by (auto simp: union_closed_basis_def) +qed + +lemma countable_union_closed_basis: "countable union_closed_basis" + unfolding union_closed_basis_def using countable_basis by simp + +lemmas open_union_closed_basis = topological_basis_open[OF basis_union_closed_basis] + +lemma union_closed_basis_ex: + assumes X: "X \ union_closed_basis" + shows "\B'. finite B' \ X = \B' \ B' \ B" +proof - + from X obtain l where "\x. x\set l \ x\B" "X = \set l" by (auto simp: union_closed_basis_def) + thus ?thesis by auto +qed + +lemma union_closed_basisE: + assumes "X \ union_closed_basis" + obtains B' where "finite B'" "X = \B'" "B' \ B" using union_closed_basis_ex[OF assms] by blast + +lemma union_closed_basisI: + assumes "finite B'" "X = \B'" "B' \ B" + shows "X \ union_closed_basis" +proof - + from finite_list[OF `finite B'`] guess l .. + thus ?thesis using assms unfolding union_closed_basis_def by (auto intro!: image_eqI[where x=l]) +qed + +lemma empty_basisI[intro]: "{} \ union_closed_basis" + by (rule union_closed_basisI[of "{}"]) auto lemma union_basisI[intro]: - assumes "A \ range enum_basis" "B \ range enum_basis" - shows "A \ B \ range enum_basis" -proof - - from assms obtain a b where "A \ B = enum_basis a \ enum_basis b" by auto - also have "\ = enum_basis (to_nat (from_nat a @ from_nat b::nat list))" - by (simp add: enum_basis_def) - finally show ?thesis by simp -qed + assumes "X \ union_closed_basis" "Y \ union_closed_basis" + shows "X \ Y \ union_closed_basis" + using assms by (auto intro: union_closed_basisI elim!:union_closed_basisE) lemma open_imp_Union_of_incseq: assumes "open X" - shows "\S. incseq S \ (\j. S j) = X \ range S \ range enum_basis" + shows "\S. incseq S \ (\j. S j) = X \ range S \ union_closed_basis" proof - - interpret E: enumerates_basis enum_basis proof qed (rule enum_basis_basis) - from E.open_enumerable_basis_ex[OF `open X`] obtain N where N: "X = (\n\N. enum_basis n)" by auto - hence X: "X = (\n. if n \ N then enum_basis n else {})" by (auto split: split_if_asm) - def S \ "nat_rec (if 0 \ N then enum_basis 0 else {}) - (\n S. if (Suc n) \ N then S \ enum_basis (Suc n) else S)" - have S_simps[simp]: - "S 0 = (if 0 \ N then enum_basis 0 else {})" - "\n. S (Suc n) = (if (Suc n) \ N then S n \ enum_basis (Suc n) else S n)" - by (simp_all add: S_def) - have "incseq S" by (rule incseq_SucI) auto - moreover - have "(\j. S j) = X" unfolding N - proof safe - fix x n assume "n \ N" "x \ enum_basis n" - hence "x \ S n" by (cases n) auto - thus "x \ (\j. S j)" by auto - next - fix x j - assume "x \ S j" - thus "x \ UNION N enum_basis" by (induct j) (auto split: split_if_asm) - qed - moreover have "range S \ range enum_basis" - proof safe - fix j show "S j \ range enum_basis" by (induct j) auto - qed - ultimately show ?thesis by auto + from open_countable_basis_ex[OF `open X`] + obtain B' where B': "B'\B" "X = \B'" by auto + from this(1) countable_basis have "countable B'" by (rule countable_subset) + show ?thesis + proof cases + assume "B' \ {}" + def S \ "\n. \i\{0..n}. from_nat_into B' i" + have S:"\n. S n = \{from_nat_into B' i|i. i\{0..n}}" unfolding S_def by force + have "incseq S" by (force simp: S_def incseq_Suc_iff) + moreover + have "(\j. S j) = X" unfolding B' + proof safe + fix x X assume "X \ B'" "x \ X" + then obtain n where "X = from_nat_into B' n" + by (metis `countable B'` from_nat_into_surj) + also have "\ \ S n" by (auto simp: S_def) + finally show "x \ (\j. S j)" using `x \ X` by auto + next + fix x n + assume "x \ S n" + also have "\ = (\i\{0..n}. from_nat_into B' i)" + by (simp add: S_def) + also have "\ \ (\i. from_nat_into B' i)" by auto + also have "\ \ \B'" using `B' \ {}` by (auto intro: from_nat_into) + finally show "x \ \B'" . + qed + moreover have "range S \ union_closed_basis" using B' + by (auto intro!: union_closed_basisI[OF _ S] simp: from_nat_into `B' \ {}`) + ultimately show ?thesis by auto + qed (auto simp: B') qed lemma open_incseqE: assumes "open X" - obtains S where "incseq S" "(\j. S j) = X" "range S \ range enum_basis" + obtains S where "incseq S" "(\j. S j) = X" "range S \ union_closed_basis" using open_imp_Union_of_incseq assms by atomize_elim end -class enumerable_basis = topological_space + - assumes ex_enum_basis: "\f::nat \ 'a::topological_space set. topological_basis (range f)" - -sublocale enumerable_basis < enumerates_basis "Eps (topological_basis o range)" - unfolding o_def - proof qed (rule someI_ex[OF ex_enum_basis]) +class countable_basis_space = topological_space + + assumes ex_countable_basis: + "\B::'a::topological_space set set. countable B \ topological_basis B" + +sublocale countable_basis_space < countable_basis "SOME B. countable B \ topological_basis B" + using someI_ex[OF ex_countable_basis] by unfold_locales safe subsection {* Polish spaces *} text {* Textbooks define Polish spaces as completely metrizable. We assume the topology to be complete for a given metric. *} -class polish_space = complete_space + enumerable_basis +class polish_space = complete_space + countable_basis_space subsection {* General notion of a topology as a value *} @@ -5444,35 +5457,36 @@ thus ?thesis unfolding closed_limpt unfolding islimpt_approachable by blast qed -instance ordered_euclidean_space \ enumerable_basis +instance ordered_euclidean_space \ countable_basis_space proof def to_cube \ "\(a, b). {Chi (real_of_rat \ op ! a)<.. op ! b)}::'a set" - def enum \ "\n. (to_cube (from_nat n)::'a set)" - have "Ball (range enum) open" unfolding enum_def + def B \ "(\n. (to_cube (from_nat n)::'a set)) ` UNIV" + have "countable B" unfolding B_def by simp + moreover + have "Ball B open" unfolding B_def proof safe fix n show "open (to_cube (from_nat n))" by (cases "from_nat n::rat list \ rat list") (simp add: open_interval to_cube_def) qed - moreover have "(\x. open x \ (\B'\range enum. \B' = x))" + moreover have "(\x. open x \ (\B'\B. \B' = x))" proof safe fix x::"'a set" assume "open x" def lists \ "{(a, b) |a b. to_cube (a, b) \ x}" from open_UNION[OF `open x`] have "\(to_cube ` lists) = x" unfolding lists_def to_cube_def by simp - moreover have "to_cube ` lists \ range enum" + moreover have "to_cube ` lists \ B" proof fix x assume "x \ to_cube ` lists" then obtain l where "l \ lists" "x = to_cube l" by auto - hence "x = enum (to_nat l)" by (simp add: to_cube_def enum_def) - thus "x \ range enum" by simp + thus "x \ B" by (auto simp add: B_def intro!: image_eqI[where x="to_nat l"]) qed ultimately - show "\B'\range enum. \B' = x" by blast + show "\B'\B. \B' = x" by blast qed ultimately - show "\f::nat\'a set. topological_basis (range f)" unfolding topological_basis_def by blast + show "\B::'a set set. countable B \ topological_basis B" unfolding topological_basis_def by blast qed instance ordered_euclidean_space \ polish_space .. diff -r de72bbe42190 -r dea9363887a6 src/HOL/Probability/Borel_Space.thy --- a/src/HOL/Probability/Borel_Space.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Probability/Borel_Space.thy Tue Nov 27 13:48:40 2012 +0100 @@ -462,27 +462,32 @@ finally show "x \ sigma_sets UNIV (Collect open)" by simp qed simp_all -lemma borel_eq_enumerated_basis: - fixes f::"nat\'a::topological_space set" - assumes "topological_basis (range f)" - shows "borel = sigma UNIV (range f)" +lemma borel_eq_countable_basis: + fixes B::"'a::topological_space set set" + assumes "countable B" + assumes "topological_basis B" + shows "borel = sigma UNIV B" unfolding borel_def proof (intro sigma_eqI sigma_sets_eqI, safe) - interpret enumerates_basis proof qed (rule assms) - fix x::"'a set" assume "open x" - from open_enumerable_basisE[OF this] guess N . - hence x: "x = (\n. if n \ N then f n else {})" by (auto split: split_if_asm) - also have "\ \ sigma_sets UNIV (range f)" by (auto intro!: sigma_sets.Empty Union) - finally show "x \ sigma_sets UNIV (range f)" . + interpret countable_basis using assms by unfold_locales + fix X::"'a set" assume "open X" + from open_countable_basisE[OF this] guess B' . note B' = this + show "X \ sigma_sets UNIV B" + proof cases + assume "B' \ {}" + thus "X \ sigma_sets UNIV B" using assms B' + by (metis from_nat_into Union_image_eq countable_subset range_from_nat_into + in_mono sigma_sets.Basic sigma_sets.Union) + qed (simp add: sigma_sets.Empty B') next - fix n - have "open (f n)" by (rule topological_basis_open[OF assms]) simp - thus "f n \ sigma_sets UNIV (Collect open)" by auto + fix b assume "b \ B" + hence "open b" by (rule topological_basis_open[OF assms(2)]) + thus "b \ sigma_sets UNIV (Collect open)" by auto qed simp_all -lemma borel_eq_enum_basis: - "borel = sigma UNIV (range enum_basis)" - by (rule borel_eq_enumerated_basis[OF enum_basis_basis]) +lemma borel_eq_union_closed_basis: + "borel = sigma UNIV union_closed_basis" + by (rule borel_eq_countable_basis[OF countable_union_closed_basis basis_union_closed_basis]) lemma borel_measurable_halfspacesI: fixes f :: "'a \ 'c\ordered_euclidean_space" diff -r de72bbe42190 -r dea9363887a6 src/HOL/Probability/Discrete_Topology.thy --- a/src/HOL/Probability/Discrete_Topology.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Probability/Discrete_Topology.thy Tue Nov 27 13:48:40 2012 +0100 @@ -48,15 +48,17 @@ thus "\f::'a discrete \ nat. inj f" by blast qed -instance discrete :: (countable) enumerable_basis +instance discrete :: (countable) countable_basis_space proof - have "topological_basis (range (\n::nat. {from_nat n::'a discrete}))" + let ?B = "(range (\n::nat. {from_nat n::'a discrete}))" + have "topological_basis ?B" proof (intro topological_basisI) fix x::"'a discrete" and O' assume "open O'" "x \ O'" thus "\B'\range (\n. {from_nat n}). x \ B' \ B' \ O'" by (auto intro: exI[where x="to_nat x"]) qed (simp add: open_discrete_def) - thus "\f::nat\'a discrete set. topological_basis (range f)" by blast + moreover have "countable ?B" by simp + ultimately show "\B::'a discrete set set. countable B \ topological_basis B" by blast qed instance discrete :: (countable) polish_space .. diff -r de72bbe42190 -r dea9363887a6 src/HOL/Probability/Fin_Map.thy --- a/src/HOL/Probability/Fin_Map.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Probability/Fin_Map.thy Tue Nov 27 13:48:40 2012 +0100 @@ -450,40 +450,41 @@ instantiation finmap :: (countable, polish_space) polish_space begin -definition enum_basis_finmap :: "nat \ ('a \\<^isub>F 'b) set" where - "enum_basis_finmap n = - (let m = from_nat n::('a \\<^isub>F nat) in Pi' (domain m) (enum_basis o (m)\<^isub>F))" +definition basis_finmap::"('a \\<^isub>F 'b) set set" + where "basis_finmap = {Pi' I S|I S. finite I \ (\i \ I. S i \ union_closed_basis)}" + +lemma in_basis_finmapI: + assumes "finite I" assumes "\i. i \ I \ S i \ union_closed_basis" + shows "Pi' I S \ basis_finmap" + using assms unfolding basis_finmap_def by auto + +lemma in_basis_finmapE: + assumes "x \ basis_finmap" + obtains I S where "x = Pi' I S" "finite I" "\i. i \ I \ S i \ union_closed_basis" + using assms unfolding basis_finmap_def by auto -lemma range_enum_basis_eq: - "range enum_basis_finmap = {Pi' I S|I S. finite I \ (\i \ I. S i \ range enum_basis)}" -proof (auto simp: enum_basis_finmap_def[abs_def]) - fix S::"('a \ 'b set)" and I - assume "\i\I. S i \ range enum_basis" - hence "\i\I. \n. S i = enum_basis n" by auto - then obtain n where n: "\i\I. S i = enum_basis (n i)" - unfolding bchoice_iff by blast - assume [simp]: "finite I" - have "\fm. domain fm = I \ (\i\I. n i = (fm i))" - by (rule finmap_choice) auto - then obtain m where "Pi' I S = Pi' (domain m) (enum_basis o m)" - using n by (auto simp: Pi'_def) - hence "Pi' I S = (let m = from_nat (to_nat m) in Pi' (domain m) (enum_basis \ m))" - by simp - thus "Pi' I S \ range (\n. let m = from_nat n in Pi' (domain m) (enum_basis \ m))" - by blast -qed (metis finite_domain o_apply rangeI) +lemma basis_finmap_eq: + "basis_finmap = (\f. Pi' (domain f) (\i. from_nat_into union_closed_basis ((f)\<^isub>F i))) ` + (UNIV::('a \\<^isub>F nat) set)" (is "_ = ?f ` _") + unfolding basis_finmap_def +proof safe + fix I::"'a set" and S::"'a \ 'b set" + assume "finite I" "\i\I. S i \ union_closed_basis" + hence "Pi' I S = ?f (finmap_of I (\x. to_nat_on union_closed_basis (S x)))" + by (force simp: Pi'_def countable_union_closed_basis) + thus "Pi' I S \ range ?f" by simp +qed (metis (mono_tags) empty_basisI equals0D finite_domain from_nat_into) -lemma in_enum_basis_finmapI: - assumes "finite I" assumes "\i. i \ I \ S i \ range enum_basis" - shows "Pi' I S \ range enum_basis_finmap" - using assms unfolding range_enum_basis_eq by auto +lemma countable_basis_finmap: "countable basis_finmap" + unfolding basis_finmap_eq by simp lemma finmap_topological_basis: - "topological_basis (range (enum_basis_finmap))" + "topological_basis basis_finmap" proof (subst topological_basis_iff, safe) - fix n::nat - show "open (enum_basis_finmap n::('a \\<^isub>F 'b) set)" using enum_basis_basis - by (auto intro!: open_Pi'I simp: topological_basis_def enum_basis_finmap_def Let_def) + fix B' assume "B' \ basis_finmap" + thus "open B'" + by (auto intro!: open_Pi'I topological_basis_open[OF basis_union_closed_basis] + simp: topological_basis_def basis_finmap_def Let_def) next fix O'::"('a \\<^isub>F 'b) set" and x assume "open O'" "x \ O'" @@ -491,19 +492,18 @@ def e' \ "e / (card (domain x) + 1)" have "\B. - (\i\domain x. x i \ enum_basis (B i) \ enum_basis (B i) \ ball (x i) e')" + (\i\domain x. x i \ B i \ B i \ ball (x i) e' \ B i \ union_closed_basis)" proof (rule bchoice, safe) fix i assume "i \ domain x" have "open (ball (x i) e')" "x i \ ball (x i) e'" using e by (auto simp add: e'_def intro!: divide_pos_pos) - from topological_basisE[OF enum_basis_basis this] guess b' . - thus "\y. x i \ enum_basis y \ - enum_basis y \ ball (x i) e'" by auto + from topological_basisE[OF basis_union_closed_basis this] guess b' . + thus "\y. x i \ y \ y \ ball (x i) e' \ y \ union_closed_basis" by auto qed then guess B .. note B = this - def B' \ "Pi' (domain x) (\i. enum_basis (B i)::'b set)" - hence "B' \ range enum_basis_finmap" unfolding B'_def - by (intro in_enum_basis_finmapI) auto + def B' \ "Pi' (domain x) (\i. (B i)::'b set)" + hence "B' \ basis_finmap" unfolding B'_def using B + by (intro in_basis_finmapI) auto moreover have "x \ B'" unfolding B'_def using B by auto moreover have "B' \ O'" proof @@ -516,7 +516,7 @@ also have "\ \ (\i \ domain x. e')" proof (rule setsum_mono) fix i assume "i \ domain x" - with `y \ B'` B have "y i \ enum_basis (B i)" + with `y \ B'` B have "y i \ B i" by (simp add: Pi'_def B'_def) hence "y i \ ball (x i) e'" using B `domain y = domain x` `i \ domain x` by force @@ -528,73 +528,15 @@ qed qed ultimately - show "\B'\range enum_basis_finmap. x \ B' \ B' \ O'" by blast + show "\B'\basis_finmap. x \ B' \ B' \ O'" by blast qed lemma range_enum_basis_finmap_imp_open: - assumes "x \ range enum_basis_finmap" + assumes "x \ basis_finmap" shows "open x" using finmap_topological_basis assms by (auto simp: topological_basis_def) -lemma open_imp_ex_UNION_of_enum: - fixes X::"('a \\<^isub>F 'b) set" - assumes "open X" assumes "X \ {}" - shows "\A::nat\'a set. \B::nat\('a \ 'b set) . X = UNION UNIV (\i. Pi' (A i) (B i)) \ - (\n. \i\A n. (B n) i \ range enum_basis) \ (\n. finite (A n))" -proof - - from `open X` obtain B' where B': "B'\range enum_basis_finmap" "\B' = X" - using finmap_topological_basis by (force simp add: topological_basis_def) - then obtain B where B: "B' = enum_basis_finmap ` B" by (auto simp: subset_image_iff) - show ?thesis - proof cases - assume "B = {}" with B have "B' = {}" by simp hence False using B' assms by simp - thus ?thesis by simp - next - assume "B \ {}" then obtain b where b: "b \ B" by auto - def NA \ "\n::nat. if n \ B - then domain ((from_nat::_\'a \\<^isub>F nat) n) - else domain ((from_nat::_\'a\\<^isub>F nat) b)" - def NB \ "\n::nat. if n \ B - then (\i. (enum_basis::nat\'b set) (((from_nat::_\'a \\<^isub>F nat) n) i)) - else (\i. (enum_basis::nat\'b set) (((from_nat::_\'a \\<^isub>F nat) b) i))" - have "X = UNION UNIV (\i. Pi' (NA i) (NB i))" unfolding B'(2)[symmetric] using b - unfolding B - by safe - (auto simp add: NA_def NB_def enum_basis_finmap_def Let_def o_def split: split_if_asm) - moreover - have "(\n. \i\NA n. (NB n) i \ range enum_basis)" - using enumerable_basis by (auto simp: topological_basis_def NA_def NB_def) - moreover have "(\n. finite (NA n))" by (simp add: NA_def) - ultimately show ?thesis by auto - qed -qed - -lemma open_imp_ex_UNION: - fixes X::"('a \\<^isub>F 'b) set" - assumes "open X" assumes "X \ {}" - shows "\A::nat\'a set. \B::nat\('a \ 'b set) . X = UNION UNIV (\i. Pi' (A i) (B i)) \ - (\n. \i\A n. open ((B n) i)) \ (\n. finite (A n))" - using open_imp_ex_UNION_of_enum[OF assms] - apply auto - apply (rule_tac x = A in exI) - apply (rule_tac x = B in exI) - apply (auto simp: open_enum_basis) - done - -lemma open_basisE: - assumes "open X" assumes "X \ {}" - obtains A::"nat\'a set" and B::"nat\('a \ 'b set)" where - "X = UNION UNIV (\i. Pi' (A i) (B i))" "\n i. i\A n \ open ((B n) i)" "\n. finite (A n)" - using open_imp_ex_UNION[OF assms] by auto - -lemma open_basis_of_enumE: - assumes "open X" assumes "X \ {}" - obtains A::"nat\'a set" and B::"nat\('a \ 'b set)" where - "X = UNION UNIV (\i. Pi' (A i) (B i))" "\n i. i\A n \ (B n) i \ range enum_basis" - "\n. finite (A n)" - using open_imp_ex_UNION_of_enum[OF assms] by auto - -instance proof qed (blast intro: finmap_topological_basis) +instance proof qed (blast intro: finmap_topological_basis countable_basis_finmap) end @@ -746,16 +688,12 @@ proof safe fix y assume "y \ sets N" have "A -` y = (\{A -` y \ {x. domain x = J}|J. finite J})" by auto - hence "A -` y \ space (PiF I M) = (\n. A -` y \ space (PiF ({set (from_nat n)}\I) M))" - apply (auto simp: space_PiF Pi'_def) - proof - - case goal1 + { fix x::"'a \\<^isub>F 'b" from finite_list[of "domain x"] obtain xs where "set xs = domain x" by auto - thus ?case - apply (intro exI[where x="to_nat xs"]) - apply auto - done - qed + hence "\n. domain x = set (from_nat n)" + by (intro exI[where x="to_nat xs"]) auto } + hence "A -` y \ space (PiF I M) = (\n. A -` y \ space (PiF ({set (from_nat n)}\I) M))" + by (auto simp: space_PiF Pi'_def) also have "\ \ sets (PiF I M)" apply (intro sets.Int sets.countable_nat_UN subsetI, safe) apply (case_tac "set (from_nat i) \ I") @@ -928,16 +866,6 @@ qed simp qed -lemma sets_subspaceI: - assumes "A \ space M \ sets M" - assumes "B \ sets M" - shows "A \ B \ sets M" using assms -proof - - have "A \ B = (A \ space M) \ B" - using assms sets.sets_into_space by auto - thus ?thesis using assms by auto -qed - lemma space_PiF_singleton_eq_product: assumes "finite I" shows "space (PiF {I} M) = (\' i\I. space (M i))" @@ -1075,49 +1003,49 @@ by (auto intro!: sets.sigma_sets_subset product_in_sets_PiFI simp: E_generates P_def) qed -lemma enumerable_sigma_fprod_algebra_sigma_eq: +lemma sets_PiF_eq_sigma_union_closed_basis_single: assumes "I \ {}" assumes [simp]: "finite I" shows "sets (PiF {I} (\_. borel)) = sigma_sets (space (PiF {I} (\_. borel))) - {Pi' I F |F. (\i\I. F i \ range enum_basis)}" + {Pi' I F |F. (\i\I. F i \ union_closed_basis)}" proof - from open_incseqE[OF open_UNIV] guess S::"nat \ 'b set" . note S = this show ?thesis proof (rule sigma_fprod_algebra_sigma_eq) show "finite I" by simp show "I \ {}" by fact - show "incseq S" "(\j. S j) = space borel" "range S \ range enum_basis" + show "incseq S" "(\j. S j) = space borel" "range S \ union_closed_basis" using S by simp_all - show "range enum_basis \ Pow (space borel)" by simp - show "sets borel = sigma_sets (space borel) (range enum_basis)" - by (simp add: borel_eq_enum_basis) + show "union_closed_basis \ Pow (space borel)" by simp + show "sets borel = sigma_sets (space borel) union_closed_basis" + by (simp add: borel_eq_union_closed_basis) qed qed -text {* adapted from @{thm enumerable_sigma_fprod_algebra_sigma_eq} *} +text {* adapted from @{thm sets_PiF_eq_sigma_union_closed_basis_single} *} -lemma enumerable_sigma_prod_algebra_sigma_eq: +lemma sets_PiM_eq_sigma_union_closed_basis: assumes "I \ {}" assumes [simp]: "finite I" shows "sets (PiM I (\_. borel)) = sigma_sets (space (PiM I (\_. borel))) - {Pi\<^isub>E I F |F. \i\I. F i \ range enum_basis}" + {Pi\<^isub>E I F |F. \i\I. F i \ union_closed_basis}" proof - from open_incseqE[OF open_UNIV] guess S::"nat \ 'b set" . note S = this show ?thesis proof (rule sigma_prod_algebra_sigma_eq) show "finite I" by simp note[[show_types]] - fix i show "(\j. S j) = space borel" "range S \ range enum_basis" + fix i show "(\j. S j) = space borel" "range S \ union_closed_basis" using S by simp_all - show "range enum_basis \ Pow (space borel)" by simp - show "sets borel = sigma_sets (space borel) (range enum_basis)" - by (simp add: borel_eq_enum_basis) + show "union_closed_basis \ Pow (space borel)" by simp + show "sets borel = sigma_sets (space borel) union_closed_basis" + by (simp add: borel_eq_union_closed_basis) qed qed lemma product_open_generates_sets_PiF_single: assumes "I \ {}" assumes [simp]: "finite I" - shows "sets (PiF {I} (\_. borel::'b::enumerable_basis measure)) = + shows "sets (PiF {I} (\_. borel::'b::countable_basis_space measure)) = sigma_sets (space (PiF {I} (\_. borel))) {Pi' I F |F. (\i\I. F i \ Collect open)}" proof - from open_incseqE[OF open_UNIV] guess S::"nat \ 'b set" . note S = this @@ -1126,7 +1054,7 @@ show "finite I" by simp show "I \ {}" by fact show "incseq S" "(\j. S j) = space borel" "range S \ Collect open" - using S by (auto simp: open_enum_basis) + using S by (auto simp: open_union_closed_basis) show "Collect open \ Pow (space borel)" by simp show "sets borel = sigma_sets (space borel) (Collect open)" by (simp add: borel_def) @@ -1136,7 +1064,7 @@ lemma product_open_generates_sets_PiM: assumes "I \ {}" assumes [simp]: "finite I" - shows "sets (PiM I (\_. borel::'b::enumerable_basis measure)) = + shows "sets (PiM I (\_. borel::'b::countable_basis_space measure)) = sigma_sets (space (PiM I (\_. borel))) {Pi\<^isub>E I F |F. \i\I. F i \ Collect open}" proof - from open_incseqE[OF open_UNIV] guess S::"nat \ 'b set" . note S = this @@ -1144,7 +1072,7 @@ proof (rule sigma_prod_algebra_sigma_eq) show "finite I" by simp note[[show_types]] fix i show "(\j. S j) = space borel" "range S \ Collect open" - using S by (auto simp: open_enum_basis) + using S by (auto simp: open_union_closed_basis) show "Collect open \ Pow (space borel)" by simp show "sets borel = sigma_sets (space borel) (Collect open)" by (simp add: borel_def) @@ -1155,88 +1083,62 @@ lemma borel_eq_PiF_borel: shows "(borel :: ('i::countable \\<^isub>F 'a::polish_space) measure) = - PiF (Collect finite) (\_. borel :: 'a measure)" -proof (rule measure_eqI) - have C: "Collect finite \ {}" by auto - show "sets (borel::('i \\<^isub>F 'a) measure) = sets (PiF (Collect finite) (\_. borel))" - proof - show "sets (borel::('i \\<^isub>F 'a) measure) \ sets (PiF (Collect finite) (\_. borel))" - apply (simp add: borel_def sets_PiF) - proof (rule sigma_sets_mono, safe, cases) - fix X::"('i \\<^isub>F 'a) set" assume "open X" "X \ {}" - from open_basisE[OF this] guess NA NB . note N = this - hence "X = (\i. Pi' (NA i) (NB i))" by simp - also have "\ \ - sigma_sets UNIV {Pi' J S |S J. finite J \ S \ J \ sigma_sets UNIV (Collect open)}" - using N by (intro Union sigma_sets.Basic) blast - finally show "X \ sigma_sets UNIV - {Pi' J X |X J. finite J \ X \ J \ sigma_sets UNIV (Collect open)}" . - qed (auto simp: Empty) + PiF (Collect finite) (\_. borel :: 'a measure)" + unfolding borel_def PiF_def +proof (rule measure_eqI, clarsimp, rule sigma_sets_eqI) + fix a::"('i \\<^isub>F 'a) set" assume "a \ Collect open" hence "open a" by simp + then obtain B' where B': "B'\basis_finmap" "a = \B'" + using finmap_topological_basis by (force simp add: topological_basis_def) + have "a \ sigma UNIV {Pi' J X |X J. finite J \ X \ J \ sigma_sets UNIV (Collect open)}" + unfolding `a = \B'` + proof (rule sets.countable_Union) + from B' countable_basis_finmap show "countable B'" by (metis countable_subset) next - show "sets (PiF (Collect finite) (\_. borel)) \ sets (borel::('i \\<^isub>F 'a) measure)" + show "B' \ sets (sigma UNIV + {Pi' J X |X J. finite J \ X \ J \ sigma_sets UNIV (Collect open)})" (is "_ \ sets ?s") proof - fix x assume x: "x \ sets (PiF (Collect finite::'i set set) (\_. borel::'a measure))" - hence x_sp: "x \ space (PiF (Collect finite) (\_. borel))" by (rule sets.sets_into_space) - let ?x = "\J. x \ {x. domain x = J}" - have "x = \{?x J |J. finite J}" by auto - also have "\ \ sets borel" - proof (rule countable_finite_comprehension, assumption) - fix J::"'i set" assume "finite J" - { assume ef: "J = {}" - { assume e: "?x J = {}" - hence "?x J \ sets borel" by simp - } moreover { - assume "?x J \ {}" - then obtain f where "f \ x" "domain f = {}" using ef by auto - hence "?x J = {f}" using `J = {}` - by (auto simp: finmap_eq_iff) - also have "{f} \ sets borel" by simp - finally have "?x J \ sets borel" . - } ultimately have "?x J \ sets borel" by blast - } moreover { - assume "J \ ({}::'i set)" - from open_incseqE[OF open_UNIV] guess S::"nat \ 'a set" . note S = this - have "(?x J) = x \ {m. domain m \ {J}}" by auto - also have "\ \ sets (PiF {J} (\_. borel))" - using x by (rule restrict_sets_measurable) (auto simp: `finite J`) - also have "\ = sigma_sets (space (PiF {J} (\_. borel))) - {Pi' (J) F |F. (\j\J. F j \ range enum_basis)}" - (is "_ = sigma_sets _ ?P") - by (rule enumerable_sigma_fprod_algebra_sigma_eq[OF `J \ {}` `finite J`]) - also have "\ \ sets borel" - proof - fix x - assume "x \ sigma_sets (space (PiF {J} (\_. borel))) ?P" - thus "x \ sets borel" - proof (rule sigma_sets.induct, safe) - fix F::"'i \ 'a set" - assume "\j\J. F j \ range enum_basis" - hence "Pi' J F \ range enum_basis_finmap" - unfolding range_enum_basis_eq - by (auto simp: `finite J` intro!: exI[where x=J] exI[where x=F]) - hence "open (Pi' (J) F)" by (rule range_enum_basis_finmap_imp_open) - thus "Pi' (J) F \ sets borel" by simp - next - fix a::"('i \\<^isub>F 'a) set" - have "space (PiF {J::'i set} (\_. borel::'a measure)) = - Pi' (J) (\_. UNIV)" - by (auto simp: space_PiF product_def) - moreover have "open (Pi' (J::'i set) (\_. UNIV::'a set))" - by (intro open_Pi'I) auto - ultimately - have "space (PiF {J::'i set} (\_. borel::'a measure)) \ sets borel" - by simp - moreover - assume "a \ sets borel" - ultimately show "space (PiF {J} (\_. borel)) - a \ sets borel" .. - qed auto - qed - finally have "(?x J) \ sets borel" . - } ultimately show "(?x J) \ sets borel" by blast - qed - finally show "x \ sets (borel)" . + fix x assume "x \ B'" with B' have "x \ basis_finmap" by auto + then obtain J X where "x = Pi' J X" "finite J" "X \ J \ sigma_sets UNIV (Collect open)" + by (auto simp: basis_finmap_def open_union_closed_basis) + thus "x \ sets ?s" by auto qed qed + thus "a \ sigma_sets UNIV {Pi' J X |X J. finite J \ X \ J \ sigma_sets UNIV (Collect open)}" + by simp +next + fix b::"('i \\<^isub>F 'a) set" + assume "b \ {Pi' J X |X J. finite J \ X \ J \ sigma_sets UNIV (Collect open)}" + hence b': "b \ sets (Pi\<^isub>F (Collect finite) (\_. borel))" by (auto simp: sets_PiF borel_def) + let ?b = "\J. b \ {x. domain x = J}" + have "b = \((\J. ?b J) ` Collect finite)" by auto + also have "\ \ sets borel" + proof (rule sets.countable_Union, safe) + fix J::"'i set" assume "finite J" + { assume ef: "J = {}" + have "?b J \ sets borel" + proof cases + assume "?b J \ {}" + then obtain f where "f \ b" "domain f = {}" using ef by auto + hence "?b J = {f}" using `J = {}` + by (auto simp: finmap_eq_iff) + also have "{f} \ sets borel" by simp + finally show ?thesis . + qed simp + } moreover { + assume "J \ ({}::'i set)" + have "(?b J) = b \ {m. domain m \ {J}}" by auto + also have "\ \ sets (PiF {J} (\_. borel))" + using b' by (rule restrict_sets_measurable) (auto simp: `finite J`) + also have "\ = sigma_sets (space (PiF {J} (\_. borel))) + {Pi' (J) F |F. (\j\J. F j \ Collect open)}" + (is "_ = sigma_sets _ ?P") + by (rule product_open_generates_sets_PiF_single[OF `J \ {}` `finite J`]) + also have "\ \ sigma_sets UNIV (Collect open)" + by (intro sigma_sets_mono'') (auto intro!: open_Pi'I simp: space_PiF) + finally have "(?b J) \ sets borel" by (simp add: borel_def) + } ultimately show "(?b J) \ sets borel" by blast + qed (simp add: countable_Collect_finite) + finally show "b \ sigma_sets UNIV (Collect open)" by (simp add: borel_def) qed (simp add: emeasure_sigma borel_def PiF_def) subsection {* Isomorphism between Functions and Finite Maps *} diff -r de72bbe42190 -r dea9363887a6 src/HOL/Probability/Finite_Product_Measure.thy --- a/src/HOL/Probability/Finite_Product_Measure.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Probability/Finite_Product_Measure.thy Tue Nov 27 13:48:40 2012 +0100 @@ -178,7 +178,7 @@ lemma prod_algebra_sets_into_space: "prod_algebra I M \ Pow (\\<^isub>E i\I. space (M i))" - using assms by (auto simp: prod_emb_def prod_algebra_def) + by (auto simp: prod_emb_def prod_algebra_def) lemma prod_algebra_eq_finite: assumes I: "finite I" diff -r de72bbe42190 -r dea9363887a6 src/HOL/Probability/Projective_Limit.thy --- a/src/HOL/Probability/Projective_Limit.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Probability/Projective_Limit.thy Tue Nov 27 13:48:40 2012 +0100 @@ -550,7 +550,7 @@ hide_const (open) finmap_of hide_const (open) proj hide_const (open) domain -hide_const (open) enum_basis_finmap +hide_const (open) basis_finmap sublocale polish_projective \ P!: prob_space "(lim\<^isub>B I P)" proof diff -r de72bbe42190 -r dea9363887a6 src/HOL/Probability/Regularity.thy --- a/src/HOL/Probability/Regularity.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Probability/Regularity.thy Tue Nov 27 13:48:40 2012 +0100 @@ -104,7 +104,7 @@ qed lemma - fixes M::"'a::{enumerable_basis, complete_space} measure" + fixes M::"'a::{countable_basis_space, complete_space} measure" assumes sb: "sets M = sets borel" assumes "emeasure M (space M) \ \" assumes "B \ sets borel" @@ -124,43 +124,48 @@ (\e. e > 0 \ \B. A \ B \ open B \ emeasure M B \ emeasure M A + ereal e) \ ?outer A" by (rule ereal_approx_INF) (force intro!: emeasure_mono simp: emeasure_eq_measure sb)+ - from countable_dense_setE guess x::"nat \ 'a" . note x = this + from countable_dense_setE guess X::"'a set" . note X = this { fix r::real assume "r > 0" hence "\y. open (ball y r)" "\y. ball y r \ {}" by auto - with x[OF this] - have x: "space M = (\n. cball (x n) r)" + with X(2)[OF this] + have x: "space M = (\x\X. cball x r)" by (auto simp add: sU) (metis dist_commute order_less_imp_le) - have "(\k. emeasure M (\n\{0..k}. cball (x n) r)) ----> M (\k. (\n\{0..k}. cball (x n) r))" + let ?U = "\k. (\n\{0..k}. cball (from_nat_into X n) r)" + have "(\k. emeasure M (\n\{0..k}. cball (from_nat_into X n) r)) ----> M ?U" by (rule Lim_emeasure_incseq) (auto intro!: borel_closed bexI simp: closed_cball incseq_def Us sb) - also have "(\k. (\n\{0..k}. cball (x n) r)) = space M" - unfolding x by force - finally have "(\k. M (\n\{0..k}. cball (x n) r)) ----> M (space M)" . + also have "?U = space M" + proof safe + fix x from X(2)[OF open_ball[of x r]] `r > 0` obtain d where d: "d\X" "d \ ball x r" by auto + show "x \ ?U" + using X(1) d by (auto intro!: exI[where x="to_nat_on X d"] simp: dist_commute Bex_def) + qed (simp add: sU) + finally have "(\k. M (\n\{0..k}. cball (from_nat_into X n) r)) ----> M (space M)" . } note M_space = this { fix e ::real and n :: nat assume "e > 0" "n > 0" hence "1/n > 0" "e * 2 powr - n > 0" by (auto intro: mult_pos_pos) from M_space[OF `1/n>0`] - have "(\k. measure M (\i\{0..k}. cball (x i) (1/real n))) ----> measure M (space M)" + have "(\k. measure M (\i\{0..k}. cball (from_nat_into X i) (1/real n))) ----> measure M (space M)" unfolding emeasure_eq_measure by simp from metric_LIMSEQ_D[OF this `0 < e * 2 powr -n`] - obtain k where "dist (measure M (\i\{0..k}. cball (x i) (1/real n))) (measure M (space M)) < + obtain k where "dist (measure M (\i\{0..k}. cball (from_nat_into X i) (1/real n))) (measure M (space M)) < e * 2 powr -n" by auto - hence "measure M (\i\{0..k}. cball (x i) (1/real n)) \ + hence "measure M (\i\{0..k}. cball (from_nat_into X i) (1/real n)) \ measure M (space M) - e * 2 powr -real n" by (auto simp: dist_real_def) - hence "\k. measure M (\i\{0..k}. cball (x i) (1/real n)) \ + hence "\k. measure M (\i\{0..k}. cball (from_nat_into X i) (1/real n)) \ measure M (space M) - e * 2 powr - real n" .. } note k=this hence "\e\{0<..}. \(n::nat)\{0<..}. \k. - measure M (\i\{0..k}. cball (x i) (1/real n)) \ measure M (space M) - e * 2 powr - real n" + measure M (\i\{0..k}. cball (from_nat_into X i) (1/real n)) \ measure M (space M) - e * 2 powr - real n" by blast then obtain k where k: "\e\{0<..}. \n\{0<..}. measure M (space M) - e * 2 powr - real (n::nat) - \ measure M (\i\{0..k e n}. cball (x i) (1 / n))" + \ measure M (\i\{0..k e n}. cball (from_nat_into X i) (1 / n))" apply atomize_elim unfolding bchoice_iff . hence k: "\e n. e > 0 \ n > 0 \ measure M (space M) - e * 2 powr - n - \ measure M (\i\{0..k e n}. cball (x i) (1 / n))" + \ measure M (\i\{0..k e n}. cball (from_nat_into X i) (1 / n))" unfolding Ball_def by blast have approx_space: "\e. e > 0 \ @@ -168,7 +173,7 @@ (is "\e. _ \ ?thesis e") proof - fix e :: real assume "e > 0" - def B \ "\n. \i\{0..k e (Suc n)}. cball (x i) (1 / Suc n)" + def B \ "\n. \i\{0..k e (Suc n)}. cball (from_nat_into X i) (1 / Suc n)" have "\n. closed (B n)" by (auto simp: B_def closed_cball) hence [simp]: "\n. B n \ sets M" by (simp add: sb) from k[OF `e > 0` zero_less_Suc] @@ -202,7 +207,7 @@ show "complete K" using `closed K` by (simp add: complete_eq_closed) fix e'::real assume "0 < e'" from nat_approx_posE[OF this] guess n . note n = this - let ?k = "x ` {0..k e (Suc n)}" + let ?k = "from_nat_into X ` {0..k e (Suc n)}" have "finite ?k" by simp moreover have "K \ \(\x. ball x e') ` ?k" unfolding K_def B_def using n by force ultimately show "\k. finite k \ K \ \(\x. ball x e') ` k" by blast diff -r de72bbe42190 -r dea9363887a6 src/HOL/Probability/Sigma_Algebra.thy --- a/src/HOL/Probability/Sigma_Algebra.thy Tue Nov 27 11:29:47 2012 +0100 +++ b/src/HOL/Probability/Sigma_Algebra.thy Tue Nov 27 13:48:40 2012 +0100 @@ -10,7 +10,7 @@ theory Sigma_Algebra imports Complex_Main - "~~/src/HOL/Library/Countable" + "~~/src/HOL/Library/Countable_Set" "~~/src/HOL/Library/FuncSet" "~~/src/HOL/Library/Indicator_Function" "~~/src/HOL/Library/Extended_Real" @@ -298,6 +298,17 @@ show ?thesis unfolding * ** .. qed +lemma (in sigma_algebra) countable_Union [intro]: + assumes "countable X" "X \ M" shows "Union X \ M" +proof cases + assume "X \ {}" + hence "\X = (\n. from_nat_into X n)" + using assms by (auto intro: from_nat_into) (metis from_nat_into_surj) + also have "\ \ M" using assms + by (auto intro!: countable_nat_UN) (metis `X \ {}` from_nat_into set_mp) + finally show ?thesis . +qed simp + lemma (in sigma_algebra) countable_UN[intro]: fixes A :: "'i::countable \ 'a set" assumes "A`X \ M" @@ -1100,6 +1111,30 @@ "M \ Pow \ \ M' \ M \ sets (measure_of \ M' \) \ sets (measure_of \ M \')" by (auto intro!: sigma_sets_subseteq) +lemma sigma_sets_mono'': + assumes "A \ sigma_sets C D" + assumes "B \ D" + assumes "D \ Pow C" + shows "sigma_sets A B \ sigma_sets C D" +proof + fix x assume "x \ sigma_sets A B" + thus "x \ sigma_sets C D" + proof induct + case (Basic a) with assms have "a \ D" by auto + thus ?case .. + next + case Empty show ?case by (rule sigma_sets.Empty) + next + from assms have "A \ sets (sigma C D)" by (subst sets_measure_of[OF `D \ Pow C`]) + moreover case (Compl a) hence "a \ sets (sigma C D)" by (subst sets_measure_of[OF `D \ Pow C`]) + ultimately have "A - a \ sets (sigma C D)" .. + thus ?case by (subst (asm) sets_measure_of[OF `D \ Pow C`]) + next + case (Union a) + thus ?case by (intro sigma_sets.Union) + qed +qed + lemma in_measure_of[intro, simp]: "M \ Pow \ \ A \ M \ A \ sets (measure_of \ M \)" by auto