diff -r 7d59af98af29 -r 2a4c8a2a3f8e src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Wed Dec 26 20:57:23 2018 +0100 +++ b/src/HOL/Analysis/Path_Connected.thy Thu Dec 27 19:48:28 2018 +0100 @@ -591,7 +591,7 @@ using \d1 > 0\ \d2 > 0\ by (simp add: min_def) have dist2: "dist (1 / 2 + min (1 / 2) (min d1 d2) / 4) (1 / 2) < d2" using \d1 > 0\ \d2 > 0\ by (simp add: min_def dist_norm) - have [simp]: "~ min (1 / 2) (min d1 d2) \ 0" + have [simp]: "\ min (1 / 2) (min d1 d2) \ 0" using \d1 > 0\ \d2 > 0\ by (simp add: min_def) have "dist (g2 (min (1 / 2) (min d1 d2) / 2)) (g1 1) < e/2" "dist (g2 (min (1 / 2) (min d1 d2) / 2)) (g2 0) < e/2" @@ -670,7 +670,7 @@ have False if "g1 0 = g2 u" "0 \ u" "u \ 1" for u using * [of 0 "(u + 1) / 2"] that assms arc_distinct_ends [OF \?lhs\] by (auto simp: joinpaths_def pathstart_def pathfinish_def split_ifs divide_simps) - then have n1: "~ (pathstart g1 \ path_image g2)" + then have n1: "pathstart g1 \ path_image g2" unfolding pathstart_def path_image_def using atLeastAtMost_iff by blast show ?rhs using \?lhs\ @@ -2442,7 +2442,7 @@ lemma cobounded_unbounded_component: fixes s :: "'a :: euclidean_space set" assumes "bounded (-s)" - shows "\x. x \ s \ ~ bounded (connected_component_set s x)" + shows "\x. x \ s \ \ bounded (connected_component_set s x)" proof - obtain i::'a where i: "i \ Basis" using nonempty_Basis by blast @@ -2450,7 +2450,7 @@ using bounded_subset_ballD [OF assms, of 0] by auto then have *: "\x. B \ norm x \ x \ s" by (force simp: ball_def dist_norm) - have unbounded_inner: "~ bounded {x. inner i x \ B}" + have unbounded_inner: "\ bounded {x. inner i x \ B}" apply (auto simp: bounded_def dist_norm) apply (rule_tac x="x + (max B e + 1 + \i \ x\) *\<^sub>R i" in exI) apply simp @@ -2475,8 +2475,8 @@ lemma cobounded_unique_unbounded_component: fixes s :: "'a :: euclidean_space set" assumes bs: "bounded (-s)" and "2 \ DIM('a)" - and bo: "~ bounded(connected_component_set s x)" - "~ bounded(connected_component_set s y)" + and bo: "\ bounded(connected_component_set s x)" + "\ bounded(connected_component_set s y)" shows "connected_component_set s x = connected_component_set s y" proof - obtain i::'a where i: "i \ Basis" @@ -2507,7 +2507,7 @@ lemma cobounded_unbounded_components: fixes s :: "'a :: euclidean_space set" - shows "bounded (-s) \ \c. c \ components s \ ~bounded c" + shows "bounded (-s) \ \c. c \ components s \ \bounded c" by (metis cobounded_unbounded_component components_def imageI) lemma cobounded_unique_unbounded_components: @@ -2532,9 +2532,9 @@ "inside S \ {x. (x \ S) \ bounded(connected_component_set ( - S) x)}" definition%important outside where - "outside S \ -S \ {x. ~ bounded(connected_component_set (- S) x)}" - -lemma outside: "outside S = {x. ~ bounded(connected_component_set (- S) x)}" + "outside S \ -S \ {x. \ bounded(connected_component_set (- S) x)}" + +lemma outside: "outside S = {x. \ bounded(connected_component_set (- S) x)}" by (auto simp: outside_def) (metis Compl_iff bounded_empty connected_component_eq_empty) lemma inside_no_overlap [simp]: "inside S \ S = {}" @@ -2619,7 +2619,7 @@ lemma unbounded_outside: fixes S :: "'a::{real_normed_vector, perfect_space} set" - shows "bounded S \ ~ bounded(outside S)" + shows "bounded S \ \ bounded(outside S)" using cobounded_imp_unbounded cobounded_outside by blast lemma bounded_inside: @@ -2655,7 +2655,7 @@ lemma not_outside_connected_component_lt: fixes S :: "'a::euclidean_space set" assumes S: "bounded S" and "2 \ DIM('a)" - shows "- (outside S) = {x. \B. \y. B < norm(y) \ ~ (connected_component (- S) x y)}" + shows "- (outside S) = {x. \B. \y. B < norm(y) \ \ connected_component (- S) x y}" proof - obtain B::real where B: "0 < B" and Bno: "\x. x \ S \ norm x \ B" using S [simplified bounded_pos] by auto @@ -2681,24 +2681,24 @@ lemma not_outside_connected_component_le: fixes S :: "'a::euclidean_space set" assumes S: "bounded S" "2 \ DIM('a)" - shows "- (outside S) = {x. \B. \y. B \ norm(y) \ ~ (connected_component (- S) x y)}" + shows "- (outside S) = {x. \B. \y. B \ norm(y) \ \ connected_component (- S) x y}" apply (auto intro: less_imp_le simp: not_outside_connected_component_lt [OF assms]) by (meson gt_ex less_le_trans) lemma inside_connected_component_lt: fixes S :: "'a::euclidean_space set" assumes S: "bounded S" "2 \ DIM('a)" - shows "inside S = {x. (x \ S) \ (\B. \y. B < norm(y) \ ~(connected_component (- S) x y))}" + shows "inside S = {x. (x \ S) \ (\B. \y. B < norm(y) \ \ connected_component (- S) x y)}" by (auto simp: inside_outside not_outside_connected_component_lt [OF assms]) lemma inside_connected_component_le: fixes S :: "'a::euclidean_space set" assumes S: "bounded S" "2 \ DIM('a)" - shows "inside S = {x. (x \ S) \ (\B. \y. B \ norm(y) \ ~(connected_component (- S) x y))}" + shows "inside S = {x. (x \ S) \ (\B. \y. B \ norm(y) \ \ connected_component (- S) x y)}" by (auto simp: inside_outside not_outside_connected_component_le [OF assms]) lemma inside_subset: - assumes "connected U" and "~bounded U" and "T \ U = - S" + assumes "connected U" and "\ bounded U" and "T \ U = - S" shows "inside S \ T" apply (auto simp: inside_def) by (metis bounded_subset [of "connected_component_set (- S) _"] connected_component_maximal @@ -2794,7 +2794,7 @@ lemma frontier_minimal_separating_closed: fixes S :: "'a::real_normed_vector set" assumes "closed S" - and nconn: "~ connected(- S)" + and nconn: "\ connected(- S)" and C: "C \ components (- S)" and conn: "\T. \closed T; T \ S\ \ connected(- T)" shows "frontier C = S" @@ -3319,7 +3319,7 @@ lemma bounded_unique_outside: fixes s :: "'a :: euclidean_space set" - shows "\bounded s; DIM('a) \ 2\ \ (c \ components (- s) \ ~bounded c \ c = outside s)" + shows "\bounded s; DIM('a) \ 2\ \ (c \ components (- s) \ \ bounded c \ c = outside s)" apply (rule iffI) apply (metis cobounded_unique_unbounded_components connected_outside double_compl outside_bounded_nonempty outside_in_components unbounded_outside) by (simp add: connected_outside outside_bounded_nonempty outside_in_components unbounded_outside) @@ -3365,7 +3365,7 @@ apply (rule le_no) using w wy oint by (force simp: imageI image_mono interiorI interior_subset frontier_def y) - have **: "(~(b \ (- S) = {}) \ ~(b - (- S) = {}) \ (b \ f \ {})) + have **: "(b \ (- S) \ {} \ b - (- S) \ {} \ b \ f \ {}) \ (b \ S \ {}) \ b \ f = {} \ b \ S" for b f and S :: "'b set" by blast @@ -5065,7 +5065,7 @@ done qed -subsection\Sort of induction principle for connected sets\ +subsection\An induction principle for connected sets\ proposition connected_induction: assumes "connected S" @@ -5084,7 +5084,7 @@ done have 2: "openin (subtopology euclidean S) {b. \T. openin (subtopology euclidean S) T \ - b \ T \ (\x\T. P x \ ~ Q x)}" + b \ T \ (\x\T. P x \ \ Q x)}" apply (subst openin_subopen, clarify) apply (rule_tac x=T in exI, auto) done @@ -5742,7 +5742,7 @@ qed blast -subsection\Important special cases of local connectedness and path connectedness\ +subsection\Special cases of local connectedness and path connectedness\ lemma locally_connected_1: assumes @@ -7155,7 +7155,7 @@ lemma connected_card_eq_iff_nontrivial: fixes S :: "'a::metric_space set" - shows "connected S \ uncountable S \ ~(\a. S \ {a})" + 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) @@ -7184,7 +7184,7 @@ proposition path_connected_convex_diff_countable: fixes U :: "'a::euclidean_space set" - assumes "convex U" "~ collinear U" "countable S" + assumes "convex U" "\ collinear U" "countable S" shows "path_connected(U - S)" proof (clarsimp simp add: path_connected_def) fix a b @@ -7202,7 +7202,7 @@ have "?m \ U" using \a \ U\ \b \ U\ \convex U\ convex_contains_segment by force obtain c where "c \ U" and nc_abc: "\ collinear {a,b,c}" - by (metis False \a \ U\ \b \ U\ \~ collinear U\ collinear_triples insert_absorb) + by (metis False \a \ U\ \b \ U\ \\ collinear U\ collinear_triples insert_absorb) have ncoll_mca: "\ collinear {?m,c,a}" by (metis (full_types) \a \ ?m\ collinear_3_trans collinear_midpoint insert_commute nc_abc) have ncoll_mcb: "\ collinear {?m,c,b}" @@ -7289,7 +7289,7 @@ corollary connected_convex_diff_countable: fixes U :: "'a::euclidean_space set" - assumes "convex U" "~ collinear U" "countable S" + assumes "convex U" "\ collinear U" "countable S" shows "connected(U - S)" by (simp add: assms path_connected_convex_diff_countable path_connected_imp_connected) @@ -7344,7 +7344,7 @@ proposition path_connected_openin_diff_countable: fixes S :: "'a::euclidean_space set" assumes "connected S" and ope: "openin (subtopology euclidean (affine hull S)) S" - and "~ collinear S" "countable T" + and "\ collinear S" "countable T" shows "path_connected(S - T)" proof (clarsimp simp add: path_connected_component) fix x y @@ -7360,8 +7360,8 @@ by (auto simp: openin_contains_ball) with \x \ U\ have x: "x \ ball x r \ affine hull S" by auto - have "~ S \ {x}" - using \~ collinear S\ collinear_subset by blast + have "\ S \ {x}" + using \\ collinear S\ collinear_subset by blast then obtain x' where "x' \ x" "x' \ S" by blast obtain y where y: "y \ x" "y \ ball x r \ affine hull S" @@ -7414,7 +7414,7 @@ corollary connected_openin_diff_countable: fixes S :: "'a::euclidean_space set" assumes "connected S" and ope: "openin (subtopology euclidean (affine hull S)) S" - and "~ collinear S" "countable T" + and "\ collinear S" "countable T" shows "connected(S - T)" by (metis path_connected_imp_connected path_connected_openin_diff_countable [OF assms]) @@ -7445,7 +7445,7 @@ -subsection\Self-homeomorphisms shuffling points about in various ways\ +subsection\Self-homeomorphisms shuffling points about\ subsubsection%unimportant\The theorem \homeomorphism_moving_points_exists\\ @@ -7610,7 +7610,7 @@ assumes "affine T" "a \ T" and ST: "ball a r \ T \ S" "S \ T" and u: "u \ ball a r \ T" and v: "v \ ball a r \ T" obtains f g where "homeomorphism S S f g" - "f u = v" "{x. ~ (f x = x \ g x = x)} \ ball a r \ T" + "f u = v" "{x. \ (f x = x \ g x = x)} \ ball a r \ T" proof - obtain f g where hom: "homeomorphism (cball a r \ T) (cball a r \ T) f g" and "f u = v" and fid: "\x. \x \ sphere a r; x \ T\ \ f x = x" @@ -7690,14 +7690,14 @@ and TS: "T \ affine hull S" and S: "connected S" "a \ S" "b \ S" obtains f g where "homeomorphism T T f g" "f a = b" - "{x. ~ (f x = x \ g x = x)} \ S" - "bounded {x. ~ (f x = x \ g x = x)}" + "{x. \ (f x = x \ g x = x)} \ S" + "bounded {x. \ (f x = x \ g x = x)}" proof - have 1: "\h k. homeomorphism T T h k \ h (f d) = d \ - {x. ~ (h x = x \ k x = x)} \ S \ bounded {x. ~ (h x = x \ k x = x)}" + {x. \ (h x = x \ k x = x)} \ S \ bounded {x. \ (h x = x \ k x = x)}" if "d \ S" "f d \ S" and homfg: "homeomorphism T T f g" - and S: "{x. ~ (f x = x \ g x = x)} \ S" - and bo: "bounded {x. ~ (f x = x \ g x = x)}" for d f g + and S: "{x. \ (f x = x \ g x = x)} \ S" + and bo: "bounded {x. \ (f x = x \ g x = x)}" for d f g proof (intro exI conjI) show homgf: "homeomorphism T T g f" by (metis homeomorphism_symD homfg) @@ -7722,7 +7722,7 @@ by force show "{x. \ ((f2 \ f1) x = x \ (g1 \ g2) x = x)} \ S" using sub by force - have "bounded ({x. ~(f1 x = x \ g1 x = x)} \ {x. ~(f2 x = x \ g2 x = x)})" + have "bounded ({x. \(f1 x = x \ g1 x = x)} \ {x. \(f2 x = x \ g2 x = x)})" using bo by simp then show "bounded {x. \ ((f2 \ f1) x = x \ (g1 \ g2) x = x)}" by (rule bounded_subset) auto @@ -7753,7 +7753,7 @@ done 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)}" + {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 @@ -7769,7 +7769,7 @@ and ope: "openin (subtopology euclidean (affine hull S)) S" and "S \ T" "T \ affine hull S" "connected S" shows "\f g. homeomorphism T T f g \ (\i \ K. f(x i) = y i) \ - {x. ~ (f x = x \ g x = x)} \ S \ bounded {x. ~ (f x = x \ g x = x)}" + {x. \ (f x = x \ g x = x)} \ S \ bounded {x. \ (f x = x \ g x = x)}" using assms proof (induction K) case empty @@ -7783,11 +7783,11 @@ and xyS: "\i. i \ K \ x i \ S \ y i \ S" by (simp_all add: pairwise_insert) obtain f g where homfg: "homeomorphism T T f g" and feq: "\i. i \ K \ f(x i) = y i" - and fg_sub: "{x. ~ (f x = x \ g x = x)} \ S" - and bo_fg: "bounded {x. ~ (f x = x \ g x = x)}" + and fg_sub: "{x. \ (f x = x \ g x = x)} \ S" + and bo_fg: "bounded {x. \ (f x = x \ g x = x)}" using insert.IH [OF xyS pw] insert.prems by (blast intro: that) then have "\f g. homeomorphism T T f g \ (\i \ K. f(x i) = y i) \ - {x. ~ (f x = x \ g x = x)} \ S \ bounded {x. ~ (f x = x \ g x = x)}" + {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) @@ -7832,7 +7832,7 @@ using feq hk_sub by (auto simp: heq) show "{x. \ ((h \ f) x = x \ (g \ k) x = x)} \ S" using fg_sub hk_sub by force - have "bounded ({x. ~(f x = x \ g x = x)} \ {x. ~(h x = x \ k x = x)})" + have "bounded ({x. \(f x = x \ g x = x)} \ {x. \(h x = x \ k x = x)})" using bo_fg bo_hk bounded_Un by blast then show "bounded {x. \ ((h \ f) x = x \ (g \ k) x = x)}" by (rule bounded_subset) auto @@ -7846,7 +7846,7 @@ and pw: "pairwise (\i j. (x i \ x j) \ (y i \ y j)) K" and S: "S \ T" "T \ affine hull S" "connected S" obtains f g where "homeomorphism T T f g" "\i. i \ K \ f(x i) = y i" - "{x. ~ (f x = x \ g x = x)} \ S" "bounded {x. (~ (f x = x \ g x = x))}" + "{x. \ (f x = x \ g x = x)} \ S" "bounded {x. (\ (f x = x \ g x = x))}" proof (cases "S = {}") case True then show ?thesis @@ -7995,8 +7995,8 @@ fixes T :: "real set" assumes "open U" "open S" "connected S" "U \ {}" "finite K" "K \ S" "U \ S" "S \ T" obtains f g where "homeomorphism T T f g" - "\x. x \ K \ f x \ U" "{x. (~ (f x = x \ g x = x))} \ S" - "bounded {x. (~ (f x = x \ g x = x))}" + "\x. x \ K \ f x \ U" "{x. (\ (f x = x \ g x = x))} \ S" + "bounded {x. (\ (f x = x \ g x = x))}" proof - obtain c d where "box c d \ {}" "cbox c d \ U" proof - @@ -8109,8 +8109,8 @@ proposition homeomorphism_grouping_points_exists: fixes S :: "'a::euclidean_space set" assumes "open U" "open S" "connected S" "U \ {}" "finite K" "K \ S" "U \ S" "S \ T" - obtains f g where "homeomorphism T T f g" "{x. (~ (f x = x \ g x = x))} \ S" - "bounded {x. (~ (f x = x \ g x = x))}" "\x. x \ K \ f x \ U" + obtains f g where "homeomorphism T T f g" "{x. (\ (f x = x \ g x = x))} \ S" + "bounded {x. (\ (f x = x \ g x = x))}" "\x. x \ K \ f x \ U" proof (cases "2 \ DIM('a)") case True have TS: "T \ affine hull S" @@ -8172,10 +8172,10 @@ using sub hj apply (drule_tac c="h x" in subsetD, force) by (metis imageE) - have "bounded (j ` {x. (~ (f x = x \ g x = x))})" + have "bounded (j ` {x. (\ (f x = x \ g x = x))})" by (rule bounded_linear_image [OF bou]) (use \linear j\ linear_conv_bounded_linear in auto) moreover - have *: "{x. ~((j \ f \ h) x = x \ (j \ g \ h) x = x)} = j ` {x. (~ (f x = x \ g x = x))}" + have *: "{x. \((j \ f \ h) x = x \ (j \ g \ h) x = x)} = j ` {x. (\ (f x = x \ g x = x))}" using hj by (auto simp: jf jg image_iff, metis+) ultimately show "bounded {x. \ ((j \ f \ h) x = x \ (j \ g \ h) x = x)}" by metis @@ -8190,8 +8190,8 @@ assumes opeU: "openin (subtopology euclidean S) U" and opeS: "openin (subtopology euclidean (affine hull S)) S" and "U \ {}" "finite K" "K \ S" and S: "S \ T" "T \ affine hull S" "connected S" - obtains f g where "homeomorphism T T f g" "{x. (~ (f x = x \ g x = x))} \ S" - "bounded {x. (~ (f x = x \ g x = x))}" "\x. x \ K \ f x \ U" + obtains f g where "homeomorphism T T f g" "{x. (\ (f x = x \ g x = x))} \ S" + "bounded {x. (\ (f x = x \ g x = x))}" "\x. x \ K \ f x \ U" proof (cases "2 \ aff_dim S") case True have opeU': "openin (subtopology euclidean (affine hull S)) U" @@ -8208,7 +8208,7 @@ then obtain \ where \: "bij_betw \ K P" using \finite K\ finite_same_card_bij by blast have "\f g. homeomorphism T T f g \ (\i \ K. f(id i) = \ i) \ - {x. ~ (f x = x \ g x = x)} \ S \ bounded {x. ~ (f x = x \ g x = x)}" + {x. \ (f x = x \ g x = x)} \ S \ bounded {x. \ (f x = x \ g x = x)}" proof (rule homeomorphism_moving_points_exists_gen [OF \finite K\ _ _ True opeS S]) show "\i. i \ K \ id i \ S \ \ i \ S" by (metis id_apply opeU openin_contains_cball subsetCE \P \ U\ \bij_betw \ K P\ \K \ S\ bij_betwE) @@ -8314,10 +8314,10 @@ next have "compact (j ` closure {x. \ (f x = x \ g x = x)})" using bou by (auto simp: compact_continuous_image cont_hj) - then have "bounded (j ` {x. (~ (f x = x \ g x = x))})" + then have "bounded (j ` {x. \ (f x = x \ g x = x)})" by (rule bounded_closure_image [OF compact_imp_bounded]) moreover - have *: "{x \ affine hull S. j (f (h x)) \ x \ j (g (h x)) \ x} = j ` {x. (~ (f x = x \ g x = x))}" + have *: "{x \ affine hull S. j (f (h x)) \ x \ j (g (h x)) \ x} = j ` {x. (\ (f x = x \ g x = x))}" using h j by (auto simp: image_iff; metis) ultimately have "bounded {x \ affine hull S. j (f (h x)) \ x \ j (g (h x)) \ x}" by metis @@ -8337,7 +8337,7 @@ qed qed -subsection\nullhomotopic mappings\ +subsection\Nullhomotopic mappings\ text\ A mapping out of a sphere is nullhomotopic iff it extends to the ball. This even works out in the degenerate cases when the radius is \\\ 0, and