# HG changeset patch # User paulson # Date 1553619715 0 # Node ID e7648f104d6bc6feda259ae0b165fd15b59a130f # Parent 8e916ed23d17fcdeb6f002eb5ee2b851e7b4e56f# Parent f2d327275065081bd4038080c17ae921de3066fd merged diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Abstract_Topology.thy --- a/src/HOL/Analysis/Abstract_Topology.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Abstract_Topology.thy Tue Mar 26 17:01:55 2019 +0000 @@ -1609,6 +1609,8 @@ qed qed (auto simp: continuous_map_on_empty) +declare continuous_map_const [THEN iffD2, continuous_intros] + lemma continuous_map_compose: assumes f: "continuous_map X X' f" and g: "continuous_map X' X'' g" shows "continuous_map X X'' (g \ f)" @@ -3773,6 +3775,13 @@ shows "closedin (top_of_set S) (S \ f -` T)" using assms continuous_on_closed by blast +lemma continuous_map_subtopology_eu [simp]: + "continuous_map (subtopology euclidean S) (subtopology euclidean T) h \ continuous_on S h \ h ` S \ T" + apply safe + apply (metis continuous_map_closedin_preimage_eq continuous_map_in_subtopology continuous_on_closed order_refl topspace_euclidean_subtopology) + apply (simp add: continuous_map_closedin_preimage_eq image_subset_iff) + by (metis (no_types, hide_lams) continuous_map_closedin_preimage_eq continuous_map_in_subtopology continuous_on_closed order_refl topspace_euclidean_subtopology) + subsection%unimportant \Half-global and completely global cases\ lemma continuous_openin_preimage_gen: diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Brouwer_Fixpoint.thy --- a/src/HOL/Analysis/Brouwer_Fixpoint.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Brouwer_Fixpoint.thy Tue Mar 26 17:01:55 2019 +0000 @@ -49,10 +49,10 @@ assumes ts: "T retract_of S" and hom: "\f g. \continuous_on U f; f ` U \ S; continuous_on U g; g ` U \ S\ - \ homotopic_with (\x. True) U S f g" + \ homotopic_with_canon (\x. True) U S f g" and "continuous_on U f" "f ` U \ T" and "continuous_on U g" "g ` U \ T" - shows "homotopic_with (\x. True) U T f g" + shows "homotopic_with_canon (\x. True) U T f g" proof - obtain r where "r ` S \ S" "continuous_on S r" "\x\S. r (r x) = r x" "T = r ` S" using ts by (auto simp: retract_of_def retraction) @@ -69,9 +69,9 @@ lemma retract_of_homotopically_trivial_null: assumes ts: "T retract_of S" and hom: "\f. \continuous_on U f; f ` U \ S\ - \ \c. homotopic_with (\x. True) U S f (\x. c)" + \ \c. homotopic_with_canon (\x. True) U S f (\x. c)" and "continuous_on U f" "f ` U \ T" - obtains c where "homotopic_with (\x. True) U T f (\x. c)" + obtains c where "homotopic_with_canon (\x. True) U T f (\x. c)" proof - obtain r where "r ` S \ S" "continuous_on S r" "\x\S. r (r x) = r x" "T = r ` S" using ts by (auto simp: retract_of_def retraction) @@ -98,8 +98,8 @@ by (metis locally_compact_closedin closedin_retract) lemma homotopic_into_retract: - "\f ` S \ T; g ` S \ T; T retract_of U; homotopic_with (\x. True) S U f g\ - \ homotopic_with (\x. True) S T f g" + "\f ` S \ T; g ` S \ T; T retract_of U; homotopic_with_canon (\x. True) S U f g\ + \ homotopic_with_canon (\x. True) S T f g" apply (subst (asm) homotopic_with_def) apply (simp add: homotopic_with retract_of_def retraction_def, clarify) apply (rule_tac x="r \ h" in exI) @@ -122,24 +122,24 @@ lemma deformation_retract_imp_homotopy_eqv: fixes S :: "'a::euclidean_space set" - assumes "homotopic_with (\x. True) S S id r" and r: "retraction S T r" + assumes "homotopic_with_canon (\x. True) S S id r" and r: "retraction S T r" shows "S homotopy_eqv T" proof - - have "homotopic_with (\x. True) S S (id \ r) id" + have "homotopic_with_canon (\x. True) S S (id \ r) id" by (simp add: assms(1) homotopic_with_symD) - moreover have "homotopic_with (\x. True) T T (r \ id) id" + moreover have "homotopic_with_canon (\x. True) T T (r \ id) id" using r unfolding retraction_def - by (metis (no_types, lifting) comp_id continuous_on_id' homotopic_with_equal homotopic_with_symD id_def image_id order_refl) + by (metis eq_id_iff homotopic_with_id2 topspace_euclidean_subtopology) ultimately show ?thesis - unfolding homotopy_eqv_def - by (metis continuous_on_id' id_def image_id r retraction_def) + unfolding homotopy_equivalent_space_def + by (metis (no_types, lifting) continuous_map_subtopology_eu continuous_on_id' id_def image_id r retraction_def) qed lemma deformation_retract: fixes S :: "'a::euclidean_space set" - shows "(\r. homotopic_with (\x. True) S S id r \ retraction S T r) \ - T retract_of S \ (\f. homotopic_with (\x. True) S S id f \ f ` S \ T)" + shows "(\r. homotopic_with_canon (\x. True) S S id r \ retraction S T r) \ + T retract_of S \ (\f. homotopic_with_canon (\x. True) S S id f \ f ` S \ T)" (is "?lhs = ?rhs") proof assume ?lhs @@ -160,11 +160,11 @@ lemma deformation_retract_of_contractible_sing: fixes S :: "'a::euclidean_space set" assumes "contractible S" "a \ S" - obtains r where "homotopic_with (\x. True) S S id r" "retraction S {a} r" + obtains r where "homotopic_with_canon (\x. True) S S id r" "retraction S {a} r" proof - have "{a} retract_of S" by (simp add: \a \ S\) - moreover have "homotopic_with (\x. True) S S id (\x. a)" + moreover have "homotopic_with_canon (\x. True) S S id (\x. a)" using assms by (auto simp: contractible_def homotopic_into_contractible image_subset_iff) moreover have "(\x. a) ` S \ {a}" @@ -3392,7 +3392,7 @@ and arelS: "a \ rel_interior S" and relS: "rel_frontier S \ T" and affS: "T \ affine hull S" - obtains r where "homotopic_with (\x. True) (T - {a}) (T - {a}) id r" + obtains r where "homotopic_with_canon (\x. True) (T - {a}) (T - {a}) id r" "retraction (T - {a}) (rel_frontier S) r" proof - have "\d. 0 < d \ (a + d *\<^sub>R l) \ rel_frontier S \ @@ -3466,7 +3466,7 @@ by (blast intro: continuous_on_subset) show ?thesis proof - show "homotopic_with (\x. True) (T - {a}) (T - {a}) id (\x. a + dd (x - a) *\<^sub>R (x - a))" + show "homotopic_with_canon (\x. True) (T - {a}) (T - {a}) id (\x. a + dd (x - a) *\<^sub>R (x - a))" proof (rule homotopic_with_linear) show "continuous_on (T - {a}) id" by (intro continuous_intros continuous_on_compose) @@ -3560,8 +3560,7 @@ apply (rule rel_frontier_deformation_retract_of_punctured_convex [of S T]) using assms apply auto - apply (subst homotopy_eqv_sym) - using deformation_retract_imp_homotopy_eqv by blast + using deformation_retract_imp_homotopy_eqv homotopy_equivalent_space_sym by blast lemma homotopy_eqv_rel_frontier_punctured_affine_hull: fixes S :: "'a::euclidean_space set" @@ -3600,7 +3599,7 @@ lemma Borsuk_maps_homotopic_in_path_component: assumes "path_component (- s) a b" - shows "homotopic_with (\x. True) s (sphere 0 1) + shows "homotopic_with_canon (\x. True) s (sphere 0 1) (\x. inverse(norm(x - a)) *\<^sub>R (x - a)) (\x. inverse(norm(x - b)) *\<^sub>R (x - b))" proof - @@ -4128,8 +4127,8 @@ and anr: "(ANR S \ ANR T) \ ANR U" and contf: "continuous_on T f" and "f ` T \ U" - and "homotopic_with (\x. True) S U f g" - obtains g' where "homotopic_with (\x. True) T U f g'" + and "homotopic_with_canon (\x. True) S U f g" + obtains g' where "homotopic_with_canon (\x. True) T U f g'" "continuous_on T g'" "image g' T \ U" "\x. x \ S \ g' x = g x" proof - @@ -4141,9 +4140,9 @@ define h' where "h' \ \z. if snd z \ S then h z else (f \ snd) z" define B where "B \ {0::real} \ T \ {0..1} \ S" have clo0T: "closedin (top_of_set ({0..1} \ T)) ({0::real} \ T)" - by (simp add: closedin_subtopology_refl closedin_Times) + by (simp add: Abstract_Topology.closedin_Times) moreover have cloT1S: "closedin (top_of_set ({0..1} \ T)) ({0..1} \ S)" - by (simp add: closedin_subtopology_refl closedin_Times assms) + by (simp add: Abstract_Topology.closedin_Times assms) ultimately have clo0TB:"closedin (top_of_set ({0..1} \ T)) B" by (auto simp: B_def) have cloBS: "closedin (top_of_set B) ({0..1} \ S)" @@ -4225,7 +4224,7 @@ qed show ?thesis proof - show hom: "homotopic_with (\x. True) T U f (\x. k (a x, x))" + show hom: "homotopic_with_canon (\x. True) T U f (\x. k (a x, x))" proof (simp add: homotopic_with, intro exI conjI) show "continuous_on ({0..1} \ T) (k \ (\z. (fst z *\<^sub>R (a \ snd) z, snd z)))" apply (intro continuous_on_compose continuous_intros) @@ -4241,7 +4240,7 @@ by auto qed show "continuous_on T (\x. k (a x, x))" - using hom homotopic_with_imp_continuous by blast + using homotopic_with_imp_continuous_maps [OF hom] by auto show "(\x. k (a x, x)) ` T \ U" proof clarify fix t @@ -4262,12 +4261,12 @@ and "ANR T" and fim: "f ` S \ T" and "S \ {}" - shows "(\c. homotopic_with (\x. True) S T f (\x. c)) \ + shows "(\c. homotopic_with_canon (\x. True) S T f (\x. c)) \ (\g. continuous_on UNIV g \ range g \ T \ (\x \ S. g x = f x))" (is "?lhs = ?rhs") proof assume ?lhs - then obtain c where c: "homotopic_with (\x. True) S T (\x. c) f" + then obtain c where c: "homotopic_with_canon (\x. True) S T (\x. c) f" by (blast intro: homotopic_with_symD) have "closedin (top_of_set UNIV) S" using \closed S\ closed_closedin by fastforce @@ -4281,14 +4280,12 @@ assume ?rhs then obtain g where "continuous_on UNIV g" "range g \ T" "\x. x\S \ g x = f x" by blast - then obtain c where "homotopic_with (\h. True) UNIV T g (\x. c)" + then obtain c where "homotopic_with_canon (\h. True) UNIV T g (\x. c)" using nullhomotopic_from_contractible [of UNIV g T] contractible_UNIV by blast + then have "homotopic_with_canon (\x. True) S T g (\x. c)" + by (simp add: homotopic_from_subtopology) then show ?lhs - apply (rule_tac x=c in exI) - apply (rule homotopic_with_eq [of _ _ _ g "\x. c"]) - apply (rule homotopic_with_subset_left) - apply (auto simp: \\x. x \ S \ g x = f x\) - done + by (force elim: homotopic_with_eq [of _ _ _ g "\x. c"] simp: \\x. x \ S \ g x = f x\) qed corollary%unimportant nullhomotopic_into_rel_frontier_extension: @@ -4298,7 +4295,7 @@ and "convex T" "bounded T" and fim: "f ` S \ rel_frontier T" and "S \ {}" - shows "(\c. homotopic_with (\x. True) S (rel_frontier T) f (\x. c)) \ + shows "(\c. homotopic_with_canon (\x. True) S (rel_frontier T) f (\x. c)) \ (\g. continuous_on UNIV g \ range g \ rel_frontier T \ (\x \ S. g x = f x))" by (simp add: nullhomotopic_into_ANR_extension assms ANR_rel_frontier_convex) @@ -4306,7 +4303,7 @@ fixes f :: "'a::euclidean_space \ 'b :: euclidean_space" assumes "closed S" and contf: "continuous_on S f" and "S \ {}" and fim: "f ` S \ sphere a r" - shows "((\c. homotopic_with (\x. True) S (sphere a r) f (\x. c)) \ + shows "((\c. homotopic_with_canon (\x. True) S (sphere a r) f (\x. c)) \ (\g. continuous_on UNIV g \ range g \ sphere a r \ (\x \ S. g x = f x)))" (is "?lhs = ?rhs") proof (cases "r = 0") @@ -4328,7 +4325,7 @@ fixes a :: "'a :: euclidean_space" assumes "compact S" and "a \ S" shows "bounded (connected_component_set (- S) a) \ - \(\c. homotopic_with (\x. True) S (sphere 0 1) + \(\c. homotopic_with_canon (\x. True) S (sphere 0 1) (\x. inverse(norm(x - a)) *\<^sub>R (x - a)) (\x. c))" (is "?lhs = ?rhs") proof (cases "S = {}") @@ -4368,13 +4365,13 @@ using bounded_iff linear by blast then have bnot: "b \ ball 0 r" by simp - have "homotopic_with (\x. True) S (sphere 0 1) (\x. (x - a) /\<^sub>R norm (x - a)) + have "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. (x - a) /\<^sub>R norm (x - a)) (\x. (x - b) /\<^sub>R norm (x - b))" apply (rule Borsuk_maps_homotopic_in_path_component) using \closed S\ b open_Compl open_path_connected_component apply fastforce done moreover - obtain c where "homotopic_with (\x. True) (ball 0 r) (sphere 0 1) + obtain c where "homotopic_with_canon (\x. True) (ball 0 r) (sphere 0 1) (\x. inverse (norm (x - b)) *\<^sub>R (x - b)) (\x. c)" proof (rule nullhomotopic_from_contractible) show "contractible (ball (0::'a) r)" @@ -4384,8 +4381,7 @@ show "(\x. (x - b) /\<^sub>R norm (x - b)) ` ball 0 r \ sphere 0 1" using bnot Borsuk_map_into_sphere by blast qed blast - ultimately have "homotopic_with (\x. True) S (sphere 0 1) - (\x. (x - a) /\<^sub>R norm (x - a)) (\x. c)" + ultimately have "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. (x - a) /\<^sub>R norm (x - a)) (\x. c)" by (meson homotopic_with_subset_left homotopic_with_trans r) then show "\ ?rhs" by blast @@ -4397,7 +4393,7 @@ fixes a :: "'a :: euclidean_space" assumes "compact S" and "a \ S"and "b \ S" and boc: "bounded (connected_component_set (- S) a)" - and hom: "homotopic_with (\x. True) S (sphere 0 1) + and hom: "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. (x - a) /\<^sub>R norm (x - a)) (\x. (x - b) /\<^sub>R norm (x - b))" shows "connected_component (- S) a b" @@ -4418,7 +4414,7 @@ by (simp add: \b \ S\ notcc continuous_on_Borsuk_map) show "(\x. (x - b) /\<^sub>R norm (x - b)) ` ?T \ sphere 0 1" by (simp add: \b \ S\ notcc Borsuk_map_into_sphere) - show "homotopic_with (\x. True) S (sphere 0 1) + show "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. (x - b) /\<^sub>R norm (x - b)) (\x. (x - a) /\<^sub>R norm (x - a))" by (simp add: hom homotopic_with_symD) qed (auto simp: ANR_sphere intro: that) @@ -4429,7 +4425,7 @@ lemma Borsuk_maps_homotopic_in_connected_component_eq: fixes a :: "'a :: euclidean_space" assumes S: "compact S" "a \ S" "b \ S" and 2: "2 \ DIM('a)" - shows "(homotopic_with (\x. True) S (sphere 0 1) + shows "(homotopic_with_canon (\x. True) S (sphere 0 1) (\x. (x - a) /\<^sub>R norm (x - a)) (\x. (x - b) /\<^sub>R norm (x - b)) \ connected_component (- S) a b)" @@ -4587,9 +4583,9 @@ assumes contf: "continuous_on S f" and fim: "f ` S \ U" and contg: "continuous_on S g" and gim: "g ` S \ U" and clo: "closedin (top_of_set S) T" - and "ANR U" and hom: "homotopic_with (\x. True) T U f g" + and "ANR U" and hom: "homotopic_with_canon (\x. True) T U f g" obtains V where "T \ V" "openin (top_of_set S) V" - "homotopic_with (\x. True) V U f g" + "homotopic_with_canon (\x. True) V U f g" proof - have "T \ S" using clo closedin_imp_subset by blast @@ -4631,7 +4627,7 @@ obtain T' where opeT': "openin (top_of_set S) T'" and "T \ T'" and TW: "{0..1} \ T' \ W" using tube_lemma_gen [of "{0..1::real}" T S W] W \T \ S\ opeW by auto - moreover have "homotopic_with (\x. True) T' U f g" + moreover have "homotopic_with_canon (\x. True) T' U f g" proof (simp add: homotopic_with, intro exI conjI) show "continuous_on ({0..1} \ T') k" using TW continuous_on_subset contk by auto @@ -4651,8 +4647,8 @@ fixes \ :: "'a::euclidean_space set set" assumes "\S. S \ \ \ closedin (top_of_set (\\)) S" and "\S. S \ \ \ openin (top_of_set (\\)) S" - and "\S. S \ \ \ homotopic_with (\x. True) S T f g" - shows "homotopic_with (\x. True) (\\) T f g" + and "\S. S \ \ \ homotopic_with_canon (\x. True) S T f g" + shows "homotopic_with_canon (\x. True) (\\) T f g" proof - obtain \ where "\ \ \" "countable \" and eqU: "\\ = \\" using Lindelof_openin assms by blast @@ -4660,14 +4656,14 @@ proof (cases "\ = {}") case True then show ?thesis - by (metis Union_empty eqU homotopic_on_empty) + by (metis Union_empty eqU homotopic_with_canon_on_empty) next case False then obtain V :: "nat \ 'a set" where V: "range V = \" using range_from_nat_into \countable \\ by metis with \\ \ \\ have clo: "\n. closedin (top_of_set (\\)) (V n)" and ope: "\n. openin (top_of_set (\\)) (V n)" - and hom: "\n. homotopic_with (\x. True) (V n) T f g" + and hom: "\n. homotopic_with_canon (\x. True) (V n) T f g" using assms by auto then obtain h where conth: "\n. continuous_on ({0..1::real} \ V n) (h n)" and him: "\n. h n ` ({0..1} \ V n) \ T" @@ -4723,9 +4719,9 @@ lemma homotopic_on_components_eq: fixes S :: "'a :: euclidean_space set" and T :: "'b :: euclidean_space set" assumes S: "locally connected S \ compact S" and "ANR T" - shows "homotopic_with (\x. True) S T f g \ + shows "homotopic_with_canon (\x. True) S T f g \ (continuous_on S f \ f ` S \ T \ continuous_on S g \ g ` S \ T) \ - (\C \ components S. homotopic_with (\x. True) C T f g)" + (\C \ components S. homotopic_with_canon (\x. True) C T f g)" (is "?lhs \ ?C \ ?rhs") proof - have "continuous_on S f" "f ` S \ T" "continuous_on S g" "g ` S \ T" if ?lhs @@ -4740,7 +4736,7 @@ assume R: ?rhs have "\U. C \ U \ closedin (top_of_set S) U \ openin (top_of_set S) U \ - homotopic_with (\x. True) U T f g" if C: "C \ components S" for C + homotopic_with_canon (\x. True) U T f g" if C: "C \ components S" for C proof - have "C \ S" by (simp add: in_components_subset that) @@ -4754,15 +4750,15 @@ by (simp add: closedin_component that) show "openin (top_of_set S) C" by (simp add: \locally connected S\ openin_components_locally_connected that) - show "homotopic_with (\x. True) C T f g" + show "homotopic_with_canon (\x. True) C T f g" by (simp add: R that) qed auto next assume "compact S" - have hom: "homotopic_with (\x. True) C T f g" + have hom: "homotopic_with_canon (\x. True) C T f g" using R that by blast obtain U where "C \ U" and opeU: "openin (top_of_set S) U" - and hom: "homotopic_with (\x. True) U T f g" + and hom: "homotopic_with_canon (\x. True) U T f g" using homotopic_neighbourhood_extension [OF contf fim contg gim _ \ANR T\ hom] \C \ components S\ closedin_component by blast then obtain V where "open V" and V: "U = S \ V" @@ -4775,7 +4771,7 @@ proof (intro exI conjI) show "closedin (top_of_set S) K" by (meson \compact K\ \compact S\ closedin_compact_eq opeK openin_imp_subset) - show "homotopic_with (\x. True) K T f g" + show "homotopic_with_canon (\x. True) K T f g" using V \K \ V\ hom homotopic_with_subset_left opeK openin_imp_subset by fastforce qed (use opeK \C \ K\ in auto) qed @@ -4783,7 +4779,7 @@ then obtain \ where \: "\C. C \ components S \ C \ \ C" and clo\: "\C. C \ components S \ closedin (top_of_set S) (\ C)" and ope\: "\C. C \ components S \ openin (top_of_set S) (\ C)" - and hom\: "\C. C \ components S \ homotopic_with (\x. True) (\ C) T f g" + and hom\: "\C. C \ components S \ homotopic_with_canon (\x. True) (\ C) T f g" by metis have Seq: "S = \ (\ ` components S)" proof @@ -4806,11 +4802,11 @@ assumes S: "locally connected S \ compact S" and "ANR T" shows "(\f g. continuous_on S f \ f ` S \ T \ continuous_on S g \ g ` S \ T \ - homotopic_with (\x. True) S T f g) + homotopic_with_canon (\x. True) S T f g) \ (\C\components S. \f g. continuous_on C f \ f ` C \ T \ continuous_on C g \ g ` C \ T \ - homotopic_with (\x. True) C T f g)" + homotopic_with_canon (\x. True) C T f g)" (is "?lhs = ?rhs") proof assume L[rule_format]: ?lhs @@ -4823,9 +4819,9 @@ using extension_from_component [OF S \ANR T\ C contf fim] by metis obtain g' where contg': "continuous_on S g'" and g'im: "g' ` S \ T" and g'g: "\x. x \ C \ g' x = g x" using extension_from_component [OF S \ANR T\ C contg gim] by metis - have "homotopic_with (\x. True) C T f' g'" + have "homotopic_with_canon (\x. True) C T f' g'" using L [OF contf' f'im contg' g'im] homotopic_with_subset_left C in_components_subset by fastforce - then show "homotopic_with (\x. True) C T f g" + then show "homotopic_with_canon (\x. True) C T f g" using f'f g'g homotopic_with_eq by force qed next @@ -4835,10 +4831,10 @@ fix f g assume contf: "continuous_on S f" and fim: "f ` S \ T" and contg: "continuous_on S g" and gim: "g ` S \ T" - moreover have "homotopic_with (\x. True) C T f g" if "C \ components S" for C + moreover have "homotopic_with_canon (\x. True) C T f g" if "C \ components S" for C using R [OF that] by (meson contf contg continuous_on_subset fim gim image_mono in_components_subset order.trans that) - ultimately show "homotopic_with (\x. True) S T f g" + ultimately show "homotopic_with_canon (\x. True) S T f g" by (subst homotopic_on_components_eq [OF S \ANR T\]) auto qed qed diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Complex_Transcendental.thy --- a/src/HOL/Analysis/Complex_Transcendental.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Complex_Transcendental.thy Tue Mar 26 17:01:55 2019 +0000 @@ -4036,11 +4036,11 @@ subsection\Formulation of loop homotopy in terms of maps out of type complex\ lemma homotopic_circlemaps_imp_homotopic_loops: - assumes "homotopic_with (\h. True) (sphere 0 1) S f g" + assumes "homotopic_with_canon (\h. True) (sphere 0 1) S f g" shows "homotopic_loops S (f \ exp \ (\t. 2 * of_real pi * of_real t * \)) (g \ exp \ (\t. 2 * of_real pi * of_real t * \))" proof - - have "homotopic_with (\f. True) {z. cmod z = 1} S f g" + have "homotopic_with_canon (\f. True) {z. cmod z = 1} S f g" using assms by (auto simp: sphere_def) moreover have "continuous_on {0..1} (exp \ (\t. 2 * of_real pi * of_real t * \))" by (intro continuous_intros) @@ -4056,7 +4056,7 @@ lemma homotopic_loops_imp_homotopic_circlemaps: assumes "homotopic_loops S p q" - shows "homotopic_with (\h. True) (sphere 0 1) S + shows "homotopic_with_canon (\h. True) (sphere 0 1) S (p \ (\z. (Arg2pi z / (2 * pi)))) (q \ (\z. (Arg2pi z / (2 * pi))))" proof - @@ -4117,7 +4117,7 @@ assumes S: "simply_connected S" and contf: "continuous_on (sphere 0 1) f" and fim: "f ` (sphere 0 1) \ S" and contg: "continuous_on (sphere 0 1) g" and gim: "g ` (sphere 0 1) \ S" - shows "homotopic_with (\h. True) (sphere 0 1) S f g" + shows "homotopic_with_canon (\h. True) (sphere 0 1) S f g" proof - have "homotopic_loops S (f \ exp \ (\t. of_real(2 * pi * t) * \)) (g \ exp \ (\t. of_real(2 * pi * t) * \))" apply (rule S [unfolded simply_connected_homotopic_loops, rule_format]) @@ -4135,8 +4135,8 @@ and hom: "\f g::complex \ 'a. \continuous_on (sphere 0 1) f; f ` (sphere 0 1) \ S; continuous_on (sphere 0 1) g; g ` (sphere 0 1) \ S\ - \ homotopic_with (\h. True) (sphere 0 1) S f g" - shows "\a. homotopic_with (\h. True) (sphere 0 1) S h (\x. a)" + \ homotopic_with_canon (\h. True) (sphere 0 1) S f g" + shows "\a. homotopic_with_canon (\h. True) (sphere 0 1) S h (\x. a)" apply (rule_tac x="h 1" in exI) apply (rule hom) using assms @@ -4147,7 +4147,7 @@ assumes "\f g::complex \ 'a. \continuous_on (sphere 0 1) f; f ` (sphere 0 1) \ S; continuous_on (sphere 0 1) g; g ` (sphere 0 1) \ S\ - \ homotopic_with (\h. True) (sphere 0 1) S f g" + \ homotopic_with_canon (\h. True) (sphere 0 1) S f g" shows "path_connected S" proof (clarsimp simp add: path_connected_eq_homotopic_points) fix a b @@ -4162,14 +4162,14 @@ assumes "path_connected S" and hom: "\f::complex \ 'a. \continuous_on (sphere 0 1) f; f `(sphere 0 1) \ S\ - \ \a. homotopic_with (\h. True) (sphere 0 1) S f (\x. a)" + \ \a. homotopic_with_canon (\h. True) (sphere 0 1) S f (\x. a)" shows "simply_connected S" proof (clarsimp simp add: simply_connected_eq_contractible_loop_some assms) fix p assume p: "path p" "path_image p \ S" "pathfinish p = pathstart p" then have "homotopic_loops S p p" by (simp add: homotopic_loops_refl) - then obtain a where homp: "homotopic_with (\h. True) (sphere 0 1) S (p \ (\z. Arg2pi z / (2 * pi))) (\x. a)" + then obtain a where homp: "homotopic_with_canon (\h. True) (sphere 0 1) S (p \ (\z. Arg2pi z / (2 * pi))) (\x. a)" by (metis homotopic_with_imp_subset2 homotopic_loops_imp_homotopic_circlemaps homotopic_with_imp_continuous hom) show "\a. a \ S \ homotopic_loops S p (linepath a a)" proof (intro exI conjI) @@ -4198,7 +4198,7 @@ (\f g::complex \ 'a. continuous_on (sphere 0 1) f \ f ` (sphere 0 1) \ S \ continuous_on (sphere 0 1) g \ g ` (sphere 0 1) \ S - \ homotopic_with (\h. True) (sphere 0 1) S f g)" + \ homotopic_with_canon (\h. True) (sphere 0 1) S f g)" apply (rule iffI) apply (blast elim: dest: simply_connected_eq_homotopic_circlemaps1) by (simp add: simply_connected_eq_homotopic_circlemaps2a simply_connected_eq_homotopic_circlemaps2b simply_connected_eq_homotopic_circlemaps3) @@ -4209,7 +4209,7 @@ path_connected S \ (\f::complex \ 'a. continuous_on (sphere 0 1) f \ f `(sphere 0 1) \ S - \ (\a. homotopic_with (\h. True) (sphere 0 1) S f (\x. a)))" + \ (\a. homotopic_with_canon (\h. True) (sphere 0 1) S f (\x. a)))" apply (rule iffI) apply (simp add: simply_connected_eq_homotopic_circlemaps1 simply_connected_eq_homotopic_circlemaps2a simply_connected_eq_homotopic_circlemaps2b) using simply_connected_eq_homotopic_circlemaps3 by blast @@ -4229,7 +4229,7 @@ proof - have "homotopic_loops (path_image \) \ \" by (simp add: assms homotopic_loops_refl simple_path_imp_path) - then have hom: "homotopic_with (\h. True) (sphere 0 1) (path_image \) + then have hom: "homotopic_with_canon (\h. True) (sphere 0 1) (path_image \) (\ \ (\z. Arg2pi z / (2*pi))) (\ \ (\z. Arg2pi z / (2*pi)))" by (rule homotopic_loops_imp_homotopic_circlemaps) have "\g. homeomorphism (sphere 0 1) (path_image \) (\ \ (\z. Arg2pi z / (2*pi))) g" diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Further_Topology.thy --- a/src/HOL/Analysis/Further_Topology.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Further_Topology.thy Tue Mar 26 17:01:55 2019 +0000 @@ -164,7 +164,7 @@ and "S \ T" and contf: "continuous_on (sphere 0 1 \ S) f" and fim: "f ` (sphere 0 1 \ S) \ sphere 0 1 \ T" - shows "\c. homotopic_with (\x. True) (sphere 0 1 \ S) (sphere 0 1 \ T) f (\x. c)" + shows "\c. homotopic_with_canon (\x. True) (sphere 0 1 \ S) (sphere 0 1 \ T) f (\x. c)" proof - have [simp]: "\x. \norm x = 1; x \ S\ \ norm (f x) = 1" using fim by (simp add: image_subset_iff) @@ -194,7 +194,7 @@ apply (intro derivative_intros diffg differentiable_on_compose [OF diffg]) using gnz apply auto done - have homfg: "homotopic_with (\z. True) (sphere 0 1 \ S) (T - {0}) f g" + have homfg: "homotopic_with_canon (\z. True) (sphere 0 1 \ S) (T - {0}) f g" proof (rule homotopic_with_linear [OF contf]) show "continuous_on (sphere 0 1 \ S) g" using pfg by (simp add: differentiable_imp_continuous_on diffg) @@ -224,7 +224,7 @@ by (auto simp: between_mem_segment midpoint_def) have conth: "continuous_on (sphere 0 1 \ S) h" using differentiable_imp_continuous_on diffh by blast - have hom_hd: "homotopic_with (\z. True) (sphere 0 1 \ S) (T - {0}) h (\x. -d)" + have hom_hd: "homotopic_with_canon (\z. True) (sphere 0 1 \ S) (T - {0}) h (\x. -d)" apply (rule homotopic_with_linear [OF conth continuous_on_const]) apply (simp add: subset_Diff_insert non0hd) apply (simp add: segment_convex_hull) @@ -236,7 +236,7 @@ by (intro continuous_intros) auto have sub0T: "(\y. y /\<^sub>R norm y) ` (T - {0}) \ sphere 0 1 \ T" by (fastforce simp: assms(2) subspace_mul) - obtain c where homhc: "homotopic_with (\z. True) (sphere 0 1 \ S) (sphere 0 1 \ T) h (\x. c)" + obtain c where homhc: "homotopic_with_canon (\z. True) (sphere 0 1 \ S) (sphere 0 1 \ T) h (\x. c)" apply (rule_tac c="-d" in that) apply (rule homotopic_with_eq) apply (rule homotopic_compose_continuous_left [OF hom_hd conT0 sub0T]) @@ -306,7 +306,7 @@ and affST: "aff_dim S < aff_dim T" and contf: "continuous_on (rel_frontier S) f" and fim: "f ` (rel_frontier S) \ rel_frontier T" - obtains c where "homotopic_with (\z. True) (rel_frontier S) (rel_frontier T) f (\x. c)" + obtains c where "homotopic_with_canon (\z. True) (rel_frontier S) (rel_frontier T) f (\x. c)" proof (cases "S = {}") case True then show ?thesis @@ -328,7 +328,7 @@ using \T \ {}\ by blast with homeomorphic_imp_homotopy_eqv have relT: "sphere 0 1 \ T' homotopy_eqv rel_frontier T" - using homotopy_eqv_sym by blast + using homotopy_equivalent_space_sym by blast have "aff_dim S \ int (dim T')" using affT' \subspace T'\ affST aff_dim_subspace by force with spheremap_lemma3 [OF \bounded S\ \convex S\ \subspace T'\] \S \ {}\ @@ -338,10 +338,10 @@ by metis with homeomorphic_imp_homotopy_eqv have relS: "sphere 0 1 \ S' homotopy_eqv rel_frontier S" - using homotopy_eqv_sym by blast + using homotopy_equivalent_space_sym by blast have dimST': "dim S' < dim T'" by (metis \S' \ T'\ \subspace S'\ \subspace T'\ affS' affST affT' less_irrefl not_le subspace_dim_equal) - have "\c. homotopic_with (\z. True) (rel_frontier S) (rel_frontier T) f (\x. c)" + have "\c. homotopic_with_canon (\z. True) (rel_frontier S) (rel_frontier T) f (\x. c)" apply (rule homotopy_eqv_homotopic_triviality_null_imp [OF relT contf fim]) apply (rule homotopy_eqv_cohomotopic_triviality_null[OF relS, THEN iffD1, rule_format]) apply (metis dimST' \subspace S'\ \subspace T'\ \S' \ T'\ spheremap_lemma2, blast) @@ -354,7 +354,7 @@ fixes f :: "'M::euclidean_space \ 'a::euclidean_space" assumes "DIM('M) < DIM('a)" and f: "continuous_on (sphere a r) f" "f ` (sphere a r) \ (sphere b s)" - obtains c where "homotopic_with (\z. True) (sphere a r) (sphere b s) f (\x. c)" + obtains c where "homotopic_with_canon (\z. True) (sphere a r) (sphere b s) f (\x. c)" proof (cases "s \ 0") case True then show ?thesis by (meson nullhomotopic_into_contractible f contractible_sphere that) @@ -522,13 +522,13 @@ using Suc.prems affD by linarith have contDh: "continuous_on (rel_frontier D) h" using \C \ \\ relf_sub by (blast intro: continuous_on_subset [OF conth]) - then have *: "(\c. homotopic_with (\x. True) (rel_frontier D) (rel_frontier T) h (\x. c)) = + then have *: "(\c. homotopic_with_canon (\x. True) (rel_frontier D) (rel_frontier T) h (\x. c)) = (\g. continuous_on UNIV g \ range g \ rel_frontier T \ (\x\rel_frontier D. g x = h x))" apply (rule nullhomotopic_into_rel_frontier_extension [OF closed_rel_frontier]) apply (simp_all add: assms rel_frontier_eq_empty him_relf) done - have "(\c. homotopic_with (\x. True) (rel_frontier D) + have "(\c. homotopic_with_canon (\x. True) (rel_frontier D) (rel_frontier T) h (\x. c))" by (metis inessential_spheremap_lowdim_gen [OF \convex D\ \bounded D\ \convex T\ \bounded T\ affD_lessT contDh him_relf]) @@ -1706,7 +1706,7 @@ assumes "compact S" shows "(\c \ components(- S). \bounded c) \ (\f. continuous_on S f \ f ` S \ sphere (0::'a) 1 - \ (\c. homotopic_with (\x. True) S (sphere 0 1) f (\x. c)))" + \ (\c. homotopic_with_canon (\x. True) S (sphere 0 1) f (\x. c)))" (is "?lhs = ?rhs") proof assume L [rule_format]: ?lhs @@ -1717,9 +1717,10 @@ obtain g where contg: "continuous_on UNIV g" and gim: "range g \ sphere 0 1" and gf: "\x. x \ S \ g x = f x" by (rule extend_map_UNIV_to_sphere_no_bounded_component [OF _ _ \compact S\ contf fim L]) auto - then show "\c. homotopic_with (\x. True) S (sphere 0 1) f (\x. c)" - using nullhomotopic_from_contractible [OF contg gim] - by (metis assms compact_imp_closed contf empty_iff fim homotopic_with_equal nullhomotopic_into_sphere_extension) + then obtain c where c: "homotopic_with_canon (\h. True) UNIV (sphere 0 1) g (\x. c)" + using contractible_UNIV nullhomotopic_from_contractible by blast + then show "\c. homotopic_with_canon (\x. True) S (sphere 0 1) f (\x. c)" + by (metis assms compact_imp_closed contf contg contractible_empty fim gf gim nullhomotopic_from_contractible nullhomotopic_into_sphere_extension) qed next assume R [rule_format]: ?rhs @@ -1744,7 +1745,7 @@ assumes "compact S" and 2: "2 \ DIM('a)" shows "connected(- S) \ (\f. continuous_on S f \ f ` S \ sphere (0::'a) 1 - \ (\c. homotopic_with (\x. True) S (sphere 0 1) f (\x. c)))" + \ (\c. homotopic_with_canon (\x. True) S (sphere 0 1) f (\x. c)))" (is "?lhs = ?rhs") proof assume L: ?lhs @@ -2814,12 +2815,12 @@ by simp have "convex (cball (0::complex) 1)" by (rule convex_cball) - then obtain c where "homotopic_with (\z. True) (sphere (0::complex) 1) (rel_frontier S) f (\x. c)" + then obtain c where "homotopic_with_canon (\z. True) (sphere (0::complex) 1) (rel_frontier S) f (\x. c)" apply (rule inessential_spheremap_lowdim_gen [OF _ bounded_cball \convex S\ \bounded S\, where f=f]) using f 3 apply (auto simp: aff_dim_cball) done - then show "\a. homotopic_with (\h. True) (sphere 0 1) (rel_frontier S) f (\x. a)" + then show "\a. homotopic_with_canon (\h. True) (sphere 0 1) (rel_frontier S) f (\x. a)" by blast qed qed @@ -3018,7 +3019,7 @@ by (metis DIM_complex False homeomorphic_spheres_gen not_less zero_less_one) then have "simply_connected(sphere (0::complex) 1)" using L homeomorphic_simply_connected_eq by blast - then obtain a::complex where "homotopic_with (\h. True) (sphere 0 1) (sphere 0 1) id (\x. a)" + then obtain a::complex where "homotopic_with_canon (\h. True) (sphere 0 1) (sphere 0 1) id (\x. a)" apply (simp add: simply_connected_eq_contractible_circlemap) by (metis continuous_on_id' id_apply image_id subset_refl) then show False @@ -3496,7 +3497,7 @@ lemma inessential_eq_continuous_logarithm: fixes f :: "'a::real_normed_vector \ complex" - shows "(\a. homotopic_with (\h. True) S (-{0}) f (\t. a)) \ + shows "(\a. homotopic_with_canon (\h. True) S (-{0}) f (\t. a)) \ (\g. continuous_on S g \ (\x \ S. f x = exp(g x)))" (is "?lhs \ ?rhs") proof @@ -3506,24 +3507,24 @@ assume ?rhs then obtain g where contg: "continuous_on S g" and f: "\x. x \ S \ f x = exp(g x)" by metis - obtain a where "homotopic_with (\h. True) S (- {of_real 0}) (exp \ g) (\x. a)" + obtain a where "homotopic_with_canon (\h. True) S (- {of_real 0}) (exp \ g) (\x. a)" proof (rule nullhomotopic_through_contractible [OF contg subset_UNIV _ _ contractible_UNIV]) show "continuous_on (UNIV::complex set) exp" by (intro continuous_intros) show "range exp \ - {0}" by auto qed force - thus ?lhs - apply (rule_tac x=a in exI) - by (simp add: f homotopic_with_eq) + then have "homotopic_with_canon (\h. True) S (- {0}) f (\t. a)" + using f homotopic_with_eq by fastforce + then show ?lhs .. qed corollary inessential_imp_continuous_logarithm_circle: fixes f :: "'a::real_normed_vector \ complex" - assumes "homotopic_with (\h. True) S (sphere 0 1) f (\t. a)" + assumes "homotopic_with_canon (\h. True) S (sphere 0 1) f (\t. a)" obtains g where "continuous_on S g" and "\x. x \ S \ f x = exp(g x)" proof - - have "homotopic_with (\h. True) S (- {0}) f (\t. a)" + have "homotopic_with_canon (\h. True) S (- {0}) f (\t. a)" using assms homotopic_with_subset_right by fastforce then show ?thesis by (metis inessential_eq_continuous_logarithm that) @@ -3532,7 +3533,7 @@ lemma inessential_eq_continuous_logarithm_circle: fixes f :: "'a::real_normed_vector \ complex" - shows "(\a. homotopic_with (\h. True) S (sphere 0 1) f (\t. a)) \ + shows "(\a. homotopic_with_canon (\h. True) S (sphere 0 1) f (\t. a)) \ (\g. continuous_on S g \ (\x \ S. f x = exp(\ * of_real(g x))))" (is "?lhs \ ?rhs") proof @@ -3552,7 +3553,7 @@ assume ?rhs then obtain g where contg: "continuous_on S g" and g: "\x. x \ S \ f x = exp(\* of_real(g x))" by metis - obtain a where "homotopic_with (\h. True) S (sphere 0 1) ((exp \ (\z. \*z)) \ (of_real \ g)) (\x. a)" + obtain a where "homotopic_with_canon (\h. True) S (sphere 0 1) ((exp \ (\z. \*z)) \ (of_real \ g)) (\x. a)" proof (rule nullhomotopic_through_contractible) show "continuous_on S (complex_of_real \ g)" by (intro conjI contg continuous_intros) @@ -3565,16 +3566,16 @@ qed (auto simp: convex_Reals convex_imp_contractible) moreover have "\x. x \ S \ (exp \ (*)\ \ (complex_of_real \ g)) x = f x" by (simp add: g) - ultimately show ?lhs - apply (rule_tac x=a in exI) - by (simp add: homotopic_with_eq) + ultimately have "homotopic_with_canon (\h. True) S (sphere 0 1) f (\t. a)" + using homotopic_with_eq by force + then show ?lhs .. qed proposition homotopic_with_sphere_times: fixes f :: "'a::real_normed_vector \ complex" - assumes hom: "homotopic_with (\x. True) S (sphere 0 1) f g" and conth: "continuous_on S h" + assumes hom: "homotopic_with_canon (\x. True) S (sphere 0 1) f g" and conth: "continuous_on S h" and hin: "\x. x \ S \ h x \ sphere 0 1" - shows "homotopic_with (\x. True) S (sphere 0 1) (\x. f x * h x) (\x. g x * h x)" + shows "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. f x * h x) (\x. g x * h x)" proof - obtain k where contk: "continuous_on ({0..1::real} \ S) k" and kim: "k ` ({0..1} \ S) \ sphere 0 1" @@ -3592,29 +3593,29 @@ proposition homotopic_circlemaps_divide: fixes f :: "'a::real_normed_vector \ complex" - shows "homotopic_with (\x. True) S (sphere 0 1) f g \ + shows "homotopic_with_canon (\x. True) S (sphere 0 1) f g \ continuous_on S f \ f ` S \ sphere 0 1 \ continuous_on S g \ g ` S \ sphere 0 1 \ - (\c. homotopic_with (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. c))" + (\c. homotopic_with_canon (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. c))" proof - - have "homotopic_with (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. 1)" - if "homotopic_with (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. c)" for c + have "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. 1)" + if "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. c)" for c proof - have "S = {} \ path_component (sphere 0 1) 1 c" using homotopic_with_imp_subset2 [OF that] path_connected_sphere [of "0::complex" 1] by (auto simp: path_connected_component) - then have "homotopic_with (\x. True) S (sphere 0 1) (\x. 1) (\x. c)" - by (metis homotopic_constant_maps) + then have "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. 1) (\x. c)" + by (simp add: homotopic_constant_maps) then show ?thesis using homotopic_with_symD homotopic_with_trans that by blast qed - then have *: "(\c. homotopic_with (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. c)) \ - homotopic_with (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. 1)" + then have *: "(\c. homotopic_with_canon (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. c)) \ + homotopic_with_canon (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. 1)" by auto - have "homotopic_with (\x. True) S (sphere 0 1) f g \ + have "homotopic_with_canon (\x. True) S (sphere 0 1) f g \ continuous_on S f \ f ` S \ sphere 0 1 \ continuous_on S g \ g ` S \ sphere 0 1 \ - homotopic_with (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. 1)" + homotopic_with_canon (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. 1)" (is "?lhs \ ?rhs") proof assume L: ?lhs @@ -3627,7 +3628,7 @@ apply (rule continuous_on_subset [of "sphere 0 1", OF continuous_on_inverse]) apply (auto simp: continuous_on_id) done - have "homotopic_with (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. 1)" + have "homotopic_with_canon (\x. True) S (sphere 0 1) (\x. f x / g x) (\x. 1)" using homotopic_with_sphere_times [OF L cont] apply (rule homotopic_with_eq) apply (auto simp: division_ring_class.divide_inverse norm_inverse) @@ -3852,7 +3853,7 @@ assumes "continuous_on S f" "contractible S" "\z. z \ S \ f z \ 0" obtains g where "continuous_on S g" "\x. x \ S \ f x = exp(g x)" proof - - obtain c where hom: "homotopic_with (\h. True) S (-{0}) f (\x. c)" + obtain c where hom: "homotopic_with_canon (\h. True) S (-{0}) f (\x. c)" using nullhomotopic_from_contractible assms by (metis imageE subset_Compl_singleton) then show ?thesis @@ -3920,7 +3921,7 @@ fixes f :: "'a::euclidean_space \ complex" assumes 2: "2 < DIM('a)" and contf: "continuous_on (sphere a r) f" and fim: "f `(sphere a r) \ (sphere 0 1)" - obtains c where "homotopic_with (\z. True) (sphere a r) (sphere 0 1) f (\x. c)" + obtains c where "homotopic_with_canon (\z. True) (sphere a r) (sphere 0 1) f (\x. c)" proof - obtain g where contg: "continuous_on (sphere a r) g" and feq: "\x. x \ sphere a r \ f x = exp(g x)" @@ -3947,7 +3948,7 @@ fixes f :: "'a::euclidean_space \ 'b::euclidean_space" assumes a2: "2 < DIM('a)" and b2: "DIM('b) = 2" and contf: "continuous_on (sphere a r) f" and fim: "f `(sphere a r) \ (sphere b s)" - obtains c where "homotopic_with (\z. True) (sphere a r) (sphere b s) f (\x. c)" + obtains c where "homotopic_with_canon (\z. True) (sphere a r) (sphere b s) f (\x. c)" proof (cases "s \ 0") case True then show ?thesis @@ -3963,16 +3964,16 @@ and him: "h ` sphere b s \ sphere 0 1" and kim: "k ` sphere 0 1 \ sphere b s" by (simp_all add: homeomorphism_def) - obtain c where "homotopic_with (\z. True) (sphere a r) (sphere 0 1) (h \ f) (\x. c)" + obtain c where "homotopic_with_canon (\z. True) (sphere a r) (sphere 0 1) (h \ f) (\x. c)" proof (rule inessential_spheremap_2_aux [OF a2]) show "continuous_on (sphere a r) (h \ f)" by (meson continuous_on_compose [OF contf] conth continuous_on_subset fim) show "(h \ f) ` sphere a r \ sphere 0 1" using fim him by force qed auto - then have "homotopic_with (\f. True) (sphere a r) (sphere b s) (k \ (h \ f)) (k \ (\x. c))" + then have "homotopic_with_canon (\f. True) (sphere a r) (sphere b s) (k \ (h \ f)) (k \ (\x. c))" by (rule homotopic_compose_continuous_left [OF _ contk kim]) - then have "homotopic_with (\z. True) (sphere a r) (sphere b s) f (\x. k c)" + then have "homotopic_with_canon (\z. True) (sphere a r) (sphere b s) f (\x. k c)" apply (rule homotopic_with_eq, auto) by (metis fim hk homeomorphism_def image_subset_iff mem_sphere) then show ?thesis @@ -4202,7 +4203,7 @@ definition%important Borsukian where "Borsukian S \ \f. continuous_on S f \ f ` S \ (- {0::complex}) - \ (\a. homotopic_with (\h. True) S (- {0}) f (\x. a))" + \ (\a. homotopic_with_canon (\h. True) S (- {0}) f (\x. a))" lemma Borsukian_retraction_gen: assumes "Borsukian S" "continuous_on S h" "h ` S = T" @@ -4259,7 +4260,7 @@ "Borsukian S \ (\f g. continuous_on S f \ f ` S \ -{0} \ continuous_on S g \ g ` S \ -{0} - \ homotopic_with (\h. True) S (- {0::complex}) f g)" + \ homotopic_with_canon (\h. True) S (- {0::complex}) f g)" unfolding Borsukian_def homotopic_triviality by (simp add: path_connected_punctured_universe) @@ -4343,7 +4344,7 @@ fixes S :: "'a::real_normed_vector set" shows "Borsukian S \ (\f. continuous_on S f \ f ` S \ sphere (0::complex) 1 - \ (\a. homotopic_with (\h. True) S (sphere (0::complex) 1) f (\x. a)))" + \ (\a. homotopic_with_canon (\h. True) S (sphere (0::complex) 1) f (\x. a)))" by (simp add: inessential_eq_continuous_logarithm_circle Borsukian_continuous_logarithm_circle_real) lemma contractible_imp_Borsukian: "contractible S \ Borsukian S" @@ -5335,12 +5336,12 @@ proposition inessential_eq_extensible: fixes f :: "'a::euclidean_space \ complex" assumes "closed S" - shows "(\a. homotopic_with (\h. True) S (-{0}) f (\t. a)) \ + shows "(\a. homotopic_with_canon (\h. True) S (-{0}) f (\t. a)) \ (\g. continuous_on UNIV g \ (\x \ S. g x = f x) \ (\x. g x \ 0))" (is "?lhs = ?rhs") proof assume ?lhs - then obtain a where a: "homotopic_with (\h. True) S (-{0}) f (\t. a)" .. + then obtain a where a: "homotopic_with_canon (\h. True) S (-{0}) f (\t. a)" .. show ?rhs proof (cases "S = {}") case True @@ -5403,8 +5404,8 @@ assumes T: "path_connected T" and "\S. S \ \ \ closedin (top_of_set (\\)) S" and "\S. S \ \ \ openin (top_of_set (\\)) S" - and hom: "\S. S \ \ \ \a. homotopic_with (\x. True) S T f (\x. a)" - obtains a where "homotopic_with (\x. True) (\\) T f (\x. a)" + and hom: "\S. S \ \ \ \a. homotopic_with_canon (\x. True) S T f (\x. a)" + obtains a where "homotopic_with_canon (\x. True) (\\) T f (\x. a)" proof (cases "\\ = {}") case True with that show ?thesis @@ -5415,16 +5416,16 @@ by blast then obtain a where clo: "closedin (top_of_set (\\)) C" and ope: "openin (top_of_set (\\)) C" - and "homotopic_with (\x. True) C T f (\x. a)" + and "homotopic_with_canon (\x. True) C T f (\x. a)" using assms by blast with \C \ {}\ have "f ` C \ T" "a \ T" using homotopic_with_imp_subset1 homotopic_with_imp_subset2 by blast+ - have "homotopic_with (\x. True) (\\) T f (\x. a)" + have "homotopic_with_canon (\x. True) (\\) T f (\x. a)" proof (rule homotopic_on_clopen_Union) show "\S. S \ \ \ closedin (top_of_set (\\)) S" "\S. S \ \ \ openin (top_of_set (\\)) S" by (simp_all add: assms) - show "homotopic_with (\x. True) S T f (\x. a)" if "S \ \" for S + show "homotopic_with_canon (\x. True) S T f (\x. a)" if "S \ \" for S proof (cases "S = {}") case True then show ?thesis @@ -5433,12 +5434,13 @@ case False then obtain b where "b \ S" by blast - obtain c where c: "homotopic_with (\x. True) S T f (\x. c)" + obtain c where c: "homotopic_with_canon (\x. True) S T f (\x. c)" using \S \ \\ hom by blast then have "c \ T" using \b \ S\ homotopic_with_imp_subset2 by blast - then have "homotopic_with (\x. True) S T (\x. a) (\x. c)" - using T \a \ T\ homotopic_constant_maps path_connected_component by blast + then have "homotopic_with_canon (\x. True) S T (\x. a) (\x. c)" + using T \a \ T\ homotopic_constant_maps path_connected_component + by (simp add: homotopic_constant_maps path_connected_component) then show ?thesis using c homotopic_with_symD homotopic_with_trans by blast qed diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Homeomorphism.thy --- a/src/HOL/Analysis/Homeomorphism.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Homeomorphism.thy Tue Mar 26 17:01:55 2019 +0000 @@ -1861,7 +1861,7 @@ show "topspace ?X \ (\i\U. {0..1} \ V i)" using V by force show "\i. i \ U \ openin (top_of_set ({0..1} \ U)) ({0..1} \ V i)" - by (simp add: opeV openin_Times) + by (simp add: Abstract_Topology.openin_Times opeV) show "\i. i \ U \ continuous_map (subtopology (top_of_set ({0..1} \ U)) ({0..1} \ V i)) euclidean (fs i)" using contfs @@ -1949,7 +1949,7 @@ and contg: "continuous_on U g" and gim: "g ` U \ C" and pgeq: "\y. y \ U \ p(g y) = f y" - and hom: "homotopic_with (\x. True) U S f f'" + and hom: "homotopic_with_canon (\x. True) U S f f'" obtains g' where "continuous_on U g'" "image g' U \ C" "\y. y \ U \ p(g' y) = f' y" proof - obtain h where conth: "continuous_on ({0..1::real} \ U) h" @@ -1978,7 +1978,7 @@ corollary covering_space_lift_inessential_function: fixes p :: "'a::real_normed_vector \ 'b::real_normed_vector" and U :: "'c::real_normed_vector set" assumes cov: "covering_space C p S" - and hom: "homotopic_with (\x. True) U S f (\x. a)" + and hom: "homotopic_with_canon (\x. True) U S f (\x. a)" obtains g where "continuous_on U g" "g ` U \ C" "\y. y \ U \ p(g y) = f y" proof (cases "U = {}") case True diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Homotopy.thy --- a/src/HOL/Analysis/Homotopy.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Homotopy.thy Tue Mar 26 17:01:55 2019 +0000 @@ -5,172 +5,299 @@ section \Homotopy of Maps\ theory Homotopy - imports Path_Connected Continuum_Not_Denumerable + imports Path_Connected Continuum_Not_Denumerable Product_Topology begin -definition%important homotopic_with :: - "[('a::topological_space \ 'b::topological_space) \ bool, 'a set, 'b set, 'a \ 'b, 'a \ 'b] \ bool" +definition%important homotopic_with where - "homotopic_with P X Y p q \ - (\h:: real \ 'a \ 'b. - continuous_on ({0..1} \ X) h \ - h ` ({0..1} \ X) \ Y \ - (\x. h(0, x) = p x) \ - (\x. h(1, x) = q x) \ - (\t \ {0..1}. P(\x. h(t, x))))" + "homotopic_with P X Y f g \ + (\h. continuous_map (prod_topology (subtopology euclideanreal {0..1}) X) Y h \ + (\x. h(0, x) = f x) \ + (\x. h(1, x) = g x) \ + (\t \ {0..1}. P(\x. h(t,x))))" text\\p\, \q\ are functions \X \ Y\, and the property \P\ restricts all intermediate maps. We often just want to require that \P\ fixes some subset, but to include the case of a loop homotopy, it is convenient to have a general property \P\.\ +abbreviation homotopic_with_canon :: + "[('a::topological_space \ 'b::topological_space) \ bool, 'a set, 'b set, 'a \ 'b, 'a \ 'b] \ bool" +where + "homotopic_with_canon P S T p q \ homotopic_with P (top_of_set S) (top_of_set T) p q" + +lemma split_01: "{0..1::real} = {0..1/2} \ {1/2..1}" + by force + +lemma split_01_prod: "{0..1::real} \ X = ({0..1/2} \ X) \ ({1/2..1} \ X)" + by force + +lemma image_Pair_const: "(\x. (x, c)) ` A = A \ {c}" + by auto + +lemma fst_o_paired [simp]: "fst \ (\(x,y). (f x y, g x y)) = (\(x,y). f x y)" + by auto + +lemma snd_o_paired [simp]: "snd \ (\(x,y). (f x y, g x y)) = (\(x,y). g x y)" + by auto + +lemma continuous_on_o_Pair: "\continuous_on (T \ X) h; t \ T\ \ continuous_on X (h \ Pair t)" + by (fast intro: continuous_intros elim!: continuous_on_subset) + +lemma continuous_map_o_Pair: + assumes h: "continuous_map (prod_topology X Y) Z h" and t: "t \ topspace X" + shows "continuous_map Y Z (h \ Pair t)" + apply (intro continuous_map_compose [OF _ h] continuous_map_id [unfolded id_def] continuous_intros) + apply (simp add: t) + done + +subsection%unimportant\Trivial properties\ + text \We often want to just localize the ending function equality or whatever.\ text%important \%whitespace\ proposition homotopic_with: - fixes X :: "'a::topological_space set" and Y :: "'b::topological_space set" - assumes "\h k. (\x. x \ X \ h x = k x) \ (P h \ P k)" + assumes "\h k. (\x. x \ topspace X \ h x = k x) \ (P h \ P k)" shows "homotopic_with P X Y p q \ - (\h :: real \ 'a \ 'b. - continuous_on ({0..1} \ X) h \ - h ` ({0..1} \ X) \ Y \ - (\x \ X. h(0,x) = p x) \ - (\x \ X. h(1,x) = q x) \ + (\h. continuous_map (prod_topology (subtopology euclideanreal {0..1}) X) Y h \ + (\x \ topspace X. h(0,x) = p x) \ + (\x \ topspace X. h(1,x) = q x) \ (\t \ {0..1}. P(\x. h(t, x))))" unfolding homotopic_with_def apply (rule iffI, blast, clarify) - apply (rule_tac x="\(u,v). if v \ X then h(u,v) else if u = 0 then p v else q v" in exI) + apply (rule_tac x="\(u,v). if v \ topspace X then h(u,v) else if u = 0 then p v else q v" in exI) apply auto - apply (force elim: continuous_on_eq) + using continuous_map_eq apply fastforce apply (drule_tac x=t in bspec, force) apply (subst assms; simp) done -proposition homotopic_with_eq: - assumes h: "homotopic_with P X Y f g" - and f': "\x. x \ X \ f' x = f x" - and g': "\x. x \ X \ g' x = g x" - and P: "(\h k. (\x. x \ X \ h x = k x) \ (P h \ P k))" - shows "homotopic_with P X Y f' g'" - using h unfolding homotopic_with_def - apply safe - apply (rule_tac x="\(u,v). if v \ X then h(u,v) else if u = 0 then f' v else g' v" in exI) - apply (simp add: f' g', safe) - apply (fastforce intro: continuous_on_eq, fastforce) - apply (subst P; fastforce) +lemma homotopic_with_mono: + assumes hom: "homotopic_with P X Y f g" + and Q: "\h. \continuous_map X Y h; P h\ \ Q h" + shows "homotopic_with Q X Y f g" + using hom + apply (simp add: homotopic_with_def) + apply (erule ex_forward) + apply (force simp: o_def dest: continuous_map_o_Pair intro: Q) done -proposition homotopic_with_equal: - assumes contf: "continuous_on X f" and fXY: "f ` X \ Y" - and gf: "\x. x \ X \ g x = f x" - and P: "P f" "P g" - shows "homotopic_with P X Y f g" +lemma homotopic_with_imp_continuous_maps: + assumes "homotopic_with P X Y f g" + shows "continuous_map X Y f \ continuous_map X Y g" +proof - + obtain h + where conth: "continuous_map (prod_topology (subtopology euclideanreal {0..1}) X) Y h" + and h: "\x. h (0, x) = f x" "\x. h (1, x) = g x" + using assms by (auto simp: homotopic_with_def) + have *: "t \ {0..1} \ continuous_map X Y (h \ (\x. (t,x)))" for t + by (rule continuous_map_compose [OF _ conth]) (simp add: o_def continuous_map_pairwise) + show ?thesis + using h *[of 0] *[of 1] by (simp add: continuous_map_eq) +qed + +lemma homotopic_with_imp_continuous: + assumes "homotopic_with_canon P X Y f g" + shows "continuous_on X f \ continuous_on X g" + by (meson assms continuous_map_subtopology_eu homotopic_with_imp_continuous_maps) + +lemma homotopic_with_imp_property: + assumes "homotopic_with P X Y f g" + shows "P f \ P g" +proof + obtain h where h: "\x. h(0, x) = f x" "\x. h(1, x) = g x" and P: "\t. t \ {0..1::real} \ P(\x. h(t,x))" + using assms by (force simp: homotopic_with_def) + show "P f" "P g" + using P [of 0] P [of 1] by (force simp: h)+ +qed + +lemma homotopic_with_equal: + assumes "P f" "P g" and contf: "continuous_map X Y f" and fg: "\x. x \ topspace X \ f x = g x" + shows "homotopic_with P X Y f g" unfolding homotopic_with_def - apply (rule_tac x="\(u,v). if u = 1 then g v else f v" in exI) - using assms - apply (intro conjI) - apply (rule continuous_on_eq [where f = "f \ snd"]) - apply (rule continuous_intros | force)+ - apply clarify - apply (case_tac "t=1"; force) +proof (intro exI conjI allI ballI) + let ?h = "\(t::real,x). if t = 1 then g x else f x" + show "continuous_map (prod_topology (subtopology euclideanreal {0..1}) X) Y ?h" + proof (rule continuous_map_eq) + show "continuous_map (prod_topology (subtopology euclideanreal {0..1}) X) Y (f \ snd)" + by (simp add: contf continuous_map_of_snd) + qed (auto simp: fg) + show "P (\x. ?h (t, x))" if "t \ {0..1}" for t + by (cases "t = 1") (simp_all add: assms) +qed auto + +lemma homotopic_with_imp_subset1: + "homotopic_with_canon P X Y f g \ f ` X \ Y" + by (simp add: homotopic_with_def image_subset_iff) (metis atLeastAtMost_iff order_refl zero_le_one) + +lemma homotopic_with_imp_subset2: + "homotopic_with_canon P X Y f g \ g ` X \ Y" + by (simp add: homotopic_with_def image_subset_iff) (metis atLeastAtMost_iff order_refl zero_le_one) + +lemma homotopic_with_subset_left: + "\homotopic_with_canon P X Y f g; Z \ X\ \ homotopic_with_canon P Z Y f g" + apply (simp add: homotopic_with_def) + apply (fast elim!: continuous_on_subset ex_forward) + done + +lemma homotopic_with_subset_right: + "\homotopic_with_canon P X Y f g; Y \ Z\ \ homotopic_with_canon P X Z f g" + apply (simp add: homotopic_with_def) + apply (fast elim!: continuous_on_subset ex_forward) done - -lemma image_Pair_const: "(\x. (x, c)) ` A = A \ {c}" - by auto - -lemma homotopic_constant_maps: - "homotopic_with (\x. True) s t (\x. a) (\x. b) \ s = {} \ path_component t a b" -proof (cases "s = {} \ t = {}") - case True with continuous_on_const show ?thesis - by (auto simp: homotopic_with path_component_def) -next - case False - then obtain c where "c \ s" by blast +subsection\Homotopy with P is an equivalence relation\ + +text \(on continuous functions mapping X into Y that satisfy P, though this only affects reflexivity)\ + +lemma homotopic_with_refl [simp]: "homotopic_with P X Y f f \ continuous_map X Y f \ P f" + by (auto simp: homotopic_with_imp_continuous_maps intro: homotopic_with_equal dest: homotopic_with_imp_property) + +lemma homotopic_with_symD: + assumes "homotopic_with P X Y f g" + shows "homotopic_with P X Y g f" +proof - + let ?I01 = "subtopology euclideanreal {0..1}" + let ?j = "\y. (1 - fst y, snd y)" + have 1: "continuous_map (prod_topology ?I01 X) (prod_topology euclideanreal X) ?j" + apply (intro continuous_intros) + apply (simp_all add: prod_topology_subtopology continuous_map_from_subtopology [OF continuous_map_fst]) + done + have *: "continuous_map (prod_topology ?I01 X) (prod_topology ?I01 X) ?j" + proof - + have "continuous_map (prod_topology ?I01 X) (subtopology (prod_topology euclideanreal X) ({0..1} \ topspace X)) ?j" + by (simp add: continuous_map_into_subtopology [OF 1] image_subset_iff) + then show ?thesis + by (simp add: prod_topology_subtopology(1)) + qed show ?thesis - proof - assume "homotopic_with (\x. True) s t (\x. a) (\x. b)" - then obtain h :: "real \ 'a \ 'b" - where conth: "continuous_on ({0..1} \ s) h" - and h: "h ` ({0..1} \ s) \ t" "(\x\s. h (0, x) = a)" "(\x\s. h (1, x) = b)" - by (auto simp: homotopic_with) - have "continuous_on {0..1} (h \ (\t. (t, c)))" - apply (rule continuous_intros conth | simp add: image_Pair_const)+ - apply (blast intro: \c \ s\ continuous_on_subset [OF conth]) - done - with \c \ s\ h show "s = {} \ path_component t a b" - apply (simp_all add: homotopic_with path_component_def, auto) - apply (drule_tac x="h \ (\t. (t, c))" in spec) - apply (auto simp: pathstart_def pathfinish_def path_image_def path_def) - done - next - assume "s = {} \ path_component t a b" - with False show "homotopic_with (\x. True) s t (\x. a) (\x. b)" - apply (clarsimp simp: homotopic_with path_component_def pathstart_def pathfinish_def path_image_def path_def) - apply (rule_tac x="g \ fst" in exI) - apply (rule conjI continuous_intros | force)+ + using assms + apply (clarsimp simp add: homotopic_with_def) + apply (rename_tac h) + apply (rule_tac x="h \ (\y. (1 - fst y, snd y))" in exI) + apply (simp add: continuous_map_compose [OF *]) + done +qed + +lemma homotopic_with_sym: + "homotopic_with P X Y f g \ homotopic_with P X Y g f" + by (metis homotopic_with_symD) + +proposition homotopic_with_trans: + assumes "homotopic_with P X Y f g" "homotopic_with P X Y g h" + shows "homotopic_with P X Y f h" +proof - + let ?X01 = "prod_topology (subtopology euclideanreal {0..1}) X" + obtain k1 k2 + where contk1: "continuous_map ?X01 Y k1" and contk2: "continuous_map ?X01 Y k2" + and k12: "\x. k1 (1, x) = g x" "\x. k2 (0, x) = g x" + "\x. k1 (0, x) = f x" "\x. k2 (1, x) = h x" + and P: "\t\{0..1}. P (\x. k1 (t, x))" "\t\{0..1}. P (\x. k2 (t, x))" + using assms by (auto simp: homotopic_with_def) + define k where "k \ \y. if fst y \ 1/2 + then (k1 \ (\x. (2 *\<^sub>R fst x, snd x))) y + else (k2 \ (\x. (2 *\<^sub>R fst x -1, snd x))) y" + have keq: "k1 (2 * u, v) = k2 (2 * u -1, v)" if "u = 1/2" for u v + by (simp add: k12 that) + show ?thesis + unfolding homotopic_with_def + proof (intro exI conjI) + show "continuous_map ?X01 Y k" + unfolding k_def + proof (rule continuous_map_cases_le) + show fst: "continuous_map ?X01 euclideanreal fst" + using continuous_map_fst continuous_map_in_subtopology by blast + show "continuous_map ?X01 euclideanreal (\x. 1/2)" + by simp + show "continuous_map (subtopology ?X01 {y \ topspace ?X01. fst y \ 1/2}) Y + (k1 \ (\x. (2 *\<^sub>R fst x, snd x)))" + apply (rule fst continuous_map_compose [OF _ contk1] continuous_intros continuous_map_into_subtopology | simp)+ + apply (intro continuous_intros fst continuous_map_from_subtopology) + apply (force simp: prod_topology_subtopology) + using continuous_map_snd continuous_map_from_subtopology by blast + show "continuous_map (subtopology ?X01 {y \ topspace ?X01. 1/2 \ fst y}) Y + (k2 \ (\x. (2 *\<^sub>R fst x -1, snd x)))" + apply (rule fst continuous_map_compose [OF _ contk2] continuous_intros continuous_map_into_subtopology | simp)+ + apply (rule continuous_intros fst continuous_map_from_subtopology | simp)+ + apply (force simp: topspace_subtopology prod_topology_subtopology) + using continuous_map_snd continuous_map_from_subtopology by blast + show "(k1 \ (\x. (2 *\<^sub>R fst x, snd x))) y = (k2 \ (\x. (2 *\<^sub>R fst x -1, snd x))) y" + if "y \ topspace ?X01" and "fst y = 1/2" for y + using that by (simp add: keq) + qed + show "\x. k (0, x) = f x" + by (simp add: k12 k_def) + show "\x. k (1, x) = h x" + by (simp add: k12 k_def) + show "\t\{0..1}. P (\x. k (t, x))" + using P + apply (clarsimp simp add: k_def) + apply (case_tac "t \ 1/2", auto) done qed qed - -subsection%unimportant\Trivial properties\ - -lemma homotopic_with_imp_property: "homotopic_with P X Y f g \ P f \ P g" - unfolding homotopic_with_def Ball_def +lemma homotopic_with_id2: + "(\x. x \ topspace X \ g (f x) = x) \ homotopic_with (\x. True) X X (g \ f) id" + by (metis comp_apply continuous_map_id eq_id_iff homotopic_with_equal homotopic_with_symD) + +subsection\Continuity lemmas\ + +lemma homotopic_with_compose_continuous_map_left: + "\homotopic_with p X1 X2 f g; continuous_map X2 X3 h; \j. p j \ q(h \ j)\ + \ homotopic_with q X1 X3 (h \ f) (h \ g)" + unfolding homotopic_with_def apply clarify - apply (frule_tac x=0 in spec) - apply (drule_tac x=1 in spec, auto) + apply (rename_tac k) + apply (rule_tac x="h \ k" in exI) + apply (rule conjI continuous_map_compose | simp add: o_def)+ done -lemma continuous_on_o_Pair: "\continuous_on (T \ X) h; t \ T\ \ continuous_on X (h \ Pair t)" - by (fast intro: continuous_intros elim!: continuous_on_subset) - -lemma homotopic_with_imp_continuous: - assumes "homotopic_with P X Y f g" - shows "continuous_on X f \ continuous_on X g" +lemma homotopic_compose_continuous_map_left: + "\homotopic_with (\k. True) X1 X2 f g; continuous_map X2 X3 h\ + \ homotopic_with (\k. True) X1 X3 (h \ f) (h \ g)" + by (simp add: homotopic_with_compose_continuous_map_left) + +lemma homotopic_with_compose_continuous_map_right: + assumes hom: "homotopic_with p X2 X3 f g" and conth: "continuous_map X1 X2 h" + and q: "\j. p j \ q(j \ h)" + shows "homotopic_with q X1 X3 (f \ h) (g \ h)" proof - - obtain h :: "real \ 'a \ 'b" - where conth: "continuous_on ({0..1} \ X) h" - and h: "\x. h (0, x) = f x" "\x. h (1, x) = g x" - using assms by (auto simp: homotopic_with_def) - have *: "t \ {0..1} \ continuous_on X (h \ (\x. (t,x)))" for t - by (rule continuous_intros continuous_on_subset [OF conth] | force)+ + obtain k + where contk: "continuous_map (prod_topology (subtopology euclideanreal {0..1}) X2) X3 k" + and k: "\x. k (0, x) = f x" "\x. k (1, x) = g x" and p: "\t. t\{0..1} \ p (\x. k (t, x))" + using hom unfolding homotopic_with_def by blast + have hsnd: "continuous_map (prod_topology (subtopology euclideanreal {0..1}) X1) X2 (h \ snd)" + by (rule continuous_map_compose [OF continuous_map_snd conth]) + let ?h = "k \ (\(t,x). (t,h x))" show ?thesis - using h *[of 0] *[of 1] by auto + unfolding homotopic_with_def + proof (intro exI conjI allI ballI) + have "continuous_map (prod_topology (top_of_set {0..1}) X1) + (prod_topology (top_of_set {0..1::real}) X2) (\(t, x). (t, h x))" + by (metis (mono_tags, lifting) case_prod_beta' comp_def continuous_map_eq continuous_map_fst continuous_map_pairedI hsnd) + then show "continuous_map (prod_topology (subtopology euclideanreal {0..1}) X1) X3 ?h" + by (intro conjI continuous_map_compose [OF _ contk]) + show "q (\x. ?h (t, x))" if "t \ {0..1}" for t + using q [OF p [OF that]] by (simp add: o_def) + qed (auto simp: k) qed -proposition homotopic_with_imp_subset1: - "homotopic_with P X Y f g \ f ` X \ Y" - by (simp add: homotopic_with_def image_subset_iff) (metis atLeastAtMost_iff order_refl zero_le_one) - -proposition homotopic_with_imp_subset2: - "homotopic_with P X Y f g \ g ` X \ Y" - by (simp add: homotopic_with_def image_subset_iff) (metis atLeastAtMost_iff order_refl zero_le_one) - -proposition homotopic_with_mono: - assumes hom: "homotopic_with P X Y f g" - and Q: "\h. \continuous_on X h; image h X \ Y \ P h\ \ Q h" - shows "homotopic_with Q X Y f g" - using hom - apply (simp add: homotopic_with_def) - apply (erule ex_forward) - apply (force simp: intro!: Q dest: continuous_on_o_Pair) - done - -proposition homotopic_with_subset_left: - "\homotopic_with P X Y f g; Z \ X\ \ homotopic_with P Z Y f g" - apply (simp add: homotopic_with_def) - apply (fast elim!: continuous_on_subset ex_forward) - done - -proposition homotopic_with_subset_right: - "\homotopic_with P X Y f g; Y \ Z\ \ homotopic_with P X Z f g" - apply (simp add: homotopic_with_def) - apply (fast elim!: continuous_on_subset ex_forward) - done +lemma homotopic_compose_continuous_map_right: + "\homotopic_with (\k. True) X2 X3 f g; continuous_map X1 X2 h\ + \ homotopic_with (\k. True) X1 X3 (f \ h) (g \ h)" + by (meson homotopic_with_compose_continuous_map_right) + +corollary homotopic_compose: + shows "\homotopic_with (\x. True) X Y f f'; homotopic_with (\x. True) Y Z g g'\ + \ homotopic_with (\x. True) X Z (g \ f) (g' \ f')" + apply (rule homotopic_with_trans [where g = "g \ f'"]) + apply (simp add: homotopic_compose_continuous_map_left homotopic_with_imp_continuous_maps) + by (simp add: homotopic_compose_continuous_map_right homotopic_with_imp_continuous_maps) + + proposition homotopic_with_compose_continuous_right: - "\homotopic_with (\f. p (f \ h)) X Y f g; continuous_on W h; h ` W \ X\ - \ homotopic_with p W Y (f \ h) (g \ h)" + "\homotopic_with_canon (\f. p (f \ h)) X Y f g; continuous_on W h; h ` W \ X\ + \ homotopic_with_canon p W Y (f \ h) (g \ h)" apply (clarsimp simp add: homotopic_with_def) apply (rename_tac k) apply (rule_tac x="k \ (\y. (fst y, h (snd y)))" in exI) @@ -180,13 +307,13 @@ done proposition homotopic_compose_continuous_right: - "\homotopic_with (\f. True) X Y f g; continuous_on W h; h ` W \ X\ - \ homotopic_with (\f. True) W Y (f \ h) (g \ h)" + "\homotopic_with_canon (\f. True) X Y f g; continuous_on W h; h ` W \ X\ + \ homotopic_with_canon (\f. True) W Y (f \ h) (g \ h)" using homotopic_with_compose_continuous_right by fastforce proposition homotopic_with_compose_continuous_left: - "\homotopic_with (\f. p (h \ f)) X Y f g; continuous_on Y h; h ` Y \ Z\ - \ homotopic_with p X Z (h \ f) (h \ g)" + "\homotopic_with_canon (\f. p (h \ f)) X Y f g; continuous_on Y h; h ` Y \ Z\ + \ homotopic_with_canon p X Z (h \ f) (h \ g)" apply (clarsimp simp add: homotopic_with_def) apply (rename_tac k) apply (rule_tac x="h \ k" in exI) @@ -196,150 +323,171 @@ done proposition homotopic_compose_continuous_left: - "\homotopic_with (\_. True) X Y f g; + "\homotopic_with_canon (\_. True) X Y f g; continuous_on Y h; h ` Y \ Z\ - \ homotopic_with (\f. True) X Z (h \ f) (h \ g)" + \ homotopic_with_canon (\f. True) X Z (h \ f) (h \ g)" using homotopic_with_compose_continuous_left by fastforce -proposition homotopic_with_Pair: - assumes hom: "homotopic_with p s t f g" "homotopic_with p' s' t' f' g'" - and q: "\f g. \p f; p' g\ \ q(\(x,y). (f x, g y))" - shows "homotopic_with q (s \ s') (t \ t') - (\(x,y). (f x, f' y)) (\(x,y). (g x, g' y))" - using hom - apply (clarsimp simp add: homotopic_with_def) - apply (rename_tac k k') - apply (rule_tac x="\z. ((k \ (\x. (fst x, fst (snd x)))) z, (k' \ (\x. (fst x, snd (snd x)))) z)" in exI) - apply (rule conjI continuous_intros | erule continuous_on_subset | clarsimp)+ - apply (auto intro!: q [unfolded case_prod_unfold]) - done - -lemma homotopic_on_empty [simp]: "homotopic_with (\x. True) {} t f g" - by (metis continuous_on_def empty_iff homotopic_with_equal image_subset_iff) - - -text\Homotopy with P is an equivalence relation (on continuous functions mapping X into Y that satisfy P, - though this only affects reflexivity.\ - - -proposition homotopic_with_refl: - "homotopic_with P X Y f f \ continuous_on X f \ image f X \ Y \ P f" - apply (rule iffI) - using homotopic_with_imp_continuous homotopic_with_imp_property homotopic_with_imp_subset2 apply blast - apply (simp add: homotopic_with_def) - apply (rule_tac x="f \ snd" in exI) - apply (rule conjI continuous_intros | force)+ - done - -lemma homotopic_with_symD: - fixes X :: "'a::real_normed_vector set" - assumes "homotopic_with P X Y f g" - shows "homotopic_with P X Y g f" - using assms - apply (clarsimp simp add: homotopic_with_def) - apply (rename_tac h) - apply (rule_tac x="h \ (\y. (1 - fst y, snd y))" in exI) - apply (rule conjI continuous_intros | erule continuous_on_subset | force simp: image_subset_iff)+ +lemma homotopic_from_subtopology: + "homotopic_with P X X' f g \ homotopic_with P (subtopology X s) X' f g" + unfolding homotopic_with_def + apply (erule ex_forward) + by (simp add: continuous_map_from_subtopology prod_topology_subtopology(2)) + +lemma homotopic_on_emptyI: + assumes "topspace X = {}" "P f" "P g" + shows "homotopic_with P X X' f g" + unfolding homotopic_with_def +proof (intro exI conjI ballI) + show "P (\x. (\(t,x). if t = 0 then f x else g x) (t, x))" if "t \ {0..1}" for t::real + by (cases "t = 0", auto simp: assms) +qed (auto simp: continuous_map_atin assms) + +lemma homotopic_on_empty: + "topspace X = {} \ (homotopic_with P X X' f g \ P f \ P g)" + using homotopic_on_emptyI homotopic_with_imp_property by metis + +lemma homotopic_with_canon_on_empty [simp]: "homotopic_with_canon (\x. True) {} t f g" + by (auto intro: homotopic_with_equal) + +lemma homotopic_constant_maps: + "homotopic_with (\x. True) X X' (\x. a) (\x. b) \ + topspace X = {} \ path_component_of X' a b" (is "?lhs = ?rhs") +proof (cases "topspace X = {}") + case False + then obtain c where c: "c \ topspace X" + by blast + have "\g. continuous_map (top_of_set {0..1::real}) X' g \ g 0 = a \ g 1 = b" + if "x \ topspace X" and hom: "homotopic_with (\x. True) X X' (\x. a) (\x. b)" for x + proof - + obtain h :: "real \ 'a \ 'b" + where conth: "continuous_map (prod_topology (top_of_set {0..1}) X) X' h" + and h: "\x. h (0, x) = a" "\x. h (1, x) = b" + using hom by (auto simp: homotopic_with_def) + have cont: "continuous_map (top_of_set {0..1}) X' (h \ (\t. (t, c)))" + apply (rule continuous_map_compose [OF _ conth]) + apply (rule continuous_intros c | simp)+ + done + then show ?thesis + by (force simp: h) + qed + moreover have "homotopic_with (\x. True) X X' (\x. g 0) (\x. g 1)" + if "x \ topspace X" "a = g 0" "b = g 1" "continuous_map (top_of_set {0..1}) X' g" + for x and g :: "real \ 'b" + unfolding homotopic_with_def + by (force intro!: continuous_map_compose continuous_intros c that) + ultimately show ?thesis + using False by (auto simp: path_component_of_def pathin_def) +qed (simp add: homotopic_on_empty) + +proposition homotopic_with_eq: + assumes h: "homotopic_with P X Y f g" + and f': "\x. x \ topspace X \ f' x = f x" + and g': "\x. x \ topspace X \ g' x = g x" + and P: "(\h k. (\x. x \ topspace X \ h x = k x) \ P h \ P k)" + shows "homotopic_with P X Y f' g'" + using h unfolding homotopic_with_def + apply safe + apply (rule_tac x="\(u,v). if v \ topspace X then h(u,v) else if u = 0 then f' v else g' v" in exI) + apply (simp add: f' g', safe) + apply (fastforce intro: continuous_map_eq) + apply (subst P; fastforce) done -proposition homotopic_with_sym: - fixes X :: "'a::real_normed_vector set" - shows "homotopic_with P X Y f g \ homotopic_with P X Y g f" - using homotopic_with_symD by blast - -lemma split_01: "{0..1::real} = {0..1/2} \ {1/2..1}" - by force - -lemma split_01_prod: "{0..1::real} \ X = ({0..1/2} \ X) \ ({1/2..1} \ X)" - by force - -proposition homotopic_with_trans: - fixes X :: "'a::real_normed_vector set" - assumes "homotopic_with P X Y f g" and "homotopic_with P X Y g h" - shows "homotopic_with P X Y f h" +lemma homotopic_with_prod_topology: + assumes "homotopic_with p X1 Y1 f f'" and "homotopic_with q X2 Y2 g g'" + and r: "\i j. \p i; q j\ \ r(\(x,y). (i x, j y))" + shows "homotopic_with r (prod_topology X1 X2) (prod_topology Y1 Y2) + (\z. (f(fst z),g(snd z))) (\z. (f'(fst z), g'(snd z)))" proof - - have clo1: "closedin (top_of_set ({0..1/2} \ X \ {1/2..1} \ X)) ({0..1/2::real} \ X)" - apply (simp add: closedin_closed split_01_prod [symmetric]) - apply (rule_tac x="{0..1/2} \ UNIV" in exI) - apply (force simp: closed_Times) - done - have clo2: "closedin (top_of_set ({0..1/2} \ X \ {1/2..1} \ X)) ({1/2..1::real} \ X)" - apply (simp add: closedin_closed split_01_prod [symmetric]) - apply (rule_tac x="{1/2..1} \ UNIV" in exI) - apply (force simp: closed_Times) - done - { fix k1 k2:: "real \ 'a \ 'b" - assume cont: "continuous_on ({0..1} \ X) k1" "continuous_on ({0..1} \ X) k2" - and Y: "k1 ` ({0..1} \ X) \ Y" "k2 ` ({0..1} \ X) \ Y" - and geq: "\x. k1 (1, x) = g x" "\x. k2 (0, x) = g x" - and k12: "\x. k1 (0, x) = f x" "\x. k2 (1, x) = h x" - and P: "\t\{0..1}. P (\x. k1 (t, x))" "\t\{0..1}. P (\x. k2 (t, x))" - define k where "k y = - (if fst y \ 1 / 2 - then (k1 \ (\x. (2 *\<^sub>R fst x, snd x))) y - else (k2 \ (\x. (2 *\<^sub>R fst x -1, snd x))) y)" for y - have keq: "k1 (2 * u, v) = k2 (2 * u - 1, v)" if "u = 1/2" for u v - by (simp add: geq that) - have "continuous_on ({0..1} \ X) k" - using cont - apply (simp add: split_01_prod k_def) - apply (rule clo1 clo2 continuous_on_cases_local continuous_intros | erule continuous_on_subset | simp add: linear image_subset_iff)+ - apply (force simp: keq) + obtain h + where h: "continuous_map (prod_topology (subtopology euclideanreal {0..1}) X1) Y1 h" + and h0: "\x. h (0, x) = f x" + and h1: "\x. h (1, x) = f' x" + and p: "\t. \0 \ t; t \ 1\ \ p (\x. h (t,x))" + using assms unfolding homotopic_with_def by auto + obtain k + where k: "continuous_map (prod_topology (subtopology euclideanreal {0..1}) X2) Y2 k" + and k0: "\x. k (0, x) = g x" + and k1: "\x. k (1, x) = g' x" + and q: "\t. \0 \ t; t \ 1\ \ q (\x. k (t,x))" + using assms unfolding homotopic_with_def by auto + let ?hk = "\(t,x,y). (h(t,x), k(t,y))" + show ?thesis + unfolding homotopic_with_def + proof (intro conjI allI exI) + show "continuous_map (prod_topology (subtopology euclideanreal {0..1}) (prod_topology X1 X2)) + (prod_topology Y1 Y2) ?hk" + unfolding continuous_map_pairwise case_prod_unfold + by (rule conjI continuous_map_pairedI continuous_intros continuous_map_id [unfolded id_def] + continuous_map_fst_of [unfolded o_def] continuous_map_snd_of [unfolded o_def] + continuous_map_compose [OF _ h, unfolded o_def] + continuous_map_compose [OF _ k, unfolded o_def])+ + next + fix x + show "?hk (0, x) = (f (fst x), g (snd x))" "?hk (1, x) = (f' (fst x), g' (snd x))" + by (auto simp: case_prod_beta h0 k0 h1 k1) + qed (auto simp: p q r) +qed + + +lemma homotopic_with_product_topology: + assumes ht: "\i. i \ I \ homotopic_with (p i) (X i) (Y i) (f i) (g i)" + and pq: "\h. (\i. i \ I \ p i (h i)) \ q(\x. (\i\I. h i (x i)))" + shows "homotopic_with q (product_topology X I) (product_topology Y I) + (\z. (\i\I. (f i) (z i))) (\z. (\i\I. (g i) (z i)))" +proof - + obtain h + where h: "\i. i \ I \ continuous_map (prod_topology (subtopology euclideanreal {0..1}) (X i)) (Y i) (h i)" + and h0: "\i x. i \ I \ h i (0, x) = f i x" + and h1: "\i x. i \ I \ h i (1, x) = g i x" + and p: "\i t. \i \ I; t \ {0..1}\ \ p i (\x. h i (t,x))" + using ht unfolding homotopic_with_def by metis + show ?thesis + unfolding homotopic_with_def + proof (intro conjI allI exI) + let ?h = "\(t,z). \i\I. h i (t,z i)" + have "continuous_map (prod_topology (subtopology euclideanreal {0..1}) (product_topology X I)) + (Y i) (\x. h i (fst x, snd x i))" if "i \ I" for i + unfolding continuous_map_pairwise case_prod_unfold + apply (intro conjI that continuous_intros continuous_map_compose [OF _ h, unfolded o_def]) + using continuous_map_componentwise continuous_map_snd that apply fastforce done - moreover have "k ` ({0..1} \ X) \ Y" - using Y by (force simp: k_def) - moreover have "\x. k (0, x) = f x" - by (simp add: k_def k12) - moreover have "(\x. k (1, x) = h x)" - by (simp add: k_def k12) - moreover have "\t\{0..1}. P (\x. k (t, x))" - using P - apply (clarsimp simp add: k_def) - apply (case_tac "t \ 1/2", auto) - done - ultimately have *: "\k :: real \ 'a \ 'b. - continuous_on ({0..1} \ X) k \ k ` ({0..1} \ X) \ Y \ - (\x. k (0, x) = f x) \ (\x. k (1, x) = h x) \ (\t\{0..1}. P (\x. k (t, x)))" - by blast - } note * = this - show ?thesis - using assms by (auto intro: * simp add: homotopic_with_def) + then show "continuous_map (prod_topology (subtopology euclideanreal {0..1}) (product_topology X I)) + (product_topology Y I) ?h" + by (auto simp: continuous_map_componentwise case_prod_beta) + show "?h (0, x) = (\i\I. f i (x i))" "?h (1, x) = (\i\I. g i (x i))" for x + by (auto simp: case_prod_beta h0 h1) + show "\t\{0..1}. q (\x. ?h (t, x))" + by (force intro: p pq) + qed qed -proposition homotopic_compose: - fixes s :: "'a::real_normed_vector set" - shows "\homotopic_with (\x. True) s t f f'; homotopic_with (\x. True) t u g g'\ - \ homotopic_with (\x. True) s u (g \ f) (g' \ f')" - apply (rule homotopic_with_trans [where g = "g \ f'"]) - apply (metis homotopic_compose_continuous_left homotopic_with_imp_continuous homotopic_with_imp_subset1) - by (metis homotopic_compose_continuous_right homotopic_with_imp_continuous homotopic_with_imp_subset2) - - text\Homotopic triviality implicitly incorporates path-connectedness.\ lemma homotopic_triviality: - fixes S :: "'a::real_normed_vector set" shows "(\f g. continuous_on S f \ f ` S \ T \ continuous_on S g \ g ` S \ T - \ homotopic_with (\x. True) S T f g) \ + \ homotopic_with_canon (\x. True) S T f g) \ (S = {} \ path_connected T) \ - (\f. continuous_on S f \ f ` S \ T \ (\c. homotopic_with (\x. True) S T f (\x. c)))" + (\f. continuous_on S f \ f ` S \ T \ (\c. homotopic_with_canon (\x. True) S T f (\x. c)))" (is "?lhs = ?rhs") proof (cases "S = {} \ T = {}") - case True then show ?thesis by auto + case True then show ?thesis + by (auto simp: homotopic_on_emptyI) next case False show ?thesis proof assume LHS [rule_format]: ?lhs have pab: "path_component T a b" if "a \ T" "b \ T" for a b proof - - have "homotopic_with (\x. True) S T (\x. a) (\x. b)" + have "homotopic_with_canon (\x. True) S T (\x. a) (\x. b)" by (simp add: LHS continuous_on_const image_subset_iff that) then show ?thesis - using False homotopic_constant_maps by blast + using False homotopic_constant_maps [of "top_of_set S" "top_of_set T" a b] by auto qed - moreover - have "\c. homotopic_with (\x. True) S T f (\x. c)" if "continuous_on S f" "f ` S \ T" for f - by (metis (full_types) False LHS equals0I homotopic_constant_maps homotopic_with_imp_continuous homotopic_with_imp_subset2 pab that) + moreover + have "\c. homotopic_with_canon (\x. True) S T f (\x. c)" if "continuous_on S f" "f ` S \ T" for f + using False LHS continuous_on_const that by blast ultimately show ?rhs by (simp add: path_connected_component) next @@ -350,15 +498,15 @@ proof clarify fix f g assume "continuous_on S f" "f ` S \ T" "continuous_on S g" "g ` S \ T" - obtain c d where c: "homotopic_with (\x. True) S T f (\x. c)" and d: "homotopic_with (\x. True) S T g (\x. d)" + obtain c d where c: "homotopic_with_canon (\x. True) S T f (\x. c)" and d: "homotopic_with_canon (\x. True) S T g (\x. d)" using False \continuous_on S f\ \f ` S \ T\ RHS \continuous_on S g\ \g ` S \ T\ by blast then have "c \ T" "d \ T" - using False homotopic_with_imp_subset2 by fastforce+ + using False homotopic_with_imp_continuous_maps by fastforce+ with T have "path_component T c d" using path_connected_component by blast - then have "homotopic_with (\x. True) S T (\x. c) (\x. d)" + then have "homotopic_with_canon (\x. True) S T (\x. c) (\x. d)" by (simp add: homotopic_constant_maps) - with c d show "homotopic_with (\x. True) S T f g" + with c d show "homotopic_with_canon (\x. True) S T f g" by (meson homotopic_with_symD homotopic_with_trans) qed qed @@ -371,7 +519,7 @@ definition%important homotopic_paths :: "['a set, real \ 'a, real \ 'a::topological_space] \ bool" where "homotopic_paths s p q \ - homotopic_with (\r. pathstart r = pathstart p \ pathfinish r = pathfinish p) {0..1} s p q" + homotopic_with_canon (\r. pathstart r = pathstart p \ pathfinish r = pathfinish p) {0..1} s p q" lemma homotopic_paths: "homotopic_paths s p q \ @@ -393,14 +541,14 @@ lemma homotopic_paths_imp_path: "homotopic_paths s p q \ path p \ path q" - using homotopic_paths_def homotopic_with_imp_continuous path_def by blast + using homotopic_paths_def homotopic_with_imp_continuous_maps path_def continuous_map_subtopology_eu by blast lemma homotopic_paths_imp_subset: "homotopic_paths s p q \ path_image p \ s \ path_image q \ s" - by (simp add: homotopic_paths_def homotopic_with_imp_subset1 homotopic_with_imp_subset2 path_image_def) + by (metis (mono_tags) continuous_map_subtopology_eu homotopic_paths_def homotopic_with_imp_continuous_maps path_image_def) proposition homotopic_paths_refl [simp]: "homotopic_paths s p p \ path p \ path_image p \ s" -by (simp add: homotopic_paths_def homotopic_with_refl path_def path_image_def) + by (simp add: homotopic_paths_def path_def path_image_def) proposition homotopic_paths_sym: "homotopic_paths s p q \ homotopic_paths s q p" by (metis (mono_tags) homotopic_paths_def homotopic_paths_imp_pathfinish homotopic_paths_imp_pathstart homotopic_with_symD) @@ -409,10 +557,16 @@ by (metis homotopic_paths_sym) proposition homotopic_paths_trans [trans]: - "\homotopic_paths s p q; homotopic_paths s q r\ \ homotopic_paths s p r" - apply (simp add: homotopic_paths_def) - apply (rule homotopic_with_trans, assumption) - by (metis (mono_tags, lifting) homotopic_with_imp_property homotopic_with_mono) + assumes "homotopic_paths s p q" "homotopic_paths s q r" + shows "homotopic_paths s p r" +proof - + have "pathstart q = pathstart p" "pathfinish q = pathfinish p" + using assms by (simp_all add: homotopic_paths_imp_pathstart homotopic_paths_imp_pathfinish) + then have "homotopic_with_canon (\f. pathstart f = pathstart p \ pathfinish f = pathfinish p) {0..1} s q r" + using \homotopic_paths s q r\ homotopic_paths_def by force + then show ?thesis + using assms homotopic_paths_def homotopic_with_trans by blast +qed proposition homotopic_paths_eq: "\path p; path_image p \ s; \t. t \ {0..1} \ p t = q t\ \ homotopic_paths s p q" @@ -460,7 +614,7 @@ qed lemma homotopic_paths_subset: "\homotopic_paths s p q; s \ t\ \ homotopic_paths t p q" - using homotopic_paths_def homotopic_with_subset_right by blast + unfolding homotopic_paths by fast text\ A slightly ad-hoc but useful lemma in constructing homotopies.\ @@ -514,9 +668,7 @@ proposition homotopic_paths_continuous_image: "\homotopic_paths s f g; continuous_on s h; h ` s \ t\ \ homotopic_paths t (h \ f) (h \ g)" unfolding homotopic_paths_def - apply (rule homotopic_with_compose_continuous_left [of _ _ _ s]) - apply (auto simp: pathstart_def pathfinish_def elim!: homotopic_with_mono) - done + by (simp add: homotopic_with_compose_continuous_map_left pathfinish_compose pathstart_compose) subsection\Group properties for homotopy of paths\ @@ -586,7 +738,7 @@ definition%important homotopic_loops :: "'a::topological_space set \ (real \ 'a) \ (real \ 'a) \ bool" where "homotopic_loops s p q \ - homotopic_with (\r. pathfinish r = pathstart r) {0..1} s p q" + homotopic_with_canon (\r. pathfinish r = pathstart r) {0..1} s p q" lemma homotopic_loops: "homotopic_loops s p q \ @@ -604,17 +756,17 @@ proposition homotopic_loops_imp_path: "homotopic_loops s p q \ path p \ path q" unfolding homotopic_loops_def path_def - using homotopic_with_imp_continuous by blast + using homotopic_with_imp_continuous_maps continuous_map_subtopology_eu by blast proposition homotopic_loops_imp_subset: "homotopic_loops s p q \ path_image p \ s \ path_image q \ s" unfolding homotopic_loops_def path_image_def - by (metis homotopic_with_imp_subset1 homotopic_with_imp_subset2) + by (meson continuous_map_subtopology_eu homotopic_with_imp_continuous_maps) proposition homotopic_loops_refl: "homotopic_loops s p p \ path p \ path_image p \ s \ pathfinish p = pathstart p" - by (simp add: homotopic_loops_def homotopic_with_refl path_image_def path_def) + by (simp add: homotopic_loops_def path_image_def path_def) proposition homotopic_loops_sym: "homotopic_loops s p q \ homotopic_loops s q p" by (simp add: homotopic_loops_def homotopic_with_sym) @@ -628,7 +780,7 @@ proposition homotopic_loops_subset: "\homotopic_loops s p q; s \ t\ \ homotopic_loops t p q" - by (simp add: homotopic_loops_def homotopic_with_subset_right) + by (fastforce simp add: homotopic_loops) proposition homotopic_loops_eq: "\path p; path_image p \ s; pathfinish p = pathstart p; \t. t \ {0..1} \ p(t) = q(t)\ @@ -642,16 +794,14 @@ proposition homotopic_loops_continuous_image: "\homotopic_loops s f g; continuous_on s h; h ` s \ t\ \ homotopic_loops t (h \ f) (h \ g)" unfolding homotopic_loops_def - apply (rule homotopic_with_compose_continuous_left) - apply (erule homotopic_with_mono) - by (simp add: pathfinish_def pathstart_def) + by (simp add: homotopic_with_compose_continuous_map_left pathfinish_def pathstart_def) subsection\Relations between the two variants of homotopy\ proposition homotopic_paths_imp_homotopic_loops: "\homotopic_paths s p q; pathfinish p = pathstart p; pathfinish q = pathstart p\ \ homotopic_loops s p q" - by (auto simp: homotopic_paths_def homotopic_loops_def intro: homotopic_with_mono) + by (auto simp: homotopic_with_def homotopic_paths_def homotopic_loops_def) proposition homotopic_loops_imp_homotopic_paths_null: assumes "homotopic_loops s p (linepath a a)" @@ -828,7 +978,7 @@ assumes contf: "continuous_on s f" and contg:"continuous_on s g" and sub: "\x. x \ s \ closed_segment (f x) (g x) \ t" - shows "homotopic_with (\z. True) s t f g" + shows "homotopic_with_canon (\z. True) s t f g" apply (simp add: homotopic_with_def) apply (rule_tac x="\y. ((1 - (fst y)) *\<^sub>R f(snd y) + (fst y) *\<^sub>R g(snd y))" in exI) apply (intro conjI) @@ -1208,7 +1358,7 @@ subsection\Contractible sets\ definition%important contractible where - "contractible S \ \a. homotopic_with (\x. True) S S id (\x. a)" + "contractible S \ \a. homotopic_with_canon (\x. True) S S id (\x. a)" proposition contractible_imp_simply_connected: fixes S :: "_::real_normed_vector set" @@ -1217,10 +1367,10 @@ case True then show ?thesis by force next case False - obtain a where a: "homotopic_with (\x. True) S S id (\x. a)" + obtain a where a: "homotopic_with_canon (\x. True) S S id (\x. a)" using assms by (force simp: contractible_def) then have "a \ S" - by (metis False homotopic_constant_maps homotopic_with_symD homotopic_with_trans path_component_mem(2)) + by (metis False homotopic_constant_maps homotopic_with_symD homotopic_with_trans path_component_in_topspace topspace_euclidean_subtopology) show ?thesis apply (simp add: simply_connected_eq_contractible_loop_all False) apply (rule bexI [OF _ \a \ S\]) @@ -1246,14 +1396,14 @@ assumes f: "continuous_on S f" "f ` S \ T" and g: "continuous_on T g" "g ` T \ U" and T: "contractible T" - obtains c where "homotopic_with (\h. True) S U (g \ f) (\x. c)" + obtains c where "homotopic_with_canon (\h. True) S U (g \ f) (\x. c)" proof - - obtain b where b: "homotopic_with (\x. True) T T id (\x. b)" + obtain b where b: "homotopic_with_canon (\x. True) T T id (\x. b)" using assms by (force simp: contractible_def) - have "homotopic_with (\f. True) T U (g \ id) (g \ (\x. b))" - by (rule homotopic_compose_continuous_left [OF b g]) - then have "homotopic_with (\f. True) S U (g \ id \ f) (g \ (\x. b) \ f)" - by (rule homotopic_compose_continuous_right [OF _ f]) + have "homotopic_with_canon (\f. True) T U (g \ id) (g \ (\x. b))" + by (metis Abstract_Topology.continuous_map_subtopology_eu b g homotopic_compose_continuous_map_left) + then have "homotopic_with_canon (\f. True) S U (g \ id \ f) (g \ (\x. b) \ f)" + by (simp add: f homotopic_with_compose_continuous_map_right) then show ?thesis by (simp add: comp_def that) qed @@ -1261,7 +1411,7 @@ lemma nullhomotopic_into_contractible: assumes f: "continuous_on S f" "f ` S \ T" and T: "contractible T" - obtains c where "homotopic_with (\h. True) S T f (\x. c)" + obtains c where "homotopic_with_canon (\h. True) S T f (\x. c)" apply (rule nullhomotopic_through_contractible [OF f, of id T]) using assms apply (auto simp: continuous_on_id) @@ -1270,7 +1420,7 @@ lemma nullhomotopic_from_contractible: assumes f: "continuous_on S f" "f ` S \ T" and S: "contractible S" - obtains c where "homotopic_with (\h. True) S T f (\x. c)" + obtains c where "homotopic_with_canon (\h. True) S T f (\x. c)" apply (rule nullhomotopic_through_contractible [OF continuous_on_id _ f S, of S]) using assms apply (auto simp: comp_def) @@ -1283,13 +1433,13 @@ "continuous_on S f2" "f2 ` S \ T" "continuous_on T g2" "g2 ` T \ U" "contractible T" "path_connected U" - shows "homotopic_with (\h. True) S U (g1 \ f1) (g2 \ f2)" + shows "homotopic_with_canon (\h. True) S U (g1 \ f1) (g2 \ f2)" proof - - obtain c1 where c1: "homotopic_with (\h. True) S U (g1 \ f1) (\x. c1)" + obtain c1 where c1: "homotopic_with_canon (\h. True) S U (g1 \ f1) (\x. c1)" apply (rule nullhomotopic_through_contractible [of S f1 T g1 U]) using assms apply auto done - obtain c2 where c2: "homotopic_with (\h. True) S U (g2 \ f2) (\x. c2)" + obtain c2 where c2: "homotopic_with_canon (\h. True) S U (g2 \ f2) (\x. c2)" apply (rule nullhomotopic_through_contractible [of S f2 T g2 U]) using assms apply auto done @@ -1299,7 +1449,7 @@ next case False with c1 c2 have "c1 \ U" "c2 \ U" - using homotopic_with_imp_subset2 all_not_in_conv image_subset_iff by blast+ + using homotopic_with_imp_continuous_maps by fastforce+ with \path_connected U\ show ?thesis by blast qed show ?thesis @@ -1315,24 +1465,24 @@ assumes f: "continuous_on S f" "f ` S \ T" and g: "continuous_on S g" "g ` S \ T" and T: "contractible T" - shows "homotopic_with (\h. True) S T f g" + shows "homotopic_with_canon (\h. True) S T f g" using homotopic_through_contractible [of S f T id T g id] -by (simp add: assms contractible_imp_path_connected continuous_on_id) +by (simp add: assms contractible_imp_path_connected) lemma homotopic_from_contractible: fixes S :: "'a::real_normed_vector set" and T:: "'b::real_normed_vector set" assumes f: "continuous_on S f" "f ` S \ T" and g: "continuous_on S g" "g ` S \ T" and "contractible S" "path_connected T" - shows "homotopic_with (\h. True) S T f g" + shows "homotopic_with_canon (\h. True) S T f g" using homotopic_through_contractible [of S id S f T id g] -by (simp add: assms contractible_imp_path_connected continuous_on_id) +by (simp add: assms contractible_imp_path_connected) lemma starlike_imp_contractible_gen: fixes S :: "'a::real_normed_vector set" assumes S: "starlike S" and P: "\a T. \a \ S; 0 \ T; T \ 1\ \ P(\x. (1 - T) *\<^sub>R x + T *\<^sub>R a)" - obtains a where "homotopic_with P S S (\x. x) (\x. a)" + obtains a where "homotopic_with_canon P S S (\x. x) (\x. a)" proof - obtain a where "a \ S" and a: "\x. x \ S \ closed_segment a x \ S" using S by (auto simp: starlike_def) @@ -1385,7 +1535,7 @@ using convex_imp_simply_connected is_interval_convex_1 is_interval_path_connected_1 simply_connected_imp_path_connected by auto lemma contractible_empty [simp]: "contractible {}" - by (simp add: contractible_def homotopic_with) + by (simp add: contractible_def homotopic_on_emptyI) lemma contractible_convex_tweak_boundary_points: fixes S :: "'a::euclidean_space set" @@ -1445,27 +1595,6 @@ done qed -lemma homotopy_dominated_contractibility: - fixes S :: "'a::real_normed_vector set" and T :: "'b::real_normed_vector set" - assumes S: "contractible S" - and f: "continuous_on S f" "image f S \ T" - and g: "continuous_on T g" "image g T \ S" - and hom: "homotopic_with (\x. True) T T (f \ g) id" - shows "contractible T" -proof - - obtain b where "homotopic_with (\h. True) S T f (\x. b)" - using nullhomotopic_from_contractible [OF f S] . - then have homg: "homotopic_with (\x. True) T T ((\x. b) \ g) (f \ g)" - by (rule homotopic_with_compose_continuous_right [OF homotopic_with_symD g]) - show ?thesis - apply (simp add: contractible_def) - apply (rule exI [where x = b]) - apply (rule homotopic_with_symD) - apply (rule homotopic_with_trans [OF _ hom]) - using homg apply (simp add: o_def) - done -qed - subsection\Local versions of topological properties in general\ @@ -1541,7 +1670,7 @@ apply (simp add: open_Int) apply (rule_tac x="V1 \ V2" in exI) apply (auto intro: P) -done + done lemma locally_Times: fixes S :: "('a::metric_space) set" and T :: "('b::metric_space) set" @@ -1561,7 +1690,7 @@ with \U \ V \ W\ show "\u v. openin (top_of_set (S \ T)) u \ R v \ (x,y) \ u \ u \ v \ v \ W" apply (rule_tac x="U1 \ V1" in exI) apply (rule_tac x="U2 \ V2" in exI) - apply (auto simp: openin_Times R) + apply (auto simp: openin_Times R openin_Times_eq) done qed @@ -3195,10 +3324,10 @@ and Qeq: "\h k. (\x. x \ u \ h x = k x) \ Q h = Q k" and hom: "\f g. \continuous_on u f; f ` u \ s; P f; continuous_on u g; g ` u \ s; P g\ - \ homotopic_with P u s f g" + \ homotopic_with_canon P u s f g" and contf: "continuous_on u f" and imf: "f ` u \ t" and Qf: "Q f" and contg: "continuous_on u g" and img: "g ` u \ t" and Qg: "Q g" - shows "homotopic_with Q u t f g" + shows "homotopic_with_canon Q u t f g" proof - have feq: "\x. x \ u \ (h \ (k \ f)) x = f x" using idhk imf by auto have geq: "\x. x \ u \ (h \ (k \ g)) x = g x" using idhk img by auto @@ -3214,17 +3343,15 @@ using img imk by fastforce moreover have "P (k \ g)" by (simp add: P Qg contg img) - ultimately have "homotopic_with P u s (k \ f) (k \ g)" + ultimately have "homotopic_with_canon P u s (k \ f) (k \ g)" by (rule hom) - then have "homotopic_with Q u t (h \ (k \ f)) (h \ (k \ g))" + then have "homotopic_with_canon Q u t (h \ (k \ f)) (h \ (k \ g))" apply (rule homotopic_with_compose_continuous_left [OF homotopic_with_mono]) using Q by (auto simp: conth imh) then show ?thesis apply (rule homotopic_with_eq) - apply (metis feq) - apply (metis geq) - apply (metis Qeq) - done + using feq geq apply fastforce+ + using Qeq topspace_euclidean_subtopology by blast qed lemma homotopically_trivial_retraction_null_gen: @@ -3232,9 +3359,9 @@ and Q: "\f. \continuous_on u f; f ` u \ s; P f\ \ Q(h \ f)" and Qeq: "\h k. (\x. x \ u \ h x = k x) \ Q h = Q k" and hom: "\f. \continuous_on u f; f ` u \ s; P f\ - \ \c. homotopic_with P u s f (\x. c)" + \ \c. homotopic_with_canon P u s f (\x. c)" and contf: "continuous_on u f" and imf:"f ` u \ t" and Qf: "Q f" - obtains c where "homotopic_with Q u t f (\x. c)" + obtains c where "homotopic_with_canon Q u t f (\x. c)" proof - have feq: "\x. x \ u \ (h \ (k \ f)) x = f x" using idhk imf by auto have "continuous_on u (k \ f)" @@ -3243,17 +3370,17 @@ using imf imk by fastforce moreover have "P (k \ f)" by (simp add: P Qf contf imf) - ultimately obtain c where "homotopic_with P u s (k \ f) (\x. c)" + ultimately obtain c where "homotopic_with_canon P u s (k \ f) (\x. c)" by (metis hom) - then have "homotopic_with Q u t (h \ (k \ f)) (h \ (\x. c))" + then have "homotopic_with_canon Q u t (h \ (k \ f)) (h \ (\x. c))" apply (rule homotopic_with_compose_continuous_left [OF homotopic_with_mono]) using Q by (auto simp: conth imh) then show ?thesis apply (rule_tac c = "h c" in that) apply (erule homotopic_with_eq) - apply (metis feq, simp) - apply (metis Qeq) - done + using feq apply auto[1] + apply simp + using Qeq topspace_euclidean_subtopology by blast qed lemma cohomotopically_trivial_retraction_gen: @@ -3262,10 +3389,10 @@ and Qeq: "\h k. (\x. x \ t \ h x = k x) \ Q h = Q k" and hom: "\f g. \continuous_on s f; f ` s \ u; P f; continuous_on s g; g ` s \ u; P g\ - \ homotopic_with P s u f g" + \ homotopic_with_canon P s u f g" and contf: "continuous_on t f" and imf: "f ` t \ u" and Qf: "Q f" and contg: "continuous_on t g" and img: "g ` t \ u" and Qg: "Q g" - shows "homotopic_with Q t u f g" + shows "homotopic_with_canon Q t u f g" proof - have feq: "\x. x \ t \ (f \ h \ k) x = f x" using idhk imf by auto have geq: "\x. x \ t \ (g \ h \ k) x = g x" using idhk img by auto @@ -3281,17 +3408,16 @@ using img imh by fastforce moreover have "P (g \ h)" by (simp add: P Qg contg img) - ultimately have "homotopic_with P s u (f \ h) (g \ h)" + ultimately have "homotopic_with_canon P s u (f \ h) (g \ h)" by (rule hom) - then have "homotopic_with Q t u (f \ h \ k) (g \ h \ k)" + then have "homotopic_with_canon Q t u (f \ h \ k) (g \ h \ k)" apply (rule homotopic_with_compose_continuous_right [OF homotopic_with_mono]) using Q by (auto simp: contk imk) then show ?thesis apply (rule homotopic_with_eq) - apply (metis feq) - apply (metis geq) - apply (metis Qeq) - done + using feq apply auto[1] + using geq apply auto[1] + using Qeq topspace_euclidean_subtopology by blast qed lemma cohomotopically_trivial_retraction_null_gen: @@ -3299,9 +3425,9 @@ and Q: "\f. \continuous_on s f; f ` s \ u; P f\ \ Q(f \ k)" and Qeq: "\h k. (\x. x \ t \ h x = k x) \ Q h = Q k" and hom: "\f g. \continuous_on s f; f ` s \ u; P f\ - \ \c. homotopic_with P s u f (\x. c)" + \ \c. homotopic_with_canon P s u f (\x. c)" and contf: "continuous_on t f" and imf: "f ` t \ u" and Qf: "Q f" - obtains c where "homotopic_with Q t u f (\x. c)" + obtains c where "homotopic_with_canon Q t u f (\x. c)" proof - have feq: "\x. x \ t \ (f \ h \ k) x = f x" using idhk imf by auto have "continuous_on s (f \ h)" @@ -3310,17 +3436,17 @@ using imf imh by fastforce moreover have "P (f \ h)" by (simp add: P Qf contf imf) - ultimately obtain c where "homotopic_with P s u (f \ h) (\x. c)" + ultimately obtain c where "homotopic_with_canon P s u (f \ h) (\x. c)" by (metis hom) - then have "homotopic_with Q t u (f \ h \ k) ((\x. c) \ k)" + then have "homotopic_with_canon Q t u (f \ h \ k) ((\x. c) \ k)" apply (rule homotopic_with_compose_continuous_right [OF homotopic_with_mono]) using Q by (auto simp: contk imk) then show ?thesis apply (rule_tac c = c in that) apply (erule homotopic_with_eq) - apply (metis feq, simp) - apply (metis Qeq) - done + using feq apply auto[1] + apply simp + using Qeq topspace_euclidean_subtopology by blast qed end @@ -3346,59 +3472,64 @@ subsection\Homotopy equivalence\ -definition%important homotopy_eqv :: "'a::topological_space set \ 'b::topological_space set \ bool" - (infix "homotopy'_eqv" 50) - where "S homotopy_eqv T \ - \f g. continuous_on S f \ f ` S \ T \ - continuous_on T g \ g ` T \ S \ - homotopic_with (\x. True) S S (g \ f) id \ - homotopic_with (\x. True) T T (f \ g) id" - -lemma homeomorphic_imp_homotopy_eqv: "S homeomorphic T \ S homotopy_eqv T" - unfolding homeomorphic_def homotopy_eqv_def homeomorphism_def - by (fastforce intro!: homotopic_with_equal continuous_on_compose) - -lemma homotopy_eqv_refl: "S homotopy_eqv S" - by (rule homeomorphic_imp_homotopy_eqv homeomorphic_refl)+ - -lemma homotopy_eqv_sym: "S homotopy_eqv T \ T homotopy_eqv S" - by (auto simp: homotopy_eqv_def) +subsection\Homotopy equivalence of topological spaces.\ + +definition%important homotopy_equivalent_space + (infix "homotopy'_equivalent'_space" 50) + where "X homotopy_equivalent_space Y \ + (\f g. continuous_map X Y f \ + continuous_map Y X g \ + homotopic_with (\x. True) X X (g \ f) id \ + homotopic_with (\x. True) Y Y (f \ g) id)" + +lemma homeomorphic_imp_homotopy_equivalent_space: + "X homeomorphic_space Y \ X homotopy_equivalent_space Y" + unfolding homeomorphic_space_def homotopy_equivalent_space_def + apply (erule ex_forward)+ + by (simp add: homotopic_with_equal homotopic_with_sym homeomorphic_maps_def) + +lemma homotopy_equivalent_space_refl: + "X homotopy_equivalent_space X" + by (simp add: homeomorphic_imp_homotopy_equivalent_space homeomorphic_space_refl) + +lemma homotopy_equivalent_space_sym: + "X homotopy_equivalent_space Y \ Y homotopy_equivalent_space X" + by (meson homotopy_equivalent_space_def) lemma homotopy_eqv_trans [trans]: - fixes S :: "'a::real_normed_vector set" and U :: "'c::real_normed_vector set" - assumes ST: "S homotopy_eqv T" and TU: "T homotopy_eqv U" - shows "S homotopy_eqv U" + assumes 1: "X homotopy_equivalent_space Y" and 2: "Y homotopy_equivalent_space U" + shows "X homotopy_equivalent_space U" proof - - obtain f1 g1 where f1: "continuous_on S f1" "f1 ` S \ T" - and g1: "continuous_on T g1" "g1 ` T \ S" - and hom1: "homotopic_with (\x. True) S S (g1 \ f1) id" - "homotopic_with (\x. True) T T (f1 \ g1) id" - using ST by (auto simp: homotopy_eqv_def) - obtain f2 g2 where f2: "continuous_on T f2" "f2 ` T \ U" - and g2: "continuous_on U g2" "g2 ` U \ T" - and hom2: "homotopic_with (\x. True) T T (g2 \ f2) id" + obtain f1 g1 where f1: "continuous_map X Y f1" + and g1: "continuous_map Y X g1" + and hom1: "homotopic_with (\x. True) X X (g1 \ f1) id" + "homotopic_with (\x. True) Y Y (f1 \ g1) id" + using 1 by (auto simp: homotopy_equivalent_space_def) + obtain f2 g2 where f2: "continuous_map Y U f2" + and g2: "continuous_map U Y g2" + and hom2: "homotopic_with (\x. True) Y Y (g2 \ f2) id" "homotopic_with (\x. True) U U (f2 \ g2) id" - using TU by (auto simp: homotopy_eqv_def) - have "homotopic_with (\f. True) S T (g2 \ f2 \ f1) (id \ f1)" - by (rule homotopic_with_compose_continuous_right hom2 f1)+ - then have "homotopic_with (\f. True) S T (g2 \ (f2 \ f1)) (id \ f1)" + using 2 by (auto simp: homotopy_equivalent_space_def) + have "homotopic_with (\f. True) X Y (g2 \ f2 \ f1) (id \ f1)" + using f1 hom2(1) homotopic_compose_continuous_map_right by blast + then have "homotopic_with (\f. True) X Y (g2 \ (f2 \ f1)) (id \ f1)" by (simp add: o_assoc) - then have "homotopic_with (\x. True) S S + then have "homotopic_with (\x. True) X X (g1 \ (g2 \ (f2 \ f1))) (g1 \ (id \ f1))" - by (simp add: g1 homotopic_with_compose_continuous_left) - moreover have "homotopic_with (\x. True) S S (g1 \ id \ f1) id" + by (simp add: g1 homotopic_compose_continuous_map_left) + moreover have "homotopic_with (\x. True) X X (g1 \ id \ f1) id" using hom1 by simp - ultimately have SS: "homotopic_with (\x. True) S S (g1 \ g2 \ (f2 \ f1)) id" + ultimately have SS: "homotopic_with (\x. True) X X (g1 \ g2 \ (f2 \ f1)) id" apply (simp add: o_assoc) apply (blast intro: homotopic_with_trans) done - have "homotopic_with (\f. True) U T (f1 \ g1 \ g2) (id \ g2)" - by (rule homotopic_with_compose_continuous_right hom1 g2)+ - then have "homotopic_with (\f. True) U T (f1 \ (g1 \ g2)) (id \ g2)" + have "homotopic_with (\f. True) U Y (f1 \ g1 \ g2) (id \ g2)" + using g2 hom1(2) homotopic_with_compose_continuous_map_right by fastforce + then have "homotopic_with (\f. True) U Y (f1 \ (g1 \ g2)) (id \ g2)" by (simp add: o_assoc) then have "homotopic_with (\x. True) U U (f2 \ (f1 \ (g1 \ g2))) (f2 \ (id \ g2))" - by (simp add: f2 homotopic_with_compose_continuous_left) + by (simp add: f2 homotopic_with_compose_continuous_map_left) moreover have "homotopic_with (\x. True) U U (f2 \ id \ g2) id" using hom2 by simp ultimately have UU: "homotopic_with (\x. True) U U (f2 \ f1 \ (g1 \ g2)) id" @@ -3406,14 +3537,382 @@ apply (blast intro: homotopic_with_trans) done show ?thesis - unfolding homotopy_eqv_def - apply (rule_tac x = "f2 \ f1" in exI) - apply (rule_tac x = "g1 \ g2" in exI) - apply (intro conjI continuous_on_compose SS UU) - using f1 f2 g1 g2 apply (force simp: elim!: continuous_on_subset)+ - done + unfolding homotopy_equivalent_space_def + by (blast intro: f1 f2 g1 g2 continuous_map_compose SS UU) +qed + +lemma deformation_retraction_imp_homotopy_equivalent_space: + "\homotopic_with (\x. True) X X (s \ r) id; retraction_maps X Y r s\ + \ X homotopy_equivalent_space Y" + unfolding homotopy_equivalent_space_def retraction_maps_def + apply (rule_tac x=r in exI) + apply (rule_tac x=s in exI) + apply (auto simp: homotopic_with_equal continuous_map_compose) + done + +lemma deformation_retract_imp_homotopy_equivalent_space: + "\homotopic_with (\x. True) X X r id; retraction_maps X Y r id\ + \ X homotopy_equivalent_space Y" + using deformation_retraction_imp_homotopy_equivalent_space by force + +lemma deformation_retract_of_space: + "S \ topspace X \ + (\r. homotopic_with (\x. True) X X id r \ retraction_maps X (subtopology X S) r id) \ + S retract_of_space X \ (\f. homotopic_with (\x. True) X X id f \ f ` (topspace X) \ S)" +proof (cases "S \ topspace X") + case True + moreover have "(\r. homotopic_with (\x. True) X X id r \ retraction_maps X (subtopology X S) r id) + \ (S retract_of_space X \ (\f. homotopic_with (\x. True) X X id f \ f ` topspace X \ S))" + unfolding retract_of_space_def + proof safe + fix f r + assume f: "homotopic_with (\x. True) X X id f" + and fS: "f ` topspace X \ S" + and r: "continuous_map X (subtopology X S) r" + and req: "\x\S. r x = x" + show "\r. homotopic_with (\x. True) X X id r \ retraction_maps X (subtopology X S) r id" + proof (intro exI conjI) + have "homotopic_with (\x. True) X X f r" + proof (rule homotopic_with_eq) + show "homotopic_with (\x. True) X X (r \ f) (r \ id)" + using homotopic_with_symD continuous_map_into_fulltopology f homotopic_compose_continuous_map_left r by blast + show "f x = (r \ f) x" if "x \ topspace X" for x + using that fS req by auto + qed auto + then show "homotopic_with (\x. True) X X id r" + by (rule homotopic_with_trans [OF f]) + next + show "retraction_maps X (subtopology X S) r id" + by (simp add: r req retraction_maps_def topspace_subtopology) + qed + qed (use True in \auto simp: retraction_maps_def topspace_subtopology_subset continuous_map_in_subtopology\) + ultimately show ?thesis by simp +qed (auto simp: retract_of_space_def retraction_maps_def) + + + +subsection\Contractible spaces\ + +text\The definition (which agrees with "contractible" on subsets of Euclidean space) +is a little cryptic because we don't in fact assume that the constant "a" is in the space. +This forces the convention that the empty space / set is contractible, avoiding some special cases. \ + +definition contractible_space where + "contractible_space X \ \a. homotopic_with (\x. True) X X id (\x. a)" + +lemma contractible_space_top_of_set [simp]:"contractible_space (top_of_set S) \ contractible S" + by (auto simp: contractible_space_def contractible_def) + +lemma contractible_space_empty: + "topspace X = {} \ contractible_space X" + apply (simp add: contractible_space_def homotopic_with_def) + apply (rule_tac x=undefined in exI) + apply (rule_tac x="\(t,x). if t = 0 then x else undefined" in exI) + apply (auto simp: continuous_map_on_empty) + done + +lemma contractible_space_singleton: + "topspace X = {a} \ contractible_space X" + apply (simp add: contractible_space_def homotopic_with_def) + apply (rule_tac x=a in exI) + apply (rule_tac x="\(t,x). if t = 0 then x else a" in exI) + apply (auto intro: continuous_map_eq [where f = "\z. a"]) + done + +lemma contractible_space_subset_singleton: + "topspace X \ {a} \ contractible_space X" + by (meson contractible_space_empty contractible_space_singleton subset_singletonD) + +lemma contractible_space_subtopology_singleton: + "contractible_space(subtopology X {a})" + by (meson contractible_space_subset_singleton insert_subset path_connectedin_singleton path_connectedin_subtopology subsetI) + +lemma contractible_space: + "contractible_space X \ + topspace X = {} \ + (\a \ topspace X. homotopic_with (\x. True) X X id (\x. a))" +proof (cases "topspace X = {}") + case False + then show ?thesis + apply (auto simp: contractible_space_def) + using homotopic_with_imp_continuous_maps by fastforce +qed (simp add: contractible_space_empty) + +lemma contractible_imp_path_connected_space: + assumes "contractible_space X" shows "path_connected_space X" +proof (cases "topspace X = {}") + case False + have *: "path_connected_space X" + if "a \ topspace X" and conth: "continuous_map (prod_topology (top_of_set {0..1}) X) X h" + and h: "\x. h (0, x) = x" "\x. h (1, x) = a" + for a and h :: "real \ 'a \ 'a" + proof - + have "path_component_of X b a" if "b \ topspace X" for b + using that unfolding path_component_of_def + apply (rule_tac x="h \ (\x. (x,b))" in exI) + apply (simp add: h pathin_def) + apply (rule continuous_map_compose [OF _ conth]) + apply (auto simp: continuous_map_pairwise intro!: continuous_intros continuous_map_compose continuous_map_id [unfolded id_def]) + done + then show ?thesis + by (metis path_component_of_equiv path_connected_space_iff_path_component) + qed + show ?thesis + using assms False by (auto simp: contractible_space homotopic_with_def *) +qed (simp add: path_connected_space_topspace_empty) + +lemma contractible_imp_connected_space: + "contractible_space X \ connected_space X" + by (simp add: contractible_imp_path_connected_space path_connected_imp_connected_space) + +lemma contractible_space_alt: + "contractible_space X \ (\a \ topspace X. homotopic_with (\x. True) X X id (\x. a))" (is "?lhs = ?rhs") +proof + assume X: ?lhs + then obtain a where a: "homotopic_with (\x. True) X X id (\x. a)" + by (auto simp: contractible_space_def) + show ?rhs + proof + show "homotopic_with (\x. True) X X id (\x. b)" if "b \ topspace X" for b + apply (rule homotopic_with_trans [OF a]) + using homotopic_constant_maps path_connected_space_imp_path_component_of + by (metis (full_types) X a continuous_map_const contractible_imp_path_connected_space homotopic_with_imp_continuous_maps that) + qed +next + assume R: ?rhs + then show ?lhs + apply (simp add: contractible_space_def) + by (metis equals0I homotopic_on_emptyI) +qed + + +lemma compose_const [simp]: "f \ (\x. a) = (\x. f a)" "(\x. a) \ g = (\x. a)" + by (simp_all add: o_def) + +lemma nullhomotopic_through_contractible_space: + assumes f: "continuous_map X Y f" and g: "continuous_map Y Z g" and Y: "contractible_space Y" + obtains c where "homotopic_with (\h. True) X Z (g \ f) (\x. c)" +proof - + obtain b where b: "homotopic_with (\x. True) Y Y id (\x. b)" + using Y by (auto simp: contractible_space_def) + show thesis + using homotopic_compose_continuous_map_right + [OF homotopic_compose_continuous_map_left [OF b g] f] + by (simp add: that) qed +lemma nullhomotopic_into_contractible_space: + assumes f: "continuous_map X Y f" and Y: "contractible_space Y" + obtains c where "homotopic_with (\h. True) X Y f (\x. c)" + using nullhomotopic_through_contractible_space [OF f _ Y] + by (metis continuous_map_id id_comp) + +lemma nullhomotopic_from_contractible_space: + assumes f: "continuous_map X Y f" and X: "contractible_space X" + obtains c where "homotopic_with (\h. True) X Y f (\x. c)" + using nullhomotopic_through_contractible_space [OF _ f X] + by (metis comp_id continuous_map_id) + +lemma homotopy_dominated_contractibility: + assumes f: "continuous_map X Y f" and g: "continuous_map Y X g" + and hom: "homotopic_with (\x. True) Y Y (f \ g) id" and X: "contractible_space X" + shows "contractible_space Y" +proof - + obtain c where c: "homotopic_with (\h. True) X Y f (\x. c)" + using nullhomotopic_from_contractible_space [OF f X] . + have "homotopic_with (\x. True) Y Y (f \ g) (\x. c)" + using homotopic_compose_continuous_map_right [OF c g] by fastforce + then have "homotopic_with (\x. True) Y Y id (\x. c)" + using homotopic_with_trans [OF _ hom] homotopic_with_symD by blast + then show ?thesis + unfolding contractible_space_def .. +qed + +lemma homotopy_equivalent_space_contractibility: + "X homotopy_equivalent_space Y \ (contractible_space X \ contractible_space Y)" + unfolding homotopy_equivalent_space_def + by (blast intro: homotopy_dominated_contractibility) + +lemma homeomorphic_space_contractibility: + "X homeomorphic_space Y + \ (contractible_space X \ contractible_space Y)" + by (simp add: homeomorphic_imp_homotopy_equivalent_space homotopy_equivalent_space_contractibility) + +lemma contractible_eq_homotopy_equivalent_singleton_subtopology: + "contractible_space X \ + topspace X = {} \ (\a \ topspace X. X homotopy_equivalent_space (subtopology X {a}))"(is "?lhs = ?rhs") +proof (cases "topspace X = {}") + case False + show ?thesis + proof + assume ?lhs + then obtain a where a: "homotopic_with (\x. True) X X id (\x. a)" + by (auto simp: contractible_space_def) + then have "a \ topspace X" + by (metis False continuous_map_const homotopic_with_imp_continuous_maps) + then have "X homotopy_equivalent_space subtopology X {a}" + unfolding homotopy_equivalent_space_def + apply (rule_tac x="\x. a" in exI) + apply (rule_tac x=id in exI) + apply (auto simp: homotopic_with_sym topspace_subtopology_subset a) + using connectedin_absolute connectedin_sing contractible_space_alt contractible_space_subtopology_singleton by fastforce + with \a \ topspace X\ show ?rhs + by blast + next + assume ?rhs + then show ?lhs + by (meson False contractible_space_subtopology_singleton homotopy_equivalent_space_contractibility) + qed +qed (simp add: contractible_space_empty) + +lemma contractible_space_retraction_map_image: + assumes "retraction_map X Y f" and X: "contractible_space X" + shows "contractible_space Y" +proof - + obtain g where f: "continuous_map X Y f" and g: "continuous_map Y X g" and fg: "\y \ topspace Y. f(g y) = y" + using assms by (auto simp: retraction_map_def retraction_maps_def) + obtain a where a: "homotopic_with (\x. True) X X id (\x. a)" + using X by (auto simp: contractible_space_def) + have "homotopic_with (\x. True) Y Y id (\x. f a)" + proof (rule homotopic_with_eq) + show "homotopic_with (\x. True) Y Y (f \ id \ g) (f \ (\x. a) \ g)" + using f g a homotopic_compose_continuous_map_left homotopic_compose_continuous_map_right by metis + qed (use fg in auto) + then show ?thesis + unfolding contractible_space_def by blast +qed + +lemma contractible_space_prod_topology: + "contractible_space(prod_topology X Y) \ + topspace X = {} \ topspace Y = {} \ contractible_space X \ contractible_space Y" +proof (cases "topspace X = {} \ topspace Y = {}") + case True + then have "topspace (prod_topology X Y) = {}" + by simp + then show ?thesis + by (auto simp: contractible_space_empty) +next + case False + have "contractible_space(prod_topology X Y) \ contractible_space X \ contractible_space Y" + proof safe + assume XY: "contractible_space (prod_topology X Y)" + with False have "retraction_map (prod_topology X Y) X fst" + by (auto simp: contractible_space False retraction_map_fst) + then show "contractible_space X" + by (rule contractible_space_retraction_map_image [OF _ XY]) + have "retraction_map (prod_topology X Y) Y snd" + using False XY by (auto simp: contractible_space False retraction_map_snd) + then show "contractible_space Y" + by (rule contractible_space_retraction_map_image [OF _ XY]) + next + assume "contractible_space X" and "contractible_space Y" + with False obtain a b + where "a \ topspace X" and a: "homotopic_with (\x. True) X X id (\x. a)" + and "b \ topspace Y" and b: "homotopic_with (\x. True) Y Y id (\x. b)" + by (auto simp: contractible_space) + with False show "contractible_space (prod_topology X Y)" + apply (simp add: contractible_space) + apply (rule_tac x=a in bexI) + apply (rule_tac x=b in bexI) + using homotopic_with_prod_topology [OF a b] + apply (metis (no_types, lifting) case_prod_Pair case_prod_beta' eq_id_iff) + apply auto + done + qed + with False show ?thesis + by auto +qed + + + + +lemma contractible_space_product_topology: + "contractible_space(product_topology X I) \ + topspace (product_topology X I) = {} \ (\i \ I. contractible_space(X i))" +proof (cases "topspace (product_topology X I) = {}") + case False + have 1: "contractible_space (X i)" + if XI: "contractible_space (product_topology X I)" and "i \ I" + for i + proof (rule contractible_space_retraction_map_image [OF _ XI]) + show "retraction_map (product_topology X I) (X i) (\x. x i)" + using False by (simp add: retraction_map_product_projection \i \ I\) + qed + have 2: "contractible_space (product_topology X I)" + if "x \ topspace (product_topology X I)" and cs: "\i\I. contractible_space (X i)" + for x :: "'a \ 'b" + proof - + obtain f where f: "\i. i\I \ homotopic_with (\x. True) (X i) (X i) id (\x. f i)" + using cs unfolding contractible_space_def by metis + have "homotopic_with (\x. True) + (product_topology X I) (product_topology X I) id (\x. restrict f I)" + by (rule homotopic_with_eq [OF homotopic_with_product_topology [OF f]]) (auto simp: topspace_product_topology) + then show ?thesis + by (auto simp: contractible_space_def) + qed + show ?thesis + using False 1 2 by blast +qed (simp add: contractible_space_empty) + + +lemma contractible_space_subtopology_euclideanreal [simp]: + "contractible_space(subtopology euclideanreal S) \ is_interval S" + (is "?lhs = ?rhs") +proof + assume ?lhs + then have "path_connectedin (subtopology euclideanreal S) S" + using contractible_imp_path_connected_space path_connectedin_topspace path_connectedin_absolute + by (simp add: contractible_imp_path_connected) + then show ?rhs + by (simp add: is_interval_path_connected_1) +next + assume ?rhs + then have "convex S" + by (simp add: is_interval_convex_1) + show ?lhs + proof (cases "S = {}") + case False + then obtain z where "z \ S" + by blast + show ?thesis + unfolding contractible_space_def homotopic_with_def + proof (intro exI conjI allI) + show "continuous_map (prod_topology (top_of_set {0..1}) (top_of_set S)) (top_of_set S) + (\(t,x). (1 - t) * x + t * z)" + apply (auto simp: case_prod_unfold) + apply (intro continuous_intros) + using \z \ S\ apply (auto intro: convexD [OF \convex S\, simplified]) + done + qed auto + qed (simp add: contractible_space_empty) +qed + + +corollary contractible_space_euclideanreal: "contractible_space euclideanreal" +proof - + have "contractible_space (subtopology euclideanreal UNIV)" + using contractible_space_subtopology_euclideanreal by blast + then show ?thesis + by simp +qed + + +abbreviation%important homotopy_eqv :: "'a::topological_space set \ 'b::topological_space set \ bool" + (infix "homotopy'_eqv" 50) + where "S homotopy_eqv T \ top_of_set S homotopy_equivalent_space top_of_set T" + + + + + +lemma homeomorphic_imp_homotopy_eqv: "S homeomorphic T \ S homotopy_eqv T" + unfolding homeomorphic_def homeomorphism_def homotopy_equivalent_space_def + apply (erule ex_forward)+ + apply auto + apply (metis homotopic_with_id2 topspace_euclidean_subtopology) + by (metis (full_types) homotopic_with_id2 imageE topspace_euclidean_subtopology) + + lemma homotopy_eqv_inj_linear_image: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" assumes "linear f" "inj f" @@ -3436,33 +3935,33 @@ and g: "continuous_on U g" "g ` U \ T" and homUS: "\f g. \continuous_on U f; f ` U \ S; continuous_on U g; g ` U \ S\ - \ homotopic_with (\x. True) U S f g" - shows "homotopic_with (\x. True) U T f g" + \ homotopic_with_canon (\x. True) U S f g" + shows "homotopic_with_canon (\x. True) U T f g" proof - obtain h k where h: "continuous_on S h" "h ` S \ T" and k: "continuous_on T k" "k ` T \ S" - and hom: "homotopic_with (\x. True) S S (k \ h) id" - "homotopic_with (\x. True) T T (h \ k) id" - using assms by (auto simp: homotopy_eqv_def) - have "homotopic_with (\f. True) U S (k \ f) (k \ g)" + and hom: "homotopic_with_canon (\x. True) S S (k \ h) id" + "homotopic_with_canon (\x. True) T T (h \ k) id" + using assms by (auto simp: homotopy_equivalent_space_def) + have "homotopic_with_canon (\f. True) U S (k \ f) (k \ g)" apply (rule homUS) using f g k apply (safe intro!: continuous_on_compose h k f elim!: continuous_on_subset) apply (force simp: o_def)+ done - then have "homotopic_with (\x. True) U T (h \ (k \ f)) (h \ (k \ g))" + then have "homotopic_with_canon (\x. True) U T (h \ (k \ f)) (h \ (k \ g))" apply (rule homotopic_with_compose_continuous_left) apply (simp_all add: h) done - moreover have "homotopic_with (\x. True) U T (h \ k \ f) (id \ f)" + moreover have "homotopic_with_canon (\x. True) U T (h \ k \ f) (id \ f)" apply (rule homotopic_with_compose_continuous_right [where X=T and Y=T]) apply (auto simp: hom f) done - moreover have "homotopic_with (\x. True) U T (h \ k \ g) (id \ g)" + moreover have "homotopic_with_canon (\x. True) U T (h \ k \ g) (id \ g)" apply (rule homotopic_with_compose_continuous_right [where X=T and Y=T]) apply (auto simp: hom g) done - ultimately show "homotopic_with (\x. True) U T f g" + ultimately show "homotopic_with_canon (\x. True) U T f g" apply (simp add: o_assoc) using homotopic_with_trans homotopic_with_sym by blast qed @@ -3474,13 +3973,24 @@ assumes "S homotopy_eqv T" shows "(\f g. continuous_on U f \ f ` U \ S \ continuous_on U g \ g ` U \ S - \ homotopic_with (\x. True) U S f g) \ + \ homotopic_with_canon (\x. True) U S f g) \ (\f g. continuous_on U f \ f ` U \ T \ continuous_on U g \ g ` U \ T - \ homotopic_with (\x. True) U T f g)" -apply (rule iffI) -apply (metis assms homotopy_eqv_homotopic_triviality_imp) -by (metis (no_types) assms homotopy_eqv_homotopic_triviality_imp homotopy_eqv_sym) + \ homotopic_with_canon (\x. True) U T f g)" + (is "?lhs = ?rhs") +proof + assume ?lhs + then show ?rhs + by (metis assms homotopy_eqv_homotopic_triviality_imp) +next + assume ?rhs + moreover + have "T homotopy_eqv S" + using assms homotopy_equivalent_space_sym by blast + ultimately show ?lhs + by (blast intro: homotopy_eqv_homotopic_triviality_imp) +qed + lemma homotopy_eqv_cohomotopic_triviality_null_imp: fixes S :: "'a::real_normed_vector set" @@ -3489,23 +3999,23 @@ assumes "S homotopy_eqv T" and f: "continuous_on T f" "f ` T \ U" and homSU: "\f. \continuous_on S f; f ` S \ U\ - \ \c. homotopic_with (\x. True) S U f (\x. c)" - obtains c where "homotopic_with (\x. True) T U f (\x. c)" + \ \c. homotopic_with_canon (\x. True) S U f (\x. c)" + obtains c where "homotopic_with_canon (\x. True) T U f (\x. c)" proof - obtain h k where h: "continuous_on S h" "h ` S \ T" and k: "continuous_on T k" "k ` T \ S" - and hom: "homotopic_with (\x. True) S S (k \ h) id" - "homotopic_with (\x. True) T T (h \ k) id" - using assms by (auto simp: homotopy_eqv_def) - obtain c where "homotopic_with (\x. True) S U (f \ h) (\x. c)" + and hom: "homotopic_with_canon (\x. True) S S (k \ h) id" + "homotopic_with_canon (\x. True) T T (h \ k) id" + using assms by (auto simp: homotopy_equivalent_space_def) + obtain c where "homotopic_with_canon (\x. True) S U (f \ h) (\x. c)" apply (rule exE [OF homSU [of "f \ h"]]) apply (intro continuous_on_compose h) using h f apply (force elim!: continuous_on_subset)+ done - then have "homotopic_with (\x. True) T U ((f \ h) \ k) ((\x. c) \ k)" + then have "homotopic_with_canon (\x. True) T U ((f \ h) \ k) ((\x. c) \ k)" apply (rule homotopic_with_compose_continuous_right [where X=S]) using k by auto - moreover have "homotopic_with (\x. True) T U (f \ id) (f \ (h \ k))" + moreover have "homotopic_with_canon (\x. True) T U (f \ id) (f \ (h \ k))" apply (rule homotopic_with_compose_continuous_left [where Y=T]) apply (simp add: hom homotopic_with_symD) using f apply auto @@ -3522,12 +4032,12 @@ and U :: "'c::real_normed_vector set" assumes "S homotopy_eqv T" shows "(\f. continuous_on S f \ f ` S \ U - \ (\c. homotopic_with (\x. True) S U f (\x. c))) \ + \ (\c. homotopic_with_canon (\x. True) S U f (\x. c))) \ (\f. continuous_on T f \ f ` T \ U - \ (\c. homotopic_with (\x. True) T U f (\x. c)))" + \ (\c. homotopic_with_canon (\x. True) T U f (\x. c)))" apply (rule iffI) apply (metis assms homotopy_eqv_cohomotopic_triviality_null_imp) -by (metis assms homotopy_eqv_cohomotopic_triviality_null_imp homotopy_eqv_sym) +by (metis assms homotopy_eqv_cohomotopic_triviality_null_imp homotopy_equivalent_space_sym) lemma homotopy_eqv_homotopic_triviality_null_imp: fixes S :: "'a::real_normed_vector set" @@ -3536,23 +4046,23 @@ assumes "S homotopy_eqv T" and f: "continuous_on U f" "f ` U \ T" and homSU: "\f. \continuous_on U f; f ` U \ S\ - \ \c. homotopic_with (\x. True) U S f (\x. c)" - shows "\c. homotopic_with (\x. True) U T f (\x. c)" + \ \c. homotopic_with_canon (\x. True) U S f (\x. c)" + shows "\c. homotopic_with_canon (\x. True) U T f (\x. c)" proof - obtain h k where h: "continuous_on S h" "h ` S \ T" and k: "continuous_on T k" "k ` T \ S" - and hom: "homotopic_with (\x. True) S S (k \ h) id" - "homotopic_with (\x. True) T T (h \ k) id" - using assms by (auto simp: homotopy_eqv_def) - obtain c::'a where "homotopic_with (\x. True) U S (k \ f) (\x. c)" + and hom: "homotopic_with_canon (\x. True) S S (k \ h) id" + "homotopic_with_canon (\x. True) T T (h \ k) id" + using assms by (auto simp: homotopy_equivalent_space_def) + obtain c::'a where "homotopic_with_canon (\x. True) U S (k \ f) (\x. c)" apply (rule exE [OF homSU [of "k \ f"]]) apply (intro continuous_on_compose h) using k f apply (force elim!: continuous_on_subset)+ done - then have "homotopic_with (\x. True) U T (h \ (k \ f)) (h \ (\x. c))" + then have "homotopic_with_canon (\x. True) U T (h \ (k \ f)) (h \ (\x. c))" apply (rule homotopic_with_compose_continuous_left [where Y=S]) using h by auto - moreover have "homotopic_with (\x. True) U T (id \ f) ((h \ k) \ f)" + moreover have "homotopic_with_canon (\x. True) U T (id \ f) ((h \ k) \ f)" apply (rule homotopic_with_compose_continuous_right [where X=T]) apply (simp add: hom homotopic_with_symD) using f apply auto @@ -3567,12 +4077,12 @@ and U :: "'c::real_normed_vector set" assumes "S homotopy_eqv T" shows "(\f. continuous_on U f \ f ` U \ S - \ (\c. homotopic_with (\x. True) U S f (\x. c))) \ + \ (\c. homotopic_with_canon (\x. True) U S f (\x. c))) \ (\f. continuous_on U f \ f ` U \ T - \ (\c. homotopic_with (\x. True) U T f (\x. c)))" + \ (\c. homotopic_with_canon (\x. True) U T f (\x. c)))" apply (rule iffI) apply (metis assms homotopy_eqv_homotopic_triviality_null_imp) -by (metis assms homotopy_eqv_homotopic_triviality_null_imp homotopy_eqv_sym) +by (metis assms homotopy_eqv_homotopic_triviality_null_imp homotopy_equivalent_space_sym) lemma homotopy_eqv_contractible_sets: fixes S :: "'a::real_normed_vector set" @@ -3587,7 +4097,7 @@ with assms obtain a b where "a \ S" "b \ T" by auto then show ?thesis - unfolding homotopy_eqv_def + unfolding homotopy_equivalent_space_def apply (rule_tac x="\x. b" in exI) apply (rule_tac x="\x. a" in exI) apply (intro assms conjI continuous_on_id' homotopic_into_contractible) @@ -3598,20 +4108,19 @@ lemma homotopy_eqv_empty1 [simp]: fixes S :: "'a::real_normed_vector set" shows "S homotopy_eqv ({}::'b::real_normed_vector set) \ S = {}" -apply (rule iffI) -using homotopy_eqv_def apply fastforce -by (simp add: homotopy_eqv_contractible_sets) + apply (rule iffI) + apply (metis Abstract_Topology.continuous_map_subtopology_eu emptyE equals0I homotopy_equivalent_space_def image_subset_iff) + by (simp add: homotopy_eqv_contractible_sets) lemma homotopy_eqv_empty2 [simp]: fixes S :: "'a::real_normed_vector set" shows "({}::'b::real_normed_vector set) homotopy_eqv S \ S = {}" -by (metis homotopy_eqv_empty1 homotopy_eqv_sym) + using homotopy_equivalent_space_sym homotopy_eqv_empty1 by blast lemma homotopy_eqv_contractibility: fixes S :: "'a::real_normed_vector set" and T :: "'b::real_normed_vector set" shows "S homotopy_eqv T \ (contractible S \ contractible T)" -unfolding homotopy_eqv_def -by (blast intro: homotopy_dominated_contractibility) + by (meson contractible_space_top_of_set homotopy_equivalent_space_contractibility) lemma homotopy_eqv_sing: fixes S :: "'a::real_normed_vector set" and a :: "'b::real_normed_vector" @@ -5034,11 +5543,15 @@ proposition nullhomotopic_from_sphere_extension: fixes f :: "'M::euclidean_space \ 'a::real_normed_vector" - shows "(\c. homotopic_with (\x. True) (sphere a r) S f (\x. c)) \ + shows "(\c. homotopic_with_canon (\x. True) (sphere a r) S f (\x. c)) \ (\g. continuous_on (cball a r) g \ g ` (cball a r) \ S \ (\x \ sphere a r. g x = f x))" (is "?lhs = ?rhs") proof (cases r "0::real" rule: linorder_cases) + case less + then show ?thesis + by (simp add: homotopic_on_emptyI) +next case equal then show ?thesis apply (auto simp: homotopic_with) @@ -5051,9 +5564,11 @@ have ?P if ?lhs using that proof fix c - assume c: "homotopic_with (\x. True) (sphere a r) S f (\x. c)" - then have contf: "continuous_on (sphere a r) f" and fim: "f ` sphere a r \ S" - by (auto simp: homotopic_with_imp_subset1 homotopic_with_imp_continuous) + assume c: "homotopic_with_canon (\x. True) (sphere a r) S f (\x. c)" + then have contf: "continuous_on (sphere a r) f" + by (metis homotopic_with_imp_continuous) + moreover have fim: "f ` sphere a r \ S" + by (meson continuous_map_subtopology_eu c homotopic_with_imp_continuous_maps) show ?P using contf fim by (auto simp: sphere_def dist_norm norm_minus_commute) qed @@ -5070,7 +5585,7 @@ moreover have ?thesis if ?P proof assume ?lhs - then obtain c where "homotopic_with (\x. True) (sphere a r) S (\x. c) f" + then obtain c where "homotopic_with_canon (\x. True) (sphere a r) S (\x. c) f" using homotopic_with_sym by blast then obtain h where conth: "continuous_on ({0..1::real} \ sphere a r) h" and him: "h ` ({0..1} \ sphere a r) \ S" @@ -5159,6 +5674,6 @@ qed ultimately show ?thesis by meson -qed simp +qed end \ No newline at end of file diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Jordan_Curve.thy --- a/src/HOL/Analysis/Jordan_Curve.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Jordan_Curve.thy Tue Mar 26 17:01:55 2019 +0000 @@ -103,7 +103,7 @@ using z by fastforce qed (auto simp: g h algebra_simps exp_add) qed - ultimately have *: "homotopic_with (\x. True) (S \ T) (sphere 0 1) + ultimately have *: "homotopic_with_canon (\x. True) (S \ T) (sphere 0 1) (\x. (x - a) /\<^sub>R cmod (x - a)) (\x. (x - b) /\<^sub>R cmod (x - b))" by (subst homotopic_circlemaps_divide) (auto simp: inessential_eq_continuous_logarithm_circle) show ?thesis diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Path_Connected.thy Tue Mar 26 17:01:55 2019 +0000 @@ -1976,6 +1976,13 @@ definition path_components_of :: "'a topology \ 'a set set" where "path_components_of X \ path_component_of_set X ` topspace X" +lemma pathin_canon_iff: "pathin (top_of_set T) g \ path g \ g ` {0..1} \ T" + by (simp add: path_def pathin_def) + +lemma path_component_of_canon_iff [simp]: + "path_component_of (top_of_set T) a b \ path_component T a b" + by (simp add: path_component_of_def pathin_canon_iff path_defs) + lemma path_component_in_topspace: "path_component_of X x y \ x \ topspace X \ y \ topspace X" by (auto simp: path_component_of_def pathin_def continuous_map_def) @@ -2028,13 +2035,11 @@ qed (auto simp: g1 g2) qed - lemma path_component_of_mono: "\path_component_of (subtopology X S) x y; S \ T\ \ path_component_of (subtopology X T) x y" unfolding path_component_of_def by (metis subsetD pathin_subtopology) - lemma path_component_of: "path_component_of X x y \ (\T. path_connectedin X T \ x \ T \ y \ T)" apply (auto simp: path_component_of_def) diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Product_Topology.thy --- a/src/HOL/Analysis/Product_Topology.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Product_Topology.thy Tue Mar 26 17:01:55 2019 +0000 @@ -80,13 +80,6 @@ "prod_topology (subtopology euclidean S) (subtopology euclidean T) = subtopology euclidean (S \ T)" by (simp add: prod_topology_subtopology subtopology_subtopology Times_Int_Times) -lemma continuous_map_subtopology_eu [simp]: - "continuous_map (subtopology euclidean S) (subtopology euclidean T) h \ continuous_on S h \ h ` S \ T" - apply safe - apply (metis continuous_map_closedin_preimage_eq continuous_map_in_subtopology continuous_on_closed order_refl topspace_euclidean_subtopology) - apply (simp add: continuous_map_closedin_preimage_eq image_subset_iff) - by (metis (no_types, hide_lams) continuous_map_closedin_preimage_eq continuous_map_in_subtopology continuous_on_closed order_refl topspace_euclidean_subtopology) - lemma openin_prod_topology_alt: "openin (prod_topology X Y) S \ (\x y. (x,y) \ S \ (\U V. openin X U \ openin Y V \ x \ U \ y \ V \ U \ V \ S))" @@ -101,7 +94,7 @@ unfolding open_map_def openin_prod_topology_alt by (force simp: openin_subopen [of Y "snd ` _"] intro: subset_snd_imageI) -lemma openin_Times: +lemma openin_prod_Times_iff: "openin (prod_topology X Y) (S \ T) \ S = {} \ T = {} \ openin X S \ openin Y T" proof (cases "S = {} \ T = {}") case False @@ -121,7 +114,7 @@ by (clarsimp simp: closure_of_def openin_prod_topology_alt) (meson SigmaI subsetD) qed -lemma closedin_Times: +lemma closedin_prod_Times_iff: "closedin (prod_topology X Y) (S \ T) \ S = {} \ T = {} \ closedin X S \ closedin Y T" by (auto simp: closure_of_Times times_eq_iff simp flip: closure_of_eq) @@ -130,7 +123,7 @@ show "(X interior_of S) \ Y interior_of T \ S \ T" by (simp add: Sigma_mono interior_of_subset) show "openin (prod_topology X Y) ((X interior_of S) \ Y interior_of T)" - by (simp add: openin_Times) + by (simp add: openin_prod_Times_iff) next show "T' \ (X interior_of S) \ Y interior_of T" if "T' \ S \ T" "openin (prod_topology X Y) T'" for T' proof (clarsimp; intro conjI) @@ -165,7 +158,7 @@ unfolding continuous_map_def using True that apply clarify apply (drule_tac x="U \ topspace Y" in spec) - by (simp add: openin_Times mem_Times_iff cong: conj_cong) + by (simp add: openin_prod_Times_iff mem_Times_iff cong: conj_cong) with True show "continuous_map Z X (fst \ f)" by (auto simp: continuous_map_def) next @@ -174,7 +167,7 @@ unfolding continuous_map_def using True that apply clarify apply (drule_tac x="topspace X \ V" in spec) - by (simp add: openin_Times mem_Times_iff cong: conj_cong) + by (simp add: openin_prod_Times_iff mem_Times_iff cong: conj_cong) with True show "continuous_map Z Y (snd \ f)" by (auto simp: continuous_map_def) next diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/T1_Spaces.thy --- a/src/HOL/Analysis/T1_Spaces.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/T1_Spaces.thy Tue Mar 26 17:01:55 2019 +0000 @@ -209,7 +209,7 @@ by simp have "t1_space (prod_topology X Y) \ (t1_space X \ t1_space Y)" using False - by (force simp: t1_space_closedin_singleton closedin_Times eq simp del: insert_Times_insert) + by (force simp: t1_space_closedin_singleton closedin_prod_Times_iff eq simp del: insert_Times_insert) with False show ?thesis by simp qed diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Analysis/Winding_Numbers.thy --- a/src/HOL/Analysis/Winding_Numbers.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Analysis/Winding_Numbers.thy Tue Mar 26 17:01:55 2019 +0000 @@ -1137,23 +1137,25 @@ and qeq: "pathfinish q - pathstart q = 2 * of_real pi * \ * winding_number p \" and peq: "\t. t \ {0..1} \ p t = \ + exp(q t)" using winding_number_as_continuous_log [OF assms] by blast - have *: "homotopic_with (\r. pathfinish r = pathstart r) + have *: "homotopic_with_canon (\r. pathfinish r = pathstart r) {0..1} (-{\}) ((\w. \ + exp w) \ q) ((\w. \ + exp w) \ (\t. 0))" proof (rule homotopic_with_compose_continuous_left) - show "homotopic_with (\f. pathfinish ((\w. \ + exp w) \ f) = pathstart ((\w. \ + exp w) \ f)) + show "homotopic_with_canon (\f. pathfinish ((\w. \ + exp w) \ f) = pathstart ((\w. \ + exp w) \ f)) {0..1} UNIV q (\t. 0)" proof (rule homotopic_with_mono, simp_all add: pathfinish_def pathstart_def) have "homotopic_loops UNIV q (\t. 0)" - by (rule homotopic_loops_linear) (use qeq \path q\ in \auto simp: continuous_on_const path_defs\) - then show "homotopic_with (\h. exp (h 1) = exp (h 0)) {0..1} UNIV q (\t. 0)" - by (simp add: homotopic_loops_def homotopic_with_mono pathfinish_def pathstart_def) + by (rule homotopic_loops_linear) (use qeq \path q\ in \auto simp: path_defs\) + then have "homotopic_with (\r. r 1 = r 0) (top_of_set {0..1}) euclidean q (\t. 0)" + by (simp add: homotopic_loops_def pathfinish_def pathstart_def) + then show "homotopic_with (\h. exp (h 1) = exp (h 0)) (top_of_set {0..1}) euclidean q (\t. 0)" + by (rule homotopic_with_mono) simp qed show "continuous_on UNIV (\w. \ + exp w)" by (rule continuous_intros)+ show "range (\w. \ + exp w) \ -{\}" by auto qed - then have "homotopic_with (\r. pathfinish r = pathstart r) {0..1} (-{\}) p (\x. \ + 1)" + then have "homotopic_with_canon (\r. pathfinish r = pathstart r) {0..1} (-{\}) p (\x. \ + 1)" by (rule homotopic_with_eq) (auto simp: o_def peq pathfinish_def pathstart_def) then have "homotopic_loops (-{\}) p (\t. \ + 1)" by (simp add: homotopic_loops_def) diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Complete_Lattices.thy --- a/src/HOL/Complete_Lattices.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Complete_Lattices.thy Tue Mar 26 17:01:55 2019 +0000 @@ -998,6 +998,12 @@ apply (auto simp: disjnt_def) using inj_on_eq_iff by fastforce +lemma disjnt_Union1 [simp]: "disjnt (\\) B \ (\A \ \. disjnt A B)" + by (auto simp: disjnt_def) + +lemma disjnt_Union2 [simp]: "disjnt B (\\) \ (\A \ \. disjnt B A)" + by (auto simp: disjnt_def) + subsubsection \Unions of families\ diff -r 8e916ed23d17 -r e7648f104d6b src/HOL/Set.thy --- a/src/HOL/Set.thy Tue Mar 26 16:27:29 2019 +0100 +++ b/src/HOL/Set.thy Tue Mar 26 17:01:55 2019 +0000 @@ -1926,6 +1926,12 @@ lemma disjnt_subset2 : "\disjnt X Y; Z \ Y\ \ disjnt X Z" by (auto simp: disjnt_def) +lemma disjnt_Un1 [simp]: "disjnt (A \ B) C \ disjnt A C \ disjnt B C" + by (auto simp: disjnt_def) + +lemma disjnt_Un2 [simp]: "disjnt C (A \ B) \ disjnt C A \ disjnt C B" + by (auto simp: disjnt_def) + lemma disjoint_image_subset: "\pairwise disjnt \; \X. X \ \ \ f X \ X\ \ pairwise disjnt (f `\)" unfolding disjnt_def pairwise_def by fast