# HG changeset patch # User paulson # Date 1553177902 0 # Node ID 812ce526da3396f9a6eff341bf2bf6a7780deccd # Parent c15ee153dec18ee14693e60d971276d57386fc93 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/Abstract_Topology.thy --- a/src/HOL/Analysis/Abstract_Topology.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/Abstract_Topology.thy Thu Mar 21 14:18:22 2019 +0000 @@ -1410,7 +1410,10 @@ by (simp add: Sup_le_iff closure_of_minimal) -subsection\Continuous maps\ +subsection%important \Continuous maps\ + +text \We will need to deal with continuous maps in terms of topologies and not in terms +of type classes, as defined below.\ definition continuous_map where "continuous_map X Y f \ @@ -1717,6 +1720,22 @@ declare continuous_map_id_subt [unfolded id_def, simp] +lemma%important continuous_map_alt: + "continuous_map T1 T2 f + = ((\U. openin T2 U \ openin T1 (f -` U \ topspace T1)) \ f ` topspace T1 \ topspace T2)" + by (auto simp: continuous_map_def vimage_def image_def Collect_conj_eq inf_commute) + +lemma continuous_map_open [intro]: + "continuous_map T1 T2 f \ openin T2 U \ openin T1 (f-`U \ topspace(T1))" + unfolding continuous_map_alt by auto + +lemma continuous_map_preimage_topspace [intro]: + assumes "continuous_map T1 T2 f" + shows "f-`(topspace T2) \ topspace T1 = topspace T1" +using assms unfolding continuous_map_def by auto + + + subsection\Open and closed maps (not a priori assumed continuous)\ definition open_map :: "'a topology \ 'b topology \ ('a \ 'b) \ bool" @@ -1852,7 +1871,7 @@ apply clarify apply (rename_tac T) apply (rule_tac x="f ` T" in image_eqI) - using openin_closedin_eq by force+ + using openin_closedin_eq by fastforce+ lemma closed_map_restriction: "\closed_map X X' f; {x. x \ topspace X \ f x \ V} = U\ @@ -1861,7 +1880,7 @@ apply clarify apply (rename_tac T) apply (rule_tac x="f ` T" in image_eqI) - using closedin_def by force+ + using closedin_def by fastforce+ subsection\Quotient maps\ @@ -4177,35 +4196,10 @@ qed qed -subsubsection%important \Continuity\ - -text \We will need to deal with continuous maps in terms of topologies and not in terms -of type classes, as defined below.\ - -definition%important continuous_on_topo::"'a topology \ 'b topology \ ('a \ 'b) \ bool" - where "continuous_on_topo T1 T2 f = ((\ U. openin T2 U \ openin T1 (f-`U \ topspace(T1))) - \ (f`(topspace T1) \ (topspace T2)))" - -lemma continuous_on_continuous_on_topo: - "continuous_on s f \ continuous_on_topo (top_of_set s) euclidean f" - by (auto simp: continuous_on_topo_def Int_commute continuous_openin_preimage_eq) - -lemma continuous_on_topo_UNIV: - "continuous_on UNIV f \ continuous_on_topo euclidean euclidean f" -using continuous_on_continuous_on_topo[of UNIV f] subtopology_UNIV[of euclidean] by auto - -lemma continuous_on_topo_open [intro]: - "continuous_on_topo T1 T2 f \ openin T2 U \ openin T1 (f-`U \ topspace(T1))" - unfolding continuous_on_topo_def by auto - -lemma continuous_on_topo_topspace [intro]: - "continuous_on_topo T1 T2 f \ f`(topspace T1) \ (topspace T2)" -unfolding continuous_on_topo_def by auto - lemma continuous_on_generated_topo_iff: - "continuous_on_topo T1 (topology_generated_by S) f \ + "continuous_map T1 (topology_generated_by S) f \ ((\U. U \ S \ openin T1 (f-`U \ topspace(T1))) \ (f`(topspace T1) \ (\ S)))" -unfolding continuous_on_topo_def topology_generated_by_topspace +unfolding continuous_map_alt topology_generated_by_topspace proof (auto simp add: topology_generated_by_Basis) assume H: "\U. U \ S \ openin T1 (f -` U \ topspace T1)" fix U assume "openin (topology_generated_by S) U" @@ -4231,31 +4225,11 @@ lemma continuous_on_generated_topo: assumes "\U. U \S \ openin T1 (f-`U \ topspace(T1))" "f`(topspace T1) \ (\ S)" - shows "continuous_on_topo T1 (topology_generated_by S) f" + shows "continuous_map T1 (topology_generated_by S) f" using assms continuous_on_generated_topo_iff by blast -proposition continuous_on_topo_compose: - assumes "continuous_on_topo T1 T2 f" "continuous_on_topo T2 T3 g" - shows "continuous_on_topo T1 T3 (g o f)" - using assms unfolding continuous_on_topo_def -proof (auto) - fix U :: "'c set" - assume H: "openin T3 U" - have "openin T1 (f -` (g -` U \ topspace T2) \ topspace T1)" - using H assms by blast - moreover have "f -` (g -` U \ topspace T2) \ topspace T1 = (g \ f) -` U \ topspace T1" - using H assms continuous_on_topo_topspace by fastforce - ultimately show "openin T1 ((g \ f) -` U \ topspace T1)" - by simp -qed (blast) - -lemma continuous_on_topo_preimage_topspace [intro]: - assumes "continuous_on_topo T1 T2 f" - shows "f-`(topspace T2) \ topspace T1 = topspace T1" -using assms unfolding continuous_on_topo_def by auto - - -subsubsection%important \Pullback topology\ + +subsection%important \Pullback topology\ text \Pulling back a topology by map gives again a topology. \subtopology\ is a special case of this notion, pulling back by the identity. We introduce the general notion as @@ -4289,14 +4263,14 @@ "topspace (pullback_topology A f T) = f-`(topspace T) \ A" by (auto simp add: topspace_def openin_pullback_topology) -proposition continuous_on_topo_pullback [intro]: - assumes "continuous_on_topo T1 T2 g" - shows "continuous_on_topo (pullback_topology A f T1) T2 (g o f)" -unfolding continuous_on_topo_def +proposition continuous_map_pullback [intro]: + assumes "continuous_map T1 T2 g" + shows "continuous_map (pullback_topology A f T1) T2 (g o f)" +unfolding continuous_map_alt proof (auto) fix U::"'b set" assume "openin T2 U" then have "openin T1 (g-`U \ topspace T1)" - using assms unfolding continuous_on_topo_def by auto + using assms unfolding continuous_map_alt by auto have "(g o f)-`U \ topspace (pullback_topology A f T1) = (g o f)-`U \ A \ f-`(topspace T1)" unfolding topspace_pullback_topology by auto also have "... = f-`(g-`U \ topspace T1) \ A " @@ -4310,13 +4284,13 @@ then have "f x \ topspace T1" unfolding topspace_pullback_topology by auto then show "g (f x) \ topspace T2" - using assms unfolding continuous_on_topo_def by auto + using assms unfolding continuous_map_def by auto qed -proposition continuous_on_topo_pullback' [intro]: - assumes "continuous_on_topo T1 T2 (f o g)" "topspace T1 \ g-`A" - shows "continuous_on_topo T1 (pullback_topology A f T2) g" -unfolding continuous_on_topo_def +proposition continuous_map_pullback' [intro]: + assumes "continuous_map T1 T2 (f o g)" "topspace T1 \ g-`A" + shows "continuous_map T1 (pullback_topology A f T2) g" +unfolding continuous_map_alt proof (auto) fix U assume "openin (pullback_topology A f T2) U" then have "\V. openin T2 V \ U = f-`V \ A" @@ -4335,7 +4309,7 @@ next fix x assume "x \ topspace T1" have "(f o g) x \ topspace T2" - using assms(1) \x \ topspace T1\ unfolding continuous_on_topo_def by auto + using assms(1) \x \ topspace T1\ unfolding continuous_map_def by auto then have "g x \ f-`(topspace T2)" unfolding comp_def by blast moreover have "g x \ A" using assms(2) \x \ topspace T1\ by blast diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/Abstract_Topology_2.thy --- a/src/HOL/Analysis/Abstract_Topology_2.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/Abstract_Topology_2.thy Thu Mar 21 14:18:22 2019 +0000 @@ -1231,6 +1231,15 @@ lemma pathin_const: "pathin X (\x. a) \ a \ topspace X" by (simp add: pathin_def) + +lemma path_start_in_topspace: "pathin X g \ g 0 \ topspace X" + by (force simp: pathin_def continuous_map) + +lemma path_finish_in_topspace: "pathin X g \ g 1 \ topspace X" + by (force simp: pathin_def continuous_map) + +lemma path_image_subset_topspace: "pathin X g \ g ` ({0..1}) \ topspace X" + by (force simp: pathin_def continuous_map) definition path_connected_space :: "'a topology \ bool" where "path_connected_space X \ \x \ topspace X. \ y \ topspace X. \g. pathin X g \ g 0 = x \ g 1 = y" @@ -1323,6 +1332,19 @@ qed qed +lemma path_connectedin_discrete_topology: + "path_connectedin (discrete_topology U) S \ S \ U \ (\a. S \ {a})" + apply safe + using path_connectedin_subset_topspace apply fastforce + apply (meson connectedin_discrete_topology path_connectedin_imp_connectedin) + using subset_singletonD by fastforce + +lemma path_connected_space_discrete_topology: + "path_connected_space (discrete_topology U) \ (\a. U \ {a})" + by (metis path_connectedin_discrete_topology path_connectedin_topspace path_connected_space_topspace_empty + subset_singletonD topspace_discrete_topology) + + lemma homeomorphic_path_connected_space_imp: "\path_connected_space X; X homeomorphic_space Y\ \ path_connected_space Y" unfolding homeomorphic_space_def homeomorphic_maps_def diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/Binary_Product_Measure.thy --- a/src/HOL/Analysis/Binary_Product_Measure.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/Binary_Product_Measure.thy Thu Mar 21 14:18:22 2019 +0000 @@ -74,11 +74,11 @@ qed lemma measurable_fst[intro!, simp, measurable]: "fst \ measurable (M1 \\<^sub>M M2) M1" - by (auto simp: fst_vimage_eq_Times space_pair_measure sets.sets_into_space times_Int_times + by (auto simp: fst_vimage_eq_Times space_pair_measure sets.sets_into_space Times_Int_Times measurable_def) lemma measurable_snd[intro!, simp, measurable]: "snd \ measurable (M1 \\<^sub>M M2) M2" - by (auto simp: snd_vimage_eq_Times space_pair_measure sets.sets_into_space times_Int_times + by (auto simp: snd_vimage_eq_Times space_pair_measure sets.sets_into_space Times_Int_Times measurable_def) lemma measurable_Pair_compose_split[measurable_dest]: @@ -215,7 +215,7 @@ lemma Int_stable_pair_measure_generator: "Int_stable {a \ b | a b. a \ sets A \ b \ sets B}" unfolding Int_stable_def - by safe (auto simp add: times_Int_times) + by safe (auto simp add: Times_Int_Times) lemma (in finite_measure) finite_measure_cut_measurable: assumes [measurable]: "Q \ sets (N \\<^sub>M M)" diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/Bounded_Linear_Function.thy --- a/src/HOL/Analysis/Bounded_Linear_Function.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/Bounded_Linear_Function.thy Thu Mar 21 14:18:22 2019 +0000 @@ -779,41 +779,41 @@ qed lemma strong_operator_topology_continuous_evaluation: - "continuous_on_topo strong_operator_topology euclidean (\f. blinfun_apply f x)" + "continuous_map strong_operator_topology euclidean (\f. blinfun_apply f x)" proof - - have "continuous_on_topo strong_operator_topology euclidean ((\f. f x) o blinfun_apply)" - unfolding strong_operator_topology_def apply (rule continuous_on_topo_pullback) - using continuous_on_topo_UNIV continuous_on_product_coordinates by fastforce + have "continuous_map strong_operator_topology euclidean ((\f. f x) o blinfun_apply)" + unfolding strong_operator_topology_def apply (rule continuous_map_pullback) + using continuous_on_product_coordinates by fastforce then show ?thesis unfolding comp_def by simp qed lemma continuous_on_strong_operator_topo_iff_coordinatewise: - "continuous_on_topo T strong_operator_topology f - \ (\x. continuous_on_topo T euclidean (\y. blinfun_apply (f y) x))" + "continuous_map T strong_operator_topology f + \ (\x. continuous_map T euclidean (\y. blinfun_apply (f y) x))" proof (auto) fix x::"'b" - assume "continuous_on_topo T strong_operator_topology f" - with continuous_on_topo_compose[OF this strong_operator_topology_continuous_evaluation] - have "continuous_on_topo T euclidean ((\z. blinfun_apply z x) o f)" + assume "continuous_map T strong_operator_topology f" + with continuous_map_compose[OF this strong_operator_topology_continuous_evaluation] + have "continuous_map T euclidean ((\z. blinfun_apply z x) o f)" by simp - then show "continuous_on_topo T euclidean (\y. blinfun_apply (f y) x)" + then show "continuous_map T euclidean (\y. blinfun_apply (f y) x)" unfolding comp_def by auto next - assume *: "\x. continuous_on_topo T euclidean (\y. blinfun_apply (f y) x)" - have "continuous_on_topo T euclidean (blinfun_apply o f)" + assume *: "\x. continuous_map T euclidean (\y. blinfun_apply (f y) x)" + have "continuous_map T euclidean (blinfun_apply o f)" unfolding euclidean_product_topology - apply (rule continuous_on_topo_coordinatewise_then_product, auto) + apply (rule continuous_map_coordinatewise_then_product, auto) using * unfolding comp_def by auto - show "continuous_on_topo T strong_operator_topology f" + show "continuous_map T strong_operator_topology f" unfolding strong_operator_topology_def - apply (rule continuous_on_topo_pullback') - by (auto simp add: \continuous_on_topo T euclidean (blinfun_apply o f)\) + apply (rule continuous_map_pullback') + by (auto simp add: \continuous_map T euclidean (blinfun_apply o f)\) qed lemma strong_operator_topology_weaker_than_euclidean: - "continuous_on_topo euclidean strong_operator_topology (\f. f)" + "continuous_map euclidean strong_operator_topology (\f. f)" by (subst continuous_on_strong_operator_topo_iff_coordinatewise, - auto simp add: continuous_on_topo_UNIV[symmetric] linear_continuous_on) + auto simp add: linear_continuous_on) diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/Function_Topology.thy --- a/src/HOL/Analysis/Function_Topology.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/Function_Topology.thy Thu Mar 21 14:18:22 2019 +0000 @@ -3,11 +3,11 @@ *) theory Function_Topology -imports Topology_Euclidean_Space +imports Topology_Euclidean_Space begin -section \Function Topology\ +section \Function Topology\ text \We want to define the general product topology. @@ -42,17 +42,17 @@ Here is an example of a reformulation using topologies. Let @{text [display] -\continuous_on_topo T1 T2 f = +\continuous_map T1 T2 f = ((\ U. openin T2 U \ openin T1 (f-`U \ topspace(T1))) \ (f`(topspace T1) \ (topspace T2)))\} be the natural continuity definition of a map from the topology \T1\ to the topology \T2\. Then the current \continuous_on\ (with type classes) can be redefined as @{text [display] \continuous_on s f = - continuous_on_topo (top_of_set s) (topology euclidean) f\} + continuous_map (top_of_set s) (topology euclidean) f\} -In fact, I need \continuous_on_topo\ to express the continuity of the projection on subfactors +In fact, I need \continuous_map\ to express the continuity of the projection on subfactors for the product topology, in Lemma~\continuous_on_restrict_product_topology\, and I show -the above equivalence in Lemma~\continuous_on_continuous_on_topo\. +the above equivalence in Lemma~\continuous_map_iff_continuous\. I only develop the basics of the product topology in this theory. The most important missing piece is Tychonov theorem, stating that a product of compact spaces is always compact for the product @@ -252,7 +252,7 @@ ((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: topspace_product_topology topology_inverse' [OF istopology_subbase]) + apply (simp add: topology_inverse' [OF istopology_subbase]) done lemma subtopology_PiE: @@ -286,10 +286,9 @@ done qed - lemma product_topology_base_alt: "finite intersection_of (\F. (\i U. F = {f. f i \ U} \ i \ I \ openin (X i) U)) - relative_to topspace(product_topology X I) = + relative_to (\\<^sub>E i\I. topspace (X i)) = (\F. (\U. F = Pi\<^sub>E I U \ finite {i \ I. U i \ topspace(X i)} \ (\i \ I. openin (X i) (U i))))" (is "?lhs = ?rhs") proof - @@ -340,6 +339,15 @@ by meson qed +corollary openin_product_topology_alt: + "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)" + unfolding openin_product_topology arbitrary_union_of_alt product_topology_base_alt topspace_product_topology + apply safe + apply (drule bspec; blast)+ + done + lemma closure_of_product_topology: "(product_topology X I) closure_of (PiE I S) = PiE I (\i. (X i) closure_of (S i))" proof - @@ -445,9 +453,9 @@ subsubsection \The basic property of the product topology is the continuity of projections:\ -lemma continuous_on_topo_product_coordinates [simp]: +lemma continuous_map_product_coordinates [simp]: assumes "i \ I" - shows "continuous_on_topo (product_topology T I) (T i) (\x. x i)" + shows "continuous_map (product_topology T I) (T i) (\x. x i)" proof - { fix U assume "openin (T i) U" @@ -463,14 +471,14 @@ apply (subst *) using ** by auto } - then show ?thesis unfolding continuous_on_topo_def - by (auto simp add: assms topspace_product_topology PiE_iff) + then show ?thesis unfolding continuous_map_alt + by (auto simp add: assms PiE_iff) qed -lemma continuous_on_topo_coordinatewise_then_product [intro]: - assumes "\i. i \ I \ continuous_on_topo T1 (T i) (\x. f x i)" +lemma continuous_map_coordinatewise_then_product [intro]: + assumes "\i. i \ I \ continuous_map T1 (T i) (\x. f x i)" "\i x. i \ I \ x \ topspace T1 \ f x i = undefined" - shows "continuous_on_topo T1 (product_topology T I) f" + shows "continuous_map T1 (product_topology T I) f" unfolding product_topology_def proof (rule continuous_on_generated_topo) fix U assume "U \ {Pi\<^sub>E I X |X. (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)}}" @@ -479,7 +487,7 @@ define J where "J = {i \ I. X i \ topspace (T i)}" have "finite J" "J \ I" unfolding J_def using H(3) by auto have "(\x. f x i)-`(topspace(T i)) \ topspace T1 = topspace T1" if "i \ I" for i - using that assms(1) by (simp add: continuous_on_topo_preimage_topspace) + using that assms(1) by (simp add: continuous_map_preimage_topspace) then have *: "(\x. f x i)-`(X i) \ topspace T1 = topspace T1" if "i \ I-J" for i using that unfolding J_def by auto have "f-`U \ topspace T1 = (\i\I. (\x. f x i)-`(X i) \ topspace T1) \ (topspace T1)" @@ -497,25 +505,25 @@ apply (subst product_topology_def[symmetric]) apply (simp only: topspace_product_topology) apply (auto simp add: PiE_iff) - using assms unfolding continuous_on_topo_def by auto + using assms unfolding continuous_map_def by auto qed -lemma continuous_on_topo_product_then_coordinatewise [intro]: - assumes "continuous_on_topo T1 (product_topology T I) f" - shows "\i. i \ I \ continuous_on_topo T1 (T i) (\x. f x i)" +lemma continuous_map_product_then_coordinatewise [intro]: + assumes "continuous_map T1 (product_topology T I) f" + shows "\i. i \ I \ continuous_map T1 (T i) (\x. f x i)" "\i x. i \ I \ x \ topspace T1 \ f x i = undefined" proof - fix i assume "i \ I" have "(\x. f x i) = (\y. y i) o f" by auto - also have "continuous_on_topo T1 (T i) (...)" - apply (rule continuous_on_topo_compose[of _ "product_topology T I"]) + also have "continuous_map T1 (T i) (...)" + apply (rule continuous_map_compose[of _ "product_topology T I"]) using assms \i \ I\ by auto - ultimately show "continuous_on_topo T1 (T i) (\x. f x i)" + ultimately show "continuous_map T1 (T i) (\x. f x i)" by simp next fix i x assume "i \ I" "x \ topspace T1" have "f x \ topspace (product_topology T I)" - using assms \x \ topspace T1\ unfolding continuous_on_topo_def by auto + using assms \x \ topspace T1\ unfolding continuous_map_def by auto then have "f x \ (\\<^sub>E i\I. topspace (T i))" using topspace_product_topology by metis then show "f x i = undefined" @@ -524,11 +532,11 @@ lemma continuous_on_restrict: assumes "J \ I" - shows "continuous_on_topo (product_topology T I) (product_topology T J) (\x. restrict x J)" -proof (rule continuous_on_topo_coordinatewise_then_product) + shows "continuous_map (product_topology T I) (product_topology T J) (\x. restrict x J)" +proof (rule continuous_map_coordinatewise_then_product) fix i assume "i \ J" then have "(\x. restrict x J i) = (\x. x i)" unfolding restrict_def by auto - then show "continuous_on_topo (product_topology T I) (T i) (\x. restrict x J i)" + then show "continuous_map (product_topology T I) (T i) (\x. restrict x J i)" using \i \ J\ \J \ I\ by auto next fix i assume "i \ J" @@ -571,7 +579,7 @@ 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)" - unfolding open_fun_def + unfolding open_fun_def by (simp_all add: * ** product_topology_basis) 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 @@ -594,28 +602,28 @@ lemma continuous_on_product_coordinates [simp]: "continuous_on UNIV (\x. x i::('b::topological_space))" - unfolding continuous_on_topo_UNIV euclidean_product_topology - by (rule continuous_on_topo_product_coordinates, simp) + using continuous_map_product_coordinates [of _ UNIV "\i. euclidean"] + by (metis (no_types) continuous_map_iff_continuous euclidean_product_topology iso_tuple_UNIV_I subtopology_UNIV) lemma continuous_on_coordinatewise_then_product [intro, continuous_intros]: 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_on_topo_coordinatewise_then_product [of UNIV, where T = "\i. euclidean"] - by (metis UNIV_I assms continuous_on_continuous_on_topo euclidean_product_topology) + 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)" -using assms unfolding continuous_on_topo_UNIV euclidean_product_topology -by (rule continuous_on_topo_product_then_coordinatewise(1), simp) + using assms unfolding continuous_map_iff_continuous2 [symmetric] euclidean_product_topology + by fastforce 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 + 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 @@ -1582,4 +1590,166 @@ qed qed +subsection \Open Pi-sets in the product topology\ + +proposition openin_PiE_gen: + "openin (product_topology X I) (PiE I S) \ + PiE I S = {} \ + finite {i \ I. ~(S i = topspace(X i))} \ (\i \ I. openin (X i) (S i))" + (is "?lhs \ _ \ ?rhs") +proof (cases "PiE I S = {}") + case False + moreover have "?lhs = ?rhs" + proof + assume L: ?lhs + moreover + obtain z where z: "z \ PiE I S" + using False by blast + ultimately obtain U where fin: "finite {i \ I. U i \ topspace (X i)}" + and "Pi\<^sub>E I U \ {}" + and sub: "Pi\<^sub>E I U \ Pi\<^sub>E I S" + by (fastforce simp add: openin_product_topology_alt) + then have *: "\i. i \ I \ U i \ S i" + by (simp add: subset_PiE) + show ?rhs + proof (intro conjI ballI) + show "finite {i \ I. S i \ topspace (X i)}" + apply (rule finite_subset [OF _ fin], clarify) + using * + by (metis False L openin_subset topspace_product_topology subset_PiE subset_antisym) + next + fix i :: "'a" + assume "i \ I" + then show "openin (X i) (S i)" + using open_map_product_projection [of i I X] L + apply (simp add: open_map_def) + apply (drule_tac x="PiE I S" in spec) + apply (simp add: False image_projection_PiE split: if_split_asm) + done + qed + 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 + qed + ultimately show ?thesis + by simp +qed simp + + +corollary openin_PiE: + "finite I \ openin (product_topology X I) (PiE I S) \ PiE I S = {} \ (\i \ I. openin (X i) (S i))" + by (simp add: openin_PiE_gen) + +proposition compact_space_product_topology: + "compact_space(product_topology X I) \ + topspace(product_topology X I) = {} \ (\i \ I. compact_space(X i))" + (is "?lhs = ?rhs") +proof (cases "topspace(product_topology X I) = {}") + case False + then obtain z where z: "z \ (\\<^sub>E i\I. topspace(X i))" + by auto + show ?thesis + proof + assume L: ?lhs + show ?rhs + proof (clarsimp simp add: False compact_space_def) + fix i + assume "i \ I" + with L have "continuous_map (product_topology X I) (X i) (\f. f i)" + 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 + 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))" + by (metis L compact_space_def image_compactin topspace_product_topology) + qed + next + assume R: ?rhs + show ?lhs + proof (cases "I = {}") + case True + with R show ?thesis + by (simp add: compact_space_def) + next + case False + then obtain i where "i \ I" + by blast + show ?thesis + using R + proof + assume com [rule_format]: "\i\I. compact_space (X i)" + let ?\ = "{{f. f i \ U} |i U. i \ I \ openin (X i) U}" + show "compact_space (product_topology X I)" + proof (rule Alexander_subbase_alt) + show "topspace (product_topology X I) \ \?\" + unfolding topspace_product_topology using \i \ I\ by blast + next + fix C + assume Csub: "C \ ?\" and UC: "topspace (product_topology X I) \ \C" + define \ where "\ \ \i. {U. openin (X i) U \ {f. f i \ U} \ C}" + show "\C'. finite C' \ C' \ C \ topspace (product_topology X I) \ \C'" + proof (cases "\i. i \ I \ topspace (X i) \ \(\ i)") + case True + then obtain i where "i \ I" + and i: "topspace (X i) \ \(\ i)" + unfolding \_def by blast + then have *: "\\. \Ball \ (openin (X i)); topspace (X i) \ \\\ \ + \\. finite \ \ \ \ \ \ topspace (X i) \ \\" + using com [OF \i \ I\] by (auto simp: compact_space_def compactin_def) + have "topspace (X i) \ \(\ i)" + using i by auto + with * obtain \ where "finite \ \ \ \ (\ i) \ topspace (X i) \ \\" + unfolding \_def by fastforce + with \i \ I\ show ?thesis + unfolding \_def + by (rule_tac x="(\U. {x. x i \ U}) ` \" in exI) auto + next + case False + then have "\i \ I. \y. y \ topspace (X i) \ y \ \(\ i)" + by force + then obtain g where g: "\i. i \ I \ g i \ topspace (X i) \ g i \ \(\ i)" + by metis + then have "(\i. if i \ I then g i else undefined) \ topspace (product_topology X I)" + by (simp add: PiE_I) + moreover have "(\i. if i \ I then g i else undefined) \ \C" + using Csub g unfolding \_def by force + ultimately show ?thesis + using UC by blast + qed + qed (simp add: product_topology) + qed (simp add: compact_space_topspace_empty) + qed + qed +qed (simp add: compact_space_topspace_empty) + +corollary compactin_PiE: + "compactin (product_topology X I) (PiE I S) \ + PiE I S = {} \ (\i \ I. compactin (X i) (S i))" + by (auto simp: compactin_subspace subtopology_PiE subset_PiE compact_space_product_topology + PiE_eq_empty_iff) + +lemma in_product_topology_closure_of: + "z \ (product_topology X I) closure_of S + \ i \ I \ z i \ ((X i) closure_of ((\x. x i) ` S))" + using continuous_map_product_projection + by (force simp: continuous_map_eq_image_closure_subset image_subset_iff) + +lemma homeomorphic_space_singleton_product: + "product_topology X {k} homeomorphic_space (X k)" + unfolding homeomorphic_space + apply (rule_tac x="\x. x k" in exI) + apply (rule bijective_open_imp_homeomorphic_map) + apply (simp_all add: continuous_map_product_projection open_map_product_projection) + unfolding PiE_over_singleton_iff + apply (auto simp: image_iff inj_on_def) + done + end diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/Ordered_Euclidean_Space.thy --- a/src/HOL/Analysis/Ordered_Euclidean_Space.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/Ordered_Euclidean_Space.thy Thu Mar 21 14:18:22 2019 +0000 @@ -1,4 +1,4 @@ -subsection \Ordered Euclidean Space\ (* why not Section? *) +section \Ordered Euclidean Space\ theory Ordered_Euclidean_Space imports diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/Path_Connected.thy Thu Mar 21 14:18:22 2019 +0000 @@ -135,6 +135,9 @@ subsection%unimportant\Basic lemmas about paths\ +lemma pathin_iff_path_real [simp]: "pathin euclideanreal g \ path g" + by (simp add: pathin_def path_def) + lemma continuous_on_path: "path f \ t \ {0..1} \ continuous_on t f" using continuous_on_subset path_def by blast @@ -1468,7 +1471,7 @@ lemma path_component_of_subset: "s \ t \ path_component s x y \ path_component t x y" unfolding path_component_def by auto -lemma path_connected_linepath: +lemma path_component_linepath: fixes s :: "'a::real_normed_vector set" shows "closed_segment a b \ s \ path_component s a b" unfolding path_component_def @@ -1502,6 +1505,10 @@ definition%important "path_connected s \ (\x\s. \y\s. \g. path g \ path_image g \ s \ pathstart g = x \ pathfinish g = y)" +lemma path_connectedin_iff_path_connected_real [simp]: + "path_connectedin euclideanreal S \ path_connected S" + by (simp add: path_connectedin path_connected_def path_defs) + lemma path_connected_component: "path_connected s \ (\x\s. \y\s. path_component s x y)" unfolding path_connected_def path_component_def by auto @@ -1818,6 +1825,29 @@ lemma is_interval_path_connected: "is_interval S \ path_connected S" by (simp add: convex_imp_path_connected is_interval_convex) +lemma path_connectedin_path_image: + assumes "pathin X g" shows "path_connectedin X (g ` ({0..1}))" + unfolding pathin_def +proof (rule path_connectedin_continuous_map_image) + show "continuous_map (subtopology euclideanreal {0..1}) X g" + using assms pathin_def by blast +qed (auto simp: is_interval_1 is_interval_path_connected) + +lemma path_connected_space_subconnected: + "path_connected_space X \ + (\x \ topspace X. \y \ topspace X. \S. path_connectedin X S \ x \ S \ y \ S)" + unfolding path_connected_space_def Ball_def + apply (intro all_cong1 imp_cong refl, safe) + using path_connectedin_path_image apply fastforce + by (meson path_connectedin) + +lemma connectedin_path_image: "pathin X g \ connectedin X (g ` ({0..1}))" + by (simp add: path_connectedin_imp_connectedin path_connectedin_path_image) + +lemma compactin_path_image: "pathin X g \ compactin X (g ` ({0..1}))" + unfolding pathin_def + by (rule image_compactin [of "top_of_set {0..1}"]) auto + lemma linear_homeomorphism_image: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" assumes "linear f" "inj f" @@ -1935,6 +1965,372 @@ qed +subsection\Path components\ + +definition path_component_of + where "path_component_of X x y \ \g. pathin X g \ g 0 = x \ g 1 = y" + +abbreviation path_component_of_set + where "path_component_of_set X x \ Collect (path_component_of X x)" + +definition path_components_of :: "'a topology \ 'a set set" + where "path_components_of X \ path_component_of_set X ` topspace X" + +lemma path_component_in_topspace: + "path_component_of X x y \ x \ topspace X \ y \ topspace X" + by (auto simp: path_component_of_def pathin_def continuous_map_def) + +lemma path_component_of_refl: + "path_component_of X x x \ x \ topspace X" + apply (auto simp: path_component_in_topspace) + apply (force simp: path_component_of_def pathin_const) + done + +lemma path_component_of_sym: + assumes "path_component_of X x y" + shows "path_component_of X y x" + using assms + apply (clarsimp simp: path_component_of_def pathin_def) + apply (rule_tac x="g \ (\t. 1 - t)" in exI) + apply (auto intro!: continuous_map_compose) + apply (force simp: continuous_map_in_subtopology continuous_on_op_minus) + done + +lemma path_component_of_sym_iff: + "path_component_of X x y \ path_component_of X y x" + by (metis path_component_of_sym) + +lemma path_component_of_trans: + assumes "path_component_of X x y" and "path_component_of X y z" + shows "path_component_of X x z" + unfolding path_component_of_def pathin_def +proof - + let ?T01 = "top_of_set {0..1::real}" + obtain g1 g2 where g1: "continuous_map ?T01 X g1" "x = g1 0" "y = g1 1" + and g2: "continuous_map ?T01 X g2" "g2 0 = g1 1" "z = g2 1" + using assms unfolding path_component_of_def pathin_def by blast + let ?g = "\x. if x \ 1/2 then (g1 \ (\t. 2 * t)) x else (g2 \ (\t. 2 * t -1)) x" + show "\g. continuous_map ?T01 X g \ g 0 = x \ g 1 = z" + proof (intro exI conjI) + show "continuous_map (subtopology euclideanreal {0..1}) X ?g" + proof (intro continuous_map_cases_le continuous_map_compose, force, force) + show "continuous_map (subtopology ?T01 {x \ topspace ?T01. x \ 1/2}) ?T01 ((*) 2)" + by (auto simp: continuous_map_in_subtopology continuous_map_from_subtopology) + have "continuous_map + (subtopology (top_of_set {0..1}) {x. 0 \ x \ x \ 1 \ 1 \ x * 2}) + euclideanreal (\t. 2 * t - 1)" + by (intro continuous_intros) (force intro: continuous_map_from_subtopology) + then show "continuous_map (subtopology ?T01 {x \ topspace ?T01. 1/2 \ x}) ?T01 (\t. 2 * t - 1)" + by (force simp: continuous_map_in_subtopology) + show "(g1 \ (*) 2) x = (g2 \ (\t. 2 * t - 1)) x" if "x \ topspace ?T01" "x = 1/2" for x + using that by (simp add: g2(2) mult.commute continuous_map_from_subtopology) + qed (auto simp: g1 g2) + qed (auto simp: g1 g2) +qed + + +lemma path_component_of_mono: + "\path_component_of (subtopology X S) x y; S \ T\ \ path_component_of (subtopology X T) x y" + unfolding path_component_of_def + by (metis subsetD pathin_subtopology) + + +lemma path_component_of: + "path_component_of X x y \ (\T. path_connectedin X T \ x \ T \ y \ T)" + apply (auto simp: path_component_of_def) + using path_connectedin_path_image apply fastforce + apply (metis path_connectedin) + done + +lemma path_component_of_set: + "path_component_of X x y \ (\g. pathin X g \ g 0 = x \ g 1 = y)" + by (auto simp: path_component_of_def) + +lemma path_component_of_subset_topspace: + "Collect(path_component_of X x) \ topspace X" + using path_component_in_topspace by fastforce + +lemma path_component_of_eq_empty: + "Collect(path_component_of X x) = {} \ (x \ topspace X)" + using path_component_in_topspace path_component_of_refl by fastforce + +lemma path_connected_space_iff_path_component: + "path_connected_space X \ (\x \ topspace X. \y \ topspace X. path_component_of X x y)" + by (simp add: path_component_of path_connected_space_subconnected) + +lemma path_connected_space_imp_path_component_of: + "\path_connected_space X; a \ topspace X; b \ topspace X\ + \ path_component_of X a b" + by (simp add: path_connected_space_iff_path_component) + +lemma path_connected_space_path_component_set: + "path_connected_space X \ (\x \ topspace X. Collect(path_component_of X x) = topspace X)" + using path_component_of_subset_topspace path_connected_space_iff_path_component by fastforce + +lemma path_component_of_maximal: + "\path_connectedin X s; x \ s\ \ s \ Collect(path_component_of X x)" + using path_component_of by fastforce + +lemma path_component_of_equiv: + "path_component_of X x y \ x \ topspace X \ y \ topspace X \ path_component_of X x = path_component_of X y" + (is "?lhs = ?rhs") +proof + assume ?lhs + then show ?rhs + apply (simp add: fun_eq_iff path_component_in_topspace) + apply (meson path_component_of_sym path_component_of_trans) + done +qed (simp add: path_component_of_refl) + +lemma path_component_of_disjoint: + "disjnt (Collect (path_component_of X x)) (Collect (path_component_of X y)) \ + ~(path_component_of X x y)" + by (force simp: disjnt_def path_component_of_eq_empty path_component_of_equiv) + +lemma path_component_of_eq: + "path_component_of X x = path_component_of X y \ + (x \ topspace X) \ (y \ topspace X) \ + x \ topspace X \ y \ topspace X \ path_component_of X x y" + by (metis Collect_empty_eq_bot path_component_of_eq_empty path_component_of_equiv) + +lemma path_connectedin_path_component_of: + "path_connectedin X (Collect (path_component_of X x))" +proof - + have "\y. path_component_of X x y + \ path_component_of (subtopology X (Collect (path_component_of X x))) x y" + by (meson path_component_of path_component_of_maximal path_connectedin_subtopology) + then show ?thesis + apply (simp add: path_connectedin_def path_component_of_subset_topspace path_connected_space_iff_path_component) + by (metis Int_absorb1 mem_Collect_eq path_component_of_equiv path_component_of_subset_topspace topspace_subtopology) +qed + +lemma Union_path_components_of: + "\(path_components_of X) = topspace X" + by (auto simp: path_components_of_def path_component_of_equiv) + +lemma path_components_of_maximal: + "\C \ path_components_of X; path_connectedin X S; ~disjnt C S\ \ S \ C" + apply (auto simp: path_components_of_def path_component_of_equiv) + using path_component_of_maximal path_connectedin_def apply fastforce + by (meson disjnt_subset2 path_component_of_disjoint path_component_of_equiv path_component_of_maximal) + +lemma pairwise_disjoint_path_components_of: + "pairwise disjnt (path_components_of X)" + by (auto simp: path_components_of_def pairwise_def path_component_of_disjoint path_component_of_equiv) + +lemma complement_path_components_of_Union: + "C \ path_components_of X + \ topspace X - C = \(path_components_of X - {C})" + by (metis Diff_cancel Diff_subset Union_path_components_of cSup_singleton diff_Union_pairwise_disjoint insert_subset pairwise_disjoint_path_components_of) + +lemma nonempty_path_components_of: + "C \ path_components_of X \ (C \ {})" + apply (clarsimp simp: path_components_of_def path_component_of_eq_empty) + by (meson path_component_of_refl) + +lemma path_components_of_subset: "C \ path_components_of X \ C \ topspace X" + by (auto simp: path_components_of_def path_component_of_equiv) + +lemma path_connectedin_path_components_of: + "C \ path_components_of X \ path_connectedin X C" + by (auto simp: path_components_of_def path_connectedin_path_component_of) + +lemma path_component_in_path_components_of: + "Collect (path_component_of X a) \ path_components_of X \ a \ topspace X" + apply (rule iffI) + using nonempty_path_components_of path_component_of_eq_empty apply fastforce + by (simp add: path_components_of_def) + +lemma path_connectedin_Union: + assumes \: "\S. S \ \ \ path_connectedin X S" "\\ \ {}" + shows "path_connectedin X (\\)" +proof - + obtain a where "\S. S \ \ \ a \ S" + using assms by blast + then have "\x. x \ topspace (subtopology X (\\)) \ path_component_of (subtopology X (\\)) a x" + apply (simp add: topspace_subtopology) + by (meson Union_upper \ path_component_of path_connectedin_subtopology) + then show ?thesis + using \ unfolding path_connectedin_def + by (metis Sup_le_iff path_component_of_equiv path_connected_space_iff_path_component) +qed + +lemma path_connectedin_Un: + "\path_connectedin X S; path_connectedin X T; S \ T \ {}\ + \ path_connectedin X (S \ T)" + by (blast intro: path_connectedin_Union [of "{S,T}", simplified]) + +lemma path_connected_space_iff_components_eq: + "path_connected_space X \ + (\C \ path_components_of X. \C' \ path_components_of X. C = C')" + unfolding path_components_of_def +proof (intro iffI ballI) + assume "\C \ path_component_of_set X ` topspace X. + \C' \ path_component_of_set X ` topspace X. C = C'" + then show "path_connected_space X" + using path_component_of_refl path_connected_space_iff_path_component by fastforce +qed (auto simp: path_connected_space_path_component_set) + +lemma path_components_of_eq_empty: + "path_components_of X = {} \ topspace X = {}" + using Union_path_components_of nonempty_path_components_of by fastforce + +lemma path_components_of_empty_space: + "topspace X = {} \ path_components_of X = {}" + by (simp add: path_components_of_eq_empty) + +lemma path_components_of_subset_singleton: + "path_components_of X \ {S} \ + path_connected_space X \ (topspace X = {} \ topspace X = S)" +proof (cases "topspace X = {}") + case True + then show ?thesis + by (auto simp: path_components_of_empty_space path_connected_space_topspace_empty) +next + case False + have "(path_components_of X = {S}) \ (path_connected_space X \ topspace X = S)" + proof (intro iffI conjI) + assume L: "path_components_of X = {S}" + then show "path_connected_space X" + by (simp add: path_connected_space_iff_components_eq) + show "topspace X = S" + by (metis L ccpo_Sup_singleton [of S] Union_path_components_of) + next + assume R: "path_connected_space X \ topspace X = S" + then show "path_components_of X = {S}" + using ccpo_Sup_singleton [of S] + by (metis False all_not_in_conv insert_iff mk_disjoint_insert path_component_in_path_components_of path_connected_space_iff_components_eq path_connected_space_path_component_set) + qed + with False show ?thesis + by (simp add: path_components_of_eq_empty subset_singleton_iff) +qed + +lemma path_connected_space_iff_components_subset_singleton: + "path_connected_space X \ (\a. path_components_of X \ {a})" + by (simp add: path_components_of_subset_singleton) + +lemma path_components_of_eq_singleton: + "path_components_of X = {S} \ path_connected_space X \ topspace X \ {} \ S = topspace X" + by (metis cSup_singleton insert_not_empty path_components_of_subset_singleton subset_singleton_iff) + +lemma path_components_of_path_connected_space: + "path_connected_space X \ path_components_of X = (if topspace X = {} then {} else {topspace X})" + by (simp add: path_components_of_eq_empty path_components_of_eq_singleton) + +lemma path_component_subset_connected_component_of: + "path_component_of_set X x \ connected_component_of_set X x" +proof (cases "x \ topspace X") + case True + then show ?thesis + by (simp add: connected_component_of_maximal path_component_of_refl path_connectedin_imp_connectedin path_connectedin_path_component_of) +next + case False + then show ?thesis + using path_component_of_eq_empty by fastforce +qed + +lemma exists_path_component_of_superset: + assumes S: "path_connectedin X S" and ne: "topspace X \ {}" + obtains C where "C \ path_components_of X" "S \ C" +proof (cases "S = {}") + case True + then show ?thesis + using ne path_components_of_eq_empty that by fastforce +next + case False + then obtain a where "a \ S" + by blast + show ?thesis + proof + show "Collect (path_component_of X a) \ path_components_of X" + by (meson \a \ S\ S subsetD path_component_in_path_components_of path_connectedin_subset_topspace) + show "S \ Collect (path_component_of X a)" + by (simp add: S \a \ S\ path_component_of_maximal) + qed +qed + +lemma path_component_of_eq_overlap: + "path_component_of X x = path_component_of X y \ + (x \ topspace X) \ (y \ topspace X) \ + Collect (path_component_of X x) \ Collect (path_component_of X y) \ {}" + by (metis disjnt_def empty_iff inf_bot_right mem_Collect_eq path_component_of_disjoint path_component_of_eq path_component_of_eq_empty) + +lemma path_component_of_nonoverlap: + "Collect (path_component_of X x) \ Collect (path_component_of X y) = {} \ + (x \ topspace X) \ (y \ topspace X) \ + path_component_of X x \ path_component_of X y" + by (metis inf.idem path_component_of_eq_empty path_component_of_eq_overlap) + +lemma path_component_of_overlap: + "Collect (path_component_of X x) \ Collect (path_component_of X y) \ {} \ + x \ topspace X \ y \ topspace X \ path_component_of X x = path_component_of X y" + by (meson path_component_of_nonoverlap) + +lemma path_components_of_disjoint: + "\C \ path_components_of X; C' \ path_components_of X\ \ disjnt C C' \ C \ C'" + by (auto simp: path_components_of_def path_component_of_disjoint path_component_of_equiv) + +lemma path_components_of_overlap: + "\C \ path_components_of X; C' \ path_components_of X\ \ C \ C' \ {} \ C = C'" + by (auto simp: path_components_of_def path_component_of_equiv) + +lemma path_component_of_unique: + "\x \ C; path_connectedin X C; \C'. \x \ C'; path_connectedin X C'\ \ C' \ C\ + \ Collect (path_component_of X x) = C" + by (meson subsetD eq_iff path_component_of_maximal path_connectedin_path_component_of) + +lemma path_component_of_discrete_topology [simp]: + "Collect (path_component_of (discrete_topology U) x) = (if x \ U then {x} else {})" +proof - + have "\C'. \x \ C'; path_connectedin (discrete_topology U) C'\ \ C' \ {x}" + by (metis path_connectedin_discrete_topology subsetD singletonD) + then have "x \ U \ Collect (path_component_of (discrete_topology U) x) = {x}" + by (simp add: path_component_of_unique) + then show ?thesis + using path_component_in_topspace by fastforce +qed + +lemma path_component_of_discrete_topology_iff [simp]: + "path_component_of (discrete_topology U) x y \ x \ U \ y=x" + by (metis empty_iff insertI1 mem_Collect_eq path_component_of_discrete_topology singletonD) + +lemma path_components_of_discrete_topology [simp]: + "path_components_of (discrete_topology U) = (\x. {x}) ` U" + by (auto simp: path_components_of_def image_def fun_eq_iff) + +lemma homeomorphic_map_path_component_of: + assumes f: "homeomorphic_map X Y f" and x: "x \ topspace X" + shows "Collect (path_component_of Y (f x)) = f ` Collect(path_component_of X x)" +proof - + obtain g where g: "homeomorphic_maps X Y f g" + using f homeomorphic_map_maps by blast + show ?thesis + proof + have "Collect (path_component_of Y (f x)) \ topspace Y" + by (simp add: path_component_of_subset_topspace) + moreover have "g ` Collect(path_component_of Y (f x)) \ Collect (path_component_of X (g (f x)))" + using g x unfolding homeomorphic_maps_def + by (metis f homeomorphic_imp_surjective_map imageI mem_Collect_eq path_component_of_maximal path_component_of_refl path_connectedin_continuous_map_image path_connectedin_path_component_of) + ultimately show "Collect (path_component_of Y (f x)) \ f ` Collect (path_component_of X x)" + using g x unfolding homeomorphic_maps_def continuous_map_def image_iff subset_iff + by metis + show "f ` Collect (path_component_of X x) \ Collect (path_component_of Y (f x))" + proof (rule path_component_of_maximal) + show "path_connectedin Y (f ` Collect (path_component_of X x))" + by (meson f homeomorphic_map_path_connectedness_eq path_connectedin_path_component_of) + qed (simp add: path_component_of_refl x) + qed +qed + +lemma homeomorphic_map_path_components_of: + assumes "homeomorphic_map X Y f" + shows "path_components_of Y = (image f) ` (path_components_of X)" + unfolding path_components_of_def homeomorphic_imp_surjective_map [OF assms, symmetric] + apply safe + using assms homeomorphic_map_path_component_of apply fastforce + by (metis assms homeomorphic_map_path_component_of imageI) + + subsection \Sphere is path-connected\ lemma path_connected_punctured_universe: @@ -2078,7 +2474,7 @@ done } then have pcx: "path_component (- s) x (a + C *\<^sub>R (x - a))" - by (force simp: closed_segment_def intro!: path_connected_linepath) + by (force simp: closed_segment_def intro!: path_component_linepath) define D where "D = B / norm(y - a)" \ \massive duplication with the proof above\ { fix u assume u: "(1 - u) *\<^sub>R y + u *\<^sub>R (a + D *\<^sub>R (y - a)) \ s" and "0 \ u" "u \ 1" @@ -2113,7 +2509,7 @@ done } then have pdy: "path_component (- s) y (a + D *\<^sub>R (y - a))" - by (force simp: closed_segment_def intro!: path_connected_linepath) + by (force simp: closed_segment_def intro!: path_component_linepath) have pyx: "path_component (- s) (a + D *\<^sub>R (y - a)) (a + C *\<^sub>R (x - a))" apply (rule path_component_of_subset [of "sphere a B"]) using \s \ ball a B\ diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/Product_Topology.thy --- a/src/HOL/Analysis/Product_Topology.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/Product_Topology.thy Thu Mar 21 14:18:22 2019 +0000 @@ -1,15 +1,12 @@ +section\The binary product topology\ + theory Product_Topology imports Function_Topology begin -lemma subset_UnE: (*FIXME MOVE*) - assumes "C \ A \ B" - obtains A' B' where "A' \ A" "B' \ B" "C = A' \ B'" - by (metis assms Int_Un_distrib inf.order_iff inf_le2) - section \Product Topology\ -subsection\A binary product topology where the two types can be different.\ +subsection\Definition\ definition prod_topology :: "'a topology \ 'b topology \ ('a \ 'b) topology" where "prod_topology X Y \ topology (arbitrary union_of (\U. U \ {S \ T |S T. openin X S \ openin Y T}))" @@ -34,7 +31,7 @@ proof (rule topology_inverse') show "istopology (arbitrary union_of (\U. U \ {S \ T |S T. openin X S \ openin Y T}))" apply (rule istopology_base, simp) - by (metis openin_Int times_Int_times) + by (metis openin_Int Times_Int_Times) qed lemma topspace_prod_topology [simp]: @@ -62,7 +59,7 @@ proof - have "((\U. \S T. U = S \ T \ openin X S \ openin Y T) relative_to S \ T) = (\U. \S' T'. U = S' \ T' \ (openin X relative_to S) S' \ (openin Y relative_to T) T')" - by (auto simp: relative_to_def times_Int_times fun_eq_iff) metis + by (auto simp: relative_to_def Times_Int_Times fun_eq_iff) metis then show ?thesis by (simp add: topology_eq openin_prod_topology arbitrary_union_of_relative_to flip: openin_relative_to) qed @@ -81,7 +78,7 @@ lemma prod_topology_subtopology_eu [simp]: "prod_topology (subtopology euclidean S) (subtopology euclidean T) = subtopology euclidean (S \ T)" - by (simp add: prod_topology_subtopology subtopology_subtopology times_Int_times) + by (simp add: prod_topology_subtopology subtopology_subtopology Times_Int_Times) lemma continuous_map_subtopology_eu [simp]: "continuous_map (subtopology euclidean S) (subtopology euclidean T) h \ continuous_on S h \ h ` S \ T" @@ -128,6 +125,29 @@ "closedin (prod_topology X Y) (S \ T) \ S = {} \ T = {} \ closedin X S \ closedin Y T" by (auto simp: closure_of_Times times_eq_iff simp flip: closure_of_eq) +lemma interior_of_Times: "(prod_topology X Y) interior_of (S \ T) = (X interior_of S) \ (Y interior_of T)" +proof (rule interior_of_unique) + show "(X interior_of S) \ Y interior_of T \ S \ T" + by (simp add: Sigma_mono interior_of_subset) + show "openin (prod_topology X Y) ((X interior_of S) \ Y interior_of T)" + by (simp add: openin_Times) +next + show "T' \ (X interior_of S) \ Y interior_of T" if "T' \ S \ T" "openin (prod_topology X Y) T'" for T' + proof (clarsimp; intro conjI) + fix a :: "'a" and b :: "'b" + assume "(a, b) \ T'" + with that obtain U V where UV: "openin X U" "openin Y V" "a \ U" "b \ V" "U \ V \ T'" + by (metis openin_prod_topology_alt) + then show "a \ X interior_of S" + using interior_of_maximal_eq that(1) by fastforce + show "b \ Y interior_of T" + using UV interior_of_maximal_eq that(1) + by (metis SigmaI mem_Sigma_iff subset_eq) + qed +qed + +subsection \Continuity\ + lemma continuous_map_pairwise: "continuous_map Z (prod_topology X Y) f \ continuous_map Z X (fst \ f) \ continuous_map Z Y (snd \ f)" (is "?lhs = ?rhs") @@ -297,37 +317,6 @@ by (simp add: continuous_map_paired case_prod_unfold continuous_map_of_fst [unfolded o_def] continuous_map_of_snd [unfolded o_def]) qed -lemma homeomorphic_maps_prod: - "homeomorphic_maps (prod_topology X Y) (prod_topology X' Y') (\(x,y). (f x, g y)) (\(x,y). (f' x, g' y)) \ - topspace(prod_topology X Y) = {} \ - topspace(prod_topology X' Y') = {} \ - homeomorphic_maps X X' f f' \ - homeomorphic_maps Y Y' g g'" - unfolding homeomorphic_maps_def continuous_map_prod_top - by (auto simp: continuous_map_def homeomorphic_maps_def continuous_map_prod_top) - -lemma embedding_map_graph: - "embedding_map X (prod_topology X Y) (\x. (x, f x)) \ continuous_map X Y f" - (is "?lhs = ?rhs") -proof - assume L: ?lhs - have "snd \ (\x. (x, f x)) = f" - by force - moreover have "continuous_map X Y (snd \ (\x. (x, f x)))" - using L - unfolding embedding_map_def - by (meson continuous_map_in_subtopology continuous_map_snd_of homeomorphic_imp_continuous_map) - ultimately show ?rhs - by simp -next - assume R: ?rhs - then show ?lhs - unfolding homeomorphic_map_maps embedding_map_def homeomorphic_maps_def - by (rule_tac x=fst in exI) - (auto simp: continuous_map_in_subtopology continuous_map_paired continuous_map_from_subtopology - continuous_map_fst topspace_subtopology) -qed - lemma in_prod_topology_closure_of: assumes "z \ (prod_topology X Y) closure_of S" shows "fst z \ X closure_of (fst ` S)" "snd z \ Y closure_of (snd ` S)" @@ -412,7 +401,7 @@ then show ?case unfolding \_def \_def apply (simp add: Int_ac subset_eq image_def) - apply (metis (no_types) openin_Int openin_topspace times_Int_times) + apply (metis (no_types) openin_Int openin_topspace Times_Int_Times) done qed auto then show ?thesis @@ -450,10 +439,85 @@ using False by blast qed - lemma compactin_Times: "compactin (prod_topology X Y) (S \ T) \ S = {} \ T = {} \ compactin X S \ compactin Y T" by (auto simp: compactin_subspace subtopology_Times compact_space_prod_topology) +subsection\Homeomorphic maps\ + +lemma homeomorphic_maps_prod: + "homeomorphic_maps (prod_topology X Y) (prod_topology X' Y') (\(x,y). (f x, g y)) (\(x,y). (f' x, g' y)) \ + topspace(prod_topology X Y) = {} \ + topspace(prod_topology X' Y') = {} \ + homeomorphic_maps X X' f f' \ + homeomorphic_maps Y Y' g g'" + unfolding homeomorphic_maps_def continuous_map_prod_top + by (auto simp: continuous_map_def homeomorphic_maps_def continuous_map_prod_top) + +lemma embedding_map_graph: + "embedding_map X (prod_topology X Y) (\x. (x, f x)) \ continuous_map X Y f" + (is "?lhs = ?rhs") +proof + assume L: ?lhs + have "snd \ (\x. (x, f x)) = f" + by force + moreover have "continuous_map X Y (snd \ (\x. (x, f x)))" + using L + unfolding embedding_map_def + by (meson continuous_map_in_subtopology continuous_map_snd_of homeomorphic_imp_continuous_map) + ultimately show ?rhs + by simp +next + assume R: ?rhs + then show ?lhs + unfolding homeomorphic_map_maps embedding_map_def homeomorphic_maps_def + by (rule_tac x=fst in exI) + (auto simp: continuous_map_in_subtopology continuous_map_paired continuous_map_from_subtopology + continuous_map_fst topspace_subtopology) +qed + +lemma homeomorphic_space_prod_topology: + "\X homeomorphic_space X''; Y homeomorphic_space Y'\ + \ prod_topology X Y homeomorphic_space prod_topology X'' Y'" +using homeomorphic_maps_prod unfolding homeomorphic_space_def by blast + +lemma prod_topology_homeomorphic_space_left: + "topspace Y = {b} \ prod_topology X Y homeomorphic_space X" + unfolding homeomorphic_space_def + by (rule_tac x=fst in exI) (simp add: homeomorphic_map_def inj_on_def flip: homeomorphic_map_maps) + +lemma prod_topology_homeomorphic_space_right: + "topspace X = {a} \ prod_topology X Y homeomorphic_space Y" + unfolding homeomorphic_space_def + by (rule_tac x=snd in exI) (simp add: homeomorphic_map_def inj_on_def flip: homeomorphic_map_maps) + + +lemma homeomorphic_space_prod_topology_sing1: + "b \ topspace Y \ X homeomorphic_space (prod_topology X (subtopology Y {b}))" + by (metis empty_subsetI homeomorphic_space_sym inf.absorb_iff2 insert_subset prod_topology_homeomorphic_space_left topspace_subtopology) + +lemma homeomorphic_space_prod_topology_sing2: + "a \ topspace X \ Y homeomorphic_space (prod_topology (subtopology X {a}) Y)" + by (metis empty_subsetI homeomorphic_space_sym inf.absorb_iff2 insert_subset prod_topology_homeomorphic_space_right topspace_subtopology) + +lemma topological_property_of_prod_component: + assumes major: "P(prod_topology X Y)" + and X: "\x. \x \ topspace X; P(prod_topology X Y)\ \ P(subtopology (prod_topology X Y) ({x} \ topspace Y))" + and Y: "\y. \y \ topspace Y; P(prod_topology X Y)\ \ P(subtopology (prod_topology X Y) (topspace X \ {y}))" + and PQ: "\X X'. X homeomorphic_space X' \ (P X \ Q X')" + and PR: "\X X'. X homeomorphic_space X' \ (P X \ R X')" + shows "topspace(prod_topology X Y) = {} \ Q X \ R Y" +proof - + have "Q X \ R Y" if "topspace(prod_topology X Y) \ {}" + proof - + from that obtain a b where a: "a \ topspace X" and b: "b \ topspace Y" + by force + show ?thesis + using X [OF a major] and Y [OF b major] homeomorphic_space_prod_topology_sing1 [OF b, of X] homeomorphic_space_prod_topology_sing2 [OF a, of Y] + by (simp add: subtopology_Times) (meson PQ PR homeomorphic_space_prod_topology_sing2 homeomorphic_space_sym) + qed + then show ?thesis by metis +qed + end diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Analysis/T1_Spaces.thy --- a/src/HOL/Analysis/T1_Spaces.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Analysis/T1_Spaces.thy Thu Mar 21 14:18:22 2019 +0000 @@ -1,7 +1,7 @@ section\T1 spaces with equivalences to many naturally "nice" properties. \ theory T1_Spaces -imports Function_Topology +imports Product_Topology begin definition t1_space where @@ -198,4 +198,20 @@ using False by blast qed +lemma t1_space_prod_topology: + "t1_space(prod_topology X Y) \ topspace(prod_topology X Y) = {} \ t1_space X \ t1_space Y" +proof (cases "topspace (prod_topology X Y) = {}") + case True then show ?thesis + by (auto simp: t1_space_empty) +next + case False + have eq: "{(x,y)} = {x} \ {y}" for x y + by simp + have "t1_space (prod_topology X Y) \ (t1_space X \ t1_space Y)" + using False + by (force simp: t1_space_closedin_singleton closedin_Times eq simp del: insert_Times_insert) + with False show ?thesis + by simp +qed + end diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Library/FuncSet.thy --- a/src/HOL/Library/FuncSet.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Library/FuncSet.thy Thu Mar 21 14:18:22 2019 +0000 @@ -550,6 +550,11 @@ lemma PiE_eq_singleton: "(\\<^sub>E i\I. S i) = {\i\I. f i} \ (\i\I. S i = {f i})" by (metis (mono_tags, lifting) PiE_eq PiE_singleton insert_not_empty restrict_apply' restrict_extensional) +lemma PiE_over_singleton_iff: "(\\<^sub>E x\{a}. B x) = (\b \ B a. {\x \ {a}. b})" + apply (auto simp: PiE_iff split: if_split_asm) + apply (metis (no_types, lifting) extensionalityI restrict_apply' restrict_extensional singletonD) + done + lemma all_PiE_elements: "(\z \ PiE I S. \i \ I. P i (z i)) \ PiE I S = {} \ (\i \ I. \x \ S i. P i x)" (is "?lhs = ?rhs") proof (cases "PiE I S = {}") diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Product_Type.thy --- a/src/HOL/Product_Type.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Product_Type.thy Thu Mar 21 14:18:22 2019 +0000 @@ -1134,7 +1134,7 @@ by (cases "f x") (auto split: prod.split) qed -lemma times_Int_times: "A \ B \ C \ D = (A \ C) \ (B \ D)" +lemma Times_Int_Times: "A \ B \ C \ D = (A \ C) \ (B \ D)" by auto lemma product_swap: "prod.swap ` (A \ B) = B \ A" diff -r c15ee153dec1 -r 812ce526da33 src/HOL/Set.thy --- a/src/HOL/Set.thy Wed Mar 20 23:06:51 2019 +0100 +++ b/src/HOL/Set.thy Thu Mar 21 14:18:22 2019 +0000 @@ -1354,6 +1354,13 @@ lemma Diff_Int2: "A \ C - B \ C = A \ C - B" by blast +lemma subset_UnE: + assumes "C \ A \ B" + obtains A' B' where "A' \ A" "B' \ B" "C = A' \ B'" +proof + show "C \ A \ A" "C \ B \ B" "C = (C \ A) \ (C \ B)" + using assms by blast+ +qed text \\<^medskip> Set complement\ @@ -1594,6 +1601,9 @@ "\A P. (\(\x\A. P x)) \ (\x\A. \ P x)" by auto +lemma ex_image_cong_iff [simp, no_atp]: + "(\x. x\f`A) \ A \ {}" "(\x. x\f`A \ P x) \ (\x\A. P (f x))" + by auto subsubsection \Monotonicity of various operations\