# HG changeset patch # User paulson # Date 1587294146 -3600 # Node ID 4892ceb5b29ab35f7c92809f5eb0304fc0629349 # Parent fbd77ee16f25b9819d9be5cc760d8800b2424459 the rest of the applys diff -r fbd77ee16f25 -r 4892ceb5b29a src/HOL/Analysis/Homotopy.thy --- a/src/HOL/Analysis/Homotopy.thy Sat Apr 18 23:13:17 2020 +0100 +++ b/src/HOL/Analysis/Homotopy.thy Sun Apr 19 12:02:26 2020 +0100 @@ -5,7 +5,7 @@ section \Homotopy of Maps\ theory Homotopy - imports Path_Connected Continuum_Not_Denumerable Product_Topology + imports Path_Connected Continuum_Not_Denumerable Product_Topology Sketch_and_Explore begin definition\<^marker>\tag important\ homotopic_with @@ -1627,7 +1627,7 @@ using assms unfolding locally_def by meson lemma locally_mono: - assumes "locally P S" "\t. P t \ Q t" + assumes "locally P S" "\T. P T \ Q T" shows "locally Q S" by (metis assms locally_def) @@ -2631,8 +2631,8 @@ proposition locally_path_connected: "locally path_connected S \ - (\v x. openin (top_of_set S) v \ x \ v - \ (\u. openin (top_of_set S) u \ path_connected u \ x \ u \ u \ v))" + (\V x. openin (top_of_set S) V \ x \ V + \ (\U. openin (top_of_set S) U \ path_connected U \ x \ U \ U \ V))" by (metis locally_path_connected_1 locally_path_connected_2 locally_path_connected_3) proposition locally_path_connected_open_path_component: @@ -2682,10 +2682,7 @@ using G u by auto qed show ?lhs - apply (clarsimp simp add: locally_connected_open_component) - apply (subst openin_subopen) - apply (blast intro: *) - done + unfolding locally_connected_open_component by (meson "*" openin_subopen) qed proposition locally_path_connected_im_kleinen: @@ -2716,16 +2713,11 @@ (\y. y \ U \ (\p. path p \ path_image p \ u \ pathstart p = x \ pathfinish p = y))" by blast show ?thesis - apply (rule_tac x=U in exI) - apply (auto simp: U) - apply (metis U c path_component_trans path_component_def) - done + by (metis U c mem_Collect_eq path_component_def path_component_eq subsetI) qed show ?lhs - apply (clarsimp simp add: locally_path_connected_open_path_component) - apply (subst openin_subopen) - apply (blast intro: *) - done + unfolding locally_path_connected_open_path_component + using "*" openin_subopen by fastforce qed lemma locally_path_connected_imp_locally_connected: @@ -2746,11 +2738,15 @@ lemma open_imp_locally_path_connected: fixes S :: "'a :: real_normed_vector set" - shows "open S \ locally path_connected S" -apply (rule locally_mono [of convex]) -apply (simp_all add: locally_def openin_open_eq convex_imp_path_connected) -apply (meson open_ball centre_in_ball convex_ball openE order_trans) -done + assumes "open S" + shows "locally path_connected S" +proof (rule locally_mono) + show "locally convex S" + using assms unfolding locally_def + by (meson open_ball centre_in_ball convex_ball openE open_subset openin_imp_subset openin_open_trans subset_trans) + show "\T::'a set. convex T \ path_connected T" + using convex_imp_path_connected by blast +qed lemma open_imp_locally_connected: fixes S :: "'a :: real_normed_vector set" @@ -2766,8 +2762,7 @@ lemma openin_connected_component_locally_connected: "locally connected S \ openin (top_of_set S) (connected_component_set S x)" -apply (simp add: locally_connected_open_connected_component) -by (metis connected_component_eq_empty connected_component_subset open_empty open_subset openin_subtopology_self) + by (metis connected_component_eq_empty locally_connected_2 openin_empty openin_subtopology_self) lemma openin_components_locally_connected: "\locally connected S; c \ components S\ \ openin (top_of_set S) c" @@ -2779,22 +2774,29 @@ by (metis (no_types) empty_iff locally_path_connected_2 openin_subopen openin_subtopology_self path_component_eq_empty) lemma closedin_path_component_locally_path_connected: - "locally path_connected S - \ closedin (top_of_set S) (path_component_set S x)" -apply (simp add: closedin_def path_component_subset complement_path_component_Union) -apply (rule openin_Union) -using openin_path_component_locally_path_connected by auto + assumes "locally path_connected S" + shows "closedin (top_of_set S) (path_component_set S x)" +proof - + have "openin (top_of_set S) (\ ({path_component_set S y |y. y \ S} - {path_component_set S x}))" + using locally_path_connected_2 assms by fastforce + then show ?thesis + by (simp add: closedin_def path_component_subset complement_path_component_Union) +qed lemma convex_imp_locally_path_connected: fixes S :: "'a:: real_normed_vector set" - shows "convex S \ locally path_connected S" -apply (clarsimp simp add: locally_path_connected) -apply (subst (asm) openin_open) -apply clarify -apply (erule (1) openE) -apply (rule_tac x = "S \ ball x e" in exI) -apply (force simp: convex_Int convex_imp_path_connected) -done + assumes "convex S" + shows "locally path_connected S" +proof (clarsimp simp add: locally_path_connected) + fix V x + assume "openin (top_of_set S) V" and "x \ V" + then obtain T e where "V = S \ T" "x \ S" "0 < e" "ball x e \ T" + by (metis Int_iff openE openin_open) + then have "openin (top_of_set S) (S \ ball x e)" "path_connected (S \ ball x e)" + by (simp_all add: assms convex_Int convex_imp_path_connected openin_open_Int) + then show "\U. openin (top_of_set S) U \ path_connected U \ x \ U \ U \ V" + using \0 < e\ \V = S \ T\ \ball x e \ T\ \x \ S\ by auto +qed lemma convex_imp_locally_connected: fixes S :: "'a:: real_normed_vector set" @@ -2810,15 +2812,19 @@ proof (cases "x \ S") case True have "openin (top_of_set (connected_component_set S x)) (path_component_set S x)" - apply (rule openin_subset_trans [of S]) - apply (intro conjI openin_path_component_locally_path_connected [OF assms]) - using path_component_subset_connected_component apply (auto simp: connected_component_subset) - done + proof (rule openin_subset_trans) + show "openin (top_of_set S) (path_component_set S x)" + by (simp add: True assms locally_path_connected_2) + show "connected_component_set S x \ S" + by (simp add: connected_component_subset) + qed (simp add: path_component_subset_connected_component) moreover have "closedin (top_of_set (connected_component_set S x)) (path_component_set S x)" - apply (rule closedin_subset_trans [of S]) - apply (intro conjI closedin_path_component_locally_path_connected [OF assms]) - using path_component_subset_connected_component apply (auto simp: connected_component_subset) - done + proof (rule closedin_subset_trans [of S]) + show "closedin (top_of_set S) (path_component_set S x)" + by (simp add: assms closedin_path_component_locally_path_connected) + show "connected_component_set S x \ S" + by (simp add: connected_component_subset) + qed (simp add: path_component_subset_connected_component) ultimately have *: "path_component_set S x = connected_component_set S x" by (metis connected_connected_component connected_clopen True path_component_eq_empty) then show ?thesis @@ -2881,9 +2887,7 @@ have contf: "continuous_on S f" by (simp add: continuous_on_open oo openin_imp_subset) then have "continuous_on (connected_component_set (S \ f -` U) x) f" - apply (rule continuous_on_subset) - using connected_component_subset apply blast - done + by (meson connected_component_subset continuous_on_subset inf.boundedE) then have "connected (f ` connected_component_set (S \ f -` U) x)" by (rule connected_continuous_image [OF _ connected_connected_component]) moreover have "f ` connected_component_set (S \ f -` U) x \ U" @@ -2953,9 +2957,7 @@ have contf: "continuous_on S f" by (simp add: continuous_on_open oo openin_imp_subset) then have "continuous_on (path_component_set (S \ f -` U) x) f" - apply (rule continuous_on_subset) - using path_component_subset apply blast - done + by (meson Int_lower1 continuous_on_subset path_component_subset) then have "path_connected (f ` path_component_set (S \ f -` U) x)" by (simp add: path_connected_continuous_image) moreover have "f ` path_component_set (S \ f -` U) x \ U" @@ -2989,8 +2991,8 @@ lemma continuous_on_components_gen: fixes f :: "'a::topological_space \ 'b::topological_space" - assumes "\c. c \ components S \ - openin (top_of_set S) c \ continuous_on c f" + assumes "\C. C \ components S \ + openin (top_of_set S) C \ continuous_on C f" shows "continuous_on S f" proof (clarsimp simp: continuous_openin_preimage_eq) fix t :: "'b set" @@ -3003,12 +3005,14 @@ lemma continuous_on_components: fixes f :: "'a::topological_space \ 'b::topological_space" - assumes "locally connected S " - "\c. c \ components S \ continuous_on c f" - shows "continuous_on S f" -apply (rule continuous_on_components_gen) -apply (auto simp: assms intro: openin_components_locally_connected) -done + assumes "locally connected S " "\C. C \ components S \ continuous_on C f" + shows "continuous_on S f" +proof (rule continuous_on_components_gen) + fix C + assume "C \ components S" + then show "openin (top_of_set S) C \ continuous_on C f" + by (simp add: assms openin_components_locally_connected) +qed lemma continuous_on_components_eq: "locally connected S @@ -3029,32 +3033,33 @@ by (blast intro: continuous_on_components_open) lemma closedin_union_complement_components: - assumes u: "locally connected u" - and S: "closedin (top_of_set u) S" - and cuS: "c \ components(u - S)" - shows "closedin (top_of_set u) (S \ \c)" + assumes U: "locally connected U" + and S: "closedin (top_of_set U) S" + and cuS: "c \ components(U - S)" + shows "closedin (top_of_set U) (S \ \c)" proof - have di: "(\S t. S \ c \ t \ c' \ disjnt S t) \ disjnt (\ c) (\ c')" for c' by (simp add: disjnt_def) blast - have "S \ u" + have "S \ U" using S closedin_imp_subset by blast - moreover have "u - S = \c \ \(components (u - S) - c)" + moreover have "U - S = \c \ \(components (U - S) - c)" by (metis Diff_partition Union_components Union_Un_distrib assms(3)) - moreover have "disjnt (\c) (\(components (u - S) - c))" + moreover have "disjnt (\c) (\(components (U - S) - c))" apply (rule di) by (metis DiffD1 DiffD2 assms(3) components_nonoverlap disjnt_def subsetCE) - ultimately have eq: "S \ \c = u - (\(components(u - S) - c))" + ultimately have eq: "S \ \c = U - (\(components(U - S) - c))" by (auto simp: disjnt_def) - have *: "openin (top_of_set u) (\(components (u - S) - c))" - apply (rule openin_Union) - apply (rule openin_trans [of "u - S"]) - apply (simp add: u S locally_diff_closed openin_components_locally_connected) - apply (simp add: openin_diff S) - done - have "openin (top_of_set u) (u - (u - \(components (u - S) - c)))" - apply (rule openin_diff, simp) - apply (metis closedin_diff closedin_topspace topspace_euclidean_subtopology *) - done + have *: "openin (top_of_set U) (\(components (U - S) - c))" + proof (rule openin_Union [OF openin_trans [of "U - S"]]) + show "openin (top_of_set (U - S)) T" if "T \ components (U - S) - c" for T + using that by (simp add: U S locally_diff_closed openin_components_locally_connected) + show "openin (top_of_set U) (U - S)" if "T \ components (U - S) - c" for T + using that by (simp add: openin_diff S) + qed + have "closedin (top_of_set U) (U - \ (components (U - S) - c))" + by (metis closedin_diff closedin_topspace topspace_euclidean_subtopology *) + then have "openin (top_of_set U) (U - (U - \(components (U - S) - c)))" + by (simp add: openin_diff) then show ?thesis by (force simp: eq closedin_def) qed @@ -3065,9 +3070,7 @@ shows "closed(S \ \ c)" proof - have "closedin (top_of_set UNIV) (S \ \c)" - apply (rule closedin_union_complement_components [OF locally_connected_UNIV]) - using S c apply (simp_all add: Compl_eq_Diff_UNIV) - done + by (metis Compl_eq_Diff_UNIV S c closed_closedin closedin_union_complement_components locally_connected_UNIV subtopology_UNIV) then show ?thesis by simp qed @@ -3114,7 +3117,7 @@ by (metis \card B = dim S\ \card C = dim T\ \finite B\ \finite C\ card_le_inj d) then have pairwise_orth_fb: "pairwise (\v j. orthogonal (fb v) (fb j)) B" using Corth - apply (auto simp: pairwise_def orthogonal_clauses) + apply (auto simp: pairwise_def orthogonal_clauses inj_on_def) by (meson subsetD image_eqI inj_on_def) obtain f where "linear f" and ffb: "\x. x \ B \ f x = fb x" using linear_independent_extend \independent B\ by fastforce @@ -3131,9 +3134,10 @@ using \finite B\ \span B = S\ \x \ S\ span_finite by fastforce have "norm (f x)^2 = norm (\v\B. a v *\<^sub>R fb v)^2" by (simp add: sum scale ffb x) also have "\ = (\v\B. norm ((a v *\<^sub>R fb v))^2)" - apply (rule norm_sum_Pythagorean [OF \finite B\]) - apply (rule pairwise_ortho_scaleR [OF pairwise_orth_fb]) - done + proof (rule norm_sum_Pythagorean [OF \finite B\]) + show "pairwise (\v j. orthogonal (a v *\<^sub>R fb v) (a j *\<^sub>R fb j)) B" + by (rule pairwise_ortho_scaleR [OF pairwise_orth_fb]) + qed also have "\ = norm x ^2" by (simp add: x pairwise_ortho_scaleR Borth norm_sum_Pythagorean [OF \finite B\]) finally show ?thesis @@ -3200,9 +3204,10 @@ finally have *: "f x = (\v\B. a v *\<^sub>R fb v)" . then have "(norm (f x))\<^sup>2 = (norm (\v\B. a v *\<^sub>R fb v))\<^sup>2" by simp also have "\ = (\v\B. norm ((a v *\<^sub>R fb v))^2)" - apply (rule norm_sum_Pythagorean [OF \finite B\]) - apply (rule pairwise_ortho_scaleR [OF pairwise_orth_fb]) - done + proof (rule norm_sum_Pythagorean [OF \finite B\]) + show "pairwise (\v j. orthogonal (a v *\<^sub>R fb v) (a j *\<^sub>R fb j)) B" + by (rule pairwise_ortho_scaleR [OF pairwise_orth_fb]) + qed also have "\ = (norm x)\<^sup>2" by (simp add: x pairwise_ortho_scaleR Borth norm_sum_Pythagorean [OF \finite B\]) finally show "norm (f x) = norm x" @@ -3213,8 +3218,10 @@ also have "\ = (\v\B. a v *\<^sub>R g (fb v))" by (simp add: g.scale) also have "\ = (\v\B. a v *\<^sub>R v)" - apply (rule sum.cong [OF refl]) - using \bij_betw fb B C\ gb_def bij_betwE bij_betw_inv_into_left gb_def ggb by fastforce + proof (rule sum.cong [OF refl]) + show "a x *\<^sub>R g (fb x) = a x *\<^sub>R x" if "x \ B" for x + using that \bij_betw fb B C\ bij_betwE bij_betw_inv_into_left gb_def ggb by fastforce + qed also have "\ = x" using x by blast finally show "g (f x) = x" . @@ -3251,9 +3258,7 @@ have [simp]: "norm (g x) = norm x" if "x \ T" for x using fim that by auto show ?thesis - apply (rule that [OF \linear f\ \linear g\]) - apply (simp_all add: fim gim) - done + by (rule that [OF \linear f\ \linear g\]) (simp_all add: fim gim) qed corollary isometry_subspaces: @@ -3329,33 +3334,33 @@ begin lemma homotopically_trivial_retraction_gen: - assumes P: "\f. \continuous_on u f; f ` u \ t; Q f\ \ P(k \ f)" - 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 g. \continuous_on u f; f ` u \ s; P f; - continuous_on u g; g ` u \ s; P 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_canon Q u t f g" + assumes P: "\f. \continuous_on U f; f ` U \ t; Q f\ \ P(k \ f)" + 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 g. \continuous_on U f; f ` U \ s; P f; + continuous_on U g; g ` U \ s; P 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_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 - have "continuous_on u (k \ f)" + 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 + have "continuous_on U (k \ f)" using contf continuous_on_compose continuous_on_subset contk imf by blast - moreover have "(k \ f) ` u \ s" + moreover have "(k \ f) ` U \ s" using imf imk by fastforce moreover have "P (k \ f)" by (simp add: P Qf contf imf) - moreover have "continuous_on u (k \ g)" + moreover have "continuous_on U (k \ g)" using contg continuous_on_compose continuous_on_subset contk img by blast - moreover have "(k \ g) ` u \ s" + moreover have "(k \ g) ` U \ s" using img imk by fastforce moreover have "P (k \ g)" by (simp add: P Qg contg img) - ultimately have "homotopic_with_canon 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_canon 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 @@ -3365,62 +3370,65 @@ qed lemma homotopically_trivial_retraction_null_gen: - assumes P: "\f. \continuous_on u f; f ` u \ t; Q f\ \ P(k \ f)" - 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_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_canon Q u t f (\x. c)" + assumes P: "\f. \continuous_on U f; f ` U \ t; Q f\ \ P(k \ f)" + 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_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_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)" + have feq: "\x. x \ U \ (h \ (k \ f)) x = f x" using idhk imf by auto + have "continuous_on U (k \ f)" using contf continuous_on_compose continuous_on_subset contk imf by blast - moreover have "(k \ f) ` u \ s" + moreover have "(k \ f) ` U \ s" using imf imk by fastforce moreover have "P (k \ f)" by (simp add: P Qf contf imf) - ultimately obtain c where "homotopic_with_canon 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_canon 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 have "homotopic_with_canon Q U t f (\x. h c)" + proof (rule homotopic_with_eq) + show "\x. x \ topspace (top_of_set U) \ f x = (h \ (k \ f)) x" + using feq by auto + show "\h k. (\x. x \ topspace (top_of_set U) \ h x = k x) \ Q h = Q k" + using Qeq topspace_euclidean_subtopology by blast + qed auto then show ?thesis - apply (rule_tac c = "h c" in that) - apply (erule homotopic_with_eq) - using feq apply auto[1] - apply simp - using Qeq topspace_euclidean_subtopology by blast + using that by blast qed lemma cohomotopically_trivial_retraction_gen: - assumes P: "\f. \continuous_on t f; f ` t \ u; Q f\ \ P(f \ h)" - and Q: "\f. \continuous_on s f; f ` s \ u; P f\ \ Q(f \ k)" + assumes P: "\f. \continuous_on t f; f ` t \ U; Q f\ \ P(f \ h)" + 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; - continuous_on s g; g ` s \ u; P 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_canon Q t u f g" + and hom: "\f g. \continuous_on s f; f ` s \ U; P f; + continuous_on s g; g ` s \ U; P 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_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 have "continuous_on s (f \ h)" using contf conth continuous_on_compose imh by blast - moreover have "(f \ h) ` s \ u" + moreover have "(f \ h) ` s \ U" using imf imh by fastforce moreover have "P (f \ h)" by (simp add: P Qf contf imf) moreover have "continuous_on s (g \ h)" using contg continuous_on_compose continuous_on_subset conth imh by blast - moreover have "(g \ h) ` s \ u" + moreover have "(g \ h) ` s \ U" using img imh by fastforce moreover have "P (g \ h)" by (simp add: P Qg contg img) - ultimately have "homotopic_with_canon 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_canon 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 @@ -3432,29 +3440,29 @@ qed lemma cohomotopically_trivial_retraction_null_gen: - assumes P: "\f. \continuous_on t f; f ` t \ u; Q f\ \ P(f \ h)" - and Q: "\f. \continuous_on s f; f ` s \ u; P f\ \ Q(f \ k)" + assumes P: "\f. \continuous_on t f; f ` t \ U; Q f\ \ P(f \ h)" + 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_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_canon Q t u f (\x. c)" + and hom: "\f g. \continuous_on s f; f ` s \ U; P f\ + \ \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_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)" using contf conth continuous_on_compose imh by blast - moreover have "(f \ h) ` s \ u" + moreover have "(f \ h) ` s \ U" using imf imh by fastforce moreover have "P (f \ h)" by (simp add: P Qf contf imf) - ultimately obtain c where "homotopic_with_canon 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_canon Q t u (f \ h \ k) ((\x. c) \ k)" + then have \
: "homotopic_with_canon Q t U (f \ h \ k) ((\x. c) \ k)" proof (rule homotopic_with_compose_continuous_right [OF homotopic_with_mono]) - show "\h. \continuous_map (top_of_set s) (top_of_set u) h; P h\ \ Q (h \ k)" + show "\h. \continuous_map (top_of_set s) (top_of_set U) h; P h\ \ Q (h \ k)" using Q by auto qed (auto simp: contk imk) - moreover have "homotopic_with_canon Q t u f (\x. c)" + moreover have "homotopic_with_canon Q t U f (\x. c)" using homotopic_with_eq [OF \
] feq Qeq by fastforce ultimately show ?thesis using that by blast @@ -3531,9 +3539,7 @@ moreover have "homotopic_with (\x. True) X X (g1 \ id \ f1) id" using hom1 by simp 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 + by (metis comp_assoc homotopic_with_trans id_comp) 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)" @@ -3544,9 +3550,7 @@ 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" - apply (simp add: o_assoc) - apply (blast intro: homotopic_with_trans) - done + by (simp add: fun.map_comp hom2(2) homotopic_with_trans) show ?thesis unfolding homotopy_equivalent_space_def by (blast intro: f1 f2 g1 g2 continuous_map_compose SS UU) @@ -3556,10 +3560,7 @@ "\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 + using homotopic_with_id2 by fastforce lemma deformation_retract_imp_homotopy_equivalent_space: "\homotopic_with (\x. True) X X r id; retraction_maps X Y r id\ @@ -3663,10 +3664,10 @@ let ?g = "h \ (\x. (x,b))" show "pathin X ?g" unfolding pathin_def - apply (rule continuous_map_compose [OF _ conth]) - using that - apply (auto simp: continuous_map_pairwise intro!: continuous_intros continuous_map_compose continuous_map_id [unfolded id_def]) - done + proof (rule continuous_map_compose [OF _ conth]) + show "continuous_map (top_of_set {0..1}) (prod_topology (top_of_set {0..1}) X) (\x. (x, b))" + using that by (auto intro!: continuous_intros) + qed qed (use h in auto) then show ?thesis by (metis path_component_of_equiv path_connected_space_iff_path_component) @@ -3919,10 +3920,7 @@ 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) + by (metis continuous_map_subtopology_eu homotopic_with_id2 openin_imp_subset openin_subtopology_self topspace_euclidean_subtopology) lemma homotopy_eqv_inj_linear_image: @@ -4021,9 +4019,7 @@ by (rule homotopic_with_compose_continuous_left [where Y=T]) (use f in \auto simp add: hom homotopic_with_symD\) ultimately show ?thesis - apply (rule_tac c=c in that) - apply (simp add: o_def) - using homotopic_with_trans by blast + using that homotopic_with_trans by (fastforce simp add: o_def) qed lemma homotopy_eqv_cohomotopic_triviality_null: @@ -4101,10 +4097,11 @@ 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) - apply (metis Abstract_Topology.continuous_map_subtopology_eu emptyE equals0I homotopy_equivalent_space_def image_subset_iff) - by (simp add: homotopy_eqv_contractible_sets) + shows "S homotopy_eqv ({}::'b::real_normed_vector set) \ S = {}" (is "?lhs = ?rhs") +proof + assume ?lhs then show ?rhs + by (metis continuous_map_subtopology_eu empty_iff equalityI homotopy_equivalent_space_def image_subset_iff subsetI) +qed (simp add: homotopy_eqv_contractible_sets) lemma homotopy_eqv_empty2 [simp]: fixes S :: "'a::real_normed_vector set" @@ -4168,17 +4165,15 @@ have "DIM('a) = DIM(real)" by (simp add: "1") then obtain f::"'a \ real" and g - where "linear f" "\x. norm(f x) = norm x" "\x. g(f x) = x" "\y. f(g y) = y" + where "linear f" "\x. norm(f x) = norm x" and fg: "\x. g(f x) = x" "\y. f(g y) = y" by (rule isomorphisms_UNIV_UNIV) blast with \bounded S\ have "bounded (f ` S)" using bounded_linear_image linear_linear by blast + have "bij f" by (metis fg bijI') have "connected (f ` (-S))" using connected_linear_image assms \linear f\ by blast moreover have "f ` (-S) = - (f ` S)" - apply (rule bij_image_Compl_eq) - apply (auto simp: bij_def) - apply (metis \\x. g (f x) = x\ injI) - by (metis UNIV_I \\y. f (g y) = y\ image_iff) + by (simp add: \bij f\ bij_image_Compl_eq) finally have "connected (- (f ` S))" by simp then have "f ` S = {}" @@ -4303,10 +4298,9 @@ lemma connected_card_eq_iff_nontrivial: fixes S :: "'a::metric_space set" shows "connected S \ uncountable S \ \(\a. S \ {a})" - apply (auto simp: countable_finite finite_subset) - by (metis connected_uncountable is_singletonI' is_singleton_the_elem subset_singleton_iff) - -lemma simple_path_image_uncountable: + by (metis connected_uncountable finite.emptyI finite.insertI rev_finite_subset singleton_iff subsetI uncountable_infinite) + +lemma simple_path_image_uncountable: fixes g :: "real \ 'a::metric_space" assumes "simple_path g" shows "uncountable (path_image g)" @@ -4315,9 +4309,10 @@ by (simp_all add: path_defs) moreover have "g 0 \ g (1/2)" using assms by (fastforce simp add: simple_path_def) - ultimately show ?thesis - apply (simp add: assms connected_card_eq_iff_nontrivial connected_simple_path_image) + ultimately have "\a. \ path_image g \ {a}" by blast + then show ?thesis + using assms connected_simple_path_image connected_uncountable by blast qed lemma arc_image_uncountable: @@ -4406,10 +4401,8 @@ show "x \ f ` ((\z\closed_segment ?m c. {closed_segment z u \ S}) - {{}})" proof (rule_tac x="closed_segment x u \ S" in image_eqI) show "x = f (closed_segment x u \ S)" - unfolding f_def - apply (rule the_equality [symmetric]) - using x apply (auto simp: dest: **) - done + unfolding f_def + by (rule the_equality [symmetric]) (use x in \auto dest: **\) qed (use x in auto) qed qed @@ -4466,9 +4459,10 @@ with ge2 show False by (metis (no_types) aff_dim_2 antisym aff not_numeral_le_zero one_le_numeral order_trans) qed - then show ?thesis - apply (rule path_connected_convex_diff_countable [OF \convex S\]) + moreover have "countable {a}" by simp + ultimately show ?thesis + by (metis path_connected_convex_diff_countable [OF \convex S\]) qed qed @@ -4481,9 +4475,10 @@ assumes "2 \ DIM('a)" "countable S" shows "path_connected(- S)" proof - - have "path_connected(UNIV - S)" - apply (rule path_connected_convex_diff_countable) + have "\ collinear (UNIV::'a set)" using assms by (auto simp: collinear_aff_dim [of "UNIV :: 'a set"]) + then have "path_connected(UNIV - S)" + by (simp add: \countable S\ path_connected_convex_diff_countable) then show ?thesis by (simp add: Compl_eq_Diff_UNIV) qed @@ -4620,11 +4615,13 @@ using yx \r > 0\ by (simp add: field_split_simps) also have "\ < norm y + (norm x - norm y) * 1" - apply (subst add_less_cancel_left) - apply (rule mult_strict_left_mono) - using nou \0 < r\ yx - apply (simp_all add: field_simps) - done + proof (subst add_less_cancel_left) + show "(norm x - norm y) * (norm u / r) < (norm x - norm y) * 1" + proof (rule mult_strict_left_mono) + show "norm u / r < 1" + using \0 < r\ divide_less_eq_1_pos nou by blast + qed (simp add: yx) + qed also have "\ = norm x" by simp finally show False by simp @@ -4714,16 +4711,13 @@ qed qed qed - have "\g. homeomorphism (cball a r \ T) (cball a r \ T) f g" - apply (rule homeomorphism_compact [OF _ contf fim inj_onf]) - apply (simp add: affine_closed compact_Int_closed \affine T\) - done - then show ?thesis - apply (rule exE) - apply (erule_tac f=f in that) - using \r > 0\ - apply (simp_all add: f_def dist_norm norm_minus_commute) - done + have "compact (cball a r \ T)" + by (simp add: affine_closed compact_Int_closed \affine T\) + then obtain g where "homeomorphism (cball a r \ T) (cball a r \ T) f g" + by (metis homeomorphism_compact [OF _ contf fim inj_onf]) + then show thesis + apply (rule_tac f=f in that) + using \r > 0\ by (simp_all add: f_def dist_norm norm_minus_commute) qed corollary\<^marker>\tag unimportant\ homeomorphism_moving_point_2: @@ -4773,23 +4767,17 @@ show "homeomorphism S S ff gg" proof (rule homeomorphismI) have "continuous_on ((cball a r \ T) \ (T - ball a r)) ff" - apply (simp add: ff_def) + unfolding ff_def apply (rule continuous_on_cases) - using homeomorphism_cont1 [OF hom] - apply (auto simp: affine_closed \affine T\ fid) - done + using homeomorphism_cont1 [OF hom] by (auto simp: affine_closed \affine T\ fid) then show "continuous_on S ff" - apply (rule continuous_on_subset) - using ST by auto + by (rule continuous_on_subset) (use ST in auto) have "continuous_on ((cball a r \ T) \ (T - ball a r)) gg" - apply (simp add: gg_def) + unfolding gg_def apply (rule continuous_on_cases) - using homeomorphism_cont2 [OF hom] - apply (auto simp: affine_closed \affine T\ gid) - done + using homeomorphism_cont2 [OF hom] by (auto simp: affine_closed \affine T\ gid) then show "continuous_on S gg" - apply (rule continuous_on_subset) - using ST by auto + by (rule continuous_on_subset) (use ST in auto) show "ff ` S \ S" proof (clarsimp simp add: ff_def) fix x @@ -4812,13 +4800,13 @@ using ST(1) \g x \ cball a r \ T\ by force qed show "\x. x \ S \ gg (ff x) = x" - apply (simp add: ff_def gg_def) + unfolding ff_def gg_def using homeomorphism_apply1 [OF hom] homeomorphism_image1 [OF hom] apply auto apply (metis Int_iff homeomorphism_apply1 [OF hom] fid image_eqI less_eq_real_def mem_cball mem_sphere) done show "\x. x \ S \ ff (gg x) = x" - apply (simp add: ff_def gg_def) + unfolding ff_def gg_def using homeomorphism_apply2 [OF hom] homeomorphism_image2 [OF hom] apply auto apply (metis Int_iff fid image_eqI less_eq_real_def mem_cball mem_sphere) @@ -4894,18 +4882,11 @@ apply (auto simp: \d \ S\ \0 < r\ hull_inc) using bounded_subset by blast show ?thesis - apply (rule_tac x="S \ ball d r" in exI) - apply (intro conjI) - apply (simp add: openin_open_Int) - apply (simp add: \0 < r\ that) - apply (blast intro: *) - done + by (rule_tac x="S \ ball d r" in exI) (fastforce simp: openin_open_Int \0 < r\ that intro: *) qed have "\f g. homeomorphism T T f g \ f a = b \ {x. \ (f x = x \ g x = x)} \ S \ bounded {x. \ (f x = x \ g x = x)}" - apply (rule connected_equivalence_relation [OF S], safe) - apply (blast intro: 1 2 3)+ - done + by (rule connected_equivalence_relation [OF S]; blast intro: 1 2 3) then show ?thesis using that by auto qed @@ -4939,9 +4920,12 @@ {x. \ (f x = x \ g x = x)} \ S \ bounded {x. \ (f x = x \ g x = x)}" using insert by blast have aff_eq: "affine hull (S - y ` K) = affine hull S" - apply (rule affine_hull_Diff) - apply (auto simp: insert) - using \y i \ S\ insert.hyps(2) xney xyS by fastforce + proof (rule affine_hull_Diff [OF ope]) + show "finite (y ` K)" + by (simp add: insert.hyps(1)) + show "y ` K \ S" + using \y i \ S\ insert.hyps(2) xney xyS by fastforce + qed have f_in_S: "f x \ S" if "x \ S" for x using homfg fg_sub homeomorphism_apply1 \S \ T\ proof - @@ -4967,9 +4951,10 @@ show "countable (y ` K)" using countable_finite insert.hyps(1) by blast qed - show "f (x i) \ S - y ` K" - apply (auto simp: f_in_S \x i \ S\) + have "\k. \f (x i) = y k; k \ K\ \ False" by (metis feq homfg \x i \ S\ homeomorphism_def \S \ T\ \i \ K\ subsetCE xney xyS) + then show "f (x i) \ S - y ` K" + by (auto simp: f_in_S \x i \ S\) show "y i \ S - y ` K" using insert.hyps xney by (auto simp: \y i \ S\) qed blast @@ -5028,9 +5013,7 @@ have "\g. homeomorphism (cbox a b) (cbox c d) f g" proof (rule homeomorphism_compact) show "continuous_on (cbox a b) f" - apply (simp add: f_def) - apply (intro continuous_intros) - using assms by auto + unfolding f_def by (intro continuous_intros) have "f ` {a..b} = {c..d}" unfolding f_def image_affinity_atLeastAtMost using assms sum_sqs_eq by (auto simp: field_split_simps) @@ -5070,15 +5053,13 @@ have cf2: "continuous_on (cbox b c) f2" using hom_bc homeomorphism_cont1 by blast show "continuous_on (cbox a c) f" - apply (simp add: f_def) + unfolding f_def apply (rule continuous_on_cases_le [OF continuous_on_subset [OF cf1] continuous_on_subset [OF cf2]]) - using le eq apply (force)+ - done + using le eq by (force)+ have "f ` cbox a b = f1 ` cbox a b" "f ` cbox b c = f2 ` cbox b c" unfolding f_def using eq by force+ then show "f ` cbox a c = cbox u w" - apply (simp only: ac uw image_Un) - by (metis hom_ab hom_bc homeomorphism_def) + unfolding ac uw image_Un by (metis hom_ab hom_bc homeomorphism_def) have neq12: "f1 x \ f2 y" if x: "a \ x" "x \ b" and y: "b < y" "y \ c" for x y proof - have "f1 x \ cbox u v" @@ -5097,13 +5078,11 @@ ultimately show "inj_on f (cbox a c)" apply (simp (no_asm) add: inj_on_def) apply (simp add: f_def inj_on_eq_iff) - using neq12 apply force - done + using neq12 by force qed auto then obtain g where "homeomorphism (cbox a c) (cbox u w) f g" .. then show ?thesis - apply (rule that) - using eq le by (auto simp: f_def) + using eq f_def le that by force qed lemma homeomorphism_grouping_point_3: @@ -5132,10 +5111,11 @@ and f_eq: "\x. x \ cbox a d \ f x = f4 x" "\x. x \ cbox d b \ f x = f3 x" using homeomorphism_grouping_point_2 [OF 4 3] less by (auto simp: f4_eq f3_eq f2_eq f1_eq) show ?thesis - apply (rule that [OF fg]) - using f4_eq f_eq homeomorphism_image1 [OF 2] - apply simp - by (metis atLeastAtMost_iff box_real(1) box_real(2) cbox_sub(1) greaterThanLessThan_iff imageI less_eq_real_def subset_eq) + proof (rule that [OF fg]) + show "f x \ cbox u v" if "x \ cbox c d" for x + using that f4_eq f_eq homeomorphism_image1 [OF 2] + by (metis atLeastAtMost_iff box_real(2) image_eqI less(1) less_eq_real_def order_trans) + qed qed @@ -5247,10 +5227,12 @@ show "{x. \ (f' x = x \ g' x = x)} \ S" using \cbox w z \ S\ by (auto simp: f'_def g'_def) show "bounded {x. \ (f' x = x \ g' x = x)}" - apply (rule bounded_subset [of "cbox w z"]) - using bounded_cbox apply blast - apply (auto simp: f'_def g'_def) - done + proof (rule bounded_subset [of "cbox w z"]) + show "bounded (cbox w z)" + using bounded_cbox by blast + show "{x. \ (f' x = x \ g' x = x)} \ cbox w z" + by (auto simp: f'_def g'_def) + qed qed qed