# HG changeset patch # User paulson # Date 1676978723 0 # Node ID 5158dc9d096bc5101f88b1a3debc2c2af608b143 # Parent cf6947717650ceed631f318368215f12d073743e# Parent 66c7ec736c36bd2316a90f2a6bf9ac665a6683e5 merged diff -r cf6947717650 -r 5158dc9d096b src/HOL/Analysis/Complex_Transcendental.thy --- a/src/HOL/Analysis/Complex_Transcendental.thy Mon Feb 20 21:53:15 2023 +0100 +++ b/src/HOL/Analysis/Complex_Transcendental.thy Tue Feb 21 11:25:23 2023 +0000 @@ -2438,69 +2438,28 @@ declare has_field_derivative_powr[THEN DERIV_chain2, derivative_intros] +(*Seemingly impossible to use DERIV_power_int without introducing the assumption z\S*) lemma has_field_derivative_powr_of_int: fixes z :: complex - assumes gderiv:"(g has_field_derivative gd) (at z within S)" and "g z\0" + assumes gderiv: "(g has_field_derivative gd) (at z within S)" and "g z \ 0" shows "((\z. g z powr of_int n) has_field_derivative (n * g z powr (of_int n - 1) * gd)) (at z within S)" proof - - define dd where "dd = of_int n * g z powr (of_int (n - 1)) * gd" - obtain e where "e>0" and e_dist:"\y\S. dist z y < e \ g y \ 0" - using DERIV_continuous[OF gderiv,THEN continuous_within_avoid] \g z\0\ by auto - have ?thesis when "n\0" - proof - - define dd' where "dd' = of_int n * g z ^ (nat n - 1) * gd" - have "dd=dd'" - proof (cases "n=0") - case False - then have "n-1 \0" using \n\0\ by auto - then have "g z powr (of_int (n - 1)) = g z ^ (nat n - 1)" - using powr_of_int[OF \g z\0\,of "n-1"] by (simp add: nat_diff_distrib') - then show ?thesis unfolding dd_def dd'_def by simp - qed (simp add:dd_def dd'_def) - then have "((\z. g z powr of_int n) has_field_derivative dd) (at z within S) - \ ((\z. g z powr of_int n) has_field_derivative dd') (at z within S)" - by simp - also have "\ \ ((\z. g z ^ nat n) has_field_derivative dd') (at z within S)" - proof (rule has_field_derivative_cong_eventually) - show "\\<^sub>F x in at z within S. g x powr of_int n = g x ^ nat n" - unfolding eventually_at by (metis e_dist \e>0\ dist_commute powr_of_int that) - qed (use powr_of_int \g z\0\ that in simp) - also have "\" unfolding dd'_def using gderiv that - by (auto intro!: derivative_eq_intros) - finally have "((\z. g z powr of_int n) has_field_derivative dd) (at z within S)" . - then show ?thesis unfolding dd_def by simp - qed - moreover have ?thesis when "n<0" - proof - - define dd' where "dd' = of_int n / g z ^ (nat (1 - n)) * gd" - have "dd=dd'" - proof - - have "g z powr of_int (n - 1) = inverse (g z ^ nat (1-n))" - using powr_of_int[OF \g z\0\,of "n-1"] that by auto - then show ?thesis - unfolding dd_def dd'_def by (simp add: divide_inverse) - qed - then have "((\z. g z powr of_int n) has_field_derivative dd) (at z within S) - \ ((\z. g z powr of_int n) has_field_derivative dd') (at z within S)" - by simp - also have "\ \ ((\z. inverse (g z ^ nat (-n))) has_field_derivative dd') (at z within S)" - proof (rule has_field_derivative_cong_eventually) - show "\\<^sub>F x in at z within S. g x powr of_int n = inverse (g x ^ nat (- n))" - unfolding eventually_at - by (metis \e>0\ e_dist dist_commute linorder_not_le powr_of_int that) - qed (use powr_of_int \g z\0\ that in simp) - also have "\" - proof - - have "nat (- n) + nat (1 - n) - Suc 0 = nat (- n) + nat (- n)" - by auto - then show ?thesis - unfolding dd'_def using gderiv that \g z\0\ - by (auto intro!: derivative_eq_intros simp add:field_split_simps power_add[symmetric]) - qed - finally have "((\z. g z powr of_int n) has_field_derivative dd) (at z within S)" . - then show ?thesis unfolding dd_def by simp - qed - ultimately show ?thesis by force + obtain e where "e>0" and e_dist: "\y\S. dist z y < e \ g y \ 0" + using DERIV_continuous assms continuous_within_avoid gderiv by blast + define D where "D = of_int n * g z powr (of_int (n - 1)) * gd" + define E where "E = of_int n * g z powi (n - 1) * gd" + have "((\z. g z powr of_int n) has_field_derivative D) (at z within S) + \ ((\z. g z powr of_int n) has_field_derivative E) (at z within S)" + using assms complex_powr_of_int D_def E_def by presburger + also have "\ \ ((\z. g z powi n) has_field_derivative E) (at z within S)" + proof (rule has_field_derivative_cong_eventually) + show "\\<^sub>F x in at z within S. g x powr of_int n = g x powi n" + unfolding eventually_at by (metis \0 < e\ complex_powr_of_int dist_commute e_dist) + qed (simp add: assms complex_powr_of_int) + also have "((\z. g z powi n) has_field_derivative E) (at z within S)" + unfolding E_def using gderiv assms by (auto intro!: derivative_eq_intros) + finally show ?thesis + by (simp add: D_def) qed lemma field_differentiable_powr_of_int: @@ -3832,15 +3791,8 @@ lemma continuous_within_Arcsin_real: "continuous (at z within {w \ \. \Re w\ \ 1}) Arcsin" -proof (cases "z \ {w \ \. \Re w\ \ 1}") - case True then show ?thesis - using continuous_on_Arcsin_real continuous_on_eq_continuous_within - by blast -next - case False - with closed_real_abs_le [of 1] show ?thesis - by (rule continuous_within_closed_nontrivial) -qed + using closed_real_abs_le continuous_on_Arcsin_real continuous_on_eq_continuous_within + continuous_within_closed_nontrivial by blast lemma continuous_on_Arccos_real: "continuous_on {w \ \. \Re w\ \ 1} Arccos" @@ -3858,15 +3810,8 @@ lemma continuous_within_Arccos_real: "continuous (at z within {w \ \. \Re w\ \ 1}) Arccos" -proof (cases "z \ {w \ \. \Re w\ \ 1}") - case True then show ?thesis - using continuous_on_Arccos_real continuous_on_eq_continuous_within - by blast -next - case False - with closed_real_abs_le [of 1] show ?thesis - by (rule continuous_within_closed_nontrivial) -qed + using closed_real_abs_le continuous_on_Arccos_real continuous_on_eq_continuous_within + continuous_within_closed_nontrivial by blast lemma sinh_ln_complex: "x \ 0 \ sinh (ln x :: complex) = (x - inverse x) / 2" by (simp add: sinh_def exp_minus scaleR_conv_of_real exp_of_real) diff -r cf6947717650 -r 5158dc9d096b src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy --- a/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Mon Feb 20 21:53:15 2023 +0100 +++ b/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Tue Feb 21 11:25:23 2023 +0000 @@ -696,7 +696,7 @@ lemma nn_integral_has_integral_lebesgue: fixes f :: "'a::euclidean_space \ real" - assumes nonneg: "\x. 0 \ f x" and I: "(f has_integral I) \" + assumes nonneg: "\x. x \ \ \ 0 \ f x" and I: "(f has_integral I) \" shows "integral\<^sup>N lborel (\x. indicator \ x * f x) = I" proof - from I have "(\x. indicator \ x *\<^sub>R f x) \ lebesgue \\<^sub>M borel" @@ -713,8 +713,9 @@ by (rule nn_integral_has_integral_lborel[rotated 2]) auto also have "integral\<^sup>N lborel (\x. abs (f' x)) = integral\<^sup>N lborel (\x. abs (indicator \ x * f x))" using eq by (intro nn_integral_cong_AE) auto - finally show ?thesis - using nonneg by auto + also have "(\x. abs (indicator \ x * f x)) = (\x. indicator \ x * f x)" + using nonneg by (auto simp: indicator_def fun_eq_iff) + finally show ?thesis . qed lemma has_integral_iff_nn_integral_lebesgue: @@ -741,6 +742,38 @@ using f by (auto simp: nn_integral_completion) qed +lemma set_nn_integral_lborel_eq_integral: + fixes f::"'a::euclidean_space \ real" + assumes "set_borel_measurable borel A f" + assumes "\x. x \ A \ 0 \ f x" "(\\<^sup>+x\A. f x \lborel) < \" + shows "(\\<^sup>+x\A. f x \lborel) = integral A f" +proof - + have eq: "(\\<^sup>+x\A. f x \lborel) = (\\<^sup>+x. ennreal (indicator A x * f x) \lborel)" + by (intro nn_integral_cong) (auto simp: indicator_def) + also have "\ = integral UNIV (\x. indicator A x * f x)" + using assms eq by (intro nn_integral_lborel_eq_integral) + (auto simp: indicator_def set_borel_measurable_def) + also have "integral UNIV (\x. indicator A x * f x) = integral A (\x. indicator A x * f x)" + by (rule integral_spike_set) (auto intro: empty_imp_negligible) + + also have "\ = integral A f" + by (rule integral_cong) (auto simp: indicator_def) + finally show ?thesis . +qed + +lemma nn_integral_has_integral_lebesgue': + fixes f :: "'a::euclidean_space \ real" + assumes nonneg: "\x. x \ \ \ 0 \ f x" and I: "(f has_integral I) \" + shows "integral\<^sup>N lborel (\x. ennreal (f x) * indicator \ x) = ennreal I" +proof - + have "integral\<^sup>N lborel (\x. ennreal (f x) * indicator \ x) = + integral\<^sup>N lborel (\x. ennreal (indicator \ x * f x))" + by (intro nn_integral_cong) (auto simp: indicator_def) + also have "\ = ennreal I" + using assms by (intro nn_integral_has_integral_lebesgue) + finally show ?thesis . +qed + context fixes f::"'a::euclidean_space \ 'b::euclidean_space" begin @@ -959,7 +992,7 @@ show "(\x. indicator S x *\<^sub>R f x) \ borel_measurable lebesgue" using f has_integral_implies_lebesgue_measurable[of f _ S] by (auto simp: integrable_on_def) show "(\\<^sup>+ x. ennreal (norm (indicator S x *\<^sub>R f x)) \lebesgue) < \" - using nf nn_integral_has_integral_lebesgue[of "\x. norm (f x)" _ S] + using nf nn_integral_has_integral_lebesgue[of _ "\x. norm (f x)"] by (auto simp: integrable_on_def nn_integral_completion) qed qed diff -r cf6947717650 -r 5158dc9d096b src/HOL/Analysis/Set_Integral.thy --- a/src/HOL/Analysis/Set_Integral.thy Mon Feb 20 21:53:15 2023 +0100 +++ b/src/HOL/Analysis/Set_Integral.thy Tue Feb 21 11:25:23 2023 +0000 @@ -76,6 +76,22 @@ by (subst (asm) sets_restrict_space_iff) (auto simp: space_restrict_space) qed +lemma set_integrable_bound: + fixes f :: "'a \ 'b::{banach, second_countable_topology}" + and g :: "'a \ 'c::{banach, second_countable_topology}" + assumes "set_integrable M A f" "set_borel_measurable M A g" + assumes "AE x in M. x \ A \ norm (g x) \ norm (f x)" + shows "set_integrable M A g" + unfolding set_integrable_def +proof (rule Bochner_Integration.integrable_bound) + from assms(1) show "integrable M (\x. indicator A x *\<^sub>R f x)" + by (simp add: set_integrable_def) + from assms(2) show "(\x. indicat_real A x *\<^sub>R g x) \ borel_measurable M" + by (simp add: set_borel_measurable_def) + from assms(3) show "AE x in M. norm (indicat_real A x *\<^sub>R g x) \ norm (indicat_real A x *\<^sub>R f x)" + by eventually_elim (simp add: indicator_def) +qed + lemma set_lebesgue_integral_zero [simp]: "set_lebesgue_integral M A (\x. 0) = 0" by (auto simp: set_lebesgue_integral_def) @@ -626,6 +642,11 @@ "\\<^sup>+x \ A. f \M" == "CONST set_nn_integral M A (\x. f)" "\x \ A. f \M" == "CONST set_lebesgue_integral M A (\x. f)" +lemma set_nn_integral_cong: + assumes "M = M'" "A = B" "\x. x \ space M \ A \ f x = g x" + shows "set_nn_integral M A f = set_nn_integral M' B g" + by (metis (mono_tags, lifting) IntI assms indicator_simps(2) mult_eq_0_iff nn_integral_cong) + lemma nn_integral_disjoint_pair: assumes [measurable]: "f \ borel_measurable M" "B \ sets M" "C \ sets M" diff -r cf6947717650 -r 5158dc9d096b src/HOL/Complex_Analysis/Complex_Singularities.thy --- a/src/HOL/Complex_Analysis/Complex_Singularities.thy Mon Feb 20 21:53:15 2023 +0100 +++ b/src/HOL/Complex_Analysis/Complex_Singularities.thy Tue Feb 21 11:25:23 2023 +0000 @@ -344,7 +344,7 @@ lemma holomorphic_factor_unique: fixes f::"complex \ complex" and z::complex and r::real and m n::int assumes "r>0" "g z\0" "h z\0" - and asm:"\w\ball z r-{z}. f w = g w * (w-z) powr n \ g w\0 \ f w = h w * (w - z) powr m \ h w\0" + and asm:"\w\ball z r-{z}. f w = g w * (w-z) powi n \ g w\0 \ f w = h w * (w - z) powi m \ h w\0" and g_holo:"g holomorphic_on ball z r" and h_holo:"h holomorphic_on ball z r" shows "n=m" proof - @@ -353,14 +353,14 @@ have False when "n>m" proof - have "(h \ 0) (at z within ball z r)" - proof (rule Lim_transform_within[OF _ \r>0\, where f="\w. (w - z) powr (n - m) * g w"]) - have "\w\ball z r-{z}. h w = (w-z)powr(n-m) * g w" - using \n>m\ asm \r>0\ by (simp add: field_simps powr_diff) force + proof (rule Lim_transform_within[OF _ \r>0\, where f="\w. (w - z) powi (n - m) * g w"]) + have "\w\ball z r-{z}. h w = (w-z)powi(n-m) * g w" + using \n>m\ asm \r>0\ by (simp add: field_simps power_int_diff) force then show "\x' \ ball z r; 0 < dist x' z;dist x' z < r\ - \ (x' - z) powr (n - m) * g x' = h x'" for x' by auto + \ (x' - z) powi (n - m) * g x' = h x'" for x' by auto next define F where "F \ at z within ball z r" - define f' where "f' \ \x. (x - z) powr (n-m)" + define f' where "f' \ \x. (x - z) powi (n-m)" have "f' z=0" using \n>m\ unfolding f'_def by auto moreover have "continuous F f'" unfolding f'_def F_def continuous_def using \n>m\ @@ -381,14 +381,14 @@ moreover have False when "m>n" proof - have "(g \ 0) (at z within ball z r)" - proof (rule Lim_transform_within[OF _ \r>0\, where f="\w. (w - z) powr (m - n) * h w"]) - have "\w\ball z r -{z}. g w = (w-z) powr (m-n) * h w" using \m>n\ asm - by (simp add:field_simps powr_diff) force + proof (rule Lim_transform_within[OF _ \r>0\, where f="\w. (w - z) powi (m - n) * h w"]) + have "\w\ball z r -{z}. g w = (w-z) powi (m-n) * h w" using \m>n\ asm + by (simp add:field_simps power_int_diff) force then show "\x' \ ball z r; 0 < dist x' z;dist x' z < r\ - \ (x' - z) powr (m - n) * h x' = g x'" for x' by auto + \ (x' - z) powi (m - n) * h x' = g x'" for x' by auto next define F where "F \ at z within ball z r" - define f' where "f' \\x. (x - z) powr (m-n)" + define f' where "f' \\x. (x - z) powi (m-n)" have "f' z=0" using \m>n\ unfolding f'_def by auto moreover have "continuous F f'" unfolding f'_def F_def continuous_def using \m>n\ @@ -414,23 +414,23 @@ and "not_essential f z" \ \\<^term>\f\ has either a removable singularity or a pole at \<^term>\z\\ and non_zero:"\\<^sub>Fw in (at z). f w\0" \ \\<^term>\f\ will not be constantly zero in a neighbour of \<^term>\z\\ shows "\!n::int. \g r. 0 < r \ g holomorphic_on cball z r \ g z\0 - \ (\w\cball z r-{z}. f w = g w * (w-z) powr n \ g w\0)" + \ (\w\cball z r-{z}. f w = g w * (w-z) powi n \ g w\0)" proof - define P where "P = (\f n g r. 0 < r \ g holomorphic_on cball z r \ g z\0 - \ (\w\cball z r - {z}. f w = g w * (w-z) powr (of_int n) \ g w\0))" + \ (\w\cball z r - {z}. f w = g w * (w-z) powi n \ g w\0))" have imp_unique:"\!n::int. \g r. P f n g r" when "\n g r. P f n g r" proof (rule ex_ex1I[OF that]) fix n1 n2 :: int assume g1_asm:"\g1 r1. P f n1 g1 r1" and g2_asm:"\g2 r2. P f n2 g2 r2" - define fac where "fac \ \n g r. \w\cball z r-{z}. f w = g w * (w - z) powr (of_int n) \ g w \ 0" + define fac where "fac \ \n g r. \w\cball z r-{z}. f w = g w * (w - z) powi n \ g w \ 0" obtain g1 r1 where "0 < r1" and g1_holo: "g1 holomorphic_on cball z r1" and "g1 z\0" and "fac n1 g1 r1" using g1_asm unfolding P_def fac_def by auto obtain g2 r2 where "0 < r2" and g2_holo: "g2 holomorphic_on cball z r2" and "g2 z\0" and "fac n2 g2 r2" using g2_asm unfolding P_def fac_def by auto define r where "r \ min r1 r2" have "r>0" using \r1>0\ \r2>0\ unfolding r_def by auto - moreover have "\w\ball z r-{z}. f w = g1 w * (w-z) powr n1 \ g1 w\0 - \ f w = g2 w * (w - z) powr n2 \ g2 w\0" + moreover have "\w\ball z r-{z}. f w = g1 w * (w-z) powi n1 \ g1 w\0 + \ f w = g2 w * (w - z) powi n2 \ g2 w\0" using \fac n1 g1 r1\ \fac n2 g2 r2\ unfolding fac_def r_def by fastforce ultimately show "n1=n2" using g1_holo g2_holo \g1 z\0\ \g2 z\0\ @@ -533,19 +533,18 @@ then obtain n g r where "0 < r" and g_holo:"g holomorphic_on cball z r" and "g z\0" and - g_fac:"(\w\cball z r-{z}. h w = g w * (w - z) powr of_int n \ g w \ 0)" + g_fac:"(\w\cball z r-{z}. h w = g w * (w - z) powi n \ g w \ 0)" unfolding P_def by auto have "P f (-n) (inverse o g) r" proof - - have "f w = inverse (g w) * (w - z) powr of_int (- n)" when "w\cball z r - {z}" for w - by (metis g_fac h_def inverse_inverse_eq inverse_mult_distrib of_int_minus - powr_minus that) + have "f w = inverse (g w) * (w - z) powi (- n)" when "w\cball z r - {z}" for w + by (metis g_fac h_def inverse_inverse_eq inverse_mult_distrib power_int_minus that) then show ?thesis unfolding P_def comp_def using \r>0\ g_holo g_fac \g z\0\ by (auto intro:holomorphic_intros) qed then show "\x g r. 0 < r \ g holomorphic_on cball z r \ g z \ 0 - \ (\w\cball z r - {z}. f w = g w * (w - z) powr of_int x \ g w \ 0)" + \ (\w\cball z r - {z}. f w = g w * (w - z) powi x \ g w \ 0)" unfolding P_def by blast qed ultimately show ?thesis using \not_essential f z\ unfolding not_essential_def by presburger @@ -583,15 +582,15 @@ lemma not_essential_powr[singularity_intros]: assumes "LIM w (at z). f w :> (at x)" - shows "not_essential (\w. (f w) powr (of_int n)) z" + shows "not_essential (\w. (f w) powi n) z" proof - - define fp where "fp=(\w. (f w) powr (of_int n))" + define fp where "fp=(\w. (f w) powi n)" have ?thesis when "n>0" proof - have "(\w. (f w) ^ (nat n)) \z\ x ^ nat n" using that assms unfolding filterlim_at by (auto intro!:tendsto_eq_intros) then have "fp \z\ x ^ nat n" unfolding fp_def - by (smt (verit, best) LIM_equal of_int_of_nat power_eq_0_iff powr_nat that zero_less_nat_eq) + by (smt (verit) LIM_cong power_int_def that) then show ?thesis unfolding not_essential_def fp_def by auto qed moreover have ?thesis when "n=0" @@ -615,7 +614,7 @@ proof (elim filterlim_mono_eventually) show "\\<^sub>F x in at z. inverse (f x ^ nat (- n)) = fp x" using filterlim_at_within_not_equal[OF assms,of 0] unfolding fp_def - by (smt (verit, ccfv_threshold) eventually_mono powr_of_int that) + by (smt (verit) eventuallyI power_int_def power_inverse that) qed auto then show ?thesis unfolding fp_def not_essential_def is_pole_def by auto next @@ -624,8 +623,7 @@ have "(\w. inverse ((f w) ^ (nat (-n)))) \z\?xx" using assms False unfolding filterlim_at by (auto intro!:tendsto_eq_intros) then have "fp \z\ ?xx" - by (smt (verit) LIM_cong fp_def inverse_nonzero_iff_nonzero power_eq_0_iff powr_eq_0_iff - powr_of_int that zero_less_nat_eq) + by (smt (verit, best) LIM_cong fp_def power_int_def power_inverse that) then show ?thesis unfolding fp_def not_essential_def by auto qed ultimately show ?thesis by linarith @@ -633,7 +631,7 @@ lemma isolated_singularity_at_powr[singularity_intros]: assumes "isolated_singularity_at f z" "\\<^sub>F w in (at z). f w\0" - shows "isolated_singularity_at (\w. (f w) powr (of_int n)) z" + shows "isolated_singularity_at (\w. (f w) powi n) z" proof - obtain r1 where "r1>0" "f analytic_on ball z r1 - {z}" using assms(1) unfolding isolated_singularity_at_def by auto @@ -642,8 +640,8 @@ obtain r2 where "r2>0" and r2:"\w. w \ z \ dist w z < r2 \ f w \ 0" using assms(2) unfolding eventually_at by auto define r3 where "r3=min r1 r2" - have "(\w. (f w) powr of_int n) holomorphic_on ball z r3 - {z}" - by (intro holomorphic_on_powr_of_int) (use r1 r2 in \auto simp: dist_commute r3_def\) + have "(\w. (f w) powi n) holomorphic_on ball z r3 - {z}" + by (intro holomorphic_on_power_int) (use r1 r2 in \auto simp: dist_commute r3_def\) moreover have "r3>0" unfolding r3_def using \0 < r1\ \0 < r2\ by linarith ultimately show ?thesis by (meson open_ball analytic_on_open isolated_singularity_at_def open_delete) @@ -657,13 +655,13 @@ proof - obtain fn fp fr where [simp]:"fp z \ 0" and "fr > 0" and fr: "fp holomorphic_on cball z fr" - "\w\cball z fr - {z}. f w = fp w * (w - z) powr of_int fn \ fp w \ 0" + "\w\cball z fr - {z}. f w = fp w * (w - z) powi fn \ fp w \ 0" using holomorphic_factor_puncture[OF f_iso f_ness f_nconst,THEN ex1_implies_ex] by auto have "f w \ 0" when " w \ z" "dist w z < fr" for w proof - - have "f w = fp w * (w - z) powr of_int fn" "fp w \ 0" + have "f w = fp w * (w - z) powi fn" "fp w \ 0" using fr(2)[rule_format, of w] using that by (auto simp add:dist_commute) - moreover have "(w - z) powr of_int fn \0" + moreover have "(w - z) powi fn \0" unfolding powr_eq_0_iff using \w\z\ by auto ultimately show ?thesis by auto qed @@ -715,24 +713,24 @@ proof - obtain fn fp fr where [simp]:"fp z \ 0" and "fr > 0" and fr: "fp holomorphic_on cball z fr" - "\w\cball z fr - {z}. f w = fp w * (w - z) powr of_int fn \ fp w \ 0" + "\w\cball z fr - {z}. f w = fp w * (w - z) powi fn \ fp w \ 0" using holomorphic_factor_puncture[OF f_iso f_ness f_nconst,THEN ex1_implies_ex] by auto obtain gn gp gr where [simp]:"gp z \ 0" and "gr > 0" and gr: "gp holomorphic_on cball z gr" - "\w\cball z gr - {z}. g w = gp w * (w - z) powr of_int gn \ gp w \ 0" + "\w\cball z gr - {z}. g w = gp w * (w - z) powi gn \ gp w \ 0" using holomorphic_factor_puncture[OF g_iso g_ness g_nconst,THEN ex1_implies_ex] by auto define r1 where "r1=(min fr gr)" have "r1>0" unfolding r1_def using \fr>0\ \gr>0\ by auto - have fg_times:"fg w = (fp w * gp w) * (w - z) powr (of_int (fn+gn))" and fgp_nz:"fp w*gp w\0" + have fg_times:"fg w = (fp w * gp w) * (w - z) powi (fn+gn)" and fgp_nz:"fp w*gp w\0" when "w\ball z r1 - {z}" for w proof - - have "f w = fp w * (w - z) powr of_int fn" "fp w\0" + have "f w = fp w * (w - z) powi fn" "fp w\0" using fr(2)[rule_format,of w] that unfolding r1_def by auto - moreover have "g w = gp w * (w - z) powr of_int gn" "gp w \ 0" + moreover have "g w = gp w * (w - z) powi gn" "gp w \ 0" using gr(2)[rule_format, of w] that unfolding r1_def by auto - ultimately show "fg w = (fp w * gp w) * (w - z) powr (of_int (fn+gn))" "fp w*gp w\0" - unfolding fg_def by (auto simp add:powr_add) + ultimately show "fg w = (fp w * gp w) * (w - z) powi (fn+gn)" "fp w*gp w\0" + using that unfolding fg_def by (auto simp add:power_int_add) qed have [intro]: "fp \z\fp z" "gp \z\gp z" @@ -745,9 +743,8 @@ have "(\w. (fp w * gp w) * (w - z) ^ (nat (fn+gn))) \z\0" using that by (auto intro!:tendsto_eq_intros) then have "fg \z\ 0" - using Lim_transform_within[OF _ \r1>0\] - by (smt (verit, ccfv_SIG) DiffI dist_commute dist_nz fg_times mem_ball powr_of_int right_minus_eq - singletonD that) + apply (elim Lim_transform_within[OF _ \r1>0\]) + by (smt (verit, best) Diff_iff dist_commute fg_times mem_ball power_int_def singletonD that zero_less_dist_iff) then show ?thesis unfolding not_essential_def fg_def by auto qed moreover have ?thesis when "fn+gn=0" @@ -771,7 +768,8 @@ using filterlim_divide_at_infinity by blast then have "is_pole fg z" unfolding is_pole_def apply (elim filterlim_transform_within[OF _ _ \r1>0\]) - by (simp_all add: dist_commute fg_times of_int_of_nat powr_minus_divide that) + using that + by (simp_all add: dist_commute fg_times of_int_of_nat divide_simps power_int_def del: minus_add_distrib) then show ?thesis unfolding not_essential_def fg_def by auto qed ultimately show ?thesis unfolding not_essential_def fg_def by fastforce @@ -1091,13 +1089,13 @@ definition\<^marker>\tag important\ zorder :: "(complex \ complex) \ complex \ int" where "zorder f z = (THE n. (\h r. r>0 \ h holomorphic_on cball z r \ h z\0 - \ (\w\cball z r - {z}. f w = h w * (w-z) powr (of_int n) + \ (\w\cball z r - {z}. f w = h w * (w-z) powi n \ h w \0)))" definition\<^marker>\tag important\ zor_poly ::"[complex \ complex, complex] \ complex \ complex" where "zor_poly f z = (SOME h. \r. r > 0 \ h holomorphic_on cball z r \ h z \ 0 - \ (\w\cball z r - {z}. f w = h w * (w - z) powr (zorder f z) + \ (\w\cball z r - {z}. f w = h w * (w - z) powi (zorder f z) \ h w \0))" lemma zorder_exist: @@ -1107,10 +1105,10 @@ and f_ness:"not_essential f z" and f_nconst:"\\<^sub>Fw in (at z). f w\0" shows "g z\0 \ (\r. r>0 \ g holomorphic_on cball z r - \ (\w\cball z r - {z}. f w = g w * (w-z) powr n \ g w \0))" + \ (\w\cball z r - {z}. f w = g w * (w-z) powi n \ g w \0))" proof - define P where "P = (\n g r. 0 < r \ g holomorphic_on cball z r \ g z\0 - \ (\w\cball z r - {z}. f w = g w * (w-z) powr (of_int n) \ g w\0))" + \ (\w\cball z r - {z}. f w = g w * (w-z) powi n \ g w\0))" have "\!n. \g r. P n g r" using holomorphic_factor_puncture[OF assms(3-)] unfolding P_def by auto then have "\g r. P n g r" @@ -1163,20 +1161,20 @@ obtain fr where [simp]:"fp z \ 0" and "fr > 0" and fr: "fp holomorphic_on cball z fr" - "\w\cball z fr - {z}. f w = fp w * (w - z) powr of_int fn \ fp w \ 0" + "\w\cball z fr - {z}. f w = fp w * (w - z) powi fn \ fp w \ 0" using zorder_exist[OF f_iso f_ness f_nconst,folded fn_def fp_def] by auto - have fr_inverse: "vf w = (inverse (fp w)) * (w - z) powr (of_int (-fn))" + have fr_inverse: "vf w = (inverse (fp w)) * (w - z) powi (-fn)" and fr_nz: "inverse (fp w) \ 0" when "w\ball z fr - {z}" for w proof - - have "f w = fp w * (w - z) powr of_int fn" "fp w\0" + have "f w = fp w * (w - z) powi fn" "fp w\0" using fr(2)[rule_format,of w] that by auto - then show "vf w = (inverse (fp w)) * (w - z) powr (of_int (-fn))" "inverse (fp w)\0" - unfolding vf_def by (auto simp add:powr_minus) + then show "vf w = (inverse (fp w)) * (w - z) powi (-fn)" "inverse (fp w)\0" + by (simp_all add: power_int_minus vf_def) qed obtain vfr where [simp]:"vfp z \ 0" and "vfr>0" and vfr:"vfp holomorphic_on cball z vfr" - "(\w\cball z vfr - {z}. vf w = vfp w * (w - z) powr of_int vfn \ vfp w \ 0)" + "(\w\cball z vfr - {z}. vf w = vfp w * (w - z) powi vfn \ vfp w \ 0)" proof - have "isolated_singularity_at vf z" using isolated_singularity_at_inverse[OF f_iso f_ness] unfolding vf_def . @@ -1195,8 +1193,8 @@ have \
: "\w. \fp w = 0; dist z w < fr\ \ False" using fr_nz by force then show "\w\ball z r1 - {z}. - vf w = vfp w * (w - z) powr complex_of_int vfn \ - vfp w \ 0 \ vf w = inverse (fp w) * (w - z) powr complex_of_int (- fn) \ + vf w = vfp w * (w - z) powi vfn \ + vfp w \ 0 \ vf w = inverse (fp w) * (w - z) powi (- fn) \ inverse (fp w) \ 0" using fr_inverse r1_def vfr(2) by (smt (verit) Diff_iff inverse_nonzero_iff_nonzero mem_ball mem_cball) @@ -1225,7 +1223,7 @@ obtain r1 where "r1>0" "zor_poly f z z \ 0" and holo1:"zor_poly f z holomorphic_on cball z r1" and rball1:"\w\cball z r1 - {z}. - f w = zor_poly f z w * (w - z) powr of_int (zorder f z) \ + f w = zor_poly f z w * (w - z) powi (zorder f z) \ zor_poly f z w \ 0" using zorder_exist[OF iso1 ness1 nzero1] by blast @@ -1245,7 +1243,7 @@ ultimately obtain r2 where "r2>0" "zor_poly ff 0 0 \ 0" and holo2:"zor_poly ff 0 holomorphic_on cball 0 r2" and rball2:"\w\cball 0 r2 - {0}. - ff w = zor_poly ff 0 w * w powr of_int (zorder ff 0) \ + ff w = zor_poly ff 0 w * w powi (zorder ff 0) \ zor_poly ff 0 w \ 0" using zorder_exist[of ff 0] by auto @@ -1255,9 +1253,9 @@ have "zor_poly f z w = zor_poly ff 0 (w - z)" if "w\ball z r - {z}" for w proof - - define n::complex where "n= of_int (zorder f z)" + define n where "n \ zorder f z" - have "f w = zor_poly f z w * (w - z) powr n" + have "f w = zor_poly f z w * (w - z) powi n" proof - have "w\cball z r1 - {z}" using r_def that by auto @@ -1265,26 +1263,25 @@ show ?thesis unfolding n_def by auto qed - moreover have "f w = zor_poly ff 0 (w - z) * (w - z) powr n" + moreover have "f w = zor_poly ff 0 (w - z) * (w - z) powi n" proof - have "w-z\cball 0 r2 - {0}" using r_def that by (auto simp:dist_complex_def) from rball2[rule_format, OF this] have "ff (w - z) = zor_poly ff 0 (w - z) * (w - z) - powr of_int (zorder ff 0)" + powi (zorder ff 0)" by simp moreover have "of_int (zorder ff 0) = n" unfolding n_def ff_def by (simp add:zorder_shift' add.commute) ultimately show ?thesis unfolding ff_def by auto qed - ultimately have "zor_poly f z w * (w - z) powr n - = zor_poly ff 0 (w - z) * (w - z) powr n" + ultimately have "zor_poly f z w * (w - z) powi n + = zor_poly ff 0 (w - z) * (w - z) powi n" by auto - moreover have "(w - z) powr n \0" + moreover have "(w - z) powi n \0" using that by auto ultimately show ?thesis - apply (subst (asm) mult_cancel_right) - by (simp add:ff_def) + using mult_cancel_right by blast qed then have "\\<^sub>F w in at z. zor_poly f z w = zor_poly ff 0 (w - z)" @@ -1327,31 +1324,32 @@ using fg_nconst by (auto elim!:frequently_elim1) obtain fr where [simp]:"fp z \ 0" and "fr > 0" and fr: "fp holomorphic_on cball z fr" - "\w\cball z fr - {z}. f w = fp w * (w - z) powr of_int fn \ fp w \ 0" + "\w\cball z fr - {z}. f w = fp w * (w - z) powi fn \ fp w \ 0" using zorder_exist[OF f_iso f_ness f_nconst,folded fp_def fn_def] by auto obtain gr where [simp]:"gp z \ 0" and "gr > 0" and gr: "gp holomorphic_on cball z gr" - "\w\cball z gr - {z}. g w = gp w * (w - z) powr of_int gn \ gp w \ 0" + "\w\cball z gr - {z}. g w = gp w * (w - z) powi gn \ gp w \ 0" using zorder_exist[OF g_iso g_ness g_nconst,folded gn_def gp_def] by auto define r1 where "r1=min fr gr" have "r1>0" unfolding r1_def using \fr>0\ \gr>0\ by auto - have fg_times:"fg w = (fp w * gp w) * (w - z) powr (of_int (fn+gn))" and fgp_nz:"fp w*gp w\0" + have fg_times:"fg w = (fp w * gp w) * (w - z) powi (fn+gn)" and fgp_nz:"fp w*gp w\0" when "w\ball z r1 - {z}" for w proof - - have "f w = fp w * (w - z) powr of_int fn" "fp w\0" + have "f w = fp w * (w - z) powi fn" "fp w\0" using fr(2)[rule_format,of w] that unfolding r1_def by auto - moreover have "g w = gp w * (w - z) powr of_int gn" "gp w \ 0" + moreover have "g w = gp w * (w - z) powi gn" "gp w \ 0" using gr(2)[rule_format, of w] that unfolding r1_def by auto - ultimately show "fg w = (fp w * gp w) * (w - z) powr (of_int (fn+gn))" "fp w*gp w\0" - unfolding fg_def by (auto simp add:powr_add) + ultimately show "fg w = (fp w * gp w) * (w - z) powi (fn+gn)" "fp w*gp w\0" + using that + unfolding fg_def by (auto simp add:power_int_add) qed obtain fgr where [simp]:"fgp z \ 0" and "fgr > 0" and fgr: "fgp holomorphic_on cball z fgr" - "\w\cball z fgr - {z}. fg w = fgp w * (w - z) powr of_int fgn \ fgp w \ 0" + "\w\cball z fgr - {z}. fg w = fgp w * (w - z) powi fgn \ fgp w \ 0" proof - have "fgp z \ 0 \ (\r>0. fgp holomorphic_on cball z r - \ (\w\cball z r - {z}. fg w = fgp w * (w - z) powr of_int fgn \ fgp w \ 0))" + \ (\w\cball z r - {z}. fg w = fgp w * (w - z) powi fgn \ fgp w \ 0))" apply (rule zorder_exist[of fg z, folded fgn_def fgp_def]) subgoal unfolding fg_def using isolated_singularity_at_times[OF f_iso g_iso] . subgoal unfolding fg_def using not_essential_times[OF f_ness g_ness f_iso g_iso] . @@ -1371,8 +1369,8 @@ fix w assume "w \ ball z r2 - {z}" then have "w \ ball z r1 - {z}" "w \ cball z fgr - {z}" unfolding r2_def by auto from fg_times[OF this(1)] fgp_nz[OF this(1)] fgr(2)[rule_format,OF this(2)] - show "fg w = fgp w * (w - z) powr of_int fgn \ fgp w \ 0 - \ fg w = fp w * gp w * (w - z) powr of_int (fn + gn) \ fp w * gp w \ 0" by auto + show "fg w = fgp w * (w - z) powi fgn \ fgp w \ 0 + \ fg w = fp w * gp w * (w - z) powi (fn + gn) \ fp w * gp w \ 0" by auto qed subgoal using fgr(1) unfolding r2_def r1_def by (auto intro!:holomorphic_intros) subgoal using fr(1) gr(1) unfolding r2_def r1_def by (auto intro!:holomorphic_intros) @@ -1431,10 +1429,10 @@ \ (\w\cball z r. f w = g w * (w-z) ^ nat n \ g w \0))" proof - obtain r where "g z \ 0" and r: "r>0" "cball z r \ s" "g holomorphic_on cball z r" - "(\w\cball z r - {z}. f w = g w * (w - z) powr of_int n \ g w \ 0)" + "(\w\cball z r - {z}. f w = g w * (w - z) powi n \ g w \ 0)" proof - have "g z \ 0 \ (\r>0. g holomorphic_on cball z r - \ (\w\cball z r - {z}. f w = g w * (w - z) powr of_int n \ g w \ 0))" + \ (\w\cball z r - {z}. f w = g w * (w - z) powi n \ g w \ 0))" proof (rule zorder_exist[of f z,folded g_def n_def]) show "isolated_singularity_at f z" unfolding isolated_singularity_at_def using holo assms(4,6) @@ -1453,7 +1451,7 @@ by auto qed then obtain r1 where "g z \ 0" "r1>0" and r1:"g holomorphic_on cball z r1" - "(\w\cball z r1 - {z}. f w = g w * (w - z) powr of_int n \ g w \ 0)" + "(\w\cball z r1 - {z}. f w = g w * (w - z) powi n \ g w \ 0)" by auto obtain r2 where r2: "r2>0" "cball z r2 \ s" using assms(4,6) open_contains_cball_eq by blast @@ -1461,7 +1459,7 @@ have "r3>0" "cball z r3 \ s" using \r1>0\ r2 unfolding r3_def by auto moreover have "g holomorphic_on cball z r3" using r1(1) unfolding r3_def by auto - moreover have "(\w\cball z r3 - {z}. f w = g w * (w - z) powr of_int n \ g w \ 0)" + moreover have "(\w\cball z r3 - {z}. f w = g w * (w - z) powi n \ g w \ 0)" using r1(2) unfolding r3_def by auto ultimately show ?thesis using that[of r3] \g z\0\ by auto qed @@ -1469,22 +1467,23 @@ have fz_lim: "f\ z \ f z" by (metis assms(4,6) at_within_open continuous_on holo holomorphic_on_imp_continuous_on) have gz_lim: "g \z\g z" - by (metis r open_ball at_within_open ball_subset_cball centre_in_ball - continuous_on_def continuous_on_subset holomorphic_on_imp_continuous_on) + using r + by (meson Elementary_Metric_Spaces.open_ball analytic_at analytic_at_imp_isCont + ball_subset_cball centre_in_ball holomorphic_on_subset isContD) have if_0:"if f z=0 then n > 0 else n=0" proof - - have "(\w. g w * (w - z) powr of_int n) \z\ f z" + have "(\w. g w * (w - z) powi n) \z\ f z" using fz_lim Lim_transform_within_open[where s="ball z r"] r by fastforce - then have "(\w. (g w * (w - z) powr of_int n) / g w) \z\ f z/g z" + then have "(\w. (g w * (w - z) powi n) / g w) \z\ f z/g z" using gz_lim \g z \ 0\ tendsto_divide by blast - then have powr_tendsto:"(\w. (w - z) powr of_int n) \z\ f z/g z" + then have powi_tendsto:"(\w. (w - z) powi n) \z\ f z/g z" using Lim_transform_within_open[where s="ball z r"] r by fastforce have ?thesis when "n\0" "f z=0" proof - have "(\w. (w - z) ^ nat n) \z\ f z/g z" - using powr_tendsto Lim_transform_within[where d=r] - by (fastforce simp: powr_of_int \n\0\ \r>0\) + using Lim_transform_within[OF powi_tendsto, where d=r] + by (meson power_int_def r(1) that(1)) then have *:"(\w. (w - z) ^ nat n) \z\ 0" using \f z=0\ by simp moreover have False when "n=0" proof - @@ -1499,8 +1498,8 @@ have False when "n>0" proof - have "(\w. (w - z) ^ nat n) \z\ f z/g z" - using powr_tendsto Lim_transform_within[where d=r] - by (fastforce simp add: powr_of_int \n\0\ \r>0\) + using Lim_transform_within[OF powi_tendsto, where d=r] + by (meson \0 \ n\ power_int_def r(1)) moreover have "(\w. (w - z) ^ nat n) \z\ 0" using \n>0\ by (auto intro!:tendsto_eq_intros) ultimately show False using \f z\0\ \g z\0\ using LIM_unique divide_eq_0_iff by blast @@ -1510,11 +1509,13 @@ moreover have False when "n<0" proof - have "(\w. inverse ((w - z) ^ nat (- n))) \z\ f z/g z" - "(\w.((w - z) ^ nat (- n))) \z\ 0" - apply (smt (verit, ccfv_SIG) LIM_cong eq_iff_diff_eq_0 powr_of_int powr_tendsto that) + by (smt (verit) LIM_cong power_int_def power_inverse powi_tendsto that) + moreover + have "(\w.((w - z) ^ nat (- n))) \z\ 0" using that by (auto intro!:tendsto_eq_intros) - from tendsto_mult[OF this,simplified] - have "(\x. inverse ((x - z) ^ nat (- n)) * (x - z) ^ nat (- n)) \z\ 0" . + ultimately + have "(\x. inverse ((x - z) ^ nat (- n)) * (x - z) ^ nat (- n)) \z\ 0" + using tendsto_mult by fastforce then have "(\x. 1::complex) \z\ 0" by (elim Lim_transform_within_open[where s=UNIV],auto) then show False using LIM_const_eq by fastforce @@ -1531,10 +1532,10 @@ fix x assume "0 < dist x z" "dist x z < r" then have "x \ cball z r - {z}" "x\z" unfolding cball_def by (auto simp add: dist_commute) - then have "f x = g x * (x - z) powr of_int n" + then have "f x = g x * (x - z) powi n" using r(4)[rule_format,of x] by simp also have "... = g x * (x - z) ^ nat n" - by (smt (verit) \x \ z\ if_0 powr_of_int right_minus_eq) + by (smt (verit, best) if_0 int_nat_eq power_int_of_nat) finally show "f x = g x * (x - z) ^ nat n" . qed moreover have "(\w. g w * (w-z) ^ nat n) \z\ g w * (w-z) ^ nat n" @@ -1543,9 +1544,10 @@ then show ?thesis using \g z\0\ True by auto next case False - then have "f w = g w * (w - z) powr of_int n \ g w \ 0" + then have "f w = g w * (w - z) powi n \ g w \ 0" using r(4) that by auto - then show ?thesis using False if_0 powr_of_int by (auto split:if_splits) + then show ?thesis + by (smt (verit, best) False if_0 int_nat_eq power_int_of_nat) qed ultimately show ?thesis using r by auto qed @@ -1560,10 +1562,10 @@ \ (\w\cball z r - {z}. f w = g w / (w-z) ^ nat (- n) \ g w \0))" proof - obtain r where "g z \ 0" and r: "r>0" "cball z r \ s" "g holomorphic_on cball z r" - "(\w\cball z r - {z}. f w = g w * (w - z) powr of_int n \ g w \ 0)" + "(\w\cball z r - {z}. f w = g w * (w - z) powi n \ g w \ 0)" proof - have "g z \ 0 \ (\r>0. g holomorphic_on cball z r - \ (\w\cball z r - {z}. f w = g w * (w - z) powr of_int n \ g w \ 0))" + \ (\w\cball z r - {z}. f w = g w * (w - z) powi n \ g w \ 0))" proof (rule zorder_exist[of f z,folded g_def n_def]) show "isolated_singularity_at f z" unfolding isolated_singularity_at_def using holo assms(4,5) @@ -1576,7 +1578,7 @@ by auto qed then obtain r1 where "g z \ 0" "r1>0" and r1:"g holomorphic_on cball z r1" - "(\w\cball z r1 - {z}. f w = g w * (w - z) powr of_int n \ g w \ 0)" + "(\w\cball z r1 - {z}. f w = g w * (w - z) powi n \ g w \ 0)" by auto obtain r2 where r2: "r2>0" "cball z r2 \ s" using assms(4,5) open_contains_cball_eq by metis @@ -1584,7 +1586,7 @@ have "r3>0" "cball z r3 \ s" using \r1>0\ r2 unfolding r3_def by auto moreover have "g holomorphic_on cball z r3" using r1(1) unfolding r3_def by auto - moreover have "(\w\cball z r3 - {z}. f w = g w * (w - z) powr of_int n \ g w \ 0)" + moreover have "(\w\cball z r3 - {z}. f w = g w * (w - z) powi n \ g w \ 0)" using r1(2) unfolding r3_def by auto ultimately show ?thesis using that[of r3] \g z\0\ by auto qed @@ -1599,7 +1601,7 @@ have "\\<^sub>F x in at z. f x = g x * (x - z) ^ nat n" unfolding eventually_at_topological apply (rule_tac exI[where x="ball z r"]) - using r powr_of_int \\ n < 0\ by auto + by (simp add: \\ n < 0\ linorder_not_le power_int_def r(1) r(4)) moreover have "(\x. g x * (x - z) ^ nat n) \z\ c" proof (cases "n=0") case True @@ -1616,14 +1618,14 @@ unfolding is_pole_def by blast qed moreover have "\w\cball z r - {z}. f w = g w / (w-z) ^ nat (- n) \ g w \0" - using r(4) \n<0\ powr_of_int - by (metis Diff_iff divide_inverse eq_iff_diff_eq_0 insert_iff linorder_not_le) + using r(4) \n<0\ + by (smt (verit) inverse_eq_divide mult.right_neutral power_int_def power_inverse times_divide_eq_right) ultimately show ?thesis using r(1-3) \g z\0\ by auto qed lemma zorder_eqI: assumes "open s" "z \ s" "g holomorphic_on s" "g z \ 0" - assumes fg_eq:"\w. \w \ s;w\z\ \ f w = g w * (w - z) powr n" + assumes fg_eq:"\w. \w \ s;w\z\ \ f w = g w * (w - z) powi n" shows "zorder f z = n" proof - have "continuous_on s g" by (rule holomorphic_on_imp_continuous_on) fact @@ -1634,9 +1636,9 @@ ultimately obtain r where r: "r > 0" "cball z r \ s \ (g -` (-{0}))" unfolding open_contains_cball by blast - let ?gg= "(\w. g w * (w - z) powr n)" + let ?gg= "(\w. g w * (w - z) powi n)" define P where "P = (\n g r. 0 < r \ g holomorphic_on cball z r \ g z\0 - \ (\w\cball z r - {z}. f w = g w * (w-z) powr (of_int n) \ g w\0))" + \ (\w\cball z r - {z}. f w = g w * (w-z) powi n \ g w\0))" have "P n g r" unfolding P_def using r assms(3,4,5) by auto then have "\g r. P n g r" by auto @@ -1663,7 +1665,7 @@ assms holomorphic_on_subset isolated_singularity_at_def openE) qed moreover - have "\\<^sub>F w in at z. g w * (w - z) powr n = f w" + have "\\<^sub>F w in at z. g w * (w - z) powi n = f w" unfolding eventually_at_topological using assms fg_eq by force ultimately show "not_essential f z" using not_essential_transform by blast @@ -1678,7 +1680,7 @@ have "z' \ cball z r" unfolding z'_def using \r>0\ \d>0\ by (auto simp add:dist_norm) then show " z' \ s" using r(2) by blast - show "g z' * (z' - z) powr of_int n \ 0" + show "g z' * (z' - z) powi n \ 0" using P_def \P n g r\ \z' \ cball z r\ \z' \ z\ by auto qed ultimately show "\x\UNIV. x \ z \ dist x z < d \ f x \ 0" by auto @@ -1813,7 +1815,7 @@ shows zorder_cong:"zorder f z = zorder g z'" and zor_poly_cong:"zor_poly f z = zor_poly g z'" proof - define P where "P = (\ff n h r. 0 < r \ h holomorphic_on cball z r \ h z\0 - \ (\w\cball z r - {z}. ff w = h w * (w-z) powr (of_int n) \ h w\0))" + \ (\w\cball z r - {z}. ff w = h w * (w-z) powi n \ h w\0))" have "(\r. P f n h r) = (\r. P g n h r)" for n h proof - have *: "\r. P g n h r" if "\r. P f n h r" and "eventually (\x. f x = g x) (at z)" for f g @@ -1825,9 +1827,9 @@ have "r>0" "h z\0" using r1_P \r2>0\ unfolding r_def P_def by auto moreover have "h holomorphic_on cball z r" using r1_P unfolding P_def r_def by auto - moreover have "g w = h w * (w - z) powr of_int n \ h w \ 0" when "w\cball z r - {z}" for w + moreover have "g w = h w * (w - z) powi n \ h w \ 0" when "w\cball z r - {z}" for w proof - - have "f w = h w * (w - z) powr of_int n \ h w \ 0" + have "f w = h w * (w - z) powi n \ h w \ 0" using r1_P that unfolding P_def r_def by auto moreover have "f w=g w" using r2_dist[rule_format,of w] that unfolding r_def by (simp add: dist_commute) @@ -1859,7 +1861,7 @@ proof - define P where "P = (\f n h r. 0 < r \ h holomorphic_on cball z r \ - h z \ 0 \ (\w\cball z r - {z}. f w = h w * (w - z) powr of_int n \ h w \ 0))" + h z \ 0 \ (\w\cball z r - {z}. f w = h w * (w - z) powi n \ h w \ 0))" have *: "P (\x. c * f x) n (\x. c * h x) r" if "P f n h r" "c \ 0" for f n h r c using that unfolding P_def by (auto intro!: holomorphic_intros) have "(\h r. P (\x. c * f x) n h r) \ (\h r. P f n h r)" for n @@ -1874,17 +1876,17 @@ lemma zorder_nonzero_div_power: assumes sz: "open s" "z \ s" "f holomorphic_on s" "f z \ 0" and "n > 0" shows "zorder (\w. f w / (w - z) ^ n) z = - n" - using zorder_eqI [OF sz] by (simp add: powr_minus_divide) + by (intro zorder_eqI [OF sz]) (simp add: inverse_eq_divide power_int_minus) lemma zor_poly_eq: assumes "isolated_singularity_at f z" "not_essential f z" "\\<^sub>F w in at z. f w \ 0" - shows "eventually (\w. zor_poly f z w = f w * (w - z) powr - zorder f z) (at z)" + shows "eventually (\w. zor_poly f z w = f w * (w - z) powi - zorder f z) (at z)" proof - obtain r where r:"r>0" - "(\w\cball z r - {z}. f w = zor_poly f z w * (w - z) powr of_int (zorder f z))" + "(\w\cball z r - {z}. f w = zor_poly f z w * (w - z) powi (zorder f z))" using zorder_exist[OF assms] by blast - then have *: "\w\ball z r - {z}. zor_poly f z w = f w * (w - z) powr - zorder f z" - by (auto simp: field_simps powr_minus) + then have *: "\w\ball z r - {z}. zor_poly f z w = f w * (w - z) powi - zorder f z" + by (auto simp: field_simps power_int_minus) have "eventually (\w. w \ ball z r - {z}) (at z)" using r eventually_at_ball'[of r z UNIV] by auto thus ?thesis by eventually_elim (insert *, auto) @@ -1924,27 +1926,27 @@ fixes f :: "complex \ complex" and z0 :: complex defines "n \ zorder f z0" assumes "isolated_singularity_at f z0" "not_essential f z0" "\\<^sub>F w in at z0. f w \ 0" - assumes lim: "((\x. f (g x) * (g x - z0) powr - n) \ c) F" + assumes lim: "((\x. f (g x) * (g x - z0) powi - n) \ c) F" assumes g: "filterlim g (at z0) F" and "F \ bot" shows "zor_poly f z0 z0 = c" proof - from zorder_exist[OF assms(2-4)] obtain r where r: "r > 0" "zor_poly f z0 holomorphic_on cball z0 r" - "\w. w \ cball z0 r - {z0} \ f w = zor_poly f z0 w * (w - z0) powr n" + "\w. w \ cball z0 r - {z0} \ f w = zor_poly f z0 w * (w - z0) powi n" unfolding n_def by blast from r(1) have "eventually (\w. w \ ball z0 r \ w \ z0) (at z0)" using eventually_at_ball'[of r z0 UNIV] by auto - hence "eventually (\w. zor_poly f z0 w = f w * (w - z0) powr - n) (at z0)" - by eventually_elim (insert r, auto simp: field_simps powr_minus) + hence "eventually (\w. zor_poly f z0 w = f w * (w - z0) powi - n) (at z0)" + by eventually_elim (insert r, auto simp: field_simps power_int_minus) moreover have "continuous_on (ball z0 r) (zor_poly f z0)" using r by (intro holomorphic_on_imp_continuous_on) auto with r(1,2) have "isCont (zor_poly f z0) z0" by (auto simp: continuous_on_eq_continuous_at) hence "(zor_poly f z0 \ zor_poly f z0 z0) (at z0)" unfolding isCont_def . - ultimately have "((\w. f w * (w - z0) powr - n) \ zor_poly f z0 z0) (at z0)" + ultimately have "((\w. f w * (w - z0) powi - n) \ zor_poly f z0 z0) (at z0)" by (blast intro: Lim_transform_eventually) - hence "((\x. f (g x) * (g x - z0) powr - n) \ zor_poly f z0 z0) F" + hence "((\x. f (g x) * (g x - z0) powi - n) \ zor_poly f z0 z0) F" by (rule filterlim_compose[OF _ g]) from tendsto_unique[OF \F \ bot\ this lim] show ?thesis . qed @@ -2082,9 +2084,9 @@ proof (rule zorder_eqI) show "open (ball x r)" "x \ ball x r" using \r > 0\ by auto - show "f' w = (deriv P w * (w - x) - of_nat n * P w) * (w - x) powr of_int (- int (Suc n))" + show "f' w = (deriv P w * (w - x) - of_nat n * P w) * (w - x) powi (- int (Suc n))" if "w \ ball x r" "w \ x" for w - using that D_eq[of w] n by (auto simp: D_def powr_diff powr_minus powr_nat' divide_simps) + using that D_eq[of w] n by (auto simp: D_def power_int_diff power_int_minus powr_nat' divide_simps) qed (use r n in \auto intro!: holomorphic_intros\) thus "zorder f' x = zorder f x - 1" using n by (simp add: n_def) @@ -2306,10 +2308,10 @@ define nn where "nn = nat (-n)" obtain r where "P z \ 0" "r>0" and r_holo:"P holomorphic_on cball z r" and - w_Pn:"(\w\cball z r - {z}. f w = P w * (w - z) powr of_int n \ P w \ 0)" + w_Pn:"(\w\cball z r - {z}. f w = P w * (w - z) powi n \ P w \ 0)" using zorder_exist[OF iso f_ness fre_nz,folded P_def n_def] by auto - have "is_pole (\w. P w * (w - z) powr of_int n) z" + have "is_pole (\w. P w * (w - z) powi n) z" unfolding is_pole_def proof (rule tendsto_mult_filterlim_at_infinity) show "P \z\ P z" @@ -2323,18 +2325,17 @@ using \n<0\ by (auto intro!:tendsto_eq_intros filterlim_atI simp add:eventually_at_filter) - then show "LIM x at z. (x - z) powr of_int n :> at_infinity" + then show "LIM x at z. (x - z) powi n :> at_infinity" proof (elim filterlim_mono_eventually) - have "inverse ((x - z) ^ nat (-n)) = (x - z) powr of_int n" + have "inverse ((x - z) ^ nat (-n)) = (x - z) powi n" if "x\z" for x - apply (subst powr_of_int) - using \n<0\ using that by auto + by (metis \n < 0\ linorder_not_le power_int_def power_inverse) then show "\\<^sub>F x in at z. inverse ((x - z) ^ nat (-n)) - = (x - z) powr of_int n" + = (x - z) powi n" by (simp add: eventually_at_filter) qed auto qed - moreover have "\\<^sub>F w in at z. f w = P w * (w - z) powr of_int n" + moreover have "\\<^sub>F w in at z. f w = P w * (w - z) powi n" unfolding eventually_at_le apply (rule exI[where x=r]) using w_Pn \r>0\ by (simp add: dist_commute) @@ -2429,7 +2430,7 @@ obtain r where "P z \ 0" "r>0" and P_holo:"P holomorphic_on cball z r" and "(\w\cball z r - {z}. f w - = P w * (w - z) powr of_int n \ P w \ 0)" + = P w * (w - z) powi n \ P w \ 0)" using zorder_exist[OF f_iso f_ness f_nconst,folded P_def n_def] by auto from this(4) have f_eq:"(\w\cball z r - {z}. f w @@ -2475,10 +2476,9 @@ show "g z \ 0" unfolding g_def using \P z \ 0\ \n\0\ by auto show "deriv f w = - (deriv P w * (w - z) + of_int n * P w) * (w - z) powr of_int (n - 1)" + (deriv P w * (w - z) + of_int n * P w) * (w - z) powi (n - 1)" if "w \ ball z r" "w \ z" for w - apply (subst complex_powr_of_int) - using deriv_f_eq that unfolding D_def by auto + using D_def deriv_f_eq that by blast qed qed diff -r cf6947717650 -r 5158dc9d096b src/HOL/Complex_Analysis/Laurent_Convergence.thy --- a/src/HOL/Complex_Analysis/Laurent_Convergence.thy Mon Feb 20 21:53:15 2023 +0100 +++ b/src/HOL/Complex_Analysis/Laurent_Convergence.thy Tue Feb 21 11:25:23 2023 +0000 @@ -1091,7 +1091,7 @@ case True define n where "n = zorder f 0" obtain r where r: "zor_poly f 0 0 \ 0" "zor_poly f 0 holomorphic_on cball 0 r" "r > 0" - "\w\cball 0 r - {0}. f w = zor_poly f 0 w * w powr of_int n \ + "\w\cball 0 r - {0}. f w = zor_poly f 0 w * w powi n \ zor_poly f 0 w \ 0" using zorder_exist[OF assms True] unfolding n_def by auto have holo: "zor_poly f 0 holomorphic_on ball 0 r" @@ -1144,7 +1144,7 @@ from zorder_exist[OF iso ness this,folded df_def] obtain r where "r>0" and df_holo:"df holomorphic_on cball 0 r" and "df 0 \ 0" "\w\cball 0 r - {0}. - f (z + w) = df w * w powr of_int (zorder (\w. f (z + w)) 0) \ + f (z + w) = df w * w powi (zorder (\w. f (z + w)) 0) \ df w \ 0" by auto then have df_nz:"\w\ball 0 r. df w\0" by auto @@ -1340,7 +1340,7 @@ by (auto simp: eval_fps_at_0 G_def) next fix w :: complex assume "w \ A \ eball 0 (fls_conv_radius F)" "w \ 0" - thus "f w = eval_fps G w * (w - 0) powr of_int (fls_subdegree F)" + thus "f w = eval_fps G w * (w - 0) powi (fls_subdegree F)" using A unfolding G_def by (subst eval_fps_fls_base_factor) (auto simp: complex_powr_of_int power_int_minus field_simps) @@ -1567,7 +1567,7 @@ have n_altdef: "n = fls_subdegree F" using has_laurent_expansion_zorder_0 [OF assms(1)] by (simp add: n_def) obtain r where r: "zor_poly f 0 0 \ 0" "zor_poly f 0 holomorphic_on cball 0 r" "r > 0" - "\w\cball 0 r - {0}. f w = zor_poly f 0 w * w powr of_int n \ + "\w\cball 0 r - {0}. f w = zor_poly f 0 w * w powi n \ zor_poly f 0 w \ 0" using zorder_exist[OF * freq] unfolding n_def by auto obtain r' where r': "r' > 0" "\x\ball 0 r'-{0}. eval_fls F x = f x" @@ -1590,7 +1590,7 @@ show ?case proof (cases "w = 0") case False - hence "f w = zor_poly f 0 w * w powr of_int n" + hence "f w = zor_poly f 0 w * w powi n" using r w by auto thus ?thesis using False by (simp add: powr_minus complex_powr_of_int power_int_minus) @@ -2728,7 +2728,7 @@ using \a \ 0\ by (intro holomorphic_on_compose_gen[OF _ r'(4)] holomorphic_intros) auto show "a ^ n * (zor_poly f (a * z) \ (\w. a * w)) z \ 0" using r' \a \ 0\ by auto - show "f (a * w) = a ^ n * (zor_poly f (a * z) \ (*) a) w * (w - z) powr of_int (zorder f (a * z))" + show "f (a * w) = a ^ n * (zor_poly f (a * z) \ (*) a) w * (w - z) powi (zorder f (a * z))" if "w \ ball z (r' / norm a)" "w \ z" for w proof - have "f (a * w) = zor_poly f (a * z) (a * w) * (a * (w - z)) ^ n" @@ -2736,9 +2736,9 @@ by (auto simp: divide_simps mult_ac) also have "\ = a ^ n * zor_poly f (a * z) (a * w) * (w - z) ^ n" by (subst power_mult_distrib) (auto simp: mult_ac) - also have "(w - z) ^ n = (w - z) powr of_nat n" - using \w \ z\ by (subst powr_nat') auto - also have "of_nat n = of_int (zorder f (a * z))" + also have "(w - z) ^ n = (w - z) powi of_nat n" + by simp + also have "of_nat n = zorder f (a * z)" using r'(1) by (auto simp: n_def split: if_splits) finally show ?thesis unfolding o_def n_def . diff -r cf6947717650 -r 5158dc9d096b src/HOL/Complex_Analysis/Residue_Theorem.thy --- a/src/HOL/Complex_Analysis/Residue_Theorem.thy Mon Feb 20 21:53:15 2023 +0100 +++ b/src/HOL/Complex_Analysis/Residue_Theorem.thy Tue Feb 21 11:25:23 2023 +0000 @@ -3,7 +3,9 @@ imports Complex_Residues "HOL-Library.Landau_Symbols" begin -text \Could be moved to a previous theory importing both Landau Symbols and Elementary Metric Spaces\ +text \Several theorems that could be moved up, + IF there were a previous theory importing both Landau Symbols and Elementary Metric Spaces\ + lemma continuous_bounded_at_infinity_imp_bounded: fixes f :: "real \ 'a :: real_normed_field" assumes "f \ O[at_bot](\_. 1)" @@ -31,6 +33,66 @@ unfolding bounded_iff by blast qed +lemma holomorphic_on_extend: + assumes "f holomorphic_on S - {\}" "\ \ interior S" "f \ O[at \](\_. 1)" + shows "(\g. g holomorphic_on S \ (\z\S - {\}. g z = f z))" + by (subst holomorphic_on_extend_bounded) (insert assms, auto elim!: landau_o.bigE) + +lemma removable_singularities: + assumes "finite X" "X \ interior S" "f holomorphic_on (S - X)" + assumes "\z. z \ X \ f \ O[at z](\_. 1)" + shows "\g. g holomorphic_on S \ (\z\S-X. g z = f z)" + using assms +proof (induction arbitrary: f rule: finite_induct) + case empty + thus ?case by auto +next + case (insert z0 X f) + from insert.prems and insert.hyps have z0: "z0 \ interior (S - X)" + by (auto simp: interior_diff finite_imp_closed) + hence "\g. g holomorphic_on (S - X) \ (\z\S - X - {z0}. g z = f z)" + using insert.prems insert.hyps by (intro holomorphic_on_extend) auto + then obtain g where g: "g holomorphic_on (S - X)" "\z\S - X - {z0}. g z = f z" by blast + have "\h. h holomorphic_on S \ (\z\S - X. h z = g z)" + proof (rule insert.IH) + fix z0' assume z0': "z0' \ X" + hence "eventually (\z. z \ interior S - (X - {z0'}) - {z0}) (nhds z0')" + using insert.prems insert.hyps + by (intro eventually_nhds_in_open open_Diff finite_imp_closed) auto + hence ev: "eventually (\z. z \ S - X - {z0}) (at z0')" + unfolding eventually_at_filter + by eventually_elim (insert z0' insert.hyps interior_subset[of S], auto) + have "g \ \[at z0'](f)" + by (intro bigthetaI_cong eventually_mono[OF ev]) (insert g, auto) + also have "f \ O[at z0'](\_. 1)" + using z0' by (intro insert.prems) auto + finally show "g \ \" . + qed (insert insert.prems g, auto) + then obtain h where "h holomorphic_on S" "\z\S - X. h z = g z" by blast + with g have "h holomorphic_on S" "\z\S - insert z0 X. h z = f z" by auto + thus ?case by blast +qed + +lemma continuous_imp_bigo_1: + assumes "continuous (at x within A) f" + shows "f \ O[at x within A](\_. 1)" +proof (rule bigoI_tendsto) + from assms show "((\x. f x / 1) \ f x) (at x within A)" + by (auto simp: continuous_within) +qed auto + +lemma taylor_bigo_linear: + assumes "f field_differentiable at x0 within A" + shows "(\x. f x - f x0) \ O[at x0 within A](\x. x - x0)" +proof - + from assms obtain f' where "(f has_field_derivative f') (at x0 within A)" + by (auto simp: field_differentiable_def) + hence "((\x. (f x - f x0) / (x - x0)) \ f') (at x0 within A)" + by (auto simp: has_field_derivative_iff) + thus ?thesis by (intro bigoI_tendsto[where c = f']) (auto simp: eventually_at_filter) +qed + + subsection \Cauchy's residue theorem\ lemma get_integrable_path: @@ -509,12 +571,12 @@ proof - define po where "po \ zorder f p" define pp where "pp \ zor_poly f p" - define f' where "f' \ \w. pp w * (w - p) powr po" + define f' where "f' \ \w. pp w * (w - p) powi po" define ff' where "ff' \ (\x. deriv f' x * h x / f' x)" obtain r where "pp p\0" "r>0" and "rw\cball p r-{p}. f w = pp w * (w - p) powr po \ pp w \ 0)" + pp_po:"(\w\cball p r-{p}. f w = pp w * (w - p) powi po \ pp w \ 0)" proof - have "isolated_singularity_at f p" proof - @@ -565,12 +627,12 @@ then show False using \finite pz\ by auto qed ultimately obtain r where "pp p \ 0" and r:"r>0" "pp holomorphic_on cball p r" - "(\w\cball p r - {p}. f w = pp w * (w - p) powr of_int po \ pp w \ 0)" + "(\w\cball p r - {p}. f w = pp w * (w - p) powi po \ pp w \ 0)" using zorder_exist[of f p,folded po_def pp_def] by auto define r1 where "r1=min r e1 / 2" have "r1e1>0\ \r>0\ by auto moreover have "r1>0" "pp holomorphic_on cball p r1" - "(\w\cball p r1 - {p}. f w = pp w * (w - p) powr of_int po \ pp w \ 0)" + "(\w\cball p r1 - {p}. f w = pp w * (w - p) powi po \ pp w \ 0)" unfolding r1_def using \e1>0\ r by auto ultimately show ?thesis using that \pp p\0\ by auto qed @@ -604,13 +666,13 @@ define wp where "wp \ w-p" have "wp\0" and "pp w \0" unfolding wp_def using \w\p\ \w\ball p r\ pp_po by auto - moreover have der_f':"deriv f' w = po * pp w * (w-p) powr (po - 1) + deriv pp w * (w-p) powr po" + moreover have der_f':"deriv f' w = po * pp w * (w-p) powi (po - 1) + deriv pp w * (w-p) powi po" proof (rule DERIV_imp_deriv) have "(pp has_field_derivative (deriv pp w)) (at w)" using DERIV_deriv_iff_has_field_derivative pp_holo \w\p\ by (meson open_ball \w \ ball p r\ ball_subset_cball holomorphic_derivI holomorphic_on_subset) - then show " (f' has_field_derivative of_int po * pp w * (w - p) powr of_int (po - 1) - + deriv pp w * (w - p) powr of_int po) (at w)" + then show " (f' has_field_derivative of_int po * pp w * (w - p) powi (po - 1) + + deriv pp w * (w - p) powi po) (at w)" unfolding f'_def using \w\p\ by (auto intro!: derivative_eq_intros DERIV_cong[OF has_field_derivative_powr_of_int]) qed @@ -620,7 +682,7 @@ apply (unfold f'_def) apply (fold wp_def) apply (auto simp add:field_simps) - by (metis (no_types, lifting) diff_add_cancel mult.commute powr_add powr_to_1) + by (metis (no_types, lifting) mult.commute power_int_minus_mult) qed then have "cont ff p e2" unfolding cont_def proof (elim has_contour_integral_eq)