src/HOL/Analysis/Abstract_Topology.thy
author nipkow
Tue, 17 Jun 2025 14:11:40 +0200
changeset 82733 8b537e1af2ec
parent 82501 26f9f484f266
permissions -rw-r--r--
reinstated intersection of lists as inter_list_set
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
77939
98879407d33c Two new theories containing material ported from HOL Light about abstract topology
paulson <lp15@cam.ac.uk>
parents: 77935
diff changeset
     1
(*  Author:     L C Paulson, University of Cambridge [ported from HOL Light] *)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     2
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     3
section \<open>Operators involving abstract topology\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     4
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     5
theory Abstract_Topology
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
     6
  imports
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
     7
    Complex_Main
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
     8
    "HOL-Library.Set_Idioms"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
     9
    "HOL-Library.FuncSet"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    10
begin
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    11
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    12
subsection \<open>General notion of a topology as a value\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    13
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
    14
definition\<^marker>\<open>tag important\<close> istopology :: "('a set \<Rightarrow> bool) \<Rightarrow> bool" where
70235
b0680d8b0608 tweaked a definition
paulson <lp15@cam.ac.uk>
parents: 70178
diff changeset
    15
  "istopology L \<equiv> (\<forall>S T. L S \<longrightarrow> L T \<longrightarrow> L (S \<inter> T)) \<and> (\<forall>\<K>. (\<forall>K\<in>\<K>. L K) \<longrightarrow> L (\<Union>\<K>))"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    16
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
    17
typedef\<^marker>\<open>tag important\<close> 'a topology = "{L::('a set) \<Rightarrow> bool. istopology L}"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    18
  morphisms "openin" "topology"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    19
  unfolding istopology_def by blast
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    20
75449
51e05af57455 Added a couple of obvious simprules
paulson <lp15@cam.ac.uk>
parents: 73932
diff changeset
    21
lemma istopology_openin[iff]: "istopology(openin U)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    22
  using openin[of U] by blast
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    23
75449
51e05af57455 Added a couple of obvious simprules
paulson <lp15@cam.ac.uk>
parents: 73932
diff changeset
    24
lemma istopology_open[iff]: "istopology open"
69710
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
    25
  by (auto simp: istopology_def)
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
    26
75449
51e05af57455 Added a couple of obvious simprules
paulson <lp15@cam.ac.uk>
parents: 73932
diff changeset
    27
lemma topology_inverse' [simp]: "istopology U \<Longrightarrow> openin (topology U) = U"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    28
  using topology_inverse[unfolded mem_Collect_eq] .
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    29
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    30
lemma topology_inverse_iff: "istopology U \<longleftrightarrow> openin (topology U) = U"
75449
51e05af57455 Added a couple of obvious simprules
paulson <lp15@cam.ac.uk>
parents: 73932
diff changeset
    31
  by (metis istopology_openin topology_inverse')
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    32
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    33
lemma topology_eq: "T1 = T2 \<longleftrightarrow> (\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    34
proof
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    35
  assume "T1 = T2"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    36
  then show "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" by simp
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    37
next
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    38
  assume H: "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    39
  then have "openin T1 = openin T2" by (simp add: fun_eq_iff)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    40
  then have "topology (openin T1) = topology (openin T2)" by simp
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    41
  then show "T1 = T2" unfolding openin_inverse .
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    42
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    43
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    44
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    45
text\<open>The "universe": the union of all sets in the topology.\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    46
definition "topspace T = \<Union>{S. openin T S}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    47
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    48
subsubsection \<open>Main properties of open sets\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    49
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    50
proposition openin_clauses:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    51
  fixes U :: "'a topology"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    52
  shows
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    53
    "openin U {}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    54
    "\<And>S T. openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S\<inter>T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    55
    "\<And>K. (\<forall>S \<in> K. openin U S) \<Longrightarrow> openin U (\<Union>K)"
70235
b0680d8b0608 tweaked a definition
paulson <lp15@cam.ac.uk>
parents: 70178
diff changeset
    56
  using openin[of U] unfolding istopology_def by auto
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    57
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
    58
lemma openin_subset: "openin U S \<Longrightarrow> S \<subseteq> topspace U"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    59
  unfolding topspace_def by blast
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    60
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    61
lemma openin_empty[simp]: "openin U {}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    62
  by (rule openin_clauses)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    63
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    64
lemma openin_Int[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<inter> T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    65
  by (rule openin_clauses)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    66
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    67
lemma openin_Union[intro]: "(\<And>S. S \<in> K \<Longrightarrow> openin U S) \<Longrightarrow> openin U (\<Union>K)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    68
  using openin_clauses by blast
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    69
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    70
lemma openin_Un[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<union> T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    71
  using openin_Union[of "{S,T}" U] by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    72
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    73
lemma openin_topspace[intro, simp]: "openin U (topspace U)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    74
  by (force simp: openin_Union topspace_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    75
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    76
lemma openin_subopen: "openin U S \<longleftrightarrow> (\<forall>x \<in> S. \<exists>T. openin U T \<and> x \<in> T \<and> T \<subseteq> S)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    77
  (is "?lhs \<longleftrightarrow> ?rhs")
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    78
proof
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    79
  assume ?lhs
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    80
  then show ?rhs by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    81
next
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    82
  assume H: ?rhs
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    83
  let ?t = "\<Union>{T. openin U T \<and> T \<subseteq> S}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    84
  have "openin U ?t" by (force simp: openin_Union)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    85
  also have "?t = S" using H by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    86
  finally show "openin U S" .
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    87
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    88
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    89
lemma openin_INT [intro]:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    90
  assumes "finite I"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    91
          "\<And>i. i \<in> I \<Longrightarrow> openin T (U i)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    92
  shows "openin T ((\<Inter>i \<in> I. U i) \<inter> topspace T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    93
using assms by (induct, auto simp: inf_sup_aci(2) openin_Int)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    94
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    95
lemma openin_INT2 [intro]:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    96
  assumes "finite I" "I \<noteq> {}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    97
          "\<And>i. i \<in> I \<Longrightarrow> openin T (U i)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    98
  shows "openin T (\<Inter>i \<in> I. U i)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
    99
proof -
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   100
  have "(\<Inter>i \<in> I. U i) \<subseteq> topspace T"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   101
    using \<open>I \<noteq> {}\<close> openin_subset[OF assms(3)] by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   102
  then show ?thesis
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   103
    using openin_INT[of _ _ U, OF assms(1) assms(3)] by (simp add: inf.absorb2 inf_commute)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   104
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   105
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   106
lemma openin_Inter [intro]:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   107
  assumes "finite \<F>" "\<F> \<noteq> {}" "\<And>X. X \<in> \<F> \<Longrightarrow> openin T X" shows "openin T (\<Inter>\<F>)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   108
  by (metis (full_types) assms openin_INT2 image_ident)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   109
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   110
lemma openin_Int_Inter:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   111
  assumes "finite \<F>" "openin T U" "\<And>X. X \<in> \<F> \<Longrightarrow> openin T X" shows "openin T (U \<inter> \<Inter>\<F>)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   112
  using openin_Inter [of "insert U \<F>"] assms by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   113
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   114
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   115
subsubsection \<open>Closed sets\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   116
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
   117
definition\<^marker>\<open>tag important\<close> closedin :: "'a topology \<Rightarrow> 'a set \<Rightarrow> bool" where
69600
86e8e7347ac0 typed definitions
nipkow
parents: 69544
diff changeset
   118
"closedin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> openin U (topspace U - S)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   119
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   120
lemma closedin_subset: "closedin U S \<Longrightarrow> S \<subseteq> topspace U"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   121
  by (metis closedin_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   122
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   123
lemma closedin_empty[simp]: "closedin U {}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   124
  by (simp add: closedin_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   125
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   126
lemma closedin_topspace[intro, simp]: "closedin U (topspace U)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   127
  by (simp add: closedin_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   128
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   129
lemma closedin_Un[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<union> T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   130
  by (auto simp: Diff_Un closedin_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   131
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   132
lemma Diff_Inter[intro]: "A - \<Inter>S = \<Union>{A - s|s. s\<in>S}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   133
  by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   134
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   135
lemma closedin_Union:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   136
  assumes "finite S" "\<And>T. T \<in> S \<Longrightarrow> closedin U T"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   137
    shows "closedin U (\<Union>S)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   138
  using assms by induction auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   139
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   140
lemma closedin_Inter[intro]:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   141
  assumes Ke: "K \<noteq> {}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   142
    and Kc: "\<And>S. S \<in>K \<Longrightarrow> closedin U S"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   143
  shows "closedin U (\<Inter>K)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   144
  using Ke Kc unfolding closedin_def Diff_Inter by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   145
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   146
lemma closedin_INT[intro]:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   147
  assumes "A \<noteq> {}" "\<And>x. x \<in> A \<Longrightarrow> closedin U (B x)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   148
  shows "closedin U (\<Inter>x\<in>A. B x)"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   149
  using assms by blast
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   150
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   151
lemma closedin_Int[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<inter> T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   152
  using closedin_Inter[of "{S,T}" U] by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   153
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   154
lemma openin_closedin_eq: "openin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> closedin U (topspace U - S)"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   155
  by (metis Diff_subset closedin_def double_diff equalityD1 openin_subset)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   156
69994
cf7150ab1075 more stuff from HOL Light: Euclidean spaces and n-spheres, Hausdorff spaces, etc.
paulson <lp15@cam.ac.uk>
parents: 69986
diff changeset
   157
lemma topology_finer_closedin:
cf7150ab1075 more stuff from HOL Light: Euclidean spaces and n-spheres, Hausdorff spaces, etc.
paulson <lp15@cam.ac.uk>
parents: 69986
diff changeset
   158
  "topspace X = topspace Y \<Longrightarrow> (\<forall>S. openin Y S \<longrightarrow> openin X S) \<longleftrightarrow> (\<forall>S. closedin Y S \<longrightarrow> closedin X S)"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   159
  by (metis closedin_def openin_closedin_eq)
69994
cf7150ab1075 more stuff from HOL Light: Euclidean spaces and n-spheres, Hausdorff spaces, etc.
paulson <lp15@cam.ac.uk>
parents: 69986
diff changeset
   160
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   161
lemma openin_closedin: "S \<subseteq> topspace U \<Longrightarrow> (openin U S \<longleftrightarrow> closedin U (topspace U - S))"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   162
  by (simp add: openin_closedin_eq)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   163
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   164
lemma openin_diff[intro]:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   165
  assumes oS: "openin U S"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   166
    and cT: "closedin U T"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   167
  shows "openin U (S - T)"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   168
  by (metis Int_Diff cT closedin_def inf.orderE oS openin_Int openin_subset)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   169
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   170
lemma closedin_diff[intro]:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   171
  assumes oS: "closedin U S"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   172
    and cT: "openin U T"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   173
  shows "closedin U (S - T)"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   174
  by (metis Int_Diff cT closedin_Int closedin_subset inf.orderE oS openin_closedin_eq)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   175
77934
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   176
lemma all_openin: "(\<forall>U. openin X U \<longrightarrow> P U) \<longleftrightarrow> (\<forall>U. closedin X U \<longrightarrow> P (topspace X - U))"
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   177
  by (metis Diff_Diff_Int closedin_def inf.absorb_iff2 openin_closedin_eq)
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   178
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   179
lemma all_closedin: "(\<forall>U. closedin X U \<longrightarrow> P U) \<longleftrightarrow> (\<forall>U. openin X U \<longrightarrow> P (topspace X - U))"
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   180
  by (metis Diff_Diff_Int closedin_subset inf.absorb_iff2 openin_closedin_eq)
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   181
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   182
lemma ex_openin: "(\<exists>U. openin X U \<and> P U) \<longleftrightarrow> (\<exists>U. closedin X U \<and> P (topspace X - U))"
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   183
  by (metis Diff_Diff_Int closedin_def inf.absorb_iff2 openin_closedin_eq)
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   184
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   185
lemma ex_closedin: "(\<exists>U. closedin X U \<and> P U) \<longleftrightarrow> (\<exists>U. openin X U \<and> P (topspace X - U))"
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   186
  by (metis Diff_Diff_Int closedin_subset inf.absorb_iff2 openin_closedin_eq)
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
   187
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   188
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   189
subsection\<open>The discrete topology\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   190
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   191
definition discrete_topology where "discrete_topology U \<equiv> topology (\<lambda>S. S \<subseteq> U)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   192
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   193
lemma openin_discrete_topology [simp]: "openin (discrete_topology U) S \<longleftrightarrow> S \<subseteq> U"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   194
proof -
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   195
  have "istopology (\<lambda>S. S \<subseteq> U)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   196
    by (auto simp: istopology_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   197
  then show ?thesis
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   198
    by (simp add: discrete_topology_def topology_inverse')
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   199
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   200
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   201
lemma topspace_discrete_topology [simp]: "topspace(discrete_topology U) = U"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   202
  by (meson openin_discrete_topology openin_subset openin_topspace order_refl subset_antisym)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   203
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   204
lemma closedin_discrete_topology [simp]: "closedin (discrete_topology U) S \<longleftrightarrow> S \<subseteq> U"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   205
  by (simp add: closedin_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   206
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   207
lemma discrete_topology_unique:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   208
   "discrete_topology U = X \<longleftrightarrow> topspace X = U \<and> (\<forall>x \<in> U. openin X {x})" (is "?lhs = ?rhs")
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   209
proof
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   210
  assume R: ?rhs
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   211
  then have "openin X S" if "S \<subseteq> U" for S
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   212
    using openin_subopen subsetD that by fastforce
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   213
  then show ?lhs
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   214
    by (metis R openin_discrete_topology openin_subset topology_eq)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   215
qed auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   216
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   217
lemma discrete_topology_unique_alt:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   218
  "discrete_topology U = X \<longleftrightarrow> topspace X \<subseteq> U \<and> (\<forall>x \<in> U. openin X {x})"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   219
  using openin_subset
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   220
  by (auto simp: discrete_topology_unique)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   221
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   222
lemma subtopology_eq_discrete_topology_empty:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   223
   "X = discrete_topology {} \<longleftrightarrow> topspace X = {}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   224
  using discrete_topology_unique [of "{}" X] by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   225
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   226
lemma subtopology_eq_discrete_topology_sing:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   227
   "X = discrete_topology {a} \<longleftrightarrow> topspace X = {a}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   228
  by (metis discrete_topology_unique openin_topspace singletonD)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   229
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   230
abbreviation trivial_topology where "trivial_topology \<equiv> discrete_topology {}"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   231
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   232
lemma null_topspace_iff_trivial [simp]: "topspace X = {} \<longleftrightarrow> X = trivial_topology"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   233
  by (simp add: subtopology_eq_discrete_topology_empty)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   234
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   235
subsection \<open>Subspace topology\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   236
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   237
definition\<^marker>\<open>tag important\<close> subtopology :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a topology" 
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   238
  where "subtopology U V = topology (\<lambda>T. \<exists>S. T = S \<inter> V \<and> openin U S)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   239
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   240
lemma istopology_subtopology: "istopology (\<lambda>T. \<exists>S. T = S \<inter> V \<and> openin U S)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   241
  (is "istopology ?L")
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   242
proof -
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   243
  have "\<And>S T Sa Sb. \<lbrakk>openin U Sa; openin U Sb\<rbrakk> \<Longrightarrow> \<exists>S. Sa \<inter> V \<inter> (Sb \<inter> V) = S \<inter> V \<and> openin U S"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   244
    by (metis Int_assoc inf.absorb2 inf_sup_ord(2) openin_Int)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   245
  moreover 
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   246
  have "\<exists>S. \<Union> \<K> = S \<inter> V \<and> openin U S"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   247
    if \<K>: "\<forall>K\<in>\<K>. \<exists>S. K = S \<inter> V \<and> openin U S" for \<K>
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   248
  proof -
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   249
    obtain f where f: "\<forall>K\<in>\<K>. K = f K \<inter> V \<and> openin U (f K)"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   250
      using \<K> by metis
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   251
    with f show ?thesis
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   252
      by blast
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   253
  qed
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   254
  ultimately show ?thesis
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   255
 unfolding istopology_def by force
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   256
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   257
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   258
lemma openin_subtopology: "openin (subtopology U V) S \<longleftrightarrow> (\<exists>T. openin U T \<and> S = T \<inter> V)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   259
  unfolding subtopology_def topology_inverse'[OF istopology_subtopology]
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   260
  by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   261
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
   262
lemma subset_openin_subtopology:
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
   263
   "\<lbrakk>openin X S; S \<subseteq> T\<rbrakk> \<Longrightarrow> openin (subtopology X T) S"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
   264
  by (metis inf.orderE openin_subtopology)
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
   265
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   266
lemma openin_subtopology_Int:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   267
   "openin X S \<Longrightarrow> openin (subtopology X T) (S \<inter> T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   268
  using openin_subtopology by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   269
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   270
lemma openin_subtopology_Int2:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   271
   "openin X T \<Longrightarrow> openin (subtopology X S) (S \<inter> T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   272
  using openin_subtopology by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   273
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   274
lemma openin_subtopology_diff_closed:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   275
   "\<lbrakk>S \<subseteq> topspace X; closedin X T\<rbrakk> \<Longrightarrow> openin (subtopology X S) (S - T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   276
  unfolding closedin_def openin_subtopology
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   277
  by (rule_tac x="topspace X - T" in exI) auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   278
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   279
lemma openin_relative_to: "(openin X relative_to S) = openin (subtopology X S)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   280
  by (force simp: relative_to_def openin_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   281
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
   282
lemma topspace_subtopology [simp]: "topspace (subtopology U V) = topspace U \<inter> V"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   283
  by (auto simp: topspace_def openin_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   284
69710
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   285
lemma topspace_subtopology_subset:
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   286
   "S \<subseteq> topspace X \<Longrightarrow> topspace(subtopology X S) = S"
71172
nipkow
parents: 70532
diff changeset
   287
  by (simp add: inf.absorb_iff2)
69710
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   288
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   289
lemma closedin_subtopology: "closedin (subtopology U V) S \<longleftrightarrow> (\<exists>T. closedin U T \<and> S = T \<inter> V)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   290
  unfolding closedin_def topspace_subtopology
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   291
  by (auto simp: openin_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   292
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
   293
lemma closedin_subtopology_Int_closed:
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
   294
   "closedin X T \<Longrightarrow> closedin (subtopology X S) (S \<inter> T)"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
   295
  using closedin_subtopology inf_commute by blast
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
   296
78037
37894dff0111 More material from the HOL Light metric space library
paulson <lp15@cam.ac.uk>
parents: 77943
diff changeset
   297
lemma closedin_subset_topspace:
37894dff0111 More material from the HOL Light metric space library
paulson <lp15@cam.ac.uk>
parents: 77943
diff changeset
   298
   "\<lbrakk>closedin X S; S \<subseteq> T\<rbrakk> \<Longrightarrow> closedin (subtopology X T) S"
37894dff0111 More material from the HOL Light metric space library
paulson <lp15@cam.ac.uk>
parents: 77943
diff changeset
   299
  using closedin_subtopology by fastforce
37894dff0111 More material from the HOL Light metric space library
paulson <lp15@cam.ac.uk>
parents: 77943
diff changeset
   300
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
   301
lemma closedin_relative_to:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
   302
   "(closedin X relative_to S) = closedin (subtopology X S)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
   303
  by (force simp: relative_to_def closedin_subtopology)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
   304
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   305
lemma openin_subtopology_refl: "openin (subtopology U V) V \<longleftrightarrow> V \<subseteq> topspace U"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   306
  unfolding openin_subtopology
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   307
  by auto (metis IntD1 in_mono openin_subset)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   308
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   309
lemma subtopology_trivial_iff: "subtopology X S = trivial_topology \<longleftrightarrow> X = trivial_topology \<or> topspace X \<inter> S = {}"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   310
  by (auto simp flip: null_topspace_iff_trivial)
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   311
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   312
lemma subtopology_subtopology:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   313
   "subtopology (subtopology X S) T = subtopology X (S \<inter> T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   314
proof -
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   315
  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)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   316
    by (metis inf_assoc)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   317
  have "subtopology (subtopology X S) T = topology (\<lambda>Ta. \<exists>Sa. Ta = Sa \<inter> T \<and> openin (subtopology X S) Sa)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   318
    by (simp add: subtopology_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   319
  also have "\<dots> = subtopology X (S \<inter> T)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   320
    by (simp add: openin_subtopology eq) (simp add: subtopology_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   321
  finally show ?thesis .
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   322
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   323
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   324
lemma openin_subtopology_alt:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   325
     "openin (subtopology X U) S \<longleftrightarrow> S \<in> (\<lambda>T. U \<inter> T) ` Collect (openin X)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   326
  by (simp add: image_iff inf_commute openin_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   327
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   328
lemma closedin_subtopology_alt:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   329
     "closedin (subtopology X U) S \<longleftrightarrow> S \<in> (\<lambda>T. U \<inter> T) ` Collect (closedin X)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   330
  by (simp add: image_iff inf_commute closedin_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   331
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   332
lemma subtopology_superset:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   333
  assumes UV: "topspace U \<subseteq> V"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   334
  shows "subtopology U V = U"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   335
  unfolding topology_eq openin_subtopology
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   336
proof (intro strip)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   337
  fix S
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   338
  have "openin U S" if "openin U T" "S = T \<inter> V" for T
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   339
    by (metis Int_subset_iff assms inf.orderE openin_subset that)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   340
  then show "(\<exists>T. openin U T \<and> S = T \<inter> V) \<longleftrightarrow> openin U S"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   341
    by (metis assms inf.orderE inf_assoc openin_subset)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   342
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   343
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   344
lemma subtopology_topspace[simp]: "subtopology U (topspace U) = U"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   345
  by (simp add: subtopology_superset)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   346
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   347
lemma subtopology_UNIV[simp]: "subtopology U UNIV = U"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   348
  by (simp add: subtopology_superset)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   349
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   350
lemma subtopology_empty_iff_trivial [simp]: "subtopology X {} = trivial_topology"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   351
  by (simp add: subtopology_eq_discrete_topology_empty)
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   352
69710
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   353
lemma subtopology_restrict:
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   354
   "subtopology X (topspace X \<inter> S) = subtopology X S"
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   355
  by (metis subtopology_subtopology subtopology_topspace)
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   356
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   357
lemma openin_subtopology_empty:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   358
  "openin (subtopology U {}) S \<longleftrightarrow> S = {}"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   359
  by (metis Int_empty_right openin_empty openin_subtopology)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   360
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   361
lemma closedin_subtopology_empty:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   362
  "closedin (subtopology U {}) S \<longleftrightarrow> S = {}"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   363
  by (metis Int_empty_right closedin_empty closedin_subtopology)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   364
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   365
lemma closedin_subtopology_refl [simp]:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   366
  "closedin (subtopology U X) X \<longleftrightarrow> X \<subseteq> topspace U"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   367
  by (metis closedin_def closedin_topspace inf.absorb_iff2 le_inf_iff topspace_subtopology)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   368
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   369
lemma closedin_topspace_empty [simp]: "closedin trivial_topology S \<longleftrightarrow> S = {}"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   370
  by (simp add: closedin_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   371
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   372
lemma openin_topspace_empty [simp]:
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   373
   "openin trivial_topology S \<longleftrightarrow> S = {}"
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
   374
  by (simp add: openin_closedin_eq)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
   375
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   376
lemma openin_imp_subset:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   377
  "openin (subtopology U S) T \<Longrightarrow> T \<subseteq> S"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   378
  by (metis Int_iff openin_subtopology subsetI)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   379
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   380
lemma closedin_imp_subset:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   381
  "closedin (subtopology U S) T \<Longrightarrow> T \<subseteq> S"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   382
  by (simp add: closedin_def)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   383
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   384
lemma openin_open_subtopology:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   385
     "openin X S \<Longrightarrow> openin (subtopology X S) T \<longleftrightarrow> openin X T \<and> T \<subseteq> S"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   386
  by (metis inf.orderE openin_Int openin_imp_subset openin_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   387
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   388
lemma closedin_closed_subtopology:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   389
  "closedin X S \<Longrightarrow> (closedin (subtopology X S) T \<longleftrightarrow> closedin X T \<and> T \<subseteq> S)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   390
  by (metis closedin_Int closedin_imp_subset closedin_subtopology inf.orderE)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   391
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
   392
lemma closedin_trans_full:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   393
  "\<lbrakk>closedin (subtopology X U) S; closedin X U\<rbrakk> \<Longrightarrow> closedin X S"
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
   394
  using closedin_closed_subtopology by blast
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
   395
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   396
lemma openin_subtopology_Un:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   397
  "\<lbrakk>openin (subtopology X T) S; openin (subtopology X U) S\<rbrakk>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   398
     \<Longrightarrow> openin (subtopology X (T \<union> U)) S"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   399
  by (simp add: openin_subtopology) blast
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   400
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   401
lemma closedin_subtopology_Un:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   402
  "\<lbrakk>closedin (subtopology X T) S; closedin (subtopology X U) S\<rbrakk>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   403
     \<Longrightarrow> closedin (subtopology X (T \<union> U)) S"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   404
  by (simp add: closedin_subtopology) blast
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   405
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
   406
lemma openin_trans_full:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   407
  "\<lbrakk>openin (subtopology X U) S; openin X U\<rbrakk> \<Longrightarrow> openin X S"
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
   408
  by (simp add: openin_open_subtopology)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
   409
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
   410
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
   411
subsection \<open>The canonical topology from the underlying type class\<close>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   412
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
   413
abbreviation\<^marker>\<open>tag important\<close> euclidean :: "'a::topological_space topology"
69710
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   414
  where "euclidean \<equiv> topology open"
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   415
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   416
abbreviation top_of_set :: "'a::topological_space set \<Rightarrow> 'a topology"
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   417
  where "top_of_set \<equiv> subtopology (topology open)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   418
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   419
lemma open_openin: "open S \<longleftrightarrow> openin euclidean S"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   420
  by simp
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   421
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   422
declare open_openin [symmetric, simp]
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   423
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   424
lemma topspace_euclidean [simp]: "topspace euclidean = UNIV"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   425
  by (force simp: topspace_def)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   426
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   427
lemma topspace_euclidean_subtopology[simp]: "topspace (top_of_set S) = S"
71172
nipkow
parents: 70532
diff changeset
   428
  by (simp)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   429
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   430
lemma closed_closedin: "closed S \<longleftrightarrow> closedin euclidean S"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   431
  by (simp add: closed_def closedin_def Compl_eq_Diff_UNIV)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   432
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   433
declare closed_closedin [symmetric, simp]
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   434
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   435
lemma openin_subtopology_self [simp]: "openin (top_of_set S) S"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   436
  by (metis openin_topspace topspace_euclidean_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   437
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   438
lemma euclidean_nontrivial [simp]: "euclidean \<noteq> trivial_topology"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   439
  by (simp add: subtopology_eq_discrete_topology_empty)
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   440
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
   441
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   442
subsubsection\<open>The most basic facts about the usual topology and metric on R\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   443
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   444
abbreviation euclideanreal :: "real topology"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   445
  where "euclideanreal \<equiv> topology open"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   446
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   447
subsection \<open>Basic "localization" results are handy for connectedness.\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   448
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   449
lemma openin_open: "openin (top_of_set U) S \<longleftrightarrow> (\<exists>T. open T \<and> (S = U \<inter> T))"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   450
  by (auto simp: openin_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   451
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   452
lemma openin_Int_open:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   453
   "\<lbrakk>openin (top_of_set U) S; open T\<rbrakk>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   454
        \<Longrightarrow> openin (top_of_set U) (S \<inter> T)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   455
by (metis open_Int Int_assoc openin_open)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   456
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   457
lemma openin_open_Int[intro]: "open S \<Longrightarrow> openin (top_of_set U) (U \<inter> S)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   458
  by (auto simp: openin_open)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   459
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   460
lemma open_openin_trans[trans]:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   461
  "open S \<Longrightarrow> open T \<Longrightarrow> T \<subseteq> S \<Longrightarrow> openin (top_of_set S) T"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   462
  by (metis Int_absorb1  openin_open_Int)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   463
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   464
lemma open_subset: "S \<subseteq> T \<Longrightarrow> open S \<Longrightarrow> openin (top_of_set T) S"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   465
  by (auto simp: openin_open)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   466
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   467
lemma closedin_closed: "closedin (top_of_set U) S \<longleftrightarrow> (\<exists>T. closed T \<and> S = U \<inter> T)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   468
  by (simp add: closedin_subtopology Int_ac)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   469
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   470
lemma closedin_closed_Int: "closed S \<Longrightarrow> closedin (top_of_set U) (U \<inter> S)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   471
  by (metis closedin_closed)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   472
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   473
lemma closed_subset: "S \<subseteq> T \<Longrightarrow> closed S \<Longrightarrow> closedin (top_of_set T) S"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   474
  by (auto simp: closedin_closed)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   475
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   476
lemma closedin_closed_subset:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   477
 "\<lbrakk>closedin (top_of_set U) V; T \<subseteq> U; S = V \<inter> T\<rbrakk>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   478
             \<Longrightarrow> closedin (top_of_set T) S"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   479
  by (metis (no_types, lifting) Int_assoc Int_commute closedin_closed inf.orderE)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   480
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   481
lemma finite_imp_closedin:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   482
  fixes S :: "'a::t1_space set"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   483
  shows "\<lbrakk>finite S; S \<subseteq> T\<rbrakk> \<Longrightarrow> closedin (top_of_set T) S"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   484
    by (simp add: finite_imp_closed closed_subset)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   485
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   486
lemma closedin_singleton [simp]:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   487
  fixes a :: "'a::t1_space"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   488
  shows "closedin (top_of_set U) {a} \<longleftrightarrow> a \<in> U"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   489
using closedin_subset  by (force intro: closed_subset)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   490
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   491
lemma openin_euclidean_subtopology_iff:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   492
  fixes S U :: "'a::metric_space set"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   493
  shows "openin (top_of_set U) S \<longleftrightarrow>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   494
    S \<subseteq> U \<and> (\<forall>x\<in>S. \<exists>e>0. \<forall>x'\<in>U. dist x' x < e \<longrightarrow> x'\<in> S)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   495
  (is "?lhs \<longleftrightarrow> ?rhs")
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   496
proof
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   497
  assume ?lhs
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   498
  then show ?rhs
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   499
    unfolding openin_open open_dist by blast
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   500
next
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   501
  define T where "T = {x. \<exists>a\<in>S. \<exists>d>0. (\<forall>y\<in>U. dist y a < d \<longrightarrow> y \<in> S) \<and> dist x a < d}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   502
  have 1: "\<forall>x\<in>T. \<exists>e>0. \<forall>y. dist y x < e \<longrightarrow> y \<in> T"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   503
    unfolding T_def
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   504
    apply clarsimp
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   505
    subgoal for x a d
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   506
      apply (rule_tac x="d - dist x a" in exI)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   507
      by (metis add_0_left dist_commute dist_triangle_lt less_diff_eq)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   508
    done
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   509
  assume ?rhs then have 2: "S = U \<inter> T"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
   510
    unfolding T_def by fastforce
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   511
  from 1 2 show ?lhs
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   512
    unfolding openin_open open_dist by fast
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   513
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   514
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   515
lemma connected_openin:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   516
      "connected S \<longleftrightarrow>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   517
       \<not>(\<exists>E1 E2. openin (top_of_set S) E1 \<and>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   518
                 openin (top_of_set S) E2 \<and>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   519
                 S \<subseteq> E1 \<union> E2 \<and> E1 \<inter> E2 = {} \<and> E1 \<noteq> {} \<and> E2 \<noteq> {})"
71840
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
   520
  unfolding connected_def openin_open disjoint_iff_not_equal by blast
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   521
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   522
lemma connected_openin_eq:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   523
      "connected S \<longleftrightarrow>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   524
       \<not>(\<exists>E1 E2. openin (top_of_set S) E1 \<and>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   525
                 openin (top_of_set S) E2 \<and>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   526
                 E1 \<union> E2 = S \<and> E1 \<inter> E2 = {} \<and>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   527
                 E1 \<noteq> {} \<and> E2 \<noteq> {})"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   528
  unfolding connected_openin
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   529
  by (metis (no_types, lifting) Un_subset_iff openin_imp_subset subset_antisym)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   530
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   531
lemma connected_closedin:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   532
      "connected S \<longleftrightarrow>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   533
       (\<nexists>E1 E2.
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   534
        closedin (top_of_set S) E1 \<and>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   535
        closedin (top_of_set S) E2 \<and>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   536
        S \<subseteq> E1 \<union> E2 \<and> E1 \<inter> E2 = {} \<and> E1 \<noteq> {} \<and> E2 \<noteq> {})"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   537
       (is "?lhs = ?rhs")
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   538
proof
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   539
  assume ?lhs
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   540
  then show ?rhs 
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   541
    by (auto simp add: connected_closed closedin_closed)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   542
next
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   543
  assume R: ?rhs
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   544
  then show ?lhs 
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   545
  proof (clarsimp simp add: connected_closed closedin_closed)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   546
    fix A B 
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   547
    assume s_sub: "S \<subseteq> A \<union> B" "B \<inter> S \<noteq> {}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   548
      and disj: "A \<inter> B \<inter> S = {}"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   549
      and cl: "closed A" "closed B"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   550
    have "S - A = B \<inter> S"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   551
      using Diff_subset_conv Un_Diff_Int disj s_sub(1) by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   552
    then show "A \<inter> S = {}"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   553
      by (metis Int_Diff_Un Int_Diff_disjoint R cl closedin_closed_Int dual_order.refl inf_commute s_sub(2))
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   554
  qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   555
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   556
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   557
lemma connected_closedin_eq:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   558
      "connected S \<longleftrightarrow>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   559
           \<not>(\<exists>E1 E2.
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   560
                 closedin (top_of_set S) E1 \<and>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   561
                 closedin (top_of_set S) E2 \<and>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   562
                 E1 \<union> E2 = S \<and> E1 \<inter> E2 = {} \<and>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   563
                 E1 \<noteq> {} \<and> E2 \<noteq> {})"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   564
  unfolding connected_closedin
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   565
  by (metis Un_subset_iff closedin_imp_subset subset_antisym)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   566
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   567
text \<open>These "transitivity" results are handy too\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   568
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   569
lemma openin_trans[trans]:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   570
  "openin (top_of_set T) S \<Longrightarrow> openin (top_of_set U) T \<Longrightarrow>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   571
    openin (top_of_set U) S"
69710
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
   572
  by (metis openin_Int_open openin_open)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   573
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   574
lemma openin_open_trans: "openin (top_of_set T) S \<Longrightarrow> open T \<Longrightarrow> open S"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   575
  by (auto simp: openin_open intro: openin_trans)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   576
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   577
lemma closedin_trans[trans]:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   578
  "closedin (top_of_set T) S \<Longrightarrow> closedin (top_of_set U) T \<Longrightarrow>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   579
    closedin (top_of_set U) S"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   580
  by (auto simp: closedin_closed closed_Inter Int_assoc)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   581
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   582
lemma closedin_closed_trans: "closedin (top_of_set T) S \<Longrightarrow> closed T \<Longrightarrow> closed S"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   583
  by (auto simp: closedin_closed intro: closedin_trans)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   584
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   585
lemma openin_subtopology_Int_subset:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   586
   "\<lbrakk>openin (top_of_set u) (u \<inter> S); v \<subseteq> u\<rbrakk> \<Longrightarrow> openin (top_of_set v) (v \<inter> S)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   587
  by (auto simp: openin_subtopology)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   588
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
   589
lemma openin_open_eq: "open s \<Longrightarrow> (openin (top_of_set s) t \<longleftrightarrow> open t \<and> t \<subseteq> s)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   590
  using open_subset openin_open_trans openin_subset by fastforce
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
   591
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   592
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   593
subsection\<open>Derived set (set of limit points)\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   594
80914
d97fdabd9e2b standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents: 78336
diff changeset
   595
definition derived_set_of :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl \<open>derived'_set'_of\<close> 80)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   596
  where "X derived_set_of S \<equiv>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   597
         {x \<in> topspace X.
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   598
                (\<forall>T. x \<in> T \<and> openin X T \<longrightarrow> (\<exists>y\<noteq>x. y \<in> S \<and> y \<in> T))}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   599
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
   600
lemma derived_set_of_restrict [simp]:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   601
   "X derived_set_of (topspace X \<inter> S) = X derived_set_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   602
  by (simp add: derived_set_of_def) (metis openin_subset subset_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   603
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   604
lemma in_derived_set_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   605
   "x \<in> X derived_set_of S \<longleftrightarrow> x \<in> topspace X \<and> (\<forall>T. x \<in> T \<and> openin X T \<longrightarrow> (\<exists>y\<noteq>x. y \<in> S \<and> y \<in> T))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   606
  by (simp add: derived_set_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   607
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   608
lemma derived_set_of_subset_topspace:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   609
   "X derived_set_of S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   610
  by (auto simp add: derived_set_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   611
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   612
lemma derived_set_of_subtopology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   613
   "(subtopology X U) derived_set_of S = U \<inter> (X derived_set_of (U \<inter> S))"
71172
nipkow
parents: 70532
diff changeset
   614
  by (simp add: derived_set_of_def openin_subtopology) blast
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   615
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   616
lemma derived_set_of_subset_subtopology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   617
   "(subtopology X S) derived_set_of T \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   618
  by (simp add: derived_set_of_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   619
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   620
lemma derived_set_of_empty [simp]: "X derived_set_of {} = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   621
  by (auto simp: derived_set_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   622
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   623
lemma derived_set_of_mono:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   624
   "S \<subseteq> T \<Longrightarrow> X derived_set_of S \<subseteq> X derived_set_of T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   625
  unfolding derived_set_of_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   626
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
   627
lemma derived_set_of_Un:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   628
   "X derived_set_of (S \<union> T) = X derived_set_of S \<union> X derived_set_of T" (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   629
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   630
  show "?lhs \<subseteq> ?rhs"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   631
    by (clarsimp simp: in_derived_set_of) (metis IntE IntI openin_Int)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   632
  show "?rhs \<subseteq> ?lhs"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   633
    by (simp add: derived_set_of_mono)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   634
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   635
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
   636
lemma derived_set_of_Union:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   637
   "finite \<F> \<Longrightarrow> X derived_set_of (\<Union>\<F>) = (\<Union>S \<in> \<F>. X derived_set_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   638
proof (induction \<F> rule: finite_induct)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   639
  case (insert S \<F>)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   640
  then show ?case
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
   641
    by (simp add: derived_set_of_Un)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   642
qed auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   643
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   644
lemma derived_set_of_topspace:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   645
  "X derived_set_of (topspace X) = {x \<in> topspace X. \<not> openin X {x}}" (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   646
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   647
  show "?lhs \<subseteq> ?rhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   648
    by (auto simp: in_derived_set_of)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   649
  show "?rhs \<subseteq> ?lhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   650
    by (clarsimp simp: in_derived_set_of) (metis openin_closedin_eq openin_subopen singletonD subset_eq)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   651
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   652
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   653
lemma discrete_topology_unique_derived_set:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   654
     "discrete_topology U = X \<longleftrightarrow> topspace X = U \<and> X derived_set_of U = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   655
  by (auto simp: discrete_topology_unique derived_set_of_topspace)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   656
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   657
lemma subtopology_eq_discrete_topology_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   658
   "subtopology X U = discrete_topology U \<longleftrightarrow> U \<subseteq> topspace X \<and> U \<inter> X derived_set_of U = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   659
  using discrete_topology_unique_derived_set [of U "subtopology X U"]
71172
nipkow
parents: 70532
diff changeset
   660
  by (auto simp: eq_commute derived_set_of_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   661
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   662
lemma subtopology_eq_discrete_topology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   663
   "S \<subseteq> topspace X \<and> S \<inter> X derived_set_of S = {}
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   664
        \<Longrightarrow> subtopology X S = discrete_topology S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   665
  by (simp add: subtopology_eq_discrete_topology_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   666
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   667
lemma subtopology_eq_discrete_topology_gen:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   668
  assumes "S \<inter> X derived_set_of S = {}"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   669
  shows "subtopology X S = discrete_topology(topspace X \<inter> S)"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   670
proof -
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   671
  have "subtopology X S = subtopology X (topspace X \<inter> S)"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   672
    by (simp add: subtopology_restrict)
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   673
  then show ?thesis
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   674
    using assms by (simp add: inf.assoc subtopology_eq_discrete_topology_eq)
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   675
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   676
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   677
lemma subtopology_discrete_topology [simp]: 
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   678
  "subtopology (discrete_topology U) S = discrete_topology(U \<inter> S)"
69712
dc85b5b3a532 renamings and new material
paulson <lp15@cam.ac.uk>
parents: 69710
diff changeset
   679
proof -
dc85b5b3a532 renamings and new material
paulson <lp15@cam.ac.uk>
parents: 69710
diff changeset
   680
  have "(\<lambda>T. \<exists>Sa. T = Sa \<inter> S \<and> Sa \<subseteq> U) = (\<lambda>Sa. Sa \<subseteq> U \<and> Sa \<subseteq> S)"
dc85b5b3a532 renamings and new material
paulson <lp15@cam.ac.uk>
parents: 69710
diff changeset
   681
    by force
dc85b5b3a532 renamings and new material
paulson <lp15@cam.ac.uk>
parents: 69710
diff changeset
   682
  then show ?thesis
dc85b5b3a532 renamings and new material
paulson <lp15@cam.ac.uk>
parents: 69710
diff changeset
   683
    by (simp add: subtopology_def) (simp add: discrete_topology_def)
dc85b5b3a532 renamings and new material
paulson <lp15@cam.ac.uk>
parents: 69710
diff changeset
   684
qed
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   685
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   686
lemma openin_Int_derived_set_of_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   687
   "openin X S \<Longrightarrow> S \<inter> X derived_set_of T \<subseteq> X derived_set_of (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   688
  by (auto simp: derived_set_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   689
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   690
lemma openin_Int_derived_set_of_eq:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   691
  assumes "openin X S"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   692
  shows "S \<inter> X derived_set_of T = S \<inter> X derived_set_of (S \<inter> T)" (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   693
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   694
  show "?lhs \<subseteq> ?rhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   695
    by (simp add: assms openin_Int_derived_set_of_subset)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   696
  show "?rhs \<subseteq> ?lhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   697
    by (metis derived_set_of_mono inf_commute inf_le1 inf_mono order_refl)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   698
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   699
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   700
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   701
subsection\<open> Closure with respect to a topological space\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   702
80914
d97fdabd9e2b standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents: 78336
diff changeset
   703
definition closure_of :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixr \<open>closure'_of\<close> 80)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   704
  where "X closure_of S \<equiv> {x \<in> topspace X. \<forall>T. x \<in> T \<and> openin X T \<longrightarrow> (\<exists>y \<in> S. y \<in> T)}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   705
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   706
lemma closure_of_restrict: "X closure_of S = X closure_of (topspace X \<inter> S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   707
  unfolding closure_of_def
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   708
  using openin_subset by blast
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   709
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   710
lemma in_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   711
   "x \<in> X closure_of S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   712
    x \<in> topspace X \<and> (\<forall>T. x \<in> T \<and> openin X T \<longrightarrow> (\<exists>y. y \<in> S \<and> y \<in> T))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   713
  by (auto simp: closure_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   714
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   715
lemma closure_of: "X closure_of S = topspace X \<inter> (S \<union> X derived_set_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   716
  by (fastforce simp: in_closure_of in_derived_set_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   717
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   718
lemma closure_of_alt: "X closure_of S = topspace X \<inter> S \<union> X derived_set_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   719
  using derived_set_of_subset_topspace [of X S]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   720
  unfolding closure_of_def in_derived_set_of
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   721
  by safe (auto simp: in_derived_set_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   722
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   723
lemma derived_set_of_subset_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   724
   "X derived_set_of S \<subseteq> X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   725
  by (fastforce simp: closure_of_def in_derived_set_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   726
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   727
lemma closure_of_subtopology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   728
  "(subtopology X U) closure_of S = U \<inter> (X closure_of (U \<inter> S))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   729
  unfolding closure_of_def topspace_subtopology openin_subtopology
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   730
  by safe (metis (full_types) IntI Int_iff inf.commute)+
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   731
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   732
lemma closure_of_empty [simp]: "X closure_of {} = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   733
  by (simp add: closure_of_alt)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   734
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   735
lemma closure_of_topspace [simp]: "X closure_of topspace X = topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   736
  by (simp add: closure_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   737
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   738
lemma closure_of_UNIV [simp]: "X closure_of UNIV = topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   739
  by (simp add: closure_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   740
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   741
lemma closure_of_subset_topspace: "X closure_of S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   742
  by (simp add: closure_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   743
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   744
lemma closure_of_subset_subtopology: "(subtopology X S) closure_of T \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   745
  by (simp add: closure_of_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   746
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   747
lemma closure_of_mono: "S \<subseteq> T \<Longrightarrow> X closure_of S \<subseteq> X closure_of T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   748
  by (fastforce simp add: closure_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   749
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   750
lemma closure_of_subtopology_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   751
   "(subtopology X U) closure_of S \<subseteq> (X closure_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   752
  unfolding closure_of_subtopology
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   753
  by clarsimp (meson closure_of_mono contra_subsetD inf.cobounded2)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   754
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   755
lemma closure_of_subtopology_mono:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   756
   "T \<subseteq> U \<Longrightarrow> (subtopology X T) closure_of S \<subseteq> (subtopology X U) closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   757
  unfolding closure_of_subtopology
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   758
  by auto (meson closure_of_mono inf_mono subset_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   759
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   760
lemma closure_of_Un [simp]: "X closure_of (S \<union> T) = X closure_of S \<union> X closure_of T"
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
   761
  by (simp add: Un_assoc Un_left_commute closure_of_alt derived_set_of_Un inf_sup_distrib1)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   762
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   763
lemma closure_of_Union:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   764
   "finite \<F> \<Longrightarrow> X closure_of (\<Union>\<F>) = (\<Union>S \<in> \<F>. X closure_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   765
by (induction \<F> rule: finite_induct) auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   766
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   767
lemma closure_of_subset: "S \<subseteq> topspace X \<Longrightarrow> S \<subseteq> X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   768
  by (auto simp: closure_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   769
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   770
lemma closure_of_subset_Int: "topspace X \<inter> S \<subseteq> X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   771
  by (auto simp: closure_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   772
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   773
lemma closure_of_subset_eq: "S \<subseteq> topspace X \<and> X closure_of S \<subseteq> S \<longleftrightarrow> closedin X S"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   774
proof -
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   775
  have "openin X (topspace X - S)"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   776
    if "\<And>x. \<lbrakk>x \<in> topspace X; \<forall>T. x \<in> T \<and> openin X T \<longrightarrow> S \<inter> T \<noteq> {}\<rbrakk> \<Longrightarrow> x \<in> S"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   777
    apply (subst openin_subopen)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   778
    by (metis Diff_iff Diff_mono Diff_triv inf.commute openin_subset order_refl that)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   779
  then show ?thesis
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   780
    by (auto simp: closedin_def closure_of_def disjoint_iff_not_equal)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   781
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   782
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   783
lemma closure_of_eq: "X closure_of S = S \<longleftrightarrow> closedin X S"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   784
  by (metis closure_of_subset closure_of_subset_eq closure_of_subset_topspace subset_antisym)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   785
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   786
lemma closedin_contains_derived_set:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   787
   "closedin X S \<longleftrightarrow> X derived_set_of S \<subseteq> S \<and> S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   788
proof (intro iffI conjI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   789
  show "closedin X S \<Longrightarrow> X derived_set_of S \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   790
    using closure_of_eq derived_set_of_subset_closure_of by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   791
  show "closedin X S \<Longrightarrow> S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   792
    using closedin_subset by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   793
  show "X derived_set_of S \<subseteq> S \<and> S \<subseteq> topspace X \<Longrightarrow> closedin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   794
    by (metis closure_of closure_of_eq inf.absorb_iff2 sup.orderE)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   795
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   796
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   797
lemma derived_set_subset_gen:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   798
   "X derived_set_of S \<subseteq> S \<longleftrightarrow> closedin X (topspace X \<inter> S)"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   799
  by (simp add: closedin_contains_derived_set derived_set_of_subset_topspace)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   800
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   801
lemma derived_set_subset: "S \<subseteq> topspace X \<Longrightarrow> (X derived_set_of S \<subseteq> S \<longleftrightarrow> closedin X S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   802
  by (simp add: closedin_contains_derived_set)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   803
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   804
lemma closedin_derived_set:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   805
     "closedin (subtopology X T) S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   806
      S \<subseteq> topspace X \<and> S \<subseteq> T \<and> (\<forall>x. x \<in> X derived_set_of S \<and> x \<in> T \<longrightarrow> x \<in> S)"
71172
nipkow
parents: 70532
diff changeset
   807
  by (auto simp: closedin_contains_derived_set derived_set_of_subtopology Int_absorb1)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   808
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   809
lemma closedin_Int_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   810
     "closedin (subtopology X S) T \<longleftrightarrow> S \<inter> X closure_of T = T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   811
  by (metis Int_left_absorb closure_of_eq closure_of_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   812
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   813
lemma closure_of_closedin: "closedin X S \<Longrightarrow> X closure_of S = S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   814
  by (simp add: closure_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   815
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   816
lemma closure_of_eq_diff: "X closure_of S = topspace X - \<Union>{T. openin X T \<and> disjnt S T}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   817
  by (auto simp: closure_of_def disjnt_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   818
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   819
lemma closedin_closure_of [simp]: "closedin X (X closure_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   820
  unfolding closure_of_eq_diff by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   821
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   822
lemma closure_of_closure_of [simp]: "X closure_of (X closure_of S) = X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   823
  by (simp add: closure_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   824
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   825
lemma closure_of_hull:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   826
  assumes "S \<subseteq> topspace X" shows "X closure_of S = (closedin X) hull S"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   827
  by (metis assms closedin_closure_of closure_of_eq closure_of_mono closure_of_subset hull_unique)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   828
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   829
lemma closure_of_minimal:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   830
   "\<lbrakk>S \<subseteq> T; closedin X T\<rbrakk> \<Longrightarrow> (X closure_of S) \<subseteq> T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   831
  by (metis closure_of_eq closure_of_mono)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   832
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   833
lemma closure_of_minimal_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   834
   "\<lbrakk>S \<subseteq> topspace X; closedin X T\<rbrakk> \<Longrightarrow> (X closure_of S) \<subseteq> T \<longleftrightarrow> S \<subseteq> T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   835
  by (meson closure_of_minimal closure_of_subset subset_trans)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   836
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   837
lemma closure_of_unique:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   838
   "\<lbrakk>S \<subseteq> T; closedin X T;
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   839
     \<And>T'. \<lbrakk>S \<subseteq> T'; closedin X T'\<rbrakk> \<Longrightarrow> T \<subseteq> T'\<rbrakk>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   840
    \<Longrightarrow> X closure_of S = T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   841
  by (meson closedin_closure_of closedin_subset closure_of_minimal closure_of_subset eq_iff order.trans)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   842
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   843
lemma closure_of_eq_empty_gen: "X closure_of S = {} \<longleftrightarrow> disjnt (topspace X) S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   844
  unfolding disjnt_def closure_of_restrict [where S=S]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   845
  using closure_of by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   846
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   847
lemma closure_of_eq_empty: "S \<subseteq> topspace X \<Longrightarrow> X closure_of S = {} \<longleftrightarrow> S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   848
  using closure_of_subset by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   849
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   850
lemma openin_Int_closure_of_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   851
  assumes "openin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   852
  shows "S \<inter> X closure_of T \<subseteq> X closure_of (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   853
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   854
  have "S \<inter> X derived_set_of T = S \<inter> X derived_set_of (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   855
    by (meson assms openin_Int_derived_set_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   856
  moreover have "S \<inter> (S \<inter> T) = S \<inter> T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   857
    by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   858
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   859
    by (metis closure_of_alt inf.cobounded2 inf_left_commute inf_sup_distrib1)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   860
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   861
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   862
lemma closure_of_openin_Int_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   863
  assumes "openin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   864
  shows "X closure_of (S \<inter> X closure_of T) = X closure_of (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   865
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   866
  show "X closure_of (S \<inter> X closure_of T) \<subseteq> X closure_of (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   867
    by (simp add: assms closure_of_minimal openin_Int_closure_of_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   868
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   869
  show "X closure_of (S \<inter> T) \<subseteq> X closure_of (S \<inter> X closure_of T)"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   870
    by (metis Int_subset_iff assms closure_of_alt closure_of_mono inf_mono openin_subset subset_refl sup.coboundedI1)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   871
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   872
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   873
lemma openin_Int_closure_of_eq:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   874
  assumes "openin X S" shows "S \<inter> X closure_of T = S \<inter> X closure_of (S \<inter> T)"  (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   875
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   876
  show "?lhs \<subseteq> ?rhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   877
    by (simp add: assms openin_Int_closure_of_subset)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   878
  show "?rhs \<subseteq> ?lhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   879
    by (metis closure_of_mono inf_commute inf_le1 inf_mono order_refl)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   880
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   881
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   882
lemma openin_Int_closure_of_eq_empty:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   883
  assumes "openin X S" shows "S \<inter> X closure_of T = {} \<longleftrightarrow> S \<inter> T = {}"  (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   884
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   885
  show "?lhs \<Longrightarrow> ?rhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   886
    unfolding disjoint_iff
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   887
    by (meson assms in_closure_of in_mono openin_subset)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   888
  show "?rhs \<Longrightarrow> ?lhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   889
    by (simp add: assms openin_Int_closure_of_eq)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   890
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   891
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   892
lemma closure_of_openin_Int_superset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   893
   "openin X S \<and> S \<subseteq> X closure_of T
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   894
        \<Longrightarrow> X closure_of (S \<inter> T) = X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   895
  by (metis closure_of_openin_Int_closure_of inf.orderE)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   896
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   897
lemma closure_of_openin_subtopology_Int_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   898
  assumes S: "openin (subtopology X U) S" and "T \<subseteq> U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   899
  shows "X closure_of (S \<inter> X closure_of T) = X closure_of (S \<inter> T)" (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   900
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   901
  obtain S0 where S0: "openin X S0" "S = S0 \<inter> U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   902
    using assms by (auto simp: openin_subtopology)
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   903
  then show "?lhs \<subseteq> ?rhs"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   904
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   905
    have "S0 \<inter> X closure_of T = S0 \<inter> X closure_of (S0 \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   906
      by (meson S0(1) openin_Int_closure_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   907
    moreover have "S0 \<inter> T = S0 \<inter> U \<inter> T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   908
      using \<open>T \<subseteq> U\<close> by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   909
    ultimately have "S \<inter> X closure_of T \<subseteq> X closure_of (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   910
      using S0(2) by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   911
    then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   912
      by (meson closedin_closure_of closure_of_minimal)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   913
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   914
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   915
  show "?rhs \<subseteq> ?lhs"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   916
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   917
    have "T \<inter> S \<subseteq> T \<union> X derived_set_of T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   918
      by force
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   919
    then show ?thesis
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
   920
      by (smt (verit, del_insts) Int_iff in_closure_of inf.orderE openin_subset subsetI)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   921
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   922
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   923
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   924
lemma closure_of_subtopology_open:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   925
     "openin X U \<or> S \<subseteq> U \<Longrightarrow> (subtopology X U) closure_of S = U \<inter> X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   926
  by (metis closure_of_subtopology inf_absorb2 openin_Int_closure_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   927
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   928
lemma discrete_topology_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   929
     "(discrete_topology U) closure_of S = U \<inter> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   930
  by (metis closedin_discrete_topology closure_of_restrict closure_of_unique discrete_topology_unique inf_sup_ord(1) order_refl)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   931
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   932
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   933
text\<open> Interior with respect to a topological space.                             \<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   934
80914
d97fdabd9e2b standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents: 78336
diff changeset
   935
definition interior_of :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixr \<open>interior'_of\<close> 80)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   936
  where "X interior_of S \<equiv> {x. \<exists>T. openin X T \<and> x \<in> T \<and> T \<subseteq> S}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   937
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   938
lemma interior_of_restrict:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   939
   "X interior_of S = X interior_of (topspace X \<inter> S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   940
  using openin_subset by (auto simp: interior_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   941
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   942
lemma interior_of_eq: "(X interior_of S = S) \<longleftrightarrow> openin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   943
  unfolding interior_of_def  using openin_subopen by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   944
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   945
lemma interior_of_openin: "openin X S \<Longrightarrow> X interior_of S = S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   946
  by (simp add: interior_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   947
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   948
lemma interior_of_empty [simp]: "X interior_of {} = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   949
  by (simp add: interior_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   950
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   951
lemma interior_of_topspace [simp]: "X interior_of (topspace X) = topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   952
  by (simp add: interior_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   953
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   954
lemma openin_interior_of [simp]: "openin X (X interior_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   955
  unfolding interior_of_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   956
  using openin_subopen by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   957
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   958
lemma interior_of_interior_of [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   959
   "X interior_of X interior_of S = X interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   960
  by (simp add: interior_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   961
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   962
lemma interior_of_subset: "X interior_of S \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   963
  by (auto simp: interior_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   964
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   965
lemma interior_of_subset_closure_of: "X interior_of S \<subseteq> X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   966
  by (metis closure_of_subset_Int dual_order.trans interior_of_restrict interior_of_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   967
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   968
lemma subset_interior_of_eq: "S \<subseteq> X interior_of S \<longleftrightarrow> openin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   969
  by (metis interior_of_eq interior_of_subset subset_antisym)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   970
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   971
lemma interior_of_mono: "S \<subseteq> T \<Longrightarrow> X interior_of S \<subseteq> X interior_of T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   972
  by (auto simp: interior_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   973
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   974
lemma interior_of_maximal: "\<lbrakk>T \<subseteq> S; openin X T\<rbrakk> \<Longrightarrow> T \<subseteq> X interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   975
  by (auto simp: interior_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   976
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   977
lemma interior_of_maximal_eq: "openin X T \<Longrightarrow> T \<subseteq> X interior_of S \<longleftrightarrow> T \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   978
  by (meson interior_of_maximal interior_of_subset order_trans)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   979
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   980
lemma interior_of_unique:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   981
   "\<lbrakk>T \<subseteq> S; openin X T; \<And>T'. \<lbrakk>T' \<subseteq> S; openin X T'\<rbrakk> \<Longrightarrow> T' \<subseteq> T\<rbrakk> \<Longrightarrow> X interior_of S = T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   982
  by (simp add: interior_of_maximal_eq interior_of_subset subset_antisym)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   983
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   984
lemma interior_of_subset_topspace: "X interior_of S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   985
  by (simp add: openin_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   986
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   987
lemma interior_of_subset_subtopology: "(subtopology X S) interior_of T \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   988
  by (meson openin_imp_subset openin_interior_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   989
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   990
lemma interior_of_Int: "X interior_of (S \<inter> T) = X interior_of S \<inter> X interior_of T"  (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   991
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   992
  show "?lhs \<subseteq> ?rhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   993
    by (simp add: interior_of_mono)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   994
  show "?rhs \<subseteq> ?lhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   995
    by (meson inf_mono interior_of_maximal interior_of_subset openin_Int openin_interior_of)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
   996
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   997
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   998
lemma interior_of_Inter_subset: "X interior_of (\<Inter>\<F>) \<subseteq> (\<Inter>S \<in> \<F>. X interior_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   999
  by (simp add: INT_greatest Inf_lower interior_of_mono)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1000
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1001
lemma union_interior_of_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1002
   "X interior_of S \<union> X interior_of T \<subseteq> X interior_of (S \<union> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1003
  by (simp add: interior_of_mono)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1004
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1005
lemma interior_of_eq_empty:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1006
   "X interior_of S = {} \<longleftrightarrow> (\<forall>T. openin X T \<and> T \<subseteq> S \<longrightarrow> T = {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1007
  by (metis bot.extremum_uniqueI interior_of_maximal interior_of_subset openin_interior_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1008
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1009
lemma interior_of_eq_empty_alt:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1010
   "X interior_of S = {} \<longleftrightarrow> (\<forall>T. openin X T \<and> T \<noteq> {} \<longrightarrow> T - S \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1011
  by (auto simp: interior_of_eq_empty)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1012
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1013
lemma interior_of_Union_openin_subsets:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1014
   "\<Union>{T. openin X T \<and> T \<subseteq> S} = X interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1015
  by (rule interior_of_unique [symmetric]) auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1016
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1017
lemma interior_of_complement:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1018
   "X interior_of (topspace X - S) = topspace X - X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1019
  by (auto simp: interior_of_def closure_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1020
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1021
lemma interior_of_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1022
   "X interior_of S = topspace X - X closure_of (topspace X - S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1023
  unfolding interior_of_complement [symmetric]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1024
  by (metis Diff_Diff_Int interior_of_restrict)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1025
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1026
lemma closure_of_interior_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1027
   "X closure_of S = topspace X - X interior_of (topspace X - S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1028
  by (simp add: interior_of_complement Diff_Diff_Int closure_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1029
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1030
lemma closure_of_complement: "X closure_of (topspace X - S) = topspace X - X interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1031
  unfolding interior_of_def closure_of_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1032
  by (blast dest: openin_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1033
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1034
lemma interior_of_eq_empty_complement:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1035
  "X interior_of S = {} \<longleftrightarrow> X closure_of (topspace X - S) = topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1036
  using interior_of_subset_topspace [of X S] closure_of_complement by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1037
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1038
lemma closure_of_eq_topspace:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1039
   "X closure_of S = topspace X \<longleftrightarrow> X interior_of (topspace X - S) = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1040
  using closure_of_subset_topspace [of X S] interior_of_complement by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1041
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1042
lemma interior_of_subtopology_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1043
     "U \<inter> X interior_of S \<subseteq> (subtopology X U) interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1044
  by (auto simp: interior_of_def openin_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1045
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1046
lemma interior_of_subtopology_subsets:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1047
   "T \<subseteq> U \<Longrightarrow> T \<inter> (subtopology X U) interior_of S \<subseteq> (subtopology X T) interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1048
  by (metis inf.absorb_iff2 interior_of_subtopology_subset subtopology_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1049
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1050
lemma interior_of_subtopology_mono:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1051
   "\<lbrakk>S \<subseteq> T; T \<subseteq> U\<rbrakk> \<Longrightarrow> (subtopology X U) interior_of S \<subseteq> (subtopology X T) interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1052
  by (metis dual_order.trans inf.orderE inf_commute interior_of_subset interior_of_subtopology_subsets)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1053
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1054
lemma interior_of_subtopology_open:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1055
  assumes "openin X U"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1056
  shows "(subtopology X U) interior_of S = U \<inter> X interior_of S" (is "?lhs = ?rhs")
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1057
proof
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1058
  show "?lhs \<subseteq> ?rhs"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1059
    by (meson assms interior_of_maximal interior_of_subset le_infI openin_interior_of openin_open_subtopology)
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1060
  show "?rhs \<subseteq> ?lhs"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1061
    by (simp add: interior_of_subtopology_subset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1062
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1063
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1064
lemma dense_intersects_open:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1065
   "X closure_of S = topspace X \<longleftrightarrow> (\<forall>T. openin X T \<and> T \<noteq> {} \<longrightarrow> S \<inter> T \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1066
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1067
  have "X closure_of S = topspace X \<longleftrightarrow> (topspace X - X interior_of (topspace X - S) = topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1068
    by (simp add: closure_of_interior_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1069
  also have "\<dots> \<longleftrightarrow> X interior_of (topspace X - S) = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1070
    by (simp add: closure_of_complement interior_of_eq_empty_complement)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1071
  also have "\<dots> \<longleftrightarrow> (\<forall>T. openin X T \<and> T \<noteq> {} \<longrightarrow> S \<inter> T \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1072
    unfolding interior_of_eq_empty_alt
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1073
    using openin_subset by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1074
  finally show ?thesis .
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1075
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1076
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1077
lemma interior_of_closedin_union_empty_interior_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1078
  assumes "closedin X S" and disj: "X interior_of T = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1079
  shows "X interior_of (S \<union> T) = X interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1080
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1081
  have "X closure_of (topspace X - T) = topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1082
    by (metis Diff_Diff_Int disj closure_of_eq_topspace closure_of_restrict interior_of_closure_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1083
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1084
    unfolding interior_of_closure_of
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1085
    by (metis Diff_Un Diff_subset assms(1) closedin_def closure_of_openin_Int_superset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1086
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1087
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1088
lemma interior_of_union_eq_empty:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1089
   "closedin X S
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1090
        \<Longrightarrow> (X interior_of (S \<union> T) = {} \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1091
             X interior_of S = {} \<and> X interior_of T = {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1092
  by (metis interior_of_closedin_union_empty_interior_of le_sup_iff subset_empty union_interior_of_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1093
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1094
lemma discrete_topology_interior_of [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1095
    "(discrete_topology U) interior_of S = U \<inter> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1096
  by (simp add: interior_of_restrict [of _ S] interior_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1097
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1098
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1099
subsection \<open>Frontier with respect to topological space \<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1100
80914
d97fdabd9e2b standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents: 78336
diff changeset
  1101
definition frontier_of :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixr \<open>frontier'_of\<close> 80)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1102
  where "X frontier_of S \<equiv> X closure_of S - X interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1103
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1104
lemma frontier_of_closures:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1105
     "X frontier_of S = X closure_of S \<inter> X closure_of (topspace X - S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1106
  by (metis Diff_Diff_Int closure_of_complement closure_of_subset_topspace double_diff frontier_of_def interior_of_subset_closure_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1107
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1108
lemma interior_of_union_frontier_of [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1109
     "X interior_of S \<union> X frontier_of S = X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1110
  by (simp add: frontier_of_def interior_of_subset_closure_of subset_antisym)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1111
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1112
lemma frontier_of_restrict: "X frontier_of S = X frontier_of (topspace X \<inter> S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1113
  by (metis closure_of_restrict frontier_of_def interior_of_restrict)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1114
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1115
lemma closedin_frontier_of: "closedin X (X frontier_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1116
  by (simp add: closedin_Int frontier_of_closures)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1117
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1118
lemma frontier_of_subset_topspace: "X frontier_of S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1119
  by (simp add: closedin_frontier_of closedin_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1120
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1121
lemma frontier_of_subset_subtopology: "(subtopology X S) frontier_of T \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1122
  by (metis (no_types) closedin_derived_set closedin_frontier_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1123
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1124
lemma frontier_of_subtopology_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1125
  "U \<inter> (subtopology X U) frontier_of S \<subseteq> (X frontier_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1126
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1127
  have "U \<inter> X interior_of S - subtopology X U interior_of S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1128
    by (simp add: interior_of_subtopology_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1129
  moreover have "X closure_of S \<inter> subtopology X U closure_of S = subtopology X U closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1130
    by (meson closure_of_subtopology_subset inf.absorb_iff2)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1131
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1132
    unfolding frontier_of_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1133
    by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1134
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1135
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1136
lemma frontier_of_subtopology_mono:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1137
   "\<lbrakk>S \<subseteq> T; T \<subseteq> U\<rbrakk> \<Longrightarrow> (subtopology X T) frontier_of S \<subseteq> (subtopology X U) frontier_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1138
    by (simp add: frontier_of_def Diff_mono closure_of_subtopology_mono interior_of_subtopology_mono)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1139
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1140
lemma clopenin_eq_frontier_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1141
   "closedin X S \<and> openin X S \<longleftrightarrow> S \<subseteq> topspace X \<and> X frontier_of S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1142
proof (cases "S \<subseteq> topspace X")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1143
  case True
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1144
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1145
    by (metis Diff_eq_empty_iff closure_of_eq closure_of_subset_eq frontier_of_def interior_of_eq interior_of_subset interior_of_union_frontier_of sup_bot_right)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1146
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1147
  case False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1148
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1149
    by (simp add: frontier_of_closures openin_closedin_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1150
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1151
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1152
lemma frontier_of_eq_empty:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1153
     "S \<subseteq> topspace X \<Longrightarrow> (X frontier_of S = {} \<longleftrightarrow> closedin X S \<and> openin X S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1154
  by (simp add: clopenin_eq_frontier_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1155
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1156
lemma frontier_of_openin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1157
     "openin X S \<Longrightarrow> X frontier_of S = X closure_of S - S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1158
  by (metis (no_types) frontier_of_def interior_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1159
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1160
lemma frontier_of_openin_straddle_Int:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1161
  assumes "openin X U" "U \<inter> X frontier_of S \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1162
  shows "U \<inter> S \<noteq> {}" "U - S \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1163
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1164
  have "U \<inter> (X closure_of S \<inter> X closure_of (topspace X - S)) \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1165
    using assms by (simp add: frontier_of_closures)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1166
  then show "U \<inter> S \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1167
    using assms openin_Int_closure_of_eq_empty by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1168
  show "U - S \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1169
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1170
    have "\<exists>A. X closure_of (A - S) \<inter> U \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1171
      using \<open>U \<inter> (X closure_of S \<inter> X closure_of (topspace X - S)) \<noteq> {}\<close> by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1172
    then have "\<not> U \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1173
      by (metis Diff_disjoint Diff_eq_empty_iff Int_Diff assms(1) inf_commute openin_Int_closure_of_eq_empty)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1174
    then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1175
      by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1176
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1177
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1178
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1179
lemma frontier_of_subset_closedin: "closedin X S \<Longrightarrow> (X frontier_of S) \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1180
  using closure_of_eq frontier_of_def by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1181
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1182
lemma frontier_of_empty [simp]: "X frontier_of {} = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1183
  by (simp add: frontier_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1184
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1185
lemma frontier_of_topspace [simp]: "X frontier_of topspace X = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1186
  by (simp add: frontier_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1187
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1188
lemma frontier_of_subset_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1189
  assumes "S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1190
  shows "(X frontier_of S) \<subseteq> S \<longleftrightarrow> closedin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1191
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1192
  show "X frontier_of S \<subseteq> S \<Longrightarrow> closedin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1193
    by (metis assms closure_of_subset_eq interior_of_subset interior_of_union_frontier_of le_sup_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1194
  show "closedin X S \<Longrightarrow> X frontier_of S \<subseteq> S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1195
    by (simp add: frontier_of_subset_closedin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1196
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1197
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1198
lemma frontier_of_complement: "X frontier_of (topspace X - S) = X frontier_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1199
  by (metis Diff_Diff_Int closure_of_restrict frontier_of_closures inf_commute)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1200
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1201
lemma frontier_of_disjoint_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1202
  assumes "S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1203
  shows "((X frontier_of S) \<inter> S = {} \<longleftrightarrow> openin X S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1204
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1205
  assume "X frontier_of S \<inter> S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1206
  then have "closedin X (topspace X - S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1207
    using assms closure_of_subset frontier_of_def interior_of_eq interior_of_subset by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1208
  then show "openin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1209
    using assms by (simp add: openin_closedin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1210
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1211
  show "openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1212
    by (simp add: Diff_Diff_Int closedin_def frontier_of_openin inf.absorb_iff2 inf_commute)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1213
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1214
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1215
lemma frontier_of_disjoint_eq_alt:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1216
  "S \<subseteq> (topspace X - X frontier_of S) \<longleftrightarrow> openin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1217
proof (cases "S \<subseteq> topspace X")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1218
  case True
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1219
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1220
    using True frontier_of_disjoint_eq by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1221
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1222
  case False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1223
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1224
    by (meson Diff_subset openin_subset subset_trans)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1225
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1226
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1227
lemma frontier_of_Int:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1228
     "X frontier_of (S \<inter> T) =
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1229
      X closure_of (S \<inter> T) \<inter> (X frontier_of S \<union> X frontier_of T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1230
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1231
  have *: "U \<subseteq> S \<and> U \<subseteq> T \<Longrightarrow> U \<inter> (S \<inter> A \<union> T \<inter> B) = U \<inter> (A \<union> B)" for U S T A B :: "'a set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1232
    by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1233
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1234
    by (simp add: frontier_of_closures closure_of_mono Diff_Int * flip: closure_of_Un)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1235
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1236
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1237
lemma frontier_of_Int_subset: "X frontier_of (S \<inter> T) \<subseteq> X frontier_of S \<union> X frontier_of T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1238
  by (simp add: frontier_of_Int)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1239
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1240
lemma frontier_of_Int_closedin:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1241
  assumes "closedin X S" "closedin X T" 
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1242
  shows "X frontier_of(S \<inter> T) = X frontier_of S \<inter> T \<union> S \<inter> X frontier_of T"  (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1243
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1244
  show "?lhs \<subseteq> ?rhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1245
    using assms by (force simp add: frontier_of_Int closedin_Int closure_of_closedin)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1246
  show "?rhs \<subseteq> ?lhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1247
    using assms frontier_of_subset_closedin
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1248
    by (auto simp add: frontier_of_Int closedin_Int closure_of_closedin)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1249
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1250
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1251
lemma frontier_of_Un_subset: "X frontier_of(S \<union> T) \<subseteq> X frontier_of S \<union> X frontier_of T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1252
  by (metis Diff_Un frontier_of_Int_subset frontier_of_complement)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1253
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1254
lemma frontier_of_Union_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1255
   "finite \<F> \<Longrightarrow> X frontier_of (\<Union>\<F>) \<subseteq> (\<Union>T \<in> \<F>. X frontier_of T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1256
proof (induction \<F> rule: finite_induct)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1257
  case (insert A \<F>)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1258
  then show ?case
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1259
    using frontier_of_Un_subset by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1260
qed simp
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1261
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1262
lemma frontier_of_frontier_of_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1263
     "X frontier_of (X frontier_of S) \<subseteq> X frontier_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1264
  by (simp add: closedin_frontier_of frontier_of_subset_closedin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1265
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1266
lemma frontier_of_subtopology_open:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1267
     "openin X U \<Longrightarrow> (subtopology X U) frontier_of S = U \<inter> X frontier_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1268
  by (simp add: Diff_Int_distrib closure_of_subtopology_open frontier_of_def interior_of_subtopology_open)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1269
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1270
lemma discrete_topology_frontier_of [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1271
     "(discrete_topology U) frontier_of S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1272
  by (simp add: Diff_eq discrete_topology_closure_of frontier_of_closures)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1273
78038
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1274
lemma openin_subset_topspace_eq:
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1275
  assumes "disjnt S (X frontier_of U)"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1276
  shows "openin (subtopology X U) S \<longleftrightarrow> openin X S \<and> S \<subseteq> U"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1277
proof
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1278
  assume S: "openin (subtopology X U) S"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1279
  show "openin X S \<and> S \<subseteq> U"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1280
  proof
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1281
    show "S \<subseteq> U"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1282
      using S openin_imp_subset by blast
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1283
    have "disjnt S (X frontier_of (topspace X \<inter> U))"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1284
      by (metis assms frontier_of_restrict)
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1285
    moreover
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1286
    have "openin (subtopology X (topspace X \<inter> U)) S"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1287
      by (simp add: S subtopology_restrict)
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1288
    moreover
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1289
    have "openin X S" 
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1290
      if dis: "disjnt S (X frontier_of U)" and ope: "openin (subtopology X U) S" and "U \<subseteq> topspace X" 
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1291
      for S U
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1292
    proof -
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1293
      obtain T where T: "openin X T" "S = T \<inter> U"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1294
        using ope by (auto simp: openin_subtopology)
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1295
      have "T \<inter> U = T \<inter> X interior_of U"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1296
        using that T interior_of_subset in_closure_of by (fastforce simp: disjnt_iff frontier_of_def)
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1297
      then show ?thesis
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1298
        using \<open>S = T \<inter> U\<close> \<open>openin X T\<close> by auto
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1299
    qed
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1300
  ultimately show "openin X S"
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1301
      by blast
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1302
  qed 
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1303
qed (metis inf.absorb_iff1 openin_subtopology_Int)
2c1b01563163 New material from the HOL Light metric space library, mostly about quasi components
paulson <lp15@cam.ac.uk>
parents: 78037
diff changeset
  1304
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1305
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1306
subsection\<open>Locally finite collections\<close>
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1307
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1308
definition locally_finite_in
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1309
  where
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1310
 "locally_finite_in X \<A> \<longleftrightarrow>
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1311
        (\<Union>\<A> \<subseteq> topspace X) \<and>
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1312
        (\<forall>x \<in> topspace X. \<exists>V. openin X V \<and> x \<in> V \<and> finite {U \<in> \<A>. U \<inter> V \<noteq> {}})"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1313
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1314
lemma finite_imp_locally_finite_in:
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1315
   "\<lbrakk>finite \<A>; \<Union>\<A> \<subseteq> topspace X\<rbrakk> \<Longrightarrow> locally_finite_in X \<A>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1316
  by (auto simp: locally_finite_in_def)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1317
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1318
lemma locally_finite_in_subset:
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1319
  assumes "locally_finite_in X \<A>" "\<B> \<subseteq> \<A>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1320
  shows "locally_finite_in X \<B>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1321
proof -
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1322
  have "finite (\<A> \<inter> {U. U \<inter> V \<noteq> {}}) \<Longrightarrow> finite (\<B> \<inter> {U. U \<inter> V \<noteq> {}})" for V
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1323
    by (meson \<open>\<B> \<subseteq> \<A>\<close> finite_subset inf_le1 inf_le2 le_inf_iff subset_trans)
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1324
  then show ?thesis
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1325
    using assms unfolding locally_finite_in_def Int_def by fastforce
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1326
qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1327
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1328
lemma locally_finite_in_refinement:
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1329
  assumes \<A>: "locally_finite_in X \<A>" and f: "\<And>S. S \<in> \<A> \<Longrightarrow> f S \<subseteq> S"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1330
  shows "locally_finite_in X (f ` \<A>)"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1331
proof -
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1332
  show ?thesis
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1333
    unfolding locally_finite_in_def
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1334
  proof (intro conjI strip)
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1335
    fix x
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1336
    assume "x \<in> topspace X"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1337
    then obtain V where "openin X V" "x \<in> V" "finite {U \<in> \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1338
      using \<A> unfolding locally_finite_in_def by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1339
    moreover have "{U \<in> \<A>. f U \<inter> V \<noteq> {}} \<subseteq> {U \<in> \<A>. U \<inter> V \<noteq> {}}" for V
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1340
      using f by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1341
    ultimately have "finite {U \<in> \<A>. f U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1342
      using finite_subset by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1343
    moreover have "f ` {U \<in> \<A>. f U \<inter> V \<noteq> {}} = {U \<in> f ` \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1344
      by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1345
    ultimately have "finite {U \<in> f ` \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1346
      by (metis (no_types, lifting) finite_imageI)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1347
    then show "\<exists>V. openin X V \<and> x \<in> V \<and> finite {U \<in> f ` \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1348
      using \<open>openin X V\<close> \<open>x \<in> V\<close> by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1349
  next
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1350
    show "\<Union> (f ` \<A>) \<subseteq> topspace X"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1351
      using \<A> f by (force simp: locally_finite_in_def image_iff)
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1352
  qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1353
qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1354
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1355
lemma locally_finite_in_subtopology:
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1356
  assumes \<A>: "locally_finite_in X \<A>" "\<Union>\<A> \<subseteq> S"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1357
  shows "locally_finite_in (subtopology X S) \<A>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1358
  unfolding locally_finite_in_def
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1359
proof (intro conjI strip)
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1360
  fix x
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1361
  assume x: "x \<in> topspace (subtopology X S)"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1362
  then obtain V where "openin X V" "x \<in> V" and fin: "finite {U \<in> \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1363
    using \<A> unfolding locally_finite_in_def topspace_subtopology by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1364
  show "\<exists>V. openin (subtopology X S) V \<and> x \<in> V \<and> finite {U \<in> \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1365
  proof (intro exI conjI)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1366
    show "openin (subtopology X S) (S \<inter> V)"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1367
      by (simp add: \<open>openin X V\<close> openin_subtopology_Int2)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1368
    have "{U \<in> \<A>. U \<inter> (S \<inter> V) \<noteq> {}} \<subseteq> {U \<in> \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1369
      by auto
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1370
    with fin show "finite {U \<in> \<A>. U \<inter> (S \<inter> V) \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1371
      using finite_subset by auto
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1372
    show "x \<in> S \<inter> V"
71172
nipkow
parents: 70532
diff changeset
  1373
      using x \<open>x \<in> V\<close> by (simp)
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1374
  qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1375
next
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1376
  show "\<Union> \<A> \<subseteq> topspace (subtopology X S)"
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1377
    using assms unfolding locally_finite_in_def topspace_subtopology by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1378
qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1379
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1380
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1381
lemma closedin_locally_finite_Union:
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1382
  assumes clo: "\<And>S. S \<in> \<A> \<Longrightarrow> closedin X S" and \<A>: "locally_finite_in X \<A>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1383
  shows "closedin X (\<Union>\<A>)"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1384
  using \<A> unfolding locally_finite_in_def closedin_def
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1385
proof clarify
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1386
  show "openin X (topspace X - \<Union>\<A>)"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1387
  proof (subst openin_subopen, clarify)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1388
    fix x
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1389
    assume "x \<in> topspace X" and "x \<notin> \<Union>\<A>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1390
    then obtain V where "openin X V" "x \<in> V" and fin: "finite {U \<in> \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1391
      using \<A> unfolding locally_finite_in_def by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1392
    let ?T = "V - \<Union>{S \<in> \<A>. S \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1393
    show "\<exists>T. openin X T \<and> x \<in> T \<and> T \<subseteq> topspace X - \<Union>\<A>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1394
    proof (intro exI conjI)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1395
      show "openin X ?T"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1396
        by (metis (no_types, lifting) fin \<open>openin X V\<close> clo closedin_Union mem_Collect_eq openin_diff)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1397
      show "x \<in> ?T"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1398
        using \<open>x \<notin> \<Union>\<A>\<close> \<open>x \<in> V\<close> by auto
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1399
      show "?T \<subseteq> topspace X - \<Union>\<A>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1400
        using \<open>openin X V\<close> openin_subset by auto
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1401
    qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1402
  qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1403
qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1404
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1405
lemma locally_finite_in_closure:
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1406
  assumes \<A>: "locally_finite_in X \<A>"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1407
  shows "locally_finite_in X ((\<lambda>S. X closure_of S) ` \<A>)"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1408
  using \<A> unfolding locally_finite_in_def
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1409
proof (intro conjI; clarsimp)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1410
  fix x A
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1411
  assume "x \<in> X closure_of A"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1412
  then show "x \<in> topspace X"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1413
    by (meson in_closure_of)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1414
next
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1415
  fix x
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1416
  assume "x \<in> topspace X" and "\<Union>\<A> \<subseteq> topspace X"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1417
  then obtain V where V: "openin X V" "x \<in> V" and fin: "finite {U \<in> \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1418
    using \<A> unfolding locally_finite_in_def by blast
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1419
  have eq: "{y \<in> f ` \<A>. Q y} = f ` {x. x \<in> \<A> \<and> Q(f x)}" for f and Q :: "'a set \<Rightarrow> bool"
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1420
    by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1421
  have eq2: "{A \<in> \<A>. X closure_of A \<inter> V \<noteq> {}} = {A \<in> \<A>. A \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1422
    using openin_Int_closure_of_eq_empty V  by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1423
  have "finite {U \<in> (closure_of) X ` \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1424
    by (simp add: eq eq2 fin)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1425
  with V show "\<exists>V. openin X V \<and> x \<in> V \<and> finite {U \<in> (closure_of) X ` \<A>. U \<inter> V \<noteq> {}}"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1426
    by blast
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1427
qed
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1428
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1429
lemma closedin_Union_locally_finite_closure:
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1430
   "locally_finite_in X \<A> \<Longrightarrow> closedin X (\<Union>((\<lambda>S. X closure_of S) ` \<A>))"
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1431
  by (metis (mono_tags) closedin_closure_of closedin_locally_finite_Union imageE locally_finite_in_closure)
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1432
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1433
lemma closure_of_Union_subset: "\<Union>((\<lambda>S. X closure_of S) ` \<A>) \<subseteq> X closure_of (\<Union>\<A>)"
77934
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
  1434
  by (simp add: SUP_le_iff Sup_upper closure_of_mono)
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1435
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1436
lemma closure_of_locally_finite_Union:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1437
  assumes "locally_finite_in X \<A>" 
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1438
  shows "X closure_of (\<Union>\<A>) = \<Union>((\<lambda>S. X closure_of S) ` \<A>)"  
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1439
proof (rule closure_of_unique)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1440
  show "\<Union> \<A> \<subseteq> \<Union> ((closure_of) X ` \<A>)"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1441
    using assms by (simp add: SUP_upper2 Sup_le_iff closure_of_subset locally_finite_in_def)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1442
  show "closedin X (\<Union> ((closure_of) X ` \<A>))"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1443
    using assms by (simp add: closedin_Union_locally_finite_closure)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1444
  show "\<And>T'. \<lbrakk>\<Union> \<A> \<subseteq> T'; closedin X T'\<rbrakk> \<Longrightarrow> \<Union> ((closure_of) X ` \<A>) \<subseteq> T'"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1445
    by (simp add: Sup_le_iff closure_of_minimal)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1446
qed
69918
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1447
eddcc7c726f3 new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
paulson <lp15@cam.ac.uk>
parents: 69874
diff changeset
  1448
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
  1449
subsection\<^marker>\<open>tag important\<close> \<open>Continuous maps\<close>
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1450
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1451
text \<open>We will need to deal with continuous maps in terms of topologies and not in terms
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1452
of type classes, as defined below.\<close>
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1453
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1454
definition continuous_map where
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1455
  "continuous_map X Y f \<equiv>
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1456
     f \<in> topspace X \<rightarrow> topspace Y \<and>
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1457
     (\<forall>U. openin Y U \<longrightarrow> openin X {x \<in> topspace X. f x \<in> U})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1458
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1459
lemma continuous_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1460
   "continuous_map X Y f \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1461
        f ` (topspace X) \<subseteq> topspace Y \<and> (\<forall>U. openin Y U \<longrightarrow> openin X {x \<in> topspace X. f x \<in> U})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1462
  by (auto simp: continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1463
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1464
lemma continuous_map_image_subset_topspace:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1465
   "continuous_map X Y f \<Longrightarrow> f ` (topspace X) \<subseteq> topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1466
  by (auto simp: continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1467
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1468
lemma continuous_map_funspace:
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1469
   "continuous_map X Y f \<Longrightarrow> f \<in> topspace X \<rightarrow> topspace Y"
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1470
  by (auto simp: continuous_map_def)
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1471
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1472
lemma continuous_map_on_empty [simp]: "continuous_map trivial_topology Y f"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1473
  by (auto simp: continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1474
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1475
lemma continuous_map_on_empty2 [simp]: "continuous_map X trivial_topology f \<longleftrightarrow> X = trivial_topology"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1476
  using continuous_map_image_subset_topspace by fastforce
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1477
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1478
lemma continuous_map_closedin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1479
   "continuous_map X Y f \<longleftrightarrow>
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1480
         f \<in> topspace X \<rightarrow> topspace Y \<and>
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1481
         (\<forall>C. closedin Y C \<longrightarrow> closedin X {x \<in> topspace X. f x \<in> C})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1482
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1483
  have "(\<forall>U. openin Y U \<longrightarrow> openin X {x \<in> topspace X. f x \<in> U}) =
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1484
        (\<forall>C. closedin Y C \<longrightarrow> closedin X {x \<in> topspace X. f x \<in> C})"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1485
    if "f \<in> topspace X \<rightarrow> topspace Y"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1486
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1487
    have eq: "{x \<in> topspace X. f x \<in> topspace Y \<and> f x \<notin> C} = (topspace X - {x \<in> topspace X. f x \<in> C})" for C
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1488
      using that by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1489
    show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1490
    proof (intro iffI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1491
      fix C
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1492
      assume "\<forall>U. openin Y U \<longrightarrow> openin X {x \<in> topspace X. f x \<in> U}" and "closedin Y C"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1493
      then show "closedin X {x \<in> topspace X. f x \<in> C}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1494
        by (auto simp add: closedin_def eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1495
    next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1496
      fix U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1497
      assume "\<forall>C. closedin Y C \<longrightarrow> closedin X {x \<in> topspace X. f x \<in> C}" and "openin Y U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1498
      then show "openin X {x \<in> topspace X. f x \<in> U}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1499
        by (auto simp add: openin_closedin_eq eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1500
    qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1501
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1502
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1503
    by (auto simp: continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1504
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1505
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1506
lemma openin_continuous_map_preimage:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1507
   "\<lbrakk>continuous_map X Y f; openin Y U\<rbrakk> \<Longrightarrow> openin X {x \<in> topspace X. f x \<in> U}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1508
  by (simp add: continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1509
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1510
lemma closedin_continuous_map_preimage:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1511
   "\<lbrakk>continuous_map X Y f; closedin Y C\<rbrakk> \<Longrightarrow> closedin X {x \<in> topspace X. f x \<in> C}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1512
  by (simp add: continuous_map_closedin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1513
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1514
lemma openin_continuous_map_preimage_gen:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1515
  assumes "continuous_map X Y f" "openin X U" "openin Y V"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1516
  shows "openin X {x \<in> U. f x \<in> V}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1517
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1518
  have eq: "{x \<in> U. f x \<in> V} = U \<inter> {x \<in> topspace X. f x \<in> V}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1519
    using assms(2) openin_closedin_eq by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1520
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1521
    unfolding eq
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1522
    using assms openin_continuous_map_preimage by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1523
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1524
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1525
lemma closedin_continuous_map_preimage_gen:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1526
  assumes "continuous_map X Y f" "closedin X U" "closedin Y V"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1527
  shows "closedin X {x \<in> U. f x \<in> V}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1528
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1529
  have eq: "{x \<in> U. f x \<in> V} = U \<inter> {x \<in> topspace X. f x \<in> V}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1530
    using assms(2) closedin_def by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1531
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1532
    unfolding eq
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1533
    using assms closedin_continuous_map_preimage by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1534
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1535
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1536
lemma continuous_map_image_closure_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1537
  assumes "continuous_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1538
  shows "f ` (X closure_of S) \<subseteq> Y closure_of f ` S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1539
proof -
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1540
  let ?T = "S \<inter> topspace X"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1541
  have *: "X closure_of ?T \<subseteq> {x \<in> X closure_of ?T. f x \<in> Y closure_of (f ` ?T)}"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1542
  proof (rule closure_of_minimal)
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1543
    have "f ` (topspace X) \<subseteq> topspace Y"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1544
      by (meson assms continuous_map)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1545
    then show "?T \<subseteq> {x \<in> X closure_of ?T. f x \<in> Y closure_of f ` ?T}"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1546
      using closure_of_subset by (fastforce simp: in_closure_of)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1547
  next
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1548
    show "closedin X {x \<in> X closure_of ?T. f x \<in> Y closure_of f ` ?T}"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1549
      using assms closedin_continuous_map_preimage_gen by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1550
  qed
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1551
  have "f x \<in> Y closure_of (f ` S)" if "x \<in> X closure_of (S \<inter> topspace X)" for x
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1552
  proof -
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1553
    have "f x \<in> Y closure_of f ` ?T"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1554
      using that * by blast
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1555
    then show ?thesis
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1556
      by (meson closure_of_mono inf_le1 subset_eq subset_image_iff)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1557
  qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1558
  then show ?thesis
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1559
    by (metis closure_of_restrict image_subsetI inf_commute)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1560
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1561
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1562
lemma continuous_map_subset_aux1: 
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1563
  "continuous_map X Y f \<Longrightarrow> (\<forall>S. f \<in> (X closure_of S) \<rightarrow> Y closure_of f ` S)"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1564
  using continuous_map_image_closure_subset by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1565
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1566
lemma continuous_map_subset_aux2:
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1567
  assumes "\<forall>S. S \<subseteq> topspace X \<longrightarrow> f \<in> (X closure_of S) \<rightarrow> Y closure_of f ` S"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1568
  shows "continuous_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1569
  unfolding continuous_map_closedin
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1570
proof (intro conjI ballI allI impI)
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1571
  show "f \<in> topspace X \<rightarrow> topspace Y"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1572
    using assms closure_of_subset_topspace by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1573
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1574
  fix C
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1575
  assume "closedin Y C"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1576
  then show "closedin X {x \<in> topspace X. f x \<in> C}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1577
  proof (clarsimp simp flip: closure_of_subset_eq, intro conjI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1578
    fix x
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1579
    assume x: "x \<in> X closure_of {x \<in> topspace X. f x \<in> C}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1580
      and "C \<subseteq> topspace Y" and "Y closure_of C \<subseteq> C"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1581
    show "x \<in> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1582
      by (meson x in_closure_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1583
    have "{a \<in> topspace X. f a \<in> C} \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1584
      by simp
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1585
    moreover have "Y closure_of f ` {a \<in> topspace X. f a \<in> C} \<subseteq> C"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1586
      by (simp add: \<open>closedin Y C\<close> closure_of_minimal image_subset_iff)
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1587
    ultimately show "f x \<in> C"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1588
      using x assms by blast
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1589
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1590
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1591
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1592
lemma continuous_map_eq_image_closure_subset:
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1593
     "continuous_map X Y f \<longleftrightarrow> (\<forall>S. f \<in> (X closure_of S) \<rightarrow> Y closure_of f ` S)"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1594
  using continuous_map_subset_aux1 continuous_map_subset_aux2 by metis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1595
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1596
lemma continuous_map_eq_image_closure_subset_alt:
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1597
     "continuous_map X Y f \<longleftrightarrow> (\<forall>S. S \<subseteq> topspace X \<longrightarrow> f \<in> (X closure_of S) \<rightarrow> Y closure_of f ` S)"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1598
  using continuous_map_subset_aux1 continuous_map_subset_aux2 by metis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1599
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1600
lemma continuous_map_eq_image_closure_subset_gen:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1601
     "continuous_map X Y f \<longleftrightarrow>
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1602
        f \<in> topspace X \<rightarrow> topspace Y \<and>
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1603
        (\<forall>S. f \<in> (X closure_of S) \<rightarrow> Y closure_of f ` S)"
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1604
  by (metis continuous_map_eq_image_closure_subset continuous_map_funspace)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1605
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1606
lemma continuous_map_closure_preimage_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1607
   "continuous_map X Y f
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1608
        \<Longrightarrow> X closure_of {x \<in> topspace X. f x \<in> T}
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1609
            \<subseteq> {x \<in> topspace X. f x \<in> Y closure_of T}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1610
  unfolding continuous_map_closedin
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1611
  by (rule closure_of_minimal) (use in_closure_of in \<open>fastforce+\<close>)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1612
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1613
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1614
lemma continuous_map_frontier_frontier_preimage_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1615
  assumes "continuous_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1616
  shows "X frontier_of {x \<in> topspace X. f x \<in> T} \<subseteq> {x \<in> topspace X. f x \<in> Y frontier_of T}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1617
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1618
  have eq: "topspace X - {x \<in> topspace X. f x \<in> T} = {x \<in> topspace X. f x \<in> topspace Y - T}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1619
    using assms unfolding continuous_map_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1620
  have "X closure_of {x \<in> topspace X. f x \<in> T} \<subseteq> {x \<in> topspace X. f x \<in> Y closure_of T}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1621
    by (simp add: assms continuous_map_closure_preimage_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1622
  moreover
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1623
  have "X closure_of (topspace X - {x \<in> topspace X. f x \<in> T}) \<subseteq> {x \<in> topspace X. f x \<in> Y closure_of (topspace Y - T)}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1624
    using continuous_map_closure_preimage_subset [OF assms] eq by presburger
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1625
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1626
    by (auto simp: frontier_of_closures)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1627
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1628
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1629
lemma topology_finer_continuous_id:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1630
  assumes "topspace X = topspace Y" 
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1631
  shows "(\<forall>S. openin X S \<longrightarrow> openin Y S) \<longleftrightarrow> continuous_map Y X id"  (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1632
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1633
  show "?lhs \<Longrightarrow> ?rhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1634
    unfolding continuous_map_def
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1635
    using assms openin_subopen openin_subset by fastforce
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1636
  show "?rhs \<Longrightarrow> ?lhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1637
    unfolding continuous_map_def
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1638
    using assms openin_subopen topspace_def by fastforce
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1639
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1640
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1641
lemma continuous_map_const [simp]:
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1642
   "continuous_map X Y (\<lambda>x. C) \<longleftrightarrow> X = trivial_topology \<or> C \<in> topspace Y"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1643
proof (cases "X = trivial_topology")
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1644
  case nontriv: False
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1645
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1646
  proof (cases "C \<in> topspace Y")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1647
    case True
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1648
    with openin_subopen show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1649
      by (auto simp: continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1650
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1651
    case False
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1652
    with nontriv show ?thesis
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1653
      using continuous_map_image_subset_topspace discrete_topology_unique image_subset_iff by fastforce 
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1654
  qed
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1655
qed auto
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1656
69986
f2d327275065 generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents: 69945
diff changeset
  1657
declare continuous_map_const [THEN iffD2, continuous_intros]
f2d327275065 generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents: 69945
diff changeset
  1658
69994
cf7150ab1075 more stuff from HOL Light: Euclidean spaces and n-spheres, Hausdorff spaces, etc.
paulson <lp15@cam.ac.uk>
parents: 69986
diff changeset
  1659
lemma continuous_map_compose [continuous_intros]:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1660
  assumes f: "continuous_map X X' f" and g: "continuous_map X' X'' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1661
  shows "continuous_map X X'' (g \<circ> f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1662
  unfolding continuous_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1663
proof (intro conjI ballI allI impI)
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1664
  show "g \<circ> f \<in> topspace X \<rightarrow> topspace X''"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1665
    using assms unfolding continuous_map_def by force
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1666
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1667
  fix U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1668
  assume "openin X'' U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1669
  have eq: "{x \<in> topspace X. (g \<circ> f) x \<in> U} = {x \<in> topspace X. f x \<in> {y. y \<in> topspace X' \<and> g y \<in> U}}"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1670
    using continuous_map_image_subset_topspace f by force
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1671
  show "openin X {x \<in> topspace X. (g \<circ> f) x \<in> U}"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1672
    by (metis (no_types, lifting) ext \<open>openin X'' U\<close> continuous_map_def eq f g)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1673
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1674
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1675
lemma continuous_map_eq:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1676
  assumes "continuous_map X X' f" and "\<And>x. x \<in> topspace X \<Longrightarrow> f x = g x" 
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1677
  shows "continuous_map X X' g"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1678
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1679
  have eq: "{x \<in> topspace X. f x \<in> U} = {x \<in> topspace X. g x \<in> U}" for U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1680
    using assms by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1681
  show ?thesis
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  1682
    using assms by (force simp add: continuous_map_def eq)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1683
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1684
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1685
lemma restrict_continuous_map [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1686
     "topspace X \<subseteq> S \<Longrightarrow> continuous_map X X' (restrict f S) \<longleftrightarrow> continuous_map X X' f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1687
  by (auto simp: elim!: continuous_map_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1688
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1689
lemma continuous_map_in_subtopology:
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1690
  "continuous_map X (subtopology X' S) f \<longleftrightarrow> continuous_map X X' f \<and> f \<in> (topspace X) \<rightarrow> S"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1691
  (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1692
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1693
  assume L: ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1694
  show ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1695
  proof -
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  1696
    have "\<And>A. f \<in> (X closure_of A) \<rightarrow> subtopology X' S closure_of f ` A"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1697
      by (metis L continuous_map_eq_image_closure_subset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1698
    then show ?thesis
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1699
      by (metis closure_of_subset_subtopology closure_of_subtopology_subset closure_of_topspace
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1700
          continuous_map_subset_aux2 image_subset_iff_funcset subset_trans)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1701
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1702
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1703
  assume R: ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1704
  then have eq: "{x \<in> topspace X. f x \<in> U} = {x \<in> topspace X. f x \<in> U \<and> f x \<in> S}" for U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1705
    by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1706
  show ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1707
    using R
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1708
    unfolding continuous_map
71172
nipkow
parents: 70532
diff changeset
  1709
    by (auto simp: openin_subtopology eq)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1710
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1711
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1712
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1713
lemma continuous_map_from_subtopology:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1714
     "continuous_map X Y f \<Longrightarrow> continuous_map (subtopology X S) Y f"
71172
nipkow
parents: 70532
diff changeset
  1715
  by (auto simp: continuous_map openin_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1716
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1717
lemma continuous_map_into_fulltopology:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1718
   "continuous_map X (subtopology Y T) f \<Longrightarrow> continuous_map X Y f"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1719
  by (auto simp: continuous_map_in_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1720
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1721
lemma continuous_map_into_subtopology:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1722
   "\<lbrakk>continuous_map X Y f; f \<in> topspace X \<rightarrow> T\<rbrakk> \<Longrightarrow> continuous_map X (subtopology Y T) f"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1723
  by (auto simp: continuous_map_in_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1724
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1725
lemma continuous_map_from_subtopology_mono:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1726
     "\<lbrakk>continuous_map (subtopology X T) Y f; S \<subseteq> T\<rbrakk>
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1727
      \<Longrightarrow> continuous_map (subtopology X S) Y f"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1728
  by (metis inf.absorb_iff2 continuous_map_from_subtopology subtopology_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1729
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1730
lemma continuous_map_from_discrete_topology [simp]:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1731
  "continuous_map (discrete_topology U) X f \<longleftrightarrow> f \<in> U \<rightarrow> topspace X"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1732
  by (auto simp: continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1733
70065
cc89a395b5a3 Free_Abelian_Groups finally working; fixed some duplicates; cleaned up some proofs
paulson <lp15@cam.ac.uk>
parents: 70044
diff changeset
  1734
lemma continuous_map_iff_continuous [simp]: "continuous_map (top_of_set S) euclidean g = continuous_on S g"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  1735
  by (fastforce simp add: continuous_map openin_subtopology continuous_on_open_invariant)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  1736
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  1737
lemma continuous_map_iff_continuous2 [simp]: "continuous_map euclidean euclidean g = continuous_on UNIV g"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  1738
  by (metis continuous_map_iff_continuous subtopology_UNIV)
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1739
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1740
lemma continuous_map_openin_preimage_eq:
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1741
   "continuous_map X Y f \<longleftrightarrow>
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1742
        f \<in> (topspace X) \<rightarrow> topspace Y \<and> (\<forall>U. openin Y U \<longrightarrow> openin X (topspace X \<inter> f -` U))"
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1743
  by (auto simp: continuous_map_def vimage_def Int_def)
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1744
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1745
lemma continuous_map_closedin_preimage_eq:
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1746
   "continuous_map X Y f \<longleftrightarrow>
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1747
        f \<in> (topspace X) \<rightarrow> topspace Y \<and> (\<forall>U. closedin Y U \<longrightarrow> closedin X (topspace X \<inter> f -` U))"
69874
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1748
  by (auto simp: continuous_map_closedin vimage_def Int_def)
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1749
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1750
lemma continuous_map_square_root: "continuous_map euclideanreal euclideanreal sqrt"
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1751
  by (simp add: continuous_at_imp_continuous_on isCont_real_sqrt)
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1752
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1753
lemma continuous_map_sqrt [continuous_intros]:
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1754
   "continuous_map X euclideanreal f \<Longrightarrow> continuous_map X euclideanreal (\<lambda>x. sqrt(f x))"
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1755
  by (meson continuous_map_compose continuous_map_eq continuous_map_square_root o_apply)
11065b70407d new material for Analysis
paulson <lp15@cam.ac.uk>
parents: 69745
diff changeset
  1756
69994
cf7150ab1075 more stuff from HOL Light: Euclidean spaces and n-spheres, Hausdorff spaces, etc.
paulson <lp15@cam.ac.uk>
parents: 69986
diff changeset
  1757
lemma continuous_map_id [simp, continuous_intros]: "continuous_map X X id"
69710
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
  1758
  unfolding continuous_map_def  using openin_subopen topspace_def by fastforce
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
  1759
69994
cf7150ab1075 more stuff from HOL Light: Euclidean spaces and n-spheres, Hausdorff spaces, etc.
paulson <lp15@cam.ac.uk>
parents: 69986
diff changeset
  1760
declare continuous_map_id [unfolded id_def, simp, continuous_intros]
69710
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
  1761
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
  1762
lemma continuous_map_id_subt [simp]: "continuous_map (subtopology X S) X id"
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
  1763
  by (simp add: continuous_map_from_subtopology)
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
  1764
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
  1765
declare continuous_map_id_subt [unfolded id_def, simp]
61372780515b some renamings and a bit of new material
paulson <lp15@cam.ac.uk>
parents: 69661
diff changeset
  1766
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1767
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
  1768
lemma\<^marker>\<open>tag important\<close> continuous_map_alt:
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1769
   "continuous_map T1 T2 f 
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1770
    = ((\<forall>U. openin T2 U \<longrightarrow> openin T1 (f -` U \<inter> topspace T1)) \<and> f \<in> topspace T1 \<rightarrow> topspace T2)"
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1771
  by (auto simp: continuous_map_def vimage_def image_def Collect_conj_eq inf_commute)
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1772
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1773
lemma continuous_map_open [intro]:
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1774
  "continuous_map T1 T2 f \<Longrightarrow> openin T2 U \<Longrightarrow> openin T1 (f-`U \<inter> topspace(T1))"
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1775
  unfolding continuous_map_alt by auto
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1776
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1777
lemma continuous_map_preimage_topspace [intro]:
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1778
  assumes "continuous_map T1 T2 f"
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1779
  shows "f-`(topspace T2) \<inter> topspace T1 = topspace T1"
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1780
using assms unfolding continuous_map_def by auto
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1781
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1782
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  1783
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1784
subsection\<open>Open and closed maps (not a priori assumed continuous)\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1785
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1786
definition open_map :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1787
  where "open_map X1 X2 f \<equiv> \<forall>U. openin X1 U \<longrightarrow> openin X2 (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1788
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1789
definition closed_map :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1790
  where "closed_map X1 X2 f \<equiv> \<forall>U. closedin X1 U \<longrightarrow> closedin X2 (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1791
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1792
lemma open_map_imp_subset_topspace:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1793
     "open_map X1 X2 f \<Longrightarrow> f \<in> (topspace X1) \<rightarrow> topspace X2"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1794
  unfolding open_map_def using openin_subset by fastforce
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1795
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1796
lemma open_map_on_empty [simp]: "open_map trivial_topology Y f"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1797
  by (simp add: open_map_def)
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  1798
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  1799
lemma closed_map_on_empty:
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1800
   "closed_map trivial_topology Y f"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1801
  by (simp add: closed_map_def)
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  1802
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  1803
lemma closed_map_const:
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1804
   "closed_map X Y (\<lambda>x. c) \<longleftrightarrow> X = trivial_topology \<or> closedin Y {c}"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  1805
  by (metis closed_map_def closed_map_on_empty closedin_topspace discrete_topology_unique equals0D image_constant_conv)
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  1806
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1807
lemma open_map_imp_subset:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1808
    "\<lbrakk>open_map X1 X2 f; S \<subseteq> topspace X1\<rbrakk> \<Longrightarrow> f \<in> S \<rightarrow> topspace X2"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1809
  using open_map_imp_subset_topspace by fastforce
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1810
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1811
lemma topology_finer_open_id:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1812
     "(\<forall>S. openin X S \<longrightarrow> openin X' S) \<longleftrightarrow> open_map X X' id"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1813
  unfolding open_map_def by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1814
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1815
lemma open_map_id: "open_map X X id"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1816
  unfolding open_map_def by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1817
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1818
lemma open_map_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1819
     "\<lbrakk>open_map X X' f; \<And>x. x \<in> topspace X \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> open_map X X' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1820
  unfolding open_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1821
  by (metis image_cong openin_subset subset_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1822
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1823
lemma open_map_inclusion_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1824
  "open_map (subtopology X S) X id \<longleftrightarrow> openin X (topspace X \<inter> S)"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1825
  by (metis openin_topspace openin_trans_full subtopology_restrict topology_finer_open_id topspace_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1826
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1827
lemma open_map_inclusion:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1828
     "openin X S \<Longrightarrow> open_map (subtopology X S) X id"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1829
  by (simp add: open_map_inclusion_eq openin_Int)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1830
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1831
lemma open_map_compose:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1832
     "\<lbrakk>open_map X X' f; open_map X' X'' g\<rbrakk> \<Longrightarrow> open_map X X'' (g \<circ> f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1833
  by (metis (no_types, lifting) image_comp open_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1834
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1835
lemma closed_map_imp_subset_topspace:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1836
     "closed_map X1 X2 f \<Longrightarrow> f \<in> (topspace X1) \<rightarrow> topspace X2"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1837
  by (simp add: closed_map_def closedin_def image_subset_iff_funcset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1838
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1839
lemma closed_map_imp_subset:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1840
     "\<lbrakk>closed_map X1 X2 f; S \<subseteq> topspace X1\<rbrakk> \<Longrightarrow> f \<in> S \<rightarrow> topspace X2"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1841
  using closed_map_imp_subset_topspace by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1842
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1843
lemma topology_finer_closed_id:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1844
    "(\<forall>S. closedin X S \<longrightarrow> closedin X' S) \<longleftrightarrow> closed_map X X' id"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1845
  by (simp add: closed_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1846
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1847
lemma closed_map_id: "closed_map X X id"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1848
  by (simp add: closed_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1849
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1850
lemma closed_map_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1851
   "\<lbrakk>closed_map X X' f; \<And>x. x \<in> topspace X \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> closed_map X X' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1852
  unfolding closed_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1853
  by (metis image_cong closedin_subset subset_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1854
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1855
lemma closed_map_compose:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1856
    "\<lbrakk>closed_map X X' f; closed_map X' X'' g\<rbrakk> \<Longrightarrow> closed_map X X'' (g \<circ> f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1857
  by (metis (no_types, lifting) closed_map_def image_comp)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1858
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1859
lemma closed_map_inclusion_eq:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1860
   "closed_map (subtopology X S) X id \<longleftrightarrow> closedin X (topspace X \<inter> S)"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1861
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1862
  have *: "closedin X (T \<inter> S)" if "closedin X (S \<inter> topspace X)" "closedin X T" for T
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1863
    by (smt (verit, best) closedin_Int closure_of_subset_eq inf_sup_aci le_iff_inf that)
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  1864
  then show ?thesis
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1865
    by (fastforce simp add: closed_map_def Int_commute closedin_subtopology_alt intro: *)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1866
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1867
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1868
lemma closed_map_inclusion: "closedin X S \<Longrightarrow> closed_map (subtopology X S) X id"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1869
  by (simp add: closed_map_inclusion_eq closedin_Int)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1870
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1871
lemma open_map_into_subtopology:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1872
    "\<lbrakk>open_map X X' f; f \<in> topspace X \<rightarrow> S\<rbrakk> \<Longrightarrow> open_map X (subtopology X' S) f"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1873
  unfolding open_map_def openin_subtopology
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1874
  using openin_subset by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1875
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1876
lemma closed_map_into_subtopology:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1877
    "\<lbrakk>closed_map X X' f; f \<in> topspace X \<rightarrow> S\<rbrakk> \<Longrightarrow> closed_map X (subtopology X' S) f"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1878
  unfolding closed_map_def closedin_subtopology
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1879
  using closedin_subset by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1880
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1881
lemma open_map_into_discrete_topology:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1882
    "open_map X (discrete_topology U) f \<longleftrightarrow> f \<in> (topspace X) \<rightarrow> U"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1883
  unfolding open_map_def openin_discrete_topology using openin_subset by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1884
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1885
lemma closed_map_into_discrete_topology:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1886
    "closed_map X (discrete_topology U) f \<longleftrightarrow> f \<in> (topspace X) \<rightarrow> U"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1887
  unfolding closed_map_def closedin_discrete_topology using closedin_subset by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1888
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1889
lemma bijective_open_imp_closed_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1890
     "\<lbrakk>open_map X X' f; f ` (topspace X) = topspace X'; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> closed_map X X' f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1891
  unfolding open_map_def closed_map_def closedin_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1892
  by auto (metis Diff_subset inj_on_image_set_diff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1893
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1894
lemma bijective_closed_imp_open_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1895
     "\<lbrakk>closed_map X X' f; f ` (topspace X) = topspace X'; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> open_map X X' f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1896
  unfolding closed_map_def open_map_def openin_closedin_eq
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1897
  by auto (metis Diff_subset inj_on_image_set_diff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1898
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1899
lemma open_map_from_subtopology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1900
     "\<lbrakk>open_map X X' f; openin X U\<rbrakk> \<Longrightarrow> open_map (subtopology X U) X' f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1901
  unfolding open_map_def openin_subtopology_alt by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1902
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1903
lemma closed_map_from_subtopology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1904
     "\<lbrakk>closed_map X X' f; closedin X U\<rbrakk> \<Longrightarrow> closed_map (subtopology X U) X' f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1905
  unfolding closed_map_def closedin_subtopology_alt by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1906
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1907
lemma open_map_restriction:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1908
  assumes f: "open_map X X' f" and U: "{x \<in> topspace X. f x \<in> V} = U"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1909
  shows "open_map (subtopology X U) (subtopology X' V) f"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1910
  unfolding open_map_def
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1911
proof clarsimp
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1912
  fix W
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1913
  assume "openin (subtopology X U) W"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1914
  then obtain T where "openin X T" "W = T \<inter> U"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1915
    by (meson openin_subtopology)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1916
  with f U have "f ` W = (f ` T) \<inter> V"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1917
    unfolding open_map_def openin_closedin_eq by auto
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1918
  then show "openin (subtopology X' V) (f ` W)"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1919
    by (metis \<open>openin X T\<close> f open_map_def openin_subtopology_Int)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1920
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1921
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1922
lemma closed_map_restriction:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1923
  assumes f: "closed_map X X' f" and U: "{x \<in> topspace X. f x \<in> V} = U"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1924
  shows "closed_map (subtopology X U) (subtopology X' V) f"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1925
  unfolding closed_map_def
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1926
proof clarsimp
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1927
  fix W
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1928
  assume "closedin (subtopology X U) W"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1929
  then obtain T where "closedin X T" "W = T \<inter> U"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1930
    by (meson closedin_subtopology)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1931
  with f U have "f ` W = (f ` T) \<inter> V"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1932
    unfolding closed_map_def closedin_def by auto
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1933
  then show "closedin (subtopology X' V) (f ` W)"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1934
    by (metis \<open>closedin X T\<close> closed_map_def closedin_subtopology f)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  1935
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1936
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1937
lemma closed_map_closure_of_image:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1938
   "closed_map X Y f \<longleftrightarrow>
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1939
        f \<in> topspace X \<rightarrow> topspace Y \<and>
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1940
        (\<forall>S. S \<subseteq> topspace X \<longrightarrow> Y closure_of (f ` S) \<subseteq> f ` (X closure_of S))" (is "?lhs=?rhs")
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1941
proof
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1942
  assume ?lhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1943
  then show ?rhs
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1944
    by (simp add: closed_map_def closed_map_imp_subset_topspace closure_of_minimal 
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  1945
        closure_of_subset image_mono)
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1946
next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1947
  assume ?rhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1948
  then show ?lhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1949
    by (metis closed_map_def closed_map_into_discrete_topology closure_of_eq 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1950
        closure_of_subset_eq topspace_discrete_topology)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1951
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1952
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1953
lemma open_map_interior_of_image_subset:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1954
  "open_map X Y f \<longleftrightarrow> (\<forall>S. image f (X interior_of S) \<subseteq> Y interior_of (f ` S))"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1955
  by (metis image_mono interior_of_eq interior_of_maximal interior_of_subset open_map_def openin_interior_of subset_antisym)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1956
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1957
lemma open_map_interior_of_image_subset_alt:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1958
  "open_map X Y f \<longleftrightarrow> (\<forall>S\<subseteq>topspace X. f ` (X interior_of S) \<subseteq> Y interior_of f ` S)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1959
  by (metis interior_of_eq open_map_def open_map_interior_of_image_subset openin_subset subset_interior_of_eq)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1960
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1961
lemma open_map_interior_of_image_subset_gen:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1962
  "open_map X Y f \<longleftrightarrow>
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1963
       (f \<in> topspace X \<rightarrow> topspace Y \<and> (\<forall>S. f ` (X interior_of S) \<subseteq> Y interior_of f ` S))"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1964
  by (metis open_map_imp_subset_topspace open_map_interior_of_image_subset)
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1965
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1966
lemma open_map_preimage_neighbourhood:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1967
   "open_map X Y f \<longleftrightarrow>
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1968
    (f \<in> topspace X \<rightarrow> topspace Y \<and>
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1969
     (\<forall>U T. closedin X U \<and> T \<subseteq> topspace Y \<and>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1970
            {x \<in> topspace X. f x \<in> T} \<subseteq> U \<longrightarrow>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1971
            (\<exists>V. closedin Y V \<and> T \<subseteq> V \<and> {x \<in> topspace X. f x \<in> V} \<subseteq> U)))" (is "?lhs=?rhs")
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1972
proof
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1973
  assume L: ?lhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1974
  show ?rhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1975
  proof (intro conjI strip)
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  1976
    show "f \<in> topspace X \<rightarrow> topspace Y"
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1977
      by (simp add: \<open>open_map X Y f\<close> open_map_imp_subset_topspace)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1978
  next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1979
    fix U T
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1980
    assume UT: "closedin X U \<and> T \<subseteq> topspace Y \<and> {x \<in> topspace X. f x \<in> T} \<subseteq> U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1981
    have "closedin Y (topspace Y - f ` (topspace X - U))"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1982
      by (meson UT L open_map_def openin_closedin_eq openin_diff openin_topspace)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1983
    with UT
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1984
    show "\<exists>V. closedin Y V \<and> T \<subseteq> V \<and> {x \<in> topspace X. f x \<in> V} \<subseteq> U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1985
      using image_iff by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1986
  qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1987
next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1988
  assume R: ?rhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1989
  show ?lhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1990
    unfolding open_map_def
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1991
  proof (intro strip)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1992
    fix U assume "openin X U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1993
    have "{x \<in> topspace X. f x \<in> topspace Y - f ` U} \<subseteq> topspace X - U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1994
      by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1995
    then obtain V where V: "closedin Y V" 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1996
      and sub: "topspace Y - f ` U \<subseteq> V" "{x \<in> topspace X. f x \<in> V} \<subseteq> topspace X - U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1997
      using R \<open>openin X U\<close> by (meson Diff_subset openin_closedin_eq) 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1998
    then have "f ` U \<subseteq> topspace Y - V"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  1999
      using R \<open>openin X U\<close> openin_subset by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2000
    with sub have "f ` U = topspace Y - V"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2001
      by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2002
    then show "openin Y (f ` U)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2003
      using V(1) by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2004
  qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2005
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2006
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2007
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2008
lemma closed_map_preimage_neighbourhood:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2009
   "closed_map X Y f \<longleftrightarrow>
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2010
        f \<in> topspace X \<rightarrow> topspace Y \<and>
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2011
        (\<forall>U T. openin X U \<and> T \<subseteq> topspace Y \<and>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2012
              {x \<in> topspace X. f x \<in> T} \<subseteq> U
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2013
              \<longrightarrow> (\<exists>V. openin Y V \<and> T \<subseteq> V \<and>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2014
                      {x \<in> topspace X. f x \<in> V} \<subseteq> U))" (is "?lhs=?rhs")
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2015
proof
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2016
  assume L: ?lhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2017
  show ?rhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2018
  proof (intro conjI strip)
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2019
    show "f \<in> topspace X \<rightarrow> topspace Y"
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2020
      by (simp add: L closed_map_imp_subset_topspace)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2021
  next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2022
    fix U T
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2023
    assume UT: "openin X U \<and> T \<subseteq> topspace Y \<and> {x \<in> topspace X. f x \<in> T} \<subseteq> U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2024
    then have "openin Y (topspace Y - f ` (topspace X - U))"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2025
      by (meson L closed_map_def closedin_def closedin_diff closedin_topspace)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2026
    then show "\<exists>V. openin Y V \<and> T \<subseteq> V \<and> {x \<in> topspace X. f x \<in> V} \<subseteq> U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2027
      using UT image_iff by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2028
  qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2029
next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2030
  assume R: ?rhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2031
  show ?lhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2032
    unfolding closed_map_def
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2033
  proof (intro strip)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2034
    fix U assume "closedin X U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2035
    have "{x \<in> topspace X. f x \<in> topspace Y - f ` U} \<subseteq> topspace X - U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2036
      by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2037
    then obtain V where V: "openin Y V" 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2038
      and sub: "topspace Y - f ` U \<subseteq> V" "{x \<in> topspace X. f x \<in> V} \<subseteq> topspace X - U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2039
      using R Diff_subset \<open>closedin X U\<close> unfolding closedin_def
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2040
      by blast
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2041
    then have "f ` U \<subseteq> topspace Y - V"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2042
      using R \<open>closedin X U\<close> closedin_subset by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2043
    with sub have "f ` U = topspace Y - V"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2044
      by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2045
    with V show "closedin Y (f ` U)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2046
      by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2047
  qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2048
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2049
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2050
lemma closed_map_fibre_neighbourhood:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2051
  "closed_map X Y f \<longleftrightarrow>
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2052
     f \<in> (topspace X) \<rightarrow> topspace Y \<and>
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2053
     (\<forall>U y. openin X U \<and> y \<in> topspace Y \<and> {x \<in> topspace X. f x = y} \<subseteq> U
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2054
     \<longrightarrow> (\<exists>V. openin Y V \<and> y \<in> V \<and> {x \<in> topspace X. f x \<in> V} \<subseteq> U))"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2055
  unfolding closed_map_preimage_neighbourhood
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2056
proof (intro conj_cong refl all_cong1)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2057
  fix U
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2058
  assume "f \<in> topspace X \<rightarrow> topspace Y"
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2059
  show "(\<forall>T. openin X U \<and> T \<subseteq> topspace Y \<and> {x \<in> topspace X. f x \<in> T} \<subseteq> U 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2060
         \<longrightarrow> (\<exists>V. openin Y V \<and> T \<subseteq> V \<and> {x \<in> topspace X. f x \<in> V} \<subseteq> U))
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2061
      = (\<forall>y. openin X U \<and> y \<in> topspace Y \<and> {x \<in> topspace X. f x = y} \<subseteq> U 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2062
         \<longrightarrow> (\<exists>V. openin Y V \<and> y \<in> V \<and> {x \<in> topspace X. f x \<in> V} \<subseteq> U))" 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2063
    (is "(\<forall>T. ?P T) \<longleftrightarrow> (\<forall>y. ?Q y)")
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2064
  proof
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2065
    assume L [rule_format]: "\<forall>T. ?P T"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2066
    show "\<forall>y. ?Q y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2067
    proof
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2068
      fix y show "?Q y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2069
        using L [of "{y}"] by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2070
    qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2071
  next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2072
    assume R: "\<forall>y. ?Q y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2073
    show "\<forall>T. ?P T"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2074
    proof (cases "openin X U")
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2075
      case True
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2076
      obtain V where V: "\<And>y. \<lbrakk>y \<in> topspace Y; {x \<in> topspace X. f x = y} \<subseteq> U\<rbrakk> \<Longrightarrow>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2077
                       openin Y (V y) \<and> y \<in> V y \<and> {x \<in> topspace X. f x \<in> V y} \<subseteq> U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2078
        using R by (simp add: True) meson
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2079
      show ?thesis
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2080
      proof clarify
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2081
        fix T
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2082
        assume "openin X U" and "T \<subseteq> topspace Y" and "{x \<in> topspace X. f x \<in> T} \<subseteq> U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2083
        with V show "\<exists>V. openin Y V \<and> T \<subseteq> V \<and> {x \<in> topspace X. f x \<in> V} \<subseteq> U"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2084
          by (intro exI [where x="\<Union>y\<in>T. V y"]) fastforce
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2085
      qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2086
    qed auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2087
  qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2088
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2089
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2090
lemma open_map_in_subtopology:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2091
   "openin Y S
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2092
     \<Longrightarrow> open_map X (subtopology Y S) f \<longleftrightarrow> open_map X Y f \<and> f \<in> topspace X \<rightarrow> S"
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2093
  by (metis image_subset_iff_funcset open_map_def open_map_into_subtopology openin_imp_subset openin_topspace openin_trans_full)
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2094
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2095
lemma open_map_from_open_subtopology:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2096
   "\<lbrakk>openin Y S; open_map X (subtopology Y S) f\<rbrakk> \<Longrightarrow> open_map X Y f"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2097
  using open_map_in_subtopology by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2098
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2099
lemma closed_map_in_subtopology:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2100
   "closedin Y S
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2101
        \<Longrightarrow> closed_map X (subtopology Y S) f \<longleftrightarrow> (closed_map X Y f \<and> f \<in> topspace X \<rightarrow> S)"
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2102
  by (metis closed_map_def closed_map_imp_subset_topspace closed_map_into_subtopology 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2103
        closedin_closed_subtopology closedin_subset topspace_subtopology_subset)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2104
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2105
lemma closed_map_from_closed_subtopology:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2106
   "\<lbrakk>closedin Y S; closed_map X (subtopology Y S) f\<rbrakk> \<Longrightarrow> closed_map X Y f"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2107
  using closed_map_in_subtopology by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2108
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2109
lemma closed_map_from_composition_left:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2110
  assumes cmf: "closed_map X Z (g \<circ> f)" and contf: "continuous_map X Y f" and fim: "f ` topspace X = topspace Y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2111
  shows "closed_map Y Z g"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2112
  unfolding closed_map_def
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2113
proof (intro strip)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2114
  fix U assume "closedin Y U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2115
  then have "closedin X {x \<in> topspace X. f x \<in> U}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2116
    using contf closedin_continuous_map_preimage by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2117
  then have "closedin Z ((g \<circ> f) ` {x \<in> topspace X. f x \<in> U})"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2118
    using cmf closed_map_def by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2119
  moreover 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2120
  have "\<And>y. y \<in> U \<Longrightarrow> \<exists>x \<in> topspace X. f x \<in> U \<and> g y = g (f x)"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2121
    by (metis \<open>closedin Y U\<close> closedin_imp_subset fim image_iff insert_absorb insert_subset
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2122
        subtopology_topspace)
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2123
  then have "(g \<circ> f) ` {x \<in> topspace X. f x \<in> U} = g`U" by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2124
  ultimately show "closedin Z (g ` U)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2125
    by metis
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2126
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2127
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2128
text \<open>identical proof as the above\<close>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2129
lemma open_map_from_composition_left:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2130
  assumes cmf: "open_map X Z (g \<circ> f)" and contf: "continuous_map X Y f" and fim: "f ` topspace X = topspace Y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2131
  shows "open_map Y Z g"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2132
  unfolding open_map_def
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2133
proof (intro strip)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2134
  fix U assume "openin Y U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2135
  then have "openin X {x \<in> topspace X. f x \<in> U}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2136
    using contf openin_continuous_map_preimage by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2137
  then have "openin Z ((g \<circ> f) ` {x \<in> topspace X. f x \<in> U})"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2138
    using cmf open_map_def by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2139
  moreover 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2140
  have "\<And>y. y \<in> U \<Longrightarrow> \<exists>x \<in> topspace X. f x \<in> U \<and> g y = g (f x)"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2141
    by (metis (no_types, lifting) \<open>openin Y U\<close> fim image_iff in_mono interior_of_eq
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2142
        interior_of_subset_topspace)
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2143
  then have "(g \<circ> f) ` {x \<in> topspace X. f x \<in> U} = g`U" by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2144
  ultimately show "openin Z (g ` U)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2145
    by metis
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2146
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2147
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2148
lemma closed_map_from_composition_right:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2149
  assumes cmf: "closed_map X Z (g \<circ> f)" "f \<in> topspace X \<rightarrow> topspace Y" "continuous_map Y Z g" "inj_on g (topspace Y)"
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2150
  shows "closed_map X Y f"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2151
  unfolding closed_map_def
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2152
proof (intro strip)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2153
  fix C assume "closedin X C"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2154
  have "\<And>y c. \<lbrakk>y \<in> topspace Y; g y = g (f c); c \<in> C\<rbrakk> \<Longrightarrow> y \<in> f ` C"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2155
    using \<open>closedin X C\<close> assms closedin_subset inj_onD by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2156
  then
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2157
  have "f ` C = {x \<in> topspace Y. g x \<in> (g \<circ> f) ` C}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2158
    using \<open>closedin X C\<close> assms(2) closedin_subset by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2159
  moreover have "closedin Z ((g \<circ> f) ` C)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2160
    using \<open>closedin X C\<close> cmf closed_map_def by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2161
  ultimately show "closedin Y (f ` C)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2162
    using assms(3) closedin_continuous_map_preimage by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2163
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2164
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2165
text \<open>identical proof as the above\<close>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2166
lemma open_map_from_composition_right:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2167
  assumes "open_map X Z (g \<circ> f)" "f \<in> topspace X \<rightarrow> topspace Y" "continuous_map Y Z g" "inj_on g (topspace Y)"
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2168
  shows "open_map X Y f"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2169
  unfolding open_map_def
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2170
proof (intro strip)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2171
  fix C assume "openin X C"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2172
  have "\<And>y c. \<lbrakk>y \<in> topspace Y; g y = g (f c); c \<in> C\<rbrakk> \<Longrightarrow> y \<in> f ` C"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2173
    using \<open>openin X C\<close> assms openin_subset inj_onD by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2174
  then
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2175
  have "f ` C = {x \<in> topspace Y. g x \<in> (g \<circ> f) ` C}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2176
    using \<open>openin X C\<close> assms(2) openin_subset by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2177
  moreover have "openin Z ((g \<circ> f) ` C)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2178
    using \<open>openin X C\<close> assms(1) open_map_def by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2179
  ultimately show "openin Y (f ` C)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2180
    using assms(3) openin_continuous_map_preimage by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2181
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2182
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2183
subsection\<open>Quotient maps\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2184
                                      
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2185
definition quotient_map where
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2186
 "quotient_map X X' f \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2187
        f ` (topspace X) = topspace X' \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2188
        (\<forall>U. U \<subseteq> topspace X' \<longrightarrow> (openin X {x. x \<in> topspace X \<and> f x \<in> U} \<longleftrightarrow> openin X' U))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2189
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2190
lemma quotient_map_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2191
  assumes "quotient_map X X' f" "\<And>x. x \<in> topspace X \<Longrightarrow> f x = g x"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2192
  shows "quotient_map X X' g"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2193
  using assms by (smt (verit) Collect_cong assms image_cong quotient_map_def)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2194
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2195
lemma quotient_map_compose:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2196
  assumes f: "quotient_map X X' f" and g: "quotient_map X' X'' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2197
  shows "quotient_map X X'' (g \<circ> f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2198
  unfolding quotient_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2199
proof (intro conjI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2200
  show "(g \<circ> f) ` topspace X = topspace X''"
69661
a03a63b81f44 tuned proofs
haftmann
parents: 69622
diff changeset
  2201
    using assms by (simp only: image_comp [symmetric]) (simp add: quotient_map_def)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2202
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2203
  fix U''
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2204
  assume U'': "U'' \<subseteq> topspace X''"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2205
  define U' where "U' \<equiv> {y \<in> topspace X'. g y \<in> U''}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2206
  have "U' \<subseteq> topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2207
    by (auto simp add: U'_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2208
  then have U': "openin X {x \<in> topspace X. f x \<in> U'} = openin X' U'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2209
    using assms unfolding quotient_map_def by simp
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2210
  have "{x \<in> topspace X. f x \<in> topspace X' \<and> g (f x) \<in> U''} = {x \<in> topspace X. (g \<circ> f) x \<in> U''}"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2211
    using f quotient_map_def by fastforce
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2212
  then show "openin X {x \<in> topspace X. (g \<circ> f) x \<in> U''} = openin X'' U''"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2213
    by (smt (verit, best) Collect_cong U' U'_def U'' g mem_Collect_eq quotient_map_def)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2214
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2215
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2216
lemma quotient_map_from_composition:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2217
  assumes f: "continuous_map X X' f" and g: "continuous_map X' X'' g" and gf: "quotient_map X X'' (g \<circ> f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2218
  shows  "quotient_map X' X'' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2219
  unfolding quotient_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2220
proof (intro conjI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2221
  show "g ` topspace X' = topspace X''"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2222
    using assms unfolding continuous_map_def quotient_map_def by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2223
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2224
  fix U'' :: "'c set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2225
  assume U'': "U'' \<subseteq> topspace X''"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2226
  have eq: "{x \<in> topspace X. g (f x) \<in> U''} = {x \<in> topspace X. f x \<in> {y. y \<in> topspace X' \<and> g y \<in> U''}}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2227
    using continuous_map_def f by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2228
  show "openin X' {x \<in> topspace X'. g x \<in> U''} = openin X'' U''"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2229
    using assms unfolding continuous_map_def quotient_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2230
    by (metis (mono_tags, lifting) Collect_cong U'' comp_apply eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2231
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2232
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2233
lemma quotient_imp_continuous_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2234
    "quotient_map X X' f \<Longrightarrow> continuous_map X X' f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2235
  by (simp add: continuous_map openin_subset quotient_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2236
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2237
lemma quotient_imp_surjective_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2238
    "quotient_map X X' f \<Longrightarrow> f ` (topspace X) = topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2239
  by (simp add: quotient_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2240
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2241
lemma quotient_map_closedin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2242
  "quotient_map X X' f \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2243
        f ` (topspace X) = topspace X' \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2244
        (\<forall>U. U \<subseteq> topspace X' \<longrightarrow> (closedin X {x. x \<in> topspace X \<and> f x \<in> U} \<longleftrightarrow> closedin X' U))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2245
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2246
  have eq: "(topspace X - {x \<in> topspace X. f x \<in> U'}) = {x \<in> topspace X. f x \<in> topspace X' \<and> f x \<notin> U'}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2247
    if "f ` topspace X = topspace X'" "U' \<subseteq> topspace X'" for U'
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2248
      using that by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2249
  have "(\<forall>U\<subseteq>topspace X'. openin X {x \<in> topspace X. f x \<in> U} = openin X' U) =
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2250
          (\<forall>U\<subseteq>topspace X'. closedin X {x \<in> topspace X. f x \<in> U} = closedin X' U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2251
    if "f ` topspace X = topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2252
  proof (rule iffI; intro allI impI subsetI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2253
    fix U'
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2254
    assume *[rule_format]: "\<forall>U\<subseteq>topspace X'. openin X {x \<in> topspace X. f x \<in> U} = openin X' U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2255
      and U': "U' \<subseteq> topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2256
    show "closedin X {x \<in> topspace X. f x \<in> U'} = closedin X' U'"
69286
nipkow
parents: 69144
diff changeset
  2257
      using U'  by (auto simp add: closedin_def simp flip: * [of "topspace X' - U'"] eq [OF that])
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2258
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2259
    fix U' :: "'b set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2260
    assume *[rule_format]: "\<forall>U\<subseteq>topspace X'. closedin X {x \<in> topspace X. f x \<in> U} = closedin X' U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2261
      and U': "U' \<subseteq> topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2262
    show "openin X {x \<in> topspace X. f x \<in> U'} = openin X' U'"
69286
nipkow
parents: 69144
diff changeset
  2263
      using U'  by (auto simp add: openin_closedin_eq simp flip: * [of "topspace X' - U'"] eq [OF that])
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2264
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2265
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2266
    unfolding quotient_map_def by force
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2267
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2268
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2269
lemma continuous_open_imp_quotient_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2270
  assumes "continuous_map X X' f" and om: "open_map X X' f" and feq: "f ` (topspace X) = topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2271
  shows "quotient_map X X' f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2272
proof -
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2273
  have "openin X' U"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2274
    if U: "U \<subseteq> topspace X'" and "openin X {x \<in> topspace X. f x \<in> U}" for U
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2275
  proof -
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2276
    have ope: "openin X' (f ` {x \<in> topspace X. f x \<in> U})"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2277
      using om that unfolding open_map_def by blast
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2278
    then show ?thesis
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2279
      using U feq by (subst openin_subopen) force
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2280
  qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2281
  moreover have "openin X {x \<in> topspace X. f x \<in> U}" if "U \<subseteq> topspace X'" and "openin X' U" for U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2282
    using that assms unfolding continuous_map_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2283
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2284
    unfolding quotient_map_def using assms by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2285
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2286
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2287
lemma continuous_closed_imp_quotient_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2288
  assumes "continuous_map X X' f" and om: "closed_map X X' f" and feq: "f ` (topspace X) = topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2289
  shows "quotient_map X X' f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2290
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2291
  have "f ` {x \<in> topspace X. f x \<in> U} = U" if "U \<subseteq> topspace X'" for U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2292
    using that feq by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2293
  with assms show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2294
    unfolding quotient_map_closedin closed_map_def continuous_map_closedin by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2295
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2296
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2297
lemma continuous_open_quotient_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2298
   "\<lbrakk>continuous_map X X' f; open_map X X' f\<rbrakk> \<Longrightarrow> quotient_map X X' f \<longleftrightarrow> f ` (topspace X) = topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2299
  by (meson continuous_open_imp_quotient_map quotient_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2300
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2301
lemma continuous_closed_quotient_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2302
     "\<lbrakk>continuous_map X X' f; closed_map X X' f\<rbrakk> \<Longrightarrow> quotient_map X X' f \<longleftrightarrow> f ` (topspace X) = topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2303
  by (meson continuous_closed_imp_quotient_map quotient_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2304
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2305
lemma injective_quotient_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2306
  assumes "inj_on f (topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2307
  shows "quotient_map X X' f \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2308
         continuous_map X X' f \<and> open_map X X' f \<and> closed_map X X' f \<and> f ` (topspace X) = topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2309
         (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2310
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2311
  assume L: ?lhs
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2312
  have om: "open_map X X' f"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2313
  proof (clarsimp simp add: open_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2314
    fix U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2315
    assume "openin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2316
    then have "U \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2317
      by (simp add: openin_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2318
    moreover have "{x \<in> topspace X. f x \<in> f ` U} = U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2319
      using \<open>U \<subseteq> topspace X\<close> assms inj_onD by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2320
    ultimately show "openin X' (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2321
      using L unfolding quotient_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2322
      by (metis (no_types, lifting) Collect_cong \<open>openin X U\<close> image_mono)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2323
  qed
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2324
  then have "closed_map X X' f"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2325
    by (simp add: L assms bijective_open_imp_closed_map quotient_imp_surjective_map)
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2326
  then show ?rhs
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2327
    using L om by (simp add: quotient_imp_continuous_map quotient_imp_surjective_map)
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2328
qed (auto simp add: continuous_closed_imp_quotient_map)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2329
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2330
lemma continuous_compose_quotient_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2331
  assumes f: "quotient_map X X' f" and g: "continuous_map X X'' (g \<circ> f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2332
  shows "continuous_map X' X'' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2333
  unfolding quotient_map_def continuous_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2334
proof (intro conjI ballI allI impI)
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2335
  show "g \<in> topspace X' \<rightarrow> topspace X''"
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2336
    using assms unfolding quotient_map_def Pi_iff
73932
fd21b4a93043 added opaque_combs and renamed hide_lams to opaque_lifting
desharna
parents: 72608
diff changeset
  2337
    by (metis (no_types, opaque_lifting) continuous_map_image_subset_topspace image_comp image_subset_iff)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2338
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2339
  fix U'' :: "'c set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2340
  assume U'': "openin X'' U''"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2341
  have "f ` topspace X = topspace X'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2342
    by (simp add: f quotient_imp_surjective_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2343
  then have eq: "{x \<in> topspace X. f x \<in> topspace X' \<and> g (f x) \<in> U} = {x \<in> topspace X. g (f x) \<in> U}" for U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2344
    by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2345
  have "openin X {x \<in> topspace X. f x \<in> topspace X' \<and> g (f x) \<in> U''}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2346
    unfolding eq using U'' g openin_continuous_map_preimage by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2347
  then have *: "openin X {x \<in> topspace X. f x \<in> {x \<in> topspace X'. g x \<in> U''}}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2348
    by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2349
  show "openin X' {x \<in> topspace X'. g x \<in> U''}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2350
    using f unfolding quotient_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2351
    by (metis (no_types) Collect_subset *)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2352
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2353
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2354
lemma continuous_compose_quotient_map_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2355
   "quotient_map X X' f \<Longrightarrow> continuous_map X X'' (g \<circ> f) \<longleftrightarrow> continuous_map X' X'' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2356
  using continuous_compose_quotient_map continuous_map_compose quotient_imp_continuous_map by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2357
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2358
lemma quotient_map_compose_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2359
   "quotient_map X X' f \<Longrightarrow> quotient_map X X'' (g \<circ> f) \<longleftrightarrow> quotient_map X' X'' g"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2360
  by (meson continuous_compose_quotient_map_eq quotient_imp_continuous_map quotient_map_compose quotient_map_from_composition)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2361
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2362
lemma quotient_map_restriction:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2363
  assumes quo: "quotient_map X Y f" and U: "{x \<in> topspace X. f x \<in> V} = U" and disj: "openin Y V \<or> closedin Y V"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2364
 shows "quotient_map (subtopology X U) (subtopology Y V) f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2365
  using disj
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2366
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2367
  assume V: "openin Y V"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2368
  with U have sub: "U \<subseteq> topspace X" "V \<subseteq> topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2369
    by (auto simp: openin_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2370
  have fim: "f ` topspace X = topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2371
     and Y: "\<And>U. U \<subseteq> topspace Y \<Longrightarrow> openin X {x \<in> topspace X. f x \<in> U} = openin Y U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2372
    using quo unfolding quotient_map_def by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2373
  have "openin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2374
    using U V Y sub(2) by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2375
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2376
    unfolding quotient_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2377
  proof (intro conjI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2378
    show "f ` topspace (subtopology X U) = topspace (subtopology Y V)"
71172
nipkow
parents: 70532
diff changeset
  2379
      using sub U fim by (auto)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2380
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2381
    fix Y' :: "'b set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2382
    assume "Y' \<subseteq> topspace (subtopology Y V)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2383
    then have "Y' \<subseteq> topspace Y" "Y' \<subseteq> V"
71172
nipkow
parents: 70532
diff changeset
  2384
      by (simp_all)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2385
    then have eq: "{x \<in> topspace X. x \<in> U \<and> f x \<in> Y'} = {x \<in> topspace X. f x \<in> Y'}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2386
      using U by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2387
    then show "openin (subtopology X U) {x \<in> topspace (subtopology X U). f x \<in> Y'} = openin (subtopology Y V) Y'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2388
      using U V Y \<open>openin X U\<close>  \<open>Y' \<subseteq> topspace Y\<close> \<open>Y' \<subseteq> V\<close>
71172
nipkow
parents: 70532
diff changeset
  2389
      by (simp add: openin_open_subtopology eq) (auto simp: openin_closedin_eq)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2390
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2391
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2392
  assume V: "closedin Y V"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2393
  with U have sub: "U \<subseteq> topspace X" "V \<subseteq> topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2394
    by (auto simp: closedin_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2395
  have fim: "f ` topspace X = topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2396
     and Y: "\<And>U. U \<subseteq> topspace Y \<Longrightarrow> closedin X {x \<in> topspace X. f x \<in> U} = closedin Y U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2397
    using quo unfolding quotient_map_closedin by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2398
  have "closedin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2399
    using U V Y sub(2) by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2400
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2401
    unfolding quotient_map_closedin
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2402
  proof (intro conjI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2403
    show "f ` topspace (subtopology X U) = topspace (subtopology Y V)"
71172
nipkow
parents: 70532
diff changeset
  2404
      using sub U fim by (auto)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2405
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2406
    fix Y' :: "'b set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2407
    assume "Y' \<subseteq> topspace (subtopology Y V)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2408
    then have "Y' \<subseteq> topspace Y" "Y' \<subseteq> V"
71172
nipkow
parents: 70532
diff changeset
  2409
      by (simp_all)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2410
    then have eq: "{x \<in> topspace X. x \<in> U \<and> f x \<in> Y'} = {x \<in> topspace X. f x \<in> Y'}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2411
      using U by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2412
    then show "closedin (subtopology X U) {x \<in> topspace (subtopology X U). f x \<in> Y'} = closedin (subtopology Y V) Y'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2413
      using U V Y \<open>closedin X U\<close>  \<open>Y' \<subseteq> topspace Y\<close> \<open>Y' \<subseteq> V\<close>
71172
nipkow
parents: 70532
diff changeset
  2414
      by (simp add: closedin_closed_subtopology eq) (auto simp: closedin_def)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2415
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2416
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2417
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2418
lemma quotient_map_saturated_open:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2419
     "quotient_map X Y f \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2420
        continuous_map X Y f \<and> f ` (topspace X) = topspace Y \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2421
        (\<forall>U. openin X U \<and> {x \<in> topspace X. f x \<in> f ` U} \<subseteq> U \<longrightarrow> openin Y (f ` U))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2422
     (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2423
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2424
  assume L: ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2425
  then have fim: "f ` topspace X = topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2426
    and Y: "\<And>U. U \<subseteq> topspace Y \<Longrightarrow> openin Y U = openin X {x \<in> topspace X. f x \<in> U}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2427
    unfolding quotient_map_def by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2428
  show ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2429
  proof (intro conjI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2430
    show "continuous_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2431
      by (simp add: L quotient_imp_continuous_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2432
    show "f ` topspace X = topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2433
      by (simp add: fim)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2434
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2435
    fix U :: "'a set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2436
    assume U: "openin X U \<and> {x \<in> topspace X. f x \<in> f ` U} \<subseteq> U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2437
    then have sub:  "f ` U \<subseteq> topspace Y" and eq: "{x \<in> topspace X. f x \<in> f ` U} = U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2438
      using fim openin_subset by fastforce+
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2439
    show "openin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2440
      by (simp add: sub Y eq U)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2441
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2442
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2443
  assume ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2444
  then have YX: "\<And>U. openin Y U \<Longrightarrow> openin X {x \<in> topspace X. f x \<in> U}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2445
       and fim: "f ` topspace X = topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2446
       and XY: "\<And>U. \<lbrakk>openin X U; {x \<in> topspace X. f x \<in> f ` U} \<subseteq> U\<rbrakk> \<Longrightarrow> openin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2447
    by (auto simp: quotient_map_def continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2448
  show ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2449
  proof (simp add: quotient_map_def fim, intro allI impI iffI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2450
    fix U :: "'b set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2451
    assume "U \<subseteq> topspace Y" and X: "openin X {x \<in> topspace X. f x \<in> U}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2452
    have feq: "f ` {x \<in> topspace X. f x \<in> U} = U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2453
      using \<open>U \<subseteq> topspace Y\<close> fim by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2454
    show "openin Y U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2455
      using XY [OF X] by (simp add: feq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2456
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2457
    fix U :: "'b set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2458
    assume "U \<subseteq> topspace Y" and Y: "openin Y U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2459
    show "openin X {x \<in> topspace X. f x \<in> U}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2460
      by (metis YX [OF Y])
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2461
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2462
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2463
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2464
lemma quotient_map_saturated_closed:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2465
     "quotient_map X Y f \<longleftrightarrow>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2466
        continuous_map X Y f \<and> f ` (topspace X) = topspace Y \<and>
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2467
        (\<forall>U. closedin X U \<and> {x \<in> topspace X. f x \<in> f ` U} \<subseteq> U \<longrightarrow> closedin Y (f ` U))"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2468
     (is "?lhs = ?rhs")
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2469
proof
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2470
  assume L: ?lhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2471
  then obtain fim: "f ` topspace X = topspace Y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2472
    and Y: "\<And>U. U \<subseteq> topspace Y \<Longrightarrow> closedin Y U = closedin X {x \<in> topspace X. f x \<in> U}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2473
    by (simp add: quotient_map_closedin)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2474
  show ?rhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2475
  proof (intro conjI allI impI)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2476
    show "continuous_map X Y f"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2477
      by (simp add: L quotient_imp_continuous_map)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2478
    show "f ` topspace X = topspace Y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2479
      by (simp add: fim)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2480
  next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2481
    fix U :: "'a set"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2482
    assume U: "closedin X U \<and> {x \<in> topspace X. f x \<in> f ` U} \<subseteq> U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2483
    then have sub:  "f ` U \<subseteq> topspace Y" and eq: "{x \<in> topspace X. f x \<in> f ` U} = U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2484
      using fim closedin_subset by fastforce+
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2485
    show "closedin Y (f ` U)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2486
      by (simp add: sub Y eq U)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2487
  qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2488
next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2489
  assume ?rhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2490
  then obtain YX: "\<And>U. closedin Y U \<Longrightarrow> closedin X {x \<in> topspace X. f x \<in> U}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2491
    and fim: "f ` topspace X = topspace Y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2492
    and XY: "\<And>U. \<lbrakk>closedin X U; {x \<in> topspace X. f x \<in> f ` U} \<subseteq> U\<rbrakk> \<Longrightarrow> closedin Y (f ` U)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2493
    by (simp add: continuous_map_closedin)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2494
  show ?lhs
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2495
  proof (simp add: quotient_map_closedin fim, intro allI impI iffI)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2496
    fix U :: "'b set"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2497
    assume "U \<subseteq> topspace Y" and X: "closedin X {x \<in> topspace X. f x \<in> U}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2498
    have feq: "f ` {x \<in> topspace X. f x \<in> U} = U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2499
      using \<open>U \<subseteq> topspace Y\<close> fim by auto
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2500
    show "closedin Y U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2501
      using XY [OF X] by (simp add: feq)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2502
  next
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2503
    fix U :: "'b set"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2504
    assume "U \<subseteq> topspace Y" and Y: "closedin Y U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2505
    show "closedin X {x \<in> topspace X. f x \<in> U}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2506
      by (metis YX [OF Y])
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2507
  qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2508
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2509
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2510
lemma quotient_map_onto_image:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2511
  assumes "f ` topspace X \<subseteq> topspace Y" and U: "\<And>U. U \<subseteq> topspace Y \<Longrightarrow> openin X {x \<in> topspace X. f x \<in> U} = openin Y U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2512
  shows "quotient_map X (subtopology Y (f ` topspace X)) f"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2513
  unfolding quotient_map_def topspace_subtopology
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2514
proof (intro conjI strip)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2515
  fix U
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2516
  assume "U \<subseteq> topspace Y \<inter> f ` topspace X"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2517
  with U have "openin X {x \<in> topspace X. f x \<in> U} \<Longrightarrow> \<exists>x. openin Y x \<and> U = f ` topspace X \<inter> x"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2518
    by fastforce
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2519
  moreover have "\<exists>x. openin Y x \<and> U = f ` topspace X \<inter> x \<Longrightarrow> openin X {x \<in> topspace X. f x \<in> U}"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2520
    by (metis (mono_tags, lifting) Collect_cong IntE IntI U image_eqI openin_subset)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2521
  ultimately show "openin X {x \<in> topspace X. f x \<in> U} = openin (subtopology Y (f ` topspace X)) U"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2522
    by (force simp: openin_subtopology_alt image_iff)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2523
qed (use assms in auto)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2524
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2525
lemma quotient_map_lift_exists:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2526
  assumes f: "quotient_map X Y f" and h: "continuous_map X Z h" 
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2527
    and "\<And>x y. \<lbrakk>x \<in> topspace X; y \<in> topspace X; f x = f y\<rbrakk> \<Longrightarrow> h x = h y"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2528
  obtains g where "continuous_map Y Z g" "g ` topspace Y = h ` topspace X"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2529
                  "\<And>x. x \<in> topspace X \<Longrightarrow> g(f x) = h x"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2530
proof -
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2531
  obtain g where g: "\<And>x. x \<in> topspace X \<Longrightarrow> h x = g(f x)"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2532
    using function_factors_left_gen[of "\<lambda>x. x \<in> topspace X" f h] assms by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2533
  show ?thesis
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2534
  proof
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2535
    show "g ` topspace Y = h ` topspace X"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2536
      using f g by (force dest!: quotient_imp_surjective_map)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2537
    show "continuous_map Y Z g"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2538
      by (metis comp_apply continuous_compose_quotient_map continuous_map_eq f g h)
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2539
  qed (simp add: g)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2540
qed
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2541
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2542
subsection\<open> Separated Sets\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2543
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2544
definition separatedin :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a set \<Rightarrow> bool"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2545
  where "separatedin X S T \<equiv>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2546
           S \<subseteq> topspace X \<and> T \<subseteq> topspace X \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2547
           S \<inter> X closure_of T = {} \<and> T \<inter> X closure_of S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2548
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2549
lemma separatedin_empty [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2550
     "separatedin X S {} \<longleftrightarrow> S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2551
     "separatedin X {} S \<longleftrightarrow> S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2552
  by (simp_all add: separatedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2553
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2554
lemma separatedin_refl [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2555
     "separatedin X S S \<longleftrightarrow> S = {}"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2556
  by (metis closure_of_subset empty_subsetI inf.orderE separatedin_def)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2557
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2558
lemma separatedin_sym:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2559
     "separatedin X S T \<longleftrightarrow> separatedin X T S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2560
  by (auto simp: separatedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2561
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2562
lemma separatedin_imp_disjoint:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2563
     "separatedin X S T \<Longrightarrow> disjnt S T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2564
  by (meson closure_of_subset disjnt_def disjnt_subset2 separatedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2565
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2566
lemma separatedin_mono:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2567
   "\<lbrakk>separatedin X S T; S' \<subseteq> S; T' \<subseteq> T\<rbrakk> \<Longrightarrow> separatedin X S' T'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2568
  unfolding separatedin_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2569
  using closure_of_mono by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2570
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2571
lemma separatedin_open_sets:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2572
     "\<lbrakk>openin X S; openin X T\<rbrakk> \<Longrightarrow> separatedin X S T \<longleftrightarrow> disjnt S T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2573
  unfolding disjnt_def separatedin_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2574
  by (auto simp: openin_Int_closure_of_eq_empty openin_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2575
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2576
lemma separatedin_closed_sets:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2577
     "\<lbrakk>closedin X S; closedin X T\<rbrakk> \<Longrightarrow> separatedin X S T \<longleftrightarrow> disjnt S T"
71840
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  2578
  unfolding closure_of_eq disjnt_def separatedin_def
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  2579
  by (metis closedin_def closure_of_eq inf_commute)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2580
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2581
lemma separatedin_subtopology:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2582
     "separatedin (subtopology X U) S T \<longleftrightarrow> S \<subseteq> U \<and> T \<subseteq> U \<and> separatedin X S T"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2583
  by (auto simp: separatedin_def closure_of_subtopology Int_ac disjoint_iff elim!: inf.orderE)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2584
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2585
lemma separatedin_discrete_topology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2586
     "separatedin (discrete_topology U) S T \<longleftrightarrow> S \<subseteq> U \<and> T \<subseteq> U \<and> disjnt S T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2587
  by (metis openin_discrete_topology separatedin_def separatedin_open_sets topspace_discrete_topology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2588
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2589
lemma separated_eq_distinguishable:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2590
   "separatedin X {x} {y} \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2591
        x \<in> topspace X \<and> y \<in> topspace X \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2592
        (\<exists>U. openin X U \<and> x \<in> U \<and> (y \<notin> U)) \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2593
        (\<exists>v. openin X v \<and> y \<in> v \<and> (x \<notin> v))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2594
  by (force simp: separatedin_def closure_of_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2595
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2596
lemma separatedin_Un [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2597
   "separatedin X S (T \<union> U) \<longleftrightarrow> separatedin X S T \<and> separatedin X S U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2598
   "separatedin X (S \<union> T) U \<longleftrightarrow> separatedin X S U \<and> separatedin X T U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2599
  by (auto simp: separatedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2600
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2601
lemma separatedin_Union:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2602
  "finite \<F> \<Longrightarrow> separatedin X S (\<Union>\<F>) \<longleftrightarrow> S \<subseteq> topspace X \<and> (\<forall>T \<in> \<F>. separatedin X S T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2603
  "finite \<F> \<Longrightarrow> separatedin X (\<Union>\<F>) S \<longleftrightarrow> (\<forall>T \<in> \<F>. separatedin X S T) \<and> S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2604
  by (auto simp: separatedin_def closure_of_Union)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2605
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2606
lemma separatedin_openin_diff:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2607
   "\<lbrakk>openin X S; openin X T\<rbrakk> \<Longrightarrow> separatedin X (S - T) (T - S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2608
  unfolding separatedin_def
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2609
  by (metis Diff_Int_distrib2 Diff_disjoint Diff_empty Diff_mono empty_Diff empty_subsetI openin_Int_closure_of_eq_empty openin_subset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2610
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2611
lemma separatedin_closedin_diff:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2612
  assumes "closedin X S" "closedin X T"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2613
  shows "separatedin X (S - T) (T - S)"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2614
proof -
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2615
  have "S - T \<subseteq> topspace X" "T - S \<subseteq> topspace X"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2616
    using assms closedin_subset by auto
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2617
  with assms show ?thesis
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2618
    by (simp add: separatedin_def Diff_Int_distrib2 closure_of_minimal inf_absorb2)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2619
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2620
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2621
lemma separation_closedin_Un_gen:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2622
     "separatedin X S T \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2623
        S \<subseteq> topspace X \<and> T \<subseteq> topspace X \<and> disjnt S T \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2624
        closedin (subtopology X (S \<union> T)) S \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2625
        closedin (subtopology X (S \<union> T)) T"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2626
  by (auto simp add: separatedin_def closedin_Int_closure_of disjnt_iff dest: closure_of_subset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2627
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2628
lemma separation_openin_Un_gen:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2629
     "separatedin X S T \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2630
        S \<subseteq> topspace X \<and> T \<subseteq> topspace X \<and> disjnt S T \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2631
        openin (subtopology X (S \<union> T)) S \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2632
        openin (subtopology X (S \<union> T)) T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2633
  unfolding openin_closedin_eq topspace_subtopology separation_closedin_Un_gen disjnt_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2634
  by (auto simp: Diff_triv Int_commute Un_Diff inf_absorb1 topspace_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2635
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2636
lemma separatedin_full:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2637
   "S \<union> T = topspace X
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2638
   \<Longrightarrow> separatedin X S T \<longleftrightarrow> disjnt S T \<and> closedin X S \<and> openin X S \<and> closedin X T \<and> openin X T"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2639
  by (metis separatedin_open_sets separation_closedin_Un_gen separation_openin_Un_gen subtopology_topspace)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  2640
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2641
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2642
subsection\<open>Homeomorphisms\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2643
text\<open>(1-way and 2-way versions may be useful in places)\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2644
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2645
definition homeomorphic_map :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2646
  where
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2647
 "homeomorphic_map X Y f \<equiv> quotient_map X Y f \<and> inj_on f (topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2648
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2649
definition homeomorphic_maps :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'a) \<Rightarrow> bool"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2650
  where
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2651
 "homeomorphic_maps X Y f g \<equiv>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2652
    continuous_map X Y f \<and> continuous_map Y X g \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2653
     (\<forall>x \<in> topspace X. g(f x) = x) \<and> (\<forall>y \<in> topspace Y. f(g y) = y)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2654
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2655
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2656
lemma homeomorphic_map_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2657
   "\<lbrakk>homeomorphic_map X Y f; \<And>x. x \<in> topspace X \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> homeomorphic_map X Y g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2658
  by (meson homeomorphic_map_def inj_on_cong quotient_map_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2659
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2660
lemma homeomorphic_maps_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2661
     "\<lbrakk>homeomorphic_maps X Y f g;
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2662
       \<And>x. x \<in> topspace X \<Longrightarrow> f x = f' x; \<And>y. y \<in> topspace Y \<Longrightarrow> g y = g' y\<rbrakk>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2663
      \<Longrightarrow> homeomorphic_maps X Y f' g'"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2664
  unfolding homeomorphic_maps_def
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2665
  by (metis continuous_map_eq continuous_map_image_subset_topspace image_subset_iff) 
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2666
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2667
lemma homeomorphic_maps_sym:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2668
     "homeomorphic_maps X Y f g \<longleftrightarrow> homeomorphic_maps Y X g f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2669
  by (auto simp: homeomorphic_maps_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2670
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2671
lemma homeomorphic_maps_id:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2672
     "homeomorphic_maps X Y id id \<longleftrightarrow> Y = X"  (is "?lhs = ?rhs")
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2673
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2674
  assume L: ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2675
  then have "topspace X = topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2676
    by (auto simp: homeomorphic_maps_def continuous_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2677
  with L show ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2678
    unfolding homeomorphic_maps_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2679
    by (metis topology_finer_continuous_id topology_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2680
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2681
  assume ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2682
  then show ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2683
    unfolding homeomorphic_maps_def by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2684
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2685
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2686
lemma homeomorphic_map_id [simp]: "homeomorphic_map X Y id \<longleftrightarrow> Y = X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2687
       (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2688
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2689
  assume L: ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2690
  then have eq: "topspace X = topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2691
    by (auto simp: homeomorphic_map_def continuous_map_def quotient_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2692
  then have "\<And>S. openin X S \<longrightarrow> openin Y S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2693
    by (meson L homeomorphic_map_def injective_quotient_map topology_finer_open_id)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2694
  then show ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2695
    using L unfolding homeomorphic_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2696
    by (metis eq quotient_imp_continuous_map topology_eq topology_finer_continuous_id)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2697
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2698
  assume ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2699
  then show ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2700
    unfolding homeomorphic_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2701
    by (simp add: closed_map_id continuous_closed_imp_quotient_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2702
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2703
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2704
lemma homeomorphic_map_compose:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2705
  assumes "homeomorphic_map X Y f" "homeomorphic_map Y X'' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2706
  shows "homeomorphic_map X X'' (g \<circ> f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2707
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2708
  have "inj_on g (f ` topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2709
    by (metis (no_types) assms homeomorphic_map_def quotient_imp_surjective_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2710
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2711
    using assms by (meson comp_inj_on homeomorphic_map_def quotient_map_compose_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2712
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2713
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2714
lemma homeomorphic_maps_compose:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2715
   "homeomorphic_maps X Y f h \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2716
        homeomorphic_maps Y X'' g k
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2717
        \<Longrightarrow> homeomorphic_maps X X'' (g \<circ> f) (h \<circ> k)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2718
  unfolding homeomorphic_maps_def
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2719
  by (auto simp: continuous_map_compose; simp add: continuous_map_def Pi_iff)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2720
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2721
lemma homeomorphic_eq_everything_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2722
   "homeomorphic_map X Y f \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2723
        continuous_map X Y f \<and> open_map X Y f \<and> closed_map X Y f \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2724
        f ` (topspace X) = topspace Y \<and> inj_on f (topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2725
  unfolding homeomorphic_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2726
  by (force simp: injective_quotient_map intro: injective_quotient_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2727
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2728
lemma homeomorphic_imp_continuous_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2729
     "homeomorphic_map X Y f \<Longrightarrow> continuous_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2730
  by (simp add: homeomorphic_eq_everything_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2731
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2732
lemma homeomorphic_imp_open_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2733
   "homeomorphic_map X Y f \<Longrightarrow> open_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2734
  by (simp add: homeomorphic_eq_everything_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2735
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2736
lemma homeomorphic_imp_closed_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2737
   "homeomorphic_map X Y f \<Longrightarrow> closed_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2738
  by (simp add: homeomorphic_eq_everything_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2739
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2740
lemma homeomorphic_imp_surjective_map:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2741
   "homeomorphic_map X Y f \<Longrightarrow> f ` topspace X = topspace Y"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2742
  using homeomorphic_eq_everything_map by fastforce
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2743
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2744
lemma homeomorphic_imp_injective_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2745
    "homeomorphic_map X Y f \<Longrightarrow> inj_on f (topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2746
  by (simp add: homeomorphic_eq_everything_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2747
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2748
lemma bijective_open_imp_homeomorphic_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2749
   "\<lbrakk>continuous_map X Y f; open_map X Y f; f ` (topspace X) = topspace Y; inj_on f (topspace X)\<rbrakk>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2750
        \<Longrightarrow> homeomorphic_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2751
  by (simp add: homeomorphic_map_def continuous_open_imp_quotient_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2752
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2753
lemma bijective_closed_imp_homeomorphic_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2754
   "\<lbrakk>continuous_map X Y f; closed_map X Y f; f ` (topspace X) = topspace Y; inj_on f (topspace X)\<rbrakk>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2755
        \<Longrightarrow> homeomorphic_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2756
  by (simp add: continuous_closed_quotient_map homeomorphic_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2757
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2758
lemma open_eq_continuous_inverse_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2759
  assumes X: "\<And>x. x \<in> topspace X \<Longrightarrow> f x \<in> topspace Y \<and> g(f x) = x"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2760
    and Y: "\<And>y. y \<in> topspace Y \<Longrightarrow> g y \<in> topspace X \<and> f(g y) = y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2761
  shows "open_map X Y f \<longleftrightarrow> continuous_map Y X g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2762
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2763
  have eq: "{x \<in> topspace Y. g x \<in> U} = f ` U" if "openin X U" for U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2764
    using openin_subset [OF that] by (force simp: X Y image_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2765
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2766
    by (auto simp: Y open_map_def continuous_map_def eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2767
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2768
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2769
lemma closed_eq_continuous_inverse_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2770
  assumes X: "\<And>x. x \<in> topspace X \<Longrightarrow> f x \<in> topspace Y \<and> g(f x) = x"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2771
    and Y: "\<And>y. y \<in> topspace Y \<Longrightarrow> g y \<in> topspace X \<and> f(g y) = y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2772
  shows "closed_map X Y f \<longleftrightarrow> continuous_map Y X g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2773
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2774
  have eq: "{x \<in> topspace Y. g x \<in> U} = f ` U" if "closedin X U" for U
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2775
    using closedin_subset [OF that] by (force simp: X Y image_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2776
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2777
    by (auto simp: Y closed_map_def continuous_map_closedin eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2778
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2779
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2780
lemma homeomorphic_maps_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2781
  "homeomorphic_maps X Y f g \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2782
        homeomorphic_map X Y f \<and> homeomorphic_map Y X g \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2783
        (\<forall>x \<in> topspace X. g(f x) = x) \<and> (\<forall>y \<in> topspace Y. f(g y) = y)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2784
  (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2785
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2786
  assume ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2787
  then have L: "continuous_map X Y f" "continuous_map Y X g" "\<forall>x\<in>topspace X. g (f x) = x" "\<forall>x'\<in>topspace Y. f (g x') = x'"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2788
    by (auto simp: homeomorphic_maps_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2789
  show ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2790
  proof (intro conjI bijective_open_imp_homeomorphic_map L)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2791
    show "open_map X Y f"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2792
      using L using open_eq_continuous_inverse_map [of concl: X Y f g] 
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2793
      by (simp add: continuous_map_def Pi_iff)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2794
    show "open_map Y X g"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2795
      using L using open_eq_continuous_inverse_map [of concl: Y X g f] 
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2796
      by (simp add: continuous_map_def Pi_iff)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2797
    show "f ` topspace X = topspace Y" "g ` topspace Y = topspace X"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  2798
      using L by (force simp: continuous_map_closedin Pi_iff)+
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2799
    show "inj_on f (topspace X)" "inj_on g (topspace Y)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2800
      using L unfolding inj_on_def by metis+
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2801
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2802
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2803
  assume ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2804
  then show ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2805
    by (auto simp: homeomorphic_maps_def homeomorphic_imp_continuous_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2806
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2807
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2808
lemma homeomorphic_maps_imp_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2809
    "homeomorphic_maps X Y f g \<Longrightarrow> homeomorphic_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2810
  using homeomorphic_maps_map by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2811
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2812
lemma homeomorphic_map_maps:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2813
     "homeomorphic_map X Y f \<longleftrightarrow> (\<exists>g. homeomorphic_maps X Y f g)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2814
  (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2815
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2816
  assume ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2817
  then have L: "continuous_map X Y f" "open_map X Y f" "closed_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2818
    "f ` (topspace X) = topspace Y" "inj_on f (topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2819
    by (auto simp: homeomorphic_eq_everything_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2820
  have X: "\<And>x. x \<in> topspace X \<Longrightarrow> f x \<in> topspace Y \<and> inv_into (topspace X) f (f x) = x"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2821
    using L by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2822
  have Y: "\<And>y. y \<in> topspace Y \<Longrightarrow> inv_into (topspace X) f y \<in> topspace X \<and> f (inv_into (topspace X) f y) = y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2823
    by (simp add: L f_inv_into_f inv_into_into)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2824
  have "homeomorphic_maps X Y f (inv_into (topspace X) f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2825
    unfolding homeomorphic_maps_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2826
  proof (intro conjI L)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2827
    show "continuous_map Y X (inv_into (topspace X) f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2828
      by (simp add: L X Y flip: open_eq_continuous_inverse_map [where f=f])
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2829
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2830
    show "\<forall>x\<in>topspace X. inv_into (topspace X) f (f x) = x"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2831
         "\<forall>y\<in>topspace Y. f (inv_into (topspace X) f y) = y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2832
      using X Y by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2833
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2834
  then show ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2835
    by metis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2836
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2837
  assume ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2838
  then show ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2839
    using homeomorphic_maps_map by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2840
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2841
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2842
lemma homeomorphic_maps_involution:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2843
   "\<lbrakk>continuous_map X X f; \<And>x. x \<in> topspace X \<Longrightarrow> f(f x) = x\<rbrakk> \<Longrightarrow> homeomorphic_maps X X f f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2844
  by (auto simp: homeomorphic_maps_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2845
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2846
lemma homeomorphic_map_involution:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2847
   "\<lbrakk>continuous_map X X f; \<And>x. x \<in> topspace X \<Longrightarrow> f(f x) = x\<rbrakk> \<Longrightarrow> homeomorphic_map X X f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2848
  using homeomorphic_maps_involution homeomorphic_maps_map by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2849
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2850
lemma homeomorphic_map_openness:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2851
  assumes hom: "homeomorphic_map X Y f" and U: "U \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2852
  shows "openin Y (f ` U) \<longleftrightarrow> openin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2853
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2854
  obtain g where "homeomorphic_maps X Y f g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2855
    using assms by (auto simp: homeomorphic_map_maps)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2856
  then have g: "homeomorphic_map Y X g" and gf: "\<And>x. x \<in> topspace X \<Longrightarrow> g(f x) = x"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2857
    by (auto simp: homeomorphic_maps_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2858
  then have "openin X U \<Longrightarrow> openin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2859
    using hom homeomorphic_imp_open_map open_map_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2860
  show "openin Y (f ` U) = openin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2861
  proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2862
    assume L: "openin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2863
    have "U = g ` (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2864
      using U gf by force
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2865
    then show "openin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2866
      by (metis L homeomorphic_imp_open_map open_map_def g)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2867
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2868
    assume "openin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2869
    then show "openin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2870
      using hom homeomorphic_imp_open_map open_map_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2871
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2872
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2873
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2874
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2875
lemma homeomorphic_map_closedness:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2876
  assumes hom: "homeomorphic_map X Y f" and U: "U \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2877
  shows "closedin Y (f ` U) \<longleftrightarrow> closedin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2878
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2879
  obtain g where "homeomorphic_maps X Y f g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2880
    using assms by (auto simp: homeomorphic_map_maps)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2881
  then have g: "homeomorphic_map Y X g" and gf: "\<And>x. x \<in> topspace X \<Longrightarrow> g(f x) = x"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2882
    by (auto simp: homeomorphic_maps_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2883
  then have "closedin X U \<Longrightarrow> closedin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2884
    using hom homeomorphic_imp_closed_map closed_map_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2885
  show "closedin Y (f ` U) = closedin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2886
  proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2887
    assume L: "closedin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2888
    have "U = g ` (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2889
      using U gf by force
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2890
    then show "closedin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2891
      by (metis L homeomorphic_imp_closed_map closed_map_def g)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2892
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2893
    assume "closedin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2894
    then show "closedin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2895
      using hom homeomorphic_imp_closed_map closed_map_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2896
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2897
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2898
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2899
lemma homeomorphic_map_openness_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2900
     "homeomorphic_map X Y f \<Longrightarrow> openin X U \<longleftrightarrow> U \<subseteq> topspace X \<and> openin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2901
  by (meson homeomorphic_map_openness openin_closedin_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2902
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2903
lemma homeomorphic_map_closedness_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2904
    "homeomorphic_map X Y f \<Longrightarrow> closedin X U \<longleftrightarrow> U \<subseteq> topspace X \<and> closedin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2905
  by (meson closedin_subset homeomorphic_map_closedness)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2906
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2907
lemma all_openin_homeomorphic_image:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2908
  assumes "homeomorphic_map X Y f"
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2909
  shows "(\<forall>V. openin Y V \<longrightarrow> P V) \<longleftrightarrow> (\<forall>U. openin X U \<longrightarrow> P(f ` U))"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2910
  by (metis (no_types, lifting) assms homeomorphic_eq_everything_map homeomorphic_map_openness openin_subset subset_image_iff) 
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2911
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2912
lemma all_closedin_homeomorphic_image:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2913
  assumes "homeomorphic_map X Y f"
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2914
  shows "(\<forall>V. closedin Y V \<longrightarrow> P V) \<longleftrightarrow> (\<forall>U. closedin X U \<longrightarrow> P(f ` U))"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  2915
  by (metis (no_types, lifting) assms closedin_subset homeomorphic_eq_everything_map homeomorphic_map_closedness subset_image_iff)  
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2916
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2917
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2918
lemma homeomorphic_map_derived_set_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2919
  assumes hom: "homeomorphic_map X Y f" and S: "S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2920
  shows "Y derived_set_of (f ` S) = f ` (X derived_set_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2921
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2922
  have fim: "f ` (topspace X) = topspace Y" and inj: "inj_on f (topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2923
    using hom by (auto simp: homeomorphic_eq_everything_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2924
  have iff: "(\<forall>T. x \<in> T \<and> openin X T \<longrightarrow> (\<exists>y. y \<noteq> x \<and> y \<in> S \<and> y \<in> T)) =
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2925
            (\<forall>T. T \<subseteq> topspace Y \<longrightarrow> f x \<in> T \<longrightarrow> openin Y T \<longrightarrow> (\<exists>y. y \<noteq> f x \<and> y \<in> f ` S \<and> y \<in> T))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2926
    if "x \<in> topspace X" for x
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2927
  proof -
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2928
    have \<section>: "(x \<in> T \<and> openin X T) = (T \<subseteq> topspace X \<and> f x \<in> f ` T \<and> openin Y (f ` T))" for T
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2929
      by (meson hom homeomorphic_map_openness_eq inj inj_on_image_mem_iff that)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2930
    moreover have "(\<exists>y. y \<noteq> x \<and> y \<in> S \<and> y \<in> T) = (\<exists>y. y \<noteq> f x \<and> y \<in> f ` S \<and> y \<in> f ` T)"  (is "?lhs = ?rhs")
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2931
      if "T \<subseteq> topspace X \<and> f x \<in> f ` T \<and> openin Y (f ` T)" for T
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2932
      unfolding image_iff
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2933
      using S \<open>x \<in> topspace X\<close> that 
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2934
      by (metis (full_types) inj inj_onD [OF inj] subsetD the_inv_into_f_f)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2935
    ultimately show ?thesis
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2936
      by (auto simp flip: fim simp: all_subset_image)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2937
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2938
  have *: "\<lbrakk>T = f ` S; \<And>x. x \<in> S \<Longrightarrow> P x \<longleftrightarrow> Q(f x)\<rbrakk> \<Longrightarrow> {y. y \<in> T \<and> Q y} = f ` {x \<in> S. P x}" for T S P Q
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2939
    by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2940
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2941
    unfolding derived_set_of_def
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  2942
    by (rule *) (use fim iff openin_subset in force)+
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2943
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2944
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2945
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2946
lemma homeomorphic_map_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2947
  assumes hom: "homeomorphic_map X Y f" and S: "S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2948
  shows "Y closure_of (f ` S) = f ` (X closure_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2949
  unfolding closure_of
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2950
  using homeomorphic_imp_surjective_map [OF hom] S
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2951
  by (auto simp: in_derived_set_of homeomorphic_map_derived_set_of [OF assms])
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2952
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2953
lemma homeomorphic_map_interior_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2954
  assumes hom: "homeomorphic_map X Y f" and S: "S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2955
  shows "Y interior_of (f ` S) = f ` (X interior_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2956
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2957
  { fix y
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2958
    assume "y \<in> topspace Y" and "y \<notin> Y closure_of (topspace Y - f ` S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2959
    then have "y \<in> f ` (topspace X - X closure_of (topspace X - S))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2960
      using homeomorphic_eq_everything_map [THEN iffD1, OF hom] homeomorphic_map_closure_of [OF hom]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2961
      by (metis DiffI Diff_subset S closure_of_subset_topspace inj_on_image_set_diff) }
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2962
  moreover
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2963
  have "f x \<in> topspace Y" if "x \<in> topspace X" for x
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2964
    using that hom homeomorphic_imp_surjective_map by blast 
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2965
  moreover
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2966
  { fix x
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2967
    assume "x \<in> topspace X" and "f x \<in> Y closure_of (topspace Y - f ` S)"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2968
    then have "x \<in> X closure_of (topspace X - S)"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2969
      using homeomorphic_map_closure_of [OF hom] hom
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2970
      unfolding homeomorphic_eq_everything_map
71857
d73955442df5 a few new lemmas about functions
paulson <lp15@cam.ac.uk>
parents: 71840
diff changeset
  2971
      by (metis Diff_subset S closure_of_subset_topspace inj_on_image_mem_iff inj_on_image_set_diff)
d73955442df5 a few new lemmas about functions
paulson <lp15@cam.ac.uk>
parents: 71840
diff changeset
  2972
  }
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2973
  ultimately  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2974
    by (auto simp: interior_of_closure_of)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2975
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2976
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2977
lemma homeomorphic_map_frontier_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2978
  assumes hom: "homeomorphic_map X Y f" and S: "S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2979
  shows "Y frontier_of (f ` S) = f ` (X frontier_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2980
  unfolding frontier_of_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2981
proof (intro equalityI subsetI DiffI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2982
  fix y
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2983
  assume "y \<in> Y closure_of f ` S - Y interior_of f ` S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2984
  then show "y \<in> f ` (X closure_of S - X interior_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2985
    using S hom homeomorphic_map_closure_of homeomorphic_map_interior_of by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2986
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2987
  fix y
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2988
  assume "y \<in> f ` (X closure_of S - X interior_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2989
  then show "y \<in> Y closure_of f ` S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2990
    using S hom homeomorphic_map_closure_of by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2991
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2992
  fix x
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2993
  assume "x \<in> f ` (X closure_of S - X interior_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2994
  then obtain y where y: "x = f y" "y \<in> X closure_of S" "y \<notin> X interior_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2995
    by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2996
  then show "x \<notin> Y interior_of f ` S"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2997
    using S hom homeomorphic_map_interior_of
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  2998
    unfolding homeomorphic_map_def
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  2999
    by (metis (no_types, lifting) closure_of_subset_topspace inj_on_image_mem_iff
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3000
        interior_of_subset_closure_of subset_inj_on)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3001
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3002
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3003
lemma homeomorphic_maps_subtopologies:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3004
   "\<lbrakk>homeomorphic_maps X Y f g;  f ` (topspace X \<inter> S) = topspace Y \<inter> T\<rbrakk>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3005
        \<Longrightarrow> homeomorphic_maps (subtopology X S) (subtopology Y T) f g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3006
  unfolding homeomorphic_maps_def
71172
nipkow
parents: 70532
diff changeset
  3007
  by (force simp: continuous_map_from_subtopology continuous_map_in_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3008
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3009
lemma homeomorphic_maps_subtopologies_alt:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3010
     "\<lbrakk>homeomorphic_maps X Y f g; f ` (topspace X \<inter> S) \<subseteq> T; g ` (topspace Y \<inter> T) \<subseteq> S\<rbrakk>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3011
      \<Longrightarrow> homeomorphic_maps (subtopology X S) (subtopology Y T) f g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3012
  unfolding homeomorphic_maps_def
71172
nipkow
parents: 70532
diff changeset
  3013
  by (force simp: continuous_map_from_subtopology continuous_map_in_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3014
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3015
lemma homeomorphic_map_subtopologies:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3016
   "\<lbrakk>homeomorphic_map X Y f; f ` (topspace X \<inter> S) = topspace Y \<inter> T\<rbrakk>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3017
        \<Longrightarrow> homeomorphic_map (subtopology X S) (subtopology Y T) f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3018
  by (meson homeomorphic_map_maps homeomorphic_maps_subtopologies)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3019
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3020
lemma homeomorphic_map_subtopologies_alt:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3021
  assumes hom: "homeomorphic_map X Y f" 
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3022
      and S: "\<And>x. \<lbrakk>x \<in> topspace X; f x \<in> topspace Y\<rbrakk> \<Longrightarrow> f x \<in> T \<longleftrightarrow> x \<in> S"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3023
    shows "homeomorphic_map (subtopology X S) (subtopology Y T) f"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3024
proof -
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3025
  have "homeomorphic_maps (subtopology X S) (subtopology Y T) f g" 
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3026
    if "homeomorphic_maps X Y f g" for g
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3027
  proof (rule homeomorphic_maps_subtopologies [OF that])
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3028
    have "f ` (topspace X \<inter> S) \<subseteq> topspace Y \<inter> T"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3029
      using S hom homeomorphic_imp_surjective_map by fastforce
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3030
    then show "f ` (topspace X \<inter> S) = topspace Y \<inter> T"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  3031
      using that unfolding homeomorphic_maps_def continuous_map_def Pi_iff
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3032
      by (smt (verit, del_insts) Int_iff S image_iff subsetI subset_antisym)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3033
  qed
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3034
  then show ?thesis
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3035
    using hom by (meson homeomorphic_map_maps)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3036
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3037
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3038
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3039
subsection\<open>Relation of homeomorphism between topological spaces\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3040
80914
d97fdabd9e2b standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents: 78336
diff changeset
  3041
definition homeomorphic_space (infixr \<open>homeomorphic'_space\<close> 50)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3042
  where "X homeomorphic_space Y \<equiv> \<exists>f g. homeomorphic_maps X Y f g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3043
78200
264f2b69d09c New and generalised analysis lemmas
paulson <lp15@cam.ac.uk>
parents: 78127
diff changeset
  3044
lemma homeomorphic_space_refl [iff]: "X homeomorphic_space X"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3045
  by (meson homeomorphic_maps_id homeomorphic_space_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3046
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3047
lemma homeomorphic_space_sym:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3048
   "X homeomorphic_space Y \<longleftrightarrow> Y homeomorphic_space X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3049
  unfolding homeomorphic_space_def by (metis homeomorphic_maps_sym)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3050
70086
72c52a897de2 First tranche of the Homology development: Simplices
paulson <lp15@cam.ac.uk>
parents: 70065
diff changeset
  3051
lemma homeomorphic_space_trans [trans]:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3052
     "\<lbrakk>X1 homeomorphic_space X2; X2 homeomorphic_space X3\<rbrakk> \<Longrightarrow> X1 homeomorphic_space X3"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3053
  unfolding homeomorphic_space_def by (metis homeomorphic_maps_compose)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3054
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3055
lemma homeomorphic_space:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3056
     "X homeomorphic_space Y \<longleftrightarrow> (\<exists>f. homeomorphic_map X Y f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3057
  by (simp add: homeomorphic_map_maps homeomorphic_space_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3058
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3059
lemma homeomorphic_maps_imp_homeomorphic_space:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3060
     "homeomorphic_maps X Y f g \<Longrightarrow> X homeomorphic_space Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3061
  unfolding homeomorphic_space_def by metis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3062
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3063
lemma homeomorphic_map_imp_homeomorphic_space:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3064
     "homeomorphic_map X Y f \<Longrightarrow> X homeomorphic_space Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3065
  unfolding homeomorphic_map_maps
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3066
  using homeomorphic_space_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3067
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3068
lemma homeomorphic_empty_space:
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3069
     "X homeomorphic_space Y \<Longrightarrow> X = trivial_topology \<longleftrightarrow> Y = trivial_topology"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3070
  by (meson continuous_map_on_empty2 homeomorphic_maps_def homeomorphic_space_def)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3071
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3072
lemma homeomorphic_empty_space_eq:
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3073
  assumes "X = trivial_topology"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3074
  shows "X homeomorphic_space Y \<longleftrightarrow> Y = trivial_topology"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3075
  using assms funcset_mem
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3076
  by (fastforce simp:  homeomorphic_maps_def homeomorphic_space_def continuous_map_def)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3077
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3078
lemma homeomorphic_space_unfold:
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3079
  assumes "X homeomorphic_space Y"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3080
  obtains f g where  "homeomorphic_map X Y f"  "homeomorphic_map Y X g"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3081
    and "\<And>x. x \<in> topspace X \<Longrightarrow> g(f x) = x" "\<And>y. y \<in> topspace Y \<Longrightarrow> f(g y) = y"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3082
    and "f \<in> topspace X \<rightarrow> topspace Y"  "g \<in> topspace Y \<rightarrow> topspace X"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3083
  using assms unfolding homeomorphic_space_def homeomorphic_maps_map
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3084
  by (smt (verit, best) Pi_I homeomorphic_imp_surjective_map image_eqI)
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3085
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3086
subsection\<open>Connected topological spaces\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3087
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3088
definition connected_space :: "'a topology \<Rightarrow> bool" where
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3089
  "connected_space X \<equiv>
69508
2a4c8a2a3f8e tuned headers; ~ -> \<not>
nipkow
parents: 69325
diff changeset
  3090
        \<not>(\<exists>E1 E2. openin X E1 \<and> openin X E2 \<and>
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3091
                  topspace X \<subseteq> E1 \<union> E2 \<and> E1 \<inter> E2 = {} \<and> E1 \<noteq> {} \<and> E2 \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3092
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3093
definition connectedin :: "'a topology \<Rightarrow> 'a set \<Rightarrow> bool" where
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3094
  "connectedin X S \<equiv> S \<subseteq> topspace X \<and> connected_space (subtopology X S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3095
69945
35ba13ac6e5c New abstract topological material
paulson <lp15@cam.ac.uk>
parents: 69939
diff changeset
  3096
lemma connected_spaceD:
35ba13ac6e5c New abstract topological material
paulson <lp15@cam.ac.uk>
parents: 69939
diff changeset
  3097
  "\<lbrakk>connected_space X;
35ba13ac6e5c New abstract topological material
paulson <lp15@cam.ac.uk>
parents: 69939
diff changeset
  3098
    openin X U; openin X V; topspace X \<subseteq> U \<union> V; U \<inter> V = {}; U \<noteq> {}; V \<noteq> {}\<rbrakk> \<Longrightarrow> False"
35ba13ac6e5c New abstract topological material
paulson <lp15@cam.ac.uk>
parents: 69939
diff changeset
  3099
  by (auto simp: connected_space_def)
35ba13ac6e5c New abstract topological material
paulson <lp15@cam.ac.uk>
parents: 69939
diff changeset
  3100
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3101
lemma connectedin_subset_topspace: "connectedin X S \<Longrightarrow> S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3102
  by (simp add: connectedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3103
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3104
lemma connectedin_topspace:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3105
     "connectedin X (topspace X) \<longleftrightarrow> connected_space X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3106
  by (simp add: connectedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3107
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3108
lemma connected_space_subtopology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3109
     "connectedin X S \<Longrightarrow> connected_space (subtopology X S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3110
  by (simp add: connectedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3111
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3112
lemma connectedin_subtopology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3113
     "connectedin (subtopology X S) T \<longleftrightarrow> connectedin X T \<and> T \<subseteq> S"
71172
nipkow
parents: 70532
diff changeset
  3114
  by (force simp: connectedin_def subtopology_subtopology inf_absorb2)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3115
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3116
lemma connected_space_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3117
     "connected_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3118
      (\<nexists>E1 E2. openin X E1 \<and> openin X E2 \<and> E1 \<union> E2 = topspace X \<and> E1 \<inter> E2 = {} \<and> E1 \<noteq> {} \<and> E2 \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3119
  unfolding connected_space_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3120
  by (metis openin_Un openin_subset subset_antisym)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3121
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3122
lemma connected_space_closedin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3123
     "connected_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3124
      (\<nexists>E1 E2. closedin X E1 \<and> closedin X E2 \<and> topspace X \<subseteq> E1 \<union> E2 \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3125
               E1 \<inter> E2 = {} \<and> E1 \<noteq> {} \<and> E2 \<noteq> {})" (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3126
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3127
  assume ?lhs
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3128
  then have "\<And>E1 E2. \<lbrakk>openin X E1; E1 \<inter> E2 = {}; topspace X \<subseteq> E1 \<union> E2; openin X E2\<rbrakk> \<Longrightarrow> E1 = {} \<or> E2 = {}"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3129
    by (simp add: connected_space_def)
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3130
  then show ?rhs
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3131
    unfolding connected_space_def
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3132
    by (metis disjnt_def separatedin_closed_sets separation_openin_Un_gen subtopology_superset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3133
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3134
  assume R: ?rhs
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3135
  then show ?lhs
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3136
    unfolding connected_space_def
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3137
    by (metis Diff_triv Int_commute separatedin_openin_diff separation_closedin_Un_gen subtopology_superset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3138
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3139
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3140
lemma connected_space_closedin_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3141
     "connected_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3142
       (\<nexists>E1 E2. closedin X E1 \<and> closedin X E2 \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3143
                E1 \<union> E2 = topspace X \<and> E1 \<inter> E2 = {} \<and> E1 \<noteq> {} \<and> E2 \<noteq> {})"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3144
  by (metis closedin_Un closedin_def connected_space_closedin subset_antisym)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3145
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3146
lemma connected_space_clopen_in:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3147
     "connected_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3148
        (\<forall>T. openin X T \<and> closedin X T \<longrightarrow> T = {} \<or> T = topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3149
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3150
  have eq: "openin X E1 \<and> openin X E2 \<and> E1 \<union> E2 = topspace X \<and> E1 \<inter> E2 = {} \<and> P
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3151
        \<longleftrightarrow> E2 = topspace X - E1 \<and> openin X E1 \<and> openin X E2 \<and> P" for E1 E2 P
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3152
    using openin_subset by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3153
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3154
    unfolding connected_space_eq eq closedin_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3155
    by (auto simp: openin_closedin_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3156
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3157
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3158
lemma connectedin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3159
     "connectedin X S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3160
        S \<subseteq> topspace X \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3161
         (\<nexists>E1 E2.
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3162
             openin X E1 \<and> openin X E2 \<and>
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3163
             S \<subseteq> E1 \<union> E2 \<and> E1 \<inter> E2 \<inter> S = {} \<and> E1 \<inter> S \<noteq> {} \<and> E2 \<inter> S \<noteq> {})"  (is "?lhs = ?rhs")
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3164
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3165
  have *: "(\<exists>E1:: 'a set. \<exists>E2:: 'a set. (\<exists>T1:: 'a set. P1 T1 \<and> E1 = f1 T1) \<and> (\<exists>T2:: 'a set. P2 T2 \<and> E2 = f2 T2) \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3166
             R E1 E2) \<longleftrightarrow> (\<exists>T1 T2. P1 T1 \<and> P2 T2 \<and> R(f1 T1) (f2 T2))" for P1 f1 P2 f2 R
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3167
    by auto
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3168
  show ?thesis 
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3169
    unfolding connectedin_def connected_space_def openin_subtopology topspace_subtopology *
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3170
    by (intro conj_cong arg_cong [where f=Not] ex_cong1; blast dest!: openin_subset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3171
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3172
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  3173
lemma connectedinD:
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  3174
     "\<lbrakk>connectedin X S; openin X E1; openin X E2; S \<subseteq> E1 \<union> E2; E1 \<inter> E2 \<inter> S = {}; E1 \<inter> S \<noteq> {}; E2 \<inter> S \<noteq> {}\<rbrakk> \<Longrightarrow> False"
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  3175
  by (meson connectedin)
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  3176
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3177
lemma connectedin_iff_connected [simp]: "connectedin euclidean S \<longleftrightarrow> connected S"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3178
  by (simp add: connected_def connectedin)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3179
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3180
lemma connectedin_closedin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3181
   "connectedin X S \<longleftrightarrow>
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3182
      S \<subseteq> topspace X \<and>
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3183
      \<not>(\<exists>E1 E2. closedin X E1 \<and> closedin X E2 \<and>
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3184
                S \<subseteq> E1 \<union> E2 \<and> E1 \<inter> E2 \<inter> S = {} \<and> E1 \<inter> S \<noteq> {} \<and> E2 \<inter> S \<noteq> {})"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3185
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3186
  have *: "(\<exists>E1:: 'a set. \<exists>E2:: 'a set. (\<exists>T1:: 'a set. P1 T1 \<and> E1 = f1 T1) \<and> (\<exists>T2:: 'a set. P2 T2 \<and> E2 = f2 T2) \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3187
             R E1 E2) \<longleftrightarrow> (\<exists>T1 T2. P1 T1 \<and> P2 T2 \<and> R(f1 T1) (f2 T2))" for P1 f1 P2 f2 R
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3188
    by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3189
  show ?thesis
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3190
    unfolding connectedin_def connected_space_closedin closedin_subtopology topspace_subtopology *
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3191
    by (intro conj_cong arg_cong [where f=Not] ex_cong1; blast dest!: openin_subset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3192
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3193
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3194
lemma connectedin_empty [simp]: "connectedin X {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3195
  by (simp add: connectedin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3196
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3197
lemma connected_space_trivial_topology [simp]: "connected_space trivial_topology"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3198
  using connectedin_topspace by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3199
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3200
lemma connectedin_sing [simp]: "connectedin X {a} \<longleftrightarrow> a \<in> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3201
  by (simp add: connectedin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3202
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3203
lemma connectedin_absolute [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3204
  "connectedin (subtopology X S) S \<longleftrightarrow> connectedin X S"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3205
  by (simp add: connectedin_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3206
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3207
lemma connectedin_Union:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3208
  assumes \<U>: "\<And>S. S \<in> \<U> \<Longrightarrow> connectedin X S" and ne: "\<Inter>\<U> \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3209
  shows "connectedin X (\<Union>\<U>)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3210
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3211
  have "\<Union>\<U> \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3212
    using \<U> by (simp add: Union_least connectedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3213
  moreover have False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3214
    if "openin X E1" "openin X E2" and cover: "\<Union>\<U> \<subseteq> E1 \<union> E2" and disj: "E1 \<inter> E2 \<inter> \<Union>\<U> = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3215
       and overlap1: "E1 \<inter> \<Union>\<U> \<noteq> {}" and overlap2: "E2 \<inter> \<Union>\<U> \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3216
      for E1 E2
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3217
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3218
    have disjS: "E1 \<inter> E2 \<inter> S = {}" if "S \<in> \<U>" for S
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3219
      using Diff_triv that disj by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3220
    have coverS: "S \<subseteq> E1 \<union> E2" if "S \<in> \<U>" for S
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3221
      using that cover by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3222
    have "\<U> \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3223
      using overlap1 by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3224
    obtain a where a: "\<And>U. U \<in> \<U> \<Longrightarrow> a \<in> U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3225
      using ne by force
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3226
    with \<open>\<U> \<noteq> {}\<close> have "a \<in> \<Union>\<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3227
      by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3228
    then consider "a \<in> E1" | "a \<in> E2"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3229
      using \<open>\<Union>\<U> \<subseteq> E1 \<union> E2\<close> by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3230
    then show False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3231
    proof cases
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3232
      case 1
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3233
      then obtain b S where "b \<in> E2" "b \<in> S" "S \<in> \<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3234
        using overlap2 by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3235
      then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3236
        using "1" \<open>openin X E1\<close> \<open>openin X E2\<close> disjS coverS a [OF \<open>S \<in> \<U>\<close>]  \<U>[OF \<open>S \<in> \<U>\<close>]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3237
        unfolding connectedin
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3238
        by (meson disjoint_iff_not_equal)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3239
    next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3240
      case 2
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3241
      then obtain b S where "b \<in> E1" "b \<in> S" "S \<in> \<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3242
        using overlap1 by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3243
      then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3244
        using "2" \<open>openin X E1\<close> \<open>openin X E2\<close> disjS coverS a [OF \<open>S \<in> \<U>\<close>]  \<U>[OF \<open>S \<in> \<U>\<close>]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3245
        unfolding connectedin
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3246
        by (meson disjoint_iff_not_equal)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3247
    qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3248
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3249
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3250
    unfolding connectedin by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3251
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3252
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3253
lemma connectedin_Un:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3254
     "\<lbrakk>connectedin X S; connectedin X T; S \<inter> T \<noteq> {}\<rbrakk> \<Longrightarrow> connectedin X (S \<union> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3255
  using connectedin_Union [of "{S,T}"] by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3256
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3257
lemma connected_space_subconnected:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3258
  "connected_space X \<longleftrightarrow> (\<forall>x \<in> topspace X. \<forall>y \<in> topspace X. \<exists>S. connectedin X S \<and> x \<in> S \<and> y \<in> S)" (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3259
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3260
  assume R [rule_format]: ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3261
  have False if "openin X U" "openin X V" and disj: "U \<inter> V = {}" and cover: "topspace X \<subseteq> U \<union> V"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3262
    and "U \<noteq> {}" "V \<noteq> {}" for U V
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3263
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3264
    obtain u v where "u \<in> U" "v \<in> V"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3265
      using \<open>U \<noteq> {}\<close> \<open>V \<noteq> {}\<close> by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3266
    then obtain T where "u \<in> T" "v \<in> T" and T: "connectedin X T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3267
      using R [of u v] that
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3268
      by (meson \<open>openin X U\<close> \<open>openin X V\<close> subsetD openin_subset)
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3269
    with that show False
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3270
      unfolding connectedin
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3271
      by (metis IntI \<open>u \<in> U\<close> \<open>v \<in> V\<close> empty_iff inf_bot_left subset_trans)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3272
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3273
  then show ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3274
    by (auto simp: connected_space_def)
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3275
qed (use connectedin_topspace in blast)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3276
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3277
lemma connectedin_intermediate_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3278
  assumes "connectedin X S" "S \<subseteq> T" "T \<subseteq> X closure_of S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3279
  shows "connectedin X T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3280
proof -
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3281
  have S: "S \<subseteq> topspace X" and T: "T \<subseteq> topspace X"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3282
    using assms by (meson closure_of_subset_topspace dual_order.trans)+
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3283
  have \<section>: "\<And>E1 E2. \<lbrakk>openin X E1; openin X E2; E1 \<inter> S = {} \<or> E2 \<inter> S = {}\<rbrakk> \<Longrightarrow> E1 \<inter> T = {} \<or> E2 \<inter> T = {}"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3284
    using assms unfolding disjoint_iff by (meson in_closure_of subsetD)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3285
  then show ?thesis
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3286
    using assms
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3287
    unfolding connectedin closure_of_subset_topspace S T
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3288
    by (metis Int_empty_right T dual_order.trans inf.orderE inf_left_commute)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3289
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3290
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3291
lemma connectedin_closure_of:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3292
     "connectedin X S \<Longrightarrow> connectedin X (X closure_of S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3293
  by (meson closure_of_subset connectedin_def connectedin_intermediate_closure_of subset_refl)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3294
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3295
lemma connectedin_separation:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3296
  "connectedin X S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3297
        S \<subseteq> topspace X \<and>
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3298
        (\<nexists>C1 C2. C1 \<union> C2 = S \<and> C1 \<noteq> {} \<and> C2 \<noteq> {} \<and> C1 \<inter> X closure_of C2 = {} \<and> C2 \<inter> X closure_of C1 = {})" 
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3299
  unfolding connectedin_def connected_space_closedin_eq closedin_Int_closure_of topspace_subtopology
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3300
  apply (intro conj_cong refl arg_cong [where f=Not])
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3301
  apply (intro ex_cong1 iffI, blast)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3302
  using closure_of_subset_Int by force
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3303
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3304
lemma connectedin_eq_not_separated:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3305
   "connectedin X S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3306
         S \<subseteq> topspace X \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3307
         (\<nexists>C1 C2. C1 \<union> C2 = S \<and> C1 \<noteq> {} \<and> C2 \<noteq> {} \<and> separatedin X C1 C2)"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3308
  unfolding separatedin_def by (metis connectedin_separation sup.boundedE)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3309
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3310
lemma connectedin_eq_not_separated_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3311
  "connectedin X S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3312
      S \<subseteq> topspace X \<and> (\<nexists>C1 C2. S \<subseteq> C1 \<union> C2 \<and> S \<inter> C1 \<noteq> {} \<and> S \<inter> C2 \<noteq> {} \<and> separatedin X C1 C2)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3313
proof -
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3314
  have "\<forall>C1 C2. S \<subseteq> C1 \<union> C2 \<longrightarrow> S \<inter> C1 = {} \<or> S \<inter> C2 = {} \<or> \<not> separatedin X C1 C2"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3315
    if "\<And>C1 C2. C1 \<union> C2 = S \<longrightarrow> C1 = {} \<or> C2 = {} \<or> \<not> separatedin X C1 C2"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3316
  proof (intro allI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3317
    fix C1 C2
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3318
    show "S \<subseteq> C1 \<union> C2 \<longrightarrow> S \<inter> C1 = {} \<or> S \<inter> C2 = {} \<or> \<not> separatedin X C1 C2"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3319
      using that [of "S \<inter> C1" "S \<inter> C2"]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3320
      by (auto simp: separatedin_mono)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3321
  qed
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3322
  then show ?thesis
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3323
    by (metis Un_Int_eq(1) Un_Int_eq(2) connectedin_eq_not_separated order_refl)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3324
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3325
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3326
lemma connected_space_eq_not_separated:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3327
     "connected_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3328
      (\<nexists>C1 C2. C1 \<union> C2 = topspace X \<and> C1 \<noteq> {} \<and> C2 \<noteq> {} \<and> separatedin X C1 C2)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3329
  by (simp add: connectedin_eq_not_separated flip: connectedin_topspace)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3330
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3331
lemma connected_space_eq_not_separated_subset:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3332
  "connected_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3333
    (\<nexists>C1 C2. topspace X \<subseteq> C1 \<union> C2 \<and> C1 \<noteq> {} \<and> C2 \<noteq> {} \<and> separatedin X C1 C2)"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3334
  by (metis connected_space_eq_not_separated le_sup_iff separatedin_def subset_antisym)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3335
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3336
lemma connectedin_subset_separated_union:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3337
     "\<lbrakk>connectedin X C; separatedin X S T; C \<subseteq> S \<union> T\<rbrakk> \<Longrightarrow> C \<subseteq> S \<or> C \<subseteq> T"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3338
  unfolding connectedin_eq_not_separated_subset  by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3339
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3340
lemma connectedin_nonseparated_union:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3341
  assumes "connectedin X S" "connectedin X T" "\<not>separatedin X S T"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3342
  shows "connectedin X (S \<union> T)"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3343
proof -
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3344
  have "\<And>C1 C2. \<lbrakk>T \<subseteq> C1 \<union> C2; S \<subseteq> C1 \<union> C2\<rbrakk> \<Longrightarrow>
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3345
           S \<inter> C1 = {} \<and> T \<inter> C1 = {} \<or> S \<inter> C2 = {} \<and> T \<inter> C2 = {} \<or> \<not> separatedin X C1 C2"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3346
    using assms
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3347
    unfolding connectedin_eq_not_separated_subset
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3348
    by (metis (no_types, lifting) assms connectedin_subset_separated_union inf.orderE separatedin_empty(1) separatedin_mono separatedin_sym)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3349
  then show ?thesis
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3350
    unfolding connectedin_eq_not_separated_subset
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3351
    by (simp add: assms connectedin_subset_topspace Int_Un_distrib2)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3352
qed
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3353
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3354
lemma connected_space_closures:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3355
     "connected_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3356
        (\<nexists>e1 e2. e1 \<union> e2 = topspace X \<and> X closure_of e1 \<inter> X closure_of e2 = {} \<and> e1 \<noteq> {} \<and> e2 \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3357
     (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3358
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3359
  assume ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3360
  then show ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3361
    unfolding connected_space_closedin_eq
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3362
    by (metis Un_upper1 Un_upper2 closedin_closure_of closure_of_Un closure_of_eq_empty closure_of_topspace)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3363
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3364
  assume ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3365
  then show ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3366
    unfolding connected_space_closedin_eq
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3367
    by (metis closure_of_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3368
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3369
77934
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
  3370
lemma connectedin_Int_frontier_of:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3371
  assumes "connectedin X S" "S \<inter> T \<noteq> {}" "S - T \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3372
  shows "S \<inter> X frontier_of T \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3373
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3374
  have "S \<subseteq> topspace X" and *:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3375
    "\<And>E1 E2. openin X E1 \<longrightarrow> openin X E2 \<longrightarrow> E1 \<inter> E2 \<inter> S = {} \<longrightarrow> S \<subseteq> E1 \<union> E2 \<longrightarrow> E1 \<inter> S = {} \<or> E2 \<inter> S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3376
    using \<open>connectedin X S\<close> by (auto simp: connectedin)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3377
  moreover
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3378
  have "S - (topspace X \<inter> T) \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3379
    using assms(3) by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3380
  moreover
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3381
  have "S \<inter> topspace X \<inter> T \<noteq> {}"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3382
    using assms connectedin by fastforce
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3383
  moreover
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3384
  have False if "S \<inter> T \<noteq> {}" "S - T \<noteq> {}" "T \<subseteq> topspace X" "S \<inter> X frontier_of T = {}" for T
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3385
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3386
    have null: "S \<inter> (X closure_of T - X interior_of T) = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3387
      using that unfolding frontier_of_def by blast
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3388
    have "X interior_of T \<inter> (topspace X - X closure_of T) \<inter> S = {}"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3389
      by (metis Diff_disjoint inf_bot_left interior_of_Int interior_of_complement interior_of_empty)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3390
    moreover have "S \<subseteq> X interior_of T \<union> (topspace X - X closure_of T)"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3391
      using that \<open>S \<subseteq> topspace X\<close> null by auto
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3392
    moreover have "S \<inter> X interior_of T \<noteq> {}"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3393
      using closure_of_subset that(1) that(3) null by fastforce
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3394
    ultimately have "S \<inter> X interior_of (topspace X - T) = {}"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3395
      by (metis "*" inf_commute interior_of_complement openin_interior_of)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3396
    then have "topspace (subtopology X S) \<inter> X interior_of T = S"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3397
      using \<open>S \<subseteq> topspace X\<close> interior_of_complement null by fastforce
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3398
    then show ?thesis
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3399
      using that by (metis Diff_eq_empty_iff inf_le2 interior_of_subset subset_trans)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3400
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3401
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3402
    by (metis Int_lower1 frontier_of_restrict inf_assoc)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3403
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3404
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3405
lemma connectedin_continuous_map_image:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3406
  assumes f: "continuous_map X Y f" and "connectedin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3407
  shows "connectedin Y (f ` S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3408
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3409
  have "S \<subseteq> topspace X" and *:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3410
    "\<And>E1 E2. openin X E1 \<longrightarrow> openin X E2 \<longrightarrow> E1 \<inter> E2 \<inter> S = {} \<longrightarrow> S \<subseteq> E1 \<union> E2 \<longrightarrow> E1 \<inter> S = {} \<or> E2 \<inter> S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3411
    using \<open>connectedin X S\<close> by (auto simp: connectedin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3412
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3413
    unfolding connectedin connected_space_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3414
  proof (intro conjI notI; clarify)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3415
    show "f x \<in> topspace Y" if  "x \<in> S" for x
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3416
      using \<open>S \<subseteq> topspace X\<close> continuous_map_image_subset_topspace f that by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3417
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3418
    fix U V
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3419
    let ?U = "{x \<in> topspace X. f x \<in> U}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3420
    let ?V = "{x \<in> topspace X. f x \<in> V}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3421
    assume UV: "openin Y U" "openin Y V" "f ` S \<subseteq> U \<union> V" "U \<inter> V \<inter> f ` S = {}" "U \<inter> f ` S \<noteq> {}" "V \<inter> f ` S \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3422
    then have 1: "?U \<inter> ?V \<inter> S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3423
      by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3424
    have 2: "openin X ?U" "openin X ?V"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3425
      using \<open>openin Y U\<close> \<open>openin Y V\<close> continuous_map f by fastforce+
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3426
    show "False"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3427
      using * [of ?U ?V] UV \<open>S \<subseteq> topspace X\<close>
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3428
      by (auto simp: 1 2)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3429
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3430
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3431
78037
37894dff0111 More material from the HOL Light metric space library
paulson <lp15@cam.ac.uk>
parents: 77943
diff changeset
  3432
lemma connected_space_quotient_map_image:
37894dff0111 More material from the HOL Light metric space library
paulson <lp15@cam.ac.uk>
parents: 77943
diff changeset
  3433
   "\<lbrakk>quotient_map X X' q; connected_space X\<rbrakk> \<Longrightarrow> connected_space X'"
37894dff0111 More material from the HOL Light metric space library
paulson <lp15@cam.ac.uk>
parents: 77943
diff changeset
  3434
  by (metis connectedin_continuous_map_image connectedin_topspace quotient_imp_continuous_map quotient_imp_surjective_map)
37894dff0111 More material from the HOL Light metric space library
paulson <lp15@cam.ac.uk>
parents: 77943
diff changeset
  3435
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3436
lemma homeomorphic_connected_space:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3437
     "X homeomorphic_space Y \<Longrightarrow> connected_space X \<longleftrightarrow> connected_space Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3438
  unfolding homeomorphic_space_def homeomorphic_maps_def
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3439
  by (metis connected_space_subconnected connectedin_continuous_map_image connectedin_topspace continuous_map_image_subset_topspace image_eqI image_subset_iff)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3440
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3441
lemma homeomorphic_map_connectedness:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3442
  assumes f: "homeomorphic_map X Y f" and U: "U \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3443
  shows "connectedin Y (f ` U) \<longleftrightarrow> connectedin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3444
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3445
  have 1: "f ` U \<subseteq> topspace Y \<longleftrightarrow> U \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3446
    using U f homeomorphic_imp_surjective_map by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3447
  moreover have "connected_space (subtopology Y (f ` U)) \<longleftrightarrow> connected_space (subtopology X U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3448
  proof (rule homeomorphic_connected_space)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3449
    have "f ` U \<subseteq> topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3450
      by (simp add: U 1)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3451
    then have "topspace Y \<inter> f ` U = f ` U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3452
      by (simp add: subset_antisym)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3453
    then show "subtopology Y (f ` U) homeomorphic_space subtopology X U"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3454
      by (metis U f homeomorphic_map_imp_homeomorphic_space homeomorphic_map_subtopologies homeomorphic_space_sym inf.absorb_iff2)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3455
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3456
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3457
    by (auto simp: connectedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3458
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3459
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3460
lemma homeomorphic_map_connectedness_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3461
   "homeomorphic_map X Y f
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3462
        \<Longrightarrow> connectedin X U \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3463
             U \<subseteq> topspace X \<and> connectedin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3464
  using homeomorphic_map_connectedness connectedin_subset_topspace by metis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3465
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3466
lemma connectedin_discrete_topology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3467
   "connectedin (discrete_topology U) S \<longleftrightarrow> S \<subseteq> U \<and> (\<exists>a. S \<subseteq> {a})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3468
proof (cases "S \<subseteq> U")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3469
  case True
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3470
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3471
  proof (cases "S = {}")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3472
    case False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3473
    moreover have "connectedin (discrete_topology U) S \<longleftrightarrow> (\<exists>a. S = {a})"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3474
    proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3475
      show "connectedin (discrete_topology U) S \<Longrightarrow> \<exists>a. S = {a}"
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  3476
        using False connectedin_Int_frontier_of insert_Diff by fastforce
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3477
    qed (use True in auto)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3478
    ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3479
      by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3480
  qed simp
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3481
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3482
  case False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3483
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3484
    by (simp add: connectedin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3485
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3486
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3487
lemma connected_space_discrete_topology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3488
     "connected_space (discrete_topology U) \<longleftrightarrow> (\<exists>a. U \<subseteq> {a})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3489
  by (metis connectedin_discrete_topology connectedin_topspace order_refl topspace_discrete_topology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3490
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3491
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3492
subsection\<open>Compact sets\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3493
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3494
definition compactin where
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3495
 "compactin X S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3496
     S \<subseteq> topspace X \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3497
     (\<forall>\<U>. (\<forall>U \<in> \<U>. openin X U) \<and> S \<subseteq> \<Union>\<U>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3498
          \<longrightarrow> (\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> S \<subseteq> \<Union>\<F>))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3499
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3500
definition compact_space where
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3501
   "compact_space X \<equiv> compactin X (topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3502
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3503
lemma compact_space_alt:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3504
   "compact_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3505
        (\<forall>\<U>. (\<forall>U \<in> \<U>. openin X U) \<and> topspace X \<subseteq> \<Union>\<U>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3506
            \<longrightarrow> (\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> topspace X \<subseteq> \<Union>\<F>))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3507
  by (simp add: compact_space_def compactin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3508
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3509
lemma compact_space:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3510
   "compact_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3511
        (\<forall>\<U>. (\<forall>U \<in> \<U>. openin X U) \<and> \<Union>\<U> = topspace X
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3512
            \<longrightarrow> (\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> \<Union>\<F> = topspace X))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3513
  unfolding compact_space_alt
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3514
  using openin_subset by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3515
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  3516
lemma compactinD:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  3517
  "\<lbrakk>compactin X S; \<And>U. U \<in> \<U> \<Longrightarrow> openin X U; S \<subseteq> \<Union>\<U>\<rbrakk> \<Longrightarrow> \<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> S \<subseteq> \<Union>\<F>"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  3518
  by (auto simp: compactin_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  3519
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3520
lemma compactin_euclidean_iff [simp]: "compactin euclidean S \<longleftrightarrow> compact S"
69529
4ab9657b3257 capitalize proper names in lemma names
nipkow
parents: 69508
diff changeset
  3521
  by (simp add: compact_eq_Heine_Borel compactin_def) meson
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3522
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3523
lemma compactin_absolute [simp]:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3524
   "compactin (subtopology X S) S \<longleftrightarrow> compactin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3525
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3526
  have eq: "(\<forall>U \<in> \<U>. \<exists>Y. openin X Y \<and> U = Y \<inter> S) \<longleftrightarrow> \<U> \<subseteq> (\<lambda>Y. Y \<inter> S) ` {y. openin X y}" for \<U>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3527
    by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3528
  show ?thesis
71172
nipkow
parents: 70532
diff changeset
  3529
    by (auto simp: compactin_def openin_subtopology eq imp_conjL all_subset_image ex_finite_subset_image)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3530
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3531
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3532
lemma compactin_subspace: "compactin X S \<longleftrightarrow> S \<subseteq> topspace X \<and> compact_space (subtopology X S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3533
  unfolding compact_space_def topspace_subtopology
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3534
  by (metis compactin_absolute compactin_def inf.absorb2)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3535
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3536
lemma compact_space_subtopology: "compactin X S \<Longrightarrow> compact_space (subtopology X S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3537
  by (simp add: compactin_subspace)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3538
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3539
lemma compactin_subtopology: "compactin (subtopology X S) T \<longleftrightarrow> compactin X T \<and> T \<subseteq> S"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3540
  by (metis compactin_subspace inf.absorb_iff2 le_inf_iff subtopology_subtopology topspace_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3541
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3542
lemma compact_imp_compactin_subtopology:
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3543
  assumes "compactin X K" "K \<subseteq> S" shows "compactin (subtopology X S) K"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3544
  by (simp add: assms compactin_subtopology)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3545
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3546
lemma compactin_subset_topspace: "compactin X S \<Longrightarrow> S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3547
  by (simp add: compactin_subspace)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3548
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3549
lemma compactin_contractive:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3550
   "\<lbrakk>compactin X' S; topspace X' = topspace X;
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3551
     \<And>U. openin X U \<Longrightarrow> openin X' U\<rbrakk> \<Longrightarrow> compactin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3552
  by (simp add: compactin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3553
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3554
lemma finite_imp_compactin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3555
   "\<lbrakk>S \<subseteq> topspace X; finite S\<rbrakk> \<Longrightarrow> compactin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3556
  by (metis compactin_subspace compact_space finite_UnionD inf.absorb_iff2 order_refl topspace_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3557
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3558
lemma compactin_empty [iff]: "compactin X {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3559
  by (simp add: finite_imp_compactin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3560
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3561
lemma compact_space_trivial_topology [simp]: "compact_space trivial_topology"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3562
  by (simp add: compact_space_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3563
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3564
lemma finite_imp_compactin_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3565
   "finite S \<Longrightarrow> (compactin X S \<longleftrightarrow> S \<subseteq> topspace X)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3566
  using compactin_subset_topspace finite_imp_compactin by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3567
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3568
lemma compactin_sing [simp]: "compactin X {a} \<longleftrightarrow> a \<in> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3569
  by (simp add: finite_imp_compactin_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3570
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3571
lemma closed_compactin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3572
  assumes XK: "compactin X K" and "C \<subseteq> K" and XC: "closedin X C"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3573
  shows "compactin X C"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3574
  unfolding compactin_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3575
proof (intro conjI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3576
  show "C \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3577
    by (simp add: XC closedin_subset)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3578
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3579
  fix \<U> :: "'a set set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3580
  assume \<U>: "Ball \<U> (openin X) \<and> C \<subseteq> \<Union>\<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3581
  have "(\<forall>U\<in>insert (topspace X - C) \<U>. openin X U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3582
    using XC \<U> by blast
69745
aec42cee2521 more canonical and less specialized syntax
nipkow
parents: 69712
diff changeset
  3583
  moreover have "K \<subseteq> \<Union>(insert (topspace X - C) \<U>)"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3584
    using \<U> XK compactin_subset_topspace by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3585
  ultimately obtain \<F> where "finite \<F>" "\<F> \<subseteq> insert (topspace X - C) \<U>" "K \<subseteq> \<Union>\<F>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3586
    using assms unfolding compactin_def by metis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3587
  moreover have "openin X (topspace X - C)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3588
    using XC by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3589
  ultimately show "\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> C \<subseteq> \<Union>\<F>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3590
    using \<open>C \<subseteq> K\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3591
    by (rule_tac x="\<F> - {topspace X - C}" in exI) auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3592
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3593
78127
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3594
lemma closed_compactin_Inter:
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3595
  "\<lbrakk>compactin X K; K \<in> \<K>; \<And>K. K \<in> \<K> \<Longrightarrow> closedin X K\<rbrakk> \<Longrightarrow> compactin X (\<Inter>\<K>)"
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3596
  by (metis Inf_lower closed_compactin closedin_Inter empty_iff)
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3597
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3598
lemma closedin_subtopology_Int_subset:
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3599
   "\<lbrakk>closedin (subtopology X U) (U \<inter> S); V \<subseteq> U\<rbrakk> \<Longrightarrow> closedin (subtopology X V) (V \<inter> S)"
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3600
  by (smt (verit, ccfv_SIG) closedin_subtopology inf.left_commute inf.orderE inf_commute)
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3601
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3602
lemma closedin_subtopology_Int_closedin:
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3603
   "\<lbrakk>closedin (subtopology X U) S; closedin X T\<rbrakk> \<Longrightarrow> closedin (subtopology X U) (S \<inter> T)"
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3604
  by (smt (verit, best) closedin_Int closedin_subtopology inf_assoc inf_commute)
24b70433c2e8 New HOL Light material on metric spaces and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78093
diff changeset
  3605
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3606
lemma closedin_compact_space:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3607
   "\<lbrakk>compact_space X; closedin X S\<rbrakk> \<Longrightarrow> compactin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3608
  by (simp add: closed_compactin closedin_subset compact_space_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3609
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3610
lemma compact_Int_closedin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3611
  assumes "compactin X S" "closedin X T" shows "compactin X (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3612
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3613
  have "compactin (subtopology X S) (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3614
    by (metis assms closedin_compact_space closedin_subtopology compactin_subspace inf_commute)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3615
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3616
    by (simp add: compactin_subtopology)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3617
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3618
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3619
lemma closed_Int_compactin: "\<lbrakk>closedin X S; compactin X T\<rbrakk> \<Longrightarrow> compactin X (S \<inter> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3620
  by (metis compact_Int_closedin inf_commute)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3621
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3622
lemma compactin_Un:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3623
  assumes S: "compactin X S" and T: "compactin X T" shows "compactin X (S \<union> T)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3624
  unfolding compactin_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3625
proof (intro conjI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3626
  show "S \<union> T \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3627
    using assms by (auto simp: compactin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3628
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3629
  fix \<U> :: "'a set set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3630
  assume \<U>: "Ball \<U> (openin X) \<and> S \<union> T \<subseteq> \<Union>\<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3631
  with S obtain \<F> where \<V>: "finite \<F>" "\<F> \<subseteq> \<U>" "S \<subseteq> \<Union>\<F>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3632
    unfolding compactin_def by (meson sup.bounded_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3633
  obtain \<W> where "finite \<W>" "\<W> \<subseteq> \<U>" "T \<subseteq> \<Union>\<W>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3634
    using \<U> T
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3635
    unfolding compactin_def by (meson sup.bounded_iff)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3636
  with \<V> show "\<exists>\<V>. finite \<V> \<and> \<V> \<subseteq> \<U> \<and> S \<union> T \<subseteq> \<Union>\<V>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3637
    by (rule_tac x="\<F> \<union> \<W>" in exI) auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3638
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3639
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3640
lemma compactin_Union:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3641
   "\<lbrakk>finite \<F>; \<And>S. S \<in> \<F> \<Longrightarrow> compactin X S\<rbrakk> \<Longrightarrow> compactin X (\<Union>\<F>)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3642
by (induction rule: finite_induct) (simp_all add: compactin_Un)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3643
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3644
proposition compact_space_fip:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3645
   "compact_space X \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3646
    (\<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> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3647
   (is "_ = ?rhs")
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3648
proof (cases "X = trivial_topology")
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3649
  case True
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3650
  then show ?thesis
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3651
    by (metis Pow_iff closedin_topspace_empty compact_space_trivial_topology finite.emptyI finite_Pow_iff finite_subset subsetI)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3652
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3653
  case False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3654
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3655
  proof safe
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3656
    fix \<U> :: "'a set set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3657
    assume * [rule_format]: "\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<longrightarrow> \<Inter>\<F> \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3658
    define \<V> where "\<V> \<equiv> (\<lambda>S. topspace X - S) ` \<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3659
    assume clo: "\<forall>C\<in>\<U>. closedin X C" and [simp]: "\<Inter>\<U> = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3660
    then have "\<forall>V \<in> \<V>. openin X V" "topspace X \<subseteq> \<Union>\<V>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3661
      by (auto simp: \<V>_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3662
    moreover assume [unfolded compact_space_alt, rule_format, of \<V>]: "compact_space X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3663
    ultimately obtain \<F> where \<F>: "finite \<F>" "\<F> \<subseteq> \<U>" "topspace X \<subseteq> topspace X - \<Inter>\<F>"
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  3664
      by (auto simp: ex_finite_subset_image \<V>_def)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3665
    moreover have "\<F> \<noteq> {}"
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3666
      using \<F> False by force
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3667
    ultimately show "False"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3668
      using * [of \<F>]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3669
      by auto (metis Diff_iff Inter_iff clo closedin_def subsetD)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3670
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3671
    assume R [rule_format]: ?rhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3672
    show "compact_space X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3673
      unfolding compact_space_alt
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3674
    proof clarify
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3675
      fix \<U> :: "'a set set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3676
      define \<V> where "\<V> \<equiv> (\<lambda>S. topspace X - S) ` \<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3677
      assume "\<forall>C\<in>\<U>. openin X C" and "topspace X \<subseteq> \<Union>\<U>"
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  3678
      with False have *: "\<forall>V \<in> \<V>. closedin X V" "\<U> \<noteq> {}"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3679
        by (auto simp: \<V>_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3680
      show "\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> topspace X \<subseteq> \<Union>\<F>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3681
      proof (rule ccontr; simp)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3682
        assume "\<forall>\<F>\<subseteq>\<U>. finite \<F> \<longrightarrow> \<not> topspace X \<subseteq> \<Union>\<F>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3683
        then have "\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<V> \<longrightarrow> \<Inter>\<F> \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3684
          by (simp add: \<V>_def all_finite_subset_image)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3685
        with \<open>topspace X \<subseteq> \<Union>\<U>\<close> show False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3686
          using R [of \<V>] * by (simp add: \<V>_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3687
      qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3688
    qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3689
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3690
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3691
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3692
corollary compactin_fip:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3693
  "compactin X S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3694
    S \<subseteq> topspace X \<and>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3695
    (\<forall>\<U>. (\<forall>C\<in>\<U>. closedin X C) \<and> (\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<longrightarrow> S \<inter> \<Inter>\<F> \<noteq> {}) \<longrightarrow> S \<inter> \<Inter>\<U> \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3696
proof (cases "S = {}")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3697
  case False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3698
  show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3699
  proof (cases "S \<subseteq> topspace X")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3700
    case True
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3701
    then have "compactin X S \<longleftrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3702
          (\<forall>\<U>. \<U> \<subseteq> (\<lambda>T. S \<inter> T) ` {T. closedin X T} \<longrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3703
           (\<forall>\<F>. finite \<F> \<longrightarrow> \<F> \<subseteq> \<U> \<longrightarrow> \<Inter>\<F> \<noteq> {}) \<longrightarrow> \<Inter>\<U> \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3704
      by (simp add: compact_space_fip compactin_subspace closedin_subtopology image_def subset_eq Int_commute imp_conjL)
69313
b021008c5397 removed legacy input syntax
haftmann
parents: 69286
diff changeset
  3705
    also have "\<dots> = (\<forall>\<U>\<subseteq>Collect (closedin X). (\<forall>\<F>. finite \<F> \<longrightarrow> \<F> \<subseteq> (\<inter>) S ` \<U> \<longrightarrow> \<Inter>\<F> \<noteq> {}) \<longrightarrow> \<Inter> ((\<inter>) S ` \<U>) \<noteq> {})"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3706
      by (simp add: all_subset_image)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3707
    also have "\<dots> = (\<forall>\<U>. (\<forall>C\<in>\<U>. closedin X C) \<and> (\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<longrightarrow> S \<inter> \<Inter>\<F> \<noteq> {}) \<longrightarrow> S \<inter> \<Inter>\<U> \<noteq> {})"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3708
    proof -
69313
b021008c5397 removed legacy input syntax
haftmann
parents: 69286
diff changeset
  3709
      have eq: "((\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<longrightarrow> \<Inter> ((\<inter>) S ` \<F>) \<noteq> {}) \<longrightarrow> \<Inter> ((\<inter>) S ` \<U>) \<noteq> {}) \<longleftrightarrow>
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3710
                ((\<forall>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<longrightarrow> S \<inter> \<Inter>\<F> \<noteq> {}) \<longrightarrow> S \<inter> \<Inter>\<U> \<noteq> {})"  for \<U>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3711
        by simp (use \<open>S \<noteq> {}\<close> in blast)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3712
      show ?thesis
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3713
        unfolding imp_conjL [symmetric] all_finite_subset_image eq by blast
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3714
    qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3715
    finally show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3716
      using True by simp
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3717
  qed (simp add: compactin_subspace)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3718
qed force
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3719
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3720
corollary compact_space_imp_nest:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3721
  fixes C :: "nat \<Rightarrow> 'a set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3722
  assumes "compact_space X" and clo: "\<And>n. closedin X (C n)"
77934
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
  3723
    and ne: "\<And>n. C n \<noteq> {}" and dec: "decseq C"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3724
  shows "(\<Inter>n. C n) \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3725
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3726
  let ?\<U> = "range (\<lambda>n. \<Inter>m \<le> n. C m)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3727
  have "closedin X A" if "A \<in> ?\<U>" for A
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3728
    using that clo by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3729
  moreover have "(\<Inter>n\<in>K. \<Inter>m \<le> n. C m) \<noteq> {}" if "finite K" for K
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3730
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3731
    obtain n where "\<And>k. k \<in> K \<Longrightarrow> k \<le> n"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3732
      using Max.coboundedI \<open>finite K\<close> by blast
77934
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
  3733
    with dec have "C n \<subseteq> (\<Inter>n\<in>K. \<Inter>m \<le> n. C m)"
01c88cf514fc A few new theorems
paulson <lp15@cam.ac.uk>
parents: 77234
diff changeset
  3734
      unfolding decseq_def by blast
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3735
  with ne [of n] show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3736
    by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3737
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3738
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3739
    using \<open>compact_space X\<close> [unfolded compact_space_fip, rule_format, of ?\<U>]
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3740
    by (simp add: all_finite_subset_image INT_extend_simps UN_atMost_UNIV del: INT_simps)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3741
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3742
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3743
lemma compactin_discrete_topology:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3744
   "compactin (discrete_topology X) S \<longleftrightarrow> S \<subseteq> X \<and> finite S" (is "?lhs = ?rhs")
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3745
proof (intro iffI conjI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3746
  assume L: ?lhs
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3747
  then show "S \<subseteq> X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3748
    by (auto simp: compactin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3749
  have *: "\<And>\<U>. Ball \<U> (openin (discrete_topology X)) \<and> S \<subseteq> \<Union>\<U> \<Longrightarrow>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3750
        (\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> S \<subseteq> \<Union>\<F>)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3751
    using L by (auto simp: compactin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3752
  show "finite S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3753
    using * [of "(\<lambda>x. {x}) ` X"] \<open>S \<subseteq> X\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3754
    by clarsimp (metis UN_singleton finite_subset_image infinite_super)
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3755
qed (simp add: finite_imp_compactin)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3756
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3757
lemma compact_space_discrete_topology: "compact_space(discrete_topology X) \<longleftrightarrow> finite X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3758
  by (simp add: compactin_discrete_topology compact_space_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3759
69529
4ab9657b3257 capitalize proper names in lemma names
nipkow
parents: 69508
diff changeset
  3760
lemma compact_space_imp_Bolzano_Weierstrass:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3761
  assumes "compact_space X" "infinite S" "S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3762
  shows "X derived_set_of S \<noteq> {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3763
proof
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3764
  assume X: "X derived_set_of S = {}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3765
  then have "closedin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3766
    by (simp add: closedin_contains_derived_set assms)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3767
  then have "compactin X S"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3768
    by (rule closedin_compact_space [OF \<open>compact_space X\<close>])
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3769
  with X show False
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3770
    by (metis \<open>infinite S\<close> compactin_subspace compact_space_discrete_topology inf_bot_right subtopology_eq_discrete_topology_eq)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3771
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3772
69529
4ab9657b3257 capitalize proper names in lemma names
nipkow
parents: 69508
diff changeset
  3773
lemma compactin_imp_Bolzano_Weierstrass:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3774
   "\<lbrakk>compactin X S; infinite T \<and> T \<subseteq> S\<rbrakk> \<Longrightarrow> S \<inter> X derived_set_of T \<noteq> {}"
69529
4ab9657b3257 capitalize proper names in lemma names
nipkow
parents: 69508
diff changeset
  3775
  using compact_space_imp_Bolzano_Weierstrass [of "subtopology X S"]
71172
nipkow
parents: 70532
diff changeset
  3776
  by (simp add: compactin_subspace derived_set_of_subtopology inf_absorb2)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3777
69529
4ab9657b3257 capitalize proper names in lemma names
nipkow
parents: 69508
diff changeset
  3778
lemma compact_closure_of_imp_Bolzano_Weierstrass:
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3779
   "\<lbrakk>compactin X (X closure_of S); infinite T; T \<subseteq> S; T \<subseteq> topspace X\<rbrakk> \<Longrightarrow> X derived_set_of T \<noteq> {}"
69529
4ab9657b3257 capitalize proper names in lemma names
nipkow
parents: 69508
diff changeset
  3780
  using closure_of_mono closure_of_subset compactin_imp_Bolzano_Weierstrass by fastforce
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3781
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3782
lemma discrete_compactin_eq_finite:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3783
   "S \<inter> X derived_set_of S = {} \<Longrightarrow> compactin X S \<longleftrightarrow> S \<subseteq> topspace X \<and> finite S"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3784
  by (meson compactin_imp_Bolzano_Weierstrass finite_imp_compactin_eq order_refl)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3785
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3786
lemma discrete_compact_space_eq_finite:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3787
   "X derived_set_of (topspace X) = {} \<Longrightarrow> (compact_space X \<longleftrightarrow> finite(topspace X))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3788
  by (metis compact_space_discrete_topology discrete_topology_unique_derived_set)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3789
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3790
lemma image_compactin:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3791
  assumes cpt: "compactin X S" and cont: "continuous_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3792
  shows "compactin Y (f ` S)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3793
  unfolding compactin_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3794
proof (intro conjI allI impI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3795
  show "f ` S \<subseteq> topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3796
    using compactin_subset_topspace cont continuous_map_image_subset_topspace cpt by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3797
next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3798
  fix \<U> :: "'b set set"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3799
  assume \<U>: "Ball \<U> (openin Y) \<and> f ` S \<subseteq> \<Union>\<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3800
  define \<V> where "\<V> \<equiv> (\<lambda>U. {x \<in> topspace X. f x \<in> U}) ` \<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3801
  have "S \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3802
    and *: "\<And>\<U>. \<lbrakk>\<forall>U\<in>\<U>. openin X U; S \<subseteq> \<Union>\<U>\<rbrakk> \<Longrightarrow> \<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> S \<subseteq> \<Union>\<F>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3803
    using cpt by (auto simp: compactin_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3804
  obtain \<F> where \<F>: "finite \<F>" "\<F> \<subseteq> \<V>" "S \<subseteq> \<Union>\<F>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3805
  proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3806
    have 1: "\<forall>U\<in>\<V>. openin X U"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  3807
      unfolding \<V>_def using \<U> cont[unfolded continuous_map] by blast
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3808
    have 2: "S \<subseteq> \<Union>\<V>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3809
      unfolding \<V>_def using compactin_subset_topspace cpt \<U> by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3810
    show thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3811
      using * [OF 1 2] that by metis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3812
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3813
  have "\<forall>v \<in> \<V>. \<exists>U. U \<in> \<U> \<and> v = {x \<in> topspace X. f x \<in> U}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3814
    using \<V>_def by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3815
  then obtain U where U: "\<forall>v \<in> \<V>. U v \<in> \<U> \<and> v = {x \<in> topspace X. f x \<in> U v}"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3816
    by metis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3817
  show "\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> f ` S \<subseteq> \<Union>\<F>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3818
  proof (intro conjI exI)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3819
    show "finite (U ` \<F>)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3820
      by (simp add: \<open>finite \<F>\<close>)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3821
  next
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3822
    show "U ` \<F> \<subseteq> \<U>"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3823
      using \<open>\<F> \<subseteq> \<V>\<close> U by auto
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3824
  next
69325
4b6ddc5989fc removed legacy input syntax
haftmann
parents: 69313
diff changeset
  3825
    show "f ` S \<subseteq> \<Union> (U ` \<F>)"
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3826
      using \<F>(2-3) U UnionE subset_eq U by fastforce
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3827
  qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3828
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3829
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3830
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3831
lemma homeomorphic_compact_space:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3832
  assumes "X homeomorphic_space Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3833
  shows "compact_space X \<longleftrightarrow> compact_space Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3834
    using homeomorphic_space_sym
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3835
    by (metis assms compact_space_def homeomorphic_eq_everything_map homeomorphic_space image_compactin)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3836
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3837
lemma homeomorphic_map_compactness:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3838
  assumes hom: "homeomorphic_map X Y f" and U: "U \<subseteq> topspace X"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3839
  shows "compactin Y (f ` U) \<longleftrightarrow> compactin X U"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3840
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3841
  have "f ` U \<subseteq> topspace Y"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3842
    using hom U homeomorphic_imp_surjective_map by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3843
  moreover have "homeomorphic_map (subtopology X U) (subtopology Y (f ` U)) f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3844
    using U hom homeomorphic_imp_surjective_map by (blast intro: homeomorphic_map_subtopologies)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3845
  then have "compact_space (subtopology Y (f ` U)) = compact_space (subtopology X U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3846
    using homeomorphic_compact_space homeomorphic_map_imp_homeomorphic_space by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3847
  ultimately show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3848
    by (simp add: compactin_subspace U)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3849
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3850
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3851
lemma homeomorphic_map_compactness_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3852
   "homeomorphic_map X Y f
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3853
        \<Longrightarrow> compactin X U \<longleftrightarrow> U \<subseteq> topspace X \<and> compactin Y (f ` U)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3854
  by (meson compactin_subset_topspace homeomorphic_map_compactness)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3855
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3856
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3857
subsection\<open>Embedding maps\<close>
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3858
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3859
definition embedding_map
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3860
  where "embedding_map X Y f \<equiv> homeomorphic_map X (subtopology Y (f ` (topspace X))) f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3861
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3862
lemma embedding_map_eq:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3863
   "\<lbrakk>embedding_map X Y f; \<And>x. x \<in> topspace X \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> embedding_map X Y g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3864
  unfolding embedding_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3865
  by (metis homeomorphic_map_eq image_cong)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3866
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3867
lemma embedding_map_compose:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3868
  assumes "embedding_map X X' f" "embedding_map X' X'' g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3869
  shows "embedding_map X X'' (g \<circ> f)"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3870
proof -
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3871
  have hm: "homeomorphic_map X (subtopology X' (f ` topspace X)) f" "homeomorphic_map X' (subtopology X'' (g ` topspace X')) g"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3872
    using assms by (auto simp: embedding_map_def)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3873
  then obtain C where "g ` topspace X' \<inter> C = (g \<circ> f) ` topspace X"
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3874
    using continuous_map_image_subset_topspace homeomorphic_imp_continuous_map by fastforce
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3875
  then have "homeomorphic_map (subtopology X' (f ` topspace X)) (subtopology X'' ((g \<circ> f) ` topspace X)) g"
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3876
    by (metis hm homeomorphic_eq_everything_map homeomorphic_map_subtopologies image_comp subtopology_subtopology topspace_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3877
  then show ?thesis
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3878
  unfolding embedding_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3879
  using hm(1) homeomorphic_map_compose by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3880
qed
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3881
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3882
lemma surjective_embedding_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3883
   "embedding_map X Y f \<and> f ` (topspace X) = topspace Y \<longleftrightarrow> homeomorphic_map X Y f"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3884
  by (force simp: embedding_map_def homeomorphic_eq_everything_map)
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3885
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3886
lemma embedding_map_in_subtopology:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3887
   "embedding_map X (subtopology Y S) f \<longleftrightarrow> embedding_map X Y f \<and> f ` (topspace X) \<subseteq> S"  (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3888
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3889
  show "?lhs \<Longrightarrow> ?rhs"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3890
    unfolding embedding_map_def
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  3891
    by (metis Int_subset_iff homeomorphic_imp_surjective_map inf_le1 subtopology_restrict subtopology_subtopology topspace_subtopology)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3892
qed (simp add: embedding_map_def inf.absorb_iff2 subtopology_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3893
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3894
lemma injective_open_imp_embedding_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3895
   "\<lbrakk>continuous_map X Y f; open_map X Y f; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> embedding_map X Y f"
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3896
  unfolding embedding_map_def homeomorphic_map_def
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3897
  by (simp add: image_subset_iff_funcset continuous_map_in_subtopology continuous_open_quotient_map eq_iff
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3898
      open_map_imp_subset open_map_into_subtopology)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3899
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3900
lemma injective_closed_imp_embedding_map:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3901
  "\<lbrakk>continuous_map X Y f; closed_map X Y f; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> embedding_map X Y f"
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3902
  unfolding embedding_map_def homeomorphic_map_def
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3903
  by (simp add: closed_map_imp_subset closed_map_into_subtopology continuous_closed_quotient_map 
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  3904
                continuous_map_in_subtopology dual_order.eq_iff image_subset_iff_funcset)
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3905
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3906
lemma embedding_map_imp_homeomorphic_space:
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3907
   "embedding_map X Y f \<Longrightarrow> X homeomorphic_space (subtopology Y (f ` (topspace X)))"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3908
  unfolding embedding_map_def
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3909
  using homeomorphic_space by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  3910
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  3911
lemma embedding_imp_closed_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  3912
   "\<lbrakk>embedding_map X Y f; closedin Y (f ` topspace X)\<rbrakk> \<Longrightarrow> closed_map X Y f"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3913
  by (meson closed_map_from_closed_subtopology embedding_map_def homeomorphic_imp_closed_map)
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  3914
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  3915
lemma embedding_imp_closed_map_eq:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3916
  "embedding_map X Y f \<Longrightarrow> (closed_map X Y f \<longleftrightarrow> closedin Y (f ` topspace X))"
77935
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  3917
  using closed_map_def embedding_imp_closed_map by blast
7f240b0dabd9 More new theorems, and a necessary correction
paulson <lp15@cam.ac.uk>
parents: 77934
diff changeset
  3918
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3919
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3920
subsection\<open>Retraction and section maps\<close>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3921
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3922
definition retraction_maps :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'a) \<Rightarrow> bool"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3923
  where "retraction_maps X Y f g \<equiv>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3924
           continuous_map X Y f \<and> continuous_map Y X g \<and> (\<forall>x \<in> topspace Y. f(g x) = x)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3925
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3926
definition section_map :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3927
  where "section_map X Y f \<equiv> \<exists>g. retraction_maps Y X g f"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3928
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3929
definition retraction_map :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3930
  where "retraction_map X Y f \<equiv> \<exists>g. retraction_maps X Y f g"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3931
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3932
lemma retraction_maps_eq:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3933
   "\<lbrakk>retraction_maps X Y f g; \<And>x. x \<in> topspace X \<Longrightarrow> f x = f' x; \<And>x. x \<in> topspace Y \<Longrightarrow> g x = g' x\<rbrakk>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3934
        \<Longrightarrow> retraction_maps X Y f' g'"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  3935
  unfolding retraction_maps_def
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  3936
  by (metis continuous_map_eq continuous_map_image_subset_topspace image_subset_iff)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3937
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3938
lemma section_map_eq:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3939
   "\<lbrakk>section_map X Y f; \<And>x. x \<in> topspace X \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> section_map X Y g"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3940
  unfolding section_map_def using retraction_maps_eq by blast
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3941
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3942
lemma retraction_map_eq:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3943
   "\<lbrakk>retraction_map X Y f; \<And>x. x \<in> topspace X \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> retraction_map X Y g"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3944
  unfolding retraction_map_def using retraction_maps_eq by blast
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3945
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3946
lemma homeomorphic_imp_retraction_maps:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3947
   "homeomorphic_maps X Y f g \<Longrightarrow> retraction_maps X Y f g"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3948
  by (simp add: homeomorphic_maps_def retraction_maps_def)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3949
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3950
lemma section_and_retraction_eq_homeomorphic_map:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3951
   "section_map X Y f \<and> retraction_map X Y f \<longleftrightarrow> homeomorphic_map X Y f"  (is "?lhs = ?rhs")
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3952
proof
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3953
  assume ?lhs
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  3954
  then obtain g where "homeomorphic_maps X Y f g"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  3955
    unfolding homeomorphic_maps_def retraction_map_def section_map_def 
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  3956
    by (smt (verit) Pi_iff continuous_map_def retraction_maps_def)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3957
  then show ?rhs
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3958
    using homeomorphic_map_maps by blast
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3959
next
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3960
  assume ?rhs
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3961
  then show ?lhs
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3962
    unfolding retraction_map_def section_map_def
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3963
    by (meson homeomorphic_imp_retraction_maps homeomorphic_map_maps homeomorphic_maps_sym)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  3964
qed
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3965
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3966
lemma section_imp_embedding_map:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3967
   "section_map X Y f \<Longrightarrow> embedding_map X Y f"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3968
  unfolding section_map_def embedding_map_def homeomorphic_map_maps retraction_maps_def homeomorphic_maps_def
71172
nipkow
parents: 70532
diff changeset
  3969
  by (force simp: continuous_map_in_subtopology continuous_map_from_subtopology)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3970
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3971
lemma retraction_imp_quotient_map:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3972
  assumes "retraction_map X Y f"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3973
  shows "quotient_map X Y f"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3974
  unfolding quotient_map_def
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3975
proof (intro conjI subsetI allI impI)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3976
  show "f ` topspace X = topspace Y"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  3977
    using assms by (force simp: retraction_map_def retraction_maps_def continuous_map_def Pi_iff)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3978
next
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3979
  fix U
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3980
  assume U: "U \<subseteq> topspace Y"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3981
  have "openin Y U"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3982
    if "\<forall>x\<in>topspace Y. g x \<in> topspace X" "\<forall>x\<in>topspace Y. f (g x) = x"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3983
       "openin Y {x \<in> topspace Y. g x \<in> {x \<in> topspace X. f x \<in> U}}" for g
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3984
    using openin_subopen U that by fastforce
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3985
  then show "openin X {x \<in> topspace X. f x \<in> U} = openin Y U"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  3986
    using assms by (auto simp: retraction_map_def retraction_maps_def continuous_map_def Pi_iff)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3987
qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3988
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3989
lemma retraction_maps_compose:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3990
   "\<lbrakk>retraction_maps X Y f f'; retraction_maps Y Z g g'\<rbrakk> \<Longrightarrow> retraction_maps X Z (g \<circ> f) (f' \<circ> g')"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  3991
  unfolding retraction_maps_def
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  3992
  by (metis comp_def continuous_map_compose continuous_map_image_subset_topspace image_subset_iff)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3993
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3994
lemma retraction_map_compose:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3995
   "\<lbrakk>retraction_map X Y f; retraction_map Y Z g\<rbrakk> \<Longrightarrow> retraction_map X Z (g \<circ> f)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3996
  by (meson retraction_map_def retraction_maps_compose)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3997
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3998
lemma section_map_compose:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  3999
   "\<lbrakk>section_map X Y f; section_map Y Z g\<rbrakk> \<Longrightarrow> section_map X Z (g \<circ> f)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4000
  by (meson retraction_maps_compose section_map_def)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4001
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4002
lemma surjective_section_eq_homeomorphic_map:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4003
   "section_map X Y f \<and> f ` (topspace X) = topspace Y \<longleftrightarrow> homeomorphic_map X Y f"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4004
  by (meson section_and_retraction_eq_homeomorphic_map section_imp_embedding_map surjective_embedding_map)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4005
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4006
lemma surjective_retraction_or_section_map:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4007
   "f ` (topspace X) = topspace Y \<Longrightarrow> retraction_map X Y f \<or> section_map X Y f \<longleftrightarrow> retraction_map X Y f"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4008
  using section_and_retraction_eq_homeomorphic_map surjective_section_eq_homeomorphic_map by fastforce
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4009
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4010
lemma retraction_imp_surjective_map:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4011
   "retraction_map X Y f \<Longrightarrow> f ` (topspace X) = topspace Y"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4012
  by (simp add: retraction_imp_quotient_map quotient_imp_surjective_map)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4013
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4014
lemma section_imp_injective_map:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4015
   "\<lbrakk>section_map X Y f; x \<in> topspace X; y \<in> topspace X\<rbrakk> \<Longrightarrow> f x = f y \<longleftrightarrow> x = y"
73932
fd21b4a93043 added opaque_combs and renamed hide_lams to opaque_lifting
desharna
parents: 72608
diff changeset
  4016
  by (metis (mono_tags, opaque_lifting) retraction_maps_def section_map_def)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4017
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4018
lemma retraction_maps_to_retract_maps:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4019
   "retraction_maps X Y r s
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4020
        \<Longrightarrow> retraction_maps X (subtopology X (s ` (topspace Y))) (s \<circ> r) id"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4021
  unfolding retraction_maps_def
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4022
  by (auto simp: continuous_map_compose continuous_map_into_subtopology continuous_map_from_subtopology)
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4023
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4024
subsection \<open>Continuity\<close>
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4025
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4026
lemma continuous_on_open:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4027
  "continuous_on S f \<longleftrightarrow>
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4028
    (\<forall>T. openin (top_of_set (f ` S)) T \<longrightarrow> openin (top_of_set S) (S \<inter> f -` T))"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4029
  unfolding continuous_on_open_invariant openin_open Int_def vimage_def Int_commute
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4030
  by (simp add: imp_ex imageI conj_commute eq_commute cong: conj_cong)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4031
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4032
lemma continuous_on_closed:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4033
  "continuous_on S f \<longleftrightarrow>
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4034
    (\<forall>T. closedin (top_of_set (f ` S)) T \<longrightarrow> closedin (top_of_set S) (S \<inter> f -` T))"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4035
  unfolding continuous_on_closed_invariant closedin_closed Int_def vimage_def Int_commute
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4036
  by (simp add: imp_ex imageI conj_commute eq_commute cong: conj_cong)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4037
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4038
lemma continuous_on_imp_closedin:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4039
  assumes "continuous_on S f" "closedin (top_of_set (f ` S)) T"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4040
  shows "closedin (top_of_set S) (S \<inter> f -` T)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4041
  using assms continuous_on_closed by blast
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4042
69986
f2d327275065 generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents: 69945
diff changeset
  4043
lemma continuous_map_subtopology_eu [simp]:
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  4044
  "continuous_map (top_of_set S) (subtopology euclidean T) h \<longleftrightarrow> continuous_on S h \<and> h \<in> S \<rightarrow> T"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4045
  by (simp add: continuous_map_in_subtopology)
69986
f2d327275065 generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents: 69945
diff changeset
  4046
70065
cc89a395b5a3 Free_Abelian_Groups finally working; fixed some duplicates; cleaned up some proofs
paulson <lp15@cam.ac.uk>
parents: 70044
diff changeset
  4047
lemma continuous_map_euclidean_top_of_set:
cc89a395b5a3 Free_Abelian_Groups finally working; fixed some duplicates; cleaned up some proofs
paulson <lp15@cam.ac.uk>
parents: 70044
diff changeset
  4048
  assumes eq: "f -` S = UNIV" and cont: "continuous_on UNIV f"
cc89a395b5a3 Free_Abelian_Groups finally working; fixed some duplicates; cleaned up some proofs
paulson <lp15@cam.ac.uk>
parents: 70044
diff changeset
  4049
  shows "continuous_map euclidean (top_of_set S) f"
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  4050
  using cont continuous_map_iff_continuous2 continuous_map_into_subtopology eq by blast
70065
cc89a395b5a3 Free_Abelian_Groups finally working; fixed some duplicates; cleaned up some proofs
paulson <lp15@cam.ac.uk>
parents: 70044
diff changeset
  4051
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4052
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
  4053
subsection\<^marker>\<open>tag unimportant\<close> \<open>Half-global and completely global cases\<close>
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4054
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4055
lemma continuous_openin_preimage_gen:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4056
  assumes "continuous_on S f"  "open T"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4057
  shows "openin (top_of_set S) (S \<inter> f -` T)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4058
proof -
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4059
  have *: "(S \<inter> f -` T) = (S \<inter> f -` (T \<inter> f ` S))"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4060
    by auto
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4061
  have "openin (top_of_set (f ` S)) (T \<inter> f ` S)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4062
    using openin_open_Int[of T "f ` S", OF assms(2)] unfolding openin_open by auto
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4063
  then show ?thesis
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4064
    by (metis "*" assms(1) continuous_on_open)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4065
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4066
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4067
lemma continuous_closedin_preimage:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4068
  assumes "continuous_on S f" and "closed T"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4069
  shows "closedin (top_of_set S) (S \<inter> f -` T)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4070
proof -
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4071
  have *: "(S \<inter> f -` T) = (S \<inter> f -` (T \<inter> f ` S))"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4072
    by auto
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4073
  have "closedin (top_of_set (f ` S)) (T \<inter> f ` S)"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4074
    using closedin_closed_Int[of T "f ` S", OF assms(2)]
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4075
    by (simp add: Int_commute)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4076
  then show ?thesis
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4077
    by (metis "*" assms(1) continuous_on_closed)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4078
qed
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4079
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4080
lemma continuous_openin_preimage_eq:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4081
   "continuous_on S f \<longleftrightarrow> (\<forall>T. open T \<longrightarrow> openin (top_of_set S) (S \<inter> f -` T))"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4082
  by (metis Int_commute continuous_on_open_invariant open_openin openin_subtopology)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4083
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4084
lemma continuous_closedin_preimage_eq:
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4085
   "continuous_on S f \<longleftrightarrow>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4086
    (\<forall>T. closed T \<longrightarrow> closedin (top_of_set S) (S \<inter> f -` T))"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4087
  by (metis Int_commute closedin_closed continuous_on_closed_invariant)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4088
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4089
lemma continuous_open_preimage:
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  4090
  assumes "continuous_on S f" and "open S" "open T"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4091
  shows "open (S \<inter> f -` T)"
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  4092
  by (metis Int_commute assms continuous_on_open_vimage)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4093
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4094
lemma continuous_closed_preimage:
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  4095
  assumes "continuous_on S f" and "closed S" "closed T"
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4096
  shows "closed (S \<inter> f -` T)"
82323
b022c013b04b Function space instead of image closure
paulson <lp15@cam.ac.uk>
parents: 80914
diff changeset
  4097
  by (metis assms closed_vimage_Int inf_commute)
69544
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4098
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4099
lemma continuous_open_vimage: "open S \<Longrightarrow> (\<And>x. continuous (at x) f) \<Longrightarrow> open (f -` S)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4100
  by (metis continuous_on_eq_continuous_within open_vimage) 
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4101
 
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4102
lemma continuous_closed_vimage: "closed S \<Longrightarrow> (\<And>x. continuous (at x) f) \<Longrightarrow> closed (f -` S)"
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4103
  by (simp add: closed_vimage continuous_on_eq_continuous_within)
5aa5a8d6e5b5 split off theorems involving classes below metric_space and real_normed_vector
immler
parents: 69529
diff changeset
  4104
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4105
lemma Times_in_interior_subtopology:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4106
  assumes "(x, y) \<in> U" "openin (top_of_set (S \<times> T)) U"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4107
  obtains V W where "openin (top_of_set S) V" "x \<in> V"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4108
                    "openin (top_of_set T) W" "y \<in> W" "(V \<times> W) \<subseteq> U"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4109
proof -
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4110
  from assms obtain E where "open E" "U = S \<times> T \<inter> E" "(x, y) \<in> E" "x \<in> S" "y \<in> T"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4111
    by (auto simp: openin_open)
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4112
  from open_prod_elim[OF \<open>open E\<close> \<open>(x, y) \<in> E\<close>]
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4113
  obtain E1 E2 where "open E1" "open E2" "(x, y) \<in> E1 \<times> E2" "E1 \<times> E2 \<subseteq> E"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4114
    by blast
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4115
  show ?thesis
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4116
  proof
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4117
    show "openin (top_of_set S) (E1 \<inter> S)" "openin (top_of_set T) (E2 \<inter> T)"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4118
      using \<open>open E1\<close> \<open>open E2\<close> by (auto simp: openin_open)
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4119
    show "x \<in> E1 \<inter> S" "y \<in> E2 \<inter> T"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4120
      using \<open>(x, y) \<in> E1 \<times> E2\<close> \<open>x \<in> S\<close> \<open>y \<in> T\<close> by auto
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4121
    show "(E1 \<inter> S) \<times> (E2 \<inter> T) \<subseteq> U"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4122
      using \<open>E1 \<times> E2 \<subseteq> E\<close> \<open>U = _\<close> by auto
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4123
  qed
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4124
qed
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4125
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4126
lemma closedin_Times:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4127
  "closedin (top_of_set S) S' \<Longrightarrow> closedin (top_of_set T) T' \<Longrightarrow>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4128
    closedin (top_of_set (S \<times> T)) (S' \<times> T')"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4129
  unfolding closedin_closed using closed_Times by blast
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4130
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4131
lemma openin_Times:
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4132
  "openin (top_of_set S) S' \<Longrightarrow> openin (top_of_set T) T' \<Longrightarrow>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4133
    openin (top_of_set (S \<times> T)) (S' \<times> T')"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4134
  unfolding openin_open using open_Times by blast
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4135
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4136
lemma openin_Times_eq:
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4137
  fixes S :: "'a::topological_space set" and T :: "'b::topological_space set"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4138
  shows
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4139
    "openin (top_of_set (S \<times> T)) (S' \<times> T') \<longleftrightarrow>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4140
      S' = {} \<or> T' = {} \<or> openin (top_of_set S) S' \<and> openin (top_of_set T) T'"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4141
    (is "?lhs = ?rhs")
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4142
proof (cases "S' = {} \<or> T' = {}")
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4143
  case True
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4144
  then show ?thesis by auto
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4145
next
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4146
  case False
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4147
  then obtain x y where "x \<in> S'" "y \<in> T'"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4148
    by blast
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4149
  show ?thesis
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4150
  proof
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4151
    assume ?lhs
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4152
    have "openin (top_of_set S) S'"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4153
    proof (subst openin_subopen, clarify)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4154
      show "\<exists>U. openin (top_of_set S) U \<and> x \<in> U \<and> U \<subseteq> S'" if "x \<in> S'" for x
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4155
        using that \<open>y \<in> T'\<close> Times_in_interior_subtopology [OF _ \<open>?lhs\<close>, of x y]
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4156
        by simp (metis mem_Sigma_iff subsetD subsetI)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4157
    qed
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4158
    moreover have "openin (top_of_set T) T'"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4159
    proof (subst openin_subopen, clarify)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4160
      show "\<exists>U. openin (top_of_set T) U \<and> y \<in> U \<and> U \<subseteq> T'" if "y \<in> T'" for y
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4161
        using that \<open>x \<in> S'\<close> Times_in_interior_subtopology [OF _ \<open>?lhs\<close>, of x y]
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4162
        by (smt (verit) mem_Sigma_iff subset_iff)
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4163
    qed
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4164
    ultimately show ?rhs
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4165
      by simp
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4166
  next
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4167
    assume ?rhs
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4168
    with False show ?lhs
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4169
      by (simp add: openin_Times)
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4170
  qed
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4171
qed
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4172
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4173
lemma Lim_transform_within_openin:
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4174
  assumes f: "(f \<longlongrightarrow> l) (at a within T)"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4175
    and "openin (top_of_set T) S" "a \<in> S"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4176
    and eq: "\<And>x. \<lbrakk>x \<in> S; x \<noteq> a\<rbrakk> \<Longrightarrow> f x = g x"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4177
  shows "(g \<longlongrightarrow> l) (at a within T)"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4178
proof -
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4179
  have "\<forall>\<^sub>F x in at a within T. x \<in> T \<and> x \<noteq> a"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4180
    by (simp add: eventually_at_filter)
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4181
  moreover
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4182
  from \<open>openin _ _\<close> obtain U where "open U" "S = T \<inter> U"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4183
    by (auto simp: openin_open)
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4184
  then have "a \<in> U" using \<open>a \<in> S\<close> by auto
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4185
  from topological_tendstoD[OF tendsto_ident_at \<open>open U\<close> \<open>a \<in> U\<close>]
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4186
  have "\<forall>\<^sub>F x in at a within T. x \<in> U" by auto
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4187
  ultimately
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4188
  have "\<forall>\<^sub>F x in at a within T. f x = g x"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4189
    by eventually_elim (auto simp: \<open>S = _\<close> eq)
70532
fcf3b891ccb1 new material; rotated premises of Lim_transform_eventually
paulson <lp15@cam.ac.uk>
parents: 70235
diff changeset
  4190
  with f show ?thesis
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4191
    by (rule Lim_transform_eventually)
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4192
qed
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4193
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4194
lemma continuous_on_open_gen:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4195
  assumes "f \<in> S \<rightarrow> T"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4196
    shows "continuous_on S f \<longleftrightarrow>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4197
             (\<forall>U. openin (top_of_set T) U
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4198
                  \<longrightarrow> openin (top_of_set S) (S \<inter> f -` U))"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4199
     (is "?lhs = ?rhs")
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4200
proof
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4201
  assume ?lhs
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4202
  with assms show ?rhs
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4203
    by (metis continuous_map_openin_preimage_eq continuous_map_subtopology_eu
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4204
        topspace_euclidean_subtopology)
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4205
next
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4206
  assume R [rule_format]: ?rhs
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4207
  then show ?lhs
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4208
  proof (clarsimp simp add: continuous_openin_preimage_eq)
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4209
    show "\<And>T. open T \<Longrightarrow> openin (top_of_set S) (S \<inter> f -` T)"
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4210
      by (metis (no_types) R assms image_subset_iff_funcset image_subset_iff_subset_vimage inf.orderE inf_assoc openin_open_Int vimage_Int)
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4211
  qed
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4212
qed
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4213
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4214
lemma continuous_openin_preimage:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4215
  "\<lbrakk>continuous_on S f; f \<in> S \<rightarrow> T; openin (top_of_set T) U\<rbrakk>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4216
        \<Longrightarrow> openin (top_of_set S) (S \<inter> f -` U)"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4217
  by (simp add: continuous_on_open_gen)
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4218
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4219
lemma continuous_on_closed_gen:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4220
  assumes "f \<in> S \<rightarrow> T"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4221
  shows "continuous_on S f \<longleftrightarrow>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4222
             (\<forall>U. closedin (top_of_set T) U
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4223
                  \<longrightarrow> closedin (top_of_set S) (S \<inter> f -` U))"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4224
proof -
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4225
  have *: "U \<subseteq> T \<Longrightarrow> S \<inter> f -` (T - U) = S - (S \<inter> f -` U)" for U
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4226
    using assms by blast
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4227
  then show ?thesis
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4228
      unfolding continuous_on_open_gen [OF assms]
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4229
      by (metis closedin_def inf.cobounded1 openin_closedin_eq topspace_euclidean_subtopology)
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4230
qed
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4231
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4232
lemma continuous_closedin_preimage_gen:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4233
  assumes "continuous_on S f" "f \<in> S \<rightarrow> T" "closedin (top_of_set T) U"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4234
    shows "closedin (top_of_set S) (S \<inter> f -` U)"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4235
using assms continuous_on_closed_gen by blast
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4236
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4237
lemma continuous_transform_within_openin:
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4238
  assumes "continuous (at a within T) f"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4239
    and "openin (top_of_set T) S" "a \<in> S"
69622
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4240
    and eq: "\<And>x. x \<in> S \<Longrightarrow> f x = g x"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4241
  shows "continuous (at a within T) g"
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4242
  using assms by (simp add: Lim_transform_within_openin continuous_within)
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4243
003475955593 moved generalized lemmas
immler
parents: 69600
diff changeset
  4244
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
  4245
subsection\<^marker>\<open>tag important\<close> \<open>The topology generated by some (open) subsets\<close>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4246
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4247
text \<open>In the definition below of a generated topology, the \<open>Empty\<close> case is not necessary,
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4248
as it follows from \<open>UN\<close> taking for \<open>K\<close> the empty set. However, it is convenient to have,
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4249
and is never a problem in proofs, so I prefer to write it down explicitly.
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4250
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4251
We do not require \<open>UNIV\<close> to be an open set, as this will not be the case in applications. (We are
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4252
thinking of a topology on a subset of \<open>UNIV\<close>, the remaining part of \<open>UNIV\<close> being irrelevant.)\<close>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4253
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4254
inductive generate_topology_on for \<S> where
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4255
  Empty: "generate_topology_on \<S> {}"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4256
| Int: "generate_topology_on \<S> a \<Longrightarrow> generate_topology_on \<S> b \<Longrightarrow> generate_topology_on \<S> (a \<inter> b)"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4257
| UN: "(\<And>k. k \<in> K \<Longrightarrow> generate_topology_on \<S> k) \<Longrightarrow> generate_topology_on \<S> (\<Union>K)"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4258
| Basis: "s \<in> \<S> \<Longrightarrow> generate_topology_on \<S> s"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4259
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4260
lemma istopology_generate_topology_on:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4261
  "istopology (generate_topology_on \<S>)"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4262
unfolding istopology_def by (auto intro: generate_topology_on.intros)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4263
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4264
text \<open>The basic property of the topology generated by a set \<open>\<S>\<close> is that it is the
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4265
smallest topology containing all the elements of \<open>\<S>\<close>:\<close>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4266
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4267
lemma generate_topology_on_coarsest:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4268
  assumes T: "istopology T" "\<And>S. S \<in> \<S> \<Longrightarrow> T S"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4269
          and gen: "generate_topology_on \<S> s0"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4270
  shows "T s0"
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4271
  using gen 
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4272
by (induct rule: generate_topology_on.induct) (use T in \<open>auto simp: istopology_def\<close>)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4273
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
  4274
abbreviation\<^marker>\<open>tag unimportant\<close> topology_generated_by::"('a set set) \<Rightarrow> ('a topology)"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4275
  where "topology_generated_by \<S> \<equiv> topology (generate_topology_on \<S>)"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4276
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4277
lemma openin_topology_generated_by_iff:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4278
  "openin (topology_generated_by \<S>) s \<longleftrightarrow> generate_topology_on \<S> s"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4279
  using topology_inverse'[OF istopology_generate_topology_on[of \<S>]] by simp
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4280
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4281
lemma openin_topology_generated_by:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4282
  "openin (topology_generated_by \<S>) s \<Longrightarrow> generate_topology_on \<S> s"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4283
using openin_topology_generated_by_iff by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4284
70044
da5857dbcbb9 More group theory. Sum and product indexed by the non-neutral part of a set
paulson <lp15@cam.ac.uk>
parents: 69994
diff changeset
  4285
lemma topology_generated_by_topspace [simp]:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4286
  "topspace (topology_generated_by \<S>) = (\<Union>\<S>)"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4287
proof
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4288
  {
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4289
    fix S assume "openin (topology_generated_by \<S>) S"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4290
    then have "generate_topology_on \<S> S" by (rule openin_topology_generated_by)
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4291
    then have "S \<subseteq> (\<Union>\<S>)" by (induct, auto)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4292
  }
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4293
  then show "topspace (topology_generated_by \<S>) \<subseteq> (\<Union>\<S>)"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4294
    unfolding topspace_def by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4295
next
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4296
  have "generate_topology_on \<S> (\<Union>\<S>)"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4297
    using generate_topology_on.UN[OF generate_topology_on.Basis, of \<S> \<S>] by simp
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4298
  then show "(\<Union>\<S>) \<subseteq> topspace (topology_generated_by \<S>)"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4299
    unfolding topspace_def using openin_topology_generated_by_iff by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4300
qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4301
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4302
lemma topology_generated_by_Basis:
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4303
  "s \<in> \<S> \<Longrightarrow> openin (topology_generated_by \<S>) s"
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4304
  by (simp add: Basis openin_topology_generated_by_iff)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4305
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4306
lemma generate_topology_on_Inter:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4307
  "\<lbrakk>finite \<F>; \<And>K. K \<in> \<F> \<Longrightarrow> generate_topology_on \<S> K; \<F> \<noteq> {}\<rbrakk> \<Longrightarrow> generate_topology_on \<S> (\<Inter>\<F>)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4308
  by (induction \<F> rule: finite_induct; force intro: generate_topology_on.intros)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4309
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4310
subsection\<open>Topology bases and sub-bases\<close>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4311
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4312
lemma istopology_base_alt:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4313
   "istopology (arbitrary union_of P) \<longleftrightarrow>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4314
    (\<forall>S T. (arbitrary union_of P) S \<and> (arbitrary union_of P) T
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4315
           \<longrightarrow> (arbitrary union_of P) (S \<inter> T))"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4316
  by (simp add: istopology_def) (blast intro: arbitrary_union_of_Union)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4317
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4318
lemma istopology_base_eq:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4319
   "istopology (arbitrary union_of P) \<longleftrightarrow>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4320
    (\<forall>S T. P S \<and> P T \<longrightarrow> (arbitrary union_of P) (S \<inter> T))"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4321
  by (simp add: istopology_base_alt arbitrary_union_of_Int_eq)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4322
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4323
lemma istopology_base:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4324
   "(\<And>S T. \<lbrakk>P S; P T\<rbrakk> \<Longrightarrow> P(S \<inter> T)) \<Longrightarrow> istopology (arbitrary union_of P)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4325
  by (simp add: arbitrary_def istopology_base_eq union_of_inc)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4326
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4327
lemma openin_topology_base_unique:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4328
   "openin X = arbitrary union_of P \<longleftrightarrow>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4329
        (\<forall>V. P V \<longrightarrow> openin X V) \<and> (\<forall>U x. openin X U \<and> x \<in> U \<longrightarrow> (\<exists>V. P V \<and> x \<in> V \<and> V \<subseteq> U))"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4330
   (is "?lhs = ?rhs")
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4331
proof
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4332
  assume ?lhs
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4333
  then show ?rhs
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4334
    by (auto simp: union_of_def arbitrary_def)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4335
next
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4336
  assume R: ?rhs
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4337
  then have *: "\<exists>\<U>\<subseteq>Collect P. \<Union>\<U> = S" if "openin X S" for S
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4338
    using that by (rule_tac x="{V. P V \<and> V \<subseteq> S}" in exI) fastforce
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4339
  from R show ?lhs
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4340
    by (fastforce simp add: union_of_def arbitrary_def intro: *)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4341
qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4342
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4343
lemma topology_base_unique:
71840
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4344
  assumes "\<And>S. P S \<Longrightarrow> openin X S"
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4345
          "\<And>U x. \<lbrakk>openin X U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>B. P B \<and> x \<in> B \<and> B \<subseteq> U"
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4346
  shows   "topology (arbitrary union_of P) = X"
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4347
proof -
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4348
  have "X = topology (openin X)"
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4349
    by (simp add: openin_inverse)
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4350
  also from assms have "openin X = arbitrary union_of P"
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4351
    by (subst openin_topology_base_unique) auto
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4352
  finally show ?thesis ..
8ed78bb0b915 Tuned some proofs in HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 71633
diff changeset
  4353
qed
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4354
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4355
lemma topology_bases_eq_aux:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4356
   "\<lbrakk>(arbitrary union_of P) S;
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4357
     \<And>U x. \<lbrakk>P U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>V. Q V \<and> x \<in> V \<and> V \<subseteq> U\<rbrakk>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4358
        \<Longrightarrow> (arbitrary union_of Q) S"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4359
  by (metis arbitrary_union_of_alt arbitrary_union_of_idempot)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4360
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4361
lemma topology_bases_eq:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4362
   "\<lbrakk>\<And>U x. \<lbrakk>P U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>V. Q V \<and> x \<in> V \<and> V \<subseteq> U;
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4363
    \<And>V x. \<lbrakk>Q V; x \<in> V\<rbrakk> \<Longrightarrow> \<exists>U. P U \<and> x \<in> U \<and> U \<subseteq> V\<rbrakk>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4364
        \<Longrightarrow> topology (arbitrary union_of P) =
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4365
            topology (arbitrary union_of Q)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4366
  by (fastforce intro:  arg_cong [where f=topology]  elim: topology_bases_eq_aux)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4367
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4368
lemma istopology_subbase:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4369
   "istopology (arbitrary union_of (finite intersection_of P relative_to S))"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4370
  by (simp add: finite_intersection_of_Int istopology_base relative_to_Int)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4371
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4372
lemma openin_subbase:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4373
  "openin (topology (arbitrary union_of (finite intersection_of B relative_to U))) S
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4374
   \<longleftrightarrow> (arbitrary union_of (finite intersection_of B relative_to U)) S"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4375
  by (simp add: istopology_subbase topology_inverse')
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4376
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4377
lemma topspace_subbase [simp]:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4378
   "topspace(topology (arbitrary union_of (finite intersection_of B relative_to U))) = U" (is "?lhs = _")
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4379
proof
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4380
  show "?lhs \<subseteq> U"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4381
    by (metis arbitrary_union_of_relative_to openin_subbase openin_topspace relative_to_imp_subset)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4382
  show "U \<subseteq> ?lhs"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4383
    by (metis arbitrary_union_of_inc finite_intersection_of_empty inf.orderE istopology_subbase 
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4384
              openin_subset relative_to_inc subset_UNIV topology_inverse')
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4385
qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4386
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4387
lemma minimal_topology_subbase:
72608
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4388
  assumes X: "\<And>S. P S \<Longrightarrow> openin X S" and "openin X U"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4389
  and S: "openin(topology(arbitrary union_of (finite intersection_of P relative_to U))) S"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4390
shows "openin X S"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4391
proof -
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4392
  have "(arbitrary union_of (finite intersection_of P relative_to U)) S"
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4393
    using S openin_subbase by blast
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4394
  with X \<open>openin X U\<close> show ?thesis
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4395
    by (force simp add: union_of_def intersection_of_def relative_to_def intro: openin_Int_Inter)
ad45ae49be85 more de-applying
paulson <lp15@cam.ac.uk>
parents: 71857
diff changeset
  4396
qed
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4397
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4398
lemma istopology_subbase_UNIV:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4399
   "istopology (arbitrary union_of (finite intersection_of P))"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4400
  by (simp add: istopology_base finite_intersection_of_Int)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4401
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4402
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4403
lemma generate_topology_on_eq:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4404
  "generate_topology_on S = arbitrary union_of finite' intersection_of (\<lambda>x. x \<in> S)" (is "?lhs = ?rhs")
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4405
proof (intro ext iffI)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4406
  fix A
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4407
  assume "?lhs A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4408
  then show "?rhs A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4409
  proof induction
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4410
    case (Int a b)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4411
    then show ?case
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4412
      by (metis (mono_tags, lifting) istopology_base_alt finite'_intersection_of_Int istopology_base)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4413
  next
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4414
    case (UN K)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4415
    then show ?case
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4416
      by (simp add: arbitrary_union_of_Union)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4417
  next
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4418
    case (Basis s)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4419
    then show ?case
78250
400aecdfd71f Another tranche of HOL Light material on metric and topological spaces
paulson <lp15@cam.ac.uk>
parents: 78248
diff changeset
  4420
      by (simp add: Sup_upper arbitrary_union_of_inc finite'_intersection_of_inc relative_to_subset_inc)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4421
  qed auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4422
next
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4423
  fix A
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4424
  assume "?rhs A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4425
  then obtain \<U> where \<U>: "\<And>T. T \<in> \<U> \<Longrightarrow> \<exists>\<F>. finite' \<F> \<and> \<F> \<subseteq> S \<and> \<Inter>\<F> = T" and eq: "A = \<Union>\<U>"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4426
    unfolding union_of_def intersection_of_def by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4427
  show "?lhs A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4428
    unfolding eq
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4429
  proof (rule generate_topology_on.UN)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4430
    fix T
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4431
    assume "T \<in> \<U>"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4432
    with \<U> obtain \<F> where "finite' \<F>" "\<F> \<subseteq> S" "\<Inter>\<F> = T"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4433
      by blast
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4434
    have "generate_topology_on S (\<Inter>\<F>)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4435
    proof (rule generate_topology_on_Inter)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4436
      show "finite \<F>" "\<F> \<noteq> {}"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4437
        by (auto simp: \<open>finite' \<F>\<close>)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4438
      show "\<And>K. K \<in> \<F> \<Longrightarrow> generate_topology_on S K"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4439
        by (metis \<open>\<F> \<subseteq> S\<close> generate_topology_on.simps subset_iff)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4440
    qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4441
    then show "generate_topology_on S T"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4442
      using \<open>\<Inter>\<F> = T\<close> by blast
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4443
  qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4444
qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4445
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4446
lemma continuous_on_generated_topo_iff:
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4447
  "continuous_map T1 (topology_generated_by S) f \<longleftrightarrow>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4448
      ((\<forall>U. U \<in> S \<longrightarrow> openin T1 (f-`U \<inter> topspace(T1))) \<and> (f`(topspace T1) \<subseteq> (\<Union> S)))"
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4449
unfolding continuous_map_alt topology_generated_by_topspace
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4450
proof (auto simp add: topology_generated_by_Basis)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4451
  assume H: "\<forall>U. U \<in> S \<longrightarrow> openin T1 (f -` U \<inter> topspace T1)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4452
  fix U assume "openin (topology_generated_by S) U"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4453
  then have "generate_topology_on S U" by (rule openin_topology_generated_by)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4454
  then show "openin T1 (f -` U \<inter> topspace T1)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4455
  proof (induct)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4456
    fix a b
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4457
    assume H: "openin T1 (f -` a \<inter> topspace T1)" "openin T1 (f -` b \<inter> topspace T1)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4458
    have "f -` (a \<inter> b) \<inter> topspace T1 = (f-`a \<inter> topspace T1) \<inter> (f-`b \<inter> topspace T1)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4459
      by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4460
    then show "openin T1 (f -` (a \<inter> b) \<inter> topspace T1)" using H by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4461
  next
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4462
    fix K
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4463
    assume H: "openin T1 (f -` k \<inter> topspace T1)" if "k\<in> K" for k
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4464
    define L where "L = {f -` k \<inter> topspace T1|k. k \<in> K}"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4465
    have *: "openin T1 l" if "l \<in>L" for l using that H unfolding L_def by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4466
    have "openin T1 (\<Union>L)" using openin_Union[OF *] by simp
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4467
    moreover have "(\<Union>L) = (f -` \<Union>K \<inter> topspace T1)" unfolding L_def by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4468
    ultimately show "openin T1 (f -` \<Union>K \<inter> topspace T1)" by simp
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4469
  qed (auto simp add: H)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4470
qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4471
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4472
lemma continuous_on_generated_topo:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4473
  assumes "\<And>U. U \<in>S \<Longrightarrow> openin T1 (f-`U \<inter> topspace(T1))"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4474
          "f`(topspace T1) \<subseteq> (\<Union> S)"
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4475
  shows "continuous_map T1 (topology_generated_by S) f"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4476
  using assms continuous_on_generated_topo_iff by blast
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4477
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4478
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4479
subsection\<open>Continuity via bases/subbases, hence upper and lower semicontinuity\<close>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4480
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4481
lemma continuous_map_into_topology_base:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4482
  assumes P: "openin Y = arbitrary union_of P"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4483
    and f: "\<And>x. x \<in> topspace X \<Longrightarrow> f x \<in> topspace Y"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4484
    and ope: "\<And>U. P U \<Longrightarrow> openin X {x \<in> topspace X. f x \<in> U}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4485
  shows "continuous_map X Y f"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4486
proof -
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4487
  have *: "\<And>\<U>. (\<And>t. t \<in> \<U> \<Longrightarrow> P t) \<Longrightarrow> openin X {x \<in> topspace X. \<exists>U\<in>\<U>. f x \<in> U}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4488
    by (smt (verit) Ball_Collect ope mem_Collect_eq openin_subopen)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4489
  show ?thesis
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4490
    using P by (auto simp: continuous_map_def arbitrary_def union_of_def intro!: f *)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4491
qed
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4492
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4493
lemma continuous_map_into_topology_base_eq:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4494
  assumes P: "openin Y = arbitrary union_of P"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4495
  shows
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4496
   "continuous_map X Y f \<longleftrightarrow>
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4497
    f \<in> topspace X \<rightarrow> topspace Y \<and> (\<forall>U. P U \<longrightarrow> openin X {x \<in> topspace X. f x \<in> U})"
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4498
 (is "?lhs=?rhs")
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4499
proof
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4500
  assume L: ?lhs 
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4501
  then have "f \<in> topspace X \<rightarrow> topspace Y"
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4502
    by (simp add: continuous_map_funspace)
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4503
  moreover have "\<And>U. P U \<Longrightarrow> openin X {x \<in> topspace X. f x \<in> U}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4504
    using L assms continuous_map openin_topology_base_unique by fastforce
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4505
  ultimately show ?rhs by auto
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4506
qed (simp add: assms Pi_iff continuous_map_into_topology_base)
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4507
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4508
lemma continuous_map_into_topology_subbase:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4509
  fixes U P
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4510
  defines "Y \<equiv> topology(arbitrary union_of (finite intersection_of P relative_to U))"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4511
  assumes f: "\<And>x. x \<in> topspace X \<Longrightarrow> f x \<in> topspace Y"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4512
    and ope: "\<And>U. P U \<Longrightarrow> openin X {x \<in> topspace X. f x \<in> U}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4513
  shows "continuous_map X Y f"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4514
proof (intro continuous_map_into_topology_base)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4515
  show "openin Y = arbitrary union_of (finite intersection_of P relative_to U)"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4516
    unfolding Y_def using istopology_subbase topology_inverse' by blast
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4517
  show "openin X {x \<in> topspace X. f x \<in> V}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4518
    if \<section>: "(finite intersection_of P relative_to U) V" for V 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4519
  proof -
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4520
    define finv where "finv \<equiv> \<lambda>V. {x \<in> topspace X. f x \<in> V}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4521
    obtain \<U> where \<U>: "finite \<U>" "\<And>V. V \<in> \<U> \<Longrightarrow> P V"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4522
                      "{x \<in> topspace X. f x \<in> V} = (\<Inter>V \<in> insert U \<U>. finv V)"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4523
      using \<section> by (fastforce simp: finv_def intersection_of_def relative_to_def)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4524
    show ?thesis
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4525
      unfolding \<U>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4526
    proof (intro openin_Inter ope)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4527
      have U: "U = topspace Y"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4528
        unfolding Y_def using topspace_subbase by fastforce
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4529
      fix V
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4530
      assume V: "V \<in> finv ` insert U \<U>"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4531
      with U f have "openin X {x \<in> topspace X. f x \<in> U}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4532
        by (auto simp: openin_subopen [of X "Collect _"])
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4533
      then show "openin X V"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4534
        using V \<U>(2) ope by (fastforce simp: finv_def)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4535
    qed (use \<open>finite \<U>\<close> in auto)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4536
  qed
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4537
qed (use f in auto)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4538
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4539
lemma continuous_map_into_topology_subbase_eq:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4540
  assumes "Y = topology(arbitrary union_of (finite intersection_of P relative_to U))"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4541
  shows
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4542
   "continuous_map X Y f \<longleftrightarrow>
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4543
    f \<in> topspace X \<rightarrow> topspace Y \<and> (\<forall>U. P U \<longrightarrow> openin X {x \<in> topspace X. f x \<in> U})"
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4544
   (is "?lhs=?rhs")
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4545
proof
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4546
  assume L: ?lhs 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4547
  show ?rhs
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4548
  proof (intro conjI strip)
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4549
    show "f \<in> topspace X \<rightarrow> topspace Y"
77943
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4550
      using L continuous_map_def by fastforce
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4551
    fix V
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4552
    assume "P V"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4553
    have "U = topspace Y"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4554
      unfolding assms using topspace_subbase by fastforce
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4555
    then have eq: "{x \<in> topspace X. f x \<in> V} = {x \<in> topspace X. f x \<in> U \<inter> V}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4556
      using L by (auto simp: continuous_map)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4557
    have "openin Y (U \<inter> V)"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4558
      unfolding assms openin_subbase
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4559
      by (meson \<open>P V\<close> arbitrary_union_of_inc finite_intersection_of_inc relative_to_inc)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4560
    show "openin X {x \<in> topspace X. f x \<in> V}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4561
      using L \<open>openin Y (U \<inter> V)\<close> continuous_map eq by fastforce
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4562
  qed
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4563
next
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4564
  show "?rhs \<Longrightarrow> ?lhs"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4565
    unfolding assms
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4566
    by (intro continuous_map_into_topology_subbase) auto
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4567
qed 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4568
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4569
lemma subbase_subtopology_euclidean:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4570
  fixes U :: "'a::order_topology set"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4571
  shows
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4572
  "topology
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4573
    (arbitrary union_of
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4574
      (finite intersection_of (\<lambda>x. x \<in> range greaterThan \<union> range lessThan) relative_to U))
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4575
 = subtopology euclidean U"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4576
proof -
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4577
  have "\<exists>V. (finite intersection_of (\<lambda>x. x \<in> range greaterThan \<or> x \<in> range lessThan)) V \<and> x \<in> V \<and> V \<subseteq> W"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4578
    if "open W" "x \<in> W" for W and x::'a
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4579
    using \<open>open W\<close> [unfolded open_generated_order] \<open>x \<in> W\<close>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4580
  proof (induct rule: generate_topology.induct)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4581
    case UNIV
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4582
    then show ?case
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4583
      using finite_intersection_of_empty by blast
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4584
  next
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4585
    case (Int a b)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4586
    then show ?case 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4587
        by (meson Int_iff finite_intersection_of_Int inf_mono)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4588
  next
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4589
    case (UN K)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4590
    then show ?case
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4591
      by (meson Union_iff subset_iff)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4592
  next
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4593
    case (Basis s)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4594
    then show ?case
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4595
      by (metis (no_types, lifting) Un_iff finite_intersection_of_inc order_refl)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4596
  qed
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4597
  moreover 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4598
  have "\<And>V::'a set. (finite intersection_of (\<lambda>x. x \<in> range greaterThan \<or> x \<in> range lessThan)) V \<Longrightarrow> open V"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4599
    by (force simp: intersection_of_def subset_iff)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4600
  ultimately have *: "openin (euclidean::'a topology) = 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4601
           (arbitrary union_of (finite intersection_of (\<lambda>x. x \<in> range greaterThan \<or> x \<in> range lessThan)))" 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4602
    by (smt (verit, best) openin_topology_base_unique open_openin)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4603
  show ?thesis
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4604
    unfolding subtopology_def arbitrary_union_of_relative_to [symmetric] 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4605
    apply (simp add: relative_to_def flip: *)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4606
    by (metis Int_commute)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4607
qed
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4608
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4609
lemma continuous_map_upper_lower_semicontinuous_lt_gen:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4610
  fixes U :: "'a::order_topology set"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4611
  shows "continuous_map X (subtopology euclidean U) f \<longleftrightarrow>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4612
         (\<forall>x \<in> topspace X. f x \<in> U) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4613
         (\<forall>a. openin X {x \<in> topspace X. f x > a}) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4614
         (\<forall>a. openin X {x \<in> topspace X. f x < a})"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4615
  by (auto simp: continuous_map_into_topology_subbase_eq [OF subbase_subtopology_euclidean [symmetric, of U]] 
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4616
           greaterThan_def lessThan_def image_iff   simp flip: all_simps)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4617
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4618
lemma continuous_map_upper_lower_semicontinuous_lt:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4619
  fixes f :: "'a \<Rightarrow> 'b::order_topology"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4620
  shows "continuous_map X euclidean f \<longleftrightarrow>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4621
         (\<forall>a. openin X {x \<in> topspace X. f x > a}) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4622
         (\<forall>a. openin X {x \<in> topspace X. f x < a})"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4623
  using continuous_map_upper_lower_semicontinuous_lt_gen [where U=UNIV]
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4624
  by auto
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4625
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4626
lemma Int_Collect_imp_eq: "A \<inter> {x. x\<in>A \<longrightarrow> P x} = {x\<in>A. P x}"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4627
  by blast
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4628
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4629
lemma continuous_map_upper_lower_semicontinuous_le_gen:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4630
  shows
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4631
    "continuous_map X (subtopology euclideanreal U) f \<longleftrightarrow>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4632
         (\<forall>x \<in> topspace X. f x \<in> U) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4633
         (\<forall>a. closedin X {x \<in> topspace X. f x \<ge> a}) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4634
         (\<forall>a. closedin X {x \<in> topspace X. f x \<le> a})"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4635
  unfolding continuous_map_upper_lower_semicontinuous_lt_gen
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4636
  by (auto simp: closedin_def Diff_eq Compl_eq not_le Int_Collect_imp_eq)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4637
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4638
lemma continuous_map_upper_lower_semicontinuous_le:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4639
   "continuous_map X euclideanreal f \<longleftrightarrow>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4640
         (\<forall>a. closedin X {x \<in> topspace X. f x \<ge> a}) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4641
         (\<forall>a. closedin X {x \<in> topspace X. f x \<le> a})"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4642
  using continuous_map_upper_lower_semicontinuous_le_gen [where U=UNIV]
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4643
  by auto
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4644
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4645
lemma continuous_map_upper_lower_semicontinuous_lte_gen:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4646
   "continuous_map X (subtopology euclideanreal U) f \<longleftrightarrow>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4647
         (\<forall>x \<in> topspace X. f x \<in> U) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4648
         (\<forall>a. openin X {x \<in> topspace X. f x < a}) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4649
         (\<forall>a. closedin X {x \<in> topspace X. f x \<le> a})"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4650
  unfolding continuous_map_upper_lower_semicontinuous_lt_gen
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4651
  by (auto simp: closedin_def Diff_eq Compl_eq not_le Int_Collect_imp_eq)
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4652
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4653
lemma continuous_map_upper_lower_semicontinuous_lte:
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4654
   "continuous_map X euclideanreal f \<longleftrightarrow>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4655
         (\<forall>a. openin X {x \<in> topspace X. f x < a}) \<and>
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4656
         (\<forall>a. closedin X {x \<in> topspace X. f x \<le> a})"
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4657
  using continuous_map_upper_lower_semicontinuous_lte_gen [where U=UNIV]
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4658
  by auto
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4659
ffdad62bc235 Importation of additional lemmas from metric.ml
paulson <lp15@cam.ac.uk>
parents: 77939
diff changeset
  4660
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
  4661
subsection\<^marker>\<open>tag important\<close> \<open>Pullback topology\<close>
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4662
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4663
text \<open>Pulling back a topology by map gives again a topology. \<open>subtopology\<close> is
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4664
a special case of this notion, pulling back by the identity. We introduce the general notion as
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4665
we will need it to define the strong operator topology on the space of continuous linear operators,
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4666
by pulling back the product topology on the space of all functions.\<close>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4667
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4668
text \<open>\<open>pullback_topology A f T\<close> is the pullback of the topology \<open>T\<close> by the map \<open>f\<close> on
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4669
the set \<open>A\<close>.\<close>
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4670
70136
f03a01a18c6e modernized tags: default scope excludes proof;
wenzelm
parents: 70086
diff changeset
  4671
definition\<^marker>\<open>tag important\<close> pullback_topology::"('a set) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b topology) \<Rightarrow> ('a topology)"
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4672
  where "pullback_topology A f T = topology (\<lambda>S. \<exists>U. openin T U \<and> S = f-`U \<inter> A)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4673
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4674
lemma istopology_pullback_topology:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4675
  "istopology (\<lambda>S. \<exists>U. openin T U \<and> S = f-`U \<inter> A)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4676
  unfolding istopology_def proof (auto)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4677
  fix K assume "\<forall>S\<in>K. \<exists>U. openin T U \<and> S = f -` U \<inter> A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4678
  then have "\<exists>U. \<forall>S\<in>K. openin T (U S) \<and> S = f-`(U S) \<inter> A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4679
    by (rule bchoice)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4680
  then obtain U where U: "\<forall>S\<in>K. openin T (U S) \<and> S = f-`(U S) \<inter> A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4681
    by blast
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4682
  define V where "V = (\<Union>S\<in>K. U S)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4683
  have "openin T V" "\<Union>K = f -` V \<inter> A" unfolding V_def using U by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4684
  then show "\<exists>V. openin T V \<and> \<Union>K = f -` V \<inter> A" by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4685
qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4686
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4687
lemma openin_pullback_topology:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4688
  "openin (pullback_topology A f T) S \<longleftrightarrow> (\<exists>U. openin T U \<and> S = f-`U \<inter> A)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4689
unfolding pullback_topology_def topology_inverse'[OF istopology_pullback_topology] by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4690
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4691
lemma topspace_pullback_topology:
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4692
  "topspace (pullback_topology A f T) = f-`(topspace T) \<inter> A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4693
by (auto simp add: topspace_def openin_pullback_topology)
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4694
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4695
proposition continuous_map_pullback [intro]:
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4696
  assumes "continuous_map T1 T2 g"
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4697
  shows "continuous_map (pullback_topology A f T1) T2 (g o f)"
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4698
unfolding continuous_map_alt
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4699
proof (intro conjI strip)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4700
  fix U::"'b set" assume "openin T2 U"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4701
  then have "openin T1 (g-`U \<inter> topspace T1)"
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4702
    using assms unfolding continuous_map_alt by auto
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4703
  have "(g o f)-`U \<inter> topspace (pullback_topology A f T1) = (g o f)-`U \<inter> A \<inter> f-`(topspace T1)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4704
    unfolding topspace_pullback_topology by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4705
  also have "... = f-`(g-`U \<inter> topspace T1) \<inter> A "
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4706
    by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4707
  also have "openin (pullback_topology A f T1) (...)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4708
    unfolding openin_pullback_topology using \<open>openin T1 (g-`U \<inter> topspace T1)\<close> by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4709
  finally show "openin (pullback_topology A f T1) ((g \<circ> f) -` U \<inter> topspace (pullback_topology A f T1))"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4710
    by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4711
next
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4712
  show "g \<circ> f \<in> topspace (pullback_topology A f T1) \<rightarrow> topspace T2"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4713
    using assms unfolding continuous_map_def topspace_pullback_topology
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4714
    by fastforce
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4715
qed
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4716
69939
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4717
proposition continuous_map_pullback' [intro]:
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4718
  assumes "continuous_map T1 T2 (f o g)" "topspace T1 \<subseteq> g-`A"
812ce526da33 new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
paulson <lp15@cam.ac.uk>
parents: 69922
diff changeset
  4719
  shows "continuous_map T1 (pullback_topology A f T2) g"
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4720
  unfolding continuous_map_alt
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4721
proof (intro conjI strip)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4722
  fix U assume "openin (pullback_topology A f T2) U"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4723
  then have "\<exists>V. openin T2 V \<and> U = f-`V \<inter> A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4724
    unfolding openin_pullback_topology by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4725
  then obtain V where "openin T2 V" "U = f-`V \<inter> A"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4726
    by blast
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4727
  then have "g -` U \<inter> topspace T1 = g-`(f-`V \<inter> A) \<inter> topspace T1"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4728
    by blast
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4729
  also have "... = (f o g)-`V \<inter> (g-`A \<inter> topspace T1)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4730
    by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4731
  also have "... = (f o g)-`V \<inter> topspace T1"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4732
    using assms(2) by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4733
  also have "openin T1 (...)"
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4734
    using assms(1) \<open>openin T2 V\<close> by auto
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4735
  finally show "openin T1 (g -` U \<inter> topspace T1)" by simp
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4736
next
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4737
  show "g \<in> topspace T1 \<rightarrow> topspace (pullback_topology A f T2)"
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4738
    using assms unfolding continuous_map_def topspace_pullback_topology
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4739
    by fastforce
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  4740
qed
82501
26f9f484f266 Tidied some proofs
paulson <lp15@cam.ac.uk>
parents: 82323
diff changeset
  4741
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4742
subsection\<open>Proper maps (not a priori assumed continuous) \<close>
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4743
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4744
definition proper_map
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4745
  where
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4746
 "proper_map X Y f \<equiv>
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4747
        closed_map X Y f \<and> (\<forall>y \<in> topspace Y. compactin X {x \<in> topspace X. f x = y})"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4748
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4749
lemma proper_imp_closed_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4750
   "proper_map X Y f \<Longrightarrow> closed_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4751
  by (simp add: proper_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4752
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4753
lemma proper_map_imp_subset_topspace:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4754
   "proper_map X Y f \<Longrightarrow> f \<in> (topspace X) \<rightarrow> topspace Y"
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4755
  by (simp add: closed_map_imp_subset_topspace proper_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4756
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4757
lemma proper_map_restriction:
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4758
  assumes "proper_map X Y f" "{x \<in> topspace X. f x \<in> V} = U"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4759
  shows "proper_map (subtopology X U) (subtopology Y V) f"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4760
proof -
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4761
  have [simp]: "{x \<in> topspace X. f x \<in> V \<and> f x = y} = {x \<in> topspace X. f x = y}" 
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4762
    if "y \<in> V" for y
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4763
    using that by auto
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4764
  show ?thesis
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4765
    using assms unfolding proper_map_def using closed_map_restriction
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4766
    by (force simp: compactin_subtopology)
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4767
qed
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4768
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4769
lemma closed_injective_imp_proper_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4770
  assumes f: "closed_map X Y f" and inj: "inj_on f (topspace X)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4771
  shows "proper_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4772
  unfolding proper_map_def
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4773
proof (clarsimp simp: f)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4774
  show "compactin X {x \<in> topspace X. f x = y}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4775
    if "y \<in> topspace Y" for y
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4776
using inj_on_eq_iff [OF inj] that
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4777
  proof -
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4778
    have "{x \<in> topspace X. f x = y} = {} \<or> (\<exists>a \<in> topspace X. {x \<in> topspace X. f x = y} = {a})"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4779
      using inj_on_eq_iff [OF inj] by auto
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4780
    then show ?thesis
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4781
      using that by (metis (no_types, lifting) compactin_empty compactin_sing)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4782
  qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4783
qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4784
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4785
lemma injective_imp_proper_eq_closed_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4786
   "inj_on f (topspace X) \<Longrightarrow> (proper_map X Y f \<longleftrightarrow> closed_map X Y f)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4787
  using closed_injective_imp_proper_map proper_imp_closed_map by blast
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4788
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4789
lemma homeomorphic_imp_proper_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4790
   "homeomorphic_map X Y f \<Longrightarrow> proper_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4791
  by (simp add: closed_injective_imp_proper_map homeomorphic_eq_everything_map)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4792
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4793
lemma compactin_proper_map_preimage:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4794
  assumes f: "proper_map X Y f" and "compactin Y K"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4795
  shows "compactin X {x. x \<in> topspace X \<and> f x \<in> K}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4796
proof -
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4797
  have "f \<in> (topspace X) \<rightarrow> topspace Y"
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4798
    by (simp add: f proper_map_imp_subset_topspace)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4799
  have *: "\<And>y. y \<in> topspace Y \<Longrightarrow> compactin X {x \<in> topspace X. f x = y}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4800
    using f by (auto simp: proper_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4801
  show ?thesis
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4802
    unfolding compactin_def
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4803
  proof clarsimp
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4804
    show "\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> {x \<in> topspace X. f x \<in> K} \<subseteq> \<Union>\<F>"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4805
      if \<U>: "\<forall>U\<in>\<U>. openin X U" and sub: "{x \<in> topspace X. f x \<in> K} \<subseteq> \<Union>\<U>"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4806
      for \<U>
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4807
    proof -
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4808
      have "\<forall>y \<in> K. \<exists>\<V>. finite \<V> \<and> \<V> \<subseteq> \<U>  \<and> {x \<in> topspace X. f x = y} \<subseteq> \<Union>\<V>"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4809
      proof
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4810
        fix y
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4811
        assume "y \<in> K"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4812
        then have "compactin X {x \<in> topspace X. f x = y}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4813
          by (metis "*" \<open>compactin Y K\<close> compactin_subspace subsetD)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4814
        with \<open>y \<in> K\<close> show "\<exists>\<V>. finite \<V> \<and> \<V> \<subseteq> \<U>  \<and> {x \<in> topspace X. f x = y} \<subseteq> \<Union>\<V>"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4815
          unfolding compactin_def using \<U> sub by fastforce
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4816
      qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4817
      then obtain \<V> where \<V>: "\<And>y. y \<in> K \<Longrightarrow> finite (\<V> y) \<and> \<V> y \<subseteq> \<U>  \<and> {x \<in> topspace X. f x = y} \<subseteq> \<Union>(\<V> y)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4818
        by (metis (full_types))
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4819
      define F where "F \<equiv> \<lambda>y. topspace Y - f ` (topspace X - \<Union>(\<V> y))"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4820
      have "\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> F ` K \<and> K \<subseteq> \<Union>\<F>"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4821
      proof (rule compactinD [OF \<open>compactin Y K\<close>])
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4822
        have "\<And>x. x \<in> K \<Longrightarrow> closedin Y (f ` (topspace X - \<Union>(\<V> x)))"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4823
          using f unfolding proper_map_def closed_map_def
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4824
          by (meson \<U> \<V> openin_Union openin_closedin_eq subsetD)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4825
        then show "openin Y U" if "U \<in> F ` K" for U
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4826
          using that by (auto simp: F_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4827
        show "K \<subseteq> \<Union>(F ` K)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4828
          using \<V> \<open>compactin Y K\<close> unfolding F_def compactin_def by fastforce
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4829
      qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4830
      then obtain J where "finite J" "J \<subseteq> K" and J: "K \<subseteq> \<Union>(F ` J)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4831
        by (auto simp: ex_finite_subset_image)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4832
      show ?thesis
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4833
        unfolding F_def
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4834
      proof (intro exI conjI)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4835
        show "finite (\<Union>(\<V> ` J))"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4836
          using \<V> \<open>J \<subseteq> K\<close> \<open>finite J\<close> by blast
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4837
        show "\<Union>(\<V> ` J) \<subseteq> \<U>"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4838
          using \<V> \<open>J \<subseteq> K\<close> by blast
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4839
        show "{x \<in> topspace X. f x \<in> K} \<subseteq> \<Union>(\<Union>(\<V> ` J))"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4840
          using J \<open>J \<subseteq> K\<close> unfolding F_def by auto
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4841
      qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4842
    qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4843
  qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4844
qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4845
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4846
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4847
lemma compact_space_proper_map_preimage:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4848
  assumes f: "proper_map X Y f" and fim: "f ` (topspace X) = topspace Y" and "compact_space Y"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4849
  shows "compact_space X"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4850
proof -
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4851
  have eq: "topspace X = {x \<in> topspace X. f x \<in> topspace Y}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4852
    using fim by blast
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4853
  moreover have "compactin Y (topspace Y)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4854
    using \<open>compact_space Y\<close> compact_space_def by auto
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4855
  ultimately show ?thesis
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4856
    unfolding compact_space_def
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4857
    using eq f compactin_proper_map_preimage by fastforce
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4858
qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4859
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4860
lemma proper_map_alt:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4861
   "proper_map X Y f \<longleftrightarrow>
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4862
    closed_map X Y f \<and> (\<forall>K. compactin Y K \<longrightarrow> compactin X {x. x \<in> topspace X \<and> f x \<in> K})"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4863
  proof (intro iffI conjI allI impI)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4864
  show "compactin X {x \<in> topspace X. f x \<in> K}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4865
    if "proper_map X Y f" and "compactin Y K" for K
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4866
    using that by (simp add: compactin_proper_map_preimage)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4867
  show "proper_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4868
    if f: "closed_map X Y f \<and> (\<forall>K. compactin Y K \<longrightarrow> compactin X {x \<in> topspace X. f x \<in> K})"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4869
  proof -
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4870
    have "compactin X {x \<in> topspace X. f x = y}" if "y \<in> topspace Y" for y
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4871
    proof -
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4872
      have "compactin X {x \<in> topspace X. f x \<in> {y}}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4873
        using f compactin_sing that by fastforce
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4874
      then show ?thesis
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4875
        by auto
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4876
    qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4877
    with f show ?thesis
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4878
      by (auto simp: proper_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4879
  qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4880
qed (simp add: proper_imp_closed_map)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4881
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  4882
lemma proper_map_on_empty [simp]: "proper_map trivial_topology Y f"
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4883
  by (auto simp: proper_map_def closed_map_on_empty)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4884
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4885
lemma proper_map_id [simp]:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4886
   "proper_map X X id"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4887
proof (clarsimp simp: proper_map_alt closed_map_id)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4888
  fix K
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4889
  assume K: "compactin X K"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4890
  then have "{a \<in> topspace X. a \<in> K} = K"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4891
    by (simp add: compactin_subspace subset_antisym subset_iff)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4892
  then show "compactin X {a \<in> topspace X. a \<in> K}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4893
    using K by auto
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4894
qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4895
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4896
lemma proper_map_compose:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4897
  assumes "proper_map X Y f" "proper_map Y Z g"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4898
  shows "proper_map X Z (g \<circ> f)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4899
proof -
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4900
  have "closed_map X Y f" and f: "\<And>K. compactin Y K \<Longrightarrow> compactin X {x \<in> topspace X. f x \<in> K}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4901
    and "closed_map Y Z g" and g: "\<And>K. compactin Z K \<Longrightarrow> compactin Y {x \<in> topspace Y. g x \<in> K}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4902
    using assms by (auto simp: proper_map_alt)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4903
  show ?thesis
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4904
    unfolding proper_map_alt
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4905
  proof (intro conjI allI impI)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4906
    show "closed_map X Z (g \<circ> f)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4907
      using \<open>closed_map X Y f\<close> \<open>closed_map Y Z g\<close> closed_map_compose by blast
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4908
    have "{x \<in> topspace X. g (f x) \<in> K} = {x \<in> topspace X. f x \<in> {b \<in> topspace Y. g b \<in> K}}" for K
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4909
      using \<open>closed_map X Y f\<close> closed_map_imp_subset_topspace by blast
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4910
    then show "compactin X {x \<in> topspace X. (g \<circ> f) x \<in> K}"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4911
      if "compactin Z K" for K
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4912
      using f [OF g [OF that]] by auto
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4913
  qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4914
qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4915
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4916
lemma proper_map_const:
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  4917
   "proper_map X Y (\<lambda>x. c) \<longleftrightarrow> compact_space X \<and> (X = trivial_topology \<or> closedin Y {c})"
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  4918
proof (cases "X = trivial_topology")
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4919
  case True
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4920
  then show ?thesis
78336
6bae28577994 trivial_topology
paulson <lp15@cam.ac.uk>
parents: 78320
diff changeset
  4921
    by simp
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4922
next
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4923
  case False
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4924
  have *: "compactin X {x \<in> topspace X. c = y}" if "compact_space X" for y
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4925
    using that unfolding compact_space_def
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4926
    by (metis (mono_tags, lifting) compactin_empty empty_subsetI mem_Collect_eq subsetI subset_antisym)
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4927
  then show ?thesis
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4928
    using closed_compactin closedin_subset
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4929
    by (force simp: False proper_map_def closed_map_const compact_space_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4930
qed
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4931
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4932
lemma proper_map_inclusion:
77234
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4933
   "S \<subseteq> topspace X \<Longrightarrow> proper_map (subtopology X S) X id \<longleftrightarrow> closedin X S \<and> (\<forall>k. compactin X k \<longrightarrow> compactin X (S \<inter> k))"
61fba09a3456 Simplification of proofs
paulson <lp15@cam.ac.uk>
parents: 75455
diff changeset
  4934
  by (metis closed_Int_compactin closed_map_inclusion_eq inf.absorb_iff2 inj_on_id injective_imp_proper_eq_closed_map)
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4935
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4936
lemma proper_map_into_subtopology:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4937
   "\<lbrakk>proper_map X Y f; f \<in> topspace X \<rightarrow> C\<rbrakk> \<Longrightarrow> proper_map X (subtopology Y C) f"
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4938
  by (simp add: closed_map_into_subtopology compactin_subtopology proper_map_alt)
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4939
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4940
lemma proper_map_from_composition_left:
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4941
  assumes gf: "proper_map X Z (g \<circ> f)" and contf: "continuous_map X Y f" and fim: "f ` topspace X = topspace Y"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4942
  shows "proper_map Y Z g"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4943
  unfolding proper_map_def
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4944
proof (intro strip conjI)
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4945
  show "closed_map Y Z g"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4946
    by (meson closed_map_from_composition_left gf contf fim proper_imp_closed_map)
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4947
  fix z assume "z \<in> topspace Z"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4948
  have eq: "{y \<in> topspace Y. g y = z} = f ` {x \<in> topspace X. (g \<circ> f) x = z}"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4949
    using fim by force
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4950
  show "compactin Y {x \<in> topspace Y. g x = z}"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4951
    unfolding eq
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4952
  proof (rule image_compactin [OF _ contf])
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4953
    show "compactin X {x \<in> topspace X. (g \<circ> f) x = z}"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4954
      using \<open>z \<in> topspace Z\<close> gf proper_map_def by fastforce
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4955
  qed
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4956
qed
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4957
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4958
lemma proper_map_from_composition_right_inj:
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4959
  assumes gf: "proper_map X Z (g \<circ> f)" and fim: "f \<in> topspace X \<rightarrow> topspace Y" 
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4960
    and contf: "continuous_map Y Z g" and inj: "inj_on g (topspace Y)"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4961
  shows "proper_map X Y f"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4962
  unfolding proper_map_def
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4963
proof (intro strip conjI)
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4964
  show "closed_map X Y f"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4965
    by (meson closed_map_from_composition_right assms proper_imp_closed_map)
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4966
  fix y
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4967
  assume "y \<in> topspace Y"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4968
  with fim inj have eq: "{x \<in> topspace X. f x = y} = {x \<in> topspace X. (g \<circ> f) x = g y}"
78248
740b23f1138a EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
paulson <lp15@cam.ac.uk>
parents: 78200
diff changeset
  4969
    by (auto simp: Pi_iff inj_onD)
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4970
  show "compactin X {x \<in> topspace X. f x = y}"
78320
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4971
    using contf gf \<open>y \<in> topspace Y\<close>
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4972
    unfolding eq continuous_map_def proper_map_def
eb9a9690b8f5 cosmetic improvements, new lemmas, especially more uses of function space
paulson <lp15@cam.ac.uk>
parents: 78250
diff changeset
  4973
 by blast
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4974
qed
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  4975
70178
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4976
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4977
subsection\<open>Perfect maps (proper, continuous and surjective)\<close>
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4978
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4979
definition perfect_map 
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4980
  where "perfect_map X Y f \<equiv> continuous_map X Y f \<and> proper_map X Y f \<and> f ` (topspace X) = topspace Y"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4981
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4982
lemma homeomorphic_imp_perfect_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4983
   "homeomorphic_map X Y f \<Longrightarrow> perfect_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4984
  by (simp add: homeomorphic_eq_everything_map homeomorphic_imp_proper_map perfect_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4985
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4986
lemma perfect_imp_quotient_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4987
   "perfect_map X Y f \<Longrightarrow> quotient_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4988
  by (simp add: continuous_closed_imp_quotient_map perfect_map_def proper_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4989
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4990
lemma homeomorphic_eq_injective_perfect_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4991
   "homeomorphic_map X Y f \<longleftrightarrow> perfect_map X Y f \<and> inj_on f (topspace X)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4992
  using homeomorphic_imp_perfect_map homeomorphic_map_def perfect_imp_quotient_map by blast
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4993
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4994
lemma perfect_injective_eq_homeomorphic_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4995
   "perfect_map X Y f \<and> inj_on f (topspace X) \<longleftrightarrow> homeomorphic_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4996
  by (simp add: homeomorphic_eq_injective_perfect_map)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4997
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4998
lemma perfect_map_id [simp]: "perfect_map X X id"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  4999
  by (simp add: homeomorphic_imp_perfect_map)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5000
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5001
lemma perfect_map_compose:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5002
   "\<lbrakk>perfect_map X Y f; perfect_map Y Z g\<rbrakk> \<Longrightarrow> perfect_map X Z (g \<circ> f)"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5003
  by (meson continuous_map_compose perfect_imp_quotient_map perfect_map_def proper_map_compose quotient_map_compose_eq quotient_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5004
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5005
lemma perfect_imp_continuous_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5006
   "perfect_map X Y f \<Longrightarrow> continuous_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5007
  using perfect_map_def by blast
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5008
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5009
lemma perfect_imp_closed_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5010
   "perfect_map X Y f \<Longrightarrow> closed_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5011
  by (simp add: perfect_map_def proper_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5012
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5013
lemma perfect_imp_proper_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5014
   "perfect_map X Y f \<Longrightarrow> proper_map X Y f"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5015
  by (simp add: perfect_map_def)
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5016
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5017
lemma perfect_imp_surjective_map:
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5018
   "perfect_map X Y f \<Longrightarrow> f ` (topspace X) = topspace Y"
4900351361b0 Lindelöf spaces and supporting material
paulson <lp15@cam.ac.uk>
parents: 70136
diff changeset
  5019
  by (simp add: perfect_map_def)
69922
4a9167f377b0 new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents: 69918
diff changeset
  5020
78093
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  5021
lemma perfect_map_from_composition_left:
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  5022
  assumes "perfect_map X Z (g \<circ> f)" and "continuous_map X Y f"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  5023
    and "continuous_map Y Z g" and "f ` topspace X = topspace Y"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  5024
  shows "perfect_map Y Z g"
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  5025
  using assms unfolding perfect_map_def
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  5026
  by (metis image_comp proper_map_from_composition_left)
cec875dcc59e Finally, the abstract metric space development
paulson <lp15@cam.ac.uk>
parents: 78038
diff changeset
  5027
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  5028
end