diff -r 91da58bb560d -r c2128ab11f61 src/HOL/Analysis/Further_Topology.thy --- a/src/HOL/Analysis/Further_Topology.thy Tue Oct 17 13:56:58 2017 +0200 +++ b/src/HOL/Analysis/Further_Topology.thy Thu Oct 19 17:16:01 2017 +0100 @@ -2318,9 +2318,9 @@ proof (clarsimp simp add: continuous_openin_preimage_eq) fix T :: "'a set" assume "open T" - have eq: "{x. x \ f ` S \ g x \ T} = f ` (S \ T)" + have eq: "f ` S \ g -` T = f ` (S \ T)" by (auto simp: gf) - show "openin (subtopology euclidean (f ` S)) {x \ f ` S. g x \ T}" + show "openin (subtopology euclidean (f ` S)) (f ` S \ g -` T)" apply (subst eq) apply (rule open_openin_trans) apply (rule invariance_of_domain_gen) @@ -3173,7 +3173,7 @@ have zn2: "(\z::complex. z^n) ` (- {0}) = - {0}" using assms by (auto simp: image_def elim: exists_complex_root_nonzero [where n = n]) have zn3: "\T. z^n \ T \ open T \ 0 \ T \ - (\v. \v = {x. x \ 0 \ x^n \ T} \ + (\v. \v = -{0} \ (\z. z ^ n) -` T \ (\u\v. open u \ 0 \ u) \ pairwise disjnt v \ (\u\v. Ex (homeomorphism u T (\z. z^n))))" @@ -3216,8 +3216,6 @@ by (intro continuous_intros) have noncon: "\ (\w::complex. w^n) constant_on UNIV" by (metis UNIV_I assms constant_on_def power_one zero_neq_one zero_power) - have open_imball: "open ((\w. w^n) ` ball z d)" - by (rule invariance_of_domain [OF cont open_ball inj]) have im_eq: "(\w. w^n) ` ball z' d = (\w. w^n) ` ball z d" if z': "z'^n = z^n" for z' proof - @@ -3262,6 +3260,7 @@ qed then show ?thesis by blast qed + have ex_ball: "\B. (\z'. B = ball z' d \ z'^n = z^n) \ x \ B" if "x \ 0" and eq: "x^n = w^n" and dzw: "dist z w < d" for x w proof - @@ -3286,50 +3285,63 @@ apply (simp add: dist_norm) done qed - have ball1: "\{ball z' d |z'. z'^n = z^n} = {x. x \ 0 \ x^n \ (\w. w^n) ` ball z d}" - apply (rule equalityI) - prefer 2 apply (force simp: ex_ball, clarsimp) - apply (subst im_eq [symmetric], assumption) - using assms - apply (force simp: dist_norm d_def min_mult_distrib_right dest: power_eq_imp_eq_norm) - done - have ball2: "pairwise disjnt {ball z' d |z'. z'^n = z^n}" - proof (clarsimp simp add: pairwise_def disjnt_iff) - fix \ \ x - assume "\^n = z^n" "\^n = z^n" "ball \ d \ ball \ d" - and "dist \ x < d" "dist \ x < d" - then have "dist \ \ < d+d" - using dist_triangle_less_add by blast - then have "cmod (\ - \) < 2*d" - by (simp add: dist_norm) - also have "... \ e * cmod z" - using mult_right_mono \0 < e\ that by (auto simp: d_def) - finally have "cmod (\ - \) < e * cmod z" . - with e have "\ = \" - by (metis \\^n = z^n\ \\^n = z^n\ assms power_eq_imp_eq_norm) - then show "False" - using \ball \ d \ ball \ d\ by blast + + show ?thesis + proof (rule exI, intro conjI) + show "z ^ n \ (\w. w ^ n) ` ball z d" + using \d > 0\ by simp + show "open ((\w. w ^ n) ` ball z d)" + by (rule invariance_of_domain [OF cont open_ball inj]) + show "0 \ (\w. w ^ n) ` ball z d" + using \z \ 0\ assms by (force simp: d_def) + show "\v. \v = - {0} \ (\z. z ^ n) -` (\w. w ^ n) ` ball z d \ + (\u\v. open u \ 0 \ u) \ + disjoint v \ + (\u\v. Ex (homeomorphism u ((\w. w ^ n) ` ball z d) (\z. z ^ n)))" + proof (rule exI, intro ballI conjI) + show "\{ball z' d |z'. z'^n = z^n} = - {0} \ (\z. z ^ n) -` (\w. w ^ n) ` ball z d" (is "?l = ?r") + proof + show "?l \ ?r" + apply auto + apply (simp add: assms d_def power_eq_imp_eq_norm that) + by (metis im_eq image_eqI mem_ball) + show "?r \ ?l" + by auto (meson ex_ball) + qed + show "\u. u \ {ball z' d |z'. z' ^ n = z ^ n} \ 0 \ u" + by (force simp add: assms d_def power_eq_imp_eq_norm that) + + show "disjoint {ball z' d |z'. z' ^ n = z ^ n}" + proof (clarsimp simp add: pairwise_def disjnt_iff) + fix \ \ x + assume "\^n = z^n" "\^n = z^n" "ball \ d \ ball \ d" + and "dist \ x < d" "dist \ x < d" + then have "dist \ \ < d+d" + using dist_triangle_less_add by blast + then have "cmod (\ - \) < 2*d" + by (simp add: dist_norm) + also have "... \ e * cmod z" + using mult_right_mono \0 < e\ that by (auto simp: d_def) + finally have "cmod (\ - \) < e * cmod z" . + with e have "\ = \" + by (metis \\^n = z^n\ \\^n = z^n\ assms power_eq_imp_eq_norm) + then show "False" + using \ball \ d \ ball \ d\ by blast + qed + show "Ex (homeomorphism u ((\w. w ^ n) ` ball z d) (\z. z ^ n))" + if "u \ {ball z' d |z'. z' ^ n = z ^ n}" for u + proof (rule invariance_of_domain_homeomorphism [of "u" "\z. z^n"]) + show "open u" + using that by auto + show "continuous_on u (\z. z ^ n)" + by (intro continuous_intros) + show "inj_on (\z. z ^ n) u" + using that by (auto simp: iff_x_eq_y inj_on_def) + show "\g. homeomorphism u ((\z. z ^ n) ` u) (\z. z ^ n) g \ Ex (homeomorphism u ((\w. w ^ n) ` ball z d) (\z. z ^ n))" + using im_eq that by clarify metis + qed auto + qed auto qed - have ball3: "Ex (homeomorphism (ball z' d) ((\w. w^n) ` ball z d) (\z. z^n))" - if zeq: "z'^n = z^n" for z' - proof - - have inj: "inj_on (\z. z ^ n) (ball z' d)" - by (meson iff_x_eq_y inj_onI zeq) - show ?thesis - apply (rule invariance_of_domain_homeomorphism [of "ball z' d" "\z. z^n"]) - apply (rule open_ball continuous_intros order_refl inj)+ - apply (force simp: im_eq [OF zeq]) - done - qed - show ?thesis - apply (rule_tac x = "(\w. w^n) ` (ball z d)" in exI) - apply (intro conjI open_imball) - using \d > 0\ apply simp - using \z \ 0\ assms apply (force simp: d_def) - apply (rule_tac x="{ ball z' d |z'. z'^n = z^n}" in exI) - apply (intro conjI ball1 ball2) - apply (force simp: assms d_def power_eq_imp_eq_norm that, clarify) - by (metis ball3) qed show ?thesis using assms @@ -3353,7 +3365,7 @@ show "range exp = - {0::complex}" by auto (metis exp_Ln range_eqI) show "\T. z \ T \ openin (subtopology euclidean (- {0})) T \ - (\v. \v = {z. exp z \ T} \ (\u\v. open u) \ disjoint v \ + (\v. \v = exp -` T \ (\u\v. open u) \ disjoint v \ (\u\v. \q. homeomorphism u T exp q))" if "z \ - {0::complex}" for z proof - @@ -3374,8 +3386,8 @@ using pi_ge_two by (simp add: ball_subset_ball_iff) ultimately show "openin (subtopology euclidean (- {0})) (exp ` ball (Ln z) 1)" by (auto simp: openin_open_eq invariance_of_domain continuous_on_exp [OF continuous_on_id]) - show "\\ = {w. exp w \ exp ` ball (Ln z) 1}" - by (auto simp: \_def Complex_Transcendental.exp_eq image_iff) + show "\\ = exp -` exp ` ball (Ln z) 1" + by (force simp: \_def Complex_Transcendental.exp_eq image_iff) show "\V\\. open V" by (auto simp: \_def inj_on_def continuous_intros invariance_of_domain) have xy: "2 \ cmod (2 * of_int x * of_real pi * \ - 2 * of_int y * of_real pi * \)" @@ -4314,7 +4326,7 @@ qed next case False - obtain a where a: "\x. x \ S \ T \ g x - h x = a" + have "(\x. g x - h x) constant_on S \ T" proof (rule continuous_discrete_range_constant [OF ST]) show "continuous_on (S \ T) (\x. g x - h x)" apply (intro continuous_intros) @@ -4338,7 +4350,9 @@ then show ?thesis by (rule_tac x="2*pi" in exI) (fastforce simp add: algebra_simps) qed - qed blast + qed + then obtain a where a: "\x. x \ S \ T \ g x - h x = a" + by (auto simp: constant_on_def) with False have "exp a = 1" by (metis IntI disjoint_iff_not_equal divide_self_if exp_diff exp_not_eq_zero fg fh) with a show ?thesis @@ -4382,7 +4396,7 @@ qed next case False - obtain a where a: "\x. x \ S \ T \ g x - h x = a" + have "(\x. g x - h x) constant_on S \ T" proof (rule continuous_discrete_range_constant [OF ST]) show "continuous_on (S \ T) (\x. g x - h x)" apply (intro continuous_intros) @@ -4406,7 +4420,9 @@ then show ?thesis by (rule_tac x="2*pi" in exI) (fastforce simp add: algebra_simps) qed - qed blast + qed + then obtain a where a: "\x. x \ S \ T \ g x - h x = a" + by (auto simp: constant_on_def) with False have "exp a = 1" by (metis IntI disjoint_iff_not_equal divide_self_if exp_diff exp_not_eq_zero fg fh) with a show ?thesis @@ -4441,7 +4457,7 @@ using fim by auto then obtain f' where f': "\y. y \ T \ f' y \ S \ f (f' y) = y" by metis - have *: "\a. \x \ {x. x \ S \ f x = y}. h x - h(f' y) = a" if "y \ T" for y + have *: "(\x. h x - h(f' y)) constant_on {x. x \ S \ f x = y}" if "y \ T" for y proof (rule continuous_discrete_range_constant [OF conn [OF that], of "\x. h x - h (f' y)"], simp_all add: algebra_simps) show "continuous_on {x \ S. f x = y} (\x. h x - h (f' y))" by (intro continuous_intros continuous_on_subset [OF conth]) auto @@ -4462,13 +4478,12 @@ qed qed have "h x = h (f' (f x))" if "x \ S" for x - using * [of "f x"] fim that apply clarsimp - by (metis f' imageI right_minus_eq) + using * [of "f x"] fim that unfolding constant_on_def by clarsimp (metis f' imageI right_minus_eq) moreover have "\x. x \ T \ \u. u \ S \ x = f u \ h (f' x) = h u" using f' by fastforce ultimately have eq: "((\x. (x, (h \ f') x)) ` T) = - {p. \x. x \ S \ (x, p) \ {z \ S \ UNIV. snd z - ((f \ fst) z, (h \ fst) z) \ {0}}}" + {p. \x. x \ S \ (x, p) \ (S \ UNIV) \ ((\z. snd z - ((f \ fst) z, (h \ fst) z)) -` {0})}" using fim by (auto simp: image_iff) show "\h. continuous_on T h \ (\x\T. g x = exp (h x))" proof (intro exI conjI) @@ -4513,9 +4528,10 @@ proof (rule compact_continuous_image) show "continuous_on {x \ S. f x = y} h" by (rule continuous_on_subset [OF conth]) auto - have "compact {x \ S. f x \ {y}}" + have "compact (S \ f -` {y})" by (rule proper_map_from_compact [OF contf _ \compact S\, of T]) (simp_all add: fim that) - then show "compact {x \ S. f x = y}" by simp + then show "compact {x \ S. f x = y}" + by (auto simp: vimage_def Int_def) qed have 2: "h ` {x \ S. f x = y} \ {}" using fim that by auto