# HG changeset patch # User paulson # Date 1555519708 -3600 # Node ID 4900351361b0df419fe1c413250918a9dbd68298 # Parent b67bab2b132c0f4f7f24b7b309516db920b1c5d1 Lindelöf spaces and supporting material diff -r b67bab2b132c -r 4900351361b0 src/HOL/Analysis/Abstract_Topology.thy --- a/src/HOL/Analysis/Abstract_Topology.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Analysis/Abstract_Topology.thy Wed Apr 17 17:48:28 2019 +0100 @@ -382,6 +382,10 @@ lemma closedin_topspace_empty: "topspace T = {} \ (closedin T S \ S = {})" by (simp add: closedin_def) +lemma open_in_topspace_empty: + "topspace X = {} \ openin X S \ S = {}" + by (simp add: openin_closedin_eq) + lemma openin_imp_subset: "openin (subtopology U S) T \ T \ S" by (metis Int_iff openin_subtopology subsetI) @@ -1756,6 +1760,26 @@ "open_map X1 X2 f \ f ` (topspace X1) \ topspace X2" unfolding open_map_def by (simp add: openin_subset) +lemma open_map_on_empty: + "topspace X = {} \ open_map X Y f" + by (metis empty_iff imageE in_mono open_map_def openin_subopen openin_subset) + +lemma closed_map_on_empty: + "topspace X = {} \ closed_map X Y f" + by (simp add: closed_map_def closedin_topspace_empty) + +lemma closed_map_const: + "closed_map X Y (\x. c) \ topspace X = {} \ closedin Y {c}" +proof (cases "topspace X = {}") + case True + then show ?thesis + by (simp add: closed_map_on_empty) +next + case False + then show ?thesis + by (auto simp: closed_map_def image_constant_conv) +qed + lemma open_map_imp_subset: "\open_map X1 X2 f; S \ topspace X1\ \ f ` S \ topspace X2" by (meson order_trans open_map_imp_subset_topspace subset_image_iff) @@ -3220,6 +3244,10 @@ unfolding compact_space_alt using openin_subset by fastforce +lemma compactinD: + "\compactin X S; \U. U \ \ \ openin X U; S \ \\\ \ \\. finite \ \ \ \ \ \ S \ \\" + by (auto simp: compactin_def) + lemma compactin_euclidean_iff [simp]: "compactin euclidean S \ compact S" by (simp add: compact_eq_Heine_Borel compactin_def) meson @@ -3229,7 +3257,7 @@ have eq: "(\U \ \. \Y. openin X Y \ U = Y \ S) \ \ \ (\Y. Y \ S) ` {y. openin X y}" for \ by auto show ?thesis - by (auto simp: compactin_def topspace_subtopology openin_subtopology eq imp_conjL all_subset_image exists_finite_subset_image) + by (auto simp: compactin_def topspace_subtopology openin_subtopology eq imp_conjL all_subset_image ex_finite_subset_image) qed lemma compactin_subspace: "compactin X S \ S \ topspace X \ compact_space (subtopology X S)" @@ -3411,7 +3439,7 @@ by (auto simp: \_def) moreover assume [unfolded compact_space_alt, rule_format, of \]: "compact_space X" ultimately obtain \ where \: "finite \" "\ \ \" "topspace X \ topspace X - \\" - by (auto simp: exists_finite_subset_image \_def) + by (auto simp: ex_finite_subset_image \_def) moreover have "\ \ {}" using \ \topspace X \ {}\ by blast ultimately show "False" @@ -3645,7 +3673,7 @@ "embedding_map X (subtopology Y S) f \ embedding_map X Y f \ f ` (topspace X) \ S" apply (auto simp: embedding_map_def subtopology_subtopology Int_absorb1) apply (metis (no_types) homeomorphic_imp_surjective_map subtopology_subtopology subtopology_topspace topspace_subtopology) - apply (simp add: continuous_map_def homeomorphic_eq_everything_map topspace_subtopology) + apply (simp add: continuous_map_def homeomorphic_eq_everything_map) done lemma injective_open_imp_embedding_map: @@ -3653,7 +3681,7 @@ unfolding embedding_map_def apply (rule bijective_open_imp_homeomorphic_map) using continuous_map_in_subtopology apply blast - apply (auto simp: continuous_map_in_subtopology open_map_into_subtopology topspace_subtopology continuous_map) + apply (auto simp: continuous_map_in_subtopology open_map_into_subtopology continuous_map) done lemma injective_closed_imp_embedding_map: @@ -3661,7 +3689,7 @@ unfolding embedding_map_def apply (rule bijective_closed_imp_homeomorphic_map) apply (simp_all add: continuous_map_into_subtopology closed_map_into_subtopology) - apply (simp add: continuous_map inf.absorb_iff2 topspace_subtopology) + apply (simp add: continuous_map inf.absorb_iff2) done lemma embedding_map_imp_homeomorphic_space: @@ -3669,6 +3697,11 @@ unfolding embedding_map_def using homeomorphic_space by blast +lemma embedding_imp_closed_map: + "\embedding_map X Y f; closedin Y (f ` topspace X)\ \ closed_map X Y f" + unfolding closed_map_def + by (auto simp: closedin_closed_subtopology embedding_map_def homeomorphic_map_closedness_eq) + subsection\Retraction and section maps\ @@ -4341,5 +4374,235 @@ ultimately show "g x \ topspace (pullback_topology A f T2)" unfolding topspace_pullback_topology by blast qed +subsection\Proper maps (not a priori assumed continuous) \ + +definition proper_map + where + "proper_map X Y f \ + closed_map X Y f \ (\y \ topspace Y. compactin X {x \ topspace X. f x = y})" + +lemma proper_imp_closed_map: + "proper_map X Y f \ closed_map X Y f" + by (simp add: proper_map_def) + +lemma proper_map_imp_subset_topspace: + "proper_map X Y f \ f ` (topspace X) \ topspace Y" + by (simp add: closed_map_imp_subset_topspace proper_map_def) + +lemma closed_injective_imp_proper_map: + assumes f: "closed_map X Y f" and inj: "inj_on f (topspace X)" + shows "proper_map X Y f" + unfolding proper_map_def +proof (clarsimp simp: f) + show "compactin X {x \ topspace X. f x = y}" + if "y \ topspace Y" for y + proof - + have "{x \ topspace X. f x = y} = {} \ (\a \ topspace X. {x \ topspace X. f x = y} = {a})" + using inj_on_eq_iff [OF inj] by auto + then show ?thesis + using that by (metis (no_types, lifting) compactin_empty compactin_sing) + qed +qed + +lemma injective_imp_proper_eq_closed_map: + "inj_on f (topspace X) \ (proper_map X Y f \ closed_map X Y f)" + using closed_injective_imp_proper_map proper_imp_closed_map by blast + +lemma homeomorphic_imp_proper_map: + "homeomorphic_map X Y f \ proper_map X Y f" + by (simp add: closed_injective_imp_proper_map homeomorphic_eq_everything_map) + +lemma compactin_proper_map_preimage: + assumes f: "proper_map X Y f" and "compactin Y K" + shows "compactin X {x. x \ topspace X \ f x \ K}" +proof - + have "f ` (topspace X) \ topspace Y" + by (simp add: f proper_map_imp_subset_topspace) + have *: "\y. y \ topspace Y \ compactin X {x \ topspace X. f x = y}" + using f by (auto simp: proper_map_def) + show ?thesis + unfolding compactin_def + proof clarsimp + show "\\. finite \ \ \ \ \ \ {x \ topspace X. f x \ K} \ \\" + if \: "\U\\. openin X U" and sub: "{x \ topspace X. f x \ K} \ \\" + for \ + proof - + have "\y \ K. \\. finite \ \ \ \ \ \ {x \ topspace X. f x = y} \ \\" + proof + fix y + assume "y \ K" + then have "compactin X {x \ topspace X. f x = y}" + by (metis "*" \compactin Y K\ compactin_subspace subsetD) + with \y \ K\ show "\\. finite \ \ \ \ \ \ {x \ topspace X. f x = y} \ \\" + unfolding compactin_def using \ sub by fastforce + qed + then obtain \ where \: "\y. y \ K \ finite (\ y) \ \ y \ \ \ {x \ topspace X. f x = y} \ \(\ y)" + by (metis (full_types)) + define F where "F \ \y. topspace Y - f ` (topspace X - \(\ y))" + have "\\. finite \ \ \ \ F ` K \ K \ \\" + proof (rule compactinD [OF \compactin Y K\]) + have "\x. x \ K \ closedin Y (f ` (topspace X - \(\ x)))" + using f unfolding proper_map_def closed_map_def + by (meson \ \ openin_Union openin_closedin_eq subsetD) + then show "openin Y U" if "U \ F ` K" for U + using that by (auto simp: F_def) + show "K \ \(F ` K)" + using \ \compactin Y K\ unfolding F_def compactin_def by fastforce + qed + then obtain J where "finite J" "J \ K" and J: "K \ \(F ` J)" + by (auto simp: ex_finite_subset_image) + show ?thesis + unfolding F_def + proof (intro exI conjI) + show "finite (\(\ ` J))" + using \ \J \ K\ \finite J\ by blast + show "\(\ ` J) \ \" + using \ \J \ K\ by blast + show "{x \ topspace X. f x \ K} \ \(\(\ ` J))" + using J \J \ K\ unfolding F_def by auto + qed + qed + qed +qed + + +lemma compact_space_proper_map_preimage: + assumes f: "proper_map X Y f" and fim: "f ` (topspace X) = topspace Y" and "compact_space Y" + shows "compact_space X" +proof - + have eq: "topspace X = {x \ topspace X. f x \ topspace Y}" + using fim by blast + moreover have "compactin Y (topspace Y)" + using \compact_space Y\ compact_space_def by auto + ultimately show ?thesis + unfolding compact_space_def + using eq f compactin_proper_map_preimage by fastforce +qed + +lemma proper_map_alt: + "proper_map X Y f \ + closed_map X Y f \ (\K. compactin Y K \ compactin X {x. x \ topspace X \ f x \ K})" + proof (intro iffI conjI allI impI) + show "compactin X {x \ topspace X. f x \ K}" + if "proper_map X Y f" and "compactin Y K" for K + using that by (simp add: compactin_proper_map_preimage) + show "proper_map X Y f" + if f: "closed_map X Y f \ (\K. compactin Y K \ compactin X {x \ topspace X. f x \ K})" + proof - + have "compactin X {x \ topspace X. f x = y}" if "y \ topspace Y" for y + proof - + have "compactin X {x \ topspace X. f x \ {y}}" + using f compactin_sing that by fastforce + then show ?thesis + by auto + qed + with f show ?thesis + by (auto simp: proper_map_def) + qed +qed (simp add: proper_imp_closed_map) + +lemma proper_map_on_empty: + "topspace X = {} \ proper_map X Y f" + by (auto simp: proper_map_def closed_map_on_empty) + +lemma proper_map_id [simp]: + "proper_map X X id" +proof (clarsimp simp: proper_map_alt closed_map_id) + fix K + assume K: "compactin X K" + then have "{a \ topspace X. a \ K} = K" + by (simp add: compactin_subspace subset_antisym subset_iff) + then show "compactin X {a \ topspace X. a \ K}" + using K by auto +qed + +lemma proper_map_compose: + assumes "proper_map X Y f" "proper_map Y Z g" + shows "proper_map X Z (g \ f)" +proof - + have "closed_map X Y f" and f: "\K. compactin Y K \ compactin X {x \ topspace X. f x \ K}" + and "closed_map Y Z g" and g: "\K. compactin Z K \ compactin Y {x \ topspace Y. g x \ K}" + using assms by (auto simp: proper_map_alt) + show ?thesis + unfolding proper_map_alt + proof (intro conjI allI impI) + show "closed_map X Z (g \ f)" + using \closed_map X Y f\ \closed_map Y Z g\ closed_map_compose by blast + have "{x \ topspace X. g (f x) \ K} = {x \ topspace X. f x \ {b \ topspace Y. g b \ K}}" for K + using \closed_map X Y f\ closed_map_imp_subset_topspace by blast + then show "compactin X {x \ topspace X. (g \ f) x \ K}" + if "compactin Z K" for K + using f [OF g [OF that]] by auto + qed +qed + +lemma proper_map_const: + "proper_map X Y (\x. c) \ compact_space X \ (topspace X = {} \ closedin Y {c})" +proof (cases "topspace X = {}") + case True + then show ?thesis + by (simp add: compact_space_topspace_empty proper_map_on_empty) +next + case False + have *: "compactin X {x \ topspace X. c = y}" if "compact_space X" for y + proof (cases "c = y") + case True + then show ?thesis + using compact_space_def \compact_space X\ by auto + qed auto + then show ?thesis + using closed_compactin closedin_subset + by (force simp: False proper_map_def closed_map_const compact_space_def) +qed + +lemma proper_map_inclusion: + "s \ topspace X + \ proper_map (subtopology X s) X id \ closedin X s \ (\k. compactin X k \ compactin X (s \ k))" + by (auto simp: proper_map_alt closed_map_inclusion_eq inf.absorb_iff2 Collect_conj_eq compactin_subtopology intro: closed_Int_compactin) + + +subsection\Perfect maps (proper, continuous and surjective)\ + +definition perfect_map + where "perfect_map X Y f \ continuous_map X Y f \ proper_map X Y f \ f ` (topspace X) = topspace Y" + +lemma homeomorphic_imp_perfect_map: + "homeomorphic_map X Y f \ perfect_map X Y f" + by (simp add: homeomorphic_eq_everything_map homeomorphic_imp_proper_map perfect_map_def) + +lemma perfect_imp_quotient_map: + "perfect_map X Y f \ quotient_map X Y f" + by (simp add: continuous_closed_imp_quotient_map perfect_map_def proper_map_def) + +lemma homeomorphic_eq_injective_perfect_map: + "homeomorphic_map X Y f \ perfect_map X Y f \ inj_on f (topspace X)" + using homeomorphic_imp_perfect_map homeomorphic_map_def perfect_imp_quotient_map by blast + +lemma perfect_injective_eq_homeomorphic_map: + "perfect_map X Y f \ inj_on f (topspace X) \ homeomorphic_map X Y f" + by (simp add: homeomorphic_eq_injective_perfect_map) + +lemma perfect_map_id [simp]: "perfect_map X X id" + by (simp add: homeomorphic_imp_perfect_map) + +lemma perfect_map_compose: + "\perfect_map X Y f; perfect_map Y Z g\ \ perfect_map X Z (g \ f)" + by (meson continuous_map_compose perfect_imp_quotient_map perfect_map_def proper_map_compose quotient_map_compose_eq quotient_map_def) + +lemma perfect_imp_continuous_map: + "perfect_map X Y f \ continuous_map X Y f" + using perfect_map_def by blast + +lemma perfect_imp_closed_map: + "perfect_map X Y f \ closed_map X Y f" + by (simp add: perfect_map_def proper_map_def) + +lemma perfect_imp_proper_map: + "perfect_map X Y f \ proper_map X Y f" + by (simp add: perfect_map_def) + +lemma perfect_imp_surjective_map: + "perfect_map X Y f \ f ` (topspace X) = topspace Y" + by (simp add: perfect_map_def) end diff -r b67bab2b132c -r 4900351361b0 src/HOL/Analysis/Abstract_Topology_2.thy --- a/src/HOL/Analysis/Abstract_Topology_2.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Analysis/Abstract_Topology_2.thy Wed Apr 17 17:48:28 2019 +0100 @@ -1107,7 +1107,7 @@ "\connected T; S retract_of T\ \ connected S" by (metis Topological_Spaces.connected_continuous_image retract_of_def retraction) -lemma retraction_imp_quotient_map: +lemma retraction_openin_vimage_iff: "openin (top_of_set S) (S \ r -` U) \ openin (top_of_set T) U" if retraction: "retraction S T r" and "U \ T" using retraction apply (rule retractionE) diff -r b67bab2b132c -r 4900351361b0 src/HOL/Analysis/Analysis.thy --- a/src/HOL/Analysis/Analysis.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Analysis/Analysis.thy Wed Apr 17 17:48:28 2019 +0100 @@ -29,7 +29,7 @@ Bounded_Continuous_Function Abstract_Topology Product_Topology - T1_Spaces + Lindelof_Spaces Infinite_Products Infinite_Set_Sum Weierstrass_Theorems diff -r b67bab2b132c -r 4900351361b0 src/HOL/Analysis/Function_Topology.thy --- a/src/HOL/Analysis/Function_Topology.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Analysis/Function_Topology.thy Wed Apr 17 17:48:28 2019 +0100 @@ -1410,7 +1410,7 @@ ultimately obtain \' where "finite \'" "\' \ \'" "U \ \\'" using fin [of \'] \topspace X = U\ \U \ \\\ by blast then show ?thesis - unfolding \' exists_finite_subset_image \topspace X = U\ by auto + unfolding \' ex_finite_subset_image \topspace X = U\ by auto qed show ?thesis apply (rule Alexander_subbase [where \ = "Collect ((\x. x \ \) relative_to (topspace X))"]) diff -r b67bab2b132c -r 4900351361b0 src/HOL/Analysis/Lindelof_Spaces.thy --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/HOL/Analysis/Lindelof_Spaces.thy Wed Apr 17 17:48:28 2019 +0100 @@ -0,0 +1,274 @@ +section\Lindelof spaces\ + +theory Lindelof_Spaces +imports T1_Spaces +begin + +definition Lindelof_space where + "Lindelof_space X \ + \\. (\U \ \. openin X U) \ \\ = topspace X + \ (\\. countable \ \ \ \ \ \ \\ = topspace X)" + +lemma Lindelof_spaceD: + "\Lindelof_space X; \U. U \ \ \ openin X U; \\ = topspace X\ + \ \\. countable \ \ \ \ \ \ \\ = topspace X" + by (auto simp: Lindelof_space_def) + +lemma Lindelof_space_alt: + "Lindelof_space X \ + (\\. (\U \ \. openin X U) \ topspace X \ \\ + \ (\\. countable \ \ \ \ \ \ topspace X \ \\))" + unfolding Lindelof_space_def + using openin_subset by fastforce + +lemma compact_imp_Lindelof_space: + "compact_space X \ Lindelof_space X" + unfolding Lindelof_space_def compact_space + by (meson uncountable_infinite) + +lemma Lindelof_space_topspace_empty: + "topspace X = {} \ Lindelof_space X" + using compact_imp_Lindelof_space compact_space_topspace_empty by blast + +lemma Lindelof_space_Union: + assumes \: "countable \" and lin: "\U. U \ \ \ Lindelof_space (subtopology X U)" + shows "Lindelof_space (subtopology X (\\))" +proof - + have "\\. countable \ \ \ \ \ \ \\ \ \\ = topspace X \ \\" + if \: "\ \ Collect (openin X)" and UF: "\\ \ \\ = topspace X \ \\" + for \ + proof - + have "\U. \U \ \; U \ \\ = topspace X \ U\ + \ \\. countable \ \ \ \ \ \ U \ \\ = topspace X \ U" + using lin \ + unfolding Lindelof_space_def openin_subtopology_alt Ball_def subset_iff [symmetric] + by (simp add: all_subset_image imp_conjL ex_countable_subset_image) + then obtain g where g: "\U. \U \ \; U \ \\ = topspace X \ U\ + \ countable (g U) \ (g U) \ \ \ U \ \(g U) = topspace X \ U" + by metis + show ?thesis + proof (intro exI conjI) + show "countable (\(g ` \))" + using Int_commute UF g by (fastforce intro: countable_UN [OF \]) + show "\(g ` \) \ \" + using g UF by blast + show "\\ \ \(\(g ` \)) = topspace X \ \\" + proof + show "\\ \ \(\(g ` \)) \ topspace X \ \\" + using g UF by blast + show "topspace X \ \\ \ \\ \ \(\(g ` \))" + proof clarsimp + show "\y\\. \W\g y. x \ W" + if "x \ topspace X" "x \ V" "V \ \" for x V + proof - + have "V \ \\ = topspace X \ V" + using UF \V \ \\ by blast + with that g [OF \V \ \\] show ?thesis by blast + qed + qed + qed + qed + qed + then show ?thesis + unfolding Lindelof_space_def openin_subtopology_alt Ball_def subset_iff [symmetric] + by (simp add: all_subset_image imp_conjL ex_countable_subset_image) +qed + +lemma countable_imp_Lindelof_space: + assumes "countable(topspace X)" + shows "Lindelof_space X" +proof - + have "Lindelof_space (subtopology X (\x \ topspace X. {x}))" + proof (rule Lindelof_space_Union) + show "countable ((\x. {x}) ` topspace X)" + using assms by blast + show "Lindelof_space (subtopology X U)" + if "U \ (\x. {x}) ` topspace X" for U + proof - + have "compactin X U" + using that by force + then show ?thesis + by (meson compact_imp_Lindelof_space compact_space_subtopology) + qed + qed + then show ?thesis + by simp +qed +lemma Lindelof_space_subtopology: + "Lindelof_space(subtopology X S) \ + (\\. (\U \ \. openin X U) \ topspace X \ S \ \\ + \ (\V. countable V \ V \ \ \ topspace X \ S \ \V))" +proof - + have *: "(S \ \\ = topspace X \ S) = (topspace X \ S \ \\)" + if "\x. x \ \ \ openin X x" for \ + by (blast dest: openin_subset [OF that]) + moreover have "(\ \ \ \ S \ \\ = topspace X \ S) = (\ \ \ \ topspace X \ S \ \\)" + if "\x. x \ \ \ openin X x" "topspace X \ S \ \\" "countable \" for \ \ + using that * by blast + ultimately show ?thesis + unfolding Lindelof_space_def openin_subtopology_alt Ball_def + apply (simp add: all_subset_image imp_conjL ex_countable_subset_image flip: subset_iff) + apply (intro all_cong1 imp_cong ex_cong, auto) + done +qed + +lemma Lindelof_space_subtopology_subset: + "S \ topspace X + \ (Lindelof_space(subtopology X S) \ + (\\. (\U \ \. openin X U) \ S \ \\ + \ (\V. countable V \ V \ \ \ S \ \V)))" + by (metis Lindelof_space_subtopology topspace_subtopology topspace_subtopology_subset) + +lemma Lindelof_space_closedin_subtopology: + assumes X: "Lindelof_space X" and clo: "closedin X S" + shows "Lindelof_space (subtopology X S)" +proof - + have "S \ topspace X" + by (simp add: clo closedin_subset) + then show ?thesis + proof (clarsimp simp add: Lindelof_space_subtopology_subset) + show "\V. countable V \ V \ \ \ S \ \V" + if "\U\\. openin X U" and "S \ \\" for \ + proof - + have "\\. countable \ \ \ \ insert (topspace X - S) \ \ \\ = topspace X" + proof (rule Lindelof_spaceD [OF X, of "insert (topspace X - S) \"]) + show "openin X U" + if "U \ insert (topspace X - S) \" for U + using that \\U\\. openin X U\ clo by blast + show "\(insert (topspace X - S) \) = topspace X" + apply auto + apply (meson in_mono openin_closedin_eq that(1)) + using UnionE \S \ \\\ by auto + qed + then obtain \ where "countable \" "\ \ insert (topspace X - S) \" "\\ = topspace X" + by metis + with \S \ topspace X\ + show ?thesis + by (rule_tac x="(\ - {topspace X - S})" in exI) auto + qed + qed +qed + +lemma Lindelof_space_continuous_map_image: + assumes X: "Lindelof_space X" and f: "continuous_map X Y f" and fim: "f ` (topspace X) = topspace Y" + shows "Lindelof_space Y" +proof - + have "\\. countable \ \ \ \ \ \ \\ = topspace Y" + if \: "\U. U \ \ \ openin Y U" and UU: "\\ = topspace Y" for \ + proof - + define \ where "\ \ (\U. {x \ topspace X. f x \ U}) ` \" + have "\V. V \ \ \ openin X V" + unfolding \_def using \ continuous_map f by fastforce + moreover have "\\ = topspace X" + unfolding \_def using UU fim by fastforce + ultimately have "\\. countable \ \ \ \ \ \ \\ = topspace X" + using X by (simp add: Lindelof_space_def) + then obtain \ where "countable \" "\ \ \" and \: "(\U\\. {x \ topspace X. f x \ U}) = topspace X" + by (metis (no_types, lifting) \_def countable_subset_image) + moreover have "\\ = topspace Y" + proof + show "\\ \ topspace Y" + using UU \ \\ \ \\ by fastforce + have "y \ \\" if "y \ topspace Y" for y + proof - + obtain x where "x \ topspace X" "y = f x" + using that fim by (metis \y \ topspace Y\ imageE) + with \ show ?thesis by auto + qed + then show "topspace Y \ \\" by blast + qed + ultimately show ?thesis + by blast + qed + then show ?thesis + unfolding Lindelof_space_def + by auto +qed + +lemma Lindelof_space_quotient_map_image: + "\quotient_map X Y q; Lindelof_space X\ \ Lindelof_space Y" + by (meson Lindelof_space_continuous_map_image quotient_imp_continuous_map quotient_imp_surjective_map) + +lemma Lindelof_space_retraction_map_image: + "\retraction_map X Y r; Lindelof_space X\ \ Lindelof_space Y" + using Abstract_Topology.retraction_imp_quotient_map Lindelof_space_quotient_map_image by blast + +lemma locally_finite_cover_of_Lindelof_space: + assumes X: "Lindelof_space X" and UU: "topspace X \ \\" and fin: "locally_finite_in X \" + shows "countable \" +proof - + have UU_eq: "\\ = topspace X" + by (meson UU fin locally_finite_in_def subset_antisym) + obtain T where T: "\x. x \ topspace X \ openin X (T x) \ x \ T x \ finite {U \ \. U \ T x \ {}}" + using fin unfolding locally_finite_in_def by meson + then obtain I where "countable I" "I \ topspace X" and I: "topspace X \ \(T ` I)" + using X unfolding Lindelof_space_alt + by (drule_tac x="image T (topspace X)" in spec) (auto simp: ex_countable_subset_image) + show ?thesis + proof (rule countable_subset) + have "\i. i \ I \ countable {U \ \. U \ T i \ {}}" + using T + by (meson \I \ topspace X\ in_mono uncountable_infinite) + then show "countable (insert {} (\i\I. {U \ \. U \ T i \ {}}))" + by (simp add: \countable I\) + qed (use UU_eq I in auto) +qed + + +lemma Lindelof_space_proper_map_preimage: + assumes f: "proper_map X Y f" and Y: "Lindelof_space Y" + shows "Lindelof_space X" +proof (clarsimp simp: Lindelof_space_alt) + show "\\. countable \ \ \ \ \ \ topspace X \ \\" + if \: "\U\\. openin X U" and sub_UU: "topspace X \ \\" for \ + proof - + have "\\. finite \ \ \ \ \ \ {x \ topspace X. f x = y} \ \\" if "y \ topspace Y" for y + proof (rule compactinD) + show "compactin X {x \ topspace X. f x = y}" + using f proper_map_def that by fastforce + qed (use sub_UU \ in auto) + then obtain \ where \: "\y. y \ topspace Y \ finite (\ y) \ \ y \ \ \ {x \ topspace X. f x = y} \ \(\ y)" + by meson + define \ where "\ \ (\y. topspace Y - image f (topspace X - \(\ y))) ` topspace Y" + have "\U \ \. openin Y U" + using f \ \ unfolding \_def proper_map_def closed_map_def + by (simp add: closedin_diff openin_Union openin_diff subset_iff) + moreover have "topspace Y \ \\" + using \ unfolding \_def by clarsimp fastforce + ultimately have "\\. countable \ \ \ \ \ \ topspace Y \ \\" + using Y by (simp add: Lindelof_space_alt) + then obtain I where "countable I" "I \ topspace Y" + and I: "topspace Y \ (\i\I. topspace Y - f ` (topspace X - \(\ i)))" + unfolding \_def ex_countable_subset_image by metis + show ?thesis + proof (intro exI conjI) + have "\i. i \ I \ countable (\ i)" + by (meson \ \I \ topspace Y\ in_mono uncountable_infinite) + with \countable I\ show "countable (\(\ ` I))" + by auto + show "\(\ ` I) \ \" + using \ \I \ topspace Y\ by fastforce + show "topspace X \ \(\(\ ` I))" + proof + show "x \ \ (\ (\ ` I))" if "x \ topspace X" for x + proof - + have "f x \ topspace Y" + by (meson f image_subset_iff proper_map_imp_subset_topspace that) + then show ?thesis + using that I by auto + qed + qed + qed + qed +qed + +lemma Lindelof_space_perfect_map_image: + "\Lindelof_space X; perfect_map X Y f\ \ Lindelof_space Y" + using Lindelof_space_quotient_map_image perfect_imp_quotient_map by blast + +lemma Lindelof_space_perfect_map_image_eq: + "perfect_map X Y f \ Lindelof_space X \ Lindelof_space Y" + using Lindelof_space_perfect_map_image Lindelof_space_proper_map_preimage perfect_map_def by blast + +end + diff -r b67bab2b132c -r 4900351361b0 src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Analysis/Path_Connected.thy Wed Apr 17 17:48:28 2019 +0100 @@ -2109,6 +2109,14 @@ by (metis Int_absorb1 mem_Collect_eq path_component_of_equiv path_component_of_subset_topspace topspace_subtopology) qed +lemma path_connectedin_euclidean [simp]: + "path_connectedin euclidean S \ path_connected S" + by (auto simp: path_connectedin_def path_connected_space_iff_path_component path_connected_component) + +lemma path_connected_space_euclidean_subtopology [simp]: + "path_connected_space(subtopology euclidean S) \ path_connected S" + using path_connectedin_topspace by force + lemma Union_path_components_of: "\(path_components_of X) = topspace X" by (auto simp: path_components_of_def path_component_of_equiv) diff -r b67bab2b132c -r 4900351361b0 src/HOL/Analysis/Product_Topology.thy --- a/src/HOL/Analysis/Product_Topology.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Analysis/Product_Topology.thy Wed Apr 17 17:48:28 2019 +0100 @@ -455,6 +455,15 @@ unfolding homeomorphic_maps_def continuous_map_prod_top by (auto simp: continuous_map_def homeomorphic_maps_def continuous_map_prod_top) +lemma homeomorphic_maps_swap: + "homeomorphic_maps (prod_topology X Y) (prod_topology Y X) + (\(x,y). (y,x)) (\(y,x). (x,y))" + by (auto simp: homeomorphic_maps_def case_prod_unfold continuous_map_fst continuous_map_pairedI continuous_map_snd) + +lemma homeomorphic_map_swap: + "homeomorphic_map (prod_topology X Y) (prod_topology Y X) (\(x,y). (y,x))" + using homeomorphic_map_maps homeomorphic_maps_swap by metis + lemma embedding_map_graph: "embedding_map X (prod_topology X Y) (\x. (x, f x)) \ continuous_map X Y f" (is "?lhs = ?rhs") @@ -474,7 +483,7 @@ 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) + continuous_map_fst) qed lemma homeomorphic_space_prod_topology: diff -r b67bab2b132c -r 4900351361b0 src/HOL/Analysis/T1_Spaces.thy --- a/src/HOL/Analysis/T1_Spaces.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Analysis/T1_Spaces.thy Wed Apr 17 17:48:28 2019 +0100 @@ -475,6 +475,37 @@ by (simp add: topology_eq) qed +lemma continuous_map_imp_closed_graph: + assumes f: "continuous_map X Y f" and Y: "Hausdorff_space Y" + shows "closedin (prod_topology X Y) ((\x. (x,f x)) ` topspace X)" + unfolding closedin_def +proof + show "(\x. (x, f x)) ` topspace X \ topspace (prod_topology X Y)" + using continuous_map_def f by fastforce + show "openin (prod_topology X Y) (topspace (prod_topology X Y) - (\x. (x, f x)) ` topspace X)" + unfolding openin_prod_topology_alt + proof (intro allI impI) + show "\U V. openin X U \ openin Y V \ x \ U \ y \ V \ U \ V \ topspace (prod_topology X Y) - (\x. (x, f x)) ` topspace X" + if "(x,y) \ topspace (prod_topology X Y) - (\x. (x, f x)) ` topspace X" + for x y + proof - + have "x \ topspace X" "y \ topspace Y" "y \ f x" + using that by auto + moreover have "f x \ topspace Y" + by (meson \x \ topspace X\ continuous_map_def f) + ultimately obtain U V where UV: "openin Y U" "openin Y V" "f x \ U" "y \ V" "disjnt U V" + using Y Hausdorff_space_def by metis + show ?thesis + proof (intro exI conjI) + show "openin X {x \ topspace X. f x \ U}" + using \openin Y U\ f openin_continuous_map_preimage by blast + show "{x \ topspace X. f x \ U} \ V \ topspace (prod_topology X Y) - (\x. (x, f x)) ` topspace X" + using UV by (auto simp: disjnt_iff dest: openin_subset) + qed (use UV \x \ topspace X\ in auto) + qed + qed +qed + lemma continuous_imp_closed_map: "\compact_space X; Hausdorff_space Y; continuous_map X Y f\ \ closed_map X Y f" by (meson closed_map_def closedin_compact_space compactin_imp_closedin image_compactin) @@ -529,8 +560,39 @@ qed qed +lemma closed_map_paired_continuous_map_right: + "\continuous_map X Y f; Hausdorff_space Y\ \ closed_map X (prod_topology X Y) (\x. (x,f x))" + by (simp add: continuous_map_imp_closed_graph embedding_map_graph embedding_imp_closed_map) -lemma Hausdorff_space_euclidean: "Hausdorff_space (euclidean :: 'a::metric_space topology)" +lemma closed_map_paired_continuous_map_left: + assumes f: "continuous_map X Y f" and Y: "Hausdorff_space Y" + shows "closed_map X (prod_topology Y X) (\x. (f x,x))" +proof - + have eq: "(\x. (f x,x)) = (\(a,b). (b,a)) \ (\x. (x,f x))" + by auto + show ?thesis + unfolding eq + proof (rule closed_map_compose) + show "closed_map X (prod_topology X Y) (\x. (x, f x))" + using Y closed_map_paired_continuous_map_right f by blast + show "closed_map (prod_topology X Y) (prod_topology Y X) (\(a, b). (b, a))" + by (metis homeomorphic_map_swap homeomorphic_imp_closed_map) + qed +qed + +lemma proper_map_paired_continuous_map_right: + "\continuous_map X Y f; Hausdorff_space Y\ + \ proper_map X (prod_topology X Y) (\x. (x,f x))" + using closed_injective_imp_proper_map closed_map_paired_continuous_map_right + by (metis (mono_tags, lifting) Pair_inject inj_onI) + +lemma proper_map_paired_continuous_map_left: + "\continuous_map X Y f; Hausdorff_space Y\ + \ proper_map X (prod_topology Y X) (\x. (f x,x))" + using closed_injective_imp_proper_map closed_map_paired_continuous_map_left + by (metis (mono_tags, lifting) Pair_inject inj_onI) + +lemma Hausdorff_space_euclidean [simp]: "Hausdorff_space (euclidean :: 'a::metric_space topology)" proof - have "\U V. open U \ open V \ x \ U \ y \ V \ disjnt U V" if "x \ y" diff -r b67bab2b132c -r 4900351361b0 src/HOL/Finite_Set.thy --- a/src/HOL/Finite_Set.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Finite_Set.thy Wed Apr 17 17:48:28 2019 +0100 @@ -334,7 +334,7 @@ using finite_subset_image [OF B] P by blast qed blast -lemma exists_finite_subset_image: +lemma ex_finite_subset_image: "(\B. finite B \ B \ f ` A \ P B) \ (\B. finite B \ B \ A \ P (f ` B))" proof safe fix B :: "'a set" diff -r b67bab2b132c -r 4900351361b0 src/HOL/Homology/Simplices.thy --- a/src/HOL/Homology/Simplices.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Homology/Simplices.thy Wed Apr 17 17:48:28 2019 +0100 @@ -2411,7 +2411,7 @@ using compactin_standard_simplex [of p] unfolding compactin_def by force then obtain S where "finite S" and ssp: "S \ standard_simplex p" "standard_simplex p \ \(F ` S)" - unfolding exists_finite_subset_image by (auto simp: exists_finite_subset_image) + unfolding ex_finite_subset_image by (auto simp: ex_finite_subset_image) then have "S \ {}" by (auto simp: nonempty_standard_simplex) show ?thesis diff -r b67bab2b132c -r 4900351361b0 src/HOL/Library/Countable_Set.thy --- a/src/HOL/Library/Countable_Set.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Library/Countable_Set.thy Wed Apr 17 17:48:28 2019 +0100 @@ -195,6 +195,23 @@ lemma countable_image_inj_on: "countable (f ` A) \ inj_on f A \ countable A" by (metis countable_image the_inv_into_onto) +lemma countable_image_inj_Int_vimage: + "\inj_on f S; countable A\ \ countable (S \ f -` A)" + by (meson countable_image_inj_on countable_subset image_subset_iff_subset_vimage inf_le2 inj_on_Int) + +lemma countable_image_inj_gen: + "\inj_on f S; countable A\ \ countable {x \ S. f x \ A}" + using countable_image_inj_Int_vimage + by (auto simp: vimage_def Collect_conj_eq) + +lemma countable_image_inj_eq: + "inj_on f S \ countable(f ` S) \ countable S" + using countable_image_inj_on by blast + +lemma countable_image_inj: + "\countable A; inj f\ \ countable {x. f x \ A}" + by (metis (mono_tags, lifting) countable_image_inj_eq countable_subset image_Collect_subsetI inj_on_inverseI the_inv_f_f) + lemma countable_UN[intro, simp]: fixes I :: "'i set" and A :: "'i => 'a set" assumes I: "countable I" @@ -320,6 +337,39 @@ then show ?lhs by force qed +lemma ex_subset_image_inj: + "(\T. T \ f ` S \ P T) \ (\T. T \ S \ inj_on f T \ P (f ` T))" + by (auto simp: subset_image_inj) + +lemma all_subset_image_inj: + "(\T. T \ f ` S \ P T) \ (\T. T \ S \ inj_on f T \ P(f ` T))" + by (metis subset_image_inj) + +lemma ex_countable_subset_image_inj: + "(\T. countable T \ T \ f ` S \ P T) \ + (\T. countable T \ T \ S \ inj_on f T \ P (f ` T))" + by (metis countable_image_inj_eq subset_image_inj) + +lemma all_countable_subset_image_inj: + "(\T. countable T \ T \ f ` S \ P T) \ (\T. countable T \ T \ S \ inj_on f T \P(f ` T))" + by (metis countable_image_inj_eq subset_image_inj) + +lemma ex_countable_subset_image: + "(\T. countable T \ T \ f ` S \ P T) \ (\T. countable T \ T \ S \ P (f ` T))" + by (metis countable_subset_image) + +lemma all_countable_subset_image: + "(\T. countable T \ T \ f ` S \ P T) \ (\T. countable T \ T \ S \ P(f ` T))" + by (metis countable_subset_image) + +lemma countable_image_eq: + "countable(f ` S) \ (\T. countable T \ T \ S \ f ` S = f ` T)" + by (metis countable_image countable_image_inj_eq order_refl subset_image_inj) + +lemma countable_image_eq_inj: + "countable(f ` S) \ (\T. countable T \ T \ S \ f ` S = f ` T \ inj_on f T)" + by (metis countable_image_inj_eq order_refl subset_image_inj) + lemma infinite_countable_subset': assumes X: "infinite X" shows "\C\X. countable C \ infinite C" proof - diff -r b67bab2b132c -r 4900351361b0 src/HOL/Library/Infinite_Set.thy --- a/src/HOL/Library/Infinite_Set.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Library/Infinite_Set.thy Wed Apr 17 17:48:28 2019 +0100 @@ -8,6 +8,27 @@ imports Main begin +lemma subset_image_inj: + "S \ f ` T \ (\U. U \ T \ inj_on f U \ S = f ` U)" +proof safe + show "\U\T. inj_on f U \ S = f ` U" + if "S \ f ` T" + proof - + from that [unfolded subset_image_iff subset_iff] + obtain g where g: "\x. x \ S \ g x \ T \ x = f (g x)" + unfolding image_iff by metis + show ?thesis + proof (intro exI conjI) + show "g ` S \ T" + by (simp add: g image_subsetI) + show "inj_on f (g ` S)" + using g by (auto simp: inj_on_def) + show "S = f ` (g ` S)" + using g image_subset_iff by auto + qed + qed +qed blast + subsection \The set of natural numbers is infinite\ lemma infinite_nat_iff_unbounded_le: "infinite S \ (\m. \n\m. n \ S)"