# HG changeset patch # User paulson # Date 1603139361 -3600 # Node ID 7956d958ef5bb182c84a091475252fa3dd09d57c # Parent fa4bb287ea5678b38fd9e39a34e447502bc06910 tidying and de-applying diff -r fa4bb287ea56 -r 7956d958ef5b src/HOL/Analysis/Homeomorphism.thy --- a/src/HOL/Analysis/Homeomorphism.thy Sat Oct 17 18:36:08 2020 +0100 +++ b/src/HOL/Analysis/Homeomorphism.thy Mon Oct 19 21:29:21 2020 +0100 @@ -32,9 +32,7 @@ fixes a :: "'a::euclidean_space" and b :: "'b::euclidean_space" assumes "0 < r" "0 < s" "DIM('a::euclidean_space) = DIM('b::euclidean_space)" shows "(sphere a r homeomorphic sphere b s)" - apply (rule homeomorphic_trans [OF homeomorphic_spheres homeomorphic_spheres']) - using assms apply auto - done + using assms homeomorphic_trans [OF homeomorphic_spheres homeomorphic_spheres'] by auto subsection \Homeomorphism of all convex compact sets with nonempty interior\ @@ -128,13 +126,15 @@ assume "x \ affine hull S" and nox: "norm x = 1" then have "x \ 0" by auto obtain d where "0 < d" and dx: "(d *\<^sub>R x) \ rel_frontier S" - and ri: "\e. \0 \ e; e < d\ \ (e *\<^sub>R x) \ rel_interior S" + and ri: "\e. \0 \ e; e < d\ \ (e *\<^sub>R x) \ rel_interior S" using ray_to_rel_frontier [OF \bounded S\ 0] \x \ affine hull S\ \x \ 0\ by auto show "x \ (\x. x /\<^sub>R norm x) ` (S - rel_interior S)" - apply (rule_tac x="d *\<^sub>R x" in image_eqI) - using \0 < d\ - using dx \closed S\ apply (auto simp: rel_frontier_def field_split_simps nox) - done + proof + show "x = d *\<^sub>R x /\<^sub>R norm (d *\<^sub>R x)" + using \0 < d\ by (auto simp: nox) + show "d *\<^sub>R x \ S - rel_interior S" + using dx \closed S\ by (auto simp: rel_frontier_def) + qed qed qed qed (rule inj_on_proj) @@ -145,11 +145,12 @@ have surf_nz: "\x. x \ ?SPHER \ surf x \ 0" by (metis "0" DiffE homeomorphism_def imageI surf) have cont_nosp: "continuous_on (?SPHER) (\x. norm x *\<^sub>R ((surf o proj) x))" - apply (rule continuous_intros)+ - apply (rule continuous_on_subset [OF cont_proj], force) - apply (rule continuous_on_subset [OF cont_surf]) - apply (force simp: homeomorphism_image1 [OF surf] dest: proj_spherI) - done + proof (intro continuous_intros) + show "continuous_on (sphere 0 1 \ affine hull S) proj" + by (rule continuous_on_subset [OF cont_proj], force) + show "continuous_on (proj ` (sphere 0 1 \ affine hull S)) surf" + by (intro continuous_on_subset [OF cont_surf]) (force simp: homeomorphism_image1 [OF surf] dest: proj_spherI) + qed have surfpS: "\x. \norm x = 1; x \ affine hull S\ \ surf (proj x) \ S" by (metis (full_types) DiffE \0 \ S\ homeomorphism_def image_eqI norm_zero proj_spherI real_vector.scale_zero_left scaleR_one surf) have *: "\y. norm y = 1 \ y \ affine hull S \ x = surf (proj y)" @@ -179,44 +180,37 @@ have co01: "compact ?SPHER" by (simp add: compact_Int_closed) show "?SMINUS homeomorphic ?SPHER" - apply (subst homeomorphic_sym) - apply (rule homeomorphic_compact [OF co01 cont_nosp [unfolded o_def] no_sp_im inj_spher]) - done + using homeomorphic_def surf by blast have proj_scaleR: "\a x. 0 < a \ proj (a *\<^sub>R x) = proj x" by (simp add: proj_def) have cont_sp0: "continuous_on (affine hull S - {0}) (surf o proj)" - apply (rule continuous_on_compose [OF continuous_on_subset [OF cont_proj]], force) - apply (rule continuous_on_subset [OF cont_surf]) - using homeomorphism_image1 proj_spherI surf by fastforce + proof (rule continuous_on_compose [OF continuous_on_subset [OF cont_proj]]) + show "continuous_on (proj ` (affine hull S - {0})) surf" + using homeomorphism_image1 proj_spherI surf by (intro continuous_on_subset [OF cont_surf]) fastforce + qed auto obtain B where "B>0" and B: "\x. x \ S \ norm x \ B" by (metis compact_imp_bounded \compact S\ bounded_pos_less less_eq_real_def) have cont_nosp: "continuous (at x within ?CBALL) (\x. norm x *\<^sub>R surf (proj x))" if "norm x \ 1" "x \ affine hull S" for x proof (cases "x=0") case True - show ?thesis using True + have "(norm \ 0) (at 0 within cball 0 1 \ affine hull S)" + by (simp add: tendsto_norm_zero eventually_at) + with True show ?thesis apply (simp add: continuous_within) apply (rule lim_null_scaleR_bounded [where B=B]) - apply (simp_all add: tendsto_norm_zero eventually_at) - apply (rule_tac x=B in exI) - using B surfpS proj_def projI apply (auto simp: \B > 0\) - done + using B \0 < B\ local.proj_def projI surfpS by (auto simp: eventually_at) next case False then have "\\<^sub>F x in at x. (x \ affine hull S - {0}) = (x \ affine hull S)" - apply (simp add: eventually_at) - apply (rule_tac x="norm x" in exI) - apply (auto simp: False) - done - with cont_sp0 have *: "continuous (at x within affine hull S) (\x. surf (proj x))" - apply (simp add: continuous_on_eq_continuous_within) - apply (drule_tac x=x in bspec, force simp: False that) - apply (simp add: continuous_within Lim_transform_within_set) - done + by (force simp: False eventually_at) + moreover + have "continuous (at x within affine hull S - {0}) (\x. surf (proj x))" + using cont_sp0 False that by (auto simp add: continuous_on_eq_continuous_within) + ultimately have *: "continuous (at x within affine hull S) (\x. surf (proj x))" + by (simp add: continuous_within Lim_transform_within_set continuous_on_eq_continuous_within) show ?thesis - apply (rule continuous_within_subset [where s = "affine hull S", OF _ Int_lower2]) - apply (rule continuous_intros *)+ - done + by (intro continuous_within_subset [where s = "affine hull S", OF _ Int_lower2] continuous_intros *) qed have cont_nosp2: "continuous_on ?CBALL (\x. norm x *\<^sub>R ((surf o proj) x))" by (simp add: continuous_on_eq_continuous_within cont_nosp) @@ -230,9 +224,7 @@ by (simp add: proj_def) have "norm y \ 1" using that by simp have "surf (proj (y /\<^sub>R norm y)) \ S" - apply (rule surfpS) - using proj_def projI yaff - by (auto simp: False) + using False local.proj_def nproj1 projI surfpS yaff by blast then have "surf (proj y) \ S" by (simp add: False proj_def) then show "norm y *\<^sub>R surf (proj y) \ S" @@ -262,11 +254,12 @@ using starI [OF that] by (meson starI [OF that] le_less_linear norm_ge_zero zero_le_divide_iff) then have nole: "norm x \ norm (surf (proj x))" by (simp add: le_divide_eq_1) + let ?inx = "x /\<^sub>R norm (surf (proj x))" show ?thesis - apply (rule_tac x="inverse(norm(surf (proj x))) *\<^sub>R x" in image_eqI) - apply (metis (no_types, hide_lams) mult.commute scaleproj abs_inverse abs_norm_cancel divide_inverse norm_scaleR nxx positive_imp_inverse_positive proj_scaleR psp sproj_nz zero_less_norm_iff) - apply (auto simp: field_split_simps nole affineI) - done + proof + show "x = norm ?inx *\<^sub>R surf (proj ?inx)" + by (simp add: field_simps) (metis inverse_eq_divide nxx positive_imp_inverse_positive proj_scaleR psp scaleproj sproj_nz zero_less_norm_iff) + qed (auto simp: field_split_simps nole affineI) qed ultimately have im_cball: "(\x. norm x *\<^sub>R surf (proj x)) ` ?CBALL = S" by blast @@ -295,9 +288,7 @@ have co01: "compact ?CBALL" by (simp add: compact_Int_closed) show "S homeomorphic ?CBALL" - apply (subst homeomorphic_sym) - apply (rule homeomorphic_compact [OF co01 cont_nosp2 [unfolded o_def] im_cball inj_cball]) - done + using homeomorphic_compact [OF co01 cont_nosp2 [unfolded o_def] im_cball inj_cball] homeomorphic_sym by blast qed corollary @@ -416,16 +407,22 @@ also have "... = cball 0 1 \ span ?aS" using eqspanS affine_hull_translation by blast also have "... homeomorphic cball 0 1 \ span ?bT" - proof (rule homeomorphicI [where f=f and g=g]) - show fim1: "f ` (cball 0 1 \ span ?aS) = cball 0 1 \ span ?bT" - apply (rule subset_antisym) - using fim fno apply (force simp:, clarify) - by (metis IntI fg gim gno image_eqI mem_cball_0) - show "g ` (cball 0 1 \ span ?bT) = cball 0 1 \ span ?aS" - apply (rule subset_antisym) - using gim gno apply (force simp:, clarify) - by (metis IntI fim1 gf image_eqI) - qed (auto simp: fg gf) + proof (rule homeomorphicI) + show fim1: "f ` (cball 0 1 \ span ?aS) = cball 0 1 \ span ?bT" + proof + show "f ` (cball 0 1 \ span ?aS) \ cball 0 1 \ span ?bT" + using fim fno by auto + show "cball 0 1 \ span ?bT \ f ` (cball 0 1 \ span ?aS)" + by clarify (metis IntI fg gim gno image_eqI mem_cball_0) + qed + show "g ` (cball 0 1 \ span ?bT) = cball 0 1 \ span ?aS" + proof + show "g ` (cball 0 1 \ span ?bT) \ cball 0 1 \ span ?aS" + using gim gno by auto + show "cball 0 1 \ span ?aS \ g ` (cball 0 1 \ span ?bT)" + by clarify (metis IntI fim1 gf image_eqI) + qed + qed (auto simp: fg gf) also have "... = cball 0 1 \ (+) (-b) ` (affine hull T)" using eqspanT affine_hull_translation by blast also have "... = (+) (-b) ` (cball b 1 \ affine hull T)" @@ -445,16 +442,22 @@ also have "... = sphere 0 1 \ span ?aS" using eqspanS affine_hull_translation by blast also have "... homeomorphic sphere 0 1 \ span ?bT" - proof (rule homeomorphicI [where f=f and g=g]) - show fim1: "f ` (sphere 0 1 \ span ?aS) = sphere 0 1 \ span ?bT" - apply (rule subset_antisym) - using fim fno apply (force simp:, clarify) - by (metis IntI fg gim gno image_eqI mem_sphere_0) - show "g ` (sphere 0 1 \ span ?bT) = sphere 0 1 \ span ?aS" - apply (rule subset_antisym) - using gim gno apply (force simp:, clarify) - by (metis IntI fim1 gf image_eqI) - qed (auto simp: fg gf) + proof (rule homeomorphicI) + show fim1: "f ` (sphere 0 1 \ span ?aS) = sphere 0 1 \ span ?bT" + proof + show "f ` (sphere 0 1 \ span ?aS) \ sphere 0 1 \ span ?bT" + using fim fno by auto + show "sphere 0 1 \ span ?bT \ f ` (sphere 0 1 \ span ?aS)" + by clarify (metis IntI fg gim gno image_eqI mem_sphere_0) + qed + show "g ` (sphere 0 1 \ span ?bT) = sphere 0 1 \ span ?aS" + proof + show "g ` (sphere 0 1 \ span ?bT) \ sphere 0 1 \ span ?aS" + using gim gno by auto + show "sphere 0 1 \ span ?aS \ g ` (sphere 0 1 \ span ?bT)" + by clarify (metis IntI fim1 gf image_eqI) + qed + qed (auto simp: fg gf) also have "... = sphere 0 1 \ (+) (-b) ` (affine hull T)" using eqspanT affine_hull_translation by blast also have "... = (+) (-b) ` (sphere b 1 \ affine hull T)" @@ -502,35 +505,34 @@ using \norm b = 1\ \b \ T\ by auto define f where "f \ \x. 2 *\<^sub>R b + (2 / (1 - b\x)) *\<^sub>R (x - b)" define g where "g \ \y. b + (4 / (norm y ^ 2 + 4)) *\<^sub>R (y - 2 *\<^sub>R b)" - have [simp]: "\x. \x \ T; b\x = 0\ \ f (g x) = x" + have fg[simp]: "\x. \x \ T; b\x = 0\ \ f (g x) = x" unfolding f_def g_def by (simp add: algebra_simps field_split_simps add_nonneg_eq_0_iff) have no: "(norm (f x))\<^sup>2 = 4 * (1 + b \ x) / (1 - b \ x)" if "norm x = 1" and "b \ x \ 1" for x - using that + using that sum_sqs_eq [of 1 "b \ x"] apply (simp flip: dot_square_norm add: norm_eq_1 nonzero_eq_divide_eq) apply (simp add: f_def vector_add_divide_simps inner_simps) - apply (use sum_sqs_eq [of 1 "b \ x"] - in \auto simp add: field_split_simps inner_commute\) + apply (auto simp add: field_split_simps inner_commute) done have [simp]: "\u::real. 8 + u * (u * 8) = u * 16 \ u=1" by algebra - have [simp]: "\x. \norm x = 1; b \ x \ 1\ \ g (f x) = x" + have gf[simp]: "\x. \norm x = 1; b \ x \ 1\ \ g (f x) = x" unfolding g_def no by (auto simp: f_def field_split_simps) - have [simp]: "norm (g x) = 1" if "x \ T" and "b \ x = 0" for x + have g1: "norm (g x) = 1" if "x \ T" and "b \ x = 0" for x using that apply (simp only: g_def) apply (rule power2_eq_imp_eq) apply (simp_all add: dot_square_norm [symmetric] divide_simps vector_add_divide_simps) apply (simp add: algebra_simps inner_commute) done - have [simp]: "b \ g x \ 1" if "x \ T" and "b \ x = 0" for x + have ne1: "b \ g x \ 1" if "x \ T" and "b \ x = 0" for x using that unfolding g_def apply (simp_all add: dot_square_norm [symmetric] divide_simps vector_add_divide_simps add_nonneg_eq_0_iff) apply (auto simp: algebra_simps) done have "subspace T" by (simp add: assms subspace_affine) - have [simp]: "\x. \x \ T; b \ x = 0\ \ g x \ T" + have gT: "\x. \x \ T; b \ x = 0\ \ g x \ T" unfolding g_def by (blast intro: \subspace T\ \b \ T\ subspace_add subspace_mul subspace_diff) have "f ` {x. norm x = 1 \ b\x \ 1} \ {x. b\x = 0}" @@ -540,14 +542,12 @@ unfolding f_def using assms \subspace T\ by (auto simp add: inner_add_right inner_diff_right mem_affine_3_minus subspace_mul) moreover have "{x. b\x = 0} \ T \ f ` ({x. norm x = 1 \ b\x \ 1} \ T)" - apply clarify - apply (rule_tac x = "g x" in image_eqI, auto) - done + by clarify (metis (mono_tags) IntI ne1 fg gT g1 imageI mem_Collect_eq) ultimately have imf: "f ` ({x. norm x = 1 \ b\x \ 1} \ T) = {x. b\x = 0} \ T" by blast have no4: "\y. b\y = 0 \ norm ((y\y + 4) *\<^sub>R b + 4 *\<^sub>R (y - 2 *\<^sub>R b)) = y\y + 4" apply (rule power2_eq_imp_eq) - apply (simp_all add: dot_square_norm [symmetric]) + apply (simp_all flip: dot_square_norm) apply (auto simp: power2_eq_square algebra_simps inner_commute) done have [simp]: "\x. \norm x = 1; b \ x \ 1\ \ b \ f x = 0" @@ -564,9 +564,7 @@ unfolding g_def by (blast intro: \subspace T\ \b \ T\ subspace_add subspace_mul subspace_diff) moreover have "{x. norm x = 1 \ b\x \ 1} \ T \ g ` ({x. b\x = 0} \ T)" - apply clarify - apply (rule_tac x = "f x" in image_eqI, auto) - done + by clarify (metis (mono_tags, lifting) IntI gf image_iff imf mem_Collect_eq) ultimately have img: "g ` ({x. b\x = 0} \ T) = {x. norm x = 1 \ b\x \ 1} \ T" by blast have aff: "affine ({x. b\x = 0} \ T)" @@ -580,9 +578,10 @@ also have "... homeomorphic {x. b\x = 0} \ T" by (rule homeomorphicI [OF imf img contf contg]) auto also have "... homeomorphic p" - apply (rule homeomorphic_affine_sets [OF aff \affine p\]) - apply (simp add: Int_commute aff_dim_affine_Int_hyperplane [OF \affine T\] affT) - done + proof (rule homeomorphic_affine_sets [OF aff \affine p\]) + show "aff_dim ({x. b \ x = 0} \ T) = aff_dim p" + by (simp add: Int_commute aff_dim_affine_Int_hyperplane [OF \affine T\] affT) + qed finally show ?thesis . qed @@ -603,10 +602,8 @@ also have "... = sphere 0 1 \ ((*\<^sub>R) (inverse r) ` (+) (- a) ` T) - {(b - a) /\<^sub>R r}" using assms by (auto simp: dist_norm norm_minus_commute divide_simps) also have "... homeomorphic p" - apply (rule homeomorphic_punctured_affine_sphere_affine_01) using assms affine_translation [symmetric, of "- a"] aff_dim_translation_eq [of "- a"] - apply (auto simp: dist_norm norm_minus_commute affine_scaling inj) - done + by (intro homeomorphic_punctured_affine_sphere_affine_01) (auto simp: dist_norm norm_minus_commute affine_scaling inj) finally show ?thesis . qed @@ -620,12 +617,10 @@ corollary homeomorphic_punctured_sphere_hyperplane: fixes a :: "'a :: euclidean_space" assumes "0 < r" and b: "b \ sphere a r" - and "c \ 0" - shows "(sphere a r - {b}) homeomorphic {x::'a. c \ x = d}" -apply (rule homeomorphic_punctured_sphere_affine) -using assms -apply (auto simp: affine_hyperplane of_nat_diff) -done + and "c \ 0" + shows "(sphere a r - {b}) homeomorphic {x::'a. c \ x = d}" + using assms + by (intro homeomorphic_punctured_sphere_affine) (auto simp: affine_hyperplane of_nat_diff) proposition homeomorphic_punctured_sphere_affine_gen: fixes a :: "'a :: euclidean_space" @@ -711,60 +706,56 @@ and keq:"k ` T = span ((+) (- a) ` S)" and hinv [simp]: "\x. x \ span ((+) (- a) ` S) \ k(h x) = x" and kinv [simp]: "\x. x \ T \ h(k x) = x" - apply (rule isometries_subspaces [OF _ \subspace T\]) - apply (auto simp: dimT) - done + by (auto simp: dimT intro: isometries_subspaces [OF _ \subspace T\] dimT) have hcont: "continuous_on A h" and kcont: "continuous_on B k" for A B using \linear h\ \linear k\ linear_continuous_on linear_conv_bounded_linear by blast+ have ihhhh[simp]: "\x. x \ S \ i \ h (x - a) = 0" using Tsub [THEN subsetD] heq span_superset by fastforce have "sphere 0 1 - {i} homeomorphic {x. i \ x = 0}" - apply (rule homeomorphic_punctured_sphere_affine) - using i - apply (auto simp: affine_hyperplane) - by (metis DIM_positive Suc_eq_plus1 add.left_neutral diff_add_cancel not_le not_less_eq_eq of_nat_1 of_nat_diff) + proof (rule homeomorphic_punctured_sphere_affine) + show "affine {x. i \ x = 0}" + by (auto simp: affine_hyperplane) + show "aff_dim {x. i \ x = 0} + 1 = int DIM('n)" + using i by clarsimp (metis DIM_positive Suc_pred add.commute of_nat_Suc) + qed (use i in auto) then obtain f g where fg: "homeomorphism (sphere 0 1 - {i}) {x. i \ x = 0} f g" by (force simp: homeomorphic_def) - have "h ` (+) (- a) ` S \ T" - using heq span_superset span_linear_image by blast - then have "g ` h ` (+) (- a) ` S \ g ` {x. i \ x = 0}" - using Tsub by (simp add: image_mono) - also have "... \ sphere 0 1 - {i}" - by (simp add: fg [unfolded homeomorphism_def]) - finally have gh_sub_sph: "(g \ h) ` (+) (- a) ` S \ sphere 0 1 - {i}" - by (metis image_comp) - then have gh_sub_cb: "(g \ h) ` (+) (- a) ` S \ cball 0 1" - by (metis Diff_subset order_trans sphere_cball) - have [simp]: "\u. u \ S \ norm (g (h (u - a))) = 1" - using gh_sub_sph [THEN subsetD] by (auto simp: o_def) - have ghcont: "continuous_on ((\x. x - a) ` S) (\x. g (h x))" - apply (rule continuous_on_compose2 [OF homeomorphism_cont2 [OF fg] hcont], force) - done - have kfcont: "continuous_on ((\x. g (h (x - a))) ` S) (\x. k (f x))" - apply (rule continuous_on_compose2 [OF kcont]) - using homeomorphism_cont1 [OF fg] gh_sub_sph apply (force intro: continuous_on_subset, blast) - done - have "S homeomorphic (+) (- a) ` S" - by (fact homeomorphic_translation) - also have "\ homeomorphic (g \ h) ` (+) (- a) ` S" - apply (simp add: homeomorphic_def homeomorphism_def cong: image_cong_simp) - apply (rule_tac x="g \ h" in exI) - apply (rule_tac x="k \ f" in exI) - apply (auto simp: ghcont kfcont span_base homeomorphism_apply2 [OF fg] image_comp cong: image_cong_simp) - done - finally have Shom: "S homeomorphic (\x. g (h x)) ` (\x. x - a) ` S" - by (simp cong: image_cong_simp) show ?thesis - apply (rule_tac U = "ball 0 1 \ image (g o h) ((+) (- a) ` S)" - and T = "image (g o h) ((+) (- a) ` S)" - in that) - apply (rule convex_intermediate_ball [of 0 1], force) - using gh_sub_cb apply force - apply force - apply (simp add: closedin_closed) - apply (rule_tac x="sphere 0 1" in exI) - apply (auto simp: Shom cong: image_cong_simp) - done + proof + have "h ` (+) (- a) ` S \ T" + using heq span_superset span_linear_image by blast + then have "g ` h ` (+) (- a) ` S \ g ` {x. i \ x = 0}" + using Tsub by (simp add: image_mono) + also have "... \ sphere 0 1 - {i}" + by (simp add: fg [unfolded homeomorphism_def]) + finally have gh_sub_sph: "(g \ h) ` (+) (- a) ` S \ sphere 0 1 - {i}" + by (metis image_comp) + then have gh_sub_cb: "(g \ h) ` (+) (- a) ` S \ cball 0 1" + by (metis Diff_subset order_trans sphere_cball) + have [simp]: "\u. u \ S \ norm (g (h (u - a))) = 1" + using gh_sub_sph [THEN subsetD] by (auto simp: o_def) + show "convex (ball 0 1 \ (g \ h) ` (+) (- a) ` S)" + by (meson ball_subset_cball convex_intermediate_ball gh_sub_cb sup.bounded_iff sup.cobounded1) + show "closedin (top_of_set (ball 0 1 \ (g \ h) ` (+) (- a) ` S)) ((g \ h) ` (+) (- a) ` S)" + unfolding closedin_closed + by (rule_tac x="sphere 0 1" in exI) auto + have ghcont: "continuous_on ((\x. x - a) ` S) (\x. g (h x))" + by (rule continuous_on_compose2 [OF homeomorphism_cont2 [OF fg] hcont], force) + have kfcont: "continuous_on ((\x. g (h (x - a))) ` S) (\x. k (f x))" + proof (rule continuous_on_compose2 [OF kcont]) + show "continuous_on ((\x. g (h (x - a))) ` S) f" + using homeomorphism_cont1 [OF fg] gh_sub_sph by (fastforce intro: continuous_on_subset) + qed auto + have "S homeomorphic (+) (- a) ` S" + by (fact homeomorphic_translation) + also have "\ homeomorphic (g \ h) ` (+) (- a) ` S" + apply (simp add: homeomorphic_def homeomorphism_def cong: image_cong_simp) + apply (rule_tac x="g \ h" in exI) + apply (rule_tac x="k \ f" in exI) + apply (auto simp: ghcont kfcont span_base homeomorphism_apply2 [OF fg] image_comp cong: image_cong_simp) + done + finally show "S homeomorphic (g \ h) ` (+) (- a) ` S" . + qed auto qed subsection\Locally compact sets in an open set\ @@ -790,10 +781,7 @@ also have "... = \(t ` S) \ closure S" proof show "\(v ` S) \ \(t ` S) \ closure S" - apply safe - apply (metis Int_iff subsetD UN_iff tv) - apply (simp add: closure_def rev_subsetD tv) - done + by clarify (meson IntD2 IntI UN_I closure_subset subsetD tv) have "t x \ closure S \ v x" if "x \ S" for x proof - have "t x \ closure S \ closure (t x \ S)" @@ -821,13 +809,14 @@ lemma locally_compact_homeomorphism_projection_closed: assumes "locally compact S" obtains T and f :: "'a \ 'a :: euclidean_space \ 'b :: euclidean_space" - where "closed T" "homeomorphism S T f fst" + where "closed T" "homeomorphism S T f fst" proof (cases "closed S") case True - then show ?thesis - apply (rule_tac T = "S \ {0}" and f = "\x. (x, 0)" in that) - apply (auto simp: closed_Times homeomorphism_def continuous_intros) - done + show ?thesis + proof + show "homeomorphism S (S \ {0}) (\x. (x, 0)) fst" + by (auto simp: homeomorphism_def continuous_intros) + qed (use True closed_Times in auto) next case False obtain U where "open U" and US: "U \ closure S = S" @@ -838,8 +827,10 @@ by (simp add: \open U\ closed_Compl) define f :: "'a \ 'a \ 'b" where "f \ \x. (x, One /\<^sub>R setdist {x} (- U))" have "continuous_on U (\x. (x, One /\<^sub>R setdist {x} (- U)))" - apply (intro continuous_intros continuous_on_setdist) - by (simp add: Ucomp setdist_eq_0_sing_1) + proof (intro continuous_intros continuous_on_setdist) + show "\x\U. setdist {x} (- U) \ 0" + by (simp add: Ucomp setdist_eq_0_sing_1) + qed then have homU: "homeomorphism U (f`U) f fst" by (auto simp: f_def homeomorphism_def image_iff continuous_intros) have cloS: "closedin (top_of_set U) S" @@ -850,33 +841,27 @@ by force have *: "r *\<^sub>R b = One \ b = (1 / r) *\<^sub>R One" for r and b::'b by (metis One_non_0 nonzero_divide_eq_eq real_vector.scale_eq_0_iff real_vector.scale_scale scaleR_one) - have "f ` U = (\z. (setdist {fst z} (- U) *\<^sub>R snd z)) -` {One}" - apply (auto simp: f_def setdist_eq_0_sing_1 field_simps Ucomp) - apply (rule_tac x=a in image_eqI) - apply (auto simp: * setdist_eq_0_sing_1 dest: setdist1D) - done + have "\a b::'b. setdist {a} (- U) *\<^sub>R b = One \ (a,b) \ (\x. (x, (1 / setdist {x} (- U)) *\<^sub>R One)) ` U" + by (metis (mono_tags, lifting) "*" ComplI image_eqI setdist1D setdist_sing_in_set) + then have "f ` U = (\z. (setdist {fst z} (- U) *\<^sub>R snd z)) -` {One}" + by (auto simp: f_def setdist_eq_0_sing_1 field_simps Ucomp) then have clfU: "closed (f ` U)" - apply (rule ssubst) - apply (rule continuous_closed_vimage) - apply (auto intro: continuous_intros cont [unfolded o_def]) - done + by (force intro: continuous_intros cont [unfolded o_def] continuous_closed_vimage) have "closed (f ` S)" - apply (rule closedin_closed_trans [OF _ clfU]) - apply (rule homeomorphism_imp_closed_map [OF homU cloS]) - done + by (metis closedin_closed_trans [OF _ clfU] homeomorphism_imp_closed_map [OF homU cloS]) then show ?thesis - apply (rule that) - apply (rule homeomorphism_of_subsets [OF homU]) - using US apply auto - done + by (metis US homU homeomorphism_of_subsets inf_sup_ord(1) that) qed lemma locally_compact_closed_Int_open: fixes S :: "'a :: euclidean_space set" - shows - "locally compact S \ (\U u. closed U \ open u \ S = U \ u)" -by (metis closed_closure closed_imp_locally_compact inf_commute locally_compact_Int locally_compact_open_Int_closure open_imp_locally_compact) - + shows "locally compact S \ (\U V. closed U \ open V \ S = U \ V)" (is "?lhs = ?rhs") +proof + show "?lhs \ ?rhs" + by (metis closed_closure inf_commute locally_compact_open_Int_closure) + show "?rhs \ ?lhs" + by (meson closed_imp_locally_compact locally_compact_Int open_imp_locally_compact) +qed lemma lowerdim_embeddings: assumes "DIM('a) < DIM('b)" @@ -910,17 +895,17 @@ by (intro linear_compose_sum linearI ballI) (auto simp: algebra_simps) have *: "(\a \ Basis. a \ basf b * (x \ basg a)) = x \ b" if "b \ Basis" for x b using sbf that by auto - show gf: "g (f x) = x" for x - apply (rule euclidean_eqI) - apply (simp add: f_def g_def inner_sum_left scaleR_sum_left algebra_simps) - apply (simp add: Groups_Big.sum_distrib_left [symmetric] *) - done + show gf: "g (f x) = x" for x + proof (rule euclidean_eqI) + show "\b. b \ Basis \ g (f x) \ b = x \ b" + using f_def g_def sbf by auto + qed show "basf(0,1) \ Basis" using b01 sbf by auto then show "f(x,0) \ basf(0,1) = 0" for x - apply (simp add: f_def inner_sum_left) - apply (rule comm_monoid_add_class.sum.neutral) - using b01 inner_not_same_Basis by fastforce + unfolding f_def inner_sum_left + using b01 inner_not_same_Basis + by (fastforce intro: comm_monoid_add_class.sum.neutral) qed qed @@ -942,15 +927,14 @@ have "S homeomorphic U" using homU homeomorphic_def by blast also have "... homeomorphic f ` U" - apply (rule homeomorphicI [OF refl gfU]) - apply (meson \inj f\ \linear f\ homeomorphism_cont2 linear_homeomorphism_image) - using \linear g\ linear_continuous_on linear_conv_bounded_linear apply blast - apply (auto simp: o_def) - done + proof (rule homeomorphicI [OF refl gfU]) + show "continuous_on U f" + by (meson \inj f\ \linear f\ homeomorphism_cont2 linear_homeomorphism_image) + show "continuous_on (f ` U) g" + using \linear g\ linear_continuous_on linear_conv_bounded_linear by blast + qed (auto simp: o_def) finally show ?thesis - apply (rule_tac T = "f ` U" in that) - apply (rule closed_injective_linear_image [OF \closed U\ \linear f\ \inj f\], assumption) - done + using \closed U\ \inj f\ \linear f\ closed_injective_linear_image that by blast qed @@ -989,38 +973,15 @@ proposition homeomorphic_convex_compact_cball: fixes e :: real and S :: "'a::euclidean_space set" - assumes "convex S" - and "compact S" - and "interior S \ {}" - and "e > 0" + assumes S: "convex S" "compact S" "interior S \ {}" and "e > 0" shows "S homeomorphic (cball (b::'a) e)" -proof - +proof (rule homeomorphic_trans[OF _ homeomorphic_balls(2)]) obtain a where "a \ interior S" - using assms(3) by auto - then obtain d where "d > 0" and d: "cball a d \ S" - unfolding mem_interior_cball by auto - let ?d = "inverse d" and ?n = "0::'a" - have "cball ?n 1 \ (\x. inverse d *\<^sub>R (x - a)) ` S" - apply rule - apply (rule_tac x="d *\<^sub>R x + a" in image_eqI) - defer - apply (rule d[unfolded subset_eq, rule_format]) - using \d > 0\ - unfolding mem_cball dist_norm - apply (auto simp add: mult_right_le_one_le) - done - then have "(\x. inverse d *\<^sub>R (x - a)) ` S homeomorphic cball ?n 1" - using homeomorphic_convex_compact_lemma[of "(\x. ?d *\<^sub>R -a + ?d *\<^sub>R x) ` S", - OF convex_affinity compact_affinity] - using assms(1,2) - by (auto simp add: scaleR_right_diff_distrib) - then show ?thesis - apply (rule_tac homeomorphic_trans[OF _ homeomorphic_balls(2)[of 1 _ ?n]]) - apply (rule homeomorphic_trans[OF homeomorphic_affinity[of "?d" S "?d *\<^sub>R -a"]]) - using \d>0\ \e>0\ - apply (auto simp add: scaleR_right_diff_distrib) - done -qed + using assms by auto + then show "S homeomorphic cball (0::'a) 1" + by (metis (no_types) aff_dim_cball S compact_cball convex_cball + homeomorphic_convex_lemma interior_rel_interior_gen zero_less_one) +qed (use \e>0\ in auto) corollary homeomorphic_convex_compact: fixes S :: "'a::euclidean_space set" @@ -1035,9 +996,7 @@ fixes a :: "'a::euclidean_space" and b and c :: "'a::euclidean_space" and d assumes "box a b \ {}" and "box c d \ {}" shows "(cbox a b) homeomorphic (cbox c d)" -apply (rule homeomorphic_convex_compact) -using assms apply auto -done + by (simp add: assms homeomorphic_convex_compact) lemma homeomorphic_closed_intervals_real: fixes a::real and b and c::real and d @@ -1065,7 +1024,7 @@ by (simp add: covering_space_def) lemma homeomorphism_imp_covering_space: "homeomorphism S T f g \ covering_space S f T" - apply (simp add: homeomorphism_def covering_space_def, clarify) + apply (clarsimp simp add: homeomorphism_def covering_space_def) apply (rule_tac x=T in exI, simp) apply (rule_tac x="{S}" in exI, auto) done @@ -1075,10 +1034,8 @@ obtains T u q where "x \ T" "openin (top_of_set c) T" "p x \ u" "openin (top_of_set S) u" "homeomorphism T u p q" -using assms -apply (simp add: covering_space_def, clarify) - apply (drule_tac x="p x" in bspec, force) - by (metis IntI UnionE vimage_eq) + using assms + by (clarsimp simp add: covering_space_def) (metis IntI UnionE vimage_eq) lemma covering_space_local_homeomorphism_alt: @@ -1091,8 +1048,7 @@ obtain x where "p x = y" "x \ c" using assms covering_space_imp_surjective by blast show ?thesis - apply (rule covering_space_local_homeomorphism [OF p \x \ c\]) - using that \p x = y\ by blast + using that \p x = y\ by (auto intro: covering_space_local_homeomorphism [OF p \x \ c\]) qed proposition covering_space_open_map: @@ -1120,7 +1076,6 @@ and homVS: "\V. V \ VS \ \q. homeomorphism V U p q" using covs [OF \y \ S\] by auto obtain x where "x \ c" "p x \ U" "x \ T" "p x = y" - apply simp using T [unfolded openin_euclidean_subtopology_iff] \y \ U\ \y \ p ` T\ by blast with VS obtain V where "x \ V" "V \ VS" by auto then obtain q where q: "homeomorphism V U p q" using homVS by blast @@ -1128,19 +1083,18 @@ using VS \V \ VS\ by (auto simp: homeomorphism_def) have ocv: "openin (top_of_set c) V" by (simp add: \V \ VS\ openVS) - have "openin (top_of_set U) (U \ q -` (T \ V))" - apply (rule continuous_on_open [THEN iffD1, rule_format]) - using homeomorphism_def q apply blast - using openin_subtopology_Int_subset [of c] q T unfolding homeomorphism_def - by (metis inf.absorb_iff2 Int_commute ocv openin_euclidean_subtopology_iff) + have "openin (top_of_set (q ` U)) (T \ V)" + using q unfolding homeomorphism_def + by (metis T inf.absorb_iff2 ocv openin_imp_subset openin_subtopology_Int subtopology_subtopology) + then have "openin (top_of_set U) (U \ q -` (T \ V))" + using continuous_on_open homeomorphism_def q by blast then have os: "openin (top_of_set S) (U \ q -` (T \ V))" using openin_trans [of U] by (simp add: Collect_conj_eq U) show ?thesis - apply (rule_tac x = "p ` (T \ V)" in exI) - apply (rule conjI) - apply (simp only: ptV os) - using \p x = y\ \x \ V\ \x \ T\ apply blast - done + proof (intro exI conjI) + show "openin (top_of_set S) (p ` (T \ V))" + by (simp only: ptV os) + qed (use \p x = y\ \x \ V\ \x \ T\ in auto) qed with openin_subopen show ?thesis by blast qed @@ -1169,11 +1123,12 @@ fix z assume z: "z \ U" "g1 z - g2 z = 0" obtain v w q where "g1 z \ v" and ocv: "openin (top_of_set c) v" - and "p (g1 z) \ w" and osw: "openin (top_of_set S) w" - and hom: "homeomorphism v w p q" - apply (rule_tac x = "g1 z" in covering_space_local_homeomorphism [OF cov]) - using \U \ T\ \z \ U\ g1(2) apply blast+ - done + and "p (g1 z) \ w" and osw: "openin (top_of_set S) w" + and hom: "homeomorphism v w p q" + proof (rule covering_space_local_homeomorphism [OF cov]) + show "g1 z \ c" + using \U \ T\ \z \ U\ g1(2) by blast + qed auto have "g2 z \ v" using \g1 z \ v\ z by auto have gg: "U \ g -` v = U \ g -` (v \ g ` U)" for g by auto @@ -1185,14 +1140,17 @@ using ocv \U \ T\ g2 by (fastforce simp add: openin_open) then have 2: "openin (top_of_set U) (U \ g2 -` v)" unfolding gg by (blast intro: contu continuous_on_open [THEN iffD1, rule_format]) + let ?T = "(U \ g1 -` v) \ (U \ g2 -` v)" show "\T. openin (top_of_set U) T \ z \ T \ T \ {z \ U. g1 z - g2 z = 0}" - using z - apply (rule_tac x = "(U \ g1 -` v) \ (U \ g2 -` v)" in exI) - apply (intro conjI) - apply (rule openin_Int [OF 1 2]) - using \g1 z \ v\ \g2 z \ v\ apply (force simp:, clarify) - apply (metis \U \ T\ subsetD eq_iff_diff_eq_0 fg1 fg2 hom homeomorphism_def) - done + proof (intro exI conjI) + show "openin (top_of_set U) ?T" + using "1" "2" by blast + show "z \ ?T" + using z by (simp add: \g1 z \ v\ \g2 z \ v\) + show "?T \ {z \ U. g1 z - g2 z = 0}" + using hom + by (clarsimp simp: homeomorphism_def) (metis \U \ T\ fg1 fg2 subsetD) + qed qed have c12: "closedin (top_of_set U) G12" unfolding G12_def @@ -1224,10 +1182,12 @@ shows "locally \ S" proof - have "locally \ (p ` C)" - apply (rule locally_open_map_image [OF loc]) - using cov covering_space_imp_continuous apply blast - using cov covering_space_imp_surjective covering_space_open_map apply blast - by (simp add: pim) + proof (rule locally_open_map_image [OF loc]) + show "continuous_on C p" + using cov covering_space_imp_continuous by blast + show "\T. openin (top_of_set C) T \ openin (top_of_set (p ` C)) (p ` T)" + using cov covering_space_imp_surjective covering_space_open_map by blast + qed (simp add: pim) then show ?thesis using covering_space_imp_surjective [OF cov] by metis qed @@ -1299,25 +1259,28 @@ fixes p :: "'a::real_normed_vector \ 'b::real_normed_vector" assumes "covering_space C p S" shows "locally compact S \ locally compact C" - apply (rule covering_space_locally_eq [OF assms]) - apply (meson assms compact_continuous_image continuous_on_subset covering_space_imp_continuous) - using compact_continuous_image by blast +proof (rule covering_space_locally_eq [OF assms]) + show "\T. \T \ C; compact T\ \ compact (p ` T)" + by (meson assms compact_continuous_image continuous_on_subset covering_space_imp_continuous) +qed (use compact_continuous_image in blast) lemma covering_space_locally_connected_eq: fixes p :: "'a::real_normed_vector \ 'b::real_normed_vector" assumes "covering_space C p S" shows "locally connected S \ locally connected C" - apply (rule covering_space_locally_eq [OF assms]) - apply (meson connected_continuous_image assms continuous_on_subset covering_space_imp_continuous) - using connected_continuous_image by blast +proof (rule covering_space_locally_eq [OF assms]) + show "\T. \T \ C; connected T\ \ connected (p ` T)" + by (meson connected_continuous_image assms continuous_on_subset covering_space_imp_continuous) +qed (use connected_continuous_image in blast) lemma covering_space_locally_path_connected_eq: fixes p :: "'a::real_normed_vector \ 'b::real_normed_vector" assumes "covering_space C p S" shows "locally path_connected S \ locally path_connected C" - apply (rule covering_space_locally_eq [OF assms]) - apply (meson path_connected_continuous_image assms continuous_on_subset covering_space_imp_continuous) - using path_connected_continuous_image by blast +proof (rule covering_space_locally_eq [OF assms]) + show "\T. \T \ C; path_connected T\ \ path_connected (p ` T)" + by (meson path_connected_continuous_image assms continuous_on_subset covering_space_imp_continuous) +qed (use path_connected_continuous_image in blast) lemma covering_space_locally_compact: @@ -1436,18 +1399,18 @@ case (Suc n) then obtain V k where opeUV: "openin (top_of_set U) V" and "y \ V" - and contk: "continuous_on ({0..real n / real N} \ V) k" - and kim: "k ` ({0..real n / real N} \ V) \ C" + and contk: "continuous_on ({0..n/N} \ V) k" + and kim: "k ` ({0..n/N} \ V) \ C" and keq: "\z. z \ V \ k (0, z) = f z" - and heq: "\z. z \ {0..real n / real N} \ V \ h z = p (k z)" + and heq: "\z. z \ {0..n/N} \ V \ h z = p (k z)" using Suc_leD by auto have "n \ N" using Suc.prems by auto - obtain t where "t \ tk" and t: "{real n / real N .. (1 + real n) / real N} \ K t" + obtain t where "t \ tk" and t: "{n/N .. (1 + real n) / N} \ K t" proof (rule bexE [OF \]) - show "{real n / real N .. (1 + real n) / real N} \ {0..1}" + show "{n/N .. (1 + real n) / N} \ {0..1}" using Suc.prems by (auto simp: field_split_simps) - show diameter_less: "diameter {real n / real N .. (1 + real n) / real N} < \" + show diameter_less: "diameter {n/N .. (1 + real n) / N} < \" using \0 < \\ N by (auto simp: field_split_simps) qed blast have t01: "t \ {0..1}" @@ -1457,28 +1420,26 @@ and "pairwise disjnt \" and homuu: "\U. U \ \ \ \q. homeomorphism U (UU (X t)) p q" using inUS [OF t01] UU by meson - have n_div_N_in: "real n / real N \ {real n / real N .. (1 + real n) / real N}" + have n_div_N_in: "n/N \ {n/N .. (1 + real n) / N}" using N by (auto simp: field_split_simps) - with t have nN_in_kkt: "real n / real N \ K t" + with t have nN_in_kkt: "n/N \ K t" by blast - have "k (real n / real N, y) \ C \ p -` UU (X t)" + have "k (n/N, y) \ C \ p -` UU (X t)" proof (simp, rule conjI) - show "k (real n / real N, y) \ C" + show "k (n/N, y) \ C" using \y \ V\ kim keq by force - have "p (k (real n / real N, y)) = h (real n / real N, y)" + have "p (k (n/N, y)) = h (n/N, y)" by (simp add: \y \ V\ heq) also have "... \ h ` (({0..1} \ K t) \ (U \ NN t))" - apply (rule imageI) using \y \ V\ t01 \n \ N\ - apply (simp add: nN_in_kkt \y \ U\ inUS field_split_simps) - done + by (simp add: nN_in_kkt \y \ U\ inUS field_split_simps) also have "... \ UU (X t)" using him t01 by blast - finally show "p (k (real n / real N, y)) \ UU (X t)" . + finally show "p (k (n/N, y)) \ UU (X t)" . qed - with \ have "k (real n / real N, y) \ \\" + with \ have "k (n/N, y) \ \\" by blast - then obtain W where W: "k (real n / real N, y) \ W" and "W \ \" + then obtain W where W: "k (n/N, y) \ W" and "W \ \" by blast then obtain p' where opeC': "openin (top_of_set C) W" and hom': "homeomorphism W (UU (X t)) p p'" @@ -1487,15 +1448,18 @@ using openin_imp_subset by blast define W' where "W' = UU(X t)" have opeVW: "openin (top_of_set V) (V \ (k \ Pair (n / N)) -` W)" - apply (rule continuous_openin_preimage [OF _ _ opeC']) - apply (intro continuous_intros continuous_on_subset [OF contk]) - using kim apply (auto simp: \y \ V\ W) - done + proof (rule continuous_openin_preimage [OF _ _ opeC']) + show "continuous_on V (k \ Pair (n/N))" + by (intro continuous_intros continuous_on_subset [OF contk], auto) + show "(k \ Pair (n/N)) ` V \ C" + using kim by (auto simp: \y \ V\ W) + qed obtain N' where opeUN': "openin (top_of_set U) N'" - and "y \ N'" and kimw: "k ` ({(real n / real N)} \ N') \ W" - apply (rule_tac N' = "(V \ (k \ Pair (n / N)) -` W)" in that) - apply (fastforce simp: \y \ V\ W intro!: openin_trans [OF opeVW opeUV])+ - done + and "y \ N'" and kimw: "k ` ({(n/N)} \ N') \ W" + proof + show "openin (top_of_set U) (V \ (k \ Pair (n/N)) -` W)" + using opeUV opeVW openin_trans by blast + qed (use \y \ V\ W in \force+\) obtain Q Q' where opeUQ: "openin (top_of_set U) Q" and cloUQ': "closedin (top_of_set U) Q'" and "y \ Q" "Q \ Q'" @@ -1517,68 +1481,78 @@ qed then have "y \ Q'" "Q \ (U \ NN(t)) \ N' \ V" by blast+ - have neq: "{0..real n / real N} \ {real n / real N..(1 + real n) / real N} = {0..(1 + real n) / real N}" + have neq: "{0..n/N} \ {n/N..(1 + real n) / N} = {0..(1 + real n) / N}" apply (auto simp: field_split_simps) by (metis mult_zero_left of_nat_0_le_iff of_nat_0_less_iff order_trans real_mult_le_cancel_iff1) - then have neqQ': "{0..real n / real N} \ Q' \ {real n / real N..(1 + real n) / real N} \ Q' = {0..(1 + real n) / real N} \ Q'" + then have neqQ': "{0..n/N} \ Q' \ {n/N..(1 + real n) / N} \ Q' = {0..(1 + real n) / N} \ Q'" by blast - have cont: "continuous_on ({0..(1 + real n) / real N} \ Q') - (\x. if x \ {0..real n / real N} \ Q' then k x else (p' \ h) x)" + have cont: "continuous_on ({0..(1 + real n) / N} \ Q') (\x. if x \ {0..n/N} \ Q' then k x else (p' \ h) x)" unfolding neqQ' [symmetric] proof (rule continuous_on_cases_local, simp_all add: neqQ' del: comp_apply) - show "closedin (top_of_set ({0..(1 + real n) / real N} \ Q')) - ({0..real n / real N} \ Q')" - apply (simp add: closedin_closed) - apply (rule_tac x="{0 .. real n / real N} \ UNIV" in exI) - using n_div_N_in apply (auto simp: closed_Times) - done - show "closedin (top_of_set ({0..(1 + real n) / real N} \ Q')) - ({real n / real N..(1 + real n) / real N} \ Q')" - apply (simp add: closedin_closed) - apply (rule_tac x="{real n / real N .. (1 + real n) / real N} \ UNIV" in exI) - apply (auto simp: closed_Times) - by (meson divide_nonneg_nonneg of_nat_0_le_iff order_trans) - show "continuous_on ({0..real n / real N} \ Q') k" - apply (rule continuous_on_subset [OF contk]) - using Q' by auto - have "continuous_on ({real n / real N..(1 + real n) / real N} \ Q') h" + have "\T. closed T \ {0..n/N} \ Q' = {0..(1+n)/N} \ Q' \ T" + using n_div_N_in + by (rule_tac x="{0 .. n/N} \ UNIV" in exI) (auto simp: closed_Times) + then show "closedin (top_of_set ({0..(1 + real n) / N} \ Q')) ({0..n/N} \ Q')" + by (simp add: closedin_closed) + have "\T. closed T \ {n/N..(1+n)/N} \ Q' = {0..(1+n)/N} \ Q' \ T" + by (rule_tac x="{n/N..(1+n)/N} \ UNIV" in exI) (auto simp: closed_Times order_trans [rotated]) + then show "closedin (top_of_set ({0..(1 + real n) / N} \ Q')) ({n/N..(1 + real n) / N} \ Q')" + by (simp add: closedin_closed) + show "continuous_on ({0..n/N} \ Q') k" + using Q' by (auto intro: continuous_on_subset [OF contk]) + have "continuous_on ({n/N..(1 + real n) / N} \ Q') h" proof (rule continuous_on_subset [OF conth]) - show "{real n / real N..(1 + real n) / real N} \ Q' \ {0..1} \ U" - using \N > 0\ - apply auto - apply (meson divide_nonneg_nonneg of_nat_0_le_iff order_trans) - using Suc.prems order_trans apply fastforce - apply (metis IntE cloUQ' closedin_closed) - done + show "{n/N..(1 + real n) / N} \ Q' \ {0..1} \ U" + proof (clarsimp, intro conjI) + fix a b + assume "b \ Q'" and a: "n/N \ a" "a \ (1 + real n) / N" + have "0 \ n/N" "(1 + real n) / N \ 1" + using a Suc.prems by (auto simp: divide_simps) + with a show "0 \ a" "a \ 1" + by linarith+ + show "b \ U" + using \b \ Q'\ cloUQ' closedin_imp_subset by blast + qed qed - moreover have "continuous_on (h ` ({real n / real N..(1 + real n) / real N} \ Q')) p'" + moreover have "continuous_on (h ` ({n/N..(1 + real n) / N} \ Q')) p'" proof (rule continuous_on_subset [OF homeomorphism_cont2 [OF hom']]) - have "h ` ({real n / real N..(1 + real n) / real N} \ Q') \ h ` (({0..1} \ K t) \ (U \ NN t))" - apply (rule image_mono) - using \0 < \\ \N > 0\ Suc.prems apply auto - apply (meson divide_nonneg_nonneg of_nat_0_le_iff order_trans) - using Suc.prems order_trans apply fastforce - using t Q' apply auto - done - with him show "h ` ({real n / real N..(1 + real n) / real N} \ Q') \ UU (X t)" + have "h ` ({n/N..(1 + real n) / N} \ Q') \ h ` (({0..1} \ K t) \ (U \ NN t))" + proof (rule image_mono) + show "{n/N..(1 + real n) / N} \ Q' \ ({0..1} \ K t) \ (U \ NN t)" + proof (clarsimp, intro conjI) + fix a::real and b + assume "b \ Q'" "n/N \ a" "a \ (1 + real n) / N" + show "0 \ a" + by (meson \n/N \ a\ divide_nonneg_nonneg of_nat_0_le_iff order_trans) + show "a \ 1" + using Suc.prems \a \ (1 + real n) / N\ order_trans by force + show "a \ K t" + using \a \ (1 + real n) / N\ \n/N \ a\ t by auto + show "b \ U" + using \b \ Q'\ cloUQ' closedin_imp_subset by blast + show "b \ NN t" + using Q' \b \ Q'\ by auto + qed + qed + with him show "h ` ({n/N..(1 + real n) / N} \ Q') \ UU (X t)" using t01 by blast qed - ultimately show "continuous_on ({real n / real N..(1 + real n) / real N} \ Q') (p' \ h)" + ultimately show "continuous_on ({n/N..(1 + real n) / N} \ Q') (p' \ h)" by (rule continuous_on_compose) - have "k (real n / real N, b) = p' (h (real n / real N, b))" if "b \ Q'" for b + have "k (n/N, b) = p' (h (n/N, b))" if "b \ Q'" for b proof - - have "k (real n / real N, b) \ W" + have "k (n/N, b) \ W" using that Q' kimw by force - then have "k (real n / real N, b) = p' (p (k (real n / real N, b)))" + then have "k (n/N, b) = p' (p (k (n/N, b)))" by (simp add: homeomorphism_apply1 [OF hom']) then show ?thesis using Q' that by (force simp: heq) qed - then show "\x. x \ {real n / real N..(1 + real n) / real N} \ Q' \ - x \ {0..real n / real N} \ Q' \ k x = (p' \ h) x" + then show "\x. x \ {n/N..(1 + real n) / N} \ Q' \ + x \ {0..n/N} \ Q' \ k x = (p' \ h) x" by auto qed - have h_in_UU: "h (x, y) \ UU (X t)" if "y \ Q" "\ x \ real n / real N" "0 \ x" "x \ (1 + real n) / real N" for x y + have h_in_UU: "h (x, y) \ UU (X t)" if "y \ Q" "\ x \ n/N" "0 \ x" "x \ (1 + real n) / N" for x y proof - have "x \ 1" using Suc.prems that order_trans by force @@ -1596,31 +1570,29 @@ by (metis him t01) finally show ?thesis . qed - let ?k = "(\x. if x \ {0..real n / real N} \ Q' then k x else (p' \ h) x)" + let ?k = "(\x. if x \ {0..n/N} \ Q' then k x else (p' \ h) x)" show ?case proof (intro exI conjI) - show "continuous_on ({0..real (Suc n) / real N} \ Q) ?k" - apply (rule continuous_on_subset [OF cont]) - using \Q \ Q'\ by auto - have "\a b. \a \ real n / real N; b \ Q'; 0 \ a\ \ k (a, b) \ C" + show "continuous_on ({0..real (Suc n) / N} \ Q) ?k" + using \Q \ Q'\ by (auto intro: continuous_on_subset [OF cont]) + have "\x y. \x \ n/N; y \ Q'; 0 \ x\ \ k (x, y) \ C" using kim Q' by force - moreover have "\a b. \b \ Q; 0 \ a; a \ (1 + real n) / real N; \ a \ real n / real N\ \ p' (h (a, b)) \ C" - apply (rule \W \ C\ [THEN subsetD]) - using homeomorphism_image2 [OF hom', symmetric] h_in_UU Q' \Q \ Q'\ \W \ C\ - apply auto - done - ultimately show "?k ` ({0..real (Suc n) / real N} \ Q) \ C" + moreover have "p' (h (x, y)) \ C" if "y \ Q" "\ x \ n/N" "0 \ x" "x \ (1 + real n) / N" for x y + proof (rule \W \ C\ [THEN subsetD]) + show "p' (h (x, y)) \ W" + using homeomorphism_image2 [OF hom', symmetric] h_in_UU Q' \Q \ Q'\ \W \ C\ that by auto + qed + ultimately show "?k ` ({0..real (Suc n) / N} \ Q) \ C" using Q' \Q \ Q'\ by force show "\z\Q. ?k (0, z) = f z" using Q' keq \Q \ Q'\ by auto - show "\z \ {0..real (Suc n) / real N} \ Q. h z = p(?k z)" - using \Q \ U \ NN t \ N' \ V\ heq apply clarsimp - using h_in_UU Q' \Q \ Q'\ apply (auto simp: homeomorphism_apply2 [OF hom', symmetric]) - done + show "\z \ {0..real (Suc n) / N} \ Q. h z = p(?k z)" + using \Q \ U \ NN t \ N' \ V\ heq Q' \Q \ Q'\ + by (auto simp: homeomorphism_apply2 [OF hom'] dest: h_in_UU) qed (auto simp: \y \ Q\ opeUQ) qed show ?thesis - using*[OF order_refl] N \0 < \\ by (simp add: split: if_split_asm) + using *[OF order_refl] N \0 < \\ by (simp add: split: if_split_asm) qed then obtain V fs where opeV: "\y. y \ U \ openin (top_of_set U) (V y)" and V: "\y. y \ U \ y \ V y" @@ -1641,9 +1613,7 @@ by (simp add: Abstract_Topology.openin_Times opeV) show "\i. i \ U \ continuous_map (subtopology (top_of_set ({0..1} \ U)) ({0..1} \ V i)) euclidean (fs i)" - using contfs - apply simp - by (metis continuous_map_iff_continuous continuous_on_subset openin_imp_subset openin_subtopology_self subtopology_subtopology) + by (metis contfs subtopology_subtopology continuous_map_iff_continuous Times_Int_Times VU inf.absorb_iff2 inf.idem) show "fs i x = fs j x" if "i \ U" "j \ U" and x: "x \ topspace ?X \ {0..1} \ V i \ {0..1} \ V j" for i j x proof - @@ -1654,8 +1624,7 @@ show "fs i (0, y) = fs j (0, y)" using*V by (simp add: \y \ V i\ \y \ V j\ that) show conth_y: "continuous_on ({0..1} \ {y}) h" - apply (rule continuous_on_subset [OF conth]) - using VU \y \ V j\ that by auto + using VU \y \ V j\ that by (auto intro: continuous_on_subset [OF conth]) show "h ` ({0..1} \ {y}) \ S" using \y \ V i\ assms(3) VU that by fastforce show "continuous_on ({0..1} \ {y}) (fs i)" @@ -1714,10 +1683,10 @@ apply (rule covering_space_lift_homotopy [OF cov _ _ _ contf fim]) using him by (auto simp: contf heq) show ?thesis - apply (rule_tac k="k \ (\z. Pair (snd z) (fst z))" in that) - apply (intro continuous_intros continuous_on_subset [OF contk]) - using kim heqp apply (auto simp: k0) - done + proof + show "continuous_on (U \ {0..1}) (k \ (\z. (snd z, fst z)))" + by (intro continuous_intros continuous_on_subset [OF contk]) auto + qed (use kim heqp in \auto simp: k0\) qed corollary covering_space_lift_homotopic_function: @@ -1769,10 +1738,10 @@ then have gim: "(\y. b) ` U \ C" by blast show ?thesis - apply (rule covering_space_lift_homotopic_function - [OF cov continuous_on_const gim _ homotopic_with_symD [OF hom]]) - using b that apply auto - done + proof (rule covering_space_lift_homotopic_function [OF cov continuous_on_const gim]) + show "\y. y \ U \ p b = a" + using b by auto + qed (use that homotopic_with_symD [OF hom] in auto) qed subsection\ Lifting of general functions to covering space\ @@ -1792,8 +1761,7 @@ and pk: "\z. z \ {0..1} \ {undefined} \ p(k z) = (g \ fst) z" proof (rule covering_space_lift_homotopy [OF cov, of "{undefined}" "g \ fst"]) show "continuous_on ({0..1::real} \ {undefined::'c}) (g \ fst)" - apply (intro continuous_intros) - using \path g\ by (simp add: path_def) + using \path g\ by (intro continuous_intros) (simp add: path_def) show "(g \ fst) ` ({0..1} \ {undefined}) \ S" using pag by (auto simp: path_image_def) show "(g \ fst) (0, y) = p a" if "y \ {undefined}" for y::'c @@ -1848,9 +1816,10 @@ and kim: "k ` ({0..1} \ {0..1}) \ C" and kh2: "\y. y \ {0..1} \ k (y, 0) = h2 0" and hpk: "\z. z \ {0..1} \ {0..1} \ h z = p (k z)" - apply (rule covering_space_lift_homotopy_alt [OF cov conth him, of "\x. h2 0"]) - using h1h2 ph1 ph2 apply (force simp: heq0 pathstart_def pathfinish_def) - using path_image_def pih2 by fastforce+ + proof (rule covering_space_lift_homotopy_alt [OF cov conth him]) + show "\y. y \ {0..1} \ h (y, 0) = p (h2 0)" + by (metis atLeastAtMost_iff h1h2 heq0 order_refl pathstart_def ph1 zero_le_one) + qed (use path_image_def pih2 in \fastforce+\) have contg1: "continuous_on {0..1} g1" and contg2: "continuous_on {0..1} g2" using \path g1\ \path g2\ path_def by blast+ have g1im: "g1 ` {0..1} \ S" and g2im: "g2 ` {0..1} \ S" @@ -1888,8 +1857,7 @@ show "(k \ Pair 0) 1 = h1 1" using keqh1 by auto show "continuous_on {0..1} (\a. (k \ Pair a) 1)" - apply simp - by (intro continuous_intros continuous_on_compose2 [OF contk]) auto + by (auto intro!: continuous_intros continuous_on_compose2 [OF contk]) show "\x. x \ {0..1} \ g1 1 = p ((k \ Pair x) 1)" using heq1 hpk by auto qed (use contk kim g1im h1im that in \auto simp: ph1\) @@ -1995,8 +1963,10 @@ show "q' 0 = (h \ (*\<^sub>R) 2) 0" by (metis \pathstart q' = pathstart q\ comp_def h(3) pastq pathstart_def pth_4(2)) show "continuous_on {0..1/2} (f \ g \ (*\<^sub>R) 2)" - apply (intro continuous_intros continuous_on_compose continuous_on_path [OF \path g\] continuous_on_subset [OF contf]) - using g(2) path_image_def by fastforce+ + proof (intro continuous_intros continuous_on_path [OF \path g\] continuous_on_subset [OF contf]) + show "g ` (*\<^sub>R) 2 ` {0..1/2} \ U" + using g path_image_def by fastforce + qed auto show "(f \ g \ (*\<^sub>R) 2) ` {0..1/2} \ S" using g(2) path_image_def fim by fastforce show "(h \ (*\<^sub>R) 2) ` {0..1/2} \ C" @@ -2010,8 +1980,7 @@ show "continuous_on {0..1/2} q'" by (simp add: continuous_on_path \path q'\) show "continuous_on {0..1/2} (h \ (*\<^sub>R) 2)" - apply (intro continuous_intros continuous_on_compose continuous_on_path [OF \path h\], force) - done + by (intro continuous_intros continuous_on_path [OF \path h\]) auto qed (use that in auto) moreover have "q' t = (reversepath h' \ (\t. 2 *\<^sub>R t - 1)) t" if "1/2 < t" "t \ 1" for t proof (rule covering_space_lift_unique [OF cov, of q' 1 "reversepath h' \ (\t. 2 *\<^sub>R t - 1)" "{1/2<..1}" "f \ reversepath g' \ (\t. 2 *\<^sub>R t - 1)" t]) @@ -2019,9 +1988,10 @@ using h' \pathfinish q' = pathfinish q\ pafiq by (simp add: pathstart_def pathfinish_def reversepath_def) show "continuous_on {1/2<..1} (f \ reversepath g' \ (\t. 2 *\<^sub>R t - 1))" - apply (intro continuous_intros continuous_on_compose continuous_on_path \path g'\ continuous_on_subset [OF contf]) - using g' apply simp_all - by (auto simp: path_image_def reversepath_def) + proof (intro continuous_intros continuous_on_path \path g'\ continuous_on_subset [OF contf]) + show "reversepath g' ` (\t. 2 *\<^sub>R t - 1) ` {1/2<..1} \ U" + using g' by (auto simp: path_image_def reversepath_def) + qed (use g' in auto) show "(f \ reversepath g' \ (\t. 2 *\<^sub>R t - 1)) ` {1/2<..1} \ S" using g'(2) path_image_def fim by (auto simp: image_subset_iff path_image_def reversepath_def) show "q' ` {1/2<..1} \ C" @@ -2036,9 +2006,7 @@ show "continuous_on {1/2<..1} q'" by (auto intro: continuous_on_path [OF \path q'\]) show "continuous_on {1/2<..1} (reversepath h' \ (\t. 2 *\<^sub>R t - 1))" - apply (intro continuous_intros continuous_on_compose continuous_on_path \path h'\) - using h' apply auto - done + by (intro continuous_intros continuous_on_path \path h'\) (use h' in auto) qed (use that in auto) ultimately have "q' t = (h +++ reversepath h') t" if "0 \ t" "t \ 1" for t using that by (simp add: joinpaths_def) @@ -2090,13 +2058,10 @@ proof - have "openin (top_of_set U) (U \ f -` W)" using WV contf continuous_on_open_gen fim by auto + then obtain UO where "openin (top_of_set U) UO \ path_connected UO \ y \ UO \ UO \ U \ f -` W" + using U WV \y \ U\ unfolding locally_path_connected by (meson IntI vimage_eq) then show ?thesis - using U WV - apply (auto simp: locally_path_connected) - apply (drule_tac x="U \ f -` W" in spec) - apply (drule_tac x=y in spec) - apply (auto simp: \y \ U\ intro: that) - done + by (meson \y \ U\ image_subset_iff_subset_vimage le_inf_iff that) qed have "W' \ C" "W \ S" using opeCW' WV openin_imp_subset by auto @@ -2107,9 +2072,7 @@ have "openin (top_of_set S) (W \ p' -` (W' \ X))" proof (rule openin_trans) show "openin (top_of_set W) (W \ p' -` (W' \ X))" - apply (rule continuous_openin_preimage [OF contp' p'im]) - using X \W' \ C\ apply (auto simp: openin_open) - done + using X \W' \ C\ by (intro continuous_openin_preimage [OF contp' p'im]) (auto simp: openin_open) show "openin (top_of_set S) W" using WV by blast qed @@ -2125,9 +2088,8 @@ assume y': "y' \ V" "y' \ U" "f y' \ W" "p' (f y') \ W'" "p' (f y') \ X" then obtain \ where "path \" "path_image \ \ V" "pathstart \ = y" "pathfinish \ = y'" by (meson \path_connected V\ \y \ V\ path_connected_def) - obtain pp qq where "path pp" "path_image pp \ U" - "pathstart pp = z" "pathfinish pp = y" - "path qq" "path_image qq \ C" "pathstart qq = a" + obtain pp qq where pp: "path pp" "path_image pp \ U" "pathstart pp = z" "pathfinish pp = y" + and qq: "path qq" "path_image qq \ C" "pathstart qq = a" and pqqeq: "\t. t \ {0..1} \ p(qq t) = f(pp t)" using*[OF \y \ U\] by blast have finW: "\x. \0 \ x; x \ 1\ \ f (\ x) \ W" @@ -2142,27 +2104,32 @@ by (simp add: \pathstart pp = z\) show "pathfinish (pp +++ \) = y'" by (simp add: \pathfinish \ = y'\) - have paqq: "pathfinish qq = pathstart (p' \ f \ \)" - apply (simp add: \pathstart \ = y\ pathstart_compose) - apply (metis (mono_tags, lifting) \l y \ W'\ \path pp\ \path qq\ \path_image pp \ U\ \path_image qq \ C\ - \pathfinish pp = y\ \pathstart pp = z\ \pathstart qq = a\ - homeomorphism_apply1 [OF homUW'] l pleq pqqeq \y \ U\) - done + have "pathfinish qq = l y" + using \path pp\ \path qq\ \path_image pp \ U\ \path_image qq \ C\ \pathfinish pp = y\ \pathstart pp = z\ \pathstart qq = a\ l pqqeq by blast + also have "... = p' (f y)" + using \l y \ W'\ homUW' homeomorphism_apply1 pleq that(2) by fastforce + finally have "pathfinish qq = p' (f y)" . + then have paqq: "pathfinish qq = pathstart (p' \ f \ \)" + by (simp add: \pathstart \ = y\ pathstart_compose) have "continuous_on (path_image \) (p' \ f)" proof (rule continuous_on_compose) show "continuous_on (path_image \) f" using \path_image \ \ V\ \V \ U\ contf continuous_on_subset by blast show "continuous_on (f ` path_image \) p'" - apply (rule continuous_on_subset [OF contp']) - apply (auto simp: path_image_def pathfinish_def pathstart_def finW) - done + proof (rule continuous_on_subset [OF contp']) + show "f ` path_image \ \ W" + by (auto simp: path_image_def pathfinish_def pathstart_def finW) + qed qed then show "path (qq +++ (p' \ f \ \))" using \path \\ \path qq\ paqq path_continuous_image path_join_imp by blast show "path_image (qq +++ (p' \ f \ \)) \ C" - apply (rule subset_path_image_join) - apply (simp add: \path_image qq \ C\) - by (metis \W' \ C\ \path_image \ \ V\ dual_order.trans fimW(1) image_comp image_mono p'im path_image_compose) + proof (rule subset_path_image_join) + show "path_image qq \ C" + by (simp add: \path_image qq \ C\) + show "path_image (p' \ f \ \) \ C" + by (metis \W' \ C\ \path_image \ \ V\ dual_order.trans fimW(1) image_comp image_mono p'im path_image_compose) + qed show "pathstart (qq +++ (p' \ f \ \)) = a" by (simp add: \pathstart qq = a\) show "p ((qq +++ (p' \ f \ \)) \) = f ((pp +++ \) \)" if \: "\ \ {0..1}" for \ @@ -2170,8 +2137,7 @@ show "p (qq (2*\)) = f (pp (2*\))" if "\*2 \ 1" using \\ \ {0..1}\ pqqeq that by auto show "p (p' (f (\ (2*\ - 1)))) = f (\ (2*\ - 1))" if "\ \*2 \ 1" - apply (rule homeomorphism_apply2 [OF homUW' finW]) - using that \ by auto + using that \ by (auto intro: homeomorphism_apply2 [OF homUW' finW]) qed qed with \pathfinish \ = y'\ \p' (f y') \ X\ show "y' \ l -` X"