275 assumes "eventually (\<lambda>x. norm(f x) \<le> Re(g x)) F" "(g \<longlongrightarrow> 0) F" shows "(f \<longlongrightarrow> 0) F" |
275 assumes "eventually (\<lambda>x. norm(f x) \<le> Re(g x)) F" "(g \<longlongrightarrow> 0) F" shows "(f \<longlongrightarrow> 0) F" |
276 by (rule Lim_null_comparison[OF assms(1)] tendsto_eq_intros assms(2))+ simp |
276 by (rule Lim_null_comparison[OF assms(1)] tendsto_eq_intros assms(2))+ simp |
277 |
277 |
278 subsection\<open>Holomorphic functions\<close> |
278 subsection\<open>Holomorphic functions\<close> |
279 |
279 |
280 definition complex_differentiable :: "['a \<Rightarrow> 'a::real_normed_field, 'a filter] \<Rightarrow> bool" |
280 definition field_differentiable :: "['a \<Rightarrow> 'a::real_normed_field, 'a filter] \<Rightarrow> bool" |
281 (infixr "(complex'_differentiable)" 50) |
281 (infixr "(field'_differentiable)" 50) |
282 where "f complex_differentiable F \<equiv> \<exists>f'. (f has_field_derivative f') F" |
282 where "f field_differentiable F \<equiv> \<exists>f'. (f has_field_derivative f') F" |
283 |
283 |
284 lemma complex_differentiable_derivI: |
284 lemma field_differentiable_derivI: |
285 "f complex_differentiable (at x) \<Longrightarrow> (f has_field_derivative deriv f x) (at x)" |
285 "f field_differentiable (at x) \<Longrightarrow> (f has_field_derivative deriv f x) (at x)" |
286 by (simp add: complex_differentiable_def DERIV_deriv_iff_has_field_derivative) |
286 by (simp add: field_differentiable_def DERIV_deriv_iff_has_field_derivative) |
287 |
287 |
288 lemma complex_differentiable_imp_continuous_at: |
288 lemma field_differentiable_imp_continuous_at: |
289 "f complex_differentiable (at x within s) \<Longrightarrow> continuous (at x within s) f" |
289 "f field_differentiable (at x within s) \<Longrightarrow> continuous (at x within s) f" |
290 by (metis DERIV_continuous complex_differentiable_def) |
290 by (metis DERIV_continuous field_differentiable_def) |
291 |
291 |
292 lemma complex_differentiable_within_subset: |
292 lemma field_differentiable_within_subset: |
293 "\<lbrakk>f complex_differentiable (at x within s); t \<subseteq> s\<rbrakk> |
293 "\<lbrakk>f field_differentiable (at x within s); t \<subseteq> s\<rbrakk> |
294 \<Longrightarrow> f complex_differentiable (at x within t)" |
294 \<Longrightarrow> f field_differentiable (at x within t)" |
295 by (metis DERIV_subset complex_differentiable_def) |
295 by (metis DERIV_subset field_differentiable_def) |
296 |
296 |
297 lemma complex_differentiable_at_within: |
297 lemma field_differentiable_at_within: |
298 "\<lbrakk>f complex_differentiable (at x)\<rbrakk> |
298 "\<lbrakk>f field_differentiable (at x)\<rbrakk> |
299 \<Longrightarrow> f complex_differentiable (at x within s)" |
299 \<Longrightarrow> f field_differentiable (at x within s)" |
300 unfolding complex_differentiable_def |
300 unfolding field_differentiable_def |
301 by (metis DERIV_subset top_greatest) |
301 by (metis DERIV_subset top_greatest) |
302 |
302 |
303 lemma complex_differentiable_linear [simp,derivative_intros]: "(op * c) complex_differentiable F" |
303 lemma field_differentiable_linear [simp,derivative_intros]: "(op * c) field_differentiable F" |
304 proof - |
304 proof - |
305 show ?thesis |
305 show ?thesis |
306 unfolding complex_differentiable_def has_field_derivative_def mult_commute_abs |
306 unfolding field_differentiable_def has_field_derivative_def mult_commute_abs |
307 by (force intro: has_derivative_mult_right) |
307 by (force intro: has_derivative_mult_right) |
308 qed |
308 qed |
309 |
309 |
310 lemma complex_differentiable_const [simp,derivative_intros]: "(\<lambda>z. c) complex_differentiable F" |
310 lemma field_differentiable_const [simp,derivative_intros]: "(\<lambda>z. c) field_differentiable F" |
311 unfolding complex_differentiable_def has_field_derivative_def |
311 unfolding field_differentiable_def has_field_derivative_def |
312 by (rule exI [where x=0]) |
312 by (rule exI [where x=0]) |
313 (metis has_derivative_const lambda_zero) |
313 (metis has_derivative_const lambda_zero) |
314 |
314 |
315 lemma complex_differentiable_ident [simp,derivative_intros]: "(\<lambda>z. z) complex_differentiable F" |
315 lemma field_differentiable_ident [simp,derivative_intros]: "(\<lambda>z. z) field_differentiable F" |
316 unfolding complex_differentiable_def has_field_derivative_def |
316 unfolding field_differentiable_def has_field_derivative_def |
317 by (rule exI [where x=1]) |
317 by (rule exI [where x=1]) |
318 (simp add: lambda_one [symmetric]) |
318 (simp add: lambda_one [symmetric]) |
319 |
319 |
320 lemma complex_differentiable_id [simp,derivative_intros]: "id complex_differentiable F" |
320 lemma field_differentiable_id [simp,derivative_intros]: "id field_differentiable F" |
321 unfolding id_def by (rule complex_differentiable_ident) |
321 unfolding id_def by (rule field_differentiable_ident) |
322 |
322 |
323 lemma complex_differentiable_minus [derivative_intros]: |
323 lemma field_differentiable_minus [derivative_intros]: |
324 "f complex_differentiable F \<Longrightarrow> (\<lambda>z. - (f z)) complex_differentiable F" |
324 "f field_differentiable F \<Longrightarrow> (\<lambda>z. - (f z)) field_differentiable F" |
325 using assms unfolding complex_differentiable_def |
325 using assms unfolding field_differentiable_def |
326 by (metis field_differentiable_minus) |
326 by (metis field_differentiable_minus) |
327 |
327 |
328 lemma complex_differentiable_add [derivative_intros]: |
328 lemma field_differentiable_add [derivative_intros]: |
329 assumes "f complex_differentiable F" "g complex_differentiable F" |
329 assumes "f field_differentiable F" "g field_differentiable F" |
330 shows "(\<lambda>z. f z + g z) complex_differentiable F" |
330 shows "(\<lambda>z. f z + g z) field_differentiable F" |
331 using assms unfolding complex_differentiable_def |
331 using assms unfolding field_differentiable_def |
332 by (metis field_differentiable_add) |
332 by (metis field_differentiable_add) |
333 |
333 |
334 lemma complex_differentiable_add_const [simp,derivative_intros]: |
334 lemma field_differentiable_add_const [simp,derivative_intros]: |
335 "op + c complex_differentiable F" |
335 "op + c field_differentiable F" |
336 by (simp add: complex_differentiable_add) |
336 by (simp add: field_differentiable_add) |
337 |
337 |
338 lemma complex_differentiable_setsum [derivative_intros]: |
338 lemma field_differentiable_setsum [derivative_intros]: |
339 "(\<And>i. i \<in> I \<Longrightarrow> (f i) complex_differentiable F) \<Longrightarrow> (\<lambda>z. \<Sum>i\<in>I. f i z) complex_differentiable F" |
339 "(\<And>i. i \<in> I \<Longrightarrow> (f i) field_differentiable F) \<Longrightarrow> (\<lambda>z. \<Sum>i\<in>I. f i z) field_differentiable F" |
340 by (induct I rule: infinite_finite_induct) |
340 by (induct I rule: infinite_finite_induct) |
341 (auto intro: complex_differentiable_add complex_differentiable_const) |
341 (auto intro: field_differentiable_add field_differentiable_const) |
342 |
342 |
343 lemma complex_differentiable_diff [derivative_intros]: |
343 lemma field_differentiable_diff [derivative_intros]: |
344 assumes "f complex_differentiable F" "g complex_differentiable F" |
344 assumes "f field_differentiable F" "g field_differentiable F" |
345 shows "(\<lambda>z. f z - g z) complex_differentiable F" |
345 shows "(\<lambda>z. f z - g z) field_differentiable F" |
346 using assms unfolding complex_differentiable_def |
346 using assms unfolding field_differentiable_def |
347 by (metis field_differentiable_diff) |
347 by (metis field_differentiable_diff) |
348 |
348 |
349 lemma complex_differentiable_inverse [derivative_intros]: |
349 lemma field_differentiable_inverse [derivative_intros]: |
350 assumes "f complex_differentiable (at a within s)" "f a \<noteq> 0" |
350 assumes "f field_differentiable (at a within s)" "f a \<noteq> 0" |
351 shows "(\<lambda>z. inverse (f z)) complex_differentiable (at a within s)" |
351 shows "(\<lambda>z. inverse (f z)) field_differentiable (at a within s)" |
352 using assms unfolding complex_differentiable_def |
352 using assms unfolding field_differentiable_def |
353 by (metis DERIV_inverse_fun) |
353 by (metis DERIV_inverse_fun) |
354 |
354 |
355 lemma complex_differentiable_mult [derivative_intros]: |
355 lemma field_differentiable_mult [derivative_intros]: |
356 assumes "f complex_differentiable (at a within s)" |
356 assumes "f field_differentiable (at a within s)" |
357 "g complex_differentiable (at a within s)" |
357 "g field_differentiable (at a within s)" |
358 shows "(\<lambda>z. f z * g z) complex_differentiable (at a within s)" |
358 shows "(\<lambda>z. f z * g z) field_differentiable (at a within s)" |
359 using assms unfolding complex_differentiable_def |
359 using assms unfolding field_differentiable_def |
360 by (metis DERIV_mult [of f _ a s g]) |
360 by (metis DERIV_mult [of f _ a s g]) |
361 |
361 |
362 lemma complex_differentiable_divide [derivative_intros]: |
362 lemma field_differentiable_divide [derivative_intros]: |
363 assumes "f complex_differentiable (at a within s)" |
363 assumes "f field_differentiable (at a within s)" |
364 "g complex_differentiable (at a within s)" |
364 "g field_differentiable (at a within s)" |
365 "g a \<noteq> 0" |
365 "g a \<noteq> 0" |
366 shows "(\<lambda>z. f z / g z) complex_differentiable (at a within s)" |
366 shows "(\<lambda>z. f z / g z) field_differentiable (at a within s)" |
367 using assms unfolding complex_differentiable_def |
367 using assms unfolding field_differentiable_def |
368 by (metis DERIV_divide [of f _ a s g]) |
368 by (metis DERIV_divide [of f _ a s g]) |
369 |
369 |
370 lemma complex_differentiable_power [derivative_intros]: |
370 lemma field_differentiable_power [derivative_intros]: |
371 assumes "f complex_differentiable (at a within s)" |
371 assumes "f field_differentiable (at a within s)" |
372 shows "(\<lambda>z. f z ^ n) complex_differentiable (at a within s)" |
372 shows "(\<lambda>z. f z ^ n) field_differentiable (at a within s)" |
373 using assms unfolding complex_differentiable_def |
373 using assms unfolding field_differentiable_def |
374 by (metis DERIV_power) |
374 by (metis DERIV_power) |
375 |
375 |
376 lemma complex_differentiable_transform_within: |
376 lemma field_differentiable_transform_within: |
377 "0 < d \<Longrightarrow> |
377 "0 < d \<Longrightarrow> |
378 x \<in> s \<Longrightarrow> |
378 x \<in> s \<Longrightarrow> |
379 (\<And>x'. x' \<in> s \<Longrightarrow> dist x' x < d \<Longrightarrow> f x' = g x') \<Longrightarrow> |
379 (\<And>x'. x' \<in> s \<Longrightarrow> dist x' x < d \<Longrightarrow> f x' = g x') \<Longrightarrow> |
380 f complex_differentiable (at x within s) |
380 f field_differentiable (at x within s) |
381 \<Longrightarrow> g complex_differentiable (at x within s)" |
381 \<Longrightarrow> g field_differentiable (at x within s)" |
382 unfolding complex_differentiable_def has_field_derivative_def |
382 unfolding field_differentiable_def has_field_derivative_def |
383 by (blast intro: has_derivative_transform_within) |
383 by (blast intro: has_derivative_transform_within) |
384 |
384 |
385 lemma complex_differentiable_compose_within: |
385 lemma field_differentiable_compose_within: |
386 assumes "f complex_differentiable (at a within s)" |
386 assumes "f field_differentiable (at a within s)" |
387 "g complex_differentiable (at (f a) within f`s)" |
387 "g field_differentiable (at (f a) within f`s)" |
388 shows "(g o f) complex_differentiable (at a within s)" |
388 shows "(g o f) field_differentiable (at a within s)" |
389 using assms unfolding complex_differentiable_def |
389 using assms unfolding field_differentiable_def |
390 by (metis DERIV_image_chain) |
390 by (metis DERIV_image_chain) |
391 |
391 |
392 lemma complex_differentiable_compose: |
392 lemma field_differentiable_compose: |
393 "f complex_differentiable at z \<Longrightarrow> g complex_differentiable at (f z) |
393 "f field_differentiable at z \<Longrightarrow> g field_differentiable at (f z) |
394 \<Longrightarrow> (g o f) complex_differentiable at z" |
394 \<Longrightarrow> (g o f) field_differentiable at z" |
395 by (metis complex_differentiable_at_within complex_differentiable_compose_within) |
395 by (metis field_differentiable_at_within field_differentiable_compose_within) |
396 |
396 |
397 lemma complex_differentiable_within_open: |
397 lemma field_differentiable_within_open: |
398 "\<lbrakk>a \<in> s; open s\<rbrakk> \<Longrightarrow> f complex_differentiable at a within s \<longleftrightarrow> |
398 "\<lbrakk>a \<in> s; open s\<rbrakk> \<Longrightarrow> f field_differentiable at a within s \<longleftrightarrow> |
399 f complex_differentiable at a" |
399 f field_differentiable at a" |
400 unfolding complex_differentiable_def |
400 unfolding field_differentiable_def |
401 by (metis at_within_open) |
401 by (metis at_within_open) |
402 |
402 |
403 subsection\<open>Caratheodory characterization\<close> |
403 subsection\<open>Caratheodory characterization\<close> |
404 |
404 |
405 lemma complex_differentiable_caratheodory_at: |
405 lemma field_differentiable_caratheodory_at: |
406 "f complex_differentiable (at z) \<longleftrightarrow> |
406 "f field_differentiable (at z) \<longleftrightarrow> |
407 (\<exists>g. (\<forall>w. f(w) - f(z) = g(w) * (w - z)) \<and> continuous (at z) g)" |
407 (\<exists>g. (\<forall>w. f(w) - f(z) = g(w) * (w - z)) \<and> continuous (at z) g)" |
408 using CARAT_DERIV [of f] |
408 using CARAT_DERIV [of f] |
409 by (simp add: complex_differentiable_def has_field_derivative_def) |
409 by (simp add: field_differentiable_def has_field_derivative_def) |
410 |
410 |
411 lemma complex_differentiable_caratheodory_within: |
411 lemma field_differentiable_caratheodory_within: |
412 "f complex_differentiable (at z within s) \<longleftrightarrow> |
412 "f field_differentiable (at z within s) \<longleftrightarrow> |
413 (\<exists>g. (\<forall>w. f(w) - f(z) = g(w) * (w - z)) \<and> continuous (at z within s) g)" |
413 (\<exists>g. (\<forall>w. f(w) - f(z) = g(w) * (w - z)) \<and> continuous (at z within s) g)" |
414 using DERIV_caratheodory_within [of f] |
414 using DERIV_caratheodory_within [of f] |
415 by (simp add: complex_differentiable_def has_field_derivative_def) |
415 by (simp add: field_differentiable_def has_field_derivative_def) |
416 |
416 |
417 subsection\<open>Holomorphic\<close> |
417 subsection\<open>Holomorphic\<close> |
418 |
418 |
419 definition holomorphic_on :: "[complex \<Rightarrow> complex, complex set] \<Rightarrow> bool" |
419 definition holomorphic_on :: "[complex \<Rightarrow> complex, complex set] \<Rightarrow> bool" |
420 (infixl "(holomorphic'_on)" 50) |
420 (infixl "(holomorphic'_on)" 50) |
421 where "f holomorphic_on s \<equiv> \<forall>x\<in>s. f complex_differentiable (at x within s)" |
421 where "f holomorphic_on s \<equiv> \<forall>x\<in>s. f field_differentiable (at x within s)" |
422 |
422 |
423 named_theorems holomorphic_intros "structural introduction rules for holomorphic_on" |
423 named_theorems holomorphic_intros "structural introduction rules for holomorphic_on" |
424 |
424 |
425 lemma holomorphic_onI [intro?]: "(\<And>x. x \<in> s \<Longrightarrow> f complex_differentiable (at x within s)) \<Longrightarrow> f holomorphic_on s" |
425 lemma holomorphic_onI [intro?]: "(\<And>x. x \<in> s \<Longrightarrow> f field_differentiable (at x within s)) \<Longrightarrow> f holomorphic_on s" |
426 by (simp add: holomorphic_on_def) |
426 by (simp add: holomorphic_on_def) |
427 |
427 |
428 lemma holomorphic_onD [dest?]: "\<lbrakk>f holomorphic_on s; x \<in> s\<rbrakk> \<Longrightarrow> f complex_differentiable (at x within s)" |
428 lemma holomorphic_onD [dest?]: "\<lbrakk>f holomorphic_on s; x \<in> s\<rbrakk> \<Longrightarrow> f field_differentiable (at x within s)" |
429 by (simp add: holomorphic_on_def) |
429 by (simp add: holomorphic_on_def) |
430 |
430 |
431 lemma holomorphic_on_imp_differentiable_at: |
431 lemma holomorphic_on_imp_differentiable_at: |
432 "\<lbrakk>f holomorphic_on s; open s; x \<in> s\<rbrakk> \<Longrightarrow> f complex_differentiable (at x)" |
432 "\<lbrakk>f holomorphic_on s; open s; x \<in> s\<rbrakk> \<Longrightarrow> f field_differentiable (at x)" |
433 using at_within_open holomorphic_on_def by fastforce |
433 using at_within_open holomorphic_on_def by fastforce |
434 |
434 |
435 lemma holomorphic_on_empty [holomorphic_intros]: "f holomorphic_on {}" |
435 lemma holomorphic_on_empty [holomorphic_intros]: "f holomorphic_on {}" |
436 by (simp add: holomorphic_on_def) |
436 by (simp add: holomorphic_on_def) |
437 |
437 |
438 lemma holomorphic_on_open: |
438 lemma holomorphic_on_open: |
439 "open s \<Longrightarrow> f holomorphic_on s \<longleftrightarrow> (\<forall>x \<in> s. \<exists>f'. DERIV f x :> f')" |
439 "open s \<Longrightarrow> f holomorphic_on s \<longleftrightarrow> (\<forall>x \<in> s. \<exists>f'. DERIV f x :> f')" |
440 by (auto simp: holomorphic_on_def complex_differentiable_def has_field_derivative_def at_within_open [of _ s]) |
440 by (auto simp: holomorphic_on_def field_differentiable_def has_field_derivative_def at_within_open [of _ s]) |
441 |
441 |
442 lemma holomorphic_on_imp_continuous_on: |
442 lemma holomorphic_on_imp_continuous_on: |
443 "f holomorphic_on s \<Longrightarrow> continuous_on s f" |
443 "f holomorphic_on s \<Longrightarrow> continuous_on s f" |
444 by (metis complex_differentiable_imp_continuous_at continuous_on_eq_continuous_within holomorphic_on_def) |
444 by (metis field_differentiable_imp_continuous_at continuous_on_eq_continuous_within holomorphic_on_def) |
445 |
445 |
446 lemma holomorphic_on_subset: |
446 lemma holomorphic_on_subset: |
447 "f holomorphic_on s \<Longrightarrow> t \<subseteq> s \<Longrightarrow> f holomorphic_on t" |
447 "f holomorphic_on s \<Longrightarrow> t \<subseteq> s \<Longrightarrow> f holomorphic_on t" |
448 unfolding holomorphic_on_def |
448 unfolding holomorphic_on_def |
449 by (metis complex_differentiable_within_subset subsetD) |
449 by (metis field_differentiable_within_subset subsetD) |
450 |
450 |
451 lemma holomorphic_transform: "\<lbrakk>f holomorphic_on s; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> g holomorphic_on s" |
451 lemma holomorphic_transform: "\<lbrakk>f holomorphic_on s; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> g holomorphic_on s" |
452 by (metis complex_differentiable_transform_within linordered_field_no_ub holomorphic_on_def) |
452 by (metis field_differentiable_transform_within linordered_field_no_ub holomorphic_on_def) |
453 |
453 |
454 lemma holomorphic_cong: "s = t ==> (\<And>x. x \<in> s \<Longrightarrow> f x = g x) \<Longrightarrow> f holomorphic_on s \<longleftrightarrow> g holomorphic_on t" |
454 lemma holomorphic_cong: "s = t ==> (\<And>x. x \<in> s \<Longrightarrow> f x = g x) \<Longrightarrow> f holomorphic_on s \<longleftrightarrow> g holomorphic_on t" |
455 by (metis holomorphic_transform) |
455 by (metis holomorphic_transform) |
456 |
456 |
457 lemma holomorphic_on_linear [simp, holomorphic_intros]: "(op * c) holomorphic_on s" |
457 lemma holomorphic_on_linear [simp, holomorphic_intros]: "(op * c) holomorphic_on s" |
458 unfolding holomorphic_on_def by (metis complex_differentiable_linear) |
458 unfolding holomorphic_on_def by (metis field_differentiable_linear) |
459 |
459 |
460 lemma holomorphic_on_const [simp, holomorphic_intros]: "(\<lambda>z. c) holomorphic_on s" |
460 lemma holomorphic_on_const [simp, holomorphic_intros]: "(\<lambda>z. c) holomorphic_on s" |
461 unfolding holomorphic_on_def by (metis complex_differentiable_const) |
461 unfolding holomorphic_on_def by (metis field_differentiable_const) |
462 |
462 |
463 lemma holomorphic_on_ident [simp, holomorphic_intros]: "(\<lambda>x. x) holomorphic_on s" |
463 lemma holomorphic_on_ident [simp, holomorphic_intros]: "(\<lambda>x. x) holomorphic_on s" |
464 unfolding holomorphic_on_def by (metis complex_differentiable_ident) |
464 unfolding holomorphic_on_def by (metis field_differentiable_ident) |
465 |
465 |
466 lemma holomorphic_on_id [simp, holomorphic_intros]: "id holomorphic_on s" |
466 lemma holomorphic_on_id [simp, holomorphic_intros]: "id holomorphic_on s" |
467 unfolding id_def by (rule holomorphic_on_ident) |
467 unfolding id_def by (rule holomorphic_on_ident) |
468 |
468 |
469 lemma holomorphic_on_compose: |
469 lemma holomorphic_on_compose: |
470 "f holomorphic_on s \<Longrightarrow> g holomorphic_on (f ` s) \<Longrightarrow> (g o f) holomorphic_on s" |
470 "f holomorphic_on s \<Longrightarrow> g holomorphic_on (f ` s) \<Longrightarrow> (g o f) holomorphic_on s" |
471 using complex_differentiable_compose_within[of f _ s g] |
471 using field_differentiable_compose_within[of f _ s g] |
472 by (auto simp: holomorphic_on_def) |
472 by (auto simp: holomorphic_on_def) |
473 |
473 |
474 lemma holomorphic_on_compose_gen: |
474 lemma holomorphic_on_compose_gen: |
475 "f holomorphic_on s \<Longrightarrow> g holomorphic_on t \<Longrightarrow> f ` s \<subseteq> t \<Longrightarrow> (g o f) holomorphic_on s" |
475 "f holomorphic_on s \<Longrightarrow> g holomorphic_on t \<Longrightarrow> f ` s \<subseteq> t \<Longrightarrow> (g o f) holomorphic_on s" |
476 by (metis holomorphic_on_compose holomorphic_on_subset) |
476 by (metis holomorphic_on_compose holomorphic_on_subset) |
477 |
477 |
478 lemma holomorphic_on_minus [holomorphic_intros]: "f holomorphic_on s \<Longrightarrow> (\<lambda>z. -(f z)) holomorphic_on s" |
478 lemma holomorphic_on_minus [holomorphic_intros]: "f holomorphic_on s \<Longrightarrow> (\<lambda>z. -(f z)) holomorphic_on s" |
479 by (metis complex_differentiable_minus holomorphic_on_def) |
479 by (metis field_differentiable_minus holomorphic_on_def) |
480 |
480 |
481 lemma holomorphic_on_add [holomorphic_intros]: |
481 lemma holomorphic_on_add [holomorphic_intros]: |
482 "\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z + g z) holomorphic_on s" |
482 "\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z + g z) holomorphic_on s" |
483 unfolding holomorphic_on_def by (metis complex_differentiable_add) |
483 unfolding holomorphic_on_def by (metis field_differentiable_add) |
484 |
484 |
485 lemma holomorphic_on_diff [holomorphic_intros]: |
485 lemma holomorphic_on_diff [holomorphic_intros]: |
486 "\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z - g z) holomorphic_on s" |
486 "\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z - g z) holomorphic_on s" |
487 unfolding holomorphic_on_def by (metis complex_differentiable_diff) |
487 unfolding holomorphic_on_def by (metis field_differentiable_diff) |
488 |
488 |
489 lemma holomorphic_on_mult [holomorphic_intros]: |
489 lemma holomorphic_on_mult [holomorphic_intros]: |
490 "\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z * g z) holomorphic_on s" |
490 "\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z * g z) holomorphic_on s" |
491 unfolding holomorphic_on_def by (metis complex_differentiable_mult) |
491 unfolding holomorphic_on_def by (metis field_differentiable_mult) |
492 |
492 |
493 lemma holomorphic_on_inverse [holomorphic_intros]: |
493 lemma holomorphic_on_inverse [holomorphic_intros]: |
494 "\<lbrakk>f holomorphic_on s; \<And>z. z \<in> s \<Longrightarrow> f z \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>z. inverse (f z)) holomorphic_on s" |
494 "\<lbrakk>f holomorphic_on s; \<And>z. z \<in> s \<Longrightarrow> f z \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>z. inverse (f z)) holomorphic_on s" |
495 unfolding holomorphic_on_def by (metis complex_differentiable_inverse) |
495 unfolding holomorphic_on_def by (metis field_differentiable_inverse) |
496 |
496 |
497 lemma holomorphic_on_divide [holomorphic_intros]: |
497 lemma holomorphic_on_divide [holomorphic_intros]: |
498 "\<lbrakk>f holomorphic_on s; g holomorphic_on s; \<And>z. z \<in> s \<Longrightarrow> g z \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>z. f z / g z) holomorphic_on s" |
498 "\<lbrakk>f holomorphic_on s; g holomorphic_on s; \<And>z. z \<in> s \<Longrightarrow> g z \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>z. f z / g z) holomorphic_on s" |
499 unfolding holomorphic_on_def by (metis complex_differentiable_divide) |
499 unfolding holomorphic_on_def by (metis field_differentiable_divide) |
500 |
500 |
501 lemma holomorphic_on_power [holomorphic_intros]: |
501 lemma holomorphic_on_power [holomorphic_intros]: |
502 "f holomorphic_on s \<Longrightarrow> (\<lambda>z. (f z)^n) holomorphic_on s" |
502 "f holomorphic_on s \<Longrightarrow> (\<lambda>z. (f z)^n) holomorphic_on s" |
503 unfolding holomorphic_on_def by (metis complex_differentiable_power) |
503 unfolding holomorphic_on_def by (metis field_differentiable_power) |
504 |
504 |
505 lemma holomorphic_on_setsum [holomorphic_intros]: |
505 lemma holomorphic_on_setsum [holomorphic_intros]: |
506 "(\<And>i. i \<in> I \<Longrightarrow> (f i) holomorphic_on s) \<Longrightarrow> (\<lambda>x. setsum (\<lambda>i. f i x) I) holomorphic_on s" |
506 "(\<And>i. i \<in> I \<Longrightarrow> (f i) holomorphic_on s) \<Longrightarrow> (\<lambda>x. setsum (\<lambda>i. f i x) I) holomorphic_on s" |
507 unfolding holomorphic_on_def by (metis complex_differentiable_setsum) |
507 unfolding holomorphic_on_def by (metis field_differentiable_setsum) |
508 |
508 |
509 lemma DERIV_deriv_iff_complex_differentiable: |
509 lemma DERIV_deriv_iff_field_differentiable: |
510 "DERIV f x :> deriv f x \<longleftrightarrow> f complex_differentiable at x" |
510 "DERIV f x :> deriv f x \<longleftrightarrow> f field_differentiable at x" |
511 unfolding complex_differentiable_def by (metis DERIV_imp_deriv) |
511 unfolding field_differentiable_def by (metis DERIV_imp_deriv) |
512 |
512 |
513 lemma holomorphic_derivI: |
513 lemma holomorphic_derivI: |
514 "\<lbrakk>f holomorphic_on S; open S; x \<in> S\<rbrakk> |
514 "\<lbrakk>f holomorphic_on S; open S; x \<in> S\<rbrakk> |
515 \<Longrightarrow> (f has_field_derivative deriv f x) (at x within T)" |
515 \<Longrightarrow> (f has_field_derivative deriv f x) (at x within T)" |
516 by (metis DERIV_deriv_iff_complex_differentiable at_within_open holomorphic_on_def has_field_derivative_at_within) |
516 by (metis DERIV_deriv_iff_field_differentiable at_within_open holomorphic_on_def has_field_derivative_at_within) |
517 |
517 |
518 lemma complex_derivative_chain: |
518 lemma complex_derivative_chain: |
519 "f complex_differentiable at x \<Longrightarrow> g complex_differentiable at (f x) |
519 "f field_differentiable at x \<Longrightarrow> g field_differentiable at (f x) |
520 \<Longrightarrow> deriv (g o f) x = deriv g (f x) * deriv f x" |
520 \<Longrightarrow> deriv (g o f) x = deriv g (f x) * deriv f x" |
521 by (metis DERIV_deriv_iff_complex_differentiable DERIV_chain DERIV_imp_deriv) |
521 by (metis DERIV_deriv_iff_field_differentiable DERIV_chain DERIV_imp_deriv) |
522 |
522 |
523 lemma deriv_linear [simp]: "deriv (\<lambda>w. c * w) = (\<lambda>z. c)" |
523 lemma deriv_linear [simp]: "deriv (\<lambda>w. c * w) = (\<lambda>z. c)" |
524 by (metis DERIV_imp_deriv DERIV_cmult_Id) |
524 by (metis DERIV_imp_deriv DERIV_cmult_Id) |
525 |
525 |
526 lemma deriv_ident [simp]: "deriv (\<lambda>w. w) = (\<lambda>z. 1)" |
526 lemma deriv_ident [simp]: "deriv (\<lambda>w. w) = (\<lambda>z. 1)" |
530 by (simp add: id_def) |
530 by (simp add: id_def) |
531 |
531 |
532 lemma deriv_const [simp]: "deriv (\<lambda>w. c) = (\<lambda>z. 0)" |
532 lemma deriv_const [simp]: "deriv (\<lambda>w. c) = (\<lambda>z. 0)" |
533 by (metis DERIV_imp_deriv DERIV_const) |
533 by (metis DERIV_imp_deriv DERIV_const) |
534 |
534 |
535 lemma complex_derivative_add [simp]: |
535 lemma deriv_add [simp]: |
536 "\<lbrakk>f complex_differentiable at z; g complex_differentiable at z\<rbrakk> |
536 "\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
537 \<Longrightarrow> deriv (\<lambda>w. f w + g w) z = deriv f z + deriv g z" |
537 \<Longrightarrow> deriv (\<lambda>w. f w + g w) z = deriv f z + deriv g z" |
538 unfolding DERIV_deriv_iff_complex_differentiable[symmetric] |
538 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
539 by (auto intro!: DERIV_imp_deriv derivative_intros) |
539 by (auto intro!: DERIV_imp_deriv derivative_intros) |
540 |
540 |
541 lemma complex_derivative_diff [simp]: |
541 lemma deriv_diff [simp]: |
542 "\<lbrakk>f complex_differentiable at z; g complex_differentiable at z\<rbrakk> |
542 "\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
543 \<Longrightarrow> deriv (\<lambda>w. f w - g w) z = deriv f z - deriv g z" |
543 \<Longrightarrow> deriv (\<lambda>w. f w - g w) z = deriv f z - deriv g z" |
544 unfolding DERIV_deriv_iff_complex_differentiable[symmetric] |
544 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
545 by (auto intro!: DERIV_imp_deriv derivative_intros) |
545 by (auto intro!: DERIV_imp_deriv derivative_intros) |
546 |
546 |
547 lemma complex_derivative_mult [simp]: |
547 lemma deriv_mult [simp]: |
548 "\<lbrakk>f complex_differentiable at z; g complex_differentiable at z\<rbrakk> |
548 "\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
549 \<Longrightarrow> deriv (\<lambda>w. f w * g w) z = f z * deriv g z + deriv f z * g z" |
549 \<Longrightarrow> deriv (\<lambda>w. f w * g w) z = f z * deriv g z + deriv f z * g z" |
550 unfolding DERIV_deriv_iff_complex_differentiable[symmetric] |
550 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
551 by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
551 by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
552 |
552 |
553 lemma complex_derivative_cmult [simp]: |
553 lemma deriv_cmult [simp]: |
554 "f complex_differentiable at z \<Longrightarrow> deriv (\<lambda>w. c * f w) z = c * deriv f z" |
554 "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. c * f w) z = c * deriv f z" |
555 unfolding DERIV_deriv_iff_complex_differentiable[symmetric] |
555 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
556 by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
556 by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
557 |
557 |
558 lemma complex_derivative_cmult_right [simp]: |
558 lemma deriv_cmult_right [simp]: |
559 "f complex_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w * c) z = deriv f z * c" |
559 "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w * c) z = deriv f z * c" |
560 unfolding DERIV_deriv_iff_complex_differentiable[symmetric] |
560 unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
561 by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
561 by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
562 |
562 |
563 lemma complex_derivative_cdivide_right [simp]: |
563 lemma deriv_cdivide_right [simp]: |
564 "f complex_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w / c) z = deriv f z / c" |
564 "f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w / c) z = deriv f z / c" |
565 unfolding Fields.field_class.field_divide_inverse |
565 unfolding Fields.field_class.field_divide_inverse |
566 by (blast intro: complex_derivative_cmult_right) |
566 by (blast intro: deriv_cmult_right) |
567 |
567 |
568 lemma complex_derivative_transform_within_open: |
568 lemma complex_derivative_transform_within_open: |
569 "\<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> |
569 "\<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> |
570 \<Longrightarrow> deriv f z = deriv g z" |
570 \<Longrightarrow> deriv f z = deriv g z" |
571 unfolding holomorphic_on_def |
571 unfolding holomorphic_on_def |
572 by (rule DERIV_imp_deriv) |
572 by (rule DERIV_imp_deriv) |
573 (metis DERIV_deriv_iff_complex_differentiable DERIV_transform_within_open at_within_open) |
573 (metis DERIV_deriv_iff_field_differentiable DERIV_transform_within_open at_within_open) |
574 |
574 |
575 lemma complex_derivative_compose_linear: |
575 lemma deriv_compose_linear: |
576 "f complex_differentiable at (c * z) \<Longrightarrow> deriv (\<lambda>w. f (c * w)) z = c * deriv f (c * z)" |
576 "f field_differentiable at (c * z) \<Longrightarrow> deriv (\<lambda>w. f (c * w)) z = c * deriv f (c * z)" |
577 apply (rule DERIV_imp_deriv) |
577 apply (rule DERIV_imp_deriv) |
578 apply (simp add: DERIV_deriv_iff_complex_differentiable [symmetric]) |
578 apply (simp add: DERIV_deriv_iff_field_differentiable [symmetric]) |
579 apply (drule DERIV_chain' [of "times c" c z UNIV f "deriv f (c * z)", OF DERIV_cmult_Id]) |
579 apply (drule DERIV_chain' [of "times c" c z UNIV f "deriv f (c * z)", OF DERIV_cmult_Id]) |
580 apply (simp add: algebra_simps) |
580 apply (simp add: algebra_simps) |
581 done |
581 done |
582 |
582 |
583 lemma nonzero_deriv_nonconstant: |
583 lemma nonzero_deriv_nonconstant: |