diff -r 9e0c035d026d -r eb9a9690b8f5 src/HOL/Analysis/Abstract_Topology.thy --- a/src/HOL/Analysis/Abstract_Topology.thy Mon Jul 10 18:48:22 2023 +0100 +++ b/src/HOL/Analysis/Abstract_Topology.thy Tue Jul 11 20:21:58 2023 +0100 @@ -1454,7 +1454,7 @@ definition continuous_map where "continuous_map X Y f \ - (\x \ topspace X. f x \ topspace Y) \ + f \ topspace X \ topspace Y \ (\U. openin Y U \ openin X {x \ topspace X. f x \ U})" lemma continuous_map: @@ -1466,17 +1466,24 @@ "continuous_map X Y f \ f ` (topspace X) \ topspace Y" by (auto simp: continuous_map_def) +lemma continuous_map_funspace: + "continuous_map X Y f \ f \ topspace X \ topspace Y" + by (auto simp: continuous_map_def) + lemma continuous_map_on_empty: "topspace X = {} \ continuous_map X Y f" by (auto simp: continuous_map_def) +lemma continuous_map_on_empty2: "topspace Y = {} \ continuous_map X Y f \ topspace X = {}" + by (auto simp: continuous_map_def) + lemma continuous_map_closedin: "continuous_map X Y f \ - (\x \ topspace X. f x \ topspace Y) \ + f \ topspace X \ topspace Y \ (\C. closedin Y C \ closedin X {x \ topspace X. f x \ C})" proof - have "(\U. openin Y U \ openin X {x \ topspace X. f x \ U}) = (\C. closedin Y C \ closedin X {x \ topspace X. f x \ C})" - if "\x. x \ topspace X \ f x \ topspace Y" + if "f \ topspace X \ topspace Y" proof - have eq: "{x \ topspace X. f x \ topspace Y \ f x \ C} = (topspace X - {x \ topspace X. f x \ C})" for C using that by blast @@ -1555,9 +1562,7 @@ shows "continuous_map X Y f" unfolding continuous_map_closedin proof (intro conjI ballI allI impI) - fix x - assume "x \ topspace X" - then show "f x \ topspace Y" + show "f \ topspace X \ topspace Y" using assms closure_of_subset_topspace by fastforce next fix C @@ -1588,9 +1593,9 @@ lemma continuous_map_eq_image_closure_subset_gen: "continuous_map X Y f \ - f ` (topspace X) \ topspace Y \ + f \ topspace X \ topspace Y \ (\S. f ` (X closure_of S) \ Y closure_of f ` S)" - using continuous_map_subset_aux1 continuous_map_subset_aux2 continuous_map_image_subset_topspace by metis + by (meson Pi_iff continuous_map continuous_map_eq_image_closure_subset image_subset_iff) lemma continuous_map_closure_preimage_subset: "continuous_map X Y f @@ -1650,15 +1655,13 @@ shows "continuous_map X X'' (g \ f)" unfolding continuous_map_def proof (intro conjI ballI allI impI) - fix x - assume "x \ topspace X" - then show "(g \ f) x \ topspace X''" + show "g \ f \ topspace X \ topspace X''" using assms unfolding continuous_map_def by force next fix U assume "openin X'' U" have eq: "{x \ topspace X. (g \ f) x \ U} = {x \ topspace X. f x \ {y. y \ topspace X' \ g y \ U}}" - by auto (meson f continuous_map_def) + using continuous_map_image_subset_topspace f by force show "openin X {x \ topspace X. (g \ f) x \ U}" unfolding eq using assms unfolding continuous_map_def @@ -1672,7 +1675,7 @@ have eq: "{x \ topspace X. f x \ U} = {x \ topspace X. g x \ U}" for U using assms by auto show ?thesis - using assms by (simp add: continuous_map_def eq) + using assms by (force simp add: continuous_map_def eq) qed lemma restrict_continuous_map [simp]: @@ -2327,8 +2330,8 @@ shows "continuous_map X' X'' g" unfolding quotient_map_def continuous_map_def proof (intro conjI ballI allI impI) - show "\x'. x' \ topspace X' \ g x' \ topspace X''" - using assms unfolding quotient_map_def + show "g \ topspace X' \ topspace X''" + using assms unfolding quotient_map_def Pi_iff by (metis (no_types, opaque_lifting) continuous_map_image_subset_topspace image_comp image_subset_iff) next fix U'' :: "'c set" @@ -2657,7 +2660,7 @@ \x. x \ topspace X \ f x = f' x; \y. y \ topspace Y \ g y = g' y\ \ homeomorphic_maps X Y f' g'" unfolding homeomorphic_maps_def - by (metis continuous_map_eq continuous_map_eq_image_closure_subset_gen image_subset_iff) + by (metis continuous_map_eq continuous_map_image_subset_topspace image_subset_iff) lemma homeomorphic_maps_sym: "homeomorphic_maps X Y f g \ homeomorphic_maps Y X g f" @@ -2711,7 +2714,7 @@ homeomorphic_maps Y X'' g k \ homeomorphic_maps X X'' (g \ f) (h \ k)" unfolding homeomorphic_maps_def - by (auto simp: continuous_map_compose; simp add: continuous_map_def) + by (auto simp: continuous_map_compose; simp add: continuous_map_def Pi_iff) lemma homeomorphic_eq_everything_map: "homeomorphic_map X Y f \ @@ -2784,11 +2787,13 @@ show ?rhs proof (intro conjI bijective_open_imp_homeomorphic_map L) show "open_map X Y f" - using L using open_eq_continuous_inverse_map [of concl: X Y f g] by (simp add: continuous_map_def) + using L using open_eq_continuous_inverse_map [of concl: X Y f g] + by (simp add: continuous_map_def Pi_iff) show "open_map Y X g" - using L using open_eq_continuous_inverse_map [of concl: Y X g f] by (simp add: continuous_map_def) + using L using open_eq_continuous_inverse_map [of concl: Y X g f] + by (simp add: continuous_map_def Pi_iff) show "f ` topspace X = topspace Y" "g ` topspace Y = topspace X" - using L by (force simp: continuous_map_closedin)+ + using L by (force simp: continuous_map_closedin Pi_iff)+ show "inj_on f (topspace X)" "inj_on g (topspace Y)" using L unfolding inj_on_def by metis+ qed @@ -3020,7 +3025,7 @@ have "f ` (topspace X \ S) \ topspace Y \ T" using S hom homeomorphic_imp_surjective_map by fastforce then show "f ` (topspace X \ S) = topspace Y \ T" - using that unfolding homeomorphic_maps_def continuous_map_def + using that unfolding homeomorphic_maps_def continuous_map_def Pi_iff by (smt (verit, del_insts) Int_iff S image_iff subsetI subset_antisym) qed then show ?thesis @@ -3064,8 +3069,8 @@ lemma homeomorphic_empty_space_eq: assumes "topspace X = {}" shows "X homeomorphic_space Y \ topspace Y = {}" - unfolding homeomorphic_maps_def homeomorphic_space_def - by (metis assms continuous_map_on_empty continuous_map_closedin ex_in_conv) + using assms + by (auto simp: homeomorphic_maps_def homeomorphic_space_def continuous_map_def) lemma homeomorphic_space_unfold: assumes "X homeomorphic_space Y" @@ -3993,7 +3998,8 @@ lemma retraction_maps_eq: "\retraction_maps X Y f g; \x. x \ topspace X \ f x = f' x; \x. x \ topspace Y \ g x = g' x\ \ retraction_maps X Y f' g'" - unfolding retraction_maps_def by (metis (no_types, lifting) continuous_map_def continuous_map_eq) + unfolding retraction_maps_def + by (metis continuous_map_eq continuous_map_image_subset_topspace image_subset_iff) lemma section_map_eq: "\section_map X Y f; \x. x \ topspace X \ f x = g x\ \ section_map X Y g" @@ -4012,8 +4018,8 @@ proof assume ?lhs then obtain g where "homeomorphic_maps X Y f g" - unfolding homeomorphic_maps_def retraction_map_def section_map_def - by (smt (verit, best) continuous_map_def retraction_maps_def) + unfolding homeomorphic_maps_def retraction_map_def section_map_def + by (smt (verit) Pi_iff continuous_map_def retraction_maps_def) then show ?rhs using homeomorphic_map_maps by blast next @@ -4034,7 +4040,7 @@ unfolding quotient_map_def proof (intro conjI subsetI allI impI) show "f ` topspace X = topspace Y" - using assms by (force simp: retraction_map_def retraction_maps_def continuous_map_def) + using assms by (force simp: retraction_map_def retraction_maps_def continuous_map_def Pi_iff) next fix U assume U: "U \ topspace Y" @@ -4043,12 +4049,13 @@ "openin Y {x \ topspace Y. g x \ {x \ topspace X. f x \ U}}" for g using openin_subopen U that by fastforce then show "openin X {x \ topspace X. f x \ U} = openin Y U" - using assms by (auto simp: retraction_map_def retraction_maps_def continuous_map_def) + using assms by (auto simp: retraction_map_def retraction_maps_def continuous_map_def Pi_iff) qed lemma retraction_maps_compose: "\retraction_maps X Y f f'; retraction_maps Y Z g g'\ \ retraction_maps X Z (g \ f) (f' \ g')" - by (clarsimp simp: retraction_maps_def continuous_map_compose) (simp add: continuous_map_def) + unfolding retraction_maps_def + by (smt (verit, ccfv_threshold) comp_apply continuous_map_compose continuous_map_image_subset_topspace image_subset_iff) lemma retraction_map_compose: "\retraction_map X Y f; retraction_map Y Z g\ \ retraction_map X Z (g \ f)" @@ -4567,16 +4574,16 @@ assumes P: "openin Y = arbitrary union_of P" shows "continuous_map X Y f \ - (\x \ topspace X. f x \ topspace Y) \ (\U. P U \ openin X {x \ topspace X. f x \ U})" + f \ topspace X \ topspace Y \ (\U. P U \ openin X {x \ topspace X. f x \ U})" (is "?lhs=?rhs") proof assume L: ?lhs - then have "\x. x \ topspace X \ f x \ topspace Y" - by (meson continuous_map_def) + then have "f \ topspace X \ topspace Y" + by (simp add: continuous_map_funspace) moreover have "\U. P U \ openin X {x \ topspace X. f x \ U}" using L assms continuous_map openin_topology_base_unique by fastforce ultimately show ?rhs by auto -qed (simp add: assms continuous_map_into_topology_base) +qed (simp add: assms Pi_iff continuous_map_into_topology_base) lemma continuous_map_into_topology_subbase: fixes U P @@ -4613,13 +4620,13 @@ assumes "Y = topology(arbitrary union_of (finite intersection_of P relative_to U))" shows "continuous_map X Y f \ - (\x \ topspace X. f x \ topspace Y) \ (\U. P U \ openin X {x \ topspace X. f x \ U})" + f \ topspace X \ topspace Y \ (\U. P U \ openin X {x \ topspace X. f x \ U})" (is "?lhs=?rhs") proof assume L: ?lhs show ?rhs proof (intro conjI strip) - show "\x. x \ topspace X \ f x \ topspace Y" + show "f \ topspace X \ topspace Y" using L continuous_map_def by fastforce fix V assume "P V" @@ -5048,8 +5055,9 @@ with fim inj have eq: "{x \ topspace X. f x = y} = {x \ topspace X. (g \ f) x = g y}" by (auto simp: Pi_iff inj_onD) show "compactin X {x \ topspace X. f x = y}" - unfolding eq - by (smt (verit) Collect_cong \y \ topspace Y\ contf continuous_map_closedin gf proper_map_def) + using contf gf \y \ topspace Y\ + unfolding eq continuous_map_def proper_map_def + by blast qed