| author | wenzelm | 
| Thu, 24 Sep 2020 19:33:33 +0200 | |
| changeset 72289 | 32d5e474633a | 
| parent 72225 | 341b15d092f2 | 
| child 73932 | fd21b4a93043 | 
| permissions | -rw-r--r-- | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 1 | (* Author: L C Paulson, University of Cambridge | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 2 | Author: Amine Chaieb, University of Cambridge | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 3 | Author: Robert Himmelmann, TU Muenchen | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 4 | Author: Brian Huffman, Portland State University | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 5 | *) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 6 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 7 | section \<open>Abstract Topology 2\<close> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 8 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 9 | theory Abstract_Topology_2 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 10 | imports | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 11 | Elementary_Topology | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 12 | Abstract_Topology | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 13 | "HOL-Library.Indicator_Function" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 14 | begin | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 15 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 16 | text \<open>Combination of Elementary and Abstract Topology\<close> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 17 | |
| 72225 | 18 | lemma approachable_lt_le2: | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 19 | "(\<exists>(d::real) > 0. \<forall>x. Q x \<longrightarrow> f x < d \<longrightarrow> P x) \<longleftrightarrow> (\<exists>d>0. \<forall>x. f x \<le> d \<longrightarrow> Q x \<longrightarrow> P x)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 20 | apply auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 21 | apply (rule_tac x="d/2" in exI, auto) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 22 | done | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 23 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 24 | lemma triangle_lemma: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 25 | fixes x y z :: real | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 26 | assumes x: "0 \<le> x" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 27 | and y: "0 \<le> y" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 28 | and z: "0 \<le> z" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 29 | and xy: "x\<^sup>2 \<le> y\<^sup>2 + z\<^sup>2" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 30 | shows "x \<le> y + z" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 31 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 32 | have "y\<^sup>2 + z\<^sup>2 \<le> y\<^sup>2 + 2 * y * z + z\<^sup>2" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 33 | using z y by simp | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 34 | with xy have th: "x\<^sup>2 \<le> (y + z)\<^sup>2" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 35 | by (simp add: power2_eq_square field_simps) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 36 | from y z have yz: "y + z \<ge> 0" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 37 | by arith | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 38 | from power2_le_imp_le[OF th yz] show ?thesis . | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 39 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 40 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 41 | lemma isCont_indicator: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 42 | fixes x :: "'a::t2_space" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 43 | shows "isCont (indicator A :: 'a \<Rightarrow> real) x = (x \<notin> frontier A)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 44 | proof auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 45 | fix x | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 46 | assume cts_at: "isCont (indicator A :: 'a \<Rightarrow> real) x" and fr: "x \<in> frontier A" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 47 | with continuous_at_open have 1: "\<forall>V::real set. open V \<and> indicator A x \<in> V \<longrightarrow> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 48 | (\<exists>U::'a set. open U \<and> x \<in> U \<and> (\<forall>y\<in>U. indicator A y \<in> V))" by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 49 | show False | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 50 | proof (cases "x \<in> A") | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 51 | assume x: "x \<in> A" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 52 |     hence "indicator A x \<in> ({0<..<2} :: real set)" by simp
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 53 |     hence "\<exists>U. open U \<and> x \<in> U \<and> (\<forall>y\<in>U. indicator A y \<in> ({0<..<2} :: real set))"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 54 | using 1 open_greaterThanLessThan by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 55 | then guess U .. note U = this | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 56 | hence "\<forall>y\<in>U. indicator A y > (0::real)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 57 | unfolding greaterThanLessThan_def by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 58 | hence "U \<subseteq> A" using indicator_eq_0_iff by force | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 59 | hence "x \<in> interior A" using U interiorI by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 60 | thus ?thesis using fr unfolding frontier_def by simp | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 61 | next | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 62 | assume x: "x \<notin> A" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 63 |     hence "indicator A x \<in> ({-1<..<1} :: real set)" by simp
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 64 |     hence "\<exists>U. open U \<and> x \<in> U \<and> (\<forall>y\<in>U. indicator A y \<in> ({-1<..<1} :: real set))"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 65 | using 1 open_greaterThanLessThan by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 66 | then guess U .. note U = this | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 67 | hence "\<forall>y\<in>U. indicator A y < (1::real)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 68 | unfolding greaterThanLessThan_def by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 69 | hence "U \<subseteq> -A" by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 70 | hence "x \<in> interior (-A)" using U interiorI by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 71 | thus ?thesis using fr interior_complement unfolding frontier_def by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 72 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 73 | next | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 74 | assume nfr: "x \<notin> frontier A" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 75 | hence "x \<in> interior A \<or> x \<in> interior (-A)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 76 | by (auto simp: frontier_def closure_interior) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 77 | thus "isCont ((indicator A)::'a \<Rightarrow> real) x" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 78 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 79 | assume int: "x \<in> interior A" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 80 | then obtain U where U: "open U" "x \<in> U" "U \<subseteq> A" unfolding interior_def by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 81 | hence "\<forall>y\<in>U. indicator A y = (1::real)" unfolding indicator_def by auto | 
| 71172 | 82 | hence "continuous_on U (indicator A)" by (simp add: indicator_eq_1_iff) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 83 | thus ?thesis using U continuous_on_eq_continuous_at by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 84 | next | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 85 | assume ext: "x \<in> interior (-A)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 86 | then obtain U where U: "open U" "x \<in> U" "U \<subseteq> -A" unfolding interior_def by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 87 | then have "continuous_on U (indicator A)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 88 | using continuous_on_topological by (auto simp: subset_iff) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 89 | thus ?thesis using U continuous_on_eq_continuous_at by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 90 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 91 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 92 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 93 | lemma closedin_limpt: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 94 | "closedin (top_of_set T) S \<longleftrightarrow> S \<subseteq> T \<and> (\<forall>x. x islimpt S \<and> x \<in> T \<longrightarrow> x \<in> S)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 95 | apply (simp add: closedin_closed, safe) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 96 | apply (simp add: closed_limpt islimpt_subset) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 97 | apply (rule_tac x="closure S" in exI, simp) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 98 | apply (force simp: closure_def) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 99 | done | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 100 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 101 | lemma closedin_closed_eq: "closed S \<Longrightarrow> closedin (top_of_set S) T \<longleftrightarrow> closed T \<and> T \<subseteq> S" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 102 | by (meson closedin_limpt closed_subset closedin_closed_trans) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 103 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 104 | lemma connected_closed_set: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 105 | "closed S | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 106 |     \<Longrightarrow> connected S \<longleftrightarrow> (\<nexists>A B. closed A \<and> closed B \<and> A \<noteq> {} \<and> B \<noteq> {} \<and> A \<union> B = S \<and> A \<inter> B = {})"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 107 | unfolding connected_closedin_eq closedin_closed_eq connected_closedin_eq by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 108 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 109 | text \<open>If a connnected set is written as the union of two nonempty closed sets, then these sets | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 110 | have to intersect.\<close> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 111 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 112 | lemma connected_as_closed_union: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 113 |   assumes "connected C" "C = A \<union> B" "closed A" "closed B" "A \<noteq> {}" "B \<noteq> {}"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 114 |   shows "A \<inter> B \<noteq> {}"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 115 | by (metis assms closed_Un connected_closed_set) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 116 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 117 | lemma closedin_subset_trans: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 118 | "closedin (top_of_set U) S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> T \<subseteq> U \<Longrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 119 | closedin (top_of_set T) S" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 120 | by (meson closedin_limpt subset_iff) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 121 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 122 | lemma openin_subset_trans: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 123 | "openin (top_of_set U) S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> T \<subseteq> U \<Longrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 124 | openin (top_of_set T) S" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 125 | by (auto simp: openin_open) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 126 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 127 | lemma closedin_compact: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 128 | "\<lbrakk>compact S; closedin (top_of_set S) T\<rbrakk> \<Longrightarrow> compact T" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 129 | by (metis closedin_closed compact_Int_closed) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 130 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 131 | lemma closedin_compact_eq: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 132 | fixes S :: "'a::t2_space set" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 133 | shows | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 134 | "compact S | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 135 | \<Longrightarrow> (closedin (top_of_set S) T \<longleftrightarrow> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 136 | compact T \<and> T \<subseteq> S)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 137 | by (metis closedin_imp_subset closedin_compact closed_subset compact_imp_closed) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 138 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 139 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 140 | subsection \<open>Closure\<close> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 141 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 142 | lemma euclidean_closure_of [simp]: "euclidean closure_of S = closure S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 143 | by (auto simp: closure_of_def closure_def islimpt_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 144 | |
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 145 | lemma closure_openin_Int_closure: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 146 | assumes ope: "openin (top_of_set U) S" and "T \<subseteq> U" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 147 | shows "closure(S \<inter> closure T) = closure(S \<inter> T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 148 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 149 | obtain V where "open V" and S: "S = U \<inter> V" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 150 | using ope using openin_open by metis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 151 | show "closure (S \<inter> closure T) \<subseteq> closure (S \<inter> T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 152 | proof (clarsimp simp: S) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 153 | fix x | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 154 | assume "x \<in> closure (U \<inter> V \<inter> closure T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 155 | then have "V \<inter> closure T \<subseteq> A \<Longrightarrow> x \<in> closure A" for A | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 156 | by (metis closure_mono subsetD inf.coboundedI2 inf_assoc) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 157 | then have "x \<in> closure (T \<inter> V)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 158 | by (metis \<open>open V\<close> closure_closure inf_commute open_Int_closure_subset) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 159 | then show "x \<in> closure (U \<inter> V \<inter> T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 160 | by (metis \<open>T \<subseteq> U\<close> inf.absorb_iff2 inf_assoc inf_commute) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 161 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 162 | next | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 163 | show "closure (S \<inter> T) \<subseteq> closure (S \<inter> closure T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 164 | by (meson Int_mono closure_mono closure_subset order_refl) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 165 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 166 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 167 | corollary infinite_openin: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 168 | fixes S :: "'a :: t1_space set" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 169 | shows "\<lbrakk>openin (top_of_set U) S; x \<in> S; x islimpt U\<rbrakk> \<Longrightarrow> infinite S" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 170 | by (clarsimp simp add: openin_open islimpt_eq_acc_point inf_commute) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 171 | |
| 69622 | 172 | lemma closure_Int_ballI: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 173 |   assumes "\<And>U. \<lbrakk>openin (top_of_set S) U; U \<noteq> {}\<rbrakk> \<Longrightarrow> T \<inter> U \<noteq> {}"
 | 
| 69622 | 174 | shows "S \<subseteq> closure T" | 
| 175 | proof (clarsimp simp: closure_iff_nhds_not_empty) | |
| 176 | fix x and A and V | |
| 177 |   assume "x \<in> S" "V \<subseteq> A" "open V" "x \<in> V" "T \<inter> A = {}"
 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 178 | then have "openin (top_of_set S) (A \<inter> V \<inter> S)" | 
| 69622 | 179 | by (auto simp: openin_open intro!: exI[where x="V"]) | 
| 180 |   moreover have "A \<inter> V \<inter> S \<noteq> {}" using \<open>x \<in> V\<close> \<open>V \<subseteq> A\<close> \<open>x \<in> S\<close>
 | |
| 181 | by auto | |
| 182 |   ultimately have "T \<inter> (A \<inter> V \<inter> S) \<noteq> {}"
 | |
| 183 | by (rule assms) | |
| 184 |   with \<open>T \<inter> A = {}\<close> show False by auto
 | |
| 185 | qed | |
| 186 | ||
| 187 | ||
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 188 | subsection \<open>Frontier\<close> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 189 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 190 | lemma euclidean_interior_of [simp]: "euclidean interior_of S = interior S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 191 | by (auto simp: interior_of_def interior_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 192 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 193 | lemma euclidean_frontier_of [simp]: "euclidean frontier_of S = frontier S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 194 | by (auto simp: frontier_of_def frontier_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 195 | |
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 196 | lemma connected_Int_frontier: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 197 |      "\<lbrakk>connected s; s \<inter> t \<noteq> {}; s - t \<noteq> {}\<rbrakk> \<Longrightarrow> (s \<inter> frontier t \<noteq> {})"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 198 | apply (simp add: frontier_interiors connected_openin, safe) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 199 | apply (drule_tac x="s \<inter> interior t" in spec, safe) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 200 | apply (drule_tac [2] x="s \<inter> interior (-t)" in spec) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 201 | apply (auto simp: disjoint_eq_subset_Compl dest: interior_subset [THEN subsetD]) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 202 | done | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 203 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 204 | subsection \<open>Compactness\<close> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 205 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 206 | lemma openin_delete: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 207 | fixes a :: "'a :: t1_space" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 208 | shows "openin (top_of_set u) s | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 209 |          \<Longrightarrow> openin (top_of_set u) (s - {a})"
 | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 210 | by (metis Int_Diff open_delete openin_open) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 211 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 212 | lemma compact_eq_openin_cover: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 213 | "compact S \<longleftrightarrow> | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 214 | (\<forall>C. (\<forall>c\<in>C. openin (top_of_set S) c) \<and> S \<subseteq> \<Union>C \<longrightarrow> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 215 | (\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D))" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 216 | proof safe | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 217 | fix C | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 218 | assume "compact S" and "\<forall>c\<in>C. openin (top_of_set S) c" and "S \<subseteq> \<Union>C" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 219 |   then have "\<forall>c\<in>{T. open T \<and> S \<inter> T \<in> C}. open c" and "S \<subseteq> \<Union>{T. open T \<and> S \<inter> T \<in> C}"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 220 | unfolding openin_open by force+ | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 221 |   with \<open>compact S\<close> obtain D where "D \<subseteq> {T. open T \<and> S \<inter> T \<in> C}" and "finite D" and "S \<subseteq> \<Union>D"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 222 | by (meson compactE) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 223 | then have "image (\<lambda>T. S \<inter> T) D \<subseteq> C \<and> finite (image (\<lambda>T. S \<inter> T) D) \<and> S \<subseteq> \<Union>(image (\<lambda>T. S \<inter> T) D)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 224 | by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 225 | then show "\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D" .. | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 226 | next | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 227 | assume 1: "\<forall>C. (\<forall>c\<in>C. openin (top_of_set S) c) \<and> S \<subseteq> \<Union>C \<longrightarrow> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 228 | (\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 229 | show "compact S" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 230 | proof (rule compactI) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 231 | fix C | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 232 | let ?C = "image (\<lambda>T. S \<inter> T) C" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 233 | assume "\<forall>t\<in>C. open t" and "S \<subseteq> \<Union>C" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 234 | then have "(\<forall>c\<in>?C. openin (top_of_set S) c) \<and> S \<subseteq> \<Union>?C" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 235 | unfolding openin_open by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 236 | with 1 obtain D where "D \<subseteq> ?C" and "finite D" and "S \<subseteq> \<Union>D" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 237 | by metis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 238 | let ?D = "inv_into C (\<lambda>T. S \<inter> T) ` D" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 239 | have "?D \<subseteq> C \<and> finite ?D \<and> S \<subseteq> \<Union>?D" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 240 | proof (intro conjI) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 241 | from \<open>D \<subseteq> ?C\<close> show "?D \<subseteq> C" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 242 | by (fast intro: inv_into_into) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 243 | from \<open>finite D\<close> show "finite ?D" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 244 | by (rule finite_imageI) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 245 | from \<open>S \<subseteq> \<Union>D\<close> show "S \<subseteq> \<Union>?D" | 
| 72225 | 246 | apply (rule subset_trans) | 
| 247 | by (metis Int_Union Int_lower2 \<open>D \<subseteq> (\<inter>) S ` C\<close> image_inv_into_cancel) | |
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 248 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 249 | then show "\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D" .. | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 250 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 251 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 252 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 253 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 254 | subsection \<open>Continuity\<close> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 255 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 256 | lemma interior_image_subset: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 257 | assumes "inj f" "\<And>x. continuous (at x) f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 258 | shows "interior (f ` S) \<subseteq> f ` (interior S)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 259 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 260 | fix x assume "x \<in> interior (f ` S)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 261 | then obtain T where as: "open T" "x \<in> T" "T \<subseteq> f ` S" .. | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 262 | then have "x \<in> f ` S" by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 263 | then obtain y where y: "y \<in> S" "x = f y" by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 264 | have "open (f -` T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 265 | using assms \<open>open T\<close> by (simp add: continuous_at_imp_continuous_on open_vimage) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 266 | moreover have "y \<in> vimage f T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 267 | using \<open>x = f y\<close> \<open>x \<in> T\<close> by simp | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 268 | moreover have "vimage f T \<subseteq> S" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 269 | using \<open>T \<subseteq> image f S\<close> \<open>inj f\<close> unfolding inj_on_def subset_eq by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 270 | ultimately have "y \<in> interior S" .. | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 271 | with \<open>x = f y\<close> show "x \<in> f ` interior S" .. | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 272 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 273 | |
| 70136 | 274 | subsection\<^marker>\<open>tag unimportant\<close> \<open>Equality of continuous functions on closure and related results\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 275 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 276 | lemma continuous_closedin_preimage_constant: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 277 | fixes f :: "_ \<Rightarrow> 'b::t1_space" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 278 |   shows "continuous_on S f \<Longrightarrow> closedin (top_of_set S) {x \<in> S. f x = a}"
 | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 279 |   using continuous_closedin_preimage[of S f "{a}"] by (simp add: vimage_def Collect_conj_eq)
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 280 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 281 | lemma continuous_closed_preimage_constant: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 282 | fixes f :: "_ \<Rightarrow> 'b::t1_space" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 283 |   shows "continuous_on S f \<Longrightarrow> closed S \<Longrightarrow> closed {x \<in> S. f x = a}"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 284 |   using continuous_closed_preimage[of S f "{a}"] by (simp add: vimage_def Collect_conj_eq)
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 285 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 286 | lemma continuous_constant_on_closure: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 287 | fixes f :: "_ \<Rightarrow> 'b::t1_space" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 288 | assumes "continuous_on (closure S) f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 289 | and "\<And>x. x \<in> S \<Longrightarrow> f x = a" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 290 | and "x \<in> closure S" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 291 | shows "f x = a" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 292 | using continuous_closed_preimage_constant[of "closure S" f a] | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 293 |       assms closure_minimal[of S "{x \<in> closure S. f x = a}"] closure_subset
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 294 | unfolding subset_eq | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 295 | by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 296 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 297 | lemma image_closure_subset: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 298 | assumes contf: "continuous_on (closure S) f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 299 | and "closed T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 300 | and "(f ` S) \<subseteq> T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 301 | shows "f ` (closure S) \<subseteq> T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 302 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 303 |   have "S \<subseteq> {x \<in> closure S. f x \<in> T}"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 304 | using assms(3) closure_subset by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 305 | moreover have "closed (closure S \<inter> f -` T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 306 | using continuous_closed_preimage[OF contf] \<open>closed T\<close> by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 307 | ultimately have "closure S = (closure S \<inter> f -` T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 308 | using closure_minimal[of S "(closure S \<inter> f -` T)"] by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 309 | then show ?thesis by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 310 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 311 | |
| 70136 | 312 | subsection\<^marker>\<open>tag unimportant\<close> \<open>A function constant on a set\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 313 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 314 | definition constant_on (infixl "(constant'_on)" 50) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 315 | where "f constant_on A \<equiv> \<exists>y. \<forall>x\<in>A. f x = y" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 316 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 317 | lemma constant_on_subset: "\<lbrakk>f constant_on A; B \<subseteq> A\<rbrakk> \<Longrightarrow> f constant_on B" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 318 | unfolding constant_on_def by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 319 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 320 | lemma injective_not_constant: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 321 |   fixes S :: "'a::{perfect_space} set"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 322 |   shows "\<lbrakk>open S; inj_on f S; f constant_on S\<rbrakk> \<Longrightarrow> S = {}"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 323 | unfolding constant_on_def | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 324 | by (metis equals0I inj_on_contraD islimpt_UNIV islimpt_def) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 325 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 326 | lemma constant_on_closureI: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 327 | fixes f :: "_ \<Rightarrow> 'b::t1_space" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 328 | assumes cof: "f constant_on S" and contf: "continuous_on (closure S) f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 329 | shows "f constant_on (closure S)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 330 | using continuous_constant_on_closure [OF contf] cof unfolding constant_on_def | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 331 | by metis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 332 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 333 | |
| 70136 | 334 | subsection\<^marker>\<open>tag unimportant\<close> \<open>Continuity relative to a union.\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 335 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 336 | lemma continuous_on_Un_local: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 337 | "\<lbrakk>closedin (top_of_set (s \<union> t)) s; closedin (top_of_set (s \<union> t)) t; | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 338 | continuous_on s f; continuous_on t f\<rbrakk> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 339 | \<Longrightarrow> continuous_on (s \<union> t) f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 340 | unfolding continuous_on closedin_limpt | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 341 | by (metis Lim_trivial_limit Lim_within_union Un_iff trivial_limit_within) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 342 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 343 | lemma continuous_on_cases_local: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 344 | "\<lbrakk>closedin (top_of_set (s \<union> t)) s; closedin (top_of_set (s \<union> t)) t; | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 345 | continuous_on s f; continuous_on t g; | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 346 | \<And>x. \<lbrakk>x \<in> s \<and> \<not>P x \<or> x \<in> t \<and> P x\<rbrakk> \<Longrightarrow> f x = g x\<rbrakk> | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 347 | \<Longrightarrow> continuous_on (s \<union> t) (\<lambda>x. if P x then f x else g x)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 348 | by (rule continuous_on_Un_local) (auto intro: continuous_on_eq) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 349 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 350 | lemma continuous_on_cases_le: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 351 | fixes h :: "'a :: topological_space \<Rightarrow> real" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 352 |   assumes "continuous_on {t \<in> s. h t \<le> a} f"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 353 |       and "continuous_on {t \<in> s. a \<le> h t} g"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 354 | and h: "continuous_on s h" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 355 | and "\<And>t. \<lbrakk>t \<in> s; h t = a\<rbrakk> \<Longrightarrow> f t = g t" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 356 | shows "continuous_on s (\<lambda>t. if h t \<le> a then f(t) else g(t))" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 357 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 358 | have s: "s = (s \<inter> h -` atMost a) \<union> (s \<inter> h -` atLeast a)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 359 | by force | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 360 | have 1: "closedin (top_of_set s) (s \<inter> h -` atMost a)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 361 | by (rule continuous_closedin_preimage [OF h closed_atMost]) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 362 | have 2: "closedin (top_of_set s) (s \<inter> h -` atLeast a)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 363 | by (rule continuous_closedin_preimage [OF h closed_atLeast]) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 364 |   have eq: "s \<inter> h -` {..a} = {t \<in> s. h t \<le> a}" "s \<inter> h -` {a..} = {t \<in> s. a \<le> h t}"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 365 | by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 366 | show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 367 | apply (rule continuous_on_subset [of s, OF _ order_refl]) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 368 | apply (subst s) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 369 | apply (rule continuous_on_cases_local) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 370 | using 1 2 s assms apply (auto simp: eq) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 371 | done | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 372 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 373 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 374 | lemma continuous_on_cases_1: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 375 | fixes s :: "real set" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 376 |   assumes "continuous_on {t \<in> s. t \<le> a} f"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 377 |       and "continuous_on {t \<in> s. a \<le> t} g"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 378 | and "a \<in> s \<Longrightarrow> f a = g a" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 379 | shows "continuous_on s (\<lambda>t. if t \<le> a then f(t) else g(t))" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 380 | using assms | 
| 71172 | 381 | by (auto intro: continuous_on_cases_le [where h = id, simplified]) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 382 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 383 | |
| 70136 | 384 | subsection\<^marker>\<open>tag unimportant\<close>\<open>Inverse function property for open/closed maps\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 385 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 386 | lemma continuous_on_inverse_open_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 387 | assumes contf: "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 388 | and imf: "f ` S = T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 389 | and injf: "\<And>x. x \<in> S \<Longrightarrow> g (f x) = x" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 390 | and oo: "\<And>U. openin (top_of_set S) U \<Longrightarrow> openin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 391 | shows "continuous_on T g" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 392 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 393 | from imf injf have gTS: "g ` T = S" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 394 | by force | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 395 | from imf injf have fU: "U \<subseteq> S \<Longrightarrow> (f ` U) = T \<inter> g -` U" for U | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 396 | by force | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 397 | show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 398 | by (simp add: continuous_on_open [of T g] gTS) (metis openin_imp_subset fU oo) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 399 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 400 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 401 | lemma continuous_on_inverse_closed_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 402 | assumes contf: "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 403 | and imf: "f ` S = T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 404 | and injf: "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 405 | and oo: "\<And>U. closedin (top_of_set S) U \<Longrightarrow> closedin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 406 | shows "continuous_on T g" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 407 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 408 | from imf injf have gTS: "g ` T = S" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 409 | by force | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 410 | from imf injf have fU: "U \<subseteq> S \<Longrightarrow> (f ` U) = T \<inter> g -` U" for U | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 411 | by force | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 412 | show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 413 | by (simp add: continuous_on_closed [of T g] gTS) (metis closedin_imp_subset fU oo) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 414 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 415 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 416 | lemma homeomorphism_injective_open_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 417 | assumes contf: "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 418 | and imf: "f ` S = T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 419 | and injf: "inj_on f S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 420 | and oo: "\<And>U. openin (top_of_set S) U \<Longrightarrow> openin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 421 | obtains g where "homeomorphism S T f g" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 422 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 423 | have "continuous_on T (inv_into S f)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 424 | by (metis contf continuous_on_inverse_open_map imf injf inv_into_f_f oo) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 425 | with imf injf contf show "homeomorphism S T f (inv_into S f)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 426 | by (auto simp: homeomorphism_def) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 427 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 428 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 429 | lemma homeomorphism_injective_closed_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 430 | assumes contf: "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 431 | and imf: "f ` S = T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 432 | and injf: "inj_on f S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 433 | and oo: "\<And>U. closedin (top_of_set S) U \<Longrightarrow> closedin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 434 | obtains g where "homeomorphism S T f g" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 435 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 436 | have "continuous_on T (inv_into S f)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 437 | by (metis contf continuous_on_inverse_closed_map imf injf inv_into_f_f oo) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 438 | with imf injf contf show "homeomorphism S T f (inv_into S f)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 439 | by (auto simp: homeomorphism_def) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 440 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 441 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 442 | lemma homeomorphism_imp_open_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 443 | assumes hom: "homeomorphism S T f g" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 444 | and oo: "openin (top_of_set S) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 445 | shows "openin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 446 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 447 | from hom oo have [simp]: "f ` U = T \<inter> g -` U" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 448 | using openin_subset by (fastforce simp: homeomorphism_def rev_image_eqI) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 449 | from hom have "continuous_on T g" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 450 | unfolding homeomorphism_def by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 451 | moreover have "g ` T = S" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 452 | by (metis hom homeomorphism_def) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 453 | ultimately show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 454 | by (simp add: continuous_on_open oo) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 455 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 456 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 457 | lemma homeomorphism_imp_closed_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 458 | assumes hom: "homeomorphism S T f g" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 459 | and oo: "closedin (top_of_set S) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 460 | shows "closedin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 461 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 462 | from hom oo have [simp]: "f ` U = T \<inter> g -` U" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 463 | using closedin_subset by (fastforce simp: homeomorphism_def rev_image_eqI) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 464 | from hom have "continuous_on T g" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 465 | unfolding homeomorphism_def by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 466 | moreover have "g ` T = S" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 467 | by (metis hom homeomorphism_def) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 468 | ultimately show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 469 | by (simp add: continuous_on_closed oo) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 470 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 471 | |
| 70136 | 472 | subsection\<^marker>\<open>tag unimportant\<close> \<open>Seperability\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 473 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 474 | lemma subset_second_countable: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 475 | obtains \<B> :: "'a:: second_countable_topology set set" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 476 | where "countable \<B>" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 477 |           "{} \<notin> \<B>"
 | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 478 | "\<And>C. C \<in> \<B> \<Longrightarrow> openin(top_of_set S) C" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 479 | "\<And>T. openin(top_of_set S) T \<Longrightarrow> \<exists>\<U>. \<U> \<subseteq> \<B> \<and> T = \<Union>\<U>" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 480 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 481 | obtain \<B> :: "'a set set" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 482 | where "countable \<B>" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 483 | and opeB: "\<And>C. C \<in> \<B> \<Longrightarrow> openin(top_of_set S) C" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 484 | and \<B>: "\<And>T. openin(top_of_set S) T \<Longrightarrow> \<exists>\<U>. \<U> \<subseteq> \<B> \<and> T = \<Union>\<U>" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 485 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 486 | obtain \<C> :: "'a set set" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 487 | where "countable \<C>" and ope: "\<And>C. C \<in> \<C> \<Longrightarrow> open C" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 488 | and \<C>: "\<And>S. open S \<Longrightarrow> \<exists>U. U \<subseteq> \<C> \<and> S = \<Union>U" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 489 | by (metis univ_second_countable that) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 490 | show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 491 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 492 | show "countable ((\<lambda>C. S \<inter> C) ` \<C>)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 493 | by (simp add: \<open>countable \<C>\<close>) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 494 | show "\<And>C. C \<in> (\<inter>) S ` \<C> \<Longrightarrow> openin (top_of_set S) C" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 495 | using ope by auto | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 496 | show "\<And>T. openin (top_of_set S) T \<Longrightarrow> \<exists>\<U>\<subseteq>(\<inter>) S ` \<C>. T = \<Union>\<U>" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 497 | by (metis \<C> image_mono inf_Sup openin_open) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 498 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 499 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 500 | show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 501 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 502 |     show "countable (\<B> - {{}})"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 503 | using \<open>countable \<B>\<close> by blast | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 504 |     show "\<And>C. \<lbrakk>C \<in> \<B> - {{}}\<rbrakk> \<Longrightarrow> openin (top_of_set S) C"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 505 | by (simp add: \<open>\<And>C. C \<in> \<B> \<Longrightarrow> openin (top_of_set S) C\<close>) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 506 |     show "\<exists>\<U>\<subseteq>\<B> - {{}}. T = \<Union>\<U>" if "openin (top_of_set S) T" for T
 | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 507 | using \<B> [OF that] | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 508 | apply clarify | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 509 |       apply (rule_tac x="\<U> - {{}}" in exI, auto)
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 510 | done | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 511 | qed auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 512 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 513 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 514 | lemma Lindelof_openin: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 515 | fixes \<F> :: "'a::second_countable_topology set set" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 516 | assumes "\<And>S. S \<in> \<F> \<Longrightarrow> openin (top_of_set U) S" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 517 | obtains \<F>' where "\<F>' \<subseteq> \<F>" "countable \<F>'" "\<Union>\<F>' = \<Union>\<F>" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 518 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 519 | have "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>T. open T \<and> S = U \<inter> T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 520 | using assms by (simp add: openin_open) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 521 | then obtain tf where tf: "\<And>S. S \<in> \<F> \<Longrightarrow> open (tf S) \<and> (S = U \<inter> tf S)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 522 | by metis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 523 | have [simp]: "\<And>\<F>'. \<F>' \<subseteq> \<F> \<Longrightarrow> \<Union>\<F>' = U \<inter> \<Union>(tf ` \<F>')" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 524 | using tf by fastforce | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 525 | obtain \<G> where "countable \<G> \<and> \<G> \<subseteq> tf ` \<F>" "\<Union>\<G> = \<Union>(tf ` \<F>)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 526 | using tf by (force intro: Lindelof [of "tf ` \<F>"]) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 527 | then obtain \<F>' where \<F>': "\<F>' \<subseteq> \<F>" "countable \<F>'" "\<Union>\<F>' = \<Union>\<F>" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 528 | by (clarsimp simp add: countable_subset_image) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 529 | then show ?thesis .. | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 530 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 531 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 532 | |
| 70136 | 533 | subsection\<^marker>\<open>tag unimportant\<close>\<open>Closed Maps\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 534 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 535 | lemma continuous_imp_closed_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 536 | fixes f :: "'a::t2_space \<Rightarrow> 'b::t2_space" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 537 | assumes "closedin (top_of_set S) U" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 538 | "continuous_on S f" "f ` S = T" "compact S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 539 | shows "closedin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 540 | by (metis assms closedin_compact_eq compact_continuous_image continuous_on_subset subset_image_iff) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 541 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 542 | lemma closed_map_restrict: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 543 | assumes cloU: "closedin (top_of_set (S \<inter> f -` T')) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 544 | and cc: "\<And>U. closedin (top_of_set S) U \<Longrightarrow> closedin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 545 | and "T' \<subseteq> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 546 | shows "closedin (top_of_set T') (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 547 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 548 | obtain V where "closed V" "U = S \<inter> f -` T' \<inter> V" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 549 | using cloU by (auto simp: closedin_closed) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 550 | with cc [of "S \<inter> V"] \<open>T' \<subseteq> T\<close> show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 551 | by (fastforce simp add: closedin_closed) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 552 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 553 | |
| 70136 | 554 | subsection\<^marker>\<open>tag unimportant\<close>\<open>Open Maps\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 555 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 556 | lemma open_map_restrict: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 557 | assumes opeU: "openin (top_of_set (S \<inter> f -` T')) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 558 | and oo: "\<And>U. openin (top_of_set S) U \<Longrightarrow> openin (top_of_set T) (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 559 | and "T' \<subseteq> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 560 | shows "openin (top_of_set T') (f ` U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 561 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 562 | obtain V where "open V" "U = S \<inter> f -` T' \<inter> V" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 563 | using opeU by (auto simp: openin_open) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 564 | with oo [of "S \<inter> V"] \<open>T' \<subseteq> T\<close> show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 565 | by (fastforce simp add: openin_open) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 566 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 567 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 568 | |
| 70136 | 569 | subsection\<^marker>\<open>tag unimportant\<close>\<open>Quotient maps\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 570 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 571 | lemma quotient_map_imp_continuous_open: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 572 | assumes T: "f ` S \<subseteq> T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 573 | and ope: "\<And>U. U \<subseteq> T | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 574 | \<Longrightarrow> (openin (top_of_set S) (S \<inter> f -` U) \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 575 | openin (top_of_set T) U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 576 | shows "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 577 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 578 | have [simp]: "S \<inter> f -` f ` S = S" by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 579 | show ?thesis | 
| 72225 | 580 | by (meson T continuous_on_open_gen ope openin_imp_subset) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 581 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 582 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 583 | lemma quotient_map_imp_continuous_closed: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 584 | assumes T: "f ` S \<subseteq> T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 585 | and ope: "\<And>U. U \<subseteq> T | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 586 | \<Longrightarrow> (closedin (top_of_set S) (S \<inter> f -` U) \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 587 | closedin (top_of_set T) U)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 588 | shows "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 589 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 590 | have [simp]: "S \<inter> f -` f ` S = S" by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 591 | show ?thesis | 
| 72225 | 592 | by (meson T closedin_imp_subset continuous_on_closed_gen ope) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 593 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 594 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 595 | lemma open_map_imp_quotient_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 596 | assumes contf: "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 597 | and T: "T \<subseteq> f ` S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 598 | and ope: "\<And>T. openin (top_of_set S) T | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 599 | \<Longrightarrow> openin (top_of_set (f ` S)) (f ` T)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 600 | shows "openin (top_of_set S) (S \<inter> f -` T) = | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 601 | openin (top_of_set (f ` S)) T" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 602 | proof - | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 603 | have "T = f ` (S \<inter> f -` T)" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 604 | using T by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 605 | then show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 606 | using "ope" contf continuous_on_open by metis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 607 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 608 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 609 | lemma closed_map_imp_quotient_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 610 | assumes contf: "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 611 | and T: "T \<subseteq> f ` S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 612 | and ope: "\<And>T. closedin (top_of_set S) T | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 613 | \<Longrightarrow> closedin (top_of_set (f ` S)) (f ` T)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 614 | shows "openin (top_of_set S) (S \<inter> f -` T) \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 615 | openin (top_of_set (f ` S)) T" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 616 | (is "?lhs = ?rhs") | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 617 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 618 | assume ?lhs | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 619 | then have *: "closedin (top_of_set S) (S - (S \<inter> f -` T))" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 620 | using closedin_diff by fastforce | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 621 | have [simp]: "(f ` S - f ` (S - (S \<inter> f -` T))) = T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 622 | using T by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 623 | show ?rhs | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 624 | using ope [OF *, unfolded closedin_def] by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 625 | next | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 626 | assume ?rhs | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 627 | with contf show ?lhs | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 628 | by (auto simp: continuous_on_open) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 629 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 630 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 631 | lemma continuous_right_inverse_imp_quotient_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 632 | assumes contf: "continuous_on S f" and imf: "f ` S \<subseteq> T" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 633 | and contg: "continuous_on T g" and img: "g ` T \<subseteq> S" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 634 | and fg [simp]: "\<And>y. y \<in> T \<Longrightarrow> f(g y) = y" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 635 | and U: "U \<subseteq> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 636 | shows "openin (top_of_set S) (S \<inter> f -` U) \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 637 | openin (top_of_set T) U" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 638 | (is "?lhs = ?rhs") | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 639 | proof - | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 640 | have f: "\<And>Z. openin (top_of_set (f ` S)) Z \<Longrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 641 | openin (top_of_set S) (S \<inter> f -` Z)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 642 | and g: "\<And>Z. openin (top_of_set (g ` T)) Z \<Longrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 643 | openin (top_of_set T) (T \<inter> g -` Z)" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 644 | using contf contg by (auto simp: continuous_on_open) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 645 | show ?thesis | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 646 | proof | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 647 |     have "T \<inter> g -` (g ` T \<inter> (S \<inter> f -` U)) = {x \<in> T. f (g x) \<in> U}"
 | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 648 | using imf img by blast | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 649 | also have "... = U" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 650 | using U by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 651 | finally have eq: "T \<inter> g -` (g ` T \<inter> (S \<inter> f -` U)) = U" . | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 652 | assume ?lhs | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 653 | then have *: "openin (top_of_set (g ` T)) (g ` T \<inter> (S \<inter> f -` U))" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 654 | by (meson img openin_Int openin_subtopology_Int_subset openin_subtopology_self) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 655 | show ?rhs | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 656 | using g [OF *] eq by auto | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 657 | next | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 658 | assume rhs: ?rhs | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 659 | show ?lhs | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 660 | by (metis f fg image_eqI image_subset_iff imf img openin_subopen openin_subtopology_self openin_trans rhs) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 661 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 662 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 663 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 664 | lemma continuous_left_inverse_imp_quotient_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 665 | assumes "continuous_on S f" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 666 | and "continuous_on (f ` S) g" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 667 | and "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 668 | and "U \<subseteq> f ` S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 669 | shows "openin (top_of_set S) (S \<inter> f -` U) \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 670 | openin (top_of_set (f ` S)) U" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 671 | apply (rule continuous_right_inverse_imp_quotient_map) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 672 | using assms apply force+ | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 673 | done | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 674 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 675 | lemma continuous_imp_quotient_map: | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 676 | fixes f :: "'a::t2_space \<Rightarrow> 'b::t2_space" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 677 | assumes "continuous_on S f" "f ` S = T" "compact S" "U \<subseteq> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 678 | shows "openin (top_of_set S) (S \<inter> f -` U) \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 679 | openin (top_of_set T) U" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 680 | by (metis (no_types, lifting) assms closed_map_imp_quotient_map continuous_imp_closed_map) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 681 | |
| 70136 | 682 | subsection\<^marker>\<open>tag unimportant\<close>\<open>Pasting lemmas for functions, for of casewise definitions\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 683 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 684 | subsubsection\<open>on open sets\<close> | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 685 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 686 | lemma pasting_lemma: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 687 | assumes ope: "\<And>i. i \<in> I \<Longrightarrow> openin X (T i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 688 | and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_map(subtopology X (T i)) Y (f i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 689 | and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> topspace X \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 690 | and g: "\<And>x. x \<in> topspace X \<Longrightarrow> \<exists>j. j \<in> I \<and> x \<in> T j \<and> g x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 691 | shows "continuous_map X Y g" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 692 | unfolding continuous_map_openin_preimage_eq | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 693 | proof (intro conjI allI impI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 694 | show "g ` topspace X \<subseteq> topspace Y" | 
| 71174 | 695 | using g cont continuous_map_image_subset_topspace by fastforce | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 696 | next | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 697 | fix U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 698 | assume Y: "openin Y U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 699 | have T: "T i \<subseteq> topspace X" if "i \<in> I" for i | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 700 | using ope by (simp add: openin_subset that) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 701 | have *: "topspace X \<inter> g -` U = (\<Union>i \<in> I. T i \<inter> f i -` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 702 | using f g T by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 703 | have "\<And>i. i \<in> I \<Longrightarrow> openin X (T i \<inter> f i -` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 704 | using cont unfolding continuous_map_openin_preimage_eq | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 705 | by (metis Y T inf.commute inf_absorb1 ope topspace_subtopology openin_trans_full) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 706 | then show "openin X (topspace X \<inter> g -` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 707 | by (auto simp: *) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 708 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 709 | |
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 710 | lemma pasting_lemma_exists: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 711 | assumes X: "topspace X \<subseteq> (\<Union>i \<in> I. T i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 712 | and ope: "\<And>i. i \<in> I \<Longrightarrow> openin X (T i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 713 | and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_map (subtopology X (T i)) Y (f i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 714 | and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> topspace X \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 715 | obtains g where "continuous_map X Y g" "\<And>x i. \<lbrakk>i \<in> I; x \<in> topspace X \<inter> T i\<rbrakk> \<Longrightarrow> g x = f i x" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 716 | proof | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 717 | let ?h = "\<lambda>x. f (SOME i. i \<in> I \<and> x \<in> T i) x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 718 | show "continuous_map X Y ?h" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 719 | apply (rule pasting_lemma [OF ope cont]) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 720 | apply (blast intro: f)+ | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 721 | by (metis (no_types, lifting) UN_E X subsetD someI_ex) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 722 | show "f (SOME i. i \<in> I \<and> x \<in> T i) x = f i x" if "i \<in> I" "x \<in> topspace X \<inter> T i" for i x | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 723 | by (metis (no_types, lifting) IntD2 IntI f someI_ex that) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 724 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 725 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 726 | lemma pasting_lemma_locally_finite: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 727 |   assumes fin: "\<And>x. x \<in> topspace X \<Longrightarrow> \<exists>V. openin X V \<and> x \<in> V \<and> finite {i \<in> I. T i \<inter> V \<noteq> {}}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 728 | and clo: "\<And>i. i \<in> I \<Longrightarrow> closedin X (T i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 729 | and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_map(subtopology X (T i)) Y (f i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 730 | and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> topspace X \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 731 | and g: "\<And>x. x \<in> topspace X \<Longrightarrow> \<exists>j. j \<in> I \<and> x \<in> T j \<and> g x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 732 | shows "continuous_map X Y g" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 733 | unfolding continuous_map_closedin_preimage_eq | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 734 | proof (intro conjI allI impI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 735 | show "g ` topspace X \<subseteq> topspace Y" | 
| 71174 | 736 | using g cont continuous_map_image_subset_topspace by fastforce | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 737 | next | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 738 | fix U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 739 | assume Y: "closedin Y U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 740 | have T: "T i \<subseteq> topspace X" if "i \<in> I" for i | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 741 | using clo by (simp add: closedin_subset that) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 742 | have *: "topspace X \<inter> g -` U = (\<Union>i \<in> I. T i \<inter> f i -` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 743 | using f g T by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 744 | have cTf: "\<And>i. i \<in> I \<Longrightarrow> closedin X (T i \<inter> f i -` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 745 | using cont unfolding continuous_map_closedin_preimage_eq topspace_subtopology | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 746 | by (simp add: Int_absorb1 T Y clo closedin_closed_subtopology) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 747 |   have sub: "{Z \<in> (\<lambda>i. T i \<inter> f i -` U) ` I. Z \<inter> V \<noteq> {}}
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 748 |            \<subseteq> (\<lambda>i. T i \<inter> f i -` U) ` {i \<in> I. T i \<inter> V \<noteq> {}}" for V
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 749 | by auto | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 750 | have 1: "(\<Union>i\<in>I. T i \<inter> f i -` U) \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 751 | using T by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 752 | then have lf: "locally_finite_in X ((\<lambda>i. T i \<inter> f i -` U) ` I)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 753 | unfolding locally_finite_in_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 754 | using finite_subset [OF sub] fin by force | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 755 | show "closedin X (topspace X \<inter> g -` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 756 | apply (subst *) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 757 | apply (rule closedin_locally_finite_Union) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 758 | apply (auto intro: cTf lf) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 759 | done | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 760 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 761 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 762 | subsubsection\<open>Likewise on closed sets, with a finiteness assumption\<close> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 763 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 764 | lemma pasting_lemma_closed: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 765 | assumes fin: "finite I" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 766 | and clo: "\<And>i. i \<in> I \<Longrightarrow> closedin X (T i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 767 | and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_map(subtopology X (T i)) Y (f i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 768 | and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> topspace X \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 769 | and g: "\<And>x. x \<in> topspace X \<Longrightarrow> \<exists>j. j \<in> I \<and> x \<in> T j \<and> g x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 770 | shows "continuous_map X Y g" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 771 | using pasting_lemma_locally_finite [OF _ clo cont f g] fin by auto | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 772 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 773 | lemma pasting_lemma_exists_locally_finite: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 774 |   assumes fin: "\<And>x. x \<in> topspace X \<Longrightarrow> \<exists>V. openin X V \<and> x \<in> V \<and> finite {i \<in> I. T i \<inter> V \<noteq> {}}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 775 | and X: "topspace X \<subseteq> \<Union>(T ` I)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 776 | and clo: "\<And>i. i \<in> I \<Longrightarrow> closedin X (T i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 777 | and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_map(subtopology X (T i)) Y (f i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 778 | and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> topspace X \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 779 | and g: "\<And>x. x \<in> topspace X \<Longrightarrow> \<exists>j. j \<in> I \<and> x \<in> T j \<and> g x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 780 | obtains g where "continuous_map X Y g" "\<And>x i. \<lbrakk>i \<in> I; x \<in> topspace X \<inter> T i\<rbrakk> \<Longrightarrow> g x = f i x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 781 | proof | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 782 | show "continuous_map X Y (\<lambda>x. f(@i. i \<in> I \<and> x \<in> T i) x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 783 | apply (rule pasting_lemma_locally_finite [OF fin]) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 784 | apply (blast intro: assms)+ | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 785 | by (metis (no_types, lifting) UN_E X set_rev_mp someI_ex) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 786 | next | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 787 | fix x i | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 788 | assume "i \<in> I" and "x \<in> topspace X \<inter> T i" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 789 | show "f (SOME i. i \<in> I \<and> x \<in> T i) x = f i x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 790 | apply (rule someI2_ex) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 791 | using \<open>i \<in> I\<close> \<open>x \<in> topspace X \<inter> T i\<close> apply blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 792 | by (meson Int_iff \<open>i \<in> I\<close> \<open>x \<in> topspace X \<inter> T i\<close> f) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 793 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 794 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 795 | lemma pasting_lemma_exists_closed: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 796 | assumes fin: "finite I" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 797 | and X: "topspace X \<subseteq> \<Union>(T ` I)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 798 | and clo: "\<And>i. i \<in> I \<Longrightarrow> closedin X (T i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 799 | and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_map(subtopology X (T i)) Y (f i)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 800 | and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> topspace X \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 801 | obtains g where "continuous_map X Y g" "\<And>x i. \<lbrakk>i \<in> I; x \<in> topspace X \<inter> T i\<rbrakk> \<Longrightarrow> g x = f i x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 802 | proof | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 803 | show "continuous_map X Y (\<lambda>x. f (SOME i. i \<in> I \<and> x \<in> T i) x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 804 | apply (rule pasting_lemma_closed [OF \<open>finite I\<close> clo cont]) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 805 | apply (blast intro: f)+ | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 806 | by (metis (mono_tags, lifting) UN_iff X someI_ex subset_iff) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 807 | next | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 808 | fix x i | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 809 | assume "i \<in> I" "x \<in> topspace X \<inter> T i" | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 810 | then show "f (SOME i. i \<in> I \<and> x \<in> T i) x = f i x" | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 811 | by (metis (no_types, lifting) IntD2 IntI f someI_ex) | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 812 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 813 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 814 | lemma continuous_map_cases: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 815 |   assumes f: "continuous_map (subtopology X (X closure_of {x. P x})) Y f"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 816 |       and g: "continuous_map (subtopology X (X closure_of {x. \<not> P x})) Y g"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 817 |       and fg: "\<And>x. x \<in> X frontier_of {x. P x} \<Longrightarrow> f x = g x"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 818 | shows "continuous_map X Y (\<lambda>x. if P x then f x else g x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 819 | proof (rule pasting_lemma_closed) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 820 | let ?f = "\<lambda>b. if b then f else g" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 821 | let ?g = "\<lambda>x. if P x then f x else g x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 822 |   let ?T = "\<lambda>b. if b then X closure_of {x. P x} else X closure_of {x. ~P x}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 823 |   show "finite {True,False}" by auto
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 824 |   have eq: "topspace X - Collect P = topspace X \<inter> {x. \<not> P x}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 825 | by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 826 | show "?f i x = ?f j x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 827 |     if "i \<in> {True,False}" "j \<in> {True,False}" and x: "x \<in> topspace X \<inter> ?T i \<inter> ?T j" for i j x
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 828 | proof - | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 829 | have "f x = g x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 830 | if "i" "\<not> j" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 831 | apply (rule fg) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 832 | unfolding frontier_of_closures eq | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 833 | using x that closure_of_restrict by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 834 | moreover | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 835 | have "g x = f x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 836 |       if "x \<in> X closure_of {x. \<not> P x}" "x \<in> X closure_of Collect P" "\<not> i" "j" for x
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 837 | apply (rule fg [symmetric]) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 838 | unfolding frontier_of_closures eq | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 839 | using x that closure_of_restrict by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 840 | ultimately show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 841 | using that by (auto simp flip: closure_of_restrict) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 842 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 843 |   show "\<exists>j. j \<in> {True,False} \<and> x \<in> ?T j \<and> (if P x then f x else g x) = ?f j x"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 844 | if "x \<in> topspace X" for x | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 845 | apply simp | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 846 | apply safe | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 847 | apply (metis Int_iff closure_of inf_sup_absorb mem_Collect_eq that) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 848 | by (metis DiffI eq closure_of_subset_Int contra_subsetD mem_Collect_eq that) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 849 | qed (auto simp: f g) | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 850 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 851 | lemma continuous_map_cases_alt: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 852 |   assumes f: "continuous_map (subtopology X (X closure_of {x \<in> topspace X. P x})) Y f"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 853 |       and g: "continuous_map (subtopology X (X closure_of {x \<in> topspace X. ~P x})) Y g"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 854 |       and fg: "\<And>x. x \<in> X frontier_of {x \<in> topspace X. P x} \<Longrightarrow> f x = g x"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 855 | shows "continuous_map X Y (\<lambda>x. if P x then f x else g x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 856 | apply (rule continuous_map_cases) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 857 | using assms | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 858 | apply (simp_all add: Collect_conj_eq closure_of_restrict [symmetric] frontier_of_restrict [symmetric]) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 859 | done | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 860 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 861 | lemma continuous_map_cases_function: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 862 | assumes contp: "continuous_map X Z p" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 863 |     and contf: "continuous_map (subtopology X {x \<in> topspace X. p x \<in> Z closure_of U}) Y f"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 864 |     and contg: "continuous_map (subtopology X {x \<in> topspace X. p x \<in> Z closure_of (topspace Z - U)}) Y g"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 865 | and fg: "\<And>x. \<lbrakk>x \<in> topspace X; p x \<in> Z frontier_of U\<rbrakk> \<Longrightarrow> f x = g x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 866 | shows "continuous_map X Y (\<lambda>x. if p x \<in> U then f x else g x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 867 | proof (rule continuous_map_cases_alt) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 868 |   show "continuous_map (subtopology X (X closure_of {x \<in> topspace X. p x \<in> U})) Y f"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 869 | proof (rule continuous_map_from_subtopology_mono) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 870 |     let ?T = "{x \<in> topspace X. p x \<in> Z closure_of U}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 871 | show "continuous_map (subtopology X ?T) Y f" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 872 | by (simp add: contf) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 873 |     show "X closure_of {x \<in> topspace X. p x \<in> U} \<subseteq> ?T"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 874 | by (rule continuous_map_closure_preimage_subset [OF contp]) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 875 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 876 |   show "continuous_map (subtopology X (X closure_of {x \<in> topspace X. p x \<notin> U})) Y g"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 877 | proof (rule continuous_map_from_subtopology_mono) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 878 |     let ?T = "{x \<in> topspace X. p x \<in> Z closure_of (topspace Z - U)}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 879 | show "continuous_map (subtopology X ?T) Y g" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 880 | by (simp add: contg) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 881 |     have "X closure_of {x \<in> topspace X. p x \<notin> U} \<subseteq> X closure_of {x \<in> topspace X. p x \<in> topspace Z - U}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 882 | apply (rule closure_of_mono) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 883 | using continuous_map_closedin contp by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 884 |     then show "X closure_of {x \<in> topspace X. p x \<notin> U} \<subseteq> ?T"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 885 | by (rule order_trans [OF _ continuous_map_closure_preimage_subset [OF contp]]) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 886 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 887 | next | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 888 |   show "f x = g x" if "x \<in> X frontier_of {x \<in> topspace X. p x \<in> U}" for x
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 889 | using that continuous_map_frontier_frontier_preimage_subset [OF contp, of U] fg by blast | 
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 890 | qed | 
| 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 891 | |
| 69750 | 892 | subsection \<open>Retractions\<close> | 
| 893 | ||
| 70136 | 894 | definition\<^marker>\<open>tag important\<close> retraction :: "('a::topological_space) set \<Rightarrow> 'a set \<Rightarrow> ('a \<Rightarrow> 'a) \<Rightarrow> bool"
 | 
| 69750 | 895 | where "retraction S T r \<longleftrightarrow> | 
| 896 | T \<subseteq> S \<and> continuous_on S r \<and> r ` S \<subseteq> T \<and> (\<forall>x\<in>T. r x = x)" | |
| 897 | ||
| 70136 | 898 | definition\<^marker>\<open>tag important\<close> retract_of (infixl "retract'_of" 50) where | 
| 69750 | 899 | "T retract_of S \<longleftrightarrow> (\<exists>r. retraction S T r)" | 
| 900 | ||
| 901 | lemma retraction_idempotent: "retraction S T r \<Longrightarrow> x \<in> S \<Longrightarrow> r (r x) = r x" | |
| 902 | unfolding retraction_def by auto | |
| 903 | ||
| 904 | text \<open>Preservation of fixpoints under (more general notion of) retraction\<close> | |
| 905 | ||
| 906 | lemma invertible_fixpoint_property: | |
| 907 | fixes S :: "'a::topological_space set" | |
| 908 | and T :: "'b::topological_space set" | |
| 909 | assumes contt: "continuous_on T i" | |
| 910 | and "i ` T \<subseteq> S" | |
| 911 | and contr: "continuous_on S r" | |
| 912 | and "r ` S \<subseteq> T" | |
| 913 | and ri: "\<And>y. y \<in> T \<Longrightarrow> r (i y) = y" | |
| 914 | and FP: "\<And>f. \<lbrakk>continuous_on S f; f ` S \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>x\<in>S. f x = x" | |
| 915 | and contg: "continuous_on T g" | |
| 916 | and "g ` T \<subseteq> T" | |
| 917 | obtains y where "y \<in> T" and "g y = y" | |
| 918 | proof - | |
| 919 | have "\<exists>x\<in>S. (i \<circ> g \<circ> r) x = x" | |
| 920 | proof (rule FP) | |
| 921 | show "continuous_on S (i \<circ> g \<circ> r)" | |
| 922 | by (meson contt contr assms(4) contg assms(8) continuous_on_compose continuous_on_subset) | |
| 923 | show "(i \<circ> g \<circ> r) ` S \<subseteq> S" | |
| 924 | using assms(2,4,8) by force | |
| 925 | qed | |
| 926 | then obtain x where x: "x \<in> S" "(i \<circ> g \<circ> r) x = x" .. | |
| 927 | then have *: "g (r x) \<in> T" | |
| 928 | using assms(4,8) by auto | |
| 929 | have "r ((i \<circ> g \<circ> r) x) = r x" | |
| 930 | using x by auto | |
| 931 | then show ?thesis | |
| 932 | using "*" ri that by auto | |
| 933 | qed | |
| 934 | ||
| 935 | lemma homeomorphic_fixpoint_property: | |
| 936 | fixes S :: "'a::topological_space set" | |
| 937 | and T :: "'b::topological_space set" | |
| 938 | assumes "S homeomorphic T" | |
| 939 | shows "(\<forall>f. continuous_on S f \<and> f ` S \<subseteq> S \<longrightarrow> (\<exists>x\<in>S. f x = x)) \<longleftrightarrow> | |
| 940 | (\<forall>g. continuous_on T g \<and> g ` T \<subseteq> T \<longrightarrow> (\<exists>y\<in>T. g y = y))" | |
| 941 | (is "?lhs = ?rhs") | |
| 942 | proof - | |
| 943 | obtain r i where r: | |
| 944 | "\<forall>x\<in>S. i (r x) = x" "r ` S = T" "continuous_on S r" | |
| 945 | "\<forall>y\<in>T. r (i y) = y" "i ` T = S" "continuous_on T i" | |
| 946 | using assms unfolding homeomorphic_def homeomorphism_def by blast | |
| 947 | show ?thesis | |
| 948 | proof | |
| 949 | assume ?lhs | |
| 950 | with r show ?rhs | |
| 951 | by (metis invertible_fixpoint_property[of T i S r] order_refl) | |
| 952 | next | |
| 953 | assume ?rhs | |
| 954 | with r show ?lhs | |
| 955 | by (metis invertible_fixpoint_property[of S r T i] order_refl) | |
| 956 | qed | |
| 957 | qed | |
| 958 | ||
| 959 | lemma retract_fixpoint_property: | |
| 960 | fixes f :: "'a::topological_space \<Rightarrow> 'b::topological_space" | |
| 961 | and S :: "'a set" | |
| 962 | assumes "T retract_of S" | |
| 963 | and FP: "\<And>f. \<lbrakk>continuous_on S f; f ` S \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>x\<in>S. f x = x" | |
| 964 | and contg: "continuous_on T g" | |
| 965 | and "g ` T \<subseteq> T" | |
| 966 | obtains y where "y \<in> T" and "g y = y" | |
| 967 | proof - | |
| 968 | obtain h where "retraction S T h" | |
| 969 | using assms(1) unfolding retract_of_def .. | |
| 970 | then show ?thesis | |
| 971 | unfolding retraction_def | |
| 972 | using invertible_fixpoint_property[OF continuous_on_id _ _ _ _ FP] | |
| 973 | by (metis assms(4) contg image_ident that) | |
| 974 | qed | |
| 975 | ||
| 976 | lemma retraction: | |
| 977 | "retraction S T r \<longleftrightarrow> | |
| 978 | T \<subseteq> S \<and> continuous_on S r \<and> r ` S = T \<and> (\<forall>x \<in> T. r x = x)" | |
| 979 | by (force simp: retraction_def) | |
| 980 | ||
| 69753 | 981 | lemma retractionE: \<comment> \<open>yields properties normalized wrt. simp -- less likely to loop\<close> | 
| 69750 | 982 | assumes "retraction S T r" | 
| 983 | obtains "T = r ` S" "r ` S \<subseteq> S" "continuous_on S r" "\<And>x. x \<in> S \<Longrightarrow> r (r x) = r x" | |
| 984 | proof (rule that) | |
| 985 | from retraction [of S T r] assms | |
| 986 | have "T \<subseteq> S" "continuous_on S r" "r ` S = T" and "\<forall>x \<in> T. r x = x" | |
| 987 | by simp_all | |
| 988 | then show "T = r ` S" "r ` S \<subseteq> S" "continuous_on S r" | |
| 989 | by simp_all | |
| 990 | from \<open>\<forall>x \<in> T. r x = x\<close> have "r x = x" if "x \<in> T" for x | |
| 991 | using that by simp | |
| 992 | with \<open>r ` S = T\<close> show "r (r x) = r x" if "x \<in> S" for x | |
| 993 | using that by auto | |
| 994 | qed | |
| 995 | ||
| 69753 | 996 | lemma retract_ofE: \<comment> \<open>yields properties normalized wrt. simp -- less likely to loop\<close> | 
| 69750 | 997 | assumes "T retract_of S" | 
| 998 | obtains r where "T = r ` S" "r ` S \<subseteq> S" "continuous_on S r" "\<And>x. x \<in> S \<Longrightarrow> r (r x) = r x" | |
| 999 | proof - | |
| 1000 | from assms obtain r where "retraction S T r" | |
| 1001 | by (auto simp add: retract_of_def) | |
| 1002 | with that show thesis | |
| 1003 | by (auto elim: retractionE) | |
| 1004 | qed | |
| 1005 | ||
| 1006 | lemma retract_of_imp_extensible: | |
| 1007 | assumes "S retract_of T" and "continuous_on S f" and "f ` S \<subseteq> U" | |
| 1008 | obtains g where "continuous_on T g" "g ` T \<subseteq> U" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | |
| 1009 | proof - | |
| 1010 | from \<open>S retract_of T\<close> obtain r where "retraction T S r" | |
| 1011 | by (auto simp add: retract_of_def) | |
| 1012 | show thesis | |
| 1013 | by (rule that [of "f \<circ> r"]) | |
| 1014 | (use \<open>continuous_on S f\<close> \<open>f ` S \<subseteq> U\<close> \<open>retraction T S r\<close> in \<open>auto simp: continuous_on_compose2 retraction\<close>) | |
| 1015 | qed | |
| 1016 | ||
| 1017 | lemma idempotent_imp_retraction: | |
| 1018 | assumes "continuous_on S f" and "f ` S \<subseteq> S" and "\<And>x. x \<in> S \<Longrightarrow> f(f x) = f x" | |
| 1019 | shows "retraction S (f ` S) f" | |
| 1020 | by (simp add: assms retraction) | |
| 1021 | ||
| 1022 | lemma retraction_subset: | |
| 1023 | assumes "retraction S T r" and "T \<subseteq> s'" and "s' \<subseteq> S" | |
| 1024 | shows "retraction s' T r" | |
| 1025 | unfolding retraction_def | |
| 1026 | by (metis assms continuous_on_subset image_mono retraction) | |
| 1027 | ||
| 1028 | lemma retract_of_subset: | |
| 1029 | assumes "T retract_of S" and "T \<subseteq> s'" and "s' \<subseteq> S" | |
| 1030 | shows "T retract_of s'" | |
| 1031 | by (meson assms retract_of_def retraction_subset) | |
| 1032 | ||
| 1033 | lemma retraction_refl [simp]: "retraction S S (\<lambda>x. x)" | |
| 1034 | by (simp add: retraction) | |
| 1035 | ||
| 1036 | lemma retract_of_refl [iff]: "S retract_of S" | |
| 1037 | unfolding retract_of_def retraction_def | |
| 1038 | using continuous_on_id by blast | |
| 1039 | ||
| 1040 | lemma retract_of_imp_subset: | |
| 1041 | "S retract_of T \<Longrightarrow> S \<subseteq> T" | |
| 1042 | by (simp add: retract_of_def retraction_def) | |
| 1043 | ||
| 1044 | lemma retract_of_empty [simp]: | |
| 1045 |      "({} retract_of S) \<longleftrightarrow> S = {}"  "(S retract_of {}) \<longleftrightarrow> S = {}"
 | |
| 1046 | by (auto simp: retract_of_def retraction_def) | |
| 1047 | ||
| 1048 | lemma retract_of_singleton [iff]: "({x} retract_of S) \<longleftrightarrow> x \<in> S"
 | |
| 1049 | unfolding retract_of_def retraction_def by force | |
| 1050 | ||
| 1051 | lemma retraction_comp: | |
| 1052 | "\<lbrakk>retraction S T f; retraction T U g\<rbrakk> | |
| 1053 | \<Longrightarrow> retraction S U (g \<circ> f)" | |
| 1054 | apply (auto simp: retraction_def intro: continuous_on_compose2) | |
| 1055 | by blast | |
| 1056 | ||
| 1057 | lemma retract_of_trans [trans]: | |
| 1058 | assumes "S retract_of T" and "T retract_of U" | |
| 1059 | shows "S retract_of U" | |
| 1060 | using assms by (auto simp: retract_of_def intro: retraction_comp) | |
| 1061 | ||
| 1062 | lemma closedin_retract: | |
| 1063 | fixes S :: "'a :: t2_space set" | |
| 1064 | assumes "S retract_of T" | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1065 | shows "closedin (top_of_set T) S" | 
| 69750 | 1066 | proof - | 
| 1067 | obtain r where r: "S \<subseteq> T" "continuous_on T r" "r ` T \<subseteq> S" "\<And>x. x \<in> S \<Longrightarrow> r x = x" | |
| 1068 | using assms by (auto simp: retract_of_def retraction_def) | |
| 1069 |   have "S = {x\<in>T. x = r x}"
 | |
| 1070 | using r by auto | |
| 1071 |   also have "\<dots> = T \<inter> ((\<lambda>x. (x, r x)) -` ({y. \<exists>x. y = (x, x)}))"
 | |
| 1072 | unfolding vimage_def mem_Times_iff fst_conv snd_conv | |
| 1073 | using r | |
| 1074 | by auto | |
| 1075 | also have "closedin (top_of_set T) \<dots>" | |
| 1076 | by (rule continuous_closedin_preimage) (auto intro!: closed_diagonal continuous_on_Pair r) | |
| 1077 | finally show ?thesis . | |
| 1078 | qed | |
| 1079 | ||
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1080 | lemma closedin_self [simp]: "closedin (top_of_set S) S" | 
| 69750 | 1081 | by simp | 
| 1082 | ||
| 1083 | lemma retract_of_closed: | |
| 1084 | fixes S :: "'a :: t2_space set" | |
| 1085 | shows "\<lbrakk>closed T; S retract_of T\<rbrakk> \<Longrightarrow> closed S" | |
| 1086 | by (metis closedin_retract closedin_closed_eq) | |
| 1087 | ||
| 1088 | lemma retract_of_compact: | |
| 1089 | "\<lbrakk>compact T; S retract_of T\<rbrakk> \<Longrightarrow> compact S" | |
| 1090 | by (metis compact_continuous_image retract_of_def retraction) | |
| 1091 | ||
| 1092 | lemma retract_of_connected: | |
| 1093 | "\<lbrakk>connected T; S retract_of T\<rbrakk> \<Longrightarrow> connected S" | |
| 1094 | by (metis Topological_Spaces.connected_continuous_image retract_of_def retraction) | |
| 1095 | ||
| 70178 
4900351361b0
Lindelöf spaces and supporting material
 paulson <lp15@cam.ac.uk> parents: 
70136diff
changeset | 1096 | lemma retraction_openin_vimage_iff: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1097 | "openin (top_of_set S) (S \<inter> r -` U) \<longleftrightarrow> openin (top_of_set T) U" | 
| 69750 | 1098 | if retraction: "retraction S T r" and "U \<subseteq> T" | 
| 1099 | using retraction apply (rule retractionE) | |
| 1100 | apply (rule continuous_right_inverse_imp_quotient_map [where g=r]) | |
| 1101 | using \<open>U \<subseteq> T\<close> apply (auto elim: continuous_on_subset) | |
| 1102 | done | |
| 1103 | ||
| 1104 | lemma retract_of_Times: | |
| 1105 | "\<lbrakk>S retract_of s'; T retract_of t'\<rbrakk> \<Longrightarrow> (S \<times> T) retract_of (s' \<times> t')" | |
| 1106 | apply (simp add: retract_of_def retraction_def Sigma_mono, clarify) | |
| 1107 | apply (rename_tac f g) | |
| 1108 | apply (rule_tac x="\<lambda>z. ((f \<circ> fst) z, (g \<circ> snd) z)" in exI) | |
| 1109 | apply (rule conjI continuous_intros | erule continuous_on_subset | force)+ | |
| 1110 | done | |
| 1111 | ||
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1112 | subsection\<open>Retractions on a topological space\<close> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1113 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1114 | definition retract_of_space :: "'a set \<Rightarrow> 'a topology \<Rightarrow> bool" (infix "retract'_of'_space" 50) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1115 | where "S retract_of_space X | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1116 | \<equiv> S \<subseteq> topspace X \<and> (\<exists>r. continuous_map X (subtopology X S) r \<and> (\<forall>x \<in> S. r x = x))" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1117 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1118 | lemma retract_of_space_retraction_maps: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1119 | "S retract_of_space X \<longleftrightarrow> S \<subseteq> topspace X \<and> (\<exists>r. retraction_maps X (subtopology X S) r id)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1120 | by (auto simp: retract_of_space_def retraction_maps_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1121 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1122 | lemma retract_of_space_section_map: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1123 | "S retract_of_space X \<longleftrightarrow> S \<subseteq> topspace X \<and> section_map (subtopology X S) X id" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1124 | unfolding retract_of_space_def retraction_maps_def section_map_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1125 | by (auto simp: continuous_map_from_subtopology) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1126 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1127 | lemma retract_of_space_imp_subset: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1128 | "S retract_of_space X \<Longrightarrow> S \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1129 | by (simp add: retract_of_space_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1130 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1131 | lemma retract_of_space_topspace: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1132 | "topspace X retract_of_space X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1133 | using retract_of_space_def by force | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1134 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1135 | lemma retract_of_space_empty [simp]: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1136 |    "{} retract_of_space X \<longleftrightarrow> topspace X = {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1137 | by (auto simp: continuous_map_def retract_of_space_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1138 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1139 | lemma retract_of_space_singleton [simp]: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1140 |   "{a} retract_of_space X \<longleftrightarrow> a \<in> topspace X"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1141 | proof - | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1142 |   have "continuous_map X (subtopology X {a}) (\<lambda>x. a) \<and> (\<lambda>x. a) a = a" if "a \<in> topspace X"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1143 | using that by simp | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1144 | then show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1145 | by (force simp: retract_of_space_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1146 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1147 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1148 | lemma retract_of_space_clopen: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1149 |   assumes "openin X S" "closedin X S" "S = {} \<Longrightarrow> topspace X = {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1150 | shows "S retract_of_space X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1151 | proof (cases "S = {}")
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1152 | case False | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1153 | then obtain a where "a \<in> S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1154 | by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1155 | show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1156 | unfolding retract_of_space_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1157 | proof (intro exI conjI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1158 | show "S \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1159 | by (simp add: assms closedin_subset) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1160 | have "continuous_map X X (\<lambda>x. if x \<in> S then x else a)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1161 | proof (rule continuous_map_cases) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1162 |       show "continuous_map (subtopology X (X closure_of {x. x \<in> S})) X (\<lambda>x. x)"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1163 | by (simp add: continuous_map_from_subtopology) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1164 |       show "continuous_map (subtopology X (X closure_of {x. x \<notin> S})) X (\<lambda>x. a)"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1165 | using \<open>S \<subseteq> topspace X\<close> \<open>a \<in> S\<close> by force | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1166 |       show "x = a" if "x \<in> X frontier_of {x. x \<in> S}" for x
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1167 | using assms that clopenin_eq_frontier_of by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1168 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1169 | then show "continuous_map X (subtopology X S) (\<lambda>x. if x \<in> S then x else a)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1170 | using \<open>S \<subseteq> topspace X\<close> \<open>a \<in> S\<close> by (auto simp: continuous_map_in_subtopology) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1171 | qed auto | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1172 | qed (use assms in auto) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1173 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1174 | lemma retract_of_space_disjoint_union: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1175 |   assumes "openin X S" "openin X T" and ST: "disjnt S T" "S \<union> T = topspace X" and "S = {} \<Longrightarrow> topspace X = {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1176 | shows "S retract_of_space X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1177 | proof (rule retract_of_space_clopen) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1178 |   have "S \<inter> T = {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1179 | by (meson ST disjnt_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1180 | then have "S = topspace X - T" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1181 | using ST by auto | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1182 | then show "closedin X S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1183 | using \<open>openin X T\<close> by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1184 | qed (auto simp: assms) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1185 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1186 | lemma retraction_maps_section_image1: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1187 | assumes "retraction_maps X Y r s" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1188 | shows "s ` (topspace Y) retract_of_space X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1189 | unfolding retract_of_space_section_map | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1190 | proof | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1191 | show "s ` topspace Y \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1192 | using assms continuous_map_image_subset_topspace retraction_maps_def by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1193 | show "section_map (subtopology X (s ` topspace Y)) X id" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1194 | unfolding section_map_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1195 | using assms retraction_maps_to_retract_maps by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1196 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1197 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1198 | lemma retraction_maps_section_image2: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1199 | "retraction_maps X Y r s | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1200 | \<Longrightarrow> subtopology X (s ` (topspace Y)) homeomorphic_space Y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1201 | using embedding_map_imp_homeomorphic_space homeomorphic_space_sym section_imp_embedding_map | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1202 | section_map_def by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1203 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1204 | subsection\<open>Paths and path-connectedness\<close> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1205 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1206 | definition pathin :: "'a topology \<Rightarrow> (real \<Rightarrow> 'a) \<Rightarrow> bool" where | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1207 |    "pathin X g \<equiv> continuous_map (subtopology euclideanreal {0..1}) X g"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1208 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1209 | lemma pathin_compose: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1210 | "\<lbrakk>pathin X g; continuous_map X Y f\<rbrakk> \<Longrightarrow> pathin Y (f \<circ> g)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1211 | by (simp add: continuous_map_compose pathin_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1212 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1213 | lemma pathin_subtopology: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1214 |      "pathin (subtopology X S) g \<longleftrightarrow> pathin X g \<and> (\<forall>x \<in> {0..1}. g x \<in> S)"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1215 | by (auto simp: pathin_def continuous_map_in_subtopology) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1216 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1217 | lemma pathin_const: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1218 | "pathin X (\<lambda>x. a) \<longleftrightarrow> a \<in> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1219 | by (simp add: pathin_def) | 
| 69939 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1220 | |
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1221 | lemma path_start_in_topspace: "pathin X g \<Longrightarrow> g 0 \<in> topspace X" | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1222 | by (force simp: pathin_def continuous_map) | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1223 | |
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1224 | lemma path_finish_in_topspace: "pathin X g \<Longrightarrow> g 1 \<in> topspace X" | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1225 | by (force simp: pathin_def continuous_map) | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1226 | |
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1227 | lemma path_image_subset_topspace: "pathin X g \<Longrightarrow> g ` ({0..1}) \<subseteq> topspace X"
 | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1228 | by (force simp: pathin_def continuous_map) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1229 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1230 | definition path_connected_space :: "'a topology \<Rightarrow> bool" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1231 | where "path_connected_space X \<equiv> \<forall>x \<in> topspace X. \<forall> y \<in> topspace X. \<exists>g. pathin X g \<and> g 0 = x \<and> g 1 = y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1232 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1233 | definition path_connectedin :: "'a topology \<Rightarrow> 'a set \<Rightarrow> bool" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1234 | where "path_connectedin X S \<equiv> S \<subseteq> topspace X \<and> path_connected_space(subtopology X S)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1235 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1236 | lemma path_connectedin_absolute [simp]: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1237 | "path_connectedin (subtopology X S) S \<longleftrightarrow> path_connectedin X S" | 
| 71172 | 1238 | by (simp add: path_connectedin_def subtopology_subtopology) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1239 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1240 | lemma path_connectedin_subset_topspace: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1241 | "path_connectedin X S \<Longrightarrow> S \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1242 | by (simp add: path_connectedin_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1243 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1244 | lemma path_connectedin_subtopology: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1245 | "path_connectedin (subtopology X S) T \<longleftrightarrow> path_connectedin X T \<and> T \<subseteq> S" | 
| 71172 | 1246 | by (auto simp: path_connectedin_def subtopology_subtopology inf.absorb2) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1247 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1248 | lemma path_connectedin: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1249 | "path_connectedin X S \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1250 | S \<subseteq> topspace X \<and> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1251 |         (\<forall>x \<in> S. \<forall>y \<in> S. \<exists>g. pathin X g \<and> g ` {0..1} \<subseteq> S \<and> g 0 = x \<and> g 1 = y)"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1252 | unfolding path_connectedin_def path_connected_space_def pathin_def continuous_map_in_subtopology | 
| 71172 | 1253 | by (intro conj_cong refl ball_cong) (simp_all add: inf.absorb_iff2) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1254 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1255 | lemma path_connectedin_topspace: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1256 | "path_connectedin X (topspace X) \<longleftrightarrow> path_connected_space X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1257 | by (simp add: path_connectedin_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1258 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1259 | lemma path_connected_imp_connected_space: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1260 | assumes "path_connected_space X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1261 | shows "connected_space X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1262 | proof - | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1263 | have *: "\<exists>S. connectedin X S \<and> g 0 \<in> S \<and> g 1 \<in> S" if "pathin X g" for g | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1264 | proof (intro exI conjI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1265 |     have "continuous_map (subtopology euclideanreal {0..1}) X g"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1266 | using connectedin_absolute that by (simp add: pathin_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1267 |     then show "connectedin X (g ` {0..1})"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1268 | by (rule connectedin_continuous_map_image) auto | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1269 | qed auto | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1270 | show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1271 | using assms | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1272 | by (auto intro: * simp add: path_connected_space_def connected_space_subconnected Ball_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1273 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1274 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1275 | lemma path_connectedin_imp_connectedin: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1276 | "path_connectedin X S \<Longrightarrow> connectedin X S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1277 | by (simp add: connectedin_def path_connected_imp_connected_space path_connectedin_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1278 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1279 | lemma path_connected_space_topspace_empty: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1280 |      "topspace X = {} \<Longrightarrow> path_connected_space X"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1281 | by (simp add: path_connected_space_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1282 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1283 | lemma path_connectedin_empty [simp]: "path_connectedin X {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1284 | by (simp add: path_connectedin) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1285 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1286 | lemma path_connectedin_singleton [simp]: "path_connectedin X {a} \<longleftrightarrow> a \<in> topspace X"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1287 | proof | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1288 |   show "path_connectedin X {a} \<Longrightarrow> a \<in> topspace X"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1289 | by (simp add: path_connectedin) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1290 |   show "a \<in> topspace X \<Longrightarrow> path_connectedin X {a}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1291 | unfolding path_connectedin | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1292 | using pathin_const by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1293 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1294 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1295 | lemma path_connectedin_continuous_map_image: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1296 | assumes f: "continuous_map X Y f" and S: "path_connectedin X S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1297 | shows "path_connectedin Y (f ` S)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1298 | proof - | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1299 | have fX: "f ` (topspace X) \<subseteq> topspace Y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1300 | by (metis f continuous_map_image_subset_topspace) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1301 | show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1302 | unfolding path_connectedin | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1303 | proof (intro conjI ballI; clarify?) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1304 | fix x | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1305 | assume "x \<in> S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1306 | show "f x \<in> topspace Y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1307 | by (meson S fX \<open>x \<in> S\<close> image_subset_iff path_connectedin_subset_topspace set_mp) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1308 | next | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1309 | fix x y | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1310 | assume "x \<in> S" and "y \<in> S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1311 |     then obtain g where g: "pathin X g" "g ` {0..1} \<subseteq> S" "g 0 = x" "g 1 = y"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1312 | using S by (force simp: path_connectedin) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1313 |     show "\<exists>g. pathin Y g \<and> g ` {0..1} \<subseteq> f ` S \<and> g 0 = f x \<and> g 1 = f y"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1314 | proof (intro exI conjI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1315 | show "pathin Y (f \<circ> g)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1316 | using \<open>pathin X g\<close> f pathin_compose by auto | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1317 | qed (use g in auto) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1318 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1319 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1320 | |
| 69939 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1321 | lemma path_connectedin_discrete_topology: | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1322 |   "path_connectedin (discrete_topology U) S \<longleftrightarrow> S \<subseteq> U \<and> (\<exists>a. S \<subseteq> {a})"
 | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1323 | apply safe | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1324 | using path_connectedin_subset_topspace apply fastforce | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1325 | apply (meson connectedin_discrete_topology path_connectedin_imp_connectedin) | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1326 | using subset_singletonD by fastforce | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1327 | |
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1328 | lemma path_connected_space_discrete_topology: | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1329 |    "path_connected_space (discrete_topology U) \<longleftrightarrow> (\<exists>a. U \<subseteq> {a})"
 | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1330 | by (metis path_connectedin_discrete_topology path_connectedin_topspace path_connected_space_topspace_empty | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1331 | subset_singletonD topspace_discrete_topology) | 
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1332 | |
| 
812ce526da33
new material on topology: products, etc. Some renamings, esp continuous_on_topo -> continuous_map
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1333 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1334 | lemma homeomorphic_path_connected_space_imp: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1335 | "\<lbrakk>path_connected_space X; X homeomorphic_space Y\<rbrakk> \<Longrightarrow> path_connected_space Y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1336 | unfolding homeomorphic_space_def homeomorphic_maps_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1337 | by (metis (no_types, hide_lams) continuous_map_closedin continuous_map_image_subset_topspace imageI order_class.order.antisym path_connectedin_continuous_map_image path_connectedin_topspace subsetI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1338 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1339 | lemma homeomorphic_path_connected_space: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1340 | "X homeomorphic_space Y \<Longrightarrow> path_connected_space X \<longleftrightarrow> path_connected_space Y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1341 | by (meson homeomorphic_path_connected_space_imp homeomorphic_space_sym) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1342 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1343 | lemma homeomorphic_map_path_connectedness: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1344 | assumes "homeomorphic_map X Y f" "U \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1345 | shows "path_connectedin Y (f ` U) \<longleftrightarrow> path_connectedin X U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1346 | unfolding path_connectedin_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1347 | proof (intro conj_cong homeomorphic_path_connected_space) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1348 | show "(f ` U \<subseteq> topspace Y) = (U \<subseteq> topspace X)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1349 | using assms homeomorphic_imp_surjective_map by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1350 | next | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1351 | assume "U \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1352 | show "subtopology Y (f ` U) homeomorphic_space subtopology X U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1353 | using assms unfolding homeomorphic_eq_everything_map | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1354 | by (metis (no_types, hide_lams) assms homeomorphic_map_subtopologies homeomorphic_space homeomorphic_space_sym image_mono inf.absorb_iff2) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1355 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1356 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1357 | lemma homeomorphic_map_path_connectedness_eq: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1358 | "homeomorphic_map X Y f \<Longrightarrow> path_connectedin X U \<longleftrightarrow> U \<subseteq> topspace X \<and> path_connectedin Y (f ` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1359 | by (meson homeomorphic_map_path_connectedness path_connectedin_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1360 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1361 | subsection\<open>Connected components\<close> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1362 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1363 | definition connected_component_of :: "'a topology \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1364 | where "connected_component_of X x y \<equiv> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1365 | \<exists>T. connectedin X T \<and> x \<in> T \<and> y \<in> T" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1366 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1367 | abbreviation connected_component_of_set | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1368 | where "connected_component_of_set X x \<equiv> Collect (connected_component_of X x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1369 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1370 | definition connected_components_of :: "'a topology \<Rightarrow> ('a set) set"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1371 | where "connected_components_of X \<equiv> connected_component_of_set X ` topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1372 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1373 | lemma connected_component_in_topspace: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1374 | "connected_component_of X x y \<Longrightarrow> x \<in> topspace X \<and> y \<in> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1375 | by (meson connected_component_of_def connectedin_subset_topspace in_mono) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1376 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1377 | lemma connected_component_of_refl: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1378 | "connected_component_of X x x \<longleftrightarrow> x \<in> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1379 | by (meson connected_component_in_topspace connected_component_of_def connectedin_sing insertI1) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1380 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1381 | lemma connected_component_of_sym: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1382 | "connected_component_of X x y \<longleftrightarrow> connected_component_of X y x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1383 | by (meson connected_component_of_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1384 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1385 | lemma connected_component_of_trans: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1386 | "\<lbrakk>connected_component_of X x y; connected_component_of X y z\<rbrakk> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1387 | \<Longrightarrow> connected_component_of X x z" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1388 | unfolding connected_component_of_def | 
| 71842 
db120661dded
new HOL simproc: eliminate_false_implies
 Manuel Eberl <eberlm@in.tum.de> parents: 
71174diff
changeset | 1389 | using connectedin_Un by blast | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1390 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1391 | lemma connected_component_of_mono: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1392 | "\<lbrakk>connected_component_of (subtopology X S) x y; S \<subseteq> T\<rbrakk> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1393 | \<Longrightarrow> connected_component_of (subtopology X T) x y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1394 | by (metis connected_component_of_def connectedin_subtopology inf.absorb_iff2 subtopology_subtopology) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1395 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1396 | lemma connected_component_of_set: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1397 |    "connected_component_of_set X x = {y. \<exists>T. connectedin X T \<and> x \<in> T \<and> y \<in> T}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1398 | by (meson connected_component_of_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1399 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1400 | lemma connected_component_of_subset_topspace: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1401 | "connected_component_of_set X x \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1402 | using connected_component_in_topspace by force | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1403 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1404 | lemma connected_component_of_eq_empty: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1405 |    "connected_component_of_set X x = {} \<longleftrightarrow> (x \<notin> topspace X)"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1406 | using connected_component_in_topspace connected_component_of_refl by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1407 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1408 | lemma connected_space_iff_connected_component: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1409 | "connected_space X \<longleftrightarrow> (\<forall>x \<in> topspace X. \<forall>y \<in> topspace X. connected_component_of X x y)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1410 | by (simp add: connected_component_of_def connected_space_subconnected) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1411 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1412 | lemma connected_space_imp_connected_component_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1413 | "\<lbrakk>connected_space X; a \<in> topspace X; b \<in> topspace X\<rbrakk> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1414 | \<Longrightarrow> connected_component_of X a b" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1415 | by (simp add: connected_space_iff_connected_component) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1416 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1417 | lemma connected_space_connected_component_set: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1418 | "connected_space X \<longleftrightarrow> (\<forall>x \<in> topspace X. connected_component_of_set X x = topspace X)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1419 | using connected_component_of_subset_topspace connected_space_iff_connected_component by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1420 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1421 | lemma connected_component_of_maximal: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1422 | "\<lbrakk>connectedin X S; x \<in> S\<rbrakk> \<Longrightarrow> S \<subseteq> connected_component_of_set X x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1423 | by (meson Ball_Collect connected_component_of_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1424 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1425 | lemma connected_component_of_equiv: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1426 | "connected_component_of X x y \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1427 | x \<in> topspace X \<and> y \<in> topspace X \<and> connected_component_of X x = connected_component_of X y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1428 | apply (simp add: connected_component_in_topspace fun_eq_iff) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1429 | by (meson connected_component_of_refl connected_component_of_sym connected_component_of_trans) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1430 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1431 | lemma connected_component_of_disjoint: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1432 | "disjnt (connected_component_of_set X x) (connected_component_of_set X y) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1433 | \<longleftrightarrow> ~(connected_component_of X x y)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1434 | using connected_component_of_equiv unfolding disjnt_iff by force | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1435 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1436 | lemma connected_component_of_eq: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1437 | "connected_component_of X x = connected_component_of X y \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1438 | (x \<notin> topspace X) \<and> (y \<notin> topspace X) \<or> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1439 | x \<in> topspace X \<and> y \<in> topspace X \<and> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1440 | connected_component_of X x y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1441 | by (metis Collect_empty_eq_bot connected_component_of_eq_empty connected_component_of_equiv) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1442 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1443 | lemma connectedin_connected_component_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1444 | "connectedin X (connected_component_of_set X x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1445 | proof - | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1446 |   have "connected_component_of_set X x = \<Union> {T. connectedin X T \<and> x \<in> T}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1447 | by (auto simp: connected_component_of_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1448 | then show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1449 | apply (rule ssubst) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1450 | by (blast intro: connectedin_Union) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1451 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1452 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1453 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1454 | lemma Union_connected_components_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1455 | "\<Union>(connected_components_of X) = topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1456 | unfolding connected_components_of_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1457 | apply (rule equalityI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1458 | apply (simp add: SUP_least connected_component_of_subset_topspace) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1459 | using connected_component_of_refl by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1460 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1461 | lemma connected_components_of_maximal: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1462 | "\<lbrakk>C \<in> connected_components_of X; connectedin X S; ~disjnt C S\<rbrakk> \<Longrightarrow> S \<subseteq> C" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1463 | unfolding connected_components_of_def disjnt_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1464 | apply clarify | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1465 | by (metis Int_emptyI connected_component_of_def connected_component_of_trans mem_Collect_eq) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1466 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1467 | lemma pairwise_disjoint_connected_components_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1468 | "pairwise disjnt (connected_components_of X)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1469 | unfolding connected_components_of_def pairwise_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1470 | apply clarify | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1471 | by (metis connected_component_of_disjoint connected_component_of_equiv) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1472 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1473 | lemma complement_connected_components_of_Union: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1474 | "C \<in> connected_components_of X | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1475 |       \<Longrightarrow> topspace X - C = \<Union> (connected_components_of X - {C})"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1476 | apply (rule equalityI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1477 | using Union_connected_components_of apply fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1478 | by (metis Diff_cancel Diff_subset Union_connected_components_of cSup_singleton diff_Union_pairwise_disjoint equalityE insert_subsetI pairwise_disjoint_connected_components_of) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1479 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1480 | lemma nonempty_connected_components_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1481 |    "C \<in> connected_components_of X \<Longrightarrow> C \<noteq> {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1482 | unfolding connected_components_of_def | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1483 | by (metis (no_types, lifting) connected_component_of_eq_empty imageE) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1484 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1485 | lemma connected_components_of_subset: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1486 | "C \<in> connected_components_of X \<Longrightarrow> C \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1487 | using Union_connected_components_of by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1488 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1489 | lemma connectedin_connected_components_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1490 | assumes "C \<in> connected_components_of X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1491 | shows "connectedin X C" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1492 | proof - | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1493 | have "C \<in> connected_component_of_set X ` topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1494 | using assms connected_components_of_def by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1495 | then show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1496 | using connectedin_connected_component_of by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1497 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1498 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1499 | lemma connected_component_in_connected_components_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1500 | "connected_component_of_set X a \<in> connected_components_of X \<longleftrightarrow> a \<in> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1501 | apply (rule iffI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1502 | using connected_component_of_eq_empty nonempty_connected_components_of apply fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1503 | by (simp add: connected_components_of_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1504 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1505 | lemma connected_space_iff_components_eq: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1506 | "connected_space X \<longleftrightarrow> (\<forall>C \<in> connected_components_of X. \<forall>C' \<in> connected_components_of X. C = C')" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1507 | apply (rule iffI) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1508 | apply (force simp: connected_components_of_def connected_space_connected_component_set image_iff) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1509 | by (metis connected_component_in_connected_components_of connected_component_of_refl connected_space_iff_connected_component mem_Collect_eq) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1510 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1511 | lemma connected_components_of_eq_empty: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1512 |    "connected_components_of X = {} \<longleftrightarrow> topspace X = {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1513 | by (simp add: connected_components_of_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1514 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1515 | lemma connected_components_of_empty_space: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1516 |    "topspace X = {} \<Longrightarrow> connected_components_of X = {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1517 | by (simp add: connected_components_of_eq_empty) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1518 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1519 | lemma connected_components_of_subset_sing: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1520 |    "connected_components_of X \<subseteq> {S} \<longleftrightarrow> connected_space X \<and> (topspace X = {} \<or> topspace X = S)"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1521 | proof (cases "topspace X = {}")
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1522 | case True | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1523 | then show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1524 | by (simp add: connected_components_of_empty_space connected_space_topspace_empty) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1525 | next | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1526 | case False | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1527 | then show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1528 | by (metis (no_types, hide_lams) Union_connected_components_of ccpo_Sup_singleton | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1529 | connected_components_of_eq_empty connected_space_iff_components_eq insertI1 singletonD | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1530 | subsetI subset_singleton_iff) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1531 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1532 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1533 | lemma connected_space_iff_components_subset_singleton: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1534 |    "connected_space X \<longleftrightarrow> (\<exists>a. connected_components_of X \<subseteq> {a})"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1535 | by (simp add: connected_components_of_subset_sing) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1536 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1537 | lemma connected_components_of_eq_singleton: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1538 |    "connected_components_of X = {S}
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1539 | \<longleftrightarrow> connected_space X \<and> topspace X \<noteq> {} \<and> S = topspace X"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1540 | by (metis ccpo_Sup_singleton connected_components_of_subset_sing insert_not_empty subset_singleton_iff) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1541 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1542 | lemma connected_components_of_connected_space: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1543 |    "connected_space X \<Longrightarrow> connected_components_of X = (if topspace X = {} then {} else {topspace X})"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1544 | by (simp add: connected_components_of_eq_empty connected_components_of_eq_singleton) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1545 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1546 | lemma exists_connected_component_of_superset: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1547 |   assumes "connectedin X S" and ne: "topspace X \<noteq> {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1548 | shows "\<exists>C. C \<in> connected_components_of X \<and> S \<subseteq> C" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1549 | proof (cases "S = {}")
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1550 | case True | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1551 | then show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1552 | using ne connected_components_of_def by blast | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1553 | next | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1554 | case False | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1555 | then show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1556 | by (meson all_not_in_conv assms(1) connected_component_in_connected_components_of connected_component_of_maximal connectedin_subset_topspace in_mono) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1557 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1558 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1559 | lemma closedin_connected_components_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1560 | assumes "C \<in> connected_components_of X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1561 | shows "closedin X C" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1562 | proof - | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1563 | obtain x where "x \<in> topspace X" and x: "C = connected_component_of_set X x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1564 | using assms by (auto simp: connected_components_of_def) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1565 | have "connected_component_of_set X x \<subseteq> topspace X" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1566 | by (simp add: connected_component_of_subset_topspace) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1567 | moreover have "X closure_of connected_component_of_set X x \<subseteq> connected_component_of_set X x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1568 | proof (rule connected_component_of_maximal) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1569 | show "connectedin X (X closure_of connected_component_of_set X x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1570 | by (simp add: connectedin_closure_of connectedin_connected_component_of) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1571 | show "x \<in> X closure_of connected_component_of_set X x" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1572 | by (simp add: \<open>x \<in> topspace X\<close> closure_of connected_component_of_refl) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1573 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1574 | ultimately | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1575 | show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1576 | using closure_of_subset_eq x by auto | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1577 | qed | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1578 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1579 | lemma closedin_connected_component_of: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1580 | "closedin X (connected_component_of_set X x)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1581 | by (metis closedin_connected_components_of closedin_empty connected_component_in_connected_components_of connected_component_of_eq_empty) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1582 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1583 | lemma connected_component_of_eq_overlap: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1584 | "connected_component_of_set X x = connected_component_of_set X y \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1585 | (x \<notin> topspace X) \<and> (y \<notin> topspace X) \<or> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1586 |       ~(connected_component_of_set X x \<inter> connected_component_of_set X y = {})"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1587 | using connected_component_of_equiv by fastforce | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1588 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1589 | lemma connected_component_of_nonoverlap: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1590 |    "connected_component_of_set X x \<inter> connected_component_of_set X y = {} \<longleftrightarrow>
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1591 | (x \<notin> topspace X) \<or> (y \<notin> topspace X) \<or> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1592 | ~(connected_component_of_set X x = connected_component_of_set X y)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1593 | by (metis connected_component_of_eq_empty connected_component_of_eq_overlap inf.idem) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1594 | |
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1595 | lemma connected_component_of_overlap: | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1596 |    "~(connected_component_of_set X x \<inter> connected_component_of_set X y = {}) \<longleftrightarrow>
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1597 | x \<in> topspace X \<and> y \<in> topspace X \<and> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1598 | connected_component_of_set X x = connected_component_of_set X y" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1599 | by (meson connected_component_of_nonoverlap) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69753diff
changeset | 1600 | |
| 69616 
d18dc9c5c456
split off theory combining Elementary_Topology and Abstract_Topology
 immler parents: diff
changeset | 1601 | end |