small clean-up of Complex_Analysis_Basics
authorpaulson <lp15@cam.ac.uk>
Mon May 21 22:52:16 2018 +0100 (12 months ago)
changeset 68255009f783d1bac
parent 68243 ddf1ead7b182
child 68256 79c437817348
small clean-up of Complex_Analysis_Basics
src/HOL/Analysis/Cauchy_Integral_Theorem.thy
src/HOL/Analysis/Complex_Analysis_Basics.thy
src/HOL/Analysis/Complex_Transcendental.thy
src/HOL/Analysis/Conformal_Mappings.thy
src/HOL/Analysis/Great_Picard.thy
     1.1 --- a/src/HOL/Analysis/Cauchy_Integral_Theorem.thy	Mon May 21 18:36:30 2018 +0200
     1.2 +++ b/src/HOL/Analysis/Cauchy_Integral_Theorem.thy	Mon May 21 22:52:16 2018 +0100
     1.3 @@ -5936,9 +5936,9 @@
     1.4    also have "... = u^n * deriv (\<lambda>z. (deriv ^^ n) f (u * z)) z"
     1.5      apply (rule deriv_cmult)
     1.6      apply (rule analytic_on_imp_differentiable_at [OF _ Suc.prems])
     1.7 -    apply (rule analytic_on_compose_gen [where g="(deriv ^^ n) f" and t=t, unfolded o_def])
     1.8 -    apply (simp add: analytic_on_linear)
     1.9 -    apply (simp add: analytic_on_open f holomorphic_higher_deriv t)
    1.10 +    apply (rule analytic_on_compose_gen [where g="(deriv ^^ n) f" and T=t, unfolded o_def])
    1.11 +      apply (simp add: analytic_on_linear)
    1.12 +     apply (simp add: analytic_on_open f holomorphic_higher_deriv t)
    1.13      apply (blast intro: fg)
    1.14      done
    1.15    also have "... = u * u ^ n * deriv ((deriv ^^ n) f) (u * z)"
     2.1 --- a/src/HOL/Analysis/Complex_Analysis_Basics.thy	Mon May 21 18:36:30 2018 +0200
     2.2 +++ b/src/HOL/Analysis/Complex_Analysis_Basics.thy	Mon May 21 22:52:16 2018 +0100
     2.3 @@ -32,7 +32,7 @@
     2.4  lemma fact_cancel:
     2.5    fixes c :: "'a::real_field"
     2.6    shows "of_nat (Suc n) * c / (fact (Suc n)) = c / (fact n)"
     2.7 -  by (simp add: of_nat_mult del: of_nat_Suc times_nat.simps)
     2.8 +  using of_nat_neq_0 by force
     2.9  
    2.10  lemma bilinear_times:
    2.11    fixes c::"'a::real_algebra" shows "bilinear (\<lambda>x y::'a. x*y)"
    2.12 @@ -41,34 +41,6 @@
    2.13  lemma linear_cnj: "linear cnj"
    2.14    using bounded_linear.linear[OF bounded_linear_cnj] .
    2.15  
    2.16 -lemma tendsto_Re_upper:
    2.17 -  assumes "~ (trivial_limit F)"
    2.18 -          "(f \<longlongrightarrow> l) F"
    2.19 -          "eventually (\<lambda>x. Re(f x) \<le> b) F"
    2.20 -    shows  "Re(l) \<le> b"
    2.21 -  by (metis assms tendsto_le [OF _ tendsto_const]  tendsto_Re)
    2.22 -
    2.23 -lemma tendsto_Re_lower:
    2.24 -  assumes "~ (trivial_limit F)"
    2.25 -          "(f \<longlongrightarrow> l) F"
    2.26 -          "eventually (\<lambda>x. b \<le> Re(f x)) F"
    2.27 -    shows  "b \<le> Re(l)"
    2.28 -  by (metis assms tendsto_le [OF _ _ tendsto_const]  tendsto_Re)
    2.29 -
    2.30 -lemma tendsto_Im_upper:
    2.31 -  assumes "~ (trivial_limit F)"
    2.32 -          "(f \<longlongrightarrow> l) F"
    2.33 -          "eventually (\<lambda>x. Im(f x) \<le> b) F"
    2.34 -    shows  "Im(l) \<le> b"
    2.35 -  by (metis assms tendsto_le [OF _ tendsto_const]  tendsto_Im)
    2.36 -
    2.37 -lemma tendsto_Im_lower:
    2.38 -  assumes "~ (trivial_limit F)"
    2.39 -          "(f \<longlongrightarrow> l) F"
    2.40 -          "eventually (\<lambda>x. b \<le> Im(f x)) F"
    2.41 -    shows  "b \<le> Im(l)"
    2.42 -  by (metis assms tendsto_le [OF _ _ tendsto_const]  tendsto_Im)
    2.43 -
    2.44  lemma lambda_zero: "(\<lambda>h::'a::mult_zero. 0) = ( * ) 0"
    2.45    by auto
    2.46  
    2.47 @@ -116,48 +88,48 @@
    2.48  
    2.49  lemma DERIV_zero_connected_constant:
    2.50    fixes f :: "'a::{real_normed_field,euclidean_space} \<Rightarrow> 'a"
    2.51 -  assumes "connected s"
    2.52 -      and "open s"
    2.53 -      and "finite k"
    2.54 -      and "continuous_on s f"
    2.55 -      and "\<forall>x\<in>(s - k). DERIV f x :> 0"
    2.56 -    obtains c where "\<And>x. x \<in> s \<Longrightarrow> f(x) = c"
    2.57 +  assumes "connected S"
    2.58 +      and "open S"
    2.59 +      and "finite K"
    2.60 +      and "continuous_on S f"
    2.61 +      and "\<forall>x\<in>(S - K). DERIV f x :> 0"
    2.62 +    obtains c where "\<And>x. x \<in> S \<Longrightarrow> f(x) = c"
    2.63  using has_derivative_zero_connected_constant [OF assms(1-4)] assms
    2.64  by (metis DERIV_const has_derivative_const Diff_iff at_within_open frechet_derivative_at has_field_derivative_def)
    2.65  
    2.66  lemmas DERIV_zero_constant = has_field_derivative_zero_constant
    2.67  
    2.68  lemma DERIV_zero_unique:
    2.69 -  assumes "convex s"
    2.70 -      and d0: "\<And>x. x\<in>s \<Longrightarrow> (f has_field_derivative 0) (at x within s)"
    2.71 -      and "a \<in> s"
    2.72 -      and "x \<in> s"
    2.73 +  assumes "convex S"
    2.74 +      and d0: "\<And>x. x\<in>S \<Longrightarrow> (f has_field_derivative 0) (at x within S)"
    2.75 +      and "a \<in> S"
    2.76 +      and "x \<in> S"
    2.77      shows "f x = f a"
    2.78    by (rule has_derivative_zero_unique [OF assms(1) _ assms(4,3)])
    2.79       (metis d0 has_field_derivative_imp_has_derivative lambda_zero)
    2.80  
    2.81  lemma DERIV_zero_connected_unique:
    2.82 -  assumes "connected s"
    2.83 -      and "open s"
    2.84 -      and d0: "\<And>x. x\<in>s \<Longrightarrow> DERIV f x :> 0"
    2.85 -      and "a \<in> s"
    2.86 -      and "x \<in> s"
    2.87 +  assumes "connected S"
    2.88 +      and "open S"
    2.89 +      and d0: "\<And>x. x\<in>S \<Longrightarrow> DERIV f x :> 0"
    2.90 +      and "a \<in> S"
    2.91 +      and "x \<in> S"
    2.92      shows "f x = f a"
    2.93      by (rule has_derivative_zero_unique_connected [OF assms(2,1) _ assms(5,4)])
    2.94         (metis has_field_derivative_def lambda_zero d0)
    2.95  
    2.96  lemma DERIV_transform_within:
    2.97 -  assumes "(f has_field_derivative f') (at a within s)"
    2.98 -      and "0 < d" "a \<in> s"
    2.99 -      and "\<And>x. x\<in>s \<Longrightarrow> dist x a < d \<Longrightarrow> f x = g x"
   2.100 -    shows "(g has_field_derivative f') (at a within s)"
   2.101 +  assumes "(f has_field_derivative f') (at a within S)"
   2.102 +      and "0 < d" "a \<in> S"
   2.103 +      and "\<And>x. x\<in>S \<Longrightarrow> dist x a < d \<Longrightarrow> f x = g x"
   2.104 +    shows "(g has_field_derivative f') (at a within S)"
   2.105    using assms unfolding has_field_derivative_def
   2.106    by (blast intro: has_derivative_transform_within)
   2.107  
   2.108  lemma DERIV_transform_within_open:
   2.109    assumes "DERIV f a :> f'"
   2.110 -      and "open s" "a \<in> s"
   2.111 -      and "\<And>x. x\<in>s \<Longrightarrow> f x = g x"
   2.112 +      and "open S" "a \<in> S"
   2.113 +      and "\<And>x. x\<in>S \<Longrightarrow> f x = g x"
   2.114      shows "DERIV g a :> f'"
   2.115    using assms unfolding has_field_derivative_def
   2.116  by (metis has_derivative_transform_within_open)
   2.117 @@ -270,8 +242,6 @@
   2.118  
   2.119  subsection\<open>Holomorphic functions\<close>
   2.120  
   2.121 -subsection\<open>Holomorphic functions\<close>
   2.122 -
   2.123  definition holomorphic_on :: "[complex \<Rightarrow> complex, complex set] \<Rightarrow> bool"
   2.124             (infixl "(holomorphic'_on)" 50)
   2.125    where "f holomorphic_on s \<equiv> \<forall>x\<in>s. f field_differentiable (at x within s)"
   2.126 @@ -455,20 +425,29 @@
   2.127    unfolding DERIV_deriv_iff_field_differentiable[symmetric]
   2.128    by (auto intro!: DERIV_imp_deriv derivative_eq_intros)
   2.129  
   2.130 -lemma deriv_cmult [simp]:
   2.131 +lemma deriv_cmult:
   2.132    "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. c * f w) z = c * deriv f z"
   2.133 -  unfolding DERIV_deriv_iff_field_differentiable[symmetric]
   2.134 -  by (auto intro!: DERIV_imp_deriv derivative_eq_intros)
   2.135 +  by simp
   2.136  
   2.137 -lemma deriv_cmult_right [simp]:
   2.138 +lemma deriv_cmult_right:
   2.139    "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w * c) z = deriv f z * c"
   2.140 +  by simp
   2.141 +
   2.142 +lemma deriv_inverse [simp]:
   2.143 +  "\<lbrakk>f field_differentiable at z; f z \<noteq> 0\<rbrakk>
   2.144 +   \<Longrightarrow> deriv (\<lambda>w. inverse (f w)) z = - deriv f z / f z ^ 2"
   2.145    unfolding DERIV_deriv_iff_field_differentiable[symmetric]
   2.146 -  by (auto intro!: DERIV_imp_deriv derivative_eq_intros)
   2.147 +  by (safe intro!: DERIV_imp_deriv derivative_eq_intros) (auto simp: divide_simps power2_eq_square)
   2.148  
   2.149 -lemma deriv_cdivide_right [simp]:
   2.150 +lemma deriv_divide [simp]:
   2.151 +  "\<lbrakk>f field_differentiable at z; g field_differentiable at z; g z \<noteq> 0\<rbrakk>
   2.152 +   \<Longrightarrow> deriv (\<lambda>w. f w / g w) z = (deriv f z * g z - f z * deriv g z) / g z ^ 2"
   2.153 +  by (simp add: field_class.field_divide_inverse field_differentiable_inverse)
   2.154 +     (simp add: divide_simps power2_eq_square)
   2.155 +
   2.156 +lemma deriv_cdivide_right:
   2.157    "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w / c) z = deriv f z / c"
   2.158 -  unfolding Fields.field_class.field_divide_inverse
   2.159 -  by (blast intro: deriv_cmult_right)
   2.160 +  by (simp add: field_class.field_divide_inverse)
   2.161  
   2.162  lemma complex_derivative_transform_within_open:
   2.163    "\<lbrakk>f holomorphic_on s; g holomorphic_on s; open s; z \<in> s; \<And>w. w \<in> s \<Longrightarrow> f w = g w\<rbrakk>
   2.164 @@ -480,10 +459,9 @@
   2.165  lemma deriv_compose_linear:
   2.166    "f field_differentiable at (c * z) \<Longrightarrow> deriv (\<lambda>w. f (c * w)) z = c * deriv f (c * z)"
   2.167  apply (rule DERIV_imp_deriv)
   2.168 -apply (simp add: DERIV_deriv_iff_field_differentiable [symmetric])
   2.169 -apply (drule DERIV_chain' [of "times c" c z UNIV f "deriv f (c * z)", OF DERIV_cmult_Id])
   2.170 -apply (simp add: algebra_simps)
   2.171 -done
   2.172 +  unfolding DERIV_deriv_iff_field_differentiable [symmetric]
   2.173 +  by (metis (full_types) DERIV_chain2 DERIV_cmult_Id mult.commute)
   2.174 +
   2.175  
   2.176  lemma nonzero_deriv_nonconstant:
   2.177    assumes df: "DERIV f \<xi> :> df" and S: "open S" "\<xi> \<in> S" and "df \<noteq> 0"
   2.178 @@ -494,10 +472,8 @@
   2.179  lemma holomorphic_nonconstant:
   2.180    assumes holf: "f holomorphic_on S" and "open S" "\<xi> \<in> S" "deriv f \<xi> \<noteq> 0"
   2.181      shows "\<not> f constant_on S"
   2.182 -    apply (rule nonzero_deriv_nonconstant [of f "deriv f \<xi>" \<xi> S])
   2.183 -    using assms
   2.184 -    apply (auto simp: holomorphic_derivI)
   2.185 -    done
   2.186 +  by (rule nonzero_deriv_nonconstant [of f "deriv f \<xi>" \<xi> S])
   2.187 +    (use assms in \<open>auto simp: holomorphic_derivI\<close>)
   2.188  
   2.189  subsection\<open>Caratheodory characterization\<close>
   2.190  
   2.191 @@ -516,53 +492,52 @@
   2.192  subsection\<open>Analyticity on a set\<close>
   2.193  
   2.194  definition analytic_on (infixl "(analytic'_on)" 50)
   2.195 -  where
   2.196 -   "f analytic_on s \<equiv> \<forall>x \<in> s. \<exists>e. 0 < e \<and> f holomorphic_on (ball x e)"
   2.197 +  where "f analytic_on S \<equiv> \<forall>x \<in> S. \<exists>e. 0 < e \<and> f holomorphic_on (ball x e)"
   2.198  
   2.199  named_theorems analytic_intros "introduction rules for proving analyticity"
   2.200  
   2.201 -lemma analytic_imp_holomorphic: "f analytic_on s \<Longrightarrow> f holomorphic_on s"
   2.202 +lemma analytic_imp_holomorphic: "f analytic_on S \<Longrightarrow> f holomorphic_on S"
   2.203    by (simp add: at_within_open [OF _ open_ball] analytic_on_def holomorphic_on_def)
   2.204       (metis centre_in_ball field_differentiable_at_within)
   2.205  
   2.206 -lemma analytic_on_open: "open s \<Longrightarrow> f analytic_on s \<longleftrightarrow> f holomorphic_on s"
   2.207 +lemma analytic_on_open: "open S \<Longrightarrow> f analytic_on S \<longleftrightarrow> f holomorphic_on S"
   2.208  apply (auto simp: analytic_imp_holomorphic)
   2.209  apply (auto simp: analytic_on_def holomorphic_on_def)
   2.210  by (metis holomorphic_on_def holomorphic_on_subset open_contains_ball)
   2.211  
   2.212  lemma analytic_on_imp_differentiable_at:
   2.213 -  "f analytic_on s \<Longrightarrow> x \<in> s \<Longrightarrow> f field_differentiable (at x)"
   2.214 +  "f analytic_on S \<Longrightarrow> x \<in> S \<Longrightarrow> f field_differentiable (at x)"
   2.215   apply (auto simp: analytic_on_def holomorphic_on_def)
   2.216  by (metis open_ball centre_in_ball field_differentiable_within_open)
   2.217  
   2.218 -lemma analytic_on_subset: "f analytic_on s \<Longrightarrow> t \<subseteq> s \<Longrightarrow> f analytic_on t"
   2.219 +lemma analytic_on_subset: "f analytic_on S \<Longrightarrow> T \<subseteq> S \<Longrightarrow> f analytic_on T"
   2.220    by (auto simp: analytic_on_def)
   2.221  
   2.222 -lemma analytic_on_Un: "f analytic_on (s \<union> t) \<longleftrightarrow> f analytic_on s \<and> f analytic_on t"
   2.223 +lemma analytic_on_Un: "f analytic_on (S \<union> T) \<longleftrightarrow> f analytic_on S \<and> f analytic_on T"
   2.224    by (auto simp: analytic_on_def)
   2.225  
   2.226 -lemma analytic_on_Union: "f analytic_on (\<Union>s) \<longleftrightarrow> (\<forall>t \<in> s. f analytic_on t)"
   2.227 +lemma analytic_on_Union: "f analytic_on (\<Union>\<T>) \<longleftrightarrow> (\<forall>T \<in> \<T>. f analytic_on T)"
   2.228    by (auto simp: analytic_on_def)
   2.229  
   2.230 -lemma analytic_on_UN: "f analytic_on (\<Union>i\<in>I. s i) \<longleftrightarrow> (\<forall>i\<in>I. f analytic_on (s i))"
   2.231 +lemma analytic_on_UN: "f analytic_on (\<Union>i\<in>I. S i) \<longleftrightarrow> (\<forall>i\<in>I. f analytic_on (S i))"
   2.232    by (auto simp: analytic_on_def)
   2.233  
   2.234  lemma analytic_on_holomorphic:
   2.235 -  "f analytic_on s \<longleftrightarrow> (\<exists>t. open t \<and> s \<subseteq> t \<and> f holomorphic_on t)"
   2.236 +  "f analytic_on S \<longleftrightarrow> (\<exists>T. open T \<and> S \<subseteq> T \<and> f holomorphic_on T)"
   2.237    (is "?lhs = ?rhs")
   2.238  proof -
   2.239 -  have "?lhs \<longleftrightarrow> (\<exists>t. open t \<and> s \<subseteq> t \<and> f analytic_on t)"
   2.240 +  have "?lhs \<longleftrightarrow> (\<exists>T. open T \<and> S \<subseteq> T \<and> f analytic_on T)"
   2.241    proof safe
   2.242 -    assume "f analytic_on s"
   2.243 -    then show "\<exists>t. open t \<and> s \<subseteq> t \<and> f analytic_on t"
   2.244 +    assume "f analytic_on S"
   2.245 +    then show "\<exists>T. open T \<and> S \<subseteq> T \<and> f analytic_on T"
   2.246        apply (simp add: analytic_on_def)
   2.247 -      apply (rule exI [where x="\<Union>{u. open u \<and> f analytic_on u}"], auto)
   2.248 +      apply (rule exI [where x="\<Union>{U. open U \<and> f analytic_on U}"], auto)
   2.249        apply (metis open_ball analytic_on_open centre_in_ball)
   2.250        by (metis analytic_on_def)
   2.251    next
   2.252 -    fix t
   2.253 -    assume "open t" "s \<subseteq> t" "f analytic_on t"
   2.254 -    then show "f analytic_on s"
   2.255 +    fix T
   2.256 +    assume "open T" "S \<subseteq> T" "f analytic_on T"
   2.257 +    then show "f analytic_on S"
   2.258          by (metis analytic_on_subset)
   2.259    qed
   2.260    also have "... \<longleftrightarrow> ?rhs"
   2.261 @@ -570,26 +545,26 @@
   2.262    finally show ?thesis .
   2.263  qed
   2.264  
   2.265 -lemma analytic_on_linear [analytic_intros,simp]: "(( * ) c) analytic_on s"
   2.266 +lemma analytic_on_linear [analytic_intros,simp]: "(( * ) c) analytic_on S"
   2.267    by (auto simp add: analytic_on_holomorphic)
   2.268  
   2.269 -lemma analytic_on_const [analytic_intros,simp]: "(\<lambda>z. c) analytic_on s"
   2.270 +lemma analytic_on_const [analytic_intros,simp]: "(\<lambda>z. c) analytic_on S"
   2.271    by (metis analytic_on_def holomorphic_on_const zero_less_one)
   2.272  
   2.273 -lemma analytic_on_ident [analytic_intros,simp]: "(\<lambda>x. x) analytic_on s"
   2.274 +lemma analytic_on_ident [analytic_intros,simp]: "(\<lambda>x. x) analytic_on S"
   2.275    by (simp add: analytic_on_def gt_ex)
   2.276  
   2.277 -lemma analytic_on_id [analytic_intros]: "id analytic_on s"
   2.278 +lemma analytic_on_id [analytic_intros]: "id analytic_on S"
   2.279    unfolding id_def by (rule analytic_on_ident)
   2.280  
   2.281  lemma analytic_on_compose:
   2.282 -  assumes f: "f analytic_on s"
   2.283 -      and g: "g analytic_on (f ` s)"
   2.284 -    shows "(g o f) analytic_on s"
   2.285 +  assumes f: "f analytic_on S"
   2.286 +      and g: "g analytic_on (f ` S)"
   2.287 +    shows "(g o f) analytic_on S"
   2.288  unfolding analytic_on_def
   2.289  proof (intro ballI)
   2.290    fix x
   2.291 -  assume x: "x \<in> s"
   2.292 +  assume x: "x \<in> S"
   2.293    then obtain e where e: "0 < e" and fh: "f holomorphic_on ball x e" using f
   2.294      by (metis analytic_on_def)
   2.295    obtain e' where e': "0 < e'" and gh: "g holomorphic_on ball (f x) e'" using g
   2.296 @@ -607,22 +582,22 @@
   2.297  qed
   2.298  
   2.299  lemma analytic_on_compose_gen:
   2.300 -  "f analytic_on s \<Longrightarrow> g analytic_on t \<Longrightarrow> (\<And>z. z \<in> s \<Longrightarrow> f z \<in> t)
   2.301 -             \<Longrightarrow> g o f analytic_on s"
   2.302 +  "f analytic_on S \<Longrightarrow> g analytic_on T \<Longrightarrow> (\<And>z. z \<in> S \<Longrightarrow> f z \<in> T)
   2.303 +             \<Longrightarrow> g o f analytic_on S"
   2.304  by (metis analytic_on_compose analytic_on_subset image_subset_iff)
   2.305  
   2.306  lemma analytic_on_neg [analytic_intros]:
   2.307 -  "f analytic_on s \<Longrightarrow> (\<lambda>z. -(f z)) analytic_on s"
   2.308 +  "f analytic_on S \<Longrightarrow> (\<lambda>z. -(f z)) analytic_on S"
   2.309  by (metis analytic_on_holomorphic holomorphic_on_minus)
   2.310  
   2.311  lemma analytic_on_add [analytic_intros]:
   2.312 -  assumes f: "f analytic_on s"
   2.313 -      and g: "g analytic_on s"
   2.314 -    shows "(\<lambda>z. f z + g z) analytic_on s"
   2.315 +  assumes f: "f analytic_on S"
   2.316 +      and g: "g analytic_on S"
   2.317 +    shows "(\<lambda>z. f z + g z) analytic_on S"
   2.318  unfolding analytic_on_def
   2.319  proof (intro ballI)
   2.320    fix z
   2.321 -  assume z: "z \<in> s"
   2.322 +  assume z: "z \<in> S"
   2.323    then obtain e where e: "0 < e" and fh: "f holomorphic_on ball z e" using f
   2.324      by (metis analytic_on_def)
   2.325    obtain e' where e': "0 < e'" and gh: "g holomorphic_on ball z e'" using g
   2.326 @@ -636,13 +611,13 @@
   2.327  qed
   2.328  
   2.329  lemma analytic_on_diff [analytic_intros]:
   2.330 -  assumes f: "f analytic_on s"
   2.331 -      and g: "g analytic_on s"
   2.332 -    shows "(\<lambda>z. f z - g z) analytic_on s"
   2.333 +  assumes f: "f analytic_on S"
   2.334 +      and g: "g analytic_on S"
   2.335 +    shows "(\<lambda>z. f z - g z) analytic_on S"
   2.336  unfolding analytic_on_def
   2.337  proof (intro ballI)
   2.338    fix z
   2.339 -  assume z: "z \<in> s"
   2.340 +  assume z: "z \<in> S"
   2.341    then obtain e where e: "0 < e" and fh: "f holomorphic_on ball z e" using f
   2.342      by (metis analytic_on_def)
   2.343    obtain e' where e': "0 < e'" and gh: "g holomorphic_on ball z e'" using g
   2.344 @@ -656,13 +631,13 @@
   2.345  qed
   2.346  
   2.347  lemma analytic_on_mult [analytic_intros]:
   2.348 -  assumes f: "f analytic_on s"
   2.349 -      and g: "g analytic_on s"
   2.350 -    shows "(\<lambda>z. f z * g z) analytic_on s"
   2.351 +  assumes f: "f analytic_on S"
   2.352 +      and g: "g analytic_on S"
   2.353 +    shows "(\<lambda>z. f z * g z) analytic_on S"
   2.354  unfolding analytic_on_def
   2.355  proof (intro ballI)
   2.356    fix z
   2.357 -  assume z: "z \<in> s"
   2.358 +  assume z: "z \<in> S"
   2.359    then obtain e where e: "0 < e" and fh: "f holomorphic_on ball z e" using f
   2.360      by (metis analytic_on_def)
   2.361    obtain e' where e': "0 < e'" and gh: "g holomorphic_on ball z e'" using g
   2.362 @@ -676,13 +651,13 @@
   2.363  qed
   2.364  
   2.365  lemma analytic_on_inverse [analytic_intros]:
   2.366 -  assumes f: "f analytic_on s"
   2.367 -      and nz: "(\<And>z. z \<in> s \<Longrightarrow> f z \<noteq> 0)"
   2.368 -    shows "(\<lambda>z. inverse (f z)) analytic_on s"
   2.369 +  assumes f: "f analytic_on S"
   2.370 +      and nz: "(\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0)"
   2.371 +    shows "(\<lambda>z. inverse (f z)) analytic_on S"
   2.372  unfolding analytic_on_def
   2.373  proof (intro ballI)
   2.374    fix z
   2.375 -  assume z: "z \<in> s"
   2.376 +  assume z: "z \<in> S"
   2.377    then obtain e where e: "0 < e" and fh: "f holomorphic_on ball z e" using f
   2.378      by (metis analytic_on_def)
   2.379    have "continuous_on (ball z e) f"
   2.380 @@ -698,19 +673,19 @@
   2.381  qed
   2.382  
   2.383  lemma analytic_on_divide [analytic_intros]:
   2.384 -  assumes f: "f analytic_on s"
   2.385 -      and g: "g analytic_on s"
   2.386 -      and nz: "(\<And>z. z \<in> s \<Longrightarrow> g z \<noteq> 0)"
   2.387 -    shows "(\<lambda>z. f z / g z) analytic_on s"
   2.388 +  assumes f: "f analytic_on S"
   2.389 +      and g: "g analytic_on S"
   2.390 +      and nz: "(\<And>z. z \<in> S \<Longrightarrow> g z \<noteq> 0)"
   2.391 +    shows "(\<lambda>z. f z / g z) analytic_on S"
   2.392  unfolding divide_inverse
   2.393  by (metis analytic_on_inverse analytic_on_mult f g nz)
   2.394  
   2.395  lemma analytic_on_power [analytic_intros]:
   2.396 -  "f analytic_on s \<Longrightarrow> (\<lambda>z. (f z) ^ n) analytic_on s"
   2.397 +  "f analytic_on S \<Longrightarrow> (\<lambda>z. (f z) ^ n) analytic_on S"
   2.398  by (induct n) (auto simp: analytic_on_mult)
   2.399  
   2.400  lemma analytic_on_sum [analytic_intros]:
   2.401 -  "(\<And>i. i \<in> I \<Longrightarrow> (f i) analytic_on s) \<Longrightarrow> (\<lambda>x. sum (\<lambda>i. f i x) I) analytic_on s"
   2.402 +  "(\<And>i. i \<in> I \<Longrightarrow> (f i) analytic_on S) \<Longrightarrow> (\<lambda>x. sum (\<lambda>i. f i x) I) analytic_on S"
   2.403    by (induct I rule: infinite_finite_induct) (auto simp: analytic_on_const analytic_on_add)
   2.404  
   2.405  lemma deriv_left_inverse:
   2.406 @@ -727,10 +702,10 @@
   2.407      using assms
   2.408      by (metis analytic_on_imp_differentiable_at analytic_on_open complex_derivative_chain image_subset_iff)
   2.409    also have "... = deriv id w"
   2.410 -    apply (rule complex_derivative_transform_within_open [where s=S])
   2.411 -    apply (rule assms holomorphic_on_compose_gen holomorphic_intros)+
   2.412 -    apply simp
   2.413 -    done
   2.414 +  proof (rule complex_derivative_transform_within_open [where s=S])
   2.415 +    show "g \<circ> f holomorphic_on S"
   2.416 +      by (rule assms holomorphic_on_compose_gen holomorphic_intros)+
   2.417 +  qed (use assms in auto)
   2.418    also have "... = 1"
   2.419      by simp
   2.420    finally show ?thesis .
   2.421 @@ -811,23 +786,23 @@
   2.422  
   2.423  (* TODO: Could probably be simplified using Uniform_Limit *)
   2.424  lemma has_complex_derivative_sequence:
   2.425 -  fixes s :: "complex set"
   2.426 -  assumes cvs: "convex s"
   2.427 -      and df:  "\<And>n x. x \<in> s \<Longrightarrow> (f n has_field_derivative f' n x) (at x within s)"
   2.428 -      and conv: "\<And>e. 0 < e \<Longrightarrow> \<exists>N. \<forall>n x. n \<ge> N \<longrightarrow> x \<in> s \<longrightarrow> norm (f' n x - g' x) \<le> e"
   2.429 -      and "\<exists>x l. x \<in> s \<and> ((\<lambda>n. f n x) \<longlongrightarrow> l) sequentially"
   2.430 -    shows "\<exists>g. \<forall>x \<in> s. ((\<lambda>n. f n x) \<longlongrightarrow> g x) sequentially \<and>
   2.431 -                       (g has_field_derivative (g' x)) (at x within s)"
   2.432 +  fixes S :: "complex set"
   2.433 +  assumes cvs: "convex S"
   2.434 +      and df:  "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x within S)"
   2.435 +      and conv: "\<And>e. 0 < e \<Longrightarrow> \<exists>N. \<forall>n x. n \<ge> N \<longrightarrow> x \<in> S \<longrightarrow> norm (f' n x - g' x) \<le> e"
   2.436 +      and "\<exists>x l. x \<in> S \<and> ((\<lambda>n. f n x) \<longlongrightarrow> l) sequentially"
   2.437 +    shows "\<exists>g. \<forall>x \<in> S. ((\<lambda>n. f n x) \<longlongrightarrow> g x) sequentially \<and>
   2.438 +                       (g has_field_derivative (g' x)) (at x within S)"
   2.439  proof -
   2.440 -  from assms obtain x l where x: "x \<in> s" and tf: "((\<lambda>n. f n x) \<longlongrightarrow> l) sequentially"
   2.441 +  from assms obtain x l where x: "x \<in> S" and tf: "((\<lambda>n. f n x) \<longlongrightarrow> l) sequentially"
   2.442      by blast
   2.443    { fix e::real assume e: "e > 0"
   2.444 -    then obtain N where N: "\<forall>n\<ge>N. \<forall>x. x \<in> s \<longrightarrow> cmod (f' n x - g' x) \<le> e"
   2.445 +    then obtain N where N: "\<forall>n\<ge>N. \<forall>x. x \<in> S \<longrightarrow> cmod (f' n x - g' x) \<le> e"
   2.446        by (metis conv)
   2.447 -    have "\<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. cmod (f' n x * h - g' x * h) \<le> e * cmod h"
   2.448 +    have "\<exists>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>h. cmod (f' n x * h - g' x * h) \<le> e * cmod h"
   2.449      proof (rule exI [of _ N], clarify)
   2.450        fix n y h
   2.451 -      assume "N \<le> n" "y \<in> s"
   2.452 +      assume "N \<le> n" "y \<in> S"
   2.453        then have "cmod (f' n y - g' y) \<le> e"
   2.454          by (metis N)
   2.455        then have "cmod h * cmod (f' n y - g' y) \<le> cmod h * e"
   2.456 @@ -841,30 +816,30 @@
   2.457    proof (rule has_derivative_sequence [OF cvs _ _ x])
   2.458      show "(\<lambda>n. f n x) \<longlonglongrightarrow> l"
   2.459        by (rule tf)
   2.460 -  next show "\<And>e. e > 0 \<Longrightarrow> \<forall>\<^sub>F n in sequentially. \<forall>x\<in>s. \<forall>h. cmod (f' n x * h - g' x * h) \<le> e * cmod h"
   2.461 +  next show "\<And>e. e > 0 \<Longrightarrow> \<forall>\<^sub>F n in sequentially. \<forall>x\<in>S. \<forall>h. cmod (f' n x * h - g' x * h) \<le> e * cmod h"
   2.462        unfolding eventually_sequentially by (blast intro: **)
   2.463    qed (metis has_field_derivative_def df)
   2.464  qed
   2.465  
   2.466  lemma has_complex_derivative_series:
   2.467 -  fixes s :: "complex set"
   2.468 -  assumes cvs: "convex s"
   2.469 -      and df:  "\<And>n x. x \<in> s \<Longrightarrow> (f n has_field_derivative f' n x) (at x within s)"
   2.470 -      and conv: "\<And>e. 0 < e \<Longrightarrow> \<exists>N. \<forall>n x. n \<ge> N \<longrightarrow> x \<in> s
   2.471 +  fixes S :: "complex set"
   2.472 +  assumes cvs: "convex S"
   2.473 +      and df:  "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x within S)"
   2.474 +      and conv: "\<And>e. 0 < e \<Longrightarrow> \<exists>N. \<forall>n x. n \<ge> N \<longrightarrow> x \<in> S
   2.475                  \<longrightarrow> cmod ((\<Sum>i<n. f' i x) - g' x) \<le> e"
   2.476 -      and "\<exists>x l. x \<in> s \<and> ((\<lambda>n. f n x) sums l)"
   2.477 -    shows "\<exists>g. \<forall>x \<in> s. ((\<lambda>n. f n x) sums g x) \<and> ((g has_field_derivative g' x) (at x within s))"
   2.478 +      and "\<exists>x l. x \<in> S \<and> ((\<lambda>n. f n x) sums l)"
   2.479 +    shows "\<exists>g. \<forall>x \<in> S. ((\<lambda>n. f n x) sums g x) \<and> ((g has_field_derivative g' x) (at x within S))"
   2.480  proof -
   2.481 -  from assms obtain x l where x: "x \<in> s" and sf: "((\<lambda>n. f n x) sums l)"
   2.482 +  from assms obtain x l where x: "x \<in> S" and sf: "((\<lambda>n. f n x) sums l)"
   2.483      by blast
   2.484    { fix e::real assume e: "e > 0"
   2.485 -    then obtain N where N: "\<forall>n x. n \<ge> N \<longrightarrow> x \<in> s
   2.486 +    then obtain N where N: "\<forall>n x. n \<ge> N \<longrightarrow> x \<in> S
   2.487              \<longrightarrow> cmod ((\<Sum>i<n. f' i x) - g' x) \<le> e"
   2.488        by (metis conv)
   2.489 -    have "\<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. cmod ((\<Sum>i<n. h * f' i x) - g' x * h) \<le> e * cmod h"
   2.490 +    have "\<exists>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>h. cmod ((\<Sum>i<n. h * f' i x) - g' x * h) \<le> e * cmod h"
   2.491      proof (rule exI [of _ N], clarify)
   2.492        fix n y h
   2.493 -      assume "N \<le> n" "y \<in> s"
   2.494 +      assume "N \<le> n" "y \<in> S"
   2.495        then have "cmod ((\<Sum>i<n. f' i y) - g' y) \<le> e"
   2.496          by (metis N)
   2.497        then have "cmod h * cmod ((\<Sum>i<n. f' i y) - g' y) \<le> cmod h * e"
   2.498 @@ -877,12 +852,12 @@
   2.499    unfolding has_field_derivative_def
   2.500    proof (rule has_derivative_series [OF cvs _ _ x])
   2.501      fix n x
   2.502 -    assume "x \<in> s"
   2.503 -    then show "((f n) has_derivative (\<lambda>z. z * f' n x)) (at x within s)"
   2.504 +    assume "x \<in> S"
   2.505 +    then show "((f n) has_derivative (\<lambda>z. z * f' n x)) (at x within S)"
   2.506        by (metis df has_field_derivative_def mult_commute_abs)
   2.507    next show " ((\<lambda>n. f n x) sums l)"
   2.508      by (rule sf)
   2.509 -  next show "\<And>e. e>0 \<Longrightarrow> \<forall>\<^sub>F n in sequentially. \<forall>x\<in>s. \<forall>h. cmod ((\<Sum>i<n. h * f' i x) - g' x * h) \<le> e * cmod h"
   2.510 +  next show "\<And>e. e>0 \<Longrightarrow> \<forall>\<^sub>F n in sequentially. \<forall>x\<in>S. \<forall>h. cmod ((\<Sum>i<n. h * f' i x) - g' x * h) \<le> e * cmod h"
   2.511        unfolding eventually_sequentially by (blast intro: **)
   2.512    qed
   2.513  qed
   2.514 @@ -890,23 +865,23 @@
   2.515  
   2.516  lemma field_differentiable_series:
   2.517    fixes f :: "nat \<Rightarrow> 'a::{real_normed_field,banach} \<Rightarrow> 'a"
   2.518 -  assumes "convex s" "open s"
   2.519 -  assumes "\<And>n x. x \<in> s \<Longrightarrow> (f n has_field_derivative f' n x) (at x)"
   2.520 -  assumes "uniformly_convergent_on s (\<lambda>n x. \<Sum>i<n. f' i x)"
   2.521 -  assumes "x0 \<in> s" "summable (\<lambda>n. f n x0)" and x: "x \<in> s"
   2.522 +  assumes "convex S" "open S"
   2.523 +  assumes "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x)"
   2.524 +  assumes "uniformly_convergent_on S (\<lambda>n x. \<Sum>i<n. f' i x)"
   2.525 +  assumes "x0 \<in> S" "summable (\<lambda>n. f n x0)" and x: "x \<in> S"
   2.526    shows  "(\<lambda>x. \<Sum>n. f n x) field_differentiable (at x)"
   2.527  proof -
   2.528 -  from assms(4) obtain g' where A: "uniform_limit s (\<lambda>n x. \<Sum>i<n. f' i x) g' sequentially"
   2.529 +  from assms(4) obtain g' where A: "uniform_limit S (\<lambda>n x. \<Sum>i<n. f' i x) g' sequentially"
   2.530      unfolding uniformly_convergent_on_def by blast
   2.531 -  from x and \<open>open s\<close> have s: "at x within s = at x" by (rule at_within_open)
   2.532 -  have "\<exists>g. \<forall>x\<in>s. (\<lambda>n. f n x) sums g x \<and> (g has_field_derivative g' x) (at x within s)"
   2.533 -    by (intro has_field_derivative_series[of s f f' g' x0] assms A has_field_derivative_at_within)
   2.534 -  then obtain g where g: "\<And>x. x \<in> s \<Longrightarrow> (\<lambda>n. f n x) sums g x"
   2.535 -    "\<And>x. x \<in> s \<Longrightarrow> (g has_field_derivative g' x) (at x within s)" by blast
   2.536 +  from x and \<open>open S\<close> have S: "at x within S = at x" by (rule at_within_open)
   2.537 +  have "\<exists>g. \<forall>x\<in>S. (\<lambda>n. f n x) sums g x \<and> (g has_field_derivative g' x) (at x within S)"
   2.538 +    by (intro has_field_derivative_series[of S f f' g' x0] assms A has_field_derivative_at_within)
   2.539 +  then obtain g where g: "\<And>x. x \<in> S \<Longrightarrow> (\<lambda>n. f n x) sums g x"
   2.540 +    "\<And>x. x \<in> S \<Longrightarrow> (g has_field_derivative g' x) (at x within S)" by blast
   2.541    from g(2)[OF x] have g': "(g has_derivative ( * ) (g' x)) (at x)"
   2.542 -    by (simp add: has_field_derivative_def s)
   2.543 +    by (simp add: has_field_derivative_def S)
   2.544    have "((\<lambda>x. \<Sum>n. f n x) has_derivative ( * ) (g' x)) (at x)"
   2.545 -    by (rule has_derivative_transform_within_open[OF g' \<open>open s\<close> x])
   2.546 +    by (rule has_derivative_transform_within_open[OF g' \<open>open S\<close> x])
   2.547         (insert g, auto simp: sums_iff)
   2.548    thus "(\<lambda>x. \<Sum>n. f n x) field_differentiable (at x)" unfolding differentiable_def
   2.549      by (auto simp: summable_def field_differentiable_def has_field_derivative_def)
   2.550 @@ -915,11 +890,11 @@
   2.551  subsection\<open>Bound theorem\<close>
   2.552  
   2.553  lemma field_differentiable_bound:
   2.554 -  fixes s :: "'a::real_normed_field set"
   2.555 -  assumes cvs: "convex s"
   2.556 -      and df:  "\<And>z. z \<in> s \<Longrightarrow> (f has_field_derivative f' z) (at z within s)"
   2.557 -      and dn:  "\<And>z. z \<in> s \<Longrightarrow> norm (f' z) \<le> B"
   2.558 -      and "x \<in> s"  "y \<in> s"
   2.559 +  fixes S :: "'a::real_normed_field set"
   2.560 +  assumes cvs: "convex S"
   2.561 +      and df:  "\<And>z. z \<in> S \<Longrightarrow> (f has_field_derivative f' z) (at z within S)"
   2.562 +      and dn:  "\<And>z. z \<in> S \<Longrightarrow> norm (f' z) \<le> B"
   2.563 +      and "x \<in> S"  "y \<in> S"
   2.564      shows "norm(f x - f y) \<le> B * norm(x - y)"
   2.565    apply (rule differentiable_bound [OF cvs])
   2.566    apply (erule df [unfolded has_field_derivative_def])
   2.567 @@ -941,35 +916,31 @@
   2.568    apply (auto simp:  bounded_linear_mult_right)
   2.569    done
   2.570  
   2.571 -lemmas has_complex_derivative_inverse_basic = has_field_derivative_inverse_basic
   2.572 -
   2.573  lemma has_field_derivative_inverse_strong:
   2.574    fixes f :: "'a::{euclidean_space,real_normed_field} \<Rightarrow> 'a"
   2.575    shows "DERIV f x :> f' \<Longrightarrow>
   2.576           f' \<noteq> 0 \<Longrightarrow>
   2.577 -         open s \<Longrightarrow>
   2.578 -         x \<in> s \<Longrightarrow>
   2.579 -         continuous_on s f \<Longrightarrow>
   2.580 -         (\<And>z. z \<in> s \<Longrightarrow> g (f z) = z)
   2.581 +         open S \<Longrightarrow>
   2.582 +         x \<in> S \<Longrightarrow>
   2.583 +         continuous_on S f \<Longrightarrow>
   2.584 +         (\<And>z. z \<in> S \<Longrightarrow> g (f z) = z)
   2.585           \<Longrightarrow> DERIV g (f x) :> inverse (f')"
   2.586    unfolding has_field_derivative_def
   2.587 -  apply (rule has_derivative_inverse_strong [of s x f g ])
   2.588 +  apply (rule has_derivative_inverse_strong [of S x f g ])
   2.589    by auto
   2.590 -lemmas has_complex_derivative_inverse_strong = has_field_derivative_inverse_strong
   2.591  
   2.592  lemma has_field_derivative_inverse_strong_x:
   2.593    fixes f :: "'a::{euclidean_space,real_normed_field} \<Rightarrow> 'a"
   2.594    shows  "DERIV f (g y) :> f' \<Longrightarrow>
   2.595            f' \<noteq> 0 \<Longrightarrow>
   2.596 -          open s \<Longrightarrow>
   2.597 -          continuous_on s f \<Longrightarrow>
   2.598 -          g y \<in> s \<Longrightarrow> f(g y) = y \<Longrightarrow>
   2.599 -          (\<And>z. z \<in> s \<Longrightarrow> g (f z) = z)
   2.600 +          open S \<Longrightarrow>
   2.601 +          continuous_on S f \<Longrightarrow>
   2.602 +          g y \<in> S \<Longrightarrow> f(g y) = y \<Longrightarrow>
   2.603 +          (\<And>z. z \<in> S \<Longrightarrow> g (f z) = z)
   2.604            \<Longrightarrow> DERIV g y :> inverse (f')"
   2.605    unfolding has_field_derivative_def
   2.606 -  apply (rule has_derivative_inverse_strong_x [of s g y f])
   2.607 +  apply (rule has_derivative_inverse_strong_x [of S g y f])
   2.608    by auto
   2.609 -lemmas has_complex_derivative_inverse_strong_x = has_field_derivative_inverse_strong_x
   2.610  
   2.611  subsection \<open>Taylor on Complex Numbers\<close>
   2.612  
   2.613 @@ -979,19 +950,19 @@
   2.614  by (induct n) auto
   2.615  
   2.616  lemma field_taylor:
   2.617 -  assumes s: "convex s"
   2.618 -      and f: "\<And>i x. x \<in> s \<Longrightarrow> i \<le> n \<Longrightarrow> (f i has_field_derivative f (Suc i) x) (at x within s)"
   2.619 -      and B: "\<And>x. x \<in> s \<Longrightarrow> norm (f (Suc n) x) \<le> B"
   2.620 -      and w: "w \<in> s"
   2.621 -      and z: "z \<in> s"
   2.622 +  assumes S: "convex S"
   2.623 +      and f: "\<And>i x. x \<in> S \<Longrightarrow> i \<le> n \<Longrightarrow> (f i has_field_derivative f (Suc i) x) (at x within S)"
   2.624 +      and B: "\<And>x. x \<in> S \<Longrightarrow> norm (f (Suc n) x) \<le> B"
   2.625 +      and w: "w \<in> S"
   2.626 +      and z: "z \<in> S"
   2.627      shows "norm(f 0 z - (\<Sum>i\<le>n. f i w * (z-w) ^ i / (fact i)))
   2.628            \<le> B * norm(z - w)^(Suc n) / fact n"
   2.629  proof -
   2.630 -  have wzs: "closed_segment w z \<subseteq> s" using assms
   2.631 +  have wzs: "closed_segment w z \<subseteq> S" using assms
   2.632      by (metis convex_contains_segment)
   2.633    { fix u
   2.634      assume "u \<in> closed_segment w z"
   2.635 -    then have "u \<in> s"
   2.636 +    then have "u \<in> S"
   2.637        by (metis wzs subsetD)
   2.638      have "(\<Sum>i\<le>n. f i u * (- of_nat i * (z-u)^(i - 1)) / (fact i) +
   2.639                        f (Suc i) u * (z-u)^i / (fact i)) =
   2.640 @@ -1033,16 +1004,16 @@
   2.641      qed
   2.642      then have "((\<lambda>v. (\<Sum>i\<le>n. f i v * (z - v)^i / (fact i)))
   2.643                  has_field_derivative f (Suc n) u * (z-u) ^ n / (fact n))
   2.644 -               (at u within s)"
   2.645 +               (at u within S)"
   2.646        apply (intro derivative_eq_intros)
   2.647 -      apply (blast intro: assms \<open>u \<in> s\<close>)
   2.648 +      apply (blast intro: assms \<open>u \<in> S\<close>)
   2.649        apply (rule refl)+
   2.650        apply (auto simp: field_simps)
   2.651        done
   2.652    } note sum_deriv = this
   2.653    { fix u
   2.654      assume u: "u \<in> closed_segment w z"
   2.655 -    then have us: "u \<in> s"
   2.656 +    then have us: "u \<in> S"
   2.657        by (metis wzs subsetD)
   2.658      have "norm (f (Suc n) u) * norm (z - u) ^ n \<le> norm (f (Suc n) u) * norm (u - z) ^ n"
   2.659        by (metis norm_minus_commute order_refl)
   2.660 @@ -1063,7 +1034,7 @@
   2.661    also have "... \<le> B * norm (z - w) ^ n / (fact n) * norm (w - z)"
   2.662      apply (rule field_differentiable_bound
   2.663        [where f' = "\<lambda>w. f (Suc n) w * (z - w)^n / (fact n)"
   2.664 -         and s = "closed_segment w z", OF convex_closed_segment])
   2.665 +         and S = "closed_segment w z", OF convex_closed_segment])
   2.666      apply (auto simp: ends_in_segment DERIV_subset [OF sum_deriv wzs]
   2.667                    norm_divide norm_mult norm_power divide_le_cancel cmod_bound)
   2.668      done
   2.669 @@ -1073,11 +1044,11 @@
   2.670  qed
   2.671  
   2.672  lemma complex_taylor:
   2.673 -  assumes s: "convex s"
   2.674 -      and f: "\<And>i x. x \<in> s \<Longrightarrow> i \<le> n \<Longrightarrow> (f i has_field_derivative f (Suc i) x) (at x within s)"
   2.675 -      and B: "\<And>x. x \<in> s \<Longrightarrow> cmod (f (Suc n) x) \<le> B"
   2.676 -      and w: "w \<in> s"
   2.677 -      and z: "z \<in> s"
   2.678 +  assumes S: "convex S"
   2.679 +      and f: "\<And>i x. x \<in> S \<Longrightarrow> i \<le> n \<Longrightarrow> (f i has_field_derivative f (Suc i) x) (at x within S)"
   2.680 +      and B: "\<And>x. x \<in> S \<Longrightarrow> cmod (f (Suc n) x) \<le> B"
   2.681 +      and w: "w \<in> S"
   2.682 +      and z: "z \<in> S"
   2.683      shows "cmod(f 0 z - (\<Sum>i\<le>n. f i w * (z-w) ^ i / (fact i)))
   2.684            \<le> B * cmod(z - w)^(Suc n) / fact n"
   2.685    using assms by (rule field_taylor)
     3.1 --- a/src/HOL/Analysis/Complex_Transcendental.thy	Mon May 21 18:36:30 2018 +0200
     3.2 +++ b/src/HOL/Analysis/Complex_Transcendental.thy	Mon May 21 22:52:16 2018 +0100
     3.3 @@ -1234,10 +1234,10 @@
     3.4    have "(exp has_field_derivative z) (at (Ln z))"
     3.5      by (metis znz DERIV_exp exp_Ln)
     3.6    then show "(Ln has_field_derivative inverse(z)) (at z)"
     3.7 -    apply (rule has_complex_derivative_inverse_strong_x
     3.8 -              [where s = "{w. -pi < Im(w) \<and> Im(w) < pi}"])
     3.9 +    apply (rule has_field_derivative_inverse_strong_x
    3.10 +              [where S = "{w. -pi < Im(w) \<and> Im(w) < pi}"])
    3.11      using znz *
    3.12 -    apply (auto simp: Transcendental.continuous_on_exp [OF continuous_on_id] open_Collect_conj open_halfspace_Im_gt open_halfspace_Im_lt mpi_less_Im_Ln)
    3.13 +    apply (auto simp: continuous_on_exp [OF continuous_on_id] open_Collect_conj open_halfspace_Im_gt open_halfspace_Im_lt mpi_less_Im_Ln)
    3.14      done
    3.15  qed
    3.16  
    3.17 @@ -3054,7 +3054,7 @@
    3.18    then have "cos (Arcsin z) \<noteq> 0"
    3.19      by (metis diff_0_right power_zero_numeral sin_squared_eq)
    3.20    then show ?thesis
    3.21 -    apply (rule has_complex_derivative_inverse_basic [OF DERIV_sin _ _ open_ball [of z 1]])
    3.22 +    apply (rule has_field_derivative_inverse_basic [OF DERIV_sin _ _ open_ball [of z 1]])
    3.23      apply (auto intro: isCont_Arcsin assms)
    3.24      done
    3.25  qed
    3.26 @@ -3219,7 +3219,7 @@
    3.27    then have "- sin (Arccos z) \<noteq> 0"
    3.28      by (metis cos_squared_eq diff_0_right mult_zero_left neg_0_equal_iff_equal power2_eq_square)
    3.29    then have "(Arccos has_field_derivative inverse(- sin(Arccos z))) (at z)"
    3.30 -    apply (rule has_complex_derivative_inverse_basic [OF DERIV_cos _ _ open_ball [of z 1]])
    3.31 +    apply (rule has_field_derivative_inverse_basic [OF DERIV_cos _ _ open_ball [of z 1]])
    3.32      apply (auto intro: isCont_Arccos assms)
    3.33      done
    3.34    then show ?thesis
     4.1 --- a/src/HOL/Analysis/Conformal_Mappings.thy	Mon May 21 18:36:30 2018 +0200
     4.2 +++ b/src/HOL/Analysis/Conformal_Mappings.thy	Mon May 21 22:52:16 2018 +0100
     4.3 @@ -1290,7 +1290,7 @@
     4.4      have 2: "deriv f z \<noteq> 0"
     4.5        using \<open>z \<in> S\<close> \<open>open S\<close> holf holomorphic_injective_imp_regular injf by blast
     4.6      show ?thesis
     4.7 -      apply (rule has_complex_derivative_inverse_strong [OF 1 2 \<open>open S\<close> \<open>z \<in> S\<close>])
     4.8 +      apply (rule has_field_derivative_inverse_strong [OF 1 2 \<open>open S\<close> \<open>z \<in> S\<close>])
     4.9         apply (simp add: holf holomorphic_on_imp_continuous_on)
    4.10        by (simp add: injf the_inv_into_f_f)
    4.11    qed
     5.1 --- a/src/HOL/Analysis/Great_Picard.thy	Mon May 21 18:36:30 2018 +0200
     5.2 +++ b/src/HOL/Analysis/Great_Picard.thy	Mon May 21 22:52:16 2018 +0100
     5.3 @@ -1136,7 +1136,7 @@
     5.4          apply (metis Suc_pred mult.commute power_Suc)
     5.5          done
     5.6        then show ?thesis
     5.7 -        apply (rule DERIV_imp_deriv [OF DERIV_transform_within_open [where s = "ball z0 r"]])
     5.8 +        apply (rule DERIV_imp_deriv [OF DERIV_transform_within_open [where S = "ball z0 r"]])
     5.9          using that \<open>m > 0\<close> \<open>0 < r\<close>
    5.10            apply (simp_all add: hnz geq)
    5.11          done