# HG changeset patch # User paulson # Date 1476802553 -3600 # Node ID d85d887227457b048c4211df41c9aa73ee2698c9 # Parent f3b905b2eee23cf28da3892204f444f378b071a7 more from moretop.ml diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Analysis/Bochner_Integration.thy --- a/src/HOL/Analysis/Bochner_Integration.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Analysis/Bochner_Integration.thy Tue Oct 18 15:55:53 2016 +0100 @@ -1157,7 +1157,7 @@ let ?s = "\n. simple_bochner_integral M (s n)" have "\x. ?s \ x" - unfolding convergent_eq_cauchy + unfolding convergent_eq_Cauchy proof (rule metric_CauchyI) fix e :: real assume "0 < e" then have "0 < ennreal (e / 2)" by auto diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Analysis/Borel_Space.thy --- a/src/HOL/Analysis/Borel_Space.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Analysis/Borel_Space.thy Tue Oct 18 15:55:53 2016 +0100 @@ -1797,13 +1797,13 @@ proof - define u' where "u' x = lim (\i. if Cauchy (\i. f i x) then f i x else 0)" for x then have *: "\x. lim (\i. f i x) = (if Cauchy (\i. f i x) then u' x else (THE x. False))" - by (auto simp: lim_def convergent_eq_cauchy[symmetric]) + by (auto simp: lim_def convergent_eq_Cauchy[symmetric]) have "u' \ borel_measurable M" proof (rule borel_measurable_LIMSEQ_metric) fix x have "convergent (\i. if Cauchy (\i. f i x) then f i x else 0)" by (cases "Cauchy (\i. f i x)") - (auto simp add: convergent_eq_cauchy[symmetric] convergent_def) + (auto simp add: convergent_eq_Cauchy[symmetric] convergent_def) then show "(\i. if Cauchy (\i. f i x) then f i x else 0) \ u' x" unfolding u'_def by (rule convergent_LIMSEQ_iff[THEN iffD1]) diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Analysis/Complex_Transcendental.thy --- a/src/HOL/Analysis/Complex_Transcendental.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Analysis/Complex_Transcendental.thy Tue Oct 18 15:55:53 2016 +0100 @@ -236,6 +236,23 @@ finally show ?thesis . qed +lemma exp_plus_2pin [simp]: "exp (z + \ * (of_int n * (of_real pi * 2))) = exp z" + by (simp add: exp_eq) + +lemma inj_on_exp_pi: + fixes z::complex shows "inj_on exp (ball z pi)" +proof (clarsimp simp: inj_on_def exp_eq) + fix y n + assume "dist z (y + 2 * of_int n * of_real pi * \) < pi" + "dist z y < pi" + then have "dist y (y + 2 * of_int n * of_real pi * \) < pi+pi" + using dist_commute_lessI dist_triangle_less_add by blast + then have "norm (2 * of_int n * of_real pi * \) < 2*pi" + by (simp add: dist_norm) + then show "n = 0" + by (auto simp: norm_mult) +qed + lemma sin_cos_eq_iff: "sin y = sin x \ cos y = cos x \ (\n::int. y = x + 2 * n * pi)" proof - { assume "sin y = sin x" "cos y = cos x" diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Analysis/Convex_Euclidean_Space.thy --- a/src/HOL/Analysis/Convex_Euclidean_Space.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Analysis/Convex_Euclidean_Space.thy Tue Oct 18 15:55:53 2016 +0100 @@ -4378,6 +4378,15 @@ definition "rel_interior S = {x. \T. openin (subtopology euclidean (affine hull S)) T \ x \ T \ T \ S}" +lemma rel_interior_mono: + "\S \ T; affine hull S = affine hull T\ + \ (rel_interior S) \ (rel_interior T)" + by (auto simp: rel_interior_def) + +lemma rel_interior_maximal: + "\T \ S; openin(subtopology euclidean (affine hull S)) T\ \ T \ (rel_interior S)" + by (auto simp: rel_interior_def) + lemma rel_interior: "rel_interior S = {x \ S. \T. open T \ x \ T \ T \ affine hull S \ S}" unfolding rel_interior_def[of S] openin_open[of "affine hull S"] diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Analysis/Derivative.thy --- a/src/HOL/Analysis/Derivative.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Analysis/Derivative.thy Tue Oct 18 15:55:53 2016 +0100 @@ -1922,7 +1922,7 @@ using assms(1,2,3) by (rule has_derivative_sequence_lipschitz) have "\g. \x\s. ((\n. f n x) \ g x) sequentially" apply (rule bchoice) - unfolding convergent_eq_cauchy + unfolding convergent_eq_Cauchy proof fix x assume "x \ s" diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Analysis/FurtherTopology.thy --- a/src/HOL/Analysis/FurtherTopology.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Analysis/FurtherTopology.thy Tue Oct 18 15:55:53 2016 +0100 @@ -3,7 +3,7 @@ text\Ported from HOL Light (moretop.ml) by L C Paulson\ theory "FurtherTopology" - imports Equivalence_Lebesgue_Henstock_Integration Weierstrass_Theorems Polytope + imports Equivalence_Lebesgue_Henstock_Integration Weierstrass_Theorems Polytope Complex_Transcendental begin @@ -2352,4 +2352,747 @@ using invariance_of_domain_homeomorphism [OF assms] by (meson homeomorphic_def) +lemma continuous_image_subset_interior: + fixes f :: "'a::euclidean_space \ 'b::euclidean_space" + assumes "continuous_on S f" "inj_on f S" "DIM('b) \ DIM('a)" + shows "f ` (interior S) \ interior(f ` S)" + apply (rule interior_maximal) + apply (simp add: image_mono interior_subset) + apply (rule invariance_of_domain_gen) + using assms + apply (auto simp: subset_inj_on interior_subset continuous_on_subset) + done + +lemma homeomorphic_interiors_same_dimension: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" and dimeq: "DIM('a) = DIM('b)" + shows "(interior S) homeomorphic (interior T)" + using assms [unfolded homeomorphic_minimal] + unfolding homeomorphic_def +proof (clarify elim!: ex_forward) + fix f g + assume S: "\x\S. f x \ T \ g (f x) = x" and T: "\y\T. g y \ S \ f (g y) = y" + and contf: "continuous_on S f" and contg: "continuous_on T g" + then have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T" + by (auto simp: inj_on_def intro: rev_image_eqI) metis+ + have fim: "f ` interior S \ interior T" + using continuous_image_subset_interior [OF contf \inj_on f S\] dimeq fST by simp + have gim: "g ` interior T \ interior S" + using continuous_image_subset_interior [OF contg \inj_on g T\] dimeq gTS by simp + show "homeomorphism (interior S) (interior T) f g" + unfolding homeomorphism_def + proof (intro conjI ballI) + show "\x. x \ interior S \ g (f x) = x" + by (meson \\x\S. f x \ T \ g (f x) = x\ subsetD interior_subset) + have "interior T \ f ` interior S" + proof + fix x assume "x \ interior T" + then have "g x \ interior S" + using gim by blast + then show "x \ f ` interior S" + by (metis T \x \ interior T\ image_iff interior_subset subsetCE) + qed + then show "f ` interior S = interior T" + using fim by blast + show "continuous_on (interior S) f" + by (metis interior_subset continuous_on_subset contf) + show "\y. y \ interior T \ f (g y) = y" + by (meson T subsetD interior_subset) + have "interior S \ g ` interior T" + proof + fix x assume "x \ interior S" + then have "f x \ interior T" + using fim by blast + then show "x \ g ` interior T" + by (metis S \x \ interior S\ image_iff interior_subset subsetCE) + qed + then show "g ` interior T = interior S" + using gim by blast + show "continuous_on (interior T) g" + by (metis interior_subset continuous_on_subset contg) + qed +qed + +lemma homeomorphic_open_imp_same_dimension: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" "open S" "S \ {}" "open T" "T \ {}" + shows "DIM('a) = DIM('b)" + using assms + apply (simp add: homeomorphic_minimal) + apply (rule order_antisym; metis inj_onI invariance_of_dimension) + done + +lemma homeomorphic_interiors: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" "interior S = {} \ interior T = {}" + shows "(interior S) homeomorphic (interior T)" +proof (cases "interior T = {}") + case True + with assms show ?thesis by auto +next + case False + then have "DIM('a) = DIM('b)" + using assms + apply (simp add: homeomorphic_minimal) + apply (rule order_antisym; metis continuous_on_subset inj_onI inj_on_subset interior_subset invariance_of_dimension open_interior) + done + then show ?thesis + by (rule homeomorphic_interiors_same_dimension [OF \S homeomorphic T\]) +qed + +lemma homeomorphic_frontiers_same_dimension: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" "closed S" "closed T" and dimeq: "DIM('a) = DIM('b)" + shows "(frontier S) homeomorphic (frontier T)" + using assms [unfolded homeomorphic_minimal] + unfolding homeomorphic_def +proof (clarify elim!: ex_forward) + fix f g + assume S: "\x\S. f x \ T \ g (f x) = x" and T: "\y\T. g y \ S \ f (g y) = y" + and contf: "continuous_on S f" and contg: "continuous_on T g" + then have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T" + by (auto simp: inj_on_def intro: rev_image_eqI) metis+ + have "g ` interior T \ interior S" + using continuous_image_subset_interior [OF contg \inj_on g T\] dimeq gTS by simp + then have fim: "f ` frontier S \ frontier T" + apply (simp add: frontier_def) + using continuous_image_subset_interior assms(2) assms(3) S by auto + have "f ` interior S \ interior T" + using continuous_image_subset_interior [OF contf \inj_on f S\] dimeq fST by simp + then have gim: "g ` frontier T \ frontier S" + apply (simp add: frontier_def) + using continuous_image_subset_interior T assms(2) assms(3) by auto + show "homeomorphism (frontier S) (frontier T) f g" + unfolding homeomorphism_def + proof (intro conjI ballI) + show gf: "\x. x \ frontier S \ g (f x) = x" + by (simp add: S assms(2) frontier_def) + show fg: "\y. y \ frontier T \ f (g y) = y" + by (simp add: T assms(3) frontier_def) + have "frontier T \ f ` frontier S" + proof + fix x assume "x \ frontier T" + then have "g x \ frontier S" + using gim by blast + then show "x \ f ` frontier S" + by (metis fg \x \ frontier T\ imageI) + qed + then show "f ` frontier S = frontier T" + using fim by blast + show "continuous_on (frontier S) f" + by (metis Diff_subset assms(2) closure_eq contf continuous_on_subset frontier_def) + have "frontier S \ g ` frontier T" + proof + fix x assume "x \ frontier S" + then have "f x \ frontier T" + using fim by blast + then show "x \ g ` frontier T" + by (metis gf \x \ frontier S\ imageI) + qed + then show "g ` frontier T = frontier S" + using gim by blast + show "continuous_on (frontier T) g" + by (metis Diff_subset assms(3) closure_closed contg continuous_on_subset frontier_def) + qed +qed + +lemma homeomorphic_frontiers: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" "closed S" "closed T" + "interior S = {} \ interior T = {}" + shows "(frontier S) homeomorphic (frontier T)" +proof (cases "interior T = {}") + case True + then show ?thesis + by (metis Diff_empty assms closure_eq frontier_def) +next + case False + show ?thesis + apply (rule homeomorphic_frontiers_same_dimension) + apply (simp_all add: assms) + using False assms homeomorphic_interiors homeomorphic_open_imp_same_dimension by blast +qed + +lemma continuous_image_subset_rel_interior: + fixes f :: "'a::euclidean_space \ 'b::euclidean_space" + assumes contf: "continuous_on S f" and injf: "inj_on f S" and fim: "f ` S \ T" + and TS: "aff_dim T \ aff_dim S" + shows "f ` (rel_interior S) \ rel_interior(f ` S)" +proof (rule rel_interior_maximal) + show "f ` rel_interior S \ f ` S" + by(simp add: image_mono rel_interior_subset) + show "openin (subtopology euclidean (affine hull f ` S)) (f ` rel_interior S)" + proof (rule invariance_of_domain_affine_sets) + show "openin (subtopology euclidean (affine hull S)) (rel_interior S)" + by (simp add: openin_rel_interior) + show "aff_dim (affine hull f ` S) \ aff_dim (affine hull S)" + by (metis aff_dim_affine_hull aff_dim_subset fim TS order_trans) + show "f ` rel_interior S \ affine hull f ` S" + by (meson \f ` rel_interior S \ f ` S\ hull_subset order_trans) + show "continuous_on (rel_interior S) f" + using contf continuous_on_subset rel_interior_subset by blast + show "inj_on f (rel_interior S)" + using inj_on_subset injf rel_interior_subset by blast + qed auto +qed + +lemma homeomorphic_rel_interiors_same_dimension: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" and aff: "aff_dim S = aff_dim T" + shows "(rel_interior S) homeomorphic (rel_interior T)" + using assms [unfolded homeomorphic_minimal] + unfolding homeomorphic_def +proof (clarify elim!: ex_forward) + fix f g + assume S: "\x\S. f x \ T \ g (f x) = x" and T: "\y\T. g y \ S \ f (g y) = y" + and contf: "continuous_on S f" and contg: "continuous_on T g" + then have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T" + by (auto simp: inj_on_def intro: rev_image_eqI) metis+ + have fim: "f ` rel_interior S \ rel_interior T" + by (metis \inj_on f S\ aff contf continuous_image_subset_rel_interior fST order_refl) + have gim: "g ` rel_interior T \ rel_interior S" + by (metis \inj_on g T\ aff contg continuous_image_subset_rel_interior gTS order_refl) + show "homeomorphism (rel_interior S) (rel_interior T) f g" + unfolding homeomorphism_def + proof (intro conjI ballI) + show gf: "\x. x \ rel_interior S \ g (f x) = x" + using S rel_interior_subset by blast + show fg: "\y. y \ rel_interior T \ f (g y) = y" + using T mem_rel_interior_ball by blast + have "rel_interior T \ f ` rel_interior S" + proof + fix x assume "x \ rel_interior T" + then have "g x \ rel_interior S" + using gim by blast + then show "x \ f ` rel_interior S" + by (metis fg \x \ rel_interior T\ imageI) + qed + moreover have "f ` rel_interior S \ rel_interior T" + by (metis \inj_on f S\ aff contf continuous_image_subset_rel_interior fST order_refl) + ultimately show "f ` rel_interior S = rel_interior T" + by blast + show "continuous_on (rel_interior S) f" + using contf continuous_on_subset rel_interior_subset by blast + have "rel_interior S \ g ` rel_interior T" + proof + fix x assume "x \ rel_interior S" + then have "f x \ rel_interior T" + using fim by blast + then show "x \ g ` rel_interior T" + by (metis gf \x \ rel_interior S\ imageI) + qed + then show "g ` rel_interior T = rel_interior S" + using gim by blast + show "continuous_on (rel_interior T) g" + using contg continuous_on_subset rel_interior_subset by blast + qed +qed + +lemma homeomorphic_rel_interiors: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" "rel_interior S = {} \ rel_interior T = {}" + shows "(rel_interior S) homeomorphic (rel_interior T)" +proof (cases "rel_interior T = {}") + case True + with assms show ?thesis by auto +next + case False + obtain f g + where S: "\x\S. f x \ T \ g (f x) = x" and T: "\y\T. g y \ S \ f (g y) = y" + and contf: "continuous_on S f" and contg: "continuous_on T g" + using assms [unfolded homeomorphic_minimal] by auto + have "aff_dim (affine hull S) \ aff_dim (affine hull T)" + apply (rule invariance_of_dimension_affine_sets [of _ "rel_interior S" _ f]) + apply (simp_all add: openin_rel_interior False assms) + using contf continuous_on_subset rel_interior_subset apply blast + apply (meson S hull_subset image_subsetI rel_interior_subset rev_subsetD) + apply (metis S inj_on_inverseI inj_on_subset rel_interior_subset) + done + moreover have "aff_dim (affine hull T) \ aff_dim (affine hull S)" + apply (rule invariance_of_dimension_affine_sets [of _ "rel_interior T" _ g]) + apply (simp_all add: openin_rel_interior False assms) + using contg continuous_on_subset rel_interior_subset apply blast + apply (meson T hull_subset image_subsetI rel_interior_subset rev_subsetD) + apply (metis T inj_on_inverseI inj_on_subset rel_interior_subset) + done + ultimately have "aff_dim S = aff_dim T" by force + then show ?thesis + by (rule homeomorphic_rel_interiors_same_dimension [OF \S homeomorphic T\]) +qed + + +lemma homeomorphic_rel_boundaries_same_dimension: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" and aff: "aff_dim S = aff_dim T" + shows "(S - rel_interior S) homeomorphic (T - rel_interior T)" + using assms [unfolded homeomorphic_minimal] + unfolding homeomorphic_def +proof (clarify elim!: ex_forward) + fix f g + assume S: "\x\S. f x \ T \ g (f x) = x" and T: "\y\T. g y \ S \ f (g y) = y" + and contf: "continuous_on S f" and contg: "continuous_on T g" + then have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T" + by (auto simp: inj_on_def intro: rev_image_eqI) metis+ + have fim: "f ` rel_interior S \ rel_interior T" + by (metis \inj_on f S\ aff contf continuous_image_subset_rel_interior fST order_refl) + have gim: "g ` rel_interior T \ rel_interior S" + by (metis \inj_on g T\ aff contg continuous_image_subset_rel_interior gTS order_refl) + show "homeomorphism (S - rel_interior S) (T - rel_interior T) f g" + unfolding homeomorphism_def + proof (intro conjI ballI) + show gf: "\x. x \ S - rel_interior S \ g (f x) = x" + using S rel_interior_subset by blast + show fg: "\y. y \ T - rel_interior T \ f (g y) = y" + using T mem_rel_interior_ball by blast + show "f ` (S - rel_interior S) = T - rel_interior T" + using S fST fim gim by auto + show "continuous_on (S - rel_interior S) f" + using contf continuous_on_subset rel_interior_subset by blast + show "g ` (T - rel_interior T) = S - rel_interior S" + using T gTS gim fim by auto + show "continuous_on (T - rel_interior T) g" + using contg continuous_on_subset rel_interior_subset by blast + qed +qed + +lemma homeomorphic_rel_boundaries: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + assumes "S homeomorphic T" "rel_interior S = {} \ rel_interior T = {}" + shows "(S - rel_interior S) homeomorphic (T - rel_interior T)" +proof (cases "rel_interior T = {}") + case True + with assms show ?thesis by auto +next + case False + obtain f g + where S: "\x\S. f x \ T \ g (f x) = x" and T: "\y\T. g y \ S \ f (g y) = y" + and contf: "continuous_on S f" and contg: "continuous_on T g" + using assms [unfolded homeomorphic_minimal] by auto + have "aff_dim (affine hull S) \ aff_dim (affine hull T)" + apply (rule invariance_of_dimension_affine_sets [of _ "rel_interior S" _ f]) + apply (simp_all add: openin_rel_interior False assms) + using contf continuous_on_subset rel_interior_subset apply blast + apply (meson S hull_subset image_subsetI rel_interior_subset rev_subsetD) + apply (metis S inj_on_inverseI inj_on_subset rel_interior_subset) + done + moreover have "aff_dim (affine hull T) \ aff_dim (affine hull S)" + apply (rule invariance_of_dimension_affine_sets [of _ "rel_interior T" _ g]) + apply (simp_all add: openin_rel_interior False assms) + using contg continuous_on_subset rel_interior_subset apply blast + apply (meson T hull_subset image_subsetI rel_interior_subset rev_subsetD) + apply (metis T inj_on_inverseI inj_on_subset rel_interior_subset) + done + ultimately have "aff_dim S = aff_dim T" by force + then show ?thesis + by (rule homeomorphic_rel_boundaries_same_dimension [OF \S homeomorphic T\]) +qed + +proposition uniformly_continuous_homeomorphism_UNIV_trivial: + fixes f :: "'a::euclidean_space \ 'a" + assumes contf: "uniformly_continuous_on S f" and hom: "homeomorphism S UNIV f g" + shows "S = UNIV" +proof (cases "S = {}") + case True + then show ?thesis + by (metis UNIV_I hom empty_iff homeomorphism_def image_eqI) +next + case False + have "inj g" + by (metis UNIV_I hom homeomorphism_apply2 injI) + then have "open (g ` UNIV)" + by (blast intro: invariance_of_domain hom homeomorphism_cont2) + then have "open S" + using hom homeomorphism_image2 by blast + moreover have "complete S" + unfolding complete_def + proof clarify + fix \ + assume \: "\n. \ n \ S" and "Cauchy \" + have "Cauchy (f o \)" + using uniformly_continuous_imp_Cauchy_continuous \Cauchy \\ \ contf by blast + then obtain l where "(f \ \) \ l" + by (auto simp: convergent_eq_Cauchy [symmetric]) + show "\l\S. \ \ l" + proof + show "g l \ S" + using hom homeomorphism_image2 by blast + have "(g \ (f \ \)) \ g l" + by (meson UNIV_I \(f \ \) \ l\ continuous_on_sequentially hom homeomorphism_cont2) + then show "\ \ g l" + proof - + have "\n. \ n = (g \ (f \ \)) n" + by (metis (no_types) \ comp_eq_dest_lhs hom homeomorphism_apply1) + then show ?thesis + by (metis (no_types) LIMSEQ_iff \(g \ (f \ \)) \ g l\) + qed + qed + qed + then have "closed S" + by (simp add: complete_eq_closed) + ultimately show ?thesis + using clopen [of S] False by simp +qed + +subsection\The power, squaring and exponential functions as covering maps\ + +proposition covering_space_power_punctured_plane: + assumes "0 < n" + shows "covering_space (- {0}) (\z::complex. z^n) (- {0})" +proof - + consider "n = 1" | "2 \ n" using assms by linarith + then obtain e where "0 < e" + and e: "\w z. cmod(w - z) < e * cmod z \ (w^n = z^n \ w = z)" + proof cases + assume "n = 1" then show ?thesis + by (rule_tac e=1 in that) auto + next + assume "2 \ n" + have eq_if_pow_eq: + "w = z" if lt: "cmod (w - z) < 2 * sin (pi / real n) * cmod z" + and eq: "w^n = z^n" for w z + proof (cases "z = 0") + case True with eq assms show ?thesis by (auto simp: power_0_left) + next + case False + then have "z \ 0" by auto + have "(w/z)^n = 1" + by (metis False divide_self_if eq power_divide power_one) + then obtain j where j: "w / z = exp (2 * of_real pi * \ * j / n)" and "j < n" + using Suc_leI assms \2 \ n\ complex_roots_unity [THEN eqset_imp_iff, of n "w/z"] + by force + have "cmod (w/z - 1) < 2 * sin (pi / real n)" + using lt assms \z \ 0\ by (simp add: divide_simps norm_divide) + then have "cmod (exp (\ * of_real (2 * pi * j / n)) - 1) < 2 * sin (pi / real n)" + by (simp add: j field_simps) + then have "2 * \sin((2 * pi * j / n) / 2)\ < 2 * sin (pi / real n)" + by (simp only: dist_exp_ii_1) + then have sin_less: "sin((pi * j / n)) < sin (pi / real n)" + by (simp add: field_simps) + then have "w / z = 1" + proof (cases "j = 0") + case True then show ?thesis by (auto simp: j) + next + case False + then have "sin (pi / real n) \ sin((pi * j / n))" + proof (cases "j / n \ 1/2") + case True + show ?thesis + apply (rule sin_monotone_2pi_le) + using \j \ 0 \ \j < n\ True + apply (auto simp: field_simps intro: order_trans [of _ 0]) + done + next + case False + then have seq: "sin(pi * j / n) = sin(pi * (n - j) / n)" + using \j < n\ by (simp add: algebra_simps diff_divide_distrib of_nat_diff) + show ?thesis + apply (simp only: seq) + apply (rule sin_monotone_2pi_le) + using \j < n\ False + apply (auto simp: field_simps intro: order_trans [of _ 0]) + done + qed + with sin_less show ?thesis by force + qed + then show ?thesis by simp + qed + show ?thesis + apply (rule_tac e = "2 * sin(pi / n)" in that) + apply (force simp: \2 \ n\ sin_pi_divide_n_gt_0) + apply (meson eq_if_pow_eq) + done + qed + have zn1: "continuous_on (- {0}) (\z::complex. z^n)" + by (rule continuous_intros)+ + 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} \ + (\u\v. open u \ 0 \ u) \ + pairwise disjnt v \ + (\u\v. Ex (homeomorphism u T (\z. z^n))))" + if "z \ 0" for z::complex + proof - + def d \ "min (1/2) (e/4) * norm z" + have "0 < d" + by (simp add: d_def \0 < e\ \z \ 0\) + have iff_x_eq_y: "x^n = y^n \ x = y" + if eq: "w^n = z^n" and x: "x \ ball w d" and y: "y \ ball w d" for w x y + proof - + have [simp]: "norm z = norm w" using that + by (simp add: assms power_eq_imp_eq_norm) + show ?thesis + proof (cases "w = 0") + case True with \z \ 0\ assms eq + show ?thesis by (auto simp: power_0_left) + next + case False + have "cmod (x - y) < 2*d" + using x y + by (simp add: dist_norm [symmetric]) (metis dist_commute mult_2 dist_triangle_less_add) + also have "... \ 2 * e / 4 * norm w" + using \e > 0\ by (simp add: d_def min_mult_distrib_right) + also have "... = e * (cmod w / 2)" + by simp + also have "... \ e * cmod y" + apply (rule mult_left_mono) + using \e > 0\ y + apply (simp_all add: dist_norm d_def min_mult_distrib_right del: divide_const_simps) + apply (metis dist_0_norm dist_complex_def dist_triangle_half_l linorder_not_less order_less_irrefl) + done + finally have "cmod (x - y) < e * cmod y" . + then show ?thesis by (rule e) + qed + qed + then have inj: "inj_on (\w. w^n) (ball z d)" + by (simp add: inj_on_def) + have cont: "continuous_on (ball z d) (\w. w ^ n)" + 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 - + have nz': "norm z' = norm z" using that assms power_eq_imp_eq_norm by blast + have "(w \ (\w. w^n) ` ball z' d) = (w \ (\w. w^n) ` ball z d)" for w + proof (cases "w=0") + case True with assms show ?thesis + by (simp add: image_def ball_def nz') + next + case False + have "z' \ 0" using \z \ 0\ nz' by force + have [simp]: "(z*x / z')^n = x^n" if "x \ 0" for x + using z' that by (simp add: field_simps \z \ 0\) + have [simp]: "cmod (z - z * x / z') = cmod (z' - x)" if "x \ 0" for x + proof - + have "cmod (z - z * x / z') = cmod z * cmod (1 - x / z')" + by (metis (no_types) ab_semigroup_mult_class.mult_ac(1) complex_divide_def mult.right_neutral norm_mult right_diff_distrib') + also have "... = cmod z' * cmod (1 - x / z')" + by (simp add: nz') + also have "... = cmod (z' - x)" + by (simp add: \z' \ 0\ diff_divide_eq_iff norm_divide) + finally show ?thesis . + qed + have [simp]: "(z'*x / z)^n = x^n" if "x \ 0" for x + using z' that by (simp add: field_simps \z \ 0\) + have [simp]: "cmod (z' - z' * x / z) = cmod (z - x)" if "x \ 0" for x + proof - + have "cmod (z * (1 - x * inverse z)) = cmod (z - x)" + by (metis \z \ 0\ diff_divide_distrib divide_complex_def divide_self_if nonzero_eq_divide_eq semiring_normalization_rules(7)) + then show ?thesis + by (metis (no_types) mult.assoc complex_divide_def mult.right_neutral norm_mult nz' right_diff_distrib') + qed + show ?thesis + unfolding image_def ball_def + apply safe + apply simp_all + apply (rule_tac x="z/z' * x" in exI) + using assms False apply (simp add: dist_norm) + apply (rule_tac x="z'/z * x" in exI) + using assms False apply (simp add: dist_norm) + done + 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 - + have "w \ 0" by (metis assms power_eq_0_iff that(1) that(2)) + have [simp]: "cmod x = cmod w" + using assms power_eq_imp_eq_norm eq by blast + have [simp]: "cmod (x * z / w - x) = cmod (z - w)" + proof - + have "cmod (x * z / w - x) = cmod x * cmod (z / w - 1)" + by (metis (no_types) mult.right_neutral norm_mult right_diff_distrib' times_divide_eq_right) + also have "... = cmod w * cmod (z / w - 1)" + by simp + also have "... = cmod (z - w)" + by (simp add: \w \ 0\ divide_diff_eq_iff nonzero_norm_divide) + finally show ?thesis . + qed + show ?thesis + apply (rule_tac x="ball (z / w * x) d" in exI) + using \d > 0\ that + apply (simp add: ball_eq_ball_iff) + apply (simp add: \z \ 0\ \w \ 0\ field_simps) + 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 + 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 + apply (simp add: covering_space_def zn1 zn2) + apply (subst zn2 [symmetric]) + apply (simp add: openin_open_eq open_Compl) + apply (blast intro: zn3) + done +qed + +corollary covering_space_square_punctured_plane: + "covering_space (- {0}) (\z::complex. z^2) (- {0})" + by (simp add: covering_space_power_punctured_plane) + + + +proposition covering_space_exp_punctured_plane: + "covering_space UNIV (\z::complex. exp z) (- {0})" +proof (simp add: covering_space_def, intro conjI ballI) + show "continuous_on UNIV (\z::complex. exp z)" + by (rule continuous_on_exp [OF continuous_on_id]) + 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 \ + (\u\v. \q. homeomorphism u T exp q))" + if "z \ - {0::complex}" for z + proof - + have "z \ 0" + using that by auto + have inj_exp: "inj_on exp (ball (Ln z) 1)" + apply (rule inj_on_subset [OF inj_on_exp_pi [of "Ln z"]]) + using pi_ge_two by (simp add: ball_subset_ball_iff) + define \ where "\ \ range (\n. (\x. x + of_real (2 * of_int n * pi) * ii) ` (ball(Ln z) 1))" + show ?thesis + proof (intro exI conjI) + show "z \ exp ` (ball(Ln z) 1)" + by (metis \z \ 0\ centre_in_ball exp_Ln rev_image_eqI zero_less_one) + have "open (- {0::complex})" + by blast + moreover have "inj_on exp (ball (Ln z) 1)" + apply (rule inj_on_subset [OF inj_on_exp_pi [of "Ln z"]]) + 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 "\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 * \)" + if "x < y" for x y + proof - + have "1 \ abs (x - y)" + using that by linarith + then have "1 \ cmod (of_int x - of_int y) * 1" + by (metis mult.right_neutral norm_of_int of_int_1_le_iff of_int_abs of_int_diff) + also have "... \ cmod (of_int x - of_int y) * of_real pi" + apply (rule mult_left_mono) + using pi_ge_two by auto + also have "... \ cmod ((of_int x - of_int y) * of_real pi * \)" + by (simp add: norm_mult) + also have "... \ cmod (of_int x * of_real pi * \ - of_int y * of_real pi * \)" + by (simp add: algebra_simps) + finally have "1 \ cmod (of_int x * of_real pi * \ - of_int y * of_real pi * \)" . + then have "2 * 1 \ cmod (2 * (of_int x * of_real pi * \ - of_int y * of_real pi * \))" + by (metis mult_le_cancel_left_pos norm_mult_numeral1 zero_less_numeral) + then show ?thesis + by (simp add: algebra_simps) + qed + show "disjoint \" + apply (clarsimp simp add: \_def pairwise_def disjnt_def add.commute [of _ "x*y" for x y] + image_add_ball ball_eq_ball_iff) + apply (rule disjoint_ballI) + apply (auto simp: dist_norm neq_iff) + by (metis norm_minus_commute xy)+ + show "\u\\. \q. homeomorphism u (exp ` ball (Ln z) 1) exp q" + proof + fix u + assume "u \ \" + then obtain n where n: "u = (\x. x + of_real (2 * of_int n * pi) * ii) ` (ball(Ln z) 1)" + by (auto simp: \_def) + have "compact (cball (Ln z) 1)" + by simp + moreover have "continuous_on (cball (Ln z) 1) exp" + by (rule continuous_on_exp [OF continuous_on_id]) + moreover have "inj_on exp (cball (Ln z) 1)" + apply (rule inj_on_subset [OF inj_on_exp_pi [of "Ln z"]]) + using pi_ge_two by (simp add: cball_subset_ball_iff) + ultimately obtain \ where hom: "homeomorphism (cball (Ln z) 1) (exp ` cball (Ln z) 1) exp \" + using homeomorphism_compact by blast + have eq1: "exp ` u = exp ` ball (Ln z) 1" + unfolding n + apply (auto simp: algebra_simps) + apply (rename_tac w) + apply (rule_tac x = "w + \ * (of_int n * (of_real pi * 2))" in image_eqI) + apply (auto simp: image_iff) + done + have \exp: "\ (exp x) + 2 * of_int n * of_real pi * \ = x" if "x \ u" for x + proof - + have "exp x = exp (x - 2 * of_int n * of_real pi * \)" + by (simp add: exp_eq) + then have "\ (exp x) = \ (exp (x - 2 * of_int n * of_real pi * \))" + by simp + also have "... = x - 2 * of_int n * of_real pi * \" + apply (rule homeomorphism_apply1 [OF hom]) + using \x \ u\ by (auto simp: n) + finally show ?thesis + by simp + qed + have exp2n: "exp (\ (exp x) + 2 * of_int n * complex_of_real pi * \) = exp x" + if "dist (Ln z) x < 1" for x + using that by (auto simp: exp_eq homeomorphism_apply1 [OF hom]) + have cont: "continuous_on (exp ` ball (Ln z) 1) (\x. \ x + 2 * of_int n * complex_of_real pi * \)" + apply (intro continuous_intros) + apply (rule continuous_on_subset [OF homeomorphism_cont2 [OF hom]]) + apply (force simp:) + done + show "\q. homeomorphism u (exp ` ball (Ln z) 1) exp q" + apply (rule_tac x="(\x. x + of_real(2 * n * pi) * ii) \ \" in exI) + unfolding homeomorphism_def + apply (intro conjI ballI eq1 continuous_on_exp [OF continuous_on_id]) + apply (auto simp: \exp exp2n cont n) + apply (simp add: homeomorphism_apply1 [OF hom]) + apply (simp add: image_comp [symmetric]) + using hom homeomorphism_apply1 apply (force simp: image_iff) + done + qed + qed + qed +qed + end diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Tue Oct 18 15:55:53 2016 +0100 @@ -960,7 +960,7 @@ using dp p(1) mn d(2) by auto qed qed - then guess y unfolding convergent_eq_cauchy[symmetric] .. note y=this[THEN LIMSEQ_D] + then guess y unfolding convergent_eq_Cauchy[symmetric] .. note y=this[THEN LIMSEQ_D] show ?l unfolding integrable_on_def has_integral proof (rule_tac x=y in exI, clarify) @@ -1798,7 +1798,7 @@ qed qed then obtain s where s: "i \ s" - using convergent_eq_cauchy[symmetric] by blast + using convergent_eq_Cauchy[symmetric] by blast show ?thesis unfolding integrable_on_def has_integral proof (rule_tac x=s in exI, clarify) @@ -5437,7 +5437,7 @@ apply auto done qed - from this[unfolded convergent_eq_cauchy[symmetric]] guess i .. + from this[unfolded convergent_eq_Cauchy[symmetric]] guess i .. note i = this[THEN LIMSEQ_D] show ?l unfolding integrable_on_def has_integral_alt'[of f] diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Analysis/Topology_Euclidean_Space.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Analysis/Topology_Euclidean_Space.thy Tue Oct 18 15:55:53 2016 +0100 @@ -1034,6 +1034,14 @@ shows "x \ cball 0 e \ norm x \ e" by (simp add: dist_norm) +lemma disjoint_ballI: + shows "dist x y \ r+s \ ball x r \ ball y s = {}" + using dist_triangle_less_add not_le by fastforce + +lemma disjoint_cballI: + shows "dist x y > r+s \ cball x r \ cball y s = {}" + by (metis add_mono disjoint_iff_not_equal dist_triangle2 dual_order.trans leD mem_cball) + lemma mem_sphere_0 [simp]: fixes x :: "'a::real_normed_vector" shows "x \ sphere 0 e \ norm x = e" @@ -5435,62 +5443,62 @@ qed lemma complete_imp_closed: - fixes s :: "'a::metric_space set" - assumes "complete s" - shows "closed s" + fixes S :: "'a::metric_space set" + assumes "complete S" + shows "closed S" proof (unfold closed_sequential_limits, clarify) - fix f x assume "\n. f n \ s" and "f \ x" + fix f x assume "\n. f n \ S" and "f \ x" from \f \ x\ have "Cauchy f" by (rule LIMSEQ_imp_Cauchy) - with \complete s\ and \\n. f n \ s\ obtain l where "l \ s" and "f \ l" + with \complete S\ and \\n. f n \ S\ obtain l where "l \ S" and "f \ l" by (rule completeE) from \f \ x\ and \f \ l\ have "x = l" by (rule LIMSEQ_unique) - with \l \ s\ show "x \ s" + with \l \ S\ show "x \ S" by simp qed lemma complete_Int_closed: - fixes s :: "'a::metric_space set" - assumes "complete s" and "closed t" - shows "complete (s \ t)" + fixes S :: "'a::metric_space set" + assumes "complete S" and "closed t" + shows "complete (S \ t)" proof (rule completeI) - fix f assume "\n. f n \ s \ t" and "Cauchy f" - then have "\n. f n \ s" and "\n. f n \ t" + fix f assume "\n. f n \ S \ t" and "Cauchy f" + then have "\n. f n \ S" and "\n. f n \ t" by simp_all - from \complete s\ obtain l where "l \ s" and "f \ l" - using \\n. f n \ s\ and \Cauchy f\ by (rule completeE) + from \complete S\ obtain l where "l \ S" and "f \ l" + using \\n. f n \ S\ and \Cauchy f\ by (rule completeE) from \closed t\ and \\n. f n \ t\ and \f \ l\ have "l \ t" by (rule closed_sequentially) - with \l \ s\ and \f \ l\ show "\l\s \ t. f \ l" + with \l \ S\ and \f \ l\ show "\l\S \ t. f \ l" by fast qed lemma complete_closed_subset: - fixes s :: "'a::metric_space set" - assumes "closed s" and "s \ t" and "complete t" - shows "complete s" - using assms complete_Int_closed [of t s] by (simp add: Int_absorb1) + fixes S :: "'a::metric_space set" + assumes "closed S" and "S \ t" and "complete t" + shows "complete S" + using assms complete_Int_closed [of t S] by (simp add: Int_absorb1) lemma complete_eq_closed: - fixes s :: "('a::complete_space) set" - shows "complete s \ closed s" + fixes S :: "('a::complete_space) set" + shows "complete S \ closed S" proof - assume "closed s" then show "complete s" + assume "closed S" then show "complete S" using subset_UNIV complete_UNIV by (rule complete_closed_subset) next - assume "complete s" then show "closed s" + assume "complete S" then show "closed S" by (rule complete_imp_closed) qed -lemma convergent_eq_cauchy: - fixes s :: "nat \ 'a::complete_space" - shows "(\l. (s \ l) sequentially) \ Cauchy s" +lemma convergent_eq_Cauchy: + fixes S :: "nat \ 'a::complete_space" + shows "(\l. (S \ l) sequentially) \ Cauchy S" unfolding Cauchy_convergent_iff convergent_def .. lemma convergent_imp_bounded: - fixes s :: "nat \ 'a::metric_space" - shows "(s \ l) sequentially \ bounded (range s)" + fixes S :: "nat \ 'a::metric_space" + shows "(S \ l) sequentially \ bounded (range S)" by (intro cauchy_imp_bounded LIMSEQ_imp_Cauchy) lemma compact_cball[simp]: @@ -5500,15 +5508,15 @@ by blast lemma compact_frontier_bounded[intro]: - fixes s :: "'a::heine_borel set" - shows "bounded s \ compact (frontier s)" + fixes S :: "'a::heine_borel set" + shows "bounded S \ compact (frontier S)" unfolding frontier_def using compact_eq_bounded_closed by blast lemma compact_frontier[intro]: - fixes s :: "'a::heine_borel set" - shows "compact s \ compact (frontier s)" + fixes S :: "'a::heine_borel set" + shows "compact S \ compact (frontier S)" using compact_eq_bounded_closed compact_frontier_bounded by blast @@ -5528,8 +5536,8 @@ by (simp add: compact_imp_closed) lemma frontier_subset_compact: - fixes s :: "'a::heine_borel set" - shows "compact s \ frontier s \ s" + fixes S :: "'a::heine_borel set" + shows "compact S \ frontier S \ S" using frontier_subset_closed compact_eq_bounded_closed by blast @@ -5723,7 +5731,7 @@ apply auto done then obtain l where l: "\x. P x \ ((\n. s n x) \ l x) sequentially" - unfolding convergent_eq_cauchy[symmetric] + unfolding convergent_eq_Cauchy[symmetric] using choice[of "\x l. P x \ ((\n. s n x) \ l) sequentially"] by auto { @@ -6081,6 +6089,11 @@ unfolding uniformly_continuous_on_def by blast qed +lemma continuous_closed_imp_Cauchy_continuous: + fixes S :: "('a::complete_space) set" + shows "\continuous_on S f; closed S; Cauchy \; \n. (\ n) \ S\ \ Cauchy(f o \)" + apply (simp add: complete_eq_closed [symmetric] continuous_on_sequentially) + by (meson LIMSEQ_imp_Cauchy complete_def) text\The usual transformation theorems.\ @@ -6630,7 +6643,7 @@ from uniformly_continuous_on_Cauchy[OF uc LIMSEQ_imp_Cauchy, OF xs] obtain l where l: "(\n. f (xs n)) \ l" - by atomize_elim (simp only: convergent_eq_cauchy) + by atomize_elim (simp only: convergent_eq_Cauchy) have "(f \ l) (at x within X)" proof (safe intro!: Lim_within_LIMSEQ) @@ -6641,7 +6654,7 @@ from uniformly_continuous_on_Cauchy[OF uc LIMSEQ_imp_Cauchy, OF \xs' \ x\ \xs' _ \ X\] obtain l' where l': "(\n. f (xs' n)) \ l'" - by atomize_elim (simp only: convergent_eq_cauchy) + by atomize_elim (simp only: convergent_eq_Cauchy) show "(\n. f (xs' n)) \ l" proof (rule tendstoI) diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Limits.thy --- a/src/HOL/Limits.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Limits.thy Tue Oct 18 15:55:53 2016 +0100 @@ -2340,6 +2340,11 @@ lemma isUCont_Cauchy: "isUCont f \ Cauchy X \ Cauchy (\n. f (X n))" by (rule uniformly_continuous_on_Cauchy[where S=UNIV and f=f]) simp_all + +lemma uniformly_continuous_imp_Cauchy_continuous: + fixes f :: "'a::metric_space \ 'b::metric_space" + shows "\uniformly_continuous_on S f; Cauchy \; \n. (\ n) \ S\ \ Cauchy(f o \)" + by (simp add: uniformly_continuous_on_def Cauchy_def) meson lemma (in bounded_linear) isUCont: "isUCont f" unfolding isUCont_def dist_norm diff -r f3b905b2eee2 -r d85d88722745 src/HOL/Orderings.thy --- a/src/HOL/Orderings.thy Tue Oct 18 12:01:54 2016 +0200 +++ b/src/HOL/Orderings.thy Tue Oct 18 15:55:53 2016 +0100 @@ -1437,6 +1437,17 @@ apply (erule Least_le) done +lemma exists_least_iff: "(\n. P n) \ (\n. P n \ (\m < n. \ P m))" (is "?lhs \ ?rhs") +proof + assume ?rhs thus ?lhs by blast +next + assume H: ?lhs then obtain n where n: "P n" by blast + let ?x = "Least P" + { fix m assume m: "m < ?x" + from not_less_Least[OF m] have "\ P m" . } + with LeastI_ex[OF H] show ?rhs by blast +qed + end