# HG changeset patch # User paulson # Date 1586724838 -3600 # Node ID da0e18db1517495d3d637cf4c84b5faed015e02a # Parent ad84f8a712b41f280a9b0f3fbd0de2389a8d4519 more cleaning up Homotopy diff -r ad84f8a712b4 -r da0e18db1517 src/HOL/Analysis/Homotopy.thy --- a/src/HOL/Analysis/Homotopy.thy Sun Apr 12 10:51:51 2020 +0100 +++ b/src/HOL/Analysis/Homotopy.thy Sun Apr 12 21:53:58 2020 +0100 @@ -578,7 +578,7 @@ text\ A slightly ad-hoc but useful lemma in constructing homotopies.\ -lemma homotopic_join_lemma: +lemma continuous_on_homotopic_join_lemma: fixes q :: "[real,real] \ 'a::topological_space" assumes p: "continuous_on ({0..1} \ {0..1}) (\y. p (fst y) (snd y))" (is "continuous_on ?A ?p") and q: "continuous_on ({0..1} \ {0..1}) (\y. q (fst y) (snd y))" (is "continuous_on ?A ?q") @@ -621,7 +621,7 @@ apply (clarsimp simp add: homotopic_paths_def homotopic_with_def) apply (rename_tac k1 k2) apply (rule_tac x="(\y. ((k1 \ Pair (fst y)) +++ (k2 \ Pair (fst y))) (snd y))" in exI) - apply (intro conjI continuous_intros homotopic_join_lemma; force simp: joinpaths_def pathstart_def pathfinish_def path_image_def) + apply (intro conjI continuous_intros continuous_on_homotopic_join_lemma; force simp: joinpaths_def pathstart_def pathfinish_def path_image_def) done proposition homotopic_paths_continuous_image: @@ -806,10 +806,10 @@ have "c * 3 \ c * (d * 4)" using that less_eq_real_def by auto with \c \ 1\ show ?thesis by fastforce qed - have *: "\p x. (path p \ path(reversepath p)) \ - (path_image p \ s \ path_image(reversepath p) \ s) \ - (pathfinish p = pathstart(linepath a a +++ reversepath p) \ - pathstart(reversepath p) = a) \ pathstart p = x + have *: "\p x. \path p \ path(reversepath p); + path_image p \ s \ path_image(reversepath p) \ s; + pathfinish p = pathstart(linepath a a +++ reversepath p) \ + pathstart(reversepath p) = a \ pathstart p = x\ \ homotopic_paths s (p +++ linepath a a +++ reversepath p) (linepath x x)" by (metis homotopic_paths_lid homotopic_paths_join homotopic_paths_trans homotopic_paths_sym homotopic_paths_rinv) @@ -825,20 +825,23 @@ ((\u. h (u, 0)) +++ linepath a a +++ reversepath (\u. h (u, 0)))" unfolding homotopic_paths_def homotopic_with_def proof (intro exI strip conjI) - let ?h = "\y. (subpath 0 (fst y) (\u. h (u, 0)) +++ (\u. h (Pair (fst y) u)) +++ subpath (fst y) 0 (\u. h (u, 0))) (snd y)" - show "continuous_map (prod_topology (top_of_set {0..1}) (top_of_set {0..1})) + let ?h = "\y. (subpath 0 (fst y) (\u. h (u, 0)) +++ (\u. h (Pair (fst y) u)) + +++ subpath (fst y) 0 (\u. h (u, 0))) (snd y)" + have "continuous_on ?A ?h" + by (intro continuous_on_homotopic_join_lemma; simp add: path_defs joinpaths_def subpath_def conth c1 c2) + moreover have "?h ` ?A \ s" + unfolding joinpaths_def subpath_def + by (force simp: algebra_simps mult_le_one mult_left_le intro: hs [THEN subsetD] adhoc_le) + ultimately show "continuous_map (prod_topology (top_of_set {0..1}) (top_of_set {0..1})) (top_of_set s) ?h" - apply (simp add: subpath_reversepath) - apply (intro conjI homotopic_join_lemma; simp add: path_defs joinpaths_def subpath_def conth c1 c2) - apply (force simp: algebra_simps mult_le_one mult_left_le intro: hs [THEN subsetD] adhoc_le) - done + by (simp add: subpath_reversepath) qed (use ploop in \simp_all add: reversepath_def path_defs joinpaths_def o_def subpath_def conth c1 c2\) moreover have "homotopic_paths s ((\u. h (u, 0)) +++ linepath a a +++ reversepath (\u. h (u, 0))) (linepath (pathstart p) (pathstart p))" - apply (rule *) - apply (simp add: pih0 pathstart_def pathfinish_def conth0) - apply (simp add: reversepath_def joinpaths_def) - done + proof (rule *; simp add: pih0 pathstart_def pathfinish_def conth0) + show "a = (linepath a a +++ reversepath (\u. h (u, 0))) 0 \ reversepath (\u. h (u, 0)) 0 = a" + by (simp_all add: reversepath_def joinpaths_def) + qed ultimately show ?thesis by (blast intro: homotopic_paths_trans) qed @@ -846,7 +849,7 @@ proposition homotopic_loops_conjugate: fixes s :: "'a::real_normed_vector set" assumes "path p" "path q" and pip: "path_image p \ s" and piq: "path_image q \ s" - and papp: "pathfinish p = pathstart q" and qloop: "pathfinish q = pathstart q" + and pq: "pathfinish p = pathstart q" and qloop: "pathfinish q = pathstart q" shows "homotopic_loops s (p +++ q +++ reversepath p) q" proof - have contp: "continuous_on {0..1} p" using \path p\ [unfolded path_def] by blast @@ -876,15 +879,20 @@ using path_image_def piq by fastforce have "homotopic_loops s (p +++ q +++ reversepath p) (linepath (pathstart q) (pathstart q) +++ q +++ linepath (pathstart q) (pathstart q))" - apply (simp add: homotopic_loops_def homotopic_with_def) - apply (rule_tac x="(\y. (subpath (fst y) 1 p +++ q +++ subpath 1 (fst y) p) (snd y))" in exI) - apply (simp add: subpath_refl subpath_reversepath) - apply (intro conjI homotopic_join_lemma) - using papp qloop - apply (simp_all add: path_defs joinpaths_def o_def subpath_def c1 c2) - apply (force simp: contq intro: continuous_on_compose [of _ _ q, unfolded o_def] continuous_on_id continuous_on_snd) - apply (auto simp: ps1 ps2 qs) - done + unfolding homotopic_loops_def homotopic_with_def + proof (intro exI strip conjI) + let ?h = "(\y. (subpath (fst y) 1 p +++ q +++ subpath 1 (fst y) p) (snd y))" + have "continuous_on ?A (\y. q (snd y))" + by (force simp: contq intro: continuous_on_compose [of _ _ q, unfolded o_def] continuous_on_id continuous_on_snd) + then have "continuous_on ?A ?h" + apply (intro continuous_on_homotopic_join_lemma) + using pq qloop + by (auto simp: path_defs joinpaths_def subpath_def c1 c2) + then show "continuous_map (prod_topology (top_of_set {0..1}) (top_of_set {0..1})) (top_of_set s) ?h" + by (auto simp: joinpaths_def subpath_def ps1 ps2 qs) + show "?h (1,x) = (linepath (pathstart q) (pathstart q) +++ q +++ linepath (pathstart q) (pathstart q)) x" for x + using pq by (simp add: pathfinish_def subpath_refl) + qed (auto simp: subpath_reversepath) moreover have "homotopic_loops s (linepath (pathstart q) (pathstart q) +++ q +++ linepath (pathstart q) (pathstart q)) q" proof - have "homotopic_paths s (linepath (pathfinish q) (pathfinish q) +++ q) q" @@ -944,10 +952,10 @@ lemma homotopic_with_linear: fixes f g :: "_ \ 'b::real_normed_vector" - 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_canon (\z. True) s t f g" + 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_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) @@ -959,8 +967,8 @@ lemma homotopic_paths_linear: fixes g h :: "real \ 'a::real_normed_vector" assumes "path g" "path h" "pathstart h = pathstart g" "pathfinish h = pathfinish g" - "\t. t \ {0..1} \ closed_segment (g t) (h t) \ s" - shows "homotopic_paths s g h" + "\t. t \ {0..1} \ closed_segment (g t) (h t) \ S" + shows "homotopic_paths S g h" using assms unfolding path_def apply (simp add: closed_segment_def pathstart_def pathfinish_def homotopic_paths_def homotopic_with_def) @@ -971,8 +979,8 @@ lemma homotopic_loops_linear: fixes g h :: "real \ 'a::real_normed_vector" assumes "path g" "path h" "pathfinish g = pathstart g" "pathfinish h = pathstart h" - "\t x. t \ {0..1} \ closed_segment (g t) (h t) \ s" - shows "homotopic_loops s g h" + "\t x. t \ {0..1} \ closed_segment (g t) (h t) \ S" + shows "homotopic_loops S g h" using assms unfolding path_def apply (simp add: pathstart_def pathfinish_def homotopic_loops_def homotopic_with_def) @@ -982,29 +990,33 @@ done lemma homotopic_paths_nearby_explicit: - assumes "path g" "path h" "pathstart h = pathstart g" "pathfinish h = pathfinish g" - and no: "\t x. \t \ {0..1}; x \ s\ \ norm(h t - g t) < norm(g t - x)" - shows "homotopic_paths s g h" - apply (rule homotopic_paths_linear [OF assms(1-4)]) + assumes \
: "path g" "path h" "pathstart h = pathstart g" "pathfinish h = pathfinish g" + and no: "\t x. \t \ {0..1}; x \ S\ \ norm(h t - g t) < norm(g t - x)" + shows "homotopic_paths S g h" +proof (rule homotopic_paths_linear [OF \
]) + show "\t. t \ {0..1} \ closed_segment (g t) (h t) \ S" by (metis no segment_bound(1) subsetI norm_minus_commute not_le) +qed lemma homotopic_loops_nearby_explicit: - assumes "path g" "path h" "pathfinish g = pathstart g" "pathfinish h = pathstart h" - and no: "\t x. \t \ {0..1}; x \ s\ \ norm(h t - g t) < norm(g t - x)" - shows "homotopic_loops s g h" - apply (rule homotopic_loops_linear [OF assms(1-4)]) + assumes \
: "path g" "path h" "pathfinish g = pathstart g" "pathfinish h = pathstart h" + and no: "\t x. \t \ {0..1}; x \ S\ \ norm(h t - g t) < norm(g t - x)" + shows "homotopic_loops S g h" +proof (rule homotopic_loops_linear [OF \
]) + show "\t. t \ {0..1} \ closed_segment (g t) (h t) \ S" by (metis no segment_bound(1) subsetI norm_minus_commute not_le) +qed lemma homotopic_nearby_paths: fixes g h :: "real \ 'a::euclidean_space" - assumes "path g" "open s" "path_image g \ s" + assumes "path g" "open S" "path_image g \ S" shows "\e. 0 < e \ (\h. path h \ pathstart h = pathstart g \ pathfinish h = pathfinish g \ - (\t \ {0..1}. norm(h t - g t) < e) \ homotopic_paths s g h)" + (\t \ {0..1}. norm(h t - g t) < e) \ homotopic_paths S g h)" proof - - obtain e where "e > 0" and e: "\x y. x \ path_image g \ y \ - s \ e \ dist x y" - using separate_compact_closed [of "path_image g" "-s"] assms by force + obtain e where "e > 0" and e: "\x y. x \ path_image g \ y \ - S \ e \ dist x y" + using separate_compact_closed [of "path_image g" "-S"] assms by force show ?thesis apply (intro exI conjI) using e [unfolded dist_norm] @@ -1014,13 +1026,13 @@ lemma homotopic_nearby_loops: fixes g h :: "real \ 'a::euclidean_space" - assumes "path g" "open s" "path_image g \ s" "pathfinish g = pathstart g" + assumes "path g" "open S" "path_image g \ S" "pathfinish g = pathstart g" shows "\e. 0 < e \ (\h. path h \ pathfinish h = pathstart h \ - (\t \ {0..1}. norm(h t - g t) < e) \ homotopic_loops s g h)" + (\t \ {0..1}. norm(h t - g t) < e) \ homotopic_loops S g h)" proof - - obtain e where "e > 0" and e: "\x y. x \ path_image g \ y \ - s \ e \ dist x y" - using separate_compact_closed [of "path_image g" "-s"] assms by force + obtain e where "e > 0" and e: "\x y. x \ path_image g \ y \ - S \ e \ dist x y" + using separate_compact_closed [of "path_image g" "-S"] assms by force show ?thesis apply (intro exI conjI) using e [unfolded dist_norm] @@ -1041,28 +1053,34 @@ have 2: "t * 2 > 1 \ u + (2*t - 1) * v \ v + (2*t - 1) * w" for t by (metis add_mono_thms_linordered_semiring(1) diff_gt_0_iff_gt less_eq_real_def mult.commute mult_right_mono \u \ v\ \v \ w\) have t2: "\t::real. t*2 = 1 \ t = 1/2" by auto - show ?thesis - apply (rule homotopic_paths_subset [OF _ pag]) - using assms - apply (cases "w = u") - using homotopic_paths_rinv [of "subpath u v g" "path_image g"] - apply (force simp: closed_segment_eq_real_ivl image_mono path_image_def subpath_refl) - apply (rule homotopic_paths_sym) - apply (rule homotopic_paths_reparametrize - [where f = "\t. if t \ 1/2 - then inverse((w - u)) *\<^sub>R (2 * (v - u)) *\<^sub>R t - else inverse((w - u)) *\<^sub>R ((v - u) + (w - v) *\<^sub>R (2 *\<^sub>R t - 1))"]) - using \path g\ path_subpath u w apply blast - using \path g\ path_image_subpath_subset u w(1) apply blast - apply simp_all - apply (subst split_01) - apply (rule continuous_on_cases continuous_intros | force simp: pathfinish_def joinpaths_def)+ - apply (simp_all add: field_simps not_le) - apply (force dest!: t2) - apply (force simp: algebra_simps mult_left_mono affine_ineq dest!: 1 2) - apply (simp add: joinpaths_def subpath_def) - apply (force simp: algebra_simps) - done + have "homotopic_paths (path_image g) (subpath u v g +++ subpath v w g) (subpath u w g)" + proof (cases "w = u") + case True + then show ?thesis + by (metis \path g\ homotopic_paths_rinv path_image_subpath_subset path_subpath pathstart_subpath reversepath_subpath subpath_refl u v) + next + case False + let ?f = "\t. if t \ 1/2 then inverse((w - u)) *\<^sub>R (2 * (v - u)) *\<^sub>R t + else inverse((w - u)) *\<^sub>R ((v - u) + (w - v) *\<^sub>R (2 *\<^sub>R t - 1))" + show ?thesis + proof (rule homotopic_paths_sym [OF homotopic_paths_reparametrize [where f = ?f]]) + show "path (subpath u w g)" + using assms(1) path_subpath u w(1) by blast + show "path_image (subpath u w g) \ path_image g" + by (meson path_image_subpath_subset u w(1)) + show "continuous_on {0..1} ?f" + unfolding split_01 + by (rule continuous_on_cases continuous_intros | force simp: pathfinish_def joinpaths_def dest!: t2)+ + show "?f ` {0..1} \ {0..1}" + using False assms + by (force simp: field_simps not_le mult_left_mono affine_ineq dest!: 1 2) + show "(subpath u v g +++ subpath v w g) t = subpath u w g (?f t)" if "t \ {0..1}" for t + using assms + unfolding joinpaths_def subpath_def by (auto simp add: divide_simps add.commute mult.commute mult.left_commute) + qed (use False in auto) + qed + then show ?thesis + by (rule homotopic_paths_subset [OF _ pag]) qed lemma homotopic_join_subpaths2: @@ -1077,25 +1095,30 @@ shows "homotopic_paths s (subpath v w g +++ subpath w u g) (subpath v u g)" proof - have "homotopic_paths s (subpath u w g +++ subpath w v g) ((subpath u v g +++ subpath v w g) +++ subpath w v g)" - apply (rule homotopic_paths_join) - using hom homotopic_paths_sym_eq apply blast - apply (metis \path g\ homotopic_paths_eq pag path_image_subpath_subset path_subpath subset_trans v w, simp) - done + proof (rule homotopic_paths_join) + show "homotopic_paths s (subpath u w g) (subpath u v g +++ subpath v w g)" + using hom homotopic_paths_sym_eq by blast + show "homotopic_paths s (subpath w v g) (subpath w v g)" + by (metis \path g\ homotopic_paths_eq pag path_image_subpath_subset path_subpath subset_trans v w) + qed auto also have "homotopic_paths s ((subpath u v g +++ subpath v w g) +++ subpath w v g) (subpath u v g +++ subpath v w g +++ subpath w v g)" - apply (rule homotopic_paths_sym [OF homotopic_paths_assoc]) - using assms by (simp_all add: path_image_subpath_subset [THEN order_trans]) + by (rule homotopic_paths_sym [OF homotopic_paths_assoc]) + (use assms in \simp_all add: path_image_subpath_subset [THEN order_trans]\) also have "homotopic_paths s (subpath u v g +++ subpath v w g +++ subpath w v g) (subpath u v g +++ linepath (pathfinish (subpath u v g)) (pathfinish (subpath u v g)))" - apply (rule homotopic_paths_join) - apply (metis \path g\ homotopic_paths_eq order.trans pag path_image_subpath_subset path_subpath u v) - apply (metis (no_types, lifting) \path g\ homotopic_paths_linv order_trans pag path_image_subpath_subset path_subpath pathfinish_subpath reversepath_subpath v w) - apply simp - done + proof (rule homotopic_paths_join; simp) + show "path (subpath u v g) \ path_image (subpath u v g) \ s" + by (metis \path g\ order.trans pag path_image_subpath_subset path_subpath u v) + show "homotopic_paths s (subpath v w g +++ subpath w v g) (linepath (g v) (g v))" + by (metis (no_types, lifting) \path g\ homotopic_paths_linv order_trans pag path_image_subpath_subset path_subpath pathfinish_subpath reversepath_subpath v w) + qed also have "homotopic_paths s (subpath u v g +++ linepath (pathfinish (subpath u v g)) (pathfinish (subpath u v g))) (subpath u v g)" - apply (rule homotopic_paths_rid) - using \path g\ path_subpath u v apply blast - apply (meson \path g\ order.trans pag path_image_subpath_subset u v) - done + proof (rule homotopic_paths_rid) + show "path (subpath u v g)" + using \path g\ path_subpath u v by blast + show "path_image (subpath u v g) \ s" + by (meson \path g\ order.trans pag path_image_subpath_subset u v) + qed finally have "homotopic_paths s (subpath u w g +++ subpath w v g) (subpath u v g)" . then show ?thesis using homotopic_join_subpaths2 by blast @@ -1104,8 +1127,8 @@ proposition homotopic_join_subpaths: "\path g; path_image g \ s; u \ {0..1}; v \ {0..1}; w \ {0..1}\ \ homotopic_paths s (subpath u v g +++ subpath v w g) (subpath u w g)" - apply (rule le_cases3 [of u v w]) -using homotopic_join_subpaths1 homotopic_join_subpaths2 homotopic_join_subpaths3 by metis+ + using le_cases3 [of u v w] homotopic_join_subpaths1 homotopic_join_subpaths2 homotopic_join_subpaths3 + by metis text\Relating homotopy of trivial loops to path-connectedness.\ @@ -1169,11 +1192,10 @@ (\p a. path p \ path_image p \ S \ pathfinish p = pathstart p \ a \ S \ homotopic_loops S p (linepath a a))" -apply (simp add: simply_connected_def) + unfolding simply_connected_def apply (rule iffI, force, clarify) -apply (rule_tac q = "linepath (pathstart p) (pathstart p)" in homotopic_loops_trans) -apply (fastforce simp add:) -using homotopic_loops_sym apply blast + apply (rule_tac q = "linepath (pathstart p) (pathstart p)" in homotopic_loops_trans) +using homotopic_loops_sym apply blast+ done lemma simply_connected_eq_contractible_loop_some: @@ -1182,13 +1204,23 @@ path_connected S \ (\p. path p \ path_image p \ S \ pathfinish p = pathstart p \ (\a. a \ S \ homotopic_loops S p (linepath a a)))" -apply (rule iffI) - apply (fastforce simp: simply_connected_imp_path_connected simply_connected_eq_contractible_loop_any) -apply (clarsimp simp add: simply_connected_eq_contractible_loop_any) -apply (drule_tac x=p in spec) -using homotopic_loops_trans path_connected_eq_homotopic_points - apply blast -done + (is "?lhs = ?rhs") +proof + assume ?lhs + then show ?rhs + using simply_connected_eq_contractible_loop_any by (blast intro: simply_connected_imp_path_connected) +next + assume r: ?rhs + note pa = r [THEN conjunct2, rule_format] + show ?lhs + proof (clarsimp simp add: simply_connected_eq_contractible_loop_any) + fix p a + assume "path p" and "path_image p \ S" "pathfinish p = pathstart p" + and "a \ S" + with pa [of p] show "homotopic_loops S p (linepath a a)" + using homotopic_loops_trans path_connected_eq_homotopic_points r by blast + qed +qed lemma simply_connected_eq_contractible_loop_all: fixes S :: "_::real_normed_vector set" @@ -1211,9 +1243,9 @@ next assume ?rhs then show "simply_connected S" - apply (simp add: simply_connected_eq_contractible_loop_any False) - by (meson homotopic_loops_refl homotopic_loops_sym homotopic_loops_trans - path_component_imp_homotopic_points path_component_refl) + unfolding simply_connected_eq_contractible_loop_any + by (meson False homotopic_loops_refl homotopic_loops_sym homotopic_loops_trans + path_component_imp_homotopic_points path_component_refl) qed qed @@ -1223,11 +1255,17 @@ path_connected S \ (\p. path p \ path_image p \ S \ pathfinish p = pathstart p \ homotopic_paths S p (linepath (pathstart p) (pathstart p)))" -apply (rule iffI) - apply (simp add: simply_connected_imp_path_connected) - apply (metis simply_connected_eq_contractible_loop_some homotopic_loops_imp_homotopic_paths_null) -by (meson homotopic_paths_imp_homotopic_loops pathfinish_linepath pathstart_in_path_image - simply_connected_eq_contractible_loop_some subset_iff) + (is "?lhs = ?rhs") +proof + assume ?lhs + then show ?rhs + unfolding simply_connected_imp_path_connected + by (metis simply_connected_eq_contractible_loop_some homotopic_loops_imp_homotopic_paths_null) +next + assume ?rhs + then show ?lhs + using homotopic_paths_imp_homotopic_loops simply_connected_eq_contractible_loop_some by fastforce +qed lemma simply_connected_eq_homotopic_paths: fixes S :: "_::real_normed_vector set" @@ -1285,38 +1323,25 @@ for p a b proof - have "path (fst \ p)" - apply (rule Path_Connected.path_continuous_image [OF \path p\]) - apply (rule continuous_intros)+ - done + by (simp add: continuous_on_fst Path_Connected.path_continuous_image [OF \path p\]) moreover have "path_image (fst \ p) \ S" using that apply (simp add: path_image_def) by force ultimately have p1: "homotopic_loops S (fst \ p) (linepath a a)" using S that - apply (simp add: simply_connected_eq_contractible_loop_any) - apply (drule_tac x="fst \ p" in spec) - apply (drule_tac x=a in spec) - apply (auto simp: pathstart_def pathfinish_def) - done + by (simp add: simply_connected_eq_contractible_loop_any pathfinish_def pathstart_def) have "path (snd \ p)" - apply (rule Path_Connected.path_continuous_image [OF \path p\]) - apply (rule continuous_intros)+ - done + by (simp add: continuous_on_snd Path_Connected.path_continuous_image [OF \path p\]) moreover have "path_image (snd \ p) \ T" using that apply (simp add: path_image_def) by force ultimately have p2: "homotopic_loops T (snd \ p) (linepath b b)" using T that - apply (simp add: simply_connected_eq_contractible_loop_any) - apply (drule_tac x="snd \ p" in spec) - apply (drule_tac x=b in spec) - apply (auto simp: pathstart_def pathfinish_def) - done + by (simp add: simply_connected_eq_contractible_loop_any pathfinish_def pathstart_def) show ?thesis - using p1 p2 - apply (simp add: homotopic_loops, clarify) + using p1 p2 unfolding homotopic_loops + apply clarify apply (rename_tac h k) apply (rule_tac x="\z. Pair (h z) (k z)" in exI) - apply (intro conjI continuous_intros | assumption)+ - apply (auto simp: pathstart_def pathfinish_def) + apply (force intro: continuous_intros simp: pathstart_def pathfinish_def)+ done qed with assms show ?thesis @@ -1340,14 +1365,15 @@ 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_in_topspace topspace_euclidean_subtopology) - show ?thesis - apply (simp add: simply_connected_eq_contractible_loop_all False) - apply (rule bexI [OF _ \a \ S\]) + have "\p. path p \ + path_image p \ S \ pathfinish p = pathstart p \ + homotopic_loops S p (linepath a a)" using a apply (simp add: homotopic_loops_def homotopic_with_def path_def path_image_def pathfinish_def pathstart_def, clarify) apply (rule_tac x="(h \ (\y. (fst y, (p \ snd) y)))" in exI) - apply (intro conjI continuous_on_compose continuous_intros) - apply (erule continuous_on_subset | force)+ + apply (intro conjI continuous_on_compose continuous_intros; force elim: continuous_on_subset) done + with \a \ S\ show ?thesis + by (auto simp add: simply_connected_eq_contractible_loop_all False) qed corollary contractible_imp_connected: @@ -1381,19 +1407,14 @@ assumes f: "continuous_on S f" "f ` S \ T" and T: "contractible T" 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) -done + by (rule nullhomotopic_through_contractible [OF f, of id T]) (use assms in auto) lemma nullhomotopic_from_contractible: assumes f: "continuous_on S f" "f ` S \ T" and S: "contractible S" 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) -done + apply (rule nullhomotopic_through_contractible [OF continuous_on_id _ f S, of S]) + using assms by (auto simp: comp_def) lemma homotopic_through_contractible: fixes S :: "_::real_normed_vector set" @@ -1405,14 +1426,10 @@ shows "homotopic_with_canon (\h. True) S U (g1 \ f1) (g2 \ f2)" proof - 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 + by (rule nullhomotopic_through_contractible [of S f1 T g1 U]) (use assms in auto) 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 - have *: "S = {} \ (\t. path_connected t \ t \ U \ c2 \ t \ c1 \ t)" + by (rule nullhomotopic_through_contractible [of S f2 T g2 U]) (use assms in auto) + have "S = {} \ (\t. path_connected t \ t \ U \ c2 \ t \ c1 \ t)" proof (cases "S = {}") case True then show ?thesis by force next @@ -1421,12 +1438,10 @@ using homotopic_with_imp_continuous_maps by fastforce+ with \path_connected U\ show ?thesis by blast qed - show ?thesis - apply (rule homotopic_with_trans [OF c1]) - apply (rule homotopic_with_symD) - apply (rule homotopic_with_trans [OF c2]) - apply (simp add: path_component homotopic_constant_maps *) - done + then have "homotopic_with_canon (\h. True) S U (\x. c2) (\x. c1)" + by (simp add: path_component homotopic_constant_maps) + then show ?thesis + using c1 c2 homotopic_with_symD homotopic_with_trans by blast qed lemma homotopic_into_contractible: @@ -1467,16 +1482,14 @@ by (simp add: assms rel_interior_eq_empty) then obtain a where a: "a \ rel_interior S" by blast with ST have "a \ T" by blast - have *: "\x. x \ T \ open_segment a x \ rel_interior S" - apply (rule rel_interior_closure_convex_segment [OF \convex S\ a]) - using assms by blast - show ?thesis - unfolding starlike_def - apply (rule bexI [OF _ \a \ T\]) - apply (simp add: closed_segment_eq_open) + have "\x. x \ T \ open_segment a x \ rel_interior S" + by (rule rel_interior_closure_convex_segment [OF \convex S\ a]) (use assms in auto) + then have "\x\T. a \ T \ open_segment a x \ T" apply (intro conjI ballI a \a \ T\ rel_interior_closure_convex_segment [OF \convex S\ a]) - apply (simp add: order_trans [OF * ST]) - done + using ST by blast + then show ?thesis + unfolding starlike_def using bexI [OF _ \a \ T\] + by (simp add: closed_segment_eq_open) qed lemma starlike_imp_contractible_gen: @@ -1492,14 +1505,14 @@ apply (erule a [unfolded closed_segment_def, THEN subsetD], simp) apply (metis add_diff_cancel_right' diff_ge_0_iff_ge le_add_diff_inverse pth_c(1)) done - then show ?thesis - apply (rule_tac a=a in that) + then have "homotopic_with_canon P S S (\x. x) (\x. a)" using \a \ S\ apply (simp add: homotopic_with_def) apply (rule_tac x="\y. (1 - (fst y)) *\<^sub>R snd y + (fst y) *\<^sub>R a" in exI) - apply (intro conjI ballI continuous_on_compose continuous_intros) - apply (simp_all add: P) + apply (intro conjI ballI continuous_on_compose continuous_intros; simp add: P) done + then show ?thesis + using that by blast qed lemma starlike_imp_contractible: @@ -1549,9 +1562,7 @@ next case False show ?thesis - apply (rule starlike_imp_contractible) - apply (rule starlike_convex_tweak_boundary_points [OF \convex S\ False TS]) - done + by (meson False assms starlike_convex_tweak_boundary_points starlike_imp_contractible) qed lemma convex_imp_contractible: @@ -1627,14 +1638,10 @@ lemma locally_open_subset: assumes "locally P S" "openin (top_of_set S) t" shows "locally P t" -using assms -apply (simp add: locally_def) -apply (erule all_forward)+ -apply (rule impI) -apply (erule impCE) - using openin_trans apply blast -apply (erule ex_forward) -by (metis (no_types, hide_lams) Int_absorb1 Int_lower1 Int_subset_iff openin_open openin_subtopology_Int_subset) + using assms + unfolding locally_def + apply (elim all_forward) + by (meson dual_order.trans openin_imp_subset openin_subset_trans openin_trans) lemma locally_diff_closed: "\locally P S; closedin (top_of_set S) t\ \ locally P (S - t)" @@ -1651,27 +1658,32 @@ lemma locally_iff: "locally P S \ - (\T x. open T \ x \ S \ T \ (\U. open U \ (\v. P v \ x \ S \ U \ S \ U \ v \ v \ S \ T)))" + (\T x. open T \ x \ S \ T \ (\U. open U \ (\V. P V \ x \ S \ U \ S \ U \ V \ V \ S \ T)))" apply (simp add: le_inf_iff locally_def openin_open, safe) apply (metis IntE IntI le_inf_iff) apply (metis IntI Int_subset_iff) done lemma locally_Int: - assumes S: "locally P S" and t: "locally P t" - and P: "\S t. P S \ P t \ P(S \ t)" - shows "locally P (S \ t)" -using S t unfolding locally_iff -apply clarify -apply (drule_tac x=T in spec)+ -apply (drule_tac x=x in spec)+ -apply clarsimp -apply (rename_tac U1 U2 V1 V2) -apply (rule_tac x="U1 \ U2" in exI) -apply (simp add: open_Int) -apply (rule_tac x="V1 \ V2" in exI) -apply (auto intro: P) - done + assumes S: "locally P S" and T: "locally P T" + and P: "\S T. P S \ P T \ P(S \ T)" + shows "locally P (S \ T)" + unfolding locally_iff +proof clarify + fix A x + assume "open A" "x \ A" "x \ S" "x \ T" + then obtain U1 V1 U2 V2 + where "open U1" "P V1" "x \ S \ U1" "S \ U1 \ V1 \ V1 \ S \ A" + "open U2" "P V2" "x \ T \ U2" "T \ U2 \ V2 \ V2 \ T \ A" + using S T unfolding locally_iff by (meson IntI) + then have "S \ T \ (U1 \ U2) \ V1 \ V2" "V1 \ V2 \ S \ T \ A" "x \ S \ T \ (U1 \ U2)" + by blast+ + moreover have "P (V1 \ V2)" + by (simp add: P \P V1\ \P V2\) + ultimately show "\U. open U \ (\V. P V \ x \ S \ T \ U \ S \ T \ U \ V \ V \ S \ T \ A)" + using \open U1\ \open U2\ by blast +qed + lemma locally_Times: fixes S :: "('a::metric_space) set" and T :: "('b::metric_space) set" @@ -1697,73 +1709,73 @@ proposition homeomorphism_locally_imp: - fixes S :: "'a::metric_space set" and t :: "'b::t2_space set" - assumes S: "locally P S" and hom: "homeomorphism S t f g" + fixes S :: "'a::metric_space set" and T :: "'b::t2_space set" + assumes S: "locally P S" and hom: "homeomorphism S T f g" and Q: "\S S'. \P S; homeomorphism S S' f g\ \ Q S'" - shows "locally Q t" + shows "locally Q T" proof (clarsimp simp: locally_def) fix W y - assume "y \ W" and "openin (top_of_set t) W" - then obtain T where T: "open T" "W = t \ T" + assume "y \ W" and "openin (top_of_set T) W" + then obtain A where T: "open A" "W = T \ A" by (force simp: openin_open) - then have "W \ t" by auto - have f: "\x. x \ S \ g(f x) = x" "f ` S = t" "continuous_on S f" - and g: "\y. y \ t \ f(g y) = y" "g ` t = S" "continuous_on t g" + then have "W \ T" by auto + have f: "\x. x \ S \ g(f x) = x" "f ` S = T" "continuous_on S f" + and g: "\y. y \ T \ f(g y) = y" "g ` T = S" "continuous_on T g" using hom by (auto simp: homeomorphism_def) have gw: "g ` W = S \ f -` W" - using \W \ t\ - apply auto - using \g ` t = S\ \W \ t\ apply blast - using g \W \ t\ apply auto[1] - by (simp add: f rev_image_eqI) + using \W \ T\ g by force have \: "openin (top_of_set S) (g ` W)" proof - have "continuous_on S f" using f(3) by blast then show "openin (top_of_set S) (g ` W)" - by (simp add: gw Collect_conj_eq \openin (top_of_set t) W\ continuous_on_open f(2)) + by (simp add: gw Collect_conj_eq \openin (top_of_set T) W\ continuous_on_open f(2)) qed - then obtain u v - where osu: "openin (top_of_set S) u" and uv: "P v" "g y \ u" "u \ v" "v \ g ` W" + then obtain U V + where osu: "openin (top_of_set S) U" and uv: "P V" "g y \ U" "U \ V" "V \ g ` W" using S [unfolded locally_def, rule_format, of "g ` W" "g y"] \y \ W\ by force - have "v \ S" using uv by (simp add: gw) - have fv: "f ` v = t \ {x. g x \ v}" - using \f ` S = t\ f \v \ S\ by auto - have "f ` v \ W" + have "V \ S" using uv by (simp add: gw) + have fv: "f ` V = T \ {x. g x \ V}" + using \f ` S = T\ f \V \ S\ by auto + have "f ` V \ W" using uv using Int_lower2 gw image_subsetI mem_Collect_eq subset_iff by auto - have contvf: "continuous_on v f" - using \v \ S\ continuous_on_subset f(3) by blast - have contvg: "continuous_on (f ` v) g" - using \f ` v \ W\ \W \ t\ continuous_on_subset [OF g(3)] by blast - have homv: "homeomorphism v (f ` v) f g" - using \v \ S\ \W \ t\ f - apply (simp add: homeomorphism_def contvf contvg, auto) - by (metis f(1) rev_image_eqI rev_subsetD) - have 1: "openin (top_of_set t) (t \ g -` u)" - apply (rule continuous_on_open [THEN iffD1, rule_format]) - apply (rule \continuous_on t g\) - using \g ` t = S\ apply (simp add: osu) + have contvf: "continuous_on V f" + using \V \ S\ continuous_on_subset f(3) by blast + have contvg: "continuous_on (f ` V) g" + using \f ` V \ W\ \W \ T\ continuous_on_subset [OF g(3)] by blast + have "V \ g ` f ` V" + by (metis hom homeomorphism_def homeomorphism_of_subsets set_eq_subset \V \ S\) + then have homv: "homeomorphism V (f ` V) f g" + using \V \ S\ f by (auto simp add: homeomorphism_def contvf contvg) + have "openin (top_of_set (g ` T)) U" + using \g ` T = S\ by (simp add: osu) + then have 1: "openin (top_of_set T) (T \ g -` U)" + using \continuous_on T g\ continuous_on_open [THEN iffD1] by blast + have 2: "\V. Q V \ y \ (T \ g -` U) \ (T \ g -` U) \ V \ V \ W" + apply (rule_tac x="f ` V" in exI) + apply (intro conjI Q [OF \P V\ homv]) + using \W \ T\ \y \ W\ \f ` V \ W\ uv apply (auto simp: fv) done - have 2: "\V. Q V \ y \ (t \ g -` u) \ (t \ g -` u) \ V \ V \ W" - apply (rule_tac x="f ` v" in exI) - apply (intro conjI Q [OF \P v\ homv]) - using \W \ t\ \y \ W\ \f ` v \ W\ uv apply (auto simp: fv) - done - show "\U. openin (top_of_set t) U \ (\v. Q v \ y \ U \ U \ v \ v \ W)" + show "\U. openin (top_of_set T) U \ (\v. Q v \ y \ U \ U \ v \ v \ W)" by (meson 1 2) qed lemma homeomorphism_locally: fixes f:: "'a::metric_space \ 'b::metric_space" - assumes hom: "homeomorphism S t f g" - and eq: "\S t. homeomorphism S t f g \ (P S \ Q t)" - shows "locally P S \ locally Q t" -apply (rule iffI) -apply (erule homeomorphism_locally_imp [OF _ hom]) -apply (simp add: eq) -apply (erule homeomorphism_locally_imp) -using eq homeomorphism_sym homeomorphism_symD [OF hom] apply blast+ -done + assumes hom: "homeomorphism S T f g" + and eq: "\S T. homeomorphism S T f g \ (P S \ Q T)" + shows "locally P S \ locally Q T" + (is "?lhs = ?rhs") +proof + assume ?lhs + then show ?rhs + using eq hom homeomorphism_locally_imp by blast +next + assume ?rhs + then show ?lhs + using eq homeomorphism_sym homeomorphism_symD [OF hom] + by (blast intro: homeomorphism_locally_imp) +qed lemma homeomorphic_locally: fixes S:: "'a::metric_space set" and T:: "'b::metric_space set" @@ -1785,28 +1797,23 @@ lemma locally_translation: fixes P :: "'a :: real_normed_vector set \ bool" - shows - "(\S. P (image (\x. a + x) S) \ P S) - \ locally P (image (\x. a + x) S) \ locally P S" + shows "(\S. P ((+) a ` S) = P S) \ locally P ((+) a ` S) = locally P S" apply (rule homeomorphism_locally [OF homeomorphism_translation]) -apply (simp add: homeomorphism_def) -by metis + by (metis (no_types) homeomorphism_def) lemma locally_injective_linear_image: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" assumes f: "linear f" "inj f" and iff: "\S. P (f ` S) \ Q S" - shows "locally P (f ` S) \ locally Q S" -apply (rule linear_homeomorphism_image [OF f]) -apply (rule_tac f=g and g = f in homeomorphism_locally, assumption) -by (metis iff homeomorphism_def) + shows "locally P (f ` S) \ locally Q S" + using homeomorphism_locally [of "f`S" _ _ f] linear_homeomorphism_image [OF f] + by (metis (no_types, lifting) homeomorphism_image2 iff) lemma locally_open_map_image: fixes f :: "'a::real_normed_vector \ 'b::real_normed_vector" assumes P: "locally P S" and f: "continuous_on S f" - and oo: "\t. openin (top_of_set S) t - \ openin (top_of_set (f ` S)) (f ` t)" - and Q: "\t. \t \ S; P t\ \ Q(f ` t)" + and oo: "\T. openin (top_of_set S) T \ openin (top_of_set (f ` S)) (f ` T)" + and Q: "\T. \T \ S; P T\ \ Q(f ` T)" shows "locally Q (f ` S)" proof (clarsimp simp add: locally_def) fix W y @@ -1820,12 +1827,10 @@ where "openin (top_of_set S) U" "P V" "x \ U" "U \ V" "V \ S \ f -` W" using P [unfolded locally_def, rule_format, of "(S \ f -` W)" x] oivf \y \ W\ by auto + then have "openin (top_of_set (f ` S)) (f ` U)" + by (simp add: oo) then show "\X. openin (top_of_set (f ` S)) X \ (\Y. Q Y \ y \ X \ X \ Y \ Y \ W)" - apply (rule_tac x="f ` U" in exI) - apply (rule conjI, blast intro!: oo) - apply (rule_tac x="f ` V" in exI) - apply (force simp: \f x = y\ rev_image_eqI intro: Q) - done + using Q \P V\ \U \ V\ \V \ S \ f -` W\ \f x = y\ \x \ U\ by blast qed @@ -1840,28 +1845,25 @@ and etc: "a \ S" "b \ S" "P a" "P b" "Q a" shows "Q b" proof - - have 1: "openin (top_of_set S) - {b. \T. openin (top_of_set S) T \ - b \ T \ (\x\T. P x \ Q x)}" + let ?A = "{b. \T. openin (top_of_set S) T \ b \ T \ (\x\T. P x \ Q x)}" + let ?B = "{b. \T. openin (top_of_set S) T \ b \ T \ (\x\T. P x \ \ Q x)}" + have 1: "openin (top_of_set S) ?A" + apply (subst openin_subopen, clarify) + apply (rule_tac x=T in exI, auto) + done + have 2: "openin (top_of_set S) ?B" apply (subst openin_subopen, clarify) apply (rule_tac x=T in exI, auto) done - have 2: "openin (top_of_set S) - {b. \T. openin (top_of_set S) T \ - b \ T \ (\x\T. P x \ \ Q x)}" - apply (subst openin_subopen, clarify) - apply (rule_tac x=T in exI, auto) - done - show ?thesis - using \connected S\ - apply (simp only: connected_openin HOL.not_ex HOL.de_Morgan_conj) - apply (elim disjE allE) - apply (blast intro: 1) - apply (blast intro: 2, simp_all) - apply clarify apply (metis opI) - using opD apply (blast intro: etc elim: dest:) - using opI etc apply meson+ - done + have \
: "?A \ ?B = {}" + by (clarsimp simp: set_eq_iff) (metis (no_types, hide_lams) Int_iff opD openin_Int) + have *: "S \ ?A \ ?B" + by clarsimp (meson opI) + have "?A = {} \ ?B = {}" + using \connected S\ [unfolded connected_openin, simplified, rule_format, OF 1 \
* 2] + by blast + then show ?thesis + by clarsimp (meson opI etc) qed lemma connected_equivalence_relation_gen: @@ -1969,26 +1971,25 @@ qed lemma locally_compactE: - fixes s :: "'a :: metric_space set" - assumes "locally compact s" - obtains u v where "\x. x \ s \ x \ u x \ u x \ v x \ v x \ s \ - openin (top_of_set s) (u x) \ compact (v x)" -using assms -unfolding locally_compact by metis + fixes S :: "'a :: metric_space set" + assumes "locally compact S" + obtains u v where "\x. x \ S \ x \ u x \ u x \ v x \ v x \ S \ + openin (top_of_set S) (u x) \ compact (v x)" + using assms unfolding locally_compact by metis lemma locally_compact_alt: - fixes s :: "'a :: heine_borel set" - shows "locally compact s \ - (\x \ s. \u. x \ u \ - openin (top_of_set s) u \ compact(closure u) \ closure u \ s)" -apply (simp add: locally_compact) -apply (intro ball_cong ex_cong refl iffI) -apply (metis bounded_subset closure_eq closure_mono compact_eq_bounded_closed dual_order.trans) -by (meson closure_subset compact_closure) + fixes S :: "'a :: heine_borel set" + shows "locally compact S \ + (\x \ S. \u. x \ u \ + openin (top_of_set S) u \ compact(closure u) \ closure u \ S)" + apply (simp add: locally_compact) + apply (intro ball_cong ex_cong refl iffI) + apply (meson bounded_subset closure_minimal compact_eq_bounded_closed dual_order.trans) + by (meson closure_subset compact_closure) lemma locally_compact_Int_cball: - fixes s :: "'a :: heine_borel set" - shows "locally compact s \ (\x \ s. \e. 0 < e \ closed(cball x e \ s))" + fixes S :: "'a :: heine_borel set" + shows "locally compact S \ (\x \ S. \e. 0 < e \ closed(cball x e \ S))" (is "?lhs = ?rhs") proof assume ?lhs @@ -2001,8 +2002,8 @@ then show ?lhs apply (simp add: locally_compact openin_contains_cball) apply (clarify | assumption | drule bspec)+ - apply (rule_tac x="ball x e \ s" in exI, simp) - apply (rule_tac x="cball x e \ s" in exI) + apply (rule_tac x="ball x e \ S" in exI, simp) + apply (rule_tac x="cball x e \ S" in exI) using compact_eq_bounded_closed apply auto apply (metis open_ball le_infI1 mem_ball open_contains_cball_eq) @@ -2010,20 +2011,20 @@ qed lemma locally_compact_compact: - fixes s :: "'a :: heine_borel set" - shows "locally compact s \ - (\k. k \ s \ compact k - \ (\u v. k \ u \ u \ v \ v \ s \ - openin (top_of_set s) u \ compact v))" + fixes S :: "'a :: heine_borel set" + shows "locally compact S \ + (\k. k \ S \ compact k + \ (\u v. k \ u \ u \ v \ v \ S \ + openin (top_of_set S) u \ compact v))" (is "?lhs = ?rhs") proof assume ?lhs then obtain u v where - uv: "\x. x \ s \ x \ u x \ u x \ v x \ v x \ s \ - openin (top_of_set s) (u x) \ compact (v x)" + uv: "\x. x \ S \ x \ u x \ u x \ v x \ v x \ S \ + openin (top_of_set S) (u x) \ compact (v x)" by (metis locally_compactE) - have *: "\u v. k \ u \ u \ v \ v \ s \ openin (top_of_set s) u \ compact v" - if "k \ s" "compact k" for k + have *: "\u v. k \ u \ u \ v \ v \ S \ openin (top_of_set S) u \ compact v" + if "k \ S" "compact k" for k proof - have "\C. (\c\C. openin (top_of_set k) c) \ k \ \C \ \D\C. finite D \ k \ \D" @@ -2041,9 +2042,7 @@ show ?thesis apply (rule_tac x="\(u ` T)" in exI) apply (rule_tac x="\(v ` T)" in exI) - apply (simp add: Tuv) - using T that - apply (auto simp: dest!: uv) + using T that apply (auto simp: Tuv dest!: uv) done qed show ?rhs @@ -2057,43 +2056,42 @@ qed lemma open_imp_locally_compact: - fixes s :: "'a :: heine_borel set" - assumes "open s" - shows "locally compact s" + fixes S :: "'a :: heine_borel set" + assumes "open S" + shows "locally compact S" proof - - have *: "\u v. x \ u \ u \ v \ v \ s \ openin (top_of_set s) u \ compact v" - if "x \ s" for x + have *: "\U V. x \ U \ U \ V \ V \ S \ openin (top_of_set S) U \ compact V" + if "x \ S" for x proof - - obtain e where "e>0" and e: "cball x e \ s" - using open_contains_cball assms \x \ s\ by blast - have ope: "openin (top_of_set s) (ball x e)" + obtain e where "e>0" and e: "cball x e \ S" + using open_contains_cball assms \x \ S\ by blast + have ope: "openin (top_of_set S) (ball x e)" by (meson e open_ball ball_subset_cball dual_order.trans open_subset) show ?thesis - apply (rule_tac x="ball x e" in exI) - apply (rule_tac x="cball x e" in exI) - using \e > 0\ e apply (auto simp: ope) - done + proof (intro exI conjI) + let ?U = "ball x e" + let ?V = "cball x e" + show "x \ ?U" "?U \ ?V" "?V \ S" "compact ?V" + using \e > 0\ e by auto + show "openin (top_of_set S) ?U" + using ope by blast + qed qed show ?thesis - unfolding locally_compact - by (blast intro: *) + unfolding locally_compact by (blast intro: *) qed lemma closed_imp_locally_compact: - fixes s :: "'a :: heine_borel set" - assumes "closed s" - shows "locally compact s" + fixes S :: "'a :: heine_borel set" + assumes "closed S" + shows "locally compact S" proof - - have *: "\u v. x \ u \ u \ v \ v \ s \ - openin (top_of_set s) u \ compact v" - if "x \ s" for x - proof - - show ?thesis - apply (rule_tac x = "s \ ball x 1" in exI) - apply (rule_tac x = "s \ cball x 1" in exI) - using \x \ s\ assms apply auto - done - qed + have *: "\U V. x \ U \ U \ V \ V \ S \ openin (top_of_set S) U \ compact V" + if "x \ S" for x + apply (rule_tac x = "S \ ball x 1" in exI) + apply (rule_tac x = "S \ cball x 1" in exI) + using \x \ S\ assms apply auto + done show ?thesis unfolding locally_compact by (blast intro: *) @@ -2103,25 +2101,25 @@ by (simp add: closed_imp_locally_compact) lemma locally_compact_Int: - fixes s :: "'a :: t2_space set" - shows "\locally compact s; locally compact t\ \ locally compact (s \ t)" + fixes S :: "'a :: t2_space set" + shows "\locally compact S; locally compact t\ \ locally compact (S \ t)" by (simp add: compact_Int locally_Int) lemma locally_compact_closedin: - fixes s :: "'a :: heine_borel set" - shows "\closedin (top_of_set s) t; locally compact s\ + fixes S :: "'a :: heine_borel set" + shows "\closedin (top_of_set S) t; locally compact S\ \ locally compact t" -unfolding closedin_closed -using closed_imp_locally_compact locally_compact_Int by blast + unfolding closedin_closed + using closed_imp_locally_compact locally_compact_Int by blast lemma locally_compact_delete: - fixes s :: "'a :: t1_space set" - shows "locally compact s \ locally compact (s - {a})" + fixes S :: "'a :: t1_space set" + shows "locally compact S \ locally compact (S - {a})" by (auto simp: openin_delete locally_open_subset) lemma locally_closed: - fixes s :: "'a :: heine_borel set" - shows "locally closed s \ locally compact s" + fixes S :: "'a :: heine_borel set" + shows "locally closed S \ locally compact S" (is "?lhs = ?rhs") proof assume ?lhs @@ -2345,10 +2343,8 @@ and cloV2: "closedin (top_of_set D) (D \ closure V2)" by (simp_all add: closedin_closed_Int) moreover have "D \ closure V1 = D \ V1" "D \ closure V2 = D \ V2" - apply safe using \D \ V1 \ V2\ \open V1\ \open V2\ V12 - apply (simp_all add: closure_subset [THEN subsetD] closure_iff_nhds_not_empty, blast+) - done + by (auto simp add: closure_subset [THEN subsetD] closure_iff_nhds_not_empty, blast+) ultimately have cloDV1: "closedin (top_of_set D) (D \ V1)" and cloDV2: "closedin (top_of_set D) (D \ V2)" by metis+ @@ -2360,10 +2356,12 @@ assume "D \ U1 \ C = {}" then have *: "C \ D \ V2" using D1 DV12 \C \ D\ by auto - have "\?\ \ D \ V2" - apply (rule Inter_lower) - using * apply simp - by (meson cloDV2 \open V2\ cloD closedin_trans le_inf_iff opeD openin_Int_open) + have 1: "openin (top_of_set S) (D \ V2)" + by (simp add: \open V2\ opeD openin_Int_open) + have 2: "closedin (top_of_set S) (D \ V2)" + using cloD cloDV2 closedin_trans by blast + have "\ ?\ \ D \ V2" + by (rule Inter_lower) (use * 1 2 in simp) then show False using K1 V12 \K1 \ {}\ \K1 \ V1\ closedin_imp_subset by blast qed @@ -2372,18 +2370,17 @@ assume "D \ U2 \ C = {}" then have *: "C \ D \ V1" using D2 DV12 \C \ D\ by auto + have 1: "openin (top_of_set S) (D \ V1)" + by (simp add: \open V1\ opeD openin_Int_open) + have 2: "closedin (top_of_set S) (D \ V1)" + using cloD cloDV1 closedin_trans by blast have "\?\ \ D \ V1" - apply (rule Inter_lower) - using * apply simp - by (meson cloDV1 \open V1\ cloD closedin_trans le_inf_iff opeD openin_Int_open) + by (rule Inter_lower) (use * 1 2 in simp) then show False using K2 V12 \K2 \ {}\ \K2 \ V2\ closedin_imp_subset by blast qed ultimately show False - using \connected C\ unfolding connected_closed - apply (simp only: not_ex) - apply (drule_tac x="D \ U1" in spec) - apply (drule_tac x="D \ U2" in spec) + using \connected C\ [unfolded connected_closed, simplified, rule_format, of concl: "D \ U1" "D \ U2"] using \C \ D\ D1 D2 V12 DV12 \closed U1\ \closed U2\ \closed D\ by blast qed @@ -2617,7 +2614,7 @@ have "path_component v x x" by (meson assms(3) path_component_refl) then show ?thesis - by (metis assms(1) assms(2) assms(3) mem_Collect_eq path_component_subset path_connected_path_component) + by (metis assms mem_Collect_eq path_component_subset path_connected_path_component) qed proposition locally_path_connected: @@ -3415,10 +3412,11 @@ 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) - using feq apply auto[1] - using geq apply auto[1] - using Qeq topspace_euclidean_subtopology by blast + proof (rule homotopic_with_eq) + show "f x = (f \ h \ k) x" "g x = (g \ h \ k) x" + if "x \ topspace (top_of_set t)" for x + using feq geq that by force+ + qed (use Qeq topspace_euclidean_subtopology in blast) qed lemma cohomotopically_trivial_retraction_null_gen: @@ -3439,15 +3437,15 @@ by (simp add: P Qf contf imf) 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)" - 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) - using feq apply auto[1] - apply simp - using Qeq topspace_euclidean_subtopology by blast + 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)" + using Q by auto + qed (auto simp: contk imk) + 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 qed end