# HG changeset patch # User paulson # Date 1672331576 0 # Node ID 337c2265d8a238325f7691fa5bb0aeffbf5a6957 # Parent 8dac373b92bd4ed7d6d8224845ee897064381a5a Further cleaning up of messy proofs diff -r 8dac373b92bd -r 337c2265d8a2 src/HOL/Analysis/Function_Topology.thy --- a/src/HOL/Analysis/Function_Topology.thy Thu Dec 29 11:46:32 2022 +0000 +++ b/src/HOL/Analysis/Function_Topology.thy Thu Dec 29 16:32:56 2022 +0000 @@ -118,12 +118,7 @@ have *: "f \ U" if "U \ \" and "\V\\. \i. i \ I \ Y V i \ topspace (X i) \ f i \ Y V i" and "\i\I. f i \ topspace (X i)" and "f \ extensional I" for f U - proof - - have "Pi\<^sub>E I (Y U) = U" - using Y \U \ \\ by blast - then show "f \ U" - using that unfolding PiE_def Pi_def by blast - qed + by (smt (verit) PiE_iff Y that) show "?TOP \ \(\U\\. ?F U) \ \\" by (auto simp: PiE_iff *) show "\\ \ ?TOP \ \(\U\\. ?F U)" @@ -158,18 +153,16 @@ using Y by force show "?G ` \ \ {Pi\<^sub>E I Y |Y. (\i. openin (X i) (Y i)) \ finite {i. Y i \ topspace (X i)}}" apply clarsimp - apply (rule_tac x=" (\i. if i = J U then Y U else topspace (X i))" in exI) + apply (rule_tac x= "(\i. if i = J U then Y U else topspace (X i))" in exI) apply (auto simp: *) done next show "(\U\\. ?G U) = ?TOP \ \\" proof have "(\\<^sub>E i\I. if i = J U then Y U else topspace (X i)) \ (\\<^sub>E i\I. topspace (X i))" - apply (clarsimp simp: PiE_iff Ball_def all_conj_distrib split: if_split_asm) - using Y \U \ \\ openin_subset by blast+ + by (simp add: PiE_mono Y \U \ \\ openin_subset) then have "(\U\\. ?G U) \ ?TOP" - using \U \ \\ - by fastforce + using \U \ \\ by fastforce moreover have "(\U\\. ?G U) \ \\" using PiE_mem Y by fastforce ultimately show "(\U\\. ?G U) \ ?TOP \ \\" @@ -211,24 +204,25 @@ assumes "openin (product_topology T I) U" "x \ U" shows "\X. x \ (\\<^sub>E i\I. X i) \ (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)} \ (\\<^sub>E i\I. X i) \ U" proof - - have "generate_topology_on {(\\<^sub>E i\I. X i) |X. (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)}} U" - using assms unfolding product_topology_def by (intro openin_topology_generated_by) auto - then have "\x. x\U \ \X. x \ (\\<^sub>E i\I. X i) \ (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)} \ (\\<^sub>E i\I. X i) \ U" + define IT where "IT \ \X. {i. X i \ topspace (T i)}" + have "generate_topology_on {(\\<^sub>E i\I. X i) |X. (\i. openin (T i) (X i)) \ finite (IT X)} U" + using assms unfolding product_topology_def IT_def by (intro openin_topology_generated_by) auto + then have "\x. x\U \ \X. x \ (\\<^sub>E i\I. X i) \ (\i. openin (T i) (X i)) \ finite (IT X) \ (\\<^sub>E i\I. X i) \ U" proof induction case (Int U V x) then obtain XU XV where H: - "x \ Pi\<^sub>E I XU" "(\i. openin (T i) (XU i))" "finite {i. XU i \ topspace (T i)}" "Pi\<^sub>E I XU \ U" - "x \ Pi\<^sub>E I XV" "(\i. openin (T i) (XV i))" "finite {i. XV i \ topspace (T i)}" "Pi\<^sub>E I XV \ V" - by auto meson + "x \ Pi\<^sub>E I XU" "\i. openin (T i) (XU i)" "finite (IT XU)" "Pi\<^sub>E I XU \ U" + "x \ Pi\<^sub>E I XV" "\i. openin (T i) (XV i)" "finite (IT XV)" "Pi\<^sub>E I XV \ V" + by (meson Int_iff) define X where "X = (\i. XU i \ XV i)" have "Pi\<^sub>E I X \ Pi\<^sub>E I XU \ Pi\<^sub>E I XV" - unfolding X_def by (auto simp add: PiE_iff) + by (auto simp add: PiE_iff X_def) then have "Pi\<^sub>E I X \ U \ V" using H by auto moreover have "\i. openin (T i) (X i)" unfolding X_def using H by auto - moreover have "finite {i. X i \ topspace (T i)}" - apply (rule rev_finite_subset[of "{i. XU i \ topspace (T i)} \ {i. XV i \ topspace (T i)}"]) - unfolding X_def using H by auto + moreover have "finite (IT X)" + apply (rule rev_finite_subset[of "IT XU \ IT XV"]) + using H by (auto simp: X_def IT_def) moreover have "x \ Pi\<^sub>E I X" unfolding X_def using H by auto ultimately show ?case @@ -236,16 +230,10 @@ next case (UN K x) then obtain k where "k \ K" "x \ k" by auto - with UN have "\X. x \ Pi\<^sub>E I X \ (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)} \ Pi\<^sub>E I X \ k" - by simp - then obtain X where "x \ Pi\<^sub>E I X \ (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)} \ Pi\<^sub>E I X \ k" - by blast - then have "x \ Pi\<^sub>E I X \ (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)} \ Pi\<^sub>E I X \ (\K)" - using \k \ K\ by auto - then show ?case - by auto + with \k \ K\ UN show ?case + by (meson Sup_upper2) qed auto - then show ?thesis using \x \ U\ by auto + then show ?thesis using \x \ U\ IT_def by blast qed lemma product_topology_empty_discrete: @@ -257,9 +245,7 @@ arbitrary union_of ((finite intersection_of (\F. (\i U. F = {f. f i \ U} \ i \ I \ openin (X i) U))) relative_to topspace (product_topology X I))" - apply (subst product_topology) - apply (simp add: topology_inverse' [OF istopology_subbase]) - done + by (simp add: istopology_subbase product_topology) lemma subtopology_PiE: "subtopology (product_topology X I) (\\<^sub>E i\I. (S i)) = product_topology (\i. subtopology (X i) (S i)) I" @@ -349,6 +335,7 @@ "openin (product_topology X I) S \ (\x \ S. \U. finite {i \ I. U i \ topspace(X i)} \ (\i \ I. openin (X i) (U i)) \ x \ Pi\<^sub>E I U \ Pi\<^sub>E I U \ S)" +sledgehammer [isar_proofs, provers = "cvc4 z3 spass e vampire verit", timeout = 77] unfolding openin_product_topology arbitrary_union_of_alt product_topology_base_alt topspace_product_topology apply safe apply (drule bspec; blast)+ @@ -438,9 +425,7 @@ corollary closedin_product_topology: "closedin (product_topology X I) (PiE I S) \ PiE I S = {} \ (\i \ I. closedin (X i) (S i))" - apply (simp add: PiE_eq PiE_eq_empty_iff closure_of_product_topology flip: closure_of_eq) - apply (metis closure_of_empty) - done + by (smt (verit, best) PiE_eq closedin_empty closure_of_eq closure_of_product_topology) corollary closedin_product_topology_singleton: "f \ extensional I \ closedin (product_topology X I) {f} \ (\i \ I. closedin (X i) {f i})" @@ -501,17 +486,13 @@ also have "... = (\i\J. (\x. f x i)-`(X i) \ topspace T1) \ (topspace T1)" using * \J \ I\ by auto also have "openin T1 (...)" - apply (rule openin_INT) - apply (simp add: \finite J\) - using H(2) assms(1) \J \ I\ by auto + using H(2) \J \ I\ \finite J\ assms(1) by blast ultimately show "openin T1 (f-`U \ topspace T1)" by simp next - show "f `topspace T1 \ \{Pi\<^sub>E I X |X. (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)}}" - apply (subst topology_generated_by_topspace[symmetric]) - apply (subst product_topology_def[symmetric]) - apply (simp only: topspace_product_topology) - apply (auto simp add: PiE_iff) - using assms unfolding continuous_map_def by auto + have "f ` topspace T1 \ topspace (product_topology T I)" + using assms continuous_map_def by fastforce + then show "f `topspace T1 \ \{Pi\<^sub>E I X |X. (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)}}" + by (simp add: product_topology_def) qed lemma continuous_map_product_then_coordinatewise [intro]: @@ -522,8 +503,7 @@ fix i assume "i \ I" have "(\x. f x i) = (\y. y i) o f" by auto also have "continuous_map T1 (T i) (...)" - apply (rule continuous_map_compose[of _ "product_topology T I"]) - using assms \i \ I\ by auto + by (metis \i \ I\ assms continuous_map_compose continuous_map_product_coordinates) ultimately show "continuous_map T1 (T i) (\x. f x i)" by simp next @@ -583,28 +563,14 @@ assumes "finite I" "\i. i \ I \ open (U i)" shows "open {f. \i\I. f (x i) \ U i}" proof - - define J where "J = x`I" - define V where "V = (\y. if y \ J then \{U i|i. i\I \ x i = y} else UNIV)" - define X where "X = (\y. if y \ J then V y else UNIV)" + define V where "V \ (\y. if y \ x`I then \{U i|i. i\I \ x i = y} else UNIV)" + define X where "X \ (\y. if y \ x`I then V y else UNIV)" have *: "open (X i)" for i unfolding X_def V_def using assms by auto - have **: "finite {i. X i \ UNIV}" - unfolding X_def V_def J_def using assms(1) by auto - have "open (Pi\<^sub>E UNIV X)" - by (simp add: "*" "**" open_PiE) + then have "open (Pi\<^sub>E UNIV X)" + by (simp add: X_def assms(1) open_PiE) moreover have "Pi\<^sub>E UNIV X = {f. \i\I. f (x i) \ U i}" - apply (auto simp add: PiE_iff) unfolding X_def V_def J_def - proof (auto) - fix f :: "'a \ 'b" and i :: 'i - assume a1: "i \ I" - assume a2: "\i. f i \ (if i \ x`I then if i \ x`I then \{U ia |ia. ia \ I \ x ia = i} else UNIV else UNIV)" - have f3: "x i \ x`I" - using a1 by blast - have "U i \ {U ia |ia. ia \ I \ x ia = x i}" - using a1 by blast - then show "f (x i) \ U i" - using f3 a2 by (meson Inter_iff) - qed + by (fastforce simp add: PiE_iff X_def V_def split: if_split_asm) ultimately show ?thesis by simp qed @@ -620,25 +586,13 @@ fixes f :: "'a::topological_space \ 'b \ 'c::topological_space" assumes "\i. continuous_on S (\x. f x i)" shows "continuous_on S f" - using continuous_map_coordinatewise_then_product [of UNIV, where T = "\i. euclidean"] - by (metis UNIV_I assms continuous_map_iff_continuous euclidean_product_topology) - -lemma continuous_on_product_then_coordinatewise_UNIV: - assumes "continuous_on UNIV f" - shows "continuous_on UNIV (\x. f x i)" - unfolding continuous_map_iff_continuous2 [symmetric] - by (rule continuous_map_product_then_coordinatewise [where I=UNIV]) (use assms in \auto simp: euclidean_product_topology\) + by (metis UNIV_I assms continuous_map_iff_continuous euclidean_product_topology + continuous_map_coordinatewise_then_product) lemma continuous_on_product_then_coordinatewise: assumes "continuous_on S f" shows "continuous_on S (\x. f x i)" -proof - - have "continuous_on S ((\q. q i) \ f)" - by (metis assms continuous_on_compose continuous_on_id - continuous_on_product_then_coordinatewise_UNIV continuous_on_subset subset_UNIV) - then show ?thesis - by auto -qed + by (metis UNIV_I assms continuous_map_iff_continuous continuous_map_product_then_coordinatewise(1) euclidean_product_topology) lemma continuous_on_coordinatewise_iff: fixes f :: "('a \ real) \ 'b \ real" @@ -679,16 +633,15 @@ next case (Suc N) define f::"((nat \ 'a) \ 'a) \ (nat \ 'a)" - where "f = (\(x, b). (\i. if i = N then b else x i))" + where "f = (\(x, b). x(N:=b))" have "{x. (\i. x i \ F) \ (\i\Suc N. x i = a)} \ f`({x. (\i. x i \ F) \ (\i\N. x i = a)} \ F)" proof (auto) fix x assume H: "\i::nat. x i \ F" "\i\Suc N. x i = a" - define y where "y = (\i. if i = N then a else x i)" - have "f (y, x N) = x" - unfolding f_def y_def by auto - moreover have "(y, x N) \ {x. (\i. x i \ F) \ (\i\N. x i = a)} \ F" - unfolding y_def using H \a \ F\ by auto - ultimately show "x \ f`({x. (\i. x i \ F) \ (\i\N. x i = a)} \ F)" + have "f (x(N:=a), x N) = x" + unfolding f_def by auto + moreover have "(x(N:=a), x N) \ {x. (\i. x i \ F) \ (\i\N. x i = a)} \ F" + using H \a \ F\ by auto + ultimately show "x \ f ` ({x. (\i. x i \ F) \ (\i\N. x i = a)} \ F)" by (metis (no_types, lifting) image_eqI) qed moreover have "countable ({x. (\i. x i \ F) \ (\i\N. x i = a)} \ F)" @@ -742,7 +695,7 @@ by metis text \\B i\ is a countable basis of neighborhoods of \x\<^sub>i\.\ define B where "B = (\i. (A (x i))`UNIV \ {UNIV})" - have "countable (B i)" for i unfolding B_def by auto + have countB: "countable (B i)" for i unfolding B_def by auto have open_B: "\X i. X \ B i \ open X" by (auto simp: B_def A) define K where "K = {Pi\<^sub>E UNIV X | X. (\i. X i \ B i) \ finite {i. X i \ UNIV}}" @@ -750,14 +703,14 @@ unfolding K_def B_def by auto then have "K \ {}" by auto have "countable {X. (\i. X i \ B i) \ finite {i. X i \ UNIV}}" - apply (rule countable_product_event_const) using \\i. countable (B i)\ by auto + by (simp add: countB countable_product_event_const) moreover have "K = (\X. Pi\<^sub>E UNIV X)`{X. (\i. X i \ B i) \ finite {i. X i \ UNIV}}" unfolding K_def by auto ultimately have "countable K" by auto - have "x \ k" if "k \ K" for k + have I: "x \ k" if "k \ K" for k using that unfolding K_def B_def apply auto using A(1) by auto - have "open k" if "k \ K" for k - using that unfolding K_def by (blast intro: open_B open_PiE elim: ) + have II: "open k" if "k \ K" for k + using that unfolding K_def by (blast intro: open_B open_PiE) have Inc: "\k\K. k \ U" if "open U \ x \ U" for U proof - have "openin (product_topology (\i. euclidean) UNIV) U" "x \ U" @@ -775,31 +728,28 @@ have *: "\y. y \ B i \ y \ X i" for i unfolding B_def using A(3)[OF H(2)] H(1) by (metis PiE_E UNIV_I UnCI image_iff) have **: "Y i \ B i \ Y i \ X i" for i - apply (cases "i \ I") - unfolding Y_def using * that apply (auto) - apply (metis (no_types, lifting) someI, metis (no_types, lifting) someI_ex subset_iff) - unfolding B_def apply simp - unfolding I_def apply auto - done + proof (cases "i \ I") + case True + then show ?thesis + by (metis (mono_tags, lifting) "*" Nitpick.Eps_psimp Y_def) + next + case False + then show ?thesis by (simp add: B_def I_def Y_def) + qed have "{i. Y i \ UNIV} \ I" unfolding Y_def by auto - then have ***: "finite {i. Y i \ UNIV}" - unfolding I_def using H(3) rev_finite_subset by blast - have "(\i. Y i \ B i) \ finite {i. Y i \ UNIV}" - using ** *** by auto + with ** have "(\i. Y i \ B i) \ finite {i. Y i \ UNIV}" + using H(3) I_def finite_subset by blast then have "Pi\<^sub>E UNIV Y \ K" unfolding K_def by auto - have "Y i \ X i" for i - apply (cases "i \ I") using ** apply simp unfolding Y_def I_def by auto - then have "Pi\<^sub>E UNIV Y \ Pi\<^sub>E UNIV X" by auto - then have "Pi\<^sub>E UNIV Y \ U" using H(4) by auto + using "**" by auto + then have "Pi\<^sub>E UNIV Y \ U" + by (metis H(4) PiE_mono subset_trans) then show ?thesis using \Pi\<^sub>E UNIV Y \ K\ by auto qed - show "\L. (\(i::nat). x \ L i \ open (L i)) \ (\U. open U \ x \ U \ (\i. L i \ U))" - apply (rule first_countableI[of K]) - using \countable K\ \\k. k \ K \ x \ k\ \\k. k \ K \ open k\ Inc by auto + using \countable K\ I II Inc by (simp add: first_countableI) qed proposition product_topology_countable_basis: @@ -821,7 +771,7 @@ unfolding K_def using \\U. U \ B2 \ open U\ by auto have "countable {X. (\(i::'a). X i \ B2) \ finite {i. X i \ UNIV}}" - apply (rule countable_product_event_const) using \countable B2\ by auto + using \countable B2\ by (intro countable_product_event_const) auto moreover have "K = (\X. Pi\<^sub>E UNIV X)`{X. (\i. X i \ B2) \ finite {i. X i \ UNIV}}" unfolding K_def by auto ultimately have ii: "countable K" by auto @@ -832,9 +782,7 @@ then have "openin (product_topology (\i. euclidean) UNIV) U" unfolding open_fun_def by auto with product_topology_open_contains_basis[OF this \x \ U\] - have "\X. x \ (\\<^sub>E i\UNIV. X i) \ (\i. open (X i)) \ finite {i. X i \ UNIV} \ (\\<^sub>E i\UNIV. X i) \ U" - by simp - then obtain X where H: "x \ (\\<^sub>E i\UNIV. X i)" + obtain X where H: "x \ (\\<^sub>E i\UNIV. X i)" "\i. open (X i)" "finite {i. X i \ UNIV}" "(\\<^sub>E i\UNIV. X i) \ U" @@ -845,29 +793,15 @@ have *: "\y. y \ B2 \ y \ X i \ x i \ y" for i unfolding B2_def using B \open (X i)\ \x i \ X i\ by (meson UnCI topological_basisE) have **: "Y i \ B2 \ Y i \ X i \ x i \ Y i" for i - using someI_ex[OF *] - apply (cases "i \ I") - unfolding Y_def using * apply (auto) - unfolding B2_def I_def by auto + using someI_ex[OF *] by (simp add: B2_def I_def Y_def) have "{i. Y i \ UNIV} \ I" unfolding Y_def by auto - then have ***: "finite {i. Y i \ UNIV}" - unfolding I_def using H(3) rev_finite_subset by blast - have "(\i. Y i \ B2) \ finite {i. Y i \ UNIV}" - using ** *** by auto + then have "(\i. Y i \ B2) \ finite {i. Y i \ UNIV}" + using "**" H(3) I_def finite_subset by blast then have "Pi\<^sub>E UNIV Y \ K" unfolding K_def by auto - - have "Y i \ X i" for i - apply (cases "i \ I") using ** apply simp unfolding Y_def I_def by auto - then have "Pi\<^sub>E UNIV Y \ Pi\<^sub>E UNIV X" by auto - then have "Pi\<^sub>E UNIV Y \ U" using H(4) by auto - - have "x \ Pi\<^sub>E UNIV Y" - using ** by auto - - show "\V\K. x \ V \ V \ U" - using \Pi\<^sub>E UNIV Y \ K\ \Pi\<^sub>E UNIV Y \ U\ \x \ Pi\<^sub>E UNIV Y\ by auto + then show "\V\K. x \ V \ V \ U" + by (meson "**" H(4) PiE_I PiE_mono UNIV_I order.trans) next fix U assume "U \ K" show "open U" @@ -878,9 +812,11 @@ qed instance "fun" :: (countable, second_countable_topology) second_countable_topology - apply standard - using product_topology_countable_basis topological_basis_imp_subbasis by auto - +proof + show "\B::('a \ 'b) set set. countable B \ open = generate_topology B" + using product_topology_countable_basis topological_basis_imp_subbasis + by auto +qed subsection\The Alexander subbase theorem\ @@ -1106,11 +1042,7 @@ qed ultimately show ?thesis by metis -next - case False - then show ?thesis - by (auto simp: continuous_map_def PiE_def) -qed +qed (auto simp: continuous_map_def PiE_def) lemma continuous_map_componentwise_UNIV: @@ -1147,8 +1079,7 @@ fix x f assume "f \ V" let ?T = "{a \ topspace(Y i). - (\j. if j = i then a - else if j \ I then f j else undefined) \ (\\<^sub>E i\I. topspace (Y i)) \ \\}" + (\j\I. f j)(i:=a) \ (\\<^sub>E i\I. topspace (Y i)) \ \\}" show "\T. openin (Y i) T \ f i \ T \ T \ (\f. f i) ` V" proof (intro exI conjI) show "openin (Y i) ?T" @@ -1164,8 +1095,8 @@ by simp (metis IntD1 PiE_iff V \f \ V\ that) qed then show "continuous_map (Y i) (product_topology Y I) - (\x j. if j = i then x else if j \ I then f j else undefined)" - by (auto simp: continuous_map_componentwise assms extensional_def) + (\x. (\j\I. f j)(i:=x))" + by (auto simp: continuous_map_componentwise assms extensional_def restrict_def) next have "openin (product_topology Y I) (\\<^sub>E i\I. topspace (Y i))" by (metis openin_topspace topspace_product_topology) @@ -1177,18 +1108,15 @@ show "\X. X \ (\) (\\<^sub>E i\I. topspace (Y i)) ` \ \ openin (product_topology Y I) X" unfolding openin_product_topology relative_to_def apply (clarify intro!: arbitrary_union_of_inc) - apply (rename_tac F) - apply (rule_tac x=F in exI) using subsetD [OF \] - apply (force intro: finite_intersection_of_inc) - done + by (metis (mono_tags, lifting) finite_intersection_of_inc mem_Collect_eq topspace_product_topology) qed (use \finite \\ \\ \ {}\ in auto) qed ultimately show "openin (product_topology Y I) ((\\<^sub>E i\I. topspace (Y i)) \ \\)" by (auto simp only: Int_Inter_eq split: if_split) qed next - have eqf: "(\j. if j = i then f i else if j \ I then f j else undefined) = f" + have eqf: "(\j\I. f j)(i:=f i) = f" using PiE_arb V \f \ V\ by force show "f i \ ?T" using V assms \f \ V\ by (auto simp: PiE_iff eqf) @@ -1273,10 +1201,8 @@ next assume ?rhs then show ?lhs - apply (simp only: openin_product_topology) - apply (rule arbitrary_union_of_inc) - apply (auto simp: product_topology_base_alt) - done + unfolding openin_product_topology + by (intro arbitrary_union_of_inc) (auto simp: product_topology_base_alt) qed ultimately show ?thesis by simp @@ -1306,9 +1232,7 @@ by (simp add: continuous_map_product_projection) moreover have "\x. x \ topspace (X i) \ x \ (\f. f i) ` (\\<^sub>E i\I. topspace (X i))" - using \i \ I\ z - apply (rule_tac x="\j. if j = i then x else if j \ I then z j else undefined" in image_eqI, auto) - done + using \i \ I\ z by (rule_tac x="z(i:=x)" in image_eqI) auto then have "(\f. f i) ` (\\<^sub>E i\I. topspace (X i)) = topspace (X i)" using \i \ I\ z by auto ultimately show "compactin (X i) (topspace (X i))" @@ -1461,7 +1385,7 @@ then have "(\x. x k) ` {x. x j \ V} = UNIV" if "k \ j" for k using that apply (clarsimp simp add: set_eq_iff) - apply (rule_tac x="\m. if m = k then x else f m" in image_eqI, auto) + apply (rule_tac x="f(k:=x)" in image_eqI, auto) done then have "{i. (\x. x i) ` C \ topspace (X i)} \ {j}" using Ceq by auto @@ -1493,7 +1417,7 @@ using PiE_ext \g \ U\ gin by force next case (insert i M) - define f where "f \ \j. if j = i then g i else h j" + define f where "f \ h(i:=g i)" have fin: "f \ PiE I (topspace \ X)" unfolding f_def using gin insert.prems(1) by auto have subM: "{j \ I. f j \ g j} \ M" @@ -1506,13 +1430,13 @@ show ?thesis proof (cases "i \ I") case True - let ?U = "{x \ topspace(X i). (\j. if j = i then x else h j) \ U}" - let ?V = "{x \ topspace(X i). (\j. if j = i then x else h j) \ V}" + let ?U = "{x \ topspace(X i). h(i:=x) \ U}" + let ?V = "{x \ topspace(X i). h(i:=x) \ V}" have False proof (rule connected_spaceD [OF cs [OF \i \ I\]]) have "\k. k \ I \ continuous_map (X i) (X k) (\x. if k = i then x else h k)" using continuous_map_eq_topcontinuous_at insert.prems(1) topcontinuous_at_def by fastforce - then have cm: "continuous_map (X i) (product_topology X I) (\x j. if j = i then x else h j)" + then have cm: "continuous_map (X i) (product_topology X I) (\x. h(i:=x))" using \i \ I\ insert.prems(1) by (auto simp: continuous_map_componentwise extensional_def) show "openin (X i) ?U" @@ -1522,45 +1446,23 @@ show "topspace (X i) \ ?U \ ?V" proof clarsimp fix x - assume "x \ topspace (X i)" and "(\j. if j = i then x else h j) \ V" + assume "x \ topspace (X i)" and "h(i:=x) \ V" with True subUV \h \ Pi\<^sub>E I (topspace \ X)\ - show "(\j. if j = i then x else h j) \ U" - by (drule_tac c="(\j. if j = i then x else h j)" in subsetD) auto + show "h(i:=x) \ U" + by (force dest: subsetD [where c="h(i:=x)"]) qed show "?U \ ?V = {}" using disj by blast show "?U \ {}" - using \U \ {}\ f_def - proof - - have "(\j. if j = i then g i else h j) \ U" - using \f \ U\ f_def by blast - moreover have "f i \ topspace (X i)" - by (metis PiE_iff True comp_apply fin) - ultimately have "\b. b \ topspace (X i) \ (\a. if a = i then b else h a) \ U" - using f_def by auto - then show ?thesis - by blast - qed - have "(\j. if j = i then h i else h j) = h" - by force - moreover have "h i \ topspace (X i)" - using True insert.prems(1) by auto - ultimately show "?V \ {}" - using \h \ V\ by force + using True \f \ U\ f_def gin by auto + show "?V \ {}" + using True \h \ V\ V openin_subset by fastforce qed then show ?thesis .. next case False show ?thesis - proof (cases "h = f") - case True - show ?thesis - by (rule insert.IH [OF insert.prems(1)]) (simp add: True subM) - next - case False - then show ?thesis - using gin insert.prems(1) \i \ I\ unfolding f_def by fastforce - qed + using insert.prems(1) by (metis False gin PiE_E \f \ U\ f_def fun_upd_triv) qed next case False @@ -1640,14 +1542,8 @@ assumes "i \ I" shows "quotient_map(product_topology X I) (X i) (\x. x i) \ (topspace(product_topology X I) = {} \ topspace(X i) = {})" - (is "?lhs = ?rhs") -proof - assume ?lhs with assms show ?rhs - by (auto simp: continuous_open_quotient_map open_map_product_projection) -next - assume ?rhs with assms show ?lhs - by (auto simp: Abstract_Topology.retraction_imp_quotient_map retraction_map_product_projection) -qed + by (metis assms image_empty quotient_imp_surjective_map retraction_imp_quotient_map + retraction_map_product_projection) lemma product_topology_homeomorphic_component: assumes "i \ I" "\j. \j \ I; j \ i\ \ \a. topspace(X j) = {a}" @@ -1676,9 +1572,8 @@ from that obtain f where f: "f \ (\\<^sub>E i\I. topspace (X i))" by force have "?SX f i homeomorphic_space X i" - apply (simp add: subtopology_PiE ) - using product_topology_homeomorphic_component [OF \i \ I\, of "\j. subtopology (X j) (if j = i then topspace (X i) else {f j})"] - using f by fastforce + using f product_topology_homeomorphic_component [OF \i \ I\, of "\j. subtopology (X j) (if j = i then topspace (X i) else {f j})"] + by (force simp add: subtopology_PiE) then show ?thesis using minor [OF f major \i \ I\] PQ by auto qed