19 Path_Connected |
19 Path_Connected |
20 Homeomorphism |
20 Homeomorphism |
21 Continuous_Extension |
21 Continuous_Extension |
22 begin |
22 begin |
23 |
23 |
24 (* FIXME mv topology euclidean space *) |
|
25 subsection \<open>Retractions\<close> |
24 subsection \<open>Retractions\<close> |
26 |
|
27 definition%important retraction :: "('a::topological_space) set \<Rightarrow> 'a set \<Rightarrow> ('a \<Rightarrow> 'a) \<Rightarrow> bool" |
|
28 where "retraction S T r \<longleftrightarrow> |
|
29 T \<subseteq> S \<and> continuous_on S r \<and> r ` S \<subseteq> T \<and> (\<forall>x\<in>T. r x = x)" |
|
30 |
|
31 definition%important retract_of (infixl "retract'_of" 50) where |
|
32 "T retract_of S \<longleftrightarrow> (\<exists>r. retraction S T r)" |
|
33 |
|
34 lemma retraction_idempotent: "retraction S T r \<Longrightarrow> x \<in> S \<Longrightarrow> r (r x) = r x" |
|
35 unfolding retraction_def by auto |
|
36 |
|
37 text \<open>Preservation of fixpoints under (more general notion of) retraction\<close> |
|
38 |
|
39 lemma invertible_fixpoint_property: |
|
40 fixes S :: "'a::euclidean_space set" |
|
41 and T :: "'b::euclidean_space set" |
|
42 assumes contt: "continuous_on T i" |
|
43 and "i ` T \<subseteq> S" |
|
44 and contr: "continuous_on S r" |
|
45 and "r ` S \<subseteq> T" |
|
46 and ri: "\<And>y. y \<in> T \<Longrightarrow> r (i y) = y" |
|
47 and FP: "\<And>f. \<lbrakk>continuous_on S f; f ` S \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>x\<in>S. f x = x" |
|
48 and contg: "continuous_on T g" |
|
49 and "g ` T \<subseteq> T" |
|
50 obtains y where "y \<in> T" and "g y = y" |
|
51 proof - |
|
52 have "\<exists>x\<in>S. (i \<circ> g \<circ> r) x = x" |
|
53 proof (rule FP) |
|
54 show "continuous_on S (i \<circ> g \<circ> r)" |
|
55 by (meson contt contr assms(4) contg assms(8) continuous_on_compose continuous_on_subset) |
|
56 show "(i \<circ> g \<circ> r) ` S \<subseteq> S" |
|
57 using assms(2,4,8) by force |
|
58 qed |
|
59 then obtain x where x: "x \<in> S" "(i \<circ> g \<circ> r) x = x" .. |
|
60 then have *: "g (r x) \<in> T" |
|
61 using assms(4,8) by auto |
|
62 have "r ((i \<circ> g \<circ> r) x) = r x" |
|
63 using x by auto |
|
64 then show ?thesis |
|
65 using "*" ri that by auto |
|
66 qed |
|
67 |
|
68 lemma homeomorphic_fixpoint_property: |
|
69 fixes S :: "'a::euclidean_space set" |
|
70 and T :: "'b::euclidean_space set" |
|
71 assumes "S homeomorphic T" |
|
72 shows "(\<forall>f. continuous_on S f \<and> f ` S \<subseteq> S \<longrightarrow> (\<exists>x\<in>S. f x = x)) \<longleftrightarrow> |
|
73 (\<forall>g. continuous_on T g \<and> g ` T \<subseteq> T \<longrightarrow> (\<exists>y\<in>T. g y = y))" |
|
74 (is "?lhs = ?rhs") |
|
75 proof - |
|
76 obtain r i where r: |
|
77 "\<forall>x\<in>S. i (r x) = x" "r ` S = T" "continuous_on S r" |
|
78 "\<forall>y\<in>T. r (i y) = y" "i ` T = S" "continuous_on T i" |
|
79 using assms unfolding homeomorphic_def homeomorphism_def by blast |
|
80 show ?thesis |
|
81 proof |
|
82 assume ?lhs |
|
83 with r show ?rhs |
|
84 by (metis invertible_fixpoint_property[of T i S r] order_refl) |
|
85 next |
|
86 assume ?rhs |
|
87 with r show ?lhs |
|
88 by (metis invertible_fixpoint_property[of S r T i] order_refl) |
|
89 qed |
|
90 qed |
|
91 |
|
92 lemma retract_fixpoint_property: |
|
93 fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
94 and S :: "'a set" |
|
95 assumes "T retract_of S" |
|
96 and FP: "\<And>f. \<lbrakk>continuous_on S f; f ` S \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>x\<in>S. f x = x" |
|
97 and contg: "continuous_on T g" |
|
98 and "g ` T \<subseteq> T" |
|
99 obtains y where "y \<in> T" and "g y = y" |
|
100 proof - |
|
101 obtain h where "retraction S T h" |
|
102 using assms(1) unfolding retract_of_def .. |
|
103 then show ?thesis |
|
104 unfolding retraction_def |
|
105 using invertible_fixpoint_property[OF continuous_on_id _ _ _ _ FP] |
|
106 by (metis assms(4) contg image_ident that) |
|
107 qed |
|
108 |
|
109 lemma retraction: |
|
110 "retraction S T r \<longleftrightarrow> |
|
111 T \<subseteq> S \<and> continuous_on S r \<and> r ` S = T \<and> (\<forall>x \<in> T. r x = x)" |
|
112 by (force simp: retraction_def) |
|
113 |
|
114 lemma retractionE: \<comment> \<open>yields properties normalized wrt. simp – less likely to loop\<close> |
|
115 assumes "retraction S T r" |
|
116 obtains "T = r ` S" "r ` S \<subseteq> S" "continuous_on S r" "\<And>x. x \<in> S \<Longrightarrow> r (r x) = r x" |
|
117 proof (rule that) |
|
118 from retraction [of S T r] assms |
|
119 have "T \<subseteq> S" "continuous_on S r" "r ` S = T" and "\<forall>x \<in> T. r x = x" |
|
120 by simp_all |
|
121 then show "T = r ` S" "r ` S \<subseteq> S" "continuous_on S r" |
|
122 by simp_all |
|
123 from \<open>\<forall>x \<in> T. r x = x\<close> have "r x = x" if "x \<in> T" for x |
|
124 using that by simp |
|
125 with \<open>r ` S = T\<close> show "r (r x) = r x" if "x \<in> S" for x |
|
126 using that by auto |
|
127 qed |
|
128 |
|
129 lemma retract_ofE: \<comment> \<open>yields properties normalized wrt. simp – less likely to loop\<close> |
|
130 assumes "T retract_of S" |
|
131 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" |
|
132 proof - |
|
133 from assms obtain r where "retraction S T r" |
|
134 by (auto simp add: retract_of_def) |
|
135 with that show thesis |
|
136 by (auto elim: retractionE) |
|
137 qed |
|
138 |
|
139 lemma retract_of_imp_extensible: |
|
140 assumes "S retract_of T" and "continuous_on S f" and "f ` S \<subseteq> U" |
|
141 obtains g where "continuous_on T g" "g ` T \<subseteq> U" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" |
|
142 proof - |
|
143 from \<open>S retract_of T\<close> obtain r where "retraction T S r" |
|
144 by (auto simp add: retract_of_def) |
|
145 show thesis |
|
146 by (rule that [of "f \<circ> r"]) |
|
147 (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>) |
|
148 qed |
|
149 |
|
150 lemma idempotent_imp_retraction: |
|
151 assumes "continuous_on S f" and "f ` S \<subseteq> S" and "\<And>x. x \<in> S \<Longrightarrow> f(f x) = f x" |
|
152 shows "retraction S (f ` S) f" |
|
153 by (simp add: assms retraction) |
|
154 |
|
155 lemma retraction_subset: |
|
156 assumes "retraction S T r" and "T \<subseteq> s'" and "s' \<subseteq> S" |
|
157 shows "retraction s' T r" |
|
158 unfolding retraction_def |
|
159 by (metis assms continuous_on_subset image_mono retraction) |
|
160 |
|
161 lemma retract_of_subset: |
|
162 assumes "T retract_of S" and "T \<subseteq> s'" and "s' \<subseteq> S" |
|
163 shows "T retract_of s'" |
|
164 by (meson assms retract_of_def retraction_subset) |
|
165 |
|
166 lemma retraction_refl [simp]: "retraction S S (\<lambda>x. x)" |
|
167 by (simp add: continuous_on_id retraction) |
|
168 |
|
169 lemma retract_of_refl [iff]: "S retract_of S" |
|
170 unfolding retract_of_def retraction_def |
|
171 using continuous_on_id by blast |
|
172 |
|
173 lemma retract_of_imp_subset: |
|
174 "S retract_of T \<Longrightarrow> S \<subseteq> T" |
|
175 by (simp add: retract_of_def retraction_def) |
|
176 |
|
177 lemma retract_of_empty [simp]: |
|
178 "({} retract_of S) \<longleftrightarrow> S = {}" "(S retract_of {}) \<longleftrightarrow> S = {}" |
|
179 by (auto simp: retract_of_def retraction_def) |
|
180 |
|
181 lemma retract_of_singleton [iff]: "({x} retract_of S) \<longleftrightarrow> x \<in> S" |
|
182 unfolding retract_of_def retraction_def by force |
|
183 |
|
184 lemma retraction_comp: |
|
185 "\<lbrakk>retraction S T f; retraction T U g\<rbrakk> |
|
186 \<Longrightarrow> retraction S U (g \<circ> f)" |
|
187 apply (auto simp: retraction_def intro: continuous_on_compose2) |
|
188 by blast |
|
189 |
|
190 lemma retract_of_trans [trans]: |
|
191 assumes "S retract_of T" and "T retract_of U" |
|
192 shows "S retract_of U" |
|
193 using assms by (auto simp: retract_of_def intro: retraction_comp) |
|
194 |
|
195 lemma closedin_retract: |
|
196 fixes S :: "'a :: real_normed_vector set" |
|
197 assumes "S retract_of T" |
|
198 shows "closedin (subtopology euclidean T) S" |
|
199 proof - |
|
200 obtain r where "S \<subseteq> T" "continuous_on T r" "r ` T \<subseteq> S" "\<And>x. x \<in> S \<Longrightarrow> r x = x" |
|
201 using assms by (auto simp: retract_of_def retraction_def) |
|
202 then have S: "S = {x \<in> T. (norm(r x - x)) = 0}" by auto |
|
203 show ?thesis |
|
204 apply (subst S) |
|
205 apply (rule continuous_closedin_preimage_constant) |
|
206 by (simp add: \<open>continuous_on T r\<close> continuous_on_diff continuous_on_id continuous_on_norm) |
|
207 qed |
|
208 |
|
209 lemma closedin_self [simp]: |
|
210 fixes S :: "'a :: real_normed_vector set" |
|
211 shows "closedin (subtopology euclidean S) S" |
|
212 by (simp add: closedin_retract) |
|
213 |
25 |
214 lemma retract_of_contractible: |
26 lemma retract_of_contractible: |
215 assumes "contractible T" "S retract_of T" |
27 assumes "contractible T" "S retract_of T" |
216 shows "contractible S" |
28 shows "contractible S" |
217 using assms |
29 using assms |
220 apply (rule_tac x="r \<circ> h" in exI) |
32 apply (rule_tac x="r \<circ> h" in exI) |
221 apply (intro conjI continuous_intros continuous_on_compose) |
33 apply (intro conjI continuous_intros continuous_on_compose) |
222 apply (erule continuous_on_subset | force)+ |
34 apply (erule continuous_on_subset | force)+ |
223 done |
35 done |
224 |
36 |
225 lemma retract_of_compact: |
|
226 "\<lbrakk>compact T; S retract_of T\<rbrakk> \<Longrightarrow> compact S" |
|
227 by (metis compact_continuous_image retract_of_def retraction) |
|
228 |
|
229 lemma retract_of_closed: |
|
230 fixes S :: "'a :: real_normed_vector set" |
|
231 shows "\<lbrakk>closed T; S retract_of T\<rbrakk> \<Longrightarrow> closed S" |
|
232 by (metis closedin_retract closedin_closed_eq) |
|
233 |
|
234 lemma retract_of_connected: |
|
235 "\<lbrakk>connected T; S retract_of T\<rbrakk> \<Longrightarrow> connected S" |
|
236 by (metis Topological_Spaces.connected_continuous_image retract_of_def retraction) |
|
237 |
|
238 lemma retract_of_path_connected: |
37 lemma retract_of_path_connected: |
239 "\<lbrakk>path_connected T; S retract_of T\<rbrakk> \<Longrightarrow> path_connected S" |
38 "\<lbrakk>path_connected T; S retract_of T\<rbrakk> \<Longrightarrow> path_connected S" |
240 by (metis path_connected_continuous_image retract_of_def retraction) |
39 by (metis path_connected_continuous_image retract_of_def retraction) |
241 |
40 |
242 lemma retract_of_simply_connected: |
41 lemma retract_of_simply_connected: |
243 "\<lbrakk>simply_connected T; S retract_of T\<rbrakk> \<Longrightarrow> simply_connected S" |
42 "\<lbrakk>simply_connected T; S retract_of T\<rbrakk> \<Longrightarrow> simply_connected S" |
244 apply (simp add: retract_of_def retraction_def, clarify) |
43 apply (simp add: retract_of_def retraction_def, clarify) |
245 apply (rule simply_connected_retraction_gen) |
44 apply (rule simply_connected_retraction_gen) |
246 apply (force simp: continuous_on_id elim!: continuous_on_subset)+ |
45 apply (force elim!: continuous_on_subset)+ |
247 done |
46 done |
248 |
47 |
249 lemma retract_of_homotopically_trivial: |
48 lemma retract_of_homotopically_trivial: |
250 assumes ts: "T retract_of S" |
49 assumes ts: "T retract_of S" |
251 and hom: "\<And>f g. \<lbrakk>continuous_on U f; f ` U \<subseteq> S; |
50 and hom: "\<And>f g. \<lbrakk>continuous_on U f; f ` U \<subseteq> S; |
296 lemma retract_of_locally_compact: |
95 lemma retract_of_locally_compact: |
297 fixes S :: "'a :: {heine_borel,real_normed_vector} set" |
96 fixes S :: "'a :: {heine_borel,real_normed_vector} set" |
298 shows "\<lbrakk> locally compact S; T retract_of S\<rbrakk> \<Longrightarrow> locally compact T" |
97 shows "\<lbrakk> locally compact S; T retract_of S\<rbrakk> \<Longrightarrow> locally compact T" |
299 by (metis locally_compact_closedin closedin_retract) |
98 by (metis locally_compact_closedin closedin_retract) |
300 |
99 |
301 lemma retract_of_Times: |
|
302 "\<lbrakk>S retract_of s'; T retract_of t'\<rbrakk> \<Longrightarrow> (S \<times> T) retract_of (s' \<times> t')" |
|
303 apply (simp add: retract_of_def retraction_def Sigma_mono, clarify) |
|
304 apply (rename_tac f g) |
|
305 apply (rule_tac x="\<lambda>z. ((f \<circ> fst) z, (g \<circ> snd) z)" in exI) |
|
306 apply (rule conjI continuous_intros | erule continuous_on_subset | force)+ |
|
307 done |
|
308 |
|
309 lemma homotopic_into_retract: |
100 lemma homotopic_into_retract: |
310 "\<lbrakk>f ` S \<subseteq> T; g ` S \<subseteq> T; T retract_of U; homotopic_with (\<lambda>x. True) S U f g\<rbrakk> |
101 "\<lbrakk>f ` S \<subseteq> T; g ` S \<subseteq> T; T retract_of U; homotopic_with (\<lambda>x. True) S U f g\<rbrakk> |
311 \<Longrightarrow> homotopic_with (\<lambda>x. True) S T f g" |
102 \<Longrightarrow> homotopic_with (\<lambda>x. True) S T f g" |
312 apply (subst (asm) homotopic_with_def) |
103 apply (subst (asm) homotopic_with_def) |
313 apply (simp add: homotopic_with retract_of_def retraction_def, clarify) |
104 apply (simp add: homotopic_with retract_of_def retraction_def, clarify) |
1786 using insert by auto |
1577 using insert by auto |
1787 with * show "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. a \<le> x" "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. x \<le> a" |
1578 with * show "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. a \<le> x" "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. x \<le> a" |
1788 using *[rule_format, of b u] *[rule_format, of b l] by (metis insert_iff order.trans)+ |
1579 using *[rule_format, of b u] *[rule_format, of b l] by (metis insert_iff order.trans)+ |
1789 qed auto |
1580 qed auto |
1790 |
1581 |
1791 (* FIXME mv *) |
|
1792 lemma brouwer_compactness_lemma: |
|
1793 fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
|
1794 assumes "compact s" |
|
1795 and "continuous_on s f" |
|
1796 and "\<not> (\<exists>x\<in>s. f x = 0)" |
|
1797 obtains d where "0 < d" and "\<forall>x\<in>s. d \<le> norm (f x)" |
|
1798 proof (cases "s = {}") |
|
1799 case True |
|
1800 show thesis |
|
1801 by (rule that [of 1]) (auto simp: True) |
|
1802 next |
|
1803 case False |
|
1804 have "continuous_on s (norm \<circ> f)" |
|
1805 by (rule continuous_intros continuous_on_norm assms(2))+ |
|
1806 with False obtain x where x: "x \<in> s" "\<forall>y\<in>s. (norm \<circ> f) x \<le> (norm \<circ> f) y" |
|
1807 using continuous_attains_inf[OF assms(1), of "norm \<circ> f"] |
|
1808 unfolding o_def |
|
1809 by auto |
|
1810 have "(norm \<circ> f) x > 0" |
|
1811 using assms(3) and x(1) |
|
1812 by auto |
|
1813 then show ?thesis |
|
1814 by (rule that) (insert x(2), auto simp: o_def) |
|
1815 qed |
|
1816 |
|
1817 lemma kuhn_labelling_lemma: |
1582 lemma kuhn_labelling_lemma: |
1818 fixes P Q :: "'a::euclidean_space \<Rightarrow> bool" |
1583 fixes P Q :: "'a::euclidean_space \<Rightarrow> bool" |
1819 assumes "\<forall>x. P x \<longrightarrow> P (f x)" |
1584 assumes "\<forall>x. P x \<longrightarrow> P (f x)" |
1820 and "\<forall>x. P x \<longrightarrow> (\<forall>i\<in>Basis. Q i \<longrightarrow> 0 \<le> x\<bullet>i \<and> x\<bullet>i \<le> 1)" |
1585 and "\<forall>x. P x \<longrightarrow> (\<forall>i\<in>Basis. Q i \<longrightarrow> 0 \<le> x\<bullet>i \<and> x\<bullet>i \<le> 1)" |
1821 shows "\<exists>l. (\<forall>x.\<forall>i\<in>Basis. l x i \<le> (1::nat)) \<and> |
1586 shows "\<exists>l. (\<forall>x.\<forall>i\<in>Basis. l x i \<le> (1::nat)) \<and> |