1 section \<open>Complex path integrals and Cauchy's integral theorem\<close> |
1 section \<open>Complex path integrals and Cauchy's integral theorem\<close> |
2 |
2 |
3 theory Cauchy_Integral_Thm |
3 theory Cauchy_Integral_Thm |
4 imports Complex_Transcendental Weierstrass |
4 imports Complex_Transcendental Weierstrass |
5 begin |
5 begin |
6 |
|
7 (*FIXME migrate into libraries*) |
|
8 |
|
9 lemma inj_mult_left [simp]: "inj (op* x) \<longleftrightarrow> x \<noteq> (0::'a::idom)" |
|
10 by (metis injI mult_cancel_left the_inv_f_f zero_neq_one) |
|
11 |
|
12 lemma continuous_on_strong_cong: |
|
13 "s = t \<Longrightarrow> (\<And>x. x \<in> t =simp=> f x = g x) \<Longrightarrow> continuous_on s f \<longleftrightarrow> continuous_on t g" |
|
14 by (simp add: simp_implies_def) |
|
15 |
|
16 thm image_affinity_atLeastAtMost_div_diff |
|
17 lemma image_affinity_atLeastAtMost_div: |
|
18 fixes c :: "'a::linordered_field" |
|
19 shows "((\<lambda>x. x/m + c) ` {a..b}) = (if {a..b}={} then {} |
|
20 else if 0 \<le> m then {a/m + c .. b/m + c} |
|
21 else {b/m + c .. a/m + c})" |
|
22 using image_affinity_atLeastAtMost [of "inverse m" c a b] |
|
23 by (simp add: field_class.field_divide_inverse algebra_simps) |
|
24 |
|
25 thm continuous_on_closed_Un |
|
26 lemma continuous_on_open_Un: |
|
27 "open s \<Longrightarrow> open t \<Longrightarrow> continuous_on s f \<Longrightarrow> continuous_on t f \<Longrightarrow> continuous_on (s \<union> t) f" |
|
28 using continuous_on_open_Union [of "{s,t}"] by auto |
|
29 |
|
30 thm continuous_on_eq (*REPLACE*) |
|
31 lemma continuous_on_eq: |
|
32 "\<lbrakk>continuous_on s f; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> continuous_on s g" |
|
33 unfolding continuous_on_def tendsto_def eventually_at_topological |
|
34 by simp |
|
35 |
|
36 thm vector_derivative_add_at |
|
37 lemma vector_derivative_mult_at [simp]: |
|
38 fixes f g :: "real \<Rightarrow> 'a :: real_normed_algebra" |
|
39 shows "\<lbrakk>f differentiable at a; g differentiable at a\<rbrakk> |
|
40 \<Longrightarrow> vector_derivative (\<lambda>x. f x * g x) (at a) = f a * vector_derivative g (at a) + vector_derivative f (at a) * g a" |
|
41 by (simp add: vector_derivative_at has_vector_derivative_mult vector_derivative_works [symmetric]) |
|
42 |
|
43 lemma vector_derivative_scaleR_at [simp]: |
|
44 "\<lbrakk>f differentiable at a; g differentiable at a\<rbrakk> |
|
45 \<Longrightarrow> vector_derivative (\<lambda>x. f x *\<^sub>R g x) (at a) = f a *\<^sub>R vector_derivative g (at a) + vector_derivative f (at a) *\<^sub>R g a" |
|
46 apply (rule vector_derivative_at) |
|
47 apply (rule has_vector_derivative_scaleR) |
|
48 apply (auto simp: vector_derivative_works has_vector_derivative_def has_field_derivative_def mult_commute_abs) |
|
49 done |
|
50 |
|
51 thm Derivative.vector_diff_chain_at |
|
52 lemma vector_derivative_chain_at: |
|
53 assumes "f differentiable at x" "(g differentiable at (f x))" |
|
54 shows "vector_derivative (g \<circ> f) (at x) = |
|
55 vector_derivative f (at x) *\<^sub>R vector_derivative g (at (f x))" |
|
56 by (metis Derivative.vector_diff_chain_at vector_derivative_at vector_derivative_works assms) |
|
57 |
|
58 |
6 |
59 subsection \<open>Piecewise differentiable functions\<close> |
7 subsection \<open>Piecewise differentiable functions\<close> |
60 |
8 |
61 definition piecewise_differentiable_on |
9 definition piecewise_differentiable_on |
62 (infixr "piecewise'_differentiable'_on" 50) |
10 (infixr "piecewise'_differentiable'_on" 50) |
86 lemma differentiable_imp_piecewise_differentiable: |
34 lemma differentiable_imp_piecewise_differentiable: |
87 "(\<And>x. x \<in> s \<Longrightarrow> f differentiable (at x within s)) |
35 "(\<And>x. x \<in> s \<Longrightarrow> f differentiable (at x within s)) |
88 \<Longrightarrow> f piecewise_differentiable_on s" |
36 \<Longrightarrow> f piecewise_differentiable_on s" |
89 by (auto simp: piecewise_differentiable_on_def differentiable_imp_continuous_on differentiable_on_def |
37 by (auto simp: piecewise_differentiable_on_def differentiable_imp_continuous_on differentiable_on_def |
90 intro: differentiable_within_subset) |
38 intro: differentiable_within_subset) |
|
39 |
|
40 lemma piecewise_differentiable_const [iff]: "(\<lambda>x. z) piecewise_differentiable_on s" |
|
41 by (simp add: differentiable_imp_piecewise_differentiable) |
91 |
42 |
92 lemma piecewise_differentiable_compose: |
43 lemma piecewise_differentiable_compose: |
93 "\<lbrakk>f piecewise_differentiable_on s; g piecewise_differentiable_on (f ` s); |
44 "\<lbrakk>f piecewise_differentiable_on s; g piecewise_differentiable_on (f ` s); |
94 \<And>x. finite (s \<inter> f-`{x})\<rbrakk> |
45 \<And>x. finite (s \<inter> f-`{x})\<rbrakk> |
95 \<Longrightarrow> (g o f) piecewise_differentiable_on s" |
46 \<Longrightarrow> (g o f) piecewise_differentiable_on s" |
464 using assms piecewise_C1_differentiable_on_def by auto |
415 using assms piecewise_C1_differentiable_on_def by auto |
465 ultimately show ?thesis |
416 ultimately show ?thesis |
466 by (auto simp: piecewise_C1_differentiable_on_def continuous_on_add) |
417 by (auto simp: piecewise_C1_differentiable_on_def continuous_on_add) |
467 qed |
418 qed |
468 |
419 |
469 lemma piecewise_C1_differentiable_C1_diff: |
420 lemma piecewise_C1_differentiable_diff: |
470 "\<lbrakk>f piecewise_C1_differentiable_on s; g piecewise_C1_differentiable_on s\<rbrakk> |
421 "\<lbrakk>f piecewise_C1_differentiable_on s; g piecewise_C1_differentiable_on s\<rbrakk> |
471 \<Longrightarrow> (\<lambda>x. f x - g x) piecewise_C1_differentiable_on s" |
422 \<Longrightarrow> (\<lambda>x. f x - g x) piecewise_C1_differentiable_on s" |
472 unfolding diff_conv_add_uminus |
423 unfolding diff_conv_add_uminus |
473 by (metis piecewise_C1_differentiable_add piecewise_C1_differentiable_neg) |
424 by (metis piecewise_C1_differentiable_add piecewise_C1_differentiable_neg) |
474 |
425 |