111 by (metis real_lim_sequentially sum_in_Reals) |
111 by (metis real_lim_sequentially sum_in_Reals) |
112 |
112 |
113 lemma Lim_null_comparison_Re: |
113 lemma Lim_null_comparison_Re: |
114 assumes "eventually (\<lambda>x. norm(f x) \<le> Re(g x)) F" "(g \<longlongrightarrow> 0) F" shows "(f \<longlongrightarrow> 0) F" |
114 assumes "eventually (\<lambda>x. norm(f x) \<le> Re(g x)) F" "(g \<longlongrightarrow> 0) F" shows "(f \<longlongrightarrow> 0) F" |
115 by (rule Lim_null_comparison[OF assms(1)] tendsto_eq_intros assms(2))+ simp |
115 by (rule Lim_null_comparison[OF assms(1)] tendsto_eq_intros assms(2))+ simp |
116 |
|
117 lemma closed_segment_same_Re: |
|
118 assumes "Re a = Re b" |
|
119 shows "closed_segment a b = {z. Re z = Re a \<and> Im z \<in> closed_segment (Im a) (Im b)}" |
|
120 proof safe |
|
121 fix z assume "z \<in> closed_segment a b" |
|
122 then obtain u where u: "u \<in> {0..1}" "z = a + of_real u * (b - a)" |
|
123 by (auto simp: closed_segment_def scaleR_conv_of_real algebra_simps) |
|
124 from assms show "Re z = Re a" by (auto simp: u) |
|
125 from u(1) show "Im z \<in> closed_segment (Im a) (Im b)" |
|
126 by (force simp: u closed_segment_def algebra_simps) |
|
127 next |
|
128 fix z assume [simp]: "Re z = Re a" and "Im z \<in> closed_segment (Im a) (Im b)" |
|
129 then obtain u where u: "u \<in> {0..1}" "Im z = Im a + of_real u * (Im b - Im a)" |
|
130 by (auto simp: closed_segment_def scaleR_conv_of_real algebra_simps) |
|
131 from u(1) show "z \<in> closed_segment a b" using assms |
|
132 by (force simp: u closed_segment_def algebra_simps scaleR_conv_of_real complex_eq_iff) |
|
133 qed |
|
134 |
|
135 lemma closed_segment_same_Im: |
|
136 assumes "Im a = Im b" |
|
137 shows "closed_segment a b = {z. Im z = Im a \<and> Re z \<in> closed_segment (Re a) (Re b)}" |
|
138 proof safe |
|
139 fix z assume "z \<in> closed_segment a b" |
|
140 then obtain u where u: "u \<in> {0..1}" "z = a + of_real u * (b - a)" |
|
141 by (auto simp: closed_segment_def scaleR_conv_of_real algebra_simps) |
|
142 from assms show "Im z = Im a" by (auto simp: u) |
|
143 from u(1) show "Re z \<in> closed_segment (Re a) (Re b)" |
|
144 by (force simp: u closed_segment_def algebra_simps) |
|
145 next |
|
146 fix z assume [simp]: "Im z = Im a" and "Re z \<in> closed_segment (Re a) (Re b)" |
|
147 then obtain u where u: "u \<in> {0..1}" "Re z = Re a + of_real u * (Re b - Re a)" |
|
148 by (auto simp: closed_segment_def scaleR_conv_of_real algebra_simps) |
|
149 from u(1) show "z \<in> closed_segment a b" using assms |
|
150 by (force simp: u closed_segment_def algebra_simps scaleR_conv_of_real complex_eq_iff) |
|
151 qed |
|
152 |
116 |
153 subsection\<open>Holomorphic functions\<close> |
117 subsection\<open>Holomorphic functions\<close> |
154 |
118 |
155 definition\<^marker>\<open>tag important\<close> holomorphic_on :: "[complex \<Rightarrow> complex, complex set] \<Rightarrow> bool" |
119 definition\<^marker>\<open>tag important\<close> holomorphic_on :: "[complex \<Rightarrow> complex, complex set] \<Rightarrow> bool" |
156 (infixl "(holomorphic'_on)" 50) |
120 (infixl "(holomorphic'_on)" 50) |
308 also have "g holomorphic_on B \<longleftrightarrow> ?h holomorphic_on B" |
272 also have "g holomorphic_on B \<longleftrightarrow> ?h holomorphic_on B" |
309 using assms by (intro holomorphic_cong) auto |
273 using assms by (intro holomorphic_cong) auto |
310 finally show \<dots> . |
274 finally show \<dots> . |
311 qed (insert assms, auto) |
275 qed (insert assms, auto) |
312 |
276 |
313 lemma DERIV_deriv_iff_field_differentiable: |
|
314 "DERIV f x :> deriv f x \<longleftrightarrow> f field_differentiable at x" |
|
315 unfolding field_differentiable_def by (metis DERIV_imp_deriv) |
|
316 |
|
317 lemma holomorphic_derivI: |
277 lemma holomorphic_derivI: |
318 "\<lbrakk>f holomorphic_on S; open S; x \<in> S\<rbrakk> |
278 "\<lbrakk>f holomorphic_on S; open S; x \<in> S\<rbrakk> |
319 \<Longrightarrow> (f has_field_derivative deriv f x) (at x within T)" |
279 \<Longrightarrow> (f has_field_derivative deriv f x) (at x within T)" |
320 by (metis DERIV_deriv_iff_field_differentiable at_within_open holomorphic_on_def has_field_derivative_at_within) |
280 by (metis DERIV_deriv_iff_field_differentiable at_within_open holomorphic_on_def has_field_derivative_at_within) |
321 |
|
322 lemma complex_derivative_chain: |
|
323 "f field_differentiable at x \<Longrightarrow> g field_differentiable at (f x) |
|
324 \<Longrightarrow> deriv (g o f) x = deriv g (f x) * deriv f x" |
|
325 by (metis DERIV_deriv_iff_field_differentiable DERIV_chain DERIV_imp_deriv) |
|
326 |
|
327 lemma deriv_linear [simp]: "deriv (\<lambda>w. c * w) = (\<lambda>z. c)" |
|
328 by (metis DERIV_imp_deriv DERIV_cmult_Id) |
|
329 |
|
330 lemma deriv_ident [simp]: "deriv (\<lambda>w. w) = (\<lambda>z. 1)" |
|
331 by (metis DERIV_imp_deriv DERIV_ident) |
|
332 |
|
333 lemma deriv_id [simp]: "deriv id = (\<lambda>z. 1)" |
|
334 by (simp add: id_def) |
|
335 |
|
336 lemma deriv_const [simp]: "deriv (\<lambda>w. c) = (\<lambda>z. 0)" |
|
337 by (metis DERIV_imp_deriv DERIV_const) |
|
338 |
|
339 lemma deriv_add [simp]: |
|
340 "\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
|
341 \<Longrightarrow> deriv (\<lambda>w. f w + g w) z = deriv f z + deriv g z" |
|
342 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
|
343 by (auto intro!: DERIV_imp_deriv derivative_intros) |
|
344 |
|
345 lemma deriv_diff [simp]: |
|
346 "\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
|
347 \<Longrightarrow> deriv (\<lambda>w. f w - g w) z = deriv f z - deriv g z" |
|
348 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
|
349 by (auto intro!: DERIV_imp_deriv derivative_intros) |
|
350 |
|
351 lemma deriv_mult [simp]: |
|
352 "\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
|
353 \<Longrightarrow> deriv (\<lambda>w. f w * g w) z = f z * deriv g z + deriv f z * g z" |
|
354 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
|
355 by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
|
356 |
|
357 lemma deriv_cmult: |
|
358 "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. c * f w) z = c * deriv f z" |
|
359 by simp |
|
360 |
|
361 lemma deriv_cmult_right: |
|
362 "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w * c) z = deriv f z * c" |
|
363 by simp |
|
364 |
|
365 lemma deriv_inverse [simp]: |
|
366 "\<lbrakk>f field_differentiable at z; f z \<noteq> 0\<rbrakk> |
|
367 \<Longrightarrow> deriv (\<lambda>w. inverse (f w)) z = - deriv f z / f z ^ 2" |
|
368 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
|
369 by (safe intro!: DERIV_imp_deriv derivative_eq_intros) (auto simp: field_split_simps power2_eq_square) |
|
370 |
|
371 lemma deriv_divide [simp]: |
|
372 "\<lbrakk>f field_differentiable at z; g field_differentiable at z; g z \<noteq> 0\<rbrakk> |
|
373 \<Longrightarrow> deriv (\<lambda>w. f w / g w) z = (deriv f z * g z - f z * deriv g z) / g z ^ 2" |
|
374 by (simp add: field_class.field_divide_inverse field_differentiable_inverse) |
|
375 (simp add: field_split_simps power2_eq_square) |
|
376 |
|
377 lemma deriv_cdivide_right: |
|
378 "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w / c) z = deriv f z / c" |
|
379 by (simp add: field_class.field_divide_inverse) |
|
380 |
281 |
381 lemma complex_derivative_transform_within_open: |
282 lemma complex_derivative_transform_within_open: |
382 "\<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> |
283 "\<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> |
383 \<Longrightarrow> deriv f z = deriv g z" |
284 \<Longrightarrow> deriv f z = deriv g z" |
384 unfolding holomorphic_on_def |
285 unfolding holomorphic_on_def |
385 by (rule DERIV_imp_deriv) |
286 by (rule DERIV_imp_deriv) |
386 (metis DERIV_deriv_iff_field_differentiable has_field_derivative_transform_within_open at_within_open) |
287 (metis DERIV_deriv_iff_field_differentiable has_field_derivative_transform_within_open at_within_open) |
387 |
|
388 lemma deriv_compose_linear: |
|
389 "f field_differentiable at (c * z) \<Longrightarrow> deriv (\<lambda>w. f (c * w)) z = c * deriv f (c * z)" |
|
390 apply (rule DERIV_imp_deriv) |
|
391 unfolding DERIV_deriv_iff_field_differentiable [symmetric] |
|
392 by (metis (full_types) DERIV_chain2 DERIV_cmult_Id mult.commute) |
|
393 |
|
394 |
|
395 lemma nonzero_deriv_nonconstant: |
|
396 assumes df: "DERIV f \<xi> :> df" and S: "open S" "\<xi> \<in> S" and "df \<noteq> 0" |
|
397 shows "\<not> f constant_on S" |
|
398 unfolding constant_on_def |
|
399 by (metis \<open>df \<noteq> 0\<close> has_field_derivative_transform_within_open [OF df S] DERIV_const DERIV_unique) |
|
400 |
288 |
401 lemma holomorphic_nonconstant: |
289 lemma holomorphic_nonconstant: |
402 assumes holf: "f holomorphic_on S" and "open S" "\<xi> \<in> S" "deriv f \<xi> \<noteq> 0" |
290 assumes holf: "f holomorphic_on S" and "open S" "\<xi> \<in> S" "deriv f \<xi> \<noteq> 0" |
403 shows "\<not> f constant_on S" |
291 shows "\<not> f constant_on S" |
404 by (rule nonzero_deriv_nonconstant [of f "deriv f \<xi>" \<xi> S]) |
292 by (rule nonzero_deriv_nonconstant [of f "deriv f \<xi>" \<xi> S]) |