src/HOL/Multivariate_Analysis/Cauchy_Integral_Thm.thy
changeset 62217 527488dc8b90
parent 62175 8ffc4d0e652d
child 62343 24106dc44def
equal deleted inserted replaced
62216:5fb86150a579 62217:527488dc8b90
  5720 lemma higher_deriv_const [simp]: "(deriv ^^ n) (\<lambda>w. c) = (\<lambda>w. if n=0 then c else 0)"
  5720 lemma higher_deriv_const [simp]: "(deriv ^^ n) (\<lambda>w. c) = (\<lambda>w. if n=0 then c else 0)"
  5721   by (induction n) (auto simp: deriv_const)
  5721   by (induction n) (auto simp: deriv_const)
  5722 
  5722 
  5723 lemma higher_deriv_ident [simp]:
  5723 lemma higher_deriv_ident [simp]:
  5724      "(deriv ^^ n) (\<lambda>w. w) z = (if n = 0 then z else if n = 1 then 1 else 0)"
  5724      "(deriv ^^ n) (\<lambda>w. w) z = (if n = 0 then z else if n = 1 then 1 else 0)"
  5725   apply (induction n)
  5725   apply (induction n, simp)
  5726   apply (simp_all add: deriv_ident funpow_Suc_right del: funpow.simps, simp)
  5726   apply (metis higher_deriv_linear lambda_one)
  5727   done
  5727   done
  5728 
  5728 
  5729 corollary higher_deriv_id [simp]:
  5729 corollary higher_deriv_id [simp]:
  5730      "(deriv ^^ n) id z = (if n = 0 then z else if n = 1 then 1 else 0)"
  5730      "(deriv ^^ n) id z = (if n = 0 then z else if n = 1 then 1 else 0)"
  5731   by (simp add: id_def)
  5731   by (simp add: id_def)
  6891 
  6891 
  6892 subsection\<open>General, homology form of Cauchy's theorem.\<close>
  6892 subsection\<open>General, homology form of Cauchy's theorem.\<close>
  6893 
  6893 
  6894 text\<open>Proof is based on Dixon's, as presented in Lang's "Complex Analysis" book (page 147).\<close>
  6894 text\<open>Proof is based on Dixon's, as presented in Lang's "Complex Analysis" book (page 147).\<close>
  6895 
  6895 
       
  6896 lemma contour_integral_continuous_on_linepath_2D:
       
  6897   assumes "open u" and cont_dw: "\<And>w. w \<in> u \<Longrightarrow> F w contour_integrable_on (linepath a b)"
       
  6898       and cond_uu: "continuous_on (u \<times> u) (\<lambda>(x,y). F x y)"
       
  6899       and abu: "closed_segment a b \<subseteq> u"
       
  6900     shows "continuous_on u (\<lambda>w. contour_integral (linepath a b) (F w))"
       
  6901 proof -
       
  6902   have *: "\<exists>d>0. \<forall>x'\<in>u. dist x' w < d \<longrightarrow>
       
  6903                          dist (contour_integral (linepath a b) (F x'))
       
  6904                               (contour_integral (linepath a b) (F w)) \<le> \<epsilon>"
       
  6905           if "w \<in> u" "0 < \<epsilon>" "a \<noteq> b" for w \<epsilon>
       
  6906   proof -
       
  6907     obtain \<delta> where "\<delta>>0" and \<delta>: "cball w \<delta> \<subseteq> u" using open_contains_cball \<open>open u\<close> \<open>w \<in> u\<close> by force
       
  6908     let ?TZ = "{(t,z) |t z. t \<in> cball w \<delta> \<and> z \<in> closed_segment a b}"
       
  6909     have "uniformly_continuous_on ?TZ (\<lambda>(x,y). F x y)"
       
  6910       apply (rule compact_uniformly_continuous)
       
  6911       apply (rule continuous_on_subset[OF cond_uu])
       
  6912       using abu \<delta>
       
  6913       apply (auto simp: compact_Times simp del: mem_cball)
       
  6914       done
       
  6915     then obtain \<eta> where "\<eta>>0"
       
  6916         and \<eta>: "\<And>x x'. \<lbrakk>x\<in>?TZ; x'\<in>?TZ; dist x' x < \<eta>\<rbrakk> \<Longrightarrow>
       
  6917                          dist ((\<lambda>(x,y). F x y) x') ((\<lambda>(x,y). F x y) x) < \<epsilon>/norm(b - a)"
       
  6918       apply (rule uniformly_continuous_onE [where e = "\<epsilon>/norm(b - a)"])
       
  6919       using \<open>0 < \<epsilon>\<close> \<open>a \<noteq> b\<close> by auto
       
  6920     have \<eta>: "\<lbrakk>norm (w - x1) \<le> \<delta>;   x2 \<in> closed_segment a b; 
       
  6921               norm (w - x1') \<le> \<delta>;  x2' \<in> closed_segment a b; norm ((x1', x2') - (x1, x2)) < \<eta>\<rbrakk>
       
  6922               \<Longrightarrow> norm (F x1' x2' - F x1 x2) \<le> \<epsilon> / cmod (b - a)"
       
  6923              for x1 x2 x1' x2'
       
  6924       using \<eta> [of "(x1,x2)" "(x1',x2')"] by (force simp add: dist_norm)
       
  6925     have le_ee: "cmod (contour_integral (linepath a b) (\<lambda>x. F x' x - F w x)) \<le> \<epsilon>"
       
  6926                 if "x' \<in> u" "cmod (x' - w) < \<delta>" "cmod (x' - w) < \<eta>"  for x'
       
  6927     proof -
       
  6928       have "cmod (contour_integral (linepath a b) (\<lambda>x. F x' x - F w x)) \<le> \<epsilon>/norm(b - a) * norm(b - a)"
       
  6929         apply (rule has_contour_integral_bound_linepath [OF has_contour_integral_integral _ \<eta>])
       
  6930         apply (rule contour_integrable_diff [OF cont_dw cont_dw])
       
  6931         using \<open>0 < \<epsilon>\<close> \<open>a \<noteq> b\<close> \<open>0 < \<delta>\<close> \<open>w \<in> u\<close> that
       
  6932         apply (auto simp: norm_minus_commute)
       
  6933         done
       
  6934       also have "... = \<epsilon>" using \<open>a \<noteq> b\<close> by simp
       
  6935       finally show ?thesis .
       
  6936     qed
       
  6937     show ?thesis
       
  6938       apply (rule_tac x="min \<delta> \<eta>" in exI)
       
  6939       using \<open>0 < \<delta>\<close> \<open>0 < \<eta>\<close>
       
  6940       apply (auto simp: dist_norm contour_integral_diff [OF cont_dw cont_dw, symmetric] \<open>w \<in> u\<close> intro: le_ee)
       
  6941       done
       
  6942   qed
       
  6943   show ?thesis 
       
  6944     apply (rule continuous_onI)
       
  6945     apply (cases "a=b")
       
  6946     apply (auto intro: *)
       
  6947     done
       
  6948 qed  
       
  6949 
  6896 text\<open>This version has @{term"polynomial_function \<gamma>"} as an additional assumption.\<close>
  6950 text\<open>This version has @{term"polynomial_function \<gamma>"} as an additional assumption.\<close>
  6897 lemma Cauchy_integral_formula_global_weak:
  6951 lemma Cauchy_integral_formula_global_weak:
  6898     assumes u: "open u" and holf: "f holomorphic_on u"
  6952     assumes u: "open u" and holf: "f holomorphic_on u"
  6899         and z: "z \<in> u" and \<gamma>: "polynomial_function \<gamma>"
  6953         and z: "z \<in> u" and \<gamma>: "polynomial_function \<gamma>"
  6900         and pasz: "path_image \<gamma> \<subseteq> u - {z}" and loop: "pathfinish \<gamma> = pathstart \<gamma>"
  6954         and pasz: "path_image \<gamma> \<subseteq> u - {z}" and loop: "pathfinish \<gamma> = pathstart \<gamma>"
  7063   qed
  7117   qed
  7064   then have "(h \<longlongrightarrow> 0) at_infinity"
  7118   then have "(h \<longlongrightarrow> 0) at_infinity"
  7065     by (meson Lim_at_infinityI)
  7119     by (meson Lim_at_infinityI)
  7066   moreover have "h holomorphic_on UNIV"
  7120   moreover have "h holomorphic_on UNIV"
  7067   proof -
  7121   proof -
  7068     have con_ff: "continuous (at (x,z)) (\<lambda>y. (f(snd y) - f(fst y)) / (snd y - fst y))"
  7122     have con_ff: "continuous (at (x,z)) (\<lambda>(x,y). (f y - f x) / (y - x))"
  7069                  if "x \<in> u" "z \<in> u" "x \<noteq> z" for x z
  7123                  if "x \<in> u" "z \<in> u" "x \<noteq> z" for x z
  7070       using that conf
  7124       using that conf
  7071       apply (simp add: continuous_on_eq_continuous_at u)
  7125       apply (simp add: split_def continuous_on_eq_continuous_at u)
  7072       apply (simp | rule continuous_intros continuous_within_compose2 [where g=f])+
  7126       apply (simp | rule continuous_intros continuous_within_compose2 [where g=f])+
  7073       done
  7127       done
  7074     have con_fstsnd: "continuous_on UNIV (\<lambda>x. (fst x - snd x) ::complex)"
  7128     have con_fstsnd: "continuous_on UNIV (\<lambda>x. (fst x - snd x) ::complex)"
  7075       by (rule continuous_intros)+
  7129       by (rule continuous_intros)+
  7076     have open_uu_Id: "open (u \<times> u - Id)"
  7130     have open_uu_Id: "open (u \<times> u - Id)"
  7081       done
  7135       done
  7082     have con_derf: "continuous (at z) (deriv f)" if "z \<in> u" for z
  7136     have con_derf: "continuous (at z) (deriv f)" if "z \<in> u" for z
  7083       apply (rule continuous_on_interior [of u])
  7137       apply (rule continuous_on_interior [of u])
  7084       apply (simp add: holf holomorphic_deriv holomorphic_on_imp_continuous_on u)
  7138       apply (simp add: holf holomorphic_deriv holomorphic_on_imp_continuous_on u)
  7085       by (simp add: interior_open that u)
  7139       by (simp add: interior_open that u)
  7086     have tendsto_f': "((\<lambda>x. if snd x = fst x then deriv f (fst x)
  7140     have tendsto_f': "((\<lambda>(x,y). if y = x then deriv f (x)
  7087                                     else (f (snd x) - f (fst x)) / (snd x - fst x)) \<longlongrightarrow> deriv f x)
  7141                                 else (f (y) - f (x)) / (y - x)) \<longlongrightarrow> deriv f x)
  7088                       (at (x, x) within u \<times> u)" if "x \<in> u" for x
  7142                       (at (x, x) within u \<times> u)" if "x \<in> u" for x
  7089     proof (rule Lim_withinI)
  7143     proof (rule Lim_withinI)
  7090       fix e::real assume "0 < e"
  7144       fix e::real assume "0 < e"
  7091       obtain k1 where "k1>0" and k1: "\<And>x'. norm (x' - x) \<le> k1 \<Longrightarrow> norm (deriv f x' - deriv f x) < e"
  7145       obtain k1 where "k1>0" and k1: "\<And>x'. norm (x' - x) \<le> k1 \<Longrightarrow> norm (deriv f x' - deriv f x) < e"
  7092         using \<open>0 < e\<close> continuous_within_E [OF con_derf [OF \<open>x \<in> u\<close>]]
  7146         using \<open>0 < e\<close> continuous_within_E [OF con_derf [OF \<open>x \<in> u\<close>]]
  7118         also have "... \<le> e" using \<open>0 < e\<close> by simp
  7172         also have "... \<le> e" using \<open>0 < e\<close> by simp
  7119         finally show ?thesis .
  7173         finally show ?thesis .
  7120       qed
  7174       qed
  7121       show "\<exists>d>0. \<forall>xa\<in>u \<times> u.
  7175       show "\<exists>d>0. \<forall>xa\<in>u \<times> u.
  7122                   0 < dist xa (x, x) \<and> dist xa (x, x) < d \<longrightarrow>
  7176                   0 < dist xa (x, x) \<and> dist xa (x, x) < d \<longrightarrow>
  7123                   dist (if snd xa = fst xa then deriv f (fst xa) else (f (snd xa) - f (fst xa)) / (snd xa - fst xa))
  7177                   dist (case xa of (x, y) \<Rightarrow> if y = x then deriv f x else (f y - f x) / (y - x)) (deriv f x) \<le> e"
  7124                        (deriv f x)  \<le>  e"
       
  7125         apply (rule_tac x="min k1 k2" in exI)
  7178         apply (rule_tac x="min k1 k2" in exI)
  7126         using \<open>k1>0\<close> \<open>k2>0\<close> \<open>e>0\<close>
  7179         using \<open>k1>0\<close> \<open>k2>0\<close> \<open>e>0\<close>
  7127         apply (force simp: dist_norm neq intro: dual_order.strict_trans2 k1 less_imp_le norm_fst_le)
  7180         apply (force simp: dist_norm neq intro: dual_order.strict_trans2 k1 less_imp_le norm_fst_le)
  7128         done
  7181         done
  7129     qed
  7182     qed
  7132     have le_B: "\<And>t. t \<in> {0..1} \<Longrightarrow> cmod (vector_derivative \<gamma> (at t)) \<le> B"
  7185     have le_B: "\<And>t. t \<in> {0..1} \<Longrightarrow> cmod (vector_derivative \<gamma> (at t)) \<le> B"
  7133       apply (rule B)
  7186       apply (rule B)
  7134       using \<gamma>' using path_image_def vector_derivative_at by fastforce
  7187       using \<gamma>' using path_image_def vector_derivative_at by fastforce
  7135     have f_has_cint: "\<And>w. w \<in> v - path_image \<gamma> \<Longrightarrow> ((\<lambda>u. f u / (u - w) ^ 1) has_contour_integral h w) \<gamma>"
  7188     have f_has_cint: "\<And>w. w \<in> v - path_image \<gamma> \<Longrightarrow> ((\<lambda>u. f u / (u - w) ^ 1) has_contour_integral h w) \<gamma>"
  7136       by (simp add: V)
  7189       by (simp add: V)
  7137     have cond_uu: "continuous_on (u \<times> u) (\<lambda>y. d (fst y) (snd y))"
  7190     have cond_uu: "continuous_on (u \<times> u) (\<lambda>(x,y). d x y)"
  7138       apply (simp add: continuous_on_eq_continuous_within d_def continuous_within tendsto_f')
  7191       apply (simp add: continuous_on_eq_continuous_within d_def continuous_within tendsto_f')
  7139       apply (simp add: Lim_within_open_NO_MATCH open_Times u, clarify)
  7192       apply (simp add: Lim_within_open_NO_MATCH open_Times u, clarify)
  7140       apply (rule Lim_transform_within_open [OF _ open_uu_Id, where f = "(\<lambda>x. (f (snd x) - f (fst x)) / (snd x - fst x))"])
  7193       apply (rule Lim_transform_within_open [OF _ open_uu_Id, where f = "(\<lambda>(x,y). (f y - f x) / (y - x))"])
  7141       using con_ff
  7194       using con_ff
  7142       apply (auto simp: continuous_within)
  7195       apply (auto simp: continuous_within)
  7143       done
  7196       done
  7144     have hol_dw: "(\<lambda>z. d z w) holomorphic_on u" if "w \<in> u" for w
  7197     have hol_dw: "(\<lambda>z. d z w) holomorphic_on u" if "w \<in> u" for w
  7145     proof -
  7198     proof -
  7146       have "continuous_on u ((\<lambda>y. d (fst y) (snd y)) o (\<lambda>z. (w,z)))"
  7199       have "continuous_on u ((\<lambda>(x,y). d x y) o (\<lambda>z. (w,z)))"
  7147         by (rule continuous_on_compose continuous_intros continuous_on_subset [OF cond_uu] | force intro: that)+
  7200         by (rule continuous_on_compose continuous_intros continuous_on_subset [OF cond_uu] | force intro: that)+
  7148       then have *: "continuous_on u (\<lambda>z. if w = z then deriv f z else (f w - f z) / (w - z))"
  7201       then have *: "continuous_on u (\<lambda>z. if w = z then deriv f z else (f w - f z) / (w - z))"
  7149         by (rule rev_iffD1 [OF _ continuous_on_cong [OF refl]]) (simp add: d_def field_simps)
  7202         by (rule rev_iffD1 [OF _ continuous_on_cong [OF refl]]) (simp add: d_def field_simps)
  7150       have **: "\<And>x. \<lbrakk>x \<in> u; x \<noteq> w\<rbrakk> \<Longrightarrow> (\<lambda>z. if w = z then deriv f z else (f w - f z) / (w - z)) complex_differentiable at x"
  7203       have **: "\<And>x. \<lbrakk>x \<in> u; x \<noteq> w\<rbrakk> \<Longrightarrow> (\<lambda>z. if w = z then deriv f z else (f w - f z) / (w - z)) complex_differentiable at x"
  7151         apply (rule_tac f = "\<lambda>x. (f w - f x)/(w - x)" and d = "dist x w" in complex_differentiable_transform_within)
  7204         apply (rule_tac f = "\<lambda>x. (f w - f x)/(w - x)" and d = "dist x w" in complex_differentiable_transform_within)
  7157         apply (auto simp: complex_differentiable_def [symmetric] holomorphic_on_open open_Diff u **)
  7210         apply (auto simp: complex_differentiable_def [symmetric] holomorphic_on_open open_Diff u **)
  7158         done
  7211         done
  7159     qed
  7212     qed
  7160     { fix a b
  7213     { fix a b
  7161       assume abu: "closed_segment a b \<subseteq> u"
  7214       assume abu: "closed_segment a b \<subseteq> u"
  7162       then have cont_dw: "\<And>w. w \<in> u \<Longrightarrow> (\<lambda>z. d z w) contour_integrable_on (linepath a b)"
  7215       then have "\<And>w. w \<in> u \<Longrightarrow> (\<lambda>z. d z w) contour_integrable_on (linepath a b)"
  7163         by (metis hol_dw continuous_on_subset contour_integrable_continuous_linepath holomorphic_on_imp_continuous_on)
  7216         by (metis hol_dw continuous_on_subset contour_integrable_continuous_linepath holomorphic_on_imp_continuous_on)
  7164       have *: "\<exists>da>0. \<forall>x'\<in>u. dist x' w < da \<longrightarrow>
  7217       then have cont_cint_d: "continuous_on u (\<lambda>w. contour_integral (linepath a b) (\<lambda>z. d z w))"
  7165                              dist (contour_integral (linepath a b) (\<lambda>z. d z x'))
  7218         apply (rule contour_integral_continuous_on_linepath_2D [OF \<open>open u\<close> _ _ abu])
  7166                                   (contour_integral (linepath a b) (\<lambda>z. d z w)) \<le> ee"
  7219         apply (auto simp: intro: continuous_on_swap_args cond_uu)
  7167               if "w \<in> u" "0 < ee" "a \<noteq> b" for w ee
       
  7168       proof -
       
  7169         obtain dd where "dd>0" and dd: "cball w dd \<subseteq> u" using open_contains_cball u \<open>w \<in> u\<close> by force
       
  7170         let ?abdd = "{(z,t) |z t. z \<in> closed_segment a b \<and> t \<in> cball w dd}"
       
  7171         have "uniformly_continuous_on ?abdd (\<lambda>y. d (fst y) (snd y))"
       
  7172           apply (rule compact_uniformly_continuous)
       
  7173           apply (rule continuous_on_subset[OF cond_uu])
       
  7174           using abu dd
       
  7175           apply (auto simp: compact_Times simp del: mem_cball)
       
  7176           done
       
  7177         then obtain kk where "kk>0"
       
  7178             and kk: "\<And>x x'. \<lbrakk>x\<in>?abdd; x'\<in>?abdd; dist x' x < kk\<rbrakk> \<Longrightarrow>
       
  7179                              dist ((\<lambda>y. d (fst y) (snd y)) x') ((\<lambda>y. d (fst y) (snd y)) x) < ee/norm(b - a)"
       
  7180           apply (rule uniformly_continuous_onE [where e = "ee/norm(b - a)"])
       
  7181           using \<open>0 < ee\<close> \<open>a \<noteq> b\<close> by auto
       
  7182         have kk: "\<lbrakk>x1 \<in> closed_segment a b; norm (w - x2) \<le> dd;
       
  7183                    x1' \<in> closed_segment a b; norm (w - x2') \<le> dd; norm ((x1', x2') - (x1, x2)) < kk\<rbrakk>
       
  7184                   \<Longrightarrow> norm (d x1' x2' - d x1 x2) \<le> ee / cmod (b - a)"
       
  7185                  for x1 x2 x1' x2'
       
  7186           using kk [of "(x1,x2)" "(x1',x2')"] by (force simp add: dist_norm)
       
  7187         have le_ee: "cmod (contour_integral (linepath a b) (\<lambda>x. d x x' - d x w)) \<le> ee"
       
  7188                     if "x' \<in> u" "cmod (x' - w) < dd" "cmod (x' - w) < kk"  for x'
       
  7189         proof -
       
  7190           have "cmod (contour_integral (linepath a b) (\<lambda>x. d x x' - d x w)) \<le> ee/norm(b - a) * norm(b - a)"
       
  7191             apply (rule has_contour_integral_bound_linepath [OF has_contour_integral_integral _ kk])
       
  7192             apply (rule contour_integrable_diff [OF cont_dw cont_dw])
       
  7193             using \<open>0 < ee\<close> \<open>a \<noteq> b\<close> \<open>0 < dd\<close> \<open>w \<in> u\<close> that
       
  7194             apply (auto simp: norm_minus_commute)
       
  7195             done
       
  7196           also have "... = ee" using \<open>a \<noteq> b\<close> by simp
       
  7197           finally show ?thesis .
       
  7198         qed
       
  7199         show ?thesis
       
  7200           apply (rule_tac x="min dd kk" in exI)
       
  7201           using \<open>0 < dd\<close> \<open>0 < kk\<close>
       
  7202           apply (auto simp: dist_norm contour_integral_diff [OF cont_dw cont_dw, symmetric] \<open>w \<in> u\<close> intro: le_ee)
       
  7203           done
       
  7204       qed
       
  7205       have cont_cint_d: "continuous_on u (\<lambda>w. contour_integral (linepath a b) (\<lambda>z. d z w))"
       
  7206         apply (rule continuous_onI)
       
  7207         apply (cases "a=b")
       
  7208         apply (auto intro: *)
       
  7209         done
  7220         done
  7210       have cont_cint_d\<gamma>: "continuous_on {0..1} ((\<lambda>w. contour_integral (linepath a b) (\<lambda>z. d z w)) o \<gamma>)"
  7221       have cont_cint_d\<gamma>: "continuous_on {0..1} ((\<lambda>w. contour_integral (linepath a b) (\<lambda>z. d z w)) o \<gamma>)"
  7211         apply (rule continuous_on_compose)
  7222         apply (rule continuous_on_compose)
  7212         using \<open>path \<gamma>\<close> path_def pasz
  7223         using \<open>path \<gamma>\<close> path_def pasz
  7213         apply (auto intro!: continuous_on_subset [OF cont_cint_d])
  7224         apply (auto intro!: continuous_on_subset [OF cont_cint_d])
  7221         by (simp add: continuous_on_polymonial_function vector_derivative_at [OF \<gamma>'])
  7232         by (simp add: continuous_on_polymonial_function vector_derivative_at [OF \<gamma>'])
  7222       have "contour_integral (linepath a b) h = contour_integral (linepath a b) (\<lambda>z. contour_integral \<gamma> (d z))"
  7233       have "contour_integral (linepath a b) h = contour_integral (linepath a b) (\<lambda>z. contour_integral \<gamma> (d z))"
  7223         using abu  by (force simp add: h_def intro: contour_integral_eq)
  7234         using abu  by (force simp add: h_def intro: contour_integral_eq)
  7224       also have "... =  contour_integral \<gamma> (\<lambda>w. contour_integral (linepath a b) (\<lambda>z. d z w))"
  7235       also have "... =  contour_integral \<gamma> (\<lambda>w. contour_integral (linepath a b) (\<lambda>z. d z w))"
  7225         apply (rule contour_integral_swap)
  7236         apply (rule contour_integral_swap)
  7226         apply (simp add: split_def)
       
  7227         apply (rule continuous_on_subset [OF cond_uu])
  7237         apply (rule continuous_on_subset [OF cond_uu])
  7228         using abu pasz \<open>valid_path \<gamma>\<close>
  7238         using abu pasz \<open>valid_path \<gamma>\<close>
  7229         apply (auto intro!: continuous_intros)
  7239         apply (auto intro!: continuous_intros)
  7230         by (metis \<gamma>' continuous_on_eq path_def path_polynomial_function pf\<gamma>' vector_derivative_at)
  7240         by (metis \<gamma>' continuous_on_eq path_def path_polynomial_function pf\<gamma>' vector_derivative_at)
  7231       finally have cint_h_eq:
  7241       finally have cint_h_eq:
  7241         by (meson U contour_integrable_on_def eventuallyI)
  7251         by (meson U contour_integrable_on_def eventuallyI)
  7242       obtain dd where "dd>0" and dd: "cball x dd \<subseteq> u" using open_contains_cball u x by force
  7252       obtain dd where "dd>0" and dd: "cball x dd \<subseteq> u" using open_contains_cball u x by force
  7243       have A2: "\<forall>\<^sub>F n in sequentially. \<forall>xa\<in>path_image \<gamma>. cmod (d (a n) xa - d x xa) < ee" if "0 < ee" for ee
  7253       have A2: "\<forall>\<^sub>F n in sequentially. \<forall>xa\<in>path_image \<gamma>. cmod (d (a n) xa - d x xa) < ee" if "0 < ee" for ee
  7244       proof -
  7254       proof -
  7245         let ?ddpa = "{(w,z) |w z. w \<in> cball x dd \<and> z \<in> path_image \<gamma>}"
  7255         let ?ddpa = "{(w,z) |w z. w \<in> cball x dd \<and> z \<in> path_image \<gamma>}"
  7246         have "uniformly_continuous_on ?ddpa (\<lambda>y. d (fst y) (snd y))"
  7256         have "uniformly_continuous_on ?ddpa (\<lambda>(x,y). d x y)"
  7247           apply (rule compact_uniformly_continuous [OF continuous_on_subset[OF cond_uu]])
  7257           apply (rule compact_uniformly_continuous [OF continuous_on_subset[OF cond_uu]])
  7248           using dd pasz \<open>valid_path \<gamma>\<close>
  7258           using dd pasz \<open>valid_path \<gamma>\<close>
  7249           apply (auto simp: compact_Times compact_valid_path_image simp del: mem_cball)
  7259           apply (auto simp: compact_Times compact_valid_path_image simp del: mem_cball)
  7250           done
  7260           done
  7251         then obtain kk where "kk>0"
  7261         then obtain kk where "kk>0"
  7252             and kk: "\<And>x x'. \<lbrakk>x\<in>?ddpa; x'\<in>?ddpa; dist x' x < kk\<rbrakk> \<Longrightarrow>
  7262             and kk: "\<And>x x'. \<lbrakk>x\<in>?ddpa; x'\<in>?ddpa; dist x' x < kk\<rbrakk> \<Longrightarrow>
  7253                              dist ((\<lambda>y. d (fst y) (snd y)) x') ((\<lambda>y. d (fst y) (snd y)) x) < ee"
  7263                              dist ((\<lambda>(x,y). d x y) x') ((\<lambda>(x,y). d x y) x) < ee"
  7254           apply (rule uniformly_continuous_onE [where e = ee])
  7264           apply (rule uniformly_continuous_onE [where e = ee])
  7255           using \<open>0 < ee\<close> by auto
  7265           using \<open>0 < ee\<close> by auto
  7256 
       
  7257         have kk: "\<lbrakk>norm (w - x) \<le> dd; z \<in> path_image \<gamma>; norm ((w, z) - (x, z)) < kk\<rbrakk> \<Longrightarrow> norm (d w z - d x z) < ee"
  7266         have kk: "\<lbrakk>norm (w - x) \<le> dd; z \<in> path_image \<gamma>; norm ((w, z) - (x, z)) < kk\<rbrakk> \<Longrightarrow> norm (d w z - d x z) < ee"
  7258                  for  w z
  7267                  for  w z
  7259           using \<open>dd>0\<close> kk [of "(x,z)" "(w,z)"] by (force simp add: norm_minus_commute dist_norm)
  7268           using \<open>dd>0\<close> kk [of "(x,z)" "(w,z)"] by (force simp add: norm_minus_commute dist_norm)
  7260         show ?thesis
  7269         show ?thesis
  7261           using ax unfolding lim_sequentially eventually_sequentially
  7270           using ax unfolding lim_sequentially eventually_sequentially