diff -r 19c617950a8e -r 6bae28577994 src/HOL/Analysis/Abstract_Topology.thy --- a/src/HOL/Analysis/Abstract_Topology.thy Wed Jul 12 23:11:59 2023 +0100 +++ b/src/HOL/Analysis/Abstract_Topology.thy Sat Jul 15 23:34:42 2023 +0100 @@ -227,6 +227,10 @@ "X = discrete_topology {a} \ topspace X = {a}" by (metis discrete_topology_unique openin_topspace singletonD) +abbreviation trivial_topology where "trivial_topology \ discrete_topology {}" + +lemma null_topspace_iff_trivial [simp]: "topspace X = {} \ X = trivial_topology" + by (simp add: subtopology_eq_discrete_topology_empty) subsection \Subspace topology\ @@ -316,6 +320,9 @@ unfolding openin_subtopology by auto (metis IntD1 in_mono openin_subset) +lemma subtopology_trivial_iff: "subtopology X S = trivial_topology \ X = trivial_topology \ topspace X \ S = {}" + by (auto simp flip: null_topspace_iff_trivial) + lemma subtopology_subtopology: "subtopology (subtopology X S) T = subtopology X (S \ T)" proof - @@ -356,6 +363,9 @@ lemma subtopology_UNIV[simp]: "subtopology U UNIV = U" by (simp add: subtopology_superset) +lemma subtopology_empty_iff_trivial [simp]: "subtopology X {} = trivial_topology" + by (simp add: subtopology_eq_discrete_topology_empty) + lemma subtopology_restrict: "subtopology X (topspace X \ S) = subtopology X S" by (metis subtopology_subtopology subtopology_topspace) @@ -372,11 +382,11 @@ "closedin (subtopology U X) X \ X \ topspace U" by (metis closedin_def closedin_topspace inf.absorb_iff2 le_inf_iff topspace_subtopology) -lemma closedin_topspace_empty: "topspace T = {} \ (closedin T S \ S = {})" +lemma closedin_topspace_empty [simp]: "closedin trivial_topology S \ S = {}" by (simp add: closedin_def) -lemma open_in_topspace_empty: - "topspace X = {} \ openin X S \ S = {}" +lemma openin_topspace_empty [simp]: + "openin trivial_topology S \ S = {}" by (simp add: openin_closedin_eq) lemma openin_imp_subset: @@ -441,6 +451,10 @@ lemma openin_subtopology_self [simp]: "openin (top_of_set S) S" by (metis openin_topspace topspace_euclidean_subtopology) +lemma euclidean_nontrivial [simp]: "euclidean \ trivial_topology" + by (simp add: subtopology_eq_discrete_topology_empty) + + subsubsection\The most basic facts about the usual topology and metric on R\ abbreviation euclideanreal :: "real topology" @@ -1470,11 +1484,11 @@ "continuous_map X Y f \ f \ topspace X \ topspace Y" by (auto simp: continuous_map_def) -lemma continuous_map_on_empty: "topspace X = {} \ continuous_map X Y f" +lemma continuous_map_on_empty [simp]: "continuous_map trivial_topology Y f" by (auto simp: continuous_map_def) -lemma continuous_map_on_empty2: "topspace Y = {} \ continuous_map X Y f \ topspace X = {}" - by (auto simp: continuous_map_def) +lemma continuous_map_on_empty2 [simp]: "continuous_map X trivial_topology f \ X = trivial_topology" + using continuous_map_image_subset_topspace by fastforce lemma continuous_map_closedin: "continuous_map X Y f \ @@ -1633,9 +1647,9 @@ qed lemma continuous_map_const [simp]: - "continuous_map X Y (\x. C) \ topspace X = {} \ C \ topspace Y" -proof (cases "topspace X = {}") - case False + "continuous_map X Y (\x. C) \ X = trivial_topology \ C \ topspace Y" +proof (cases "X = trivial_topology") + case nontriv: False show ?thesis proof (cases "C \ topspace Y") case True @@ -1643,10 +1657,10 @@ by (auto simp: continuous_map_def) next case False - then show ?thesis - unfolding continuous_map_def by fastforce + with nontriv show ?thesis + using continuous_map_image_subset_topspace discrete_topology_unique image_subset_iff by fastforce qed -qed (auto simp: continuous_map_on_empty) +qed auto declare continuous_map_const [THEN iffD2, continuous_intros] @@ -1788,17 +1802,16 @@ "open_map X1 X2 f \ f \ (topspace X1) \ topspace X2" unfolding open_map_def using openin_subset by fastforce -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 open_map_on_empty [simp]: "open_map trivial_topology Y f" + by (simp add: open_map_def) lemma closed_map_on_empty: - "topspace X = {} \ closed_map X Y f" + "closed_map trivial_topology 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}" - by (metis closed_map_def closed_map_on_empty closedin_empty closedin_topspace image_constant_conv) + "closed_map X Y (\x. c) \ X = trivial_topology \ closedin Y {c}" + by (metis closed_map_def closed_map_on_empty closedin_topspace discrete_topology_unique equals0D image_constant_conv) lemma open_map_imp_subset: "\open_map X1 X2 f; S \ topspace X1\ \ f \ S \ topspace X2" @@ -3063,14 +3076,14 @@ using homeomorphic_space_def by blast lemma homeomorphic_empty_space: - "X homeomorphic_space Y \ topspace X = {} \ topspace Y = {}" - by (metis homeomorphic_eq_everything_map homeomorphic_space image_is_empty) + "X homeomorphic_space Y \ X = trivial_topology \ Y = trivial_topology" + by (meson continuous_map_on_empty2 homeomorphic_maps_def homeomorphic_space_def) lemma homeomorphic_empty_space_eq: - assumes "topspace X = {}" - shows "X homeomorphic_space Y \ topspace Y = {}" - using assms - by (auto simp: homeomorphic_maps_def homeomorphic_space_def continuous_map_def) + assumes "X = trivial_topology" + shows "X homeomorphic_space Y \ Y = trivial_topology" + using assms funcset_mem + by (fastforce simp: homeomorphic_maps_def homeomorphic_space_def continuous_map_def) lemma homeomorphic_space_unfold: assumes "X homeomorphic_space Y" @@ -3193,8 +3206,7 @@ lemma connectedin_empty [simp]: "connectedin X {}" by (simp add: connectedin) -lemma connected_space_topspace_empty: - "topspace X = {} \ connected_space X" +lemma connected_space_trivial_topology [simp]: "connected_space trivial_topology" using connectedin_topspace by fastforce lemma connectedin_sing [simp]: "connectedin X {a} \ a \ topspace X" @@ -3558,8 +3570,7 @@ lemma compactin_empty [iff]: "compactin X {}" by (simp add: finite_imp_compactin) -lemma compact_space_topspace_empty: - "topspace X = {} \ compact_space X" +lemma compact_space_trivial_topology [simp]: "compact_space trivial_topology" by (simp add: compact_space_def) lemma finite_imp_compactin_eq: @@ -3705,11 +3716,10 @@ "compact_space X \ (\\. (\C\\. closedin X C) \ (\\. finite \ \ \ \ \ \ \\ \ {}) \ \\ \ {})" (is "_ = ?rhs") -proof (cases "topspace X = {}") +proof (cases "X = trivial_topology") case True then show ?thesis - unfolding compact_space_def - by (metis Sup_bot_conv(1) closedin_topspace_empty compactin_empty finite.emptyI finite_UnionD order_refl) + by (metis Pow_iff closedin_topspace_empty compact_space_trivial_topology finite.emptyI finite_Pow_iff finite_subset subsetI) next case False show ?thesis @@ -3724,7 +3734,7 @@ ultimately obtain \ where \: "finite \" "\ \ \" "topspace X \ topspace X - \\" by (auto simp: ex_finite_subset_image \_def) moreover have "\ \ {}" - using \ \topspace X \ {}\ by blast + using \ False by force ultimately show "False" using * [of \] by auto (metis Diff_iff Inter_iff clo closedin_def subsetD) @@ -3736,7 +3746,7 @@ fix \ :: "'a set set" define \ where "\ \ (\S. topspace X - S) ` \" assume "\C\\. openin X C" and "topspace X \ \\" - with \topspace X \ {}\ have *: "\V \ \. closedin X V" "\ \ {}" + with False have *: "\V \ \. closedin X V" "\ \ {}" by (auto simp: \_def) show "\\. finite \ \ \ \ \ \ topspace X \ \\" proof (rule ccontr; simp) @@ -4965,8 +4975,7 @@ qed qed (simp add: proper_imp_closed_map) -lemma proper_map_on_empty: - "topspace X = {} \ proper_map X Y f" +lemma proper_map_on_empty [simp]: "proper_map trivial_topology Y f" by (auto simp: proper_map_def closed_map_on_empty) lemma proper_map_id [simp]: @@ -5001,11 +5010,11 @@ qed lemma proper_map_const: - "proper_map X Y (\x. c) \ compact_space X \ (topspace X = {} \ closedin Y {c})" -proof (cases "topspace X = {}") + "proper_map X Y (\x. c) \ compact_space X \ (X = trivial_topology \ closedin Y {c})" +proof (cases "X = trivial_topology") case True then show ?thesis - by (simp add: compact_space_topspace_empty proper_map_on_empty) + by simp next case False have *: "compactin X {x \ topspace X. c = y}" if "compact_space X" for y