src/HOL/Analysis/Abstract_Topology.thy
changeset 78336 6bae28577994
parent 78320 eb9a9690b8f5
equal deleted inserted replaced
78325:19c617950a8e 78336:6bae28577994
   225 
   225 
   226 lemma subtopology_eq_discrete_topology_sing:
   226 lemma subtopology_eq_discrete_topology_sing:
   227    "X = discrete_topology {a} \<longleftrightarrow> topspace X = {a}"
   227    "X = discrete_topology {a} \<longleftrightarrow> topspace X = {a}"
   228   by (metis discrete_topology_unique openin_topspace singletonD)
   228   by (metis discrete_topology_unique openin_topspace singletonD)
   229 
   229 
       
   230 abbreviation trivial_topology where "trivial_topology \<equiv> discrete_topology {}"
       
   231 
       
   232 lemma null_topspace_iff_trivial [simp]: "topspace X = {} \<longleftrightarrow> X = trivial_topology"
       
   233   by (simp add: subtopology_eq_discrete_topology_empty)
   230 
   234 
   231 subsection \<open>Subspace topology\<close>
   235 subsection \<open>Subspace topology\<close>
   232 
   236 
   233 definition\<^marker>\<open>tag important\<close> subtopology :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a topology" 
   237 definition\<^marker>\<open>tag important\<close> subtopology :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a topology" 
   234   where "subtopology U V = topology (\<lambda>T. \<exists>S. T = S \<inter> V \<and> openin U S)"
   238   where "subtopology U V = topology (\<lambda>T. \<exists>S. T = S \<inter> V \<and> openin U S)"
   314 
   318 
   315 lemma openin_subtopology_refl: "openin (subtopology U V) V \<longleftrightarrow> V \<subseteq> topspace U"
   319 lemma openin_subtopology_refl: "openin (subtopology U V) V \<longleftrightarrow> V \<subseteq> topspace U"
   316   unfolding openin_subtopology
   320   unfolding openin_subtopology
   317   by auto (metis IntD1 in_mono openin_subset)
   321   by auto (metis IntD1 in_mono openin_subset)
   318 
   322 
       
   323 lemma subtopology_trivial_iff: "subtopology X S = trivial_topology \<longleftrightarrow> X = trivial_topology \<or> topspace X \<inter> S = {}"
       
   324   by (auto simp flip: null_topspace_iff_trivial)
       
   325 
   319 lemma subtopology_subtopology:
   326 lemma subtopology_subtopology:
   320    "subtopology (subtopology X S) T = subtopology X (S \<inter> T)"
   327    "subtopology (subtopology X S) T = subtopology X (S \<inter> T)"
   321 proof -
   328 proof -
   322   have eq: "\<And>T'. (\<exists>S'. T' = S' \<inter> T \<and> (\<exists>T. openin X T \<and> S' = T \<inter> S)) = (\<exists>Sa. T' = Sa \<inter> (S \<inter> T) \<and> openin X Sa)"
   329   have eq: "\<And>T'. (\<exists>S'. T' = S' \<inter> T \<and> (\<exists>T. openin X T \<and> S' = T \<inter> S)) = (\<exists>Sa. T' = Sa \<inter> (S \<inter> T) \<and> openin X Sa)"
   323     by (metis inf_assoc)
   330     by (metis inf_assoc)
   354   by (simp add: subtopology_superset)
   361   by (simp add: subtopology_superset)
   355 
   362 
   356 lemma subtopology_UNIV[simp]: "subtopology U UNIV = U"
   363 lemma subtopology_UNIV[simp]: "subtopology U UNIV = U"
   357   by (simp add: subtopology_superset)
   364   by (simp add: subtopology_superset)
   358 
   365 
       
   366 lemma subtopology_empty_iff_trivial [simp]: "subtopology X {} = trivial_topology"
       
   367   by (simp add: subtopology_eq_discrete_topology_empty)
       
   368 
   359 lemma subtopology_restrict:
   369 lemma subtopology_restrict:
   360    "subtopology X (topspace X \<inter> S) = subtopology X S"
   370    "subtopology X (topspace X \<inter> S) = subtopology X S"
   361   by (metis subtopology_subtopology subtopology_topspace)
   371   by (metis subtopology_subtopology subtopology_topspace)
   362 
   372 
   363 lemma openin_subtopology_empty:
   373 lemma openin_subtopology_empty:
   370 
   380 
   371 lemma closedin_subtopology_refl [simp]:
   381 lemma closedin_subtopology_refl [simp]:
   372   "closedin (subtopology U X) X \<longleftrightarrow> X \<subseteq> topspace U"
   382   "closedin (subtopology U X) X \<longleftrightarrow> X \<subseteq> topspace U"
   373   by (metis closedin_def closedin_topspace inf.absorb_iff2 le_inf_iff topspace_subtopology)
   383   by (metis closedin_def closedin_topspace inf.absorb_iff2 le_inf_iff topspace_subtopology)
   374 
   384 
   375 lemma closedin_topspace_empty: "topspace T = {} \<Longrightarrow> (closedin T S \<longleftrightarrow> S = {})"
   385 lemma closedin_topspace_empty [simp]: "closedin trivial_topology S \<longleftrightarrow> S = {}"
   376   by (simp add: closedin_def)
   386   by (simp add: closedin_def)
   377 
   387 
   378 lemma open_in_topspace_empty:
   388 lemma openin_topspace_empty [simp]:
   379    "topspace X = {} \<Longrightarrow> openin X S \<longleftrightarrow> S = {}"
   389    "openin trivial_topology S \<longleftrightarrow> S = {}"
   380   by (simp add: openin_closedin_eq)
   390   by (simp add: openin_closedin_eq)
   381 
   391 
   382 lemma openin_imp_subset:
   392 lemma openin_imp_subset:
   383   "openin (subtopology U S) T \<Longrightarrow> T \<subseteq> S"
   393   "openin (subtopology U S) T \<Longrightarrow> T \<subseteq> S"
   384   by (metis Int_iff openin_subtopology subsetI)
   394   by (metis Int_iff openin_subtopology subsetI)
   438 
   448 
   439 declare closed_closedin [symmetric, simp]
   449 declare closed_closedin [symmetric, simp]
   440 
   450 
   441 lemma openin_subtopology_self [simp]: "openin (top_of_set S) S"
   451 lemma openin_subtopology_self [simp]: "openin (top_of_set S) S"
   442   by (metis openin_topspace topspace_euclidean_subtopology)
   452   by (metis openin_topspace topspace_euclidean_subtopology)
       
   453 
       
   454 lemma euclidean_nontrivial [simp]: "euclidean \<noteq> trivial_topology"
       
   455   by (simp add: subtopology_eq_discrete_topology_empty)
       
   456 
   443 
   457 
   444 subsubsection\<open>The most basic facts about the usual topology and metric on R\<close>
   458 subsubsection\<open>The most basic facts about the usual topology and metric on R\<close>
   445 
   459 
   446 abbreviation euclideanreal :: "real topology"
   460 abbreviation euclideanreal :: "real topology"
   447   where "euclideanreal \<equiv> topology open"
   461   where "euclideanreal \<equiv> topology open"
  1468 
  1482 
  1469 lemma continuous_map_funspace:
  1483 lemma continuous_map_funspace:
  1470    "continuous_map X Y f \<Longrightarrow> f \<in> topspace X \<rightarrow> topspace Y"
  1484    "continuous_map X Y f \<Longrightarrow> f \<in> topspace X \<rightarrow> topspace Y"
  1471   by (auto simp: continuous_map_def)
  1485   by (auto simp: continuous_map_def)
  1472 
  1486 
  1473 lemma continuous_map_on_empty: "topspace X = {} \<Longrightarrow> continuous_map X Y f"
  1487 lemma continuous_map_on_empty [simp]: "continuous_map trivial_topology Y f"
  1474   by (auto simp: continuous_map_def)
  1488   by (auto simp: continuous_map_def)
  1475 
  1489 
  1476 lemma continuous_map_on_empty2: "topspace Y = {} \<Longrightarrow> continuous_map X Y f \<longleftrightarrow> topspace X = {}"
  1490 lemma continuous_map_on_empty2 [simp]: "continuous_map X trivial_topology f \<longleftrightarrow> X = trivial_topology"
  1477   by (auto simp: continuous_map_def)
  1491   using continuous_map_image_subset_topspace by fastforce
  1478 
  1492 
  1479 lemma continuous_map_closedin:
  1493 lemma continuous_map_closedin:
  1480    "continuous_map X Y f \<longleftrightarrow>
  1494    "continuous_map X Y f \<longleftrightarrow>
  1481          f \<in> topspace X \<rightarrow> topspace Y \<and>
  1495          f \<in> topspace X \<rightarrow> topspace Y \<and>
  1482          (\<forall>C. closedin Y C \<longrightarrow> closedin X {x \<in> topspace X. f x \<in> C})"
  1496          (\<forall>C. closedin Y C \<longrightarrow> closedin X {x \<in> topspace X. f x \<in> C})"
  1631     unfolding continuous_map_def
  1645     unfolding continuous_map_def
  1632     using assms openin_subopen topspace_def by fastforce
  1646     using assms openin_subopen topspace_def by fastforce
  1633 qed
  1647 qed
  1634 
  1648 
  1635 lemma continuous_map_const [simp]:
  1649 lemma continuous_map_const [simp]:
  1636    "continuous_map X Y (\<lambda>x. C) \<longleftrightarrow> topspace X = {} \<or> C \<in> topspace Y"
  1650    "continuous_map X Y (\<lambda>x. C) \<longleftrightarrow> X = trivial_topology \<or> C \<in> topspace Y"
  1637 proof (cases "topspace X = {}")
  1651 proof (cases "X = trivial_topology")
  1638   case False
  1652   case nontriv: False
  1639   show ?thesis
  1653   show ?thesis
  1640   proof (cases "C \<in> topspace Y")
  1654   proof (cases "C \<in> topspace Y")
  1641     case True
  1655     case True
  1642     with openin_subopen show ?thesis
  1656     with openin_subopen show ?thesis
  1643       by (auto simp: continuous_map_def)
  1657       by (auto simp: continuous_map_def)
  1644   next
  1658   next
  1645     case False
  1659     case False
  1646     then show ?thesis
  1660     with nontriv show ?thesis
  1647       unfolding continuous_map_def by fastforce
  1661       using continuous_map_image_subset_topspace discrete_topology_unique image_subset_iff by fastforce 
  1648   qed
  1662   qed
  1649 qed (auto simp: continuous_map_on_empty)
  1663 qed auto
  1650 
  1664 
  1651 declare continuous_map_const [THEN iffD2, continuous_intros]
  1665 declare continuous_map_const [THEN iffD2, continuous_intros]
  1652 
  1666 
  1653 lemma continuous_map_compose [continuous_intros]:
  1667 lemma continuous_map_compose [continuous_intros]:
  1654   assumes f: "continuous_map X X' f" and g: "continuous_map X' X'' g"
  1668   assumes f: "continuous_map X X' f" and g: "continuous_map X' X'' g"
  1786 
  1800 
  1787 lemma open_map_imp_subset_topspace:
  1801 lemma open_map_imp_subset_topspace:
  1788      "open_map X1 X2 f \<Longrightarrow> f \<in> (topspace X1) \<rightarrow> topspace X2"
  1802      "open_map X1 X2 f \<Longrightarrow> f \<in> (topspace X1) \<rightarrow> topspace X2"
  1789   unfolding open_map_def using openin_subset by fastforce
  1803   unfolding open_map_def using openin_subset by fastforce
  1790 
  1804 
  1791 lemma open_map_on_empty:
  1805 lemma open_map_on_empty [simp]: "open_map trivial_topology Y f"
  1792    "topspace X = {} \<Longrightarrow> open_map X Y f"
  1806   by (simp add: open_map_def)
  1793   by (metis empty_iff imageE in_mono open_map_def openin_subopen openin_subset)
       
  1794 
  1807 
  1795 lemma closed_map_on_empty:
  1808 lemma closed_map_on_empty:
  1796    "topspace X = {} \<Longrightarrow> closed_map X Y f"
  1809    "closed_map trivial_topology Y f"
  1797   by (simp add: closed_map_def closedin_topspace_empty)
  1810   by (simp add: closed_map_def closedin_topspace_empty)
  1798 
  1811 
  1799 lemma closed_map_const:
  1812 lemma closed_map_const:
  1800    "closed_map X Y (\<lambda>x. c) \<longleftrightarrow> topspace X = {} \<or> closedin Y {c}"
  1813    "closed_map X Y (\<lambda>x. c) \<longleftrightarrow> X = trivial_topology \<or> closedin Y {c}"
  1801   by (metis closed_map_def closed_map_on_empty closedin_empty closedin_topspace image_constant_conv)
  1814   by (metis closed_map_def closed_map_on_empty closedin_topspace discrete_topology_unique equals0D image_constant_conv)
  1802 
  1815 
  1803 lemma open_map_imp_subset:
  1816 lemma open_map_imp_subset:
  1804     "\<lbrakk>open_map X1 X2 f; S \<subseteq> topspace X1\<rbrakk> \<Longrightarrow> f \<in> S \<rightarrow> topspace X2"
  1817     "\<lbrakk>open_map X1 X2 f; S \<subseteq> topspace X1\<rbrakk> \<Longrightarrow> f \<in> S \<rightarrow> topspace X2"
  1805   using open_map_imp_subset_topspace by fastforce
  1818   using open_map_imp_subset_topspace by fastforce
  1806 
  1819 
  3061      "homeomorphic_map X Y f \<Longrightarrow> X homeomorphic_space Y"
  3074      "homeomorphic_map X Y f \<Longrightarrow> X homeomorphic_space Y"
  3062   unfolding homeomorphic_map_maps
  3075   unfolding homeomorphic_map_maps
  3063   using homeomorphic_space_def by blast
  3076   using homeomorphic_space_def by blast
  3064 
  3077 
  3065 lemma homeomorphic_empty_space:
  3078 lemma homeomorphic_empty_space:
  3066      "X homeomorphic_space Y \<Longrightarrow> topspace X = {} \<longleftrightarrow> topspace Y = {}"
  3079      "X homeomorphic_space Y \<Longrightarrow> X = trivial_topology \<longleftrightarrow> Y = trivial_topology"
  3067   by (metis homeomorphic_eq_everything_map homeomorphic_space image_is_empty)
  3080   by (meson continuous_map_on_empty2 homeomorphic_maps_def homeomorphic_space_def)
  3068 
  3081 
  3069 lemma homeomorphic_empty_space_eq:
  3082 lemma homeomorphic_empty_space_eq:
  3070   assumes "topspace X = {}"
  3083   assumes "X = trivial_topology"
  3071   shows "X homeomorphic_space Y \<longleftrightarrow> topspace Y = {}"
  3084   shows "X homeomorphic_space Y \<longleftrightarrow> Y = trivial_topology"
  3072   using assms
  3085   using assms funcset_mem
  3073   by (auto simp: homeomorphic_maps_def homeomorphic_space_def continuous_map_def)
  3086   by (fastforce simp:  homeomorphic_maps_def homeomorphic_space_def continuous_map_def)
  3074 
  3087 
  3075 lemma homeomorphic_space_unfold:
  3088 lemma homeomorphic_space_unfold:
  3076   assumes "X homeomorphic_space Y"
  3089   assumes "X homeomorphic_space Y"
  3077   obtains f g where  "homeomorphic_map X Y f"  "homeomorphic_map Y X g"
  3090   obtains f g where  "homeomorphic_map X Y f"  "homeomorphic_map Y X g"
  3078     and "\<And>x. x \<in> topspace X \<Longrightarrow> g(f x) = x" "\<And>y. y \<in> topspace Y \<Longrightarrow> f(g y) = y"
  3091     and "\<And>x. x \<in> topspace X \<Longrightarrow> g(f x) = x" "\<And>y. y \<in> topspace Y \<Longrightarrow> f(g y) = y"
  3191 qed
  3204 qed
  3192 
  3205 
  3193 lemma connectedin_empty [simp]: "connectedin X {}"
  3206 lemma connectedin_empty [simp]: "connectedin X {}"
  3194   by (simp add: connectedin)
  3207   by (simp add: connectedin)
  3195 
  3208 
  3196 lemma connected_space_topspace_empty:
  3209 lemma connected_space_trivial_topology [simp]: "connected_space trivial_topology"
  3197      "topspace X = {} \<Longrightarrow> connected_space X"
       
  3198   using connectedin_topspace by fastforce
  3210   using connectedin_topspace by fastforce
  3199 
  3211 
  3200 lemma connectedin_sing [simp]: "connectedin X {a} \<longleftrightarrow> a \<in> topspace X"
  3212 lemma connectedin_sing [simp]: "connectedin X {a} \<longleftrightarrow> a \<in> topspace X"
  3201   by (simp add: connectedin)
  3213   by (simp add: connectedin)
  3202 
  3214 
  3556   by (metis compactin_subspace compact_space finite_UnionD inf.absorb_iff2 order_refl topspace_subtopology)
  3568   by (metis compactin_subspace compact_space finite_UnionD inf.absorb_iff2 order_refl topspace_subtopology)
  3557 
  3569 
  3558 lemma compactin_empty [iff]: "compactin X {}"
  3570 lemma compactin_empty [iff]: "compactin X {}"
  3559   by (simp add: finite_imp_compactin)
  3571   by (simp add: finite_imp_compactin)
  3560 
  3572 
  3561 lemma compact_space_topspace_empty:
  3573 lemma compact_space_trivial_topology [simp]: "compact_space trivial_topology"
  3562    "topspace X = {} \<Longrightarrow> compact_space X"
       
  3563   by (simp add: compact_space_def)
  3574   by (simp add: compact_space_def)
  3564 
  3575 
  3565 lemma finite_imp_compactin_eq:
  3576 lemma finite_imp_compactin_eq:
  3566    "finite S \<Longrightarrow> (compactin X S \<longleftrightarrow> S \<subseteq> topspace X)"
  3577    "finite S \<Longrightarrow> (compactin X S \<longleftrightarrow> S \<subseteq> topspace X)"
  3567   using compactin_subset_topspace finite_imp_compactin by blast
  3578   using compactin_subset_topspace finite_imp_compactin by blast
  3703 
  3714 
  3704 proposition compact_space_fip:
  3715 proposition compact_space_fip:
  3705    "compact_space X \<longleftrightarrow>
  3716    "compact_space X \<longleftrightarrow>
  3706     (\<forall>\<U>. (\<forall>C\<in>\<U>. closedin X C) \<and> (\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<longrightarrow> \<Inter>\<F> \<noteq> {}) \<longrightarrow> \<Inter>\<U> \<noteq> {})"
  3717     (\<forall>\<U>. (\<forall>C\<in>\<U>. closedin X C) \<and> (\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<longrightarrow> \<Inter>\<F> \<noteq> {}) \<longrightarrow> \<Inter>\<U> \<noteq> {})"
  3707    (is "_ = ?rhs")
  3718    (is "_ = ?rhs")
  3708 proof (cases "topspace X = {}")
  3719 proof (cases "X = trivial_topology")
  3709   case True
  3720   case True
  3710   then show ?thesis
  3721   then show ?thesis
  3711     unfolding compact_space_def
  3722     by (metis Pow_iff closedin_topspace_empty compact_space_trivial_topology finite.emptyI finite_Pow_iff finite_subset subsetI)
  3712     by (metis Sup_bot_conv(1) closedin_topspace_empty compactin_empty finite.emptyI finite_UnionD order_refl)
       
  3713 next
  3723 next
  3714   case False
  3724   case False
  3715   show ?thesis
  3725   show ?thesis
  3716   proof safe
  3726   proof safe
  3717     fix \<U> :: "'a set set"
  3727     fix \<U> :: "'a set set"
  3722       by (auto simp: \<V>_def)
  3732       by (auto simp: \<V>_def)
  3723     moreover assume [unfolded compact_space_alt, rule_format, of \<V>]: "compact_space X"
  3733     moreover assume [unfolded compact_space_alt, rule_format, of \<V>]: "compact_space X"
  3724     ultimately obtain \<F> where \<F>: "finite \<F>" "\<F> \<subseteq> \<U>" "topspace X \<subseteq> topspace X - \<Inter>\<F>"
  3734     ultimately obtain \<F> where \<F>: "finite \<F>" "\<F> \<subseteq> \<U>" "topspace X \<subseteq> topspace X - \<Inter>\<F>"
  3725       by (auto simp: ex_finite_subset_image \<V>_def)
  3735       by (auto simp: ex_finite_subset_image \<V>_def)
  3726     moreover have "\<F> \<noteq> {}"
  3736     moreover have "\<F> \<noteq> {}"
  3727       using \<F> \<open>topspace X \<noteq> {}\<close> by blast
  3737       using \<F> False by force
  3728     ultimately show "False"
  3738     ultimately show "False"
  3729       using * [of \<F>]
  3739       using * [of \<F>]
  3730       by auto (metis Diff_iff Inter_iff clo closedin_def subsetD)
  3740       by auto (metis Diff_iff Inter_iff clo closedin_def subsetD)
  3731   next
  3741   next
  3732     assume R [rule_format]: ?rhs
  3742     assume R [rule_format]: ?rhs
  3734       unfolding compact_space_alt
  3744       unfolding compact_space_alt
  3735     proof clarify
  3745     proof clarify
  3736       fix \<U> :: "'a set set"
  3746       fix \<U> :: "'a set set"
  3737       define \<V> where "\<V> \<equiv> (\<lambda>S. topspace X - S) ` \<U>"
  3747       define \<V> where "\<V> \<equiv> (\<lambda>S. topspace X - S) ` \<U>"
  3738       assume "\<forall>C\<in>\<U>. openin X C" and "topspace X \<subseteq> \<Union>\<U>"
  3748       assume "\<forall>C\<in>\<U>. openin X C" and "topspace X \<subseteq> \<Union>\<U>"
  3739       with \<open>topspace X \<noteq> {}\<close> have *: "\<forall>V \<in> \<V>. closedin X V" "\<U> \<noteq> {}"
  3749       with False have *: "\<forall>V \<in> \<V>. closedin X V" "\<U> \<noteq> {}"
  3740         by (auto simp: \<V>_def)
  3750         by (auto simp: \<V>_def)
  3741       show "\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> topspace X \<subseteq> \<Union>\<F>"
  3751       show "\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> topspace X \<subseteq> \<Union>\<F>"
  3742       proof (rule ccontr; simp)
  3752       proof (rule ccontr; simp)
  3743         assume "\<forall>\<F>\<subseteq>\<U>. finite \<F> \<longrightarrow> \<not> topspace X \<subseteq> \<Union>\<F>"
  3753         assume "\<forall>\<F>\<subseteq>\<U>. finite \<F> \<longrightarrow> \<not> topspace X \<subseteq> \<Union>\<F>"
  3744         then have "\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<V> \<longrightarrow> \<Inter>\<F> \<noteq> {}"
  3754         then have "\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<V> \<longrightarrow> \<Inter>\<F> \<noteq> {}"
  4963     with f show ?thesis
  4973     with f show ?thesis
  4964       by (auto simp: proper_map_def)
  4974       by (auto simp: proper_map_def)
  4965   qed
  4975   qed
  4966 qed (simp add: proper_imp_closed_map)
  4976 qed (simp add: proper_imp_closed_map)
  4967 
  4977 
  4968 lemma proper_map_on_empty:
  4978 lemma proper_map_on_empty [simp]: "proper_map trivial_topology Y f"
  4969    "topspace X = {} \<Longrightarrow> proper_map X Y f"
       
  4970   by (auto simp: proper_map_def closed_map_on_empty)
  4979   by (auto simp: proper_map_def closed_map_on_empty)
  4971 
  4980 
  4972 lemma proper_map_id [simp]:
  4981 lemma proper_map_id [simp]:
  4973    "proper_map X X id"
  4982    "proper_map X X id"
  4974 proof (clarsimp simp: proper_map_alt closed_map_id)
  4983 proof (clarsimp simp: proper_map_alt closed_map_id)
  4999       using f [OF g [OF that]] by auto
  5008       using f [OF g [OF that]] by auto
  5000   qed
  5009   qed
  5001 qed
  5010 qed
  5002 
  5011 
  5003 lemma proper_map_const:
  5012 lemma proper_map_const:
  5004    "proper_map X Y (\<lambda>x. c) \<longleftrightarrow> compact_space X \<and> (topspace X = {} \<or> closedin Y {c})"
  5013    "proper_map X Y (\<lambda>x. c) \<longleftrightarrow> compact_space X \<and> (X = trivial_topology \<or> closedin Y {c})"
  5005 proof (cases "topspace X = {}")
  5014 proof (cases "X = trivial_topology")
  5006   case True
  5015   case True
  5007   then show ?thesis
  5016   then show ?thesis
  5008     by (simp add: compact_space_topspace_empty proper_map_on_empty)
  5017     by simp
  5009 next
  5018 next
  5010   case False
  5019   case False
  5011   have *: "compactin X {x \<in> topspace X. c = y}" if "compact_space X" for y
  5020   have *: "compactin X {x \<in> topspace X. c = y}" if "compact_space X" for y
  5012     using that unfolding compact_space_def
  5021     using that unfolding compact_space_def
  5013     by (metis (mono_tags, lifting) compactin_empty empty_subsetI mem_Collect_eq subsetI subset_antisym)
  5022     by (metis (mono_tags, lifting) compactin_empty empty_subsetI mem_Collect_eq subsetI subset_antisym)