| author | hoelzl |
| Wed, 02 Apr 2014 18:35:01 +0200 | |
| changeset 56369 | 2704ca85be98 |
| parent 56332 | 289dd9166d04 |
| child 56370 | 7c717ba55a0b |
| permissions | -rw-r--r-- |
| 56215 | 1 |
(* Author: John Harrison, Marco Maggesi, Graziano Gentili, Gianni Ciolli, Valentina Bruno |
2 |
Ported from "hol_light/Multivariate/canal.ml" by L C Paulson (2014) |
|
3 |
*) |
|
4 |
||
5 |
header {* Complex Analysis Basics *}
|
|
6 |
||
7 |
theory Complex_Analysis_Basics |
|
8 |
imports "~~/src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space" |
|
9 |
begin |
|
10 |
||
11 |
subsection {*Complex number lemmas *}
|
|
12 |
||
|
56238
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
13 |
lemma fact_cancel: |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
14 |
fixes c :: "'a::real_field" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
15 |
shows "of_nat (Suc n) * c / of_nat (fact (Suc n)) = c / of_nat (fact n)" |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
16 |
by (simp add: of_nat_mult del: of_nat_Suc times_nat.simps) |
|
56238
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
17 |
|
| 56332 | 18 |
lemma |
19 |
shows open_halfspace_Re_lt: "open {z. Re(z) < b}"
|
|
20 |
and open_halfspace_Re_gt: "open {z. Re(z) > b}"
|
|
21 |
and closed_halfspace_Re_ge: "closed {z. Re(z) \<ge> b}"
|
|
22 |
and closed_halfspace_Re_le: "closed {z. Re(z) \<le> b}"
|
|
23 |
and closed_halfspace_Re_eq: "closed {z. Re(z) = b}"
|
|
24 |
and open_halfspace_Im_lt: "open {z. Im(z) < b}"
|
|
25 |
and open_halfspace_Im_gt: "open {z. Im(z) > b}"
|
|
26 |
and closed_halfspace_Im_ge: "closed {z. Im(z) \<ge> b}"
|
|
27 |
and closed_halfspace_Im_le: "closed {z. Im(z) \<le> b}"
|
|
28 |
and closed_halfspace_Im_eq: "closed {z. Im(z) = b}"
|
|
29 |
by (intro open_Collect_less closed_Collect_le closed_Collect_eq isCont_Re |
|
30 |
isCont_Im isCont_ident isCont_const)+ |
|
| 56215 | 31 |
|
32 |
lemma closed_complex_Reals: "closed (Reals :: complex set)" |
|
33 |
proof - |
|
| 56332 | 34 |
have "(Reals :: complex set) = {z. Im z = 0}"
|
| 56215 | 35 |
by (auto simp: complex_is_Real_iff) |
36 |
then show ?thesis |
|
| 56332 | 37 |
by (metis closed_halfspace_Im_eq) |
| 56215 | 38 |
qed |
39 |
||
40 |
||
41 |
lemma linear_times: |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
42 |
fixes c::"'a::real_algebra" shows "linear (\<lambda>x. c * x)" |
| 56215 | 43 |
by (auto simp: linearI distrib_left) |
44 |
||
45 |
lemma bilinear_times: |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
46 |
fixes c::"'a::real_algebra" shows "bilinear (\<lambda>x y::'a. x*y)" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
47 |
by (auto simp: bilinear_def distrib_left distrib_right intro!: linearI) |
| 56215 | 48 |
|
49 |
lemma linear_cnj: "linear cnj" |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
50 |
using bounded_linear.linear[OF bounded_linear_cnj] . |
| 56215 | 51 |
|
52 |
lemma tendsto_mult_left: |
|
53 |
fixes c::"'a::real_normed_algebra" |
|
54 |
shows "(f ---> l) F \<Longrightarrow> ((\<lambda>x. c * (f x)) ---> c * l) F" |
|
55 |
by (rule tendsto_mult [OF tendsto_const]) |
|
56 |
||
57 |
lemma tendsto_mult_right: |
|
58 |
fixes c::"'a::real_normed_algebra" |
|
59 |
shows "(f ---> l) F \<Longrightarrow> ((\<lambda>x. (f x) * c) ---> l * c) F" |
|
60 |
by (rule tendsto_mult [OF _ tendsto_const]) |
|
61 |
||
62 |
lemma tendsto_Re_upper: |
|
63 |
assumes "~ (trivial_limit F)" |
|
64 |
"(f ---> l) F" |
|
65 |
"eventually (\<lambda>x. Re(f x) \<le> b) F" |
|
66 |
shows "Re(l) \<le> b" |
|
67 |
by (metis assms tendsto_le [OF _ tendsto_const] tendsto_Re) |
|
68 |
||
69 |
lemma tendsto_Re_lower: |
|
70 |
assumes "~ (trivial_limit F)" |
|
71 |
"(f ---> l) F" |
|
72 |
"eventually (\<lambda>x. b \<le> Re(f x)) F" |
|
73 |
shows "b \<le> Re(l)" |
|
74 |
by (metis assms tendsto_le [OF _ _ tendsto_const] tendsto_Re) |
|
75 |
||
76 |
lemma tendsto_Im_upper: |
|
77 |
assumes "~ (trivial_limit F)" |
|
78 |
"(f ---> l) F" |
|
79 |
"eventually (\<lambda>x. Im(f x) \<le> b) F" |
|
80 |
shows "Im(l) \<le> b" |
|
81 |
by (metis assms tendsto_le [OF _ tendsto_const] tendsto_Im) |
|
82 |
||
83 |
lemma tendsto_Im_lower: |
|
84 |
assumes "~ (trivial_limit F)" |
|
85 |
"(f ---> l) F" |
|
86 |
"eventually (\<lambda>x. b \<le> Im(f x)) F" |
|
87 |
shows "b \<le> Im(l)" |
|
88 |
by (metis assms tendsto_le [OF _ _ tendsto_const] tendsto_Im) |
|
89 |
||
90 |
subsection{*General lemmas*}
|
|
91 |
||
92 |
lemma continuous_mult_left: |
|
93 |
fixes c::"'a::real_normed_algebra" |
|
94 |
shows "continuous F f \<Longrightarrow> continuous F (\<lambda>x. c * f x)" |
|
95 |
by (rule continuous_mult [OF continuous_const]) |
|
96 |
||
97 |
lemma continuous_mult_right: |
|
98 |
fixes c::"'a::real_normed_algebra" |
|
99 |
shows "continuous F f \<Longrightarrow> continuous F (\<lambda>x. f x * c)" |
|
100 |
by (rule continuous_mult [OF _ continuous_const]) |
|
101 |
||
102 |
lemma continuous_on_mult_left: |
|
103 |
fixes c::"'a::real_normed_algebra" |
|
104 |
shows "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. c * f x)" |
|
105 |
by (rule continuous_on_mult [OF continuous_on_const]) |
|
106 |
||
107 |
lemma continuous_on_mult_right: |
|
108 |
fixes c::"'a::real_normed_algebra" |
|
109 |
shows "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. f x * c)" |
|
110 |
by (rule continuous_on_mult [OF _ continuous_on_const]) |
|
111 |
||
112 |
lemma uniformly_continuous_on_cmul_right [continuous_on_intros]: |
|
113 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_algebra" |
|
| 56332 | 114 |
shows "uniformly_continuous_on s f \<Longrightarrow> uniformly_continuous_on s (\<lambda>x. f x * c)" |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
115 |
using bounded_linear.uniformly_continuous_on[OF bounded_linear_mult_left] . |
| 56215 | 116 |
|
117 |
lemma uniformly_continuous_on_cmul_left[continuous_on_intros]: |
|
118 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_algebra" |
|
119 |
assumes "uniformly_continuous_on s f" |
|
120 |
shows "uniformly_continuous_on s (\<lambda>x. c * f x)" |
|
121 |
by (metis assms bounded_linear.uniformly_continuous_on bounded_linear_mult_right) |
|
122 |
||
123 |
lemma continuous_within_norm_id [continuous_intros]: "continuous (at x within S) norm" |
|
124 |
by (rule continuous_norm [OF continuous_ident]) |
|
125 |
||
126 |
lemma continuous_on_norm_id [continuous_intros]: "continuous_on S norm" |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
127 |
by (intro continuous_on_id continuous_on_norm) |
| 56215 | 128 |
|
129 |
subsection{*DERIV stuff*}
|
|
130 |
||
131 |
lemma lambda_zero: "(\<lambda>h::'a::mult_zero. 0) = op * 0" |
|
132 |
by auto |
|
133 |
||
134 |
lemma lambda_one: "(\<lambda>x::'a::monoid_mult. x) = op * 1" |
|
135 |
by auto |
|
136 |
||
137 |
lemma DERIV_zero_connected_constant: |
|
138 |
fixes f :: "'a::{real_normed_field,euclidean_space} \<Rightarrow> 'a"
|
|
139 |
assumes "connected s" |
|
140 |
and "open s" |
|
141 |
and "finite k" |
|
142 |
and "continuous_on s f" |
|
143 |
and "\<forall>x\<in>(s - k). DERIV f x :> 0" |
|
144 |
obtains c where "\<And>x. x \<in> s \<Longrightarrow> f(x) = c" |
|
145 |
using has_derivative_zero_connected_constant [OF assms(1-4)] assms |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
146 |
by (metis DERIV_const has_derivative_const Diff_iff at_within_open frechet_derivative_at has_field_derivative_def) |
| 56215 | 147 |
|
148 |
lemma DERIV_zero_constant: |
|
149 |
fixes f :: "'a::{real_normed_field,euclidean_space} \<Rightarrow> 'a"
|
|
150 |
shows "\<lbrakk>convex s; |
|
151 |
\<And>x. x\<in>s \<Longrightarrow> (f has_field_derivative 0) (at x within s)\<rbrakk> |
|
152 |
\<Longrightarrow> \<exists>c. \<forall>x \<in> s. f(x) = c" |
|
153 |
unfolding has_field_derivative_def |
|
154 |
by (auto simp: lambda_zero intro: has_derivative_zero_constant) |
|
155 |
||
156 |
lemma DERIV_zero_unique: |
|
157 |
fixes f :: "'a::{real_normed_field,euclidean_space} \<Rightarrow> 'a"
|
|
158 |
assumes "convex s" |
|
159 |
and d0: "\<And>x. x\<in>s \<Longrightarrow> (f has_field_derivative 0) (at x within s)" |
|
160 |
and "a \<in> s" |
|
161 |
and "x \<in> s" |
|
162 |
shows "f x = f a" |
|
| 56332 | 163 |
by (rule has_derivative_zero_unique [where f=f, OF assms(1,3) refl _ assms(4)]) |
164 |
(metis d0 has_field_derivative_imp_has_derivative lambda_zero) |
|
| 56215 | 165 |
|
166 |
lemma DERIV_zero_connected_unique: |
|
167 |
fixes f :: "'a::{real_normed_field,euclidean_space} \<Rightarrow> 'a"
|
|
168 |
assumes "connected s" |
|
169 |
and "open s" |
|
170 |
and d0: "\<And>x. x\<in>s \<Longrightarrow> DERIV f x :> 0" |
|
171 |
and "a \<in> s" |
|
172 |
and "x \<in> s" |
|
173 |
shows "f x = f a" |
|
| 56332 | 174 |
apply (rule has_derivative_zero_unique_strong_connected [of s "{}" f])
|
| 56215 | 175 |
using assms |
176 |
apply auto |
|
177 |
apply (metis DERIV_continuous_on) |
|
178 |
by (metis at_within_open has_field_derivative_def lambda_zero) |
|
179 |
||
180 |
lemma DERIV_transform_within: |
|
181 |
assumes "(f has_field_derivative f') (at a within s)" |
|
182 |
and "0 < d" "a \<in> s" |
|
183 |
and "\<And>x. x\<in>s \<Longrightarrow> dist x a < d \<Longrightarrow> f x = g x" |
|
184 |
shows "(g has_field_derivative f') (at a within s)" |
|
185 |
using assms unfolding has_field_derivative_def |
|
| 56332 | 186 |
by (blast intro: has_derivative_transform_within) |
| 56215 | 187 |
|
188 |
lemma DERIV_transform_within_open: |
|
189 |
assumes "DERIV f a :> f'" |
|
190 |
and "open s" "a \<in> s" |
|
191 |
and "\<And>x. x\<in>s \<Longrightarrow> f x = g x" |
|
192 |
shows "DERIV g a :> f'" |
|
193 |
using assms unfolding has_field_derivative_def |
|
194 |
by (metis has_derivative_transform_within_open) |
|
195 |
||
196 |
lemma DERIV_transform_at: |
|
197 |
assumes "DERIV f a :> f'" |
|
198 |
and "0 < d" |
|
199 |
and "\<And>x. dist x a < d \<Longrightarrow> f x = g x" |
|
200 |
shows "DERIV g a :> f'" |
|
201 |
by (blast intro: assms DERIV_transform_within) |
|
202 |
||
203 |
||
204 |
subsection{*Holomorphic functions*}
|
|
205 |
||
206 |
lemma has_derivative_ident[has_derivative_intros, simp]: |
|
207 |
"FDERIV complex_of_real x :> complex_of_real" |
|
208 |
by (simp add: has_derivative_def tendsto_const bounded_linear_of_real) |
|
209 |
||
210 |
lemma has_real_derivative: |
|
211 |
fixes f :: "real\<Rightarrow>real" |
|
212 |
assumes "(f has_derivative f') F" |
|
213 |
obtains c where "(f has_derivative (\<lambda>x. x * c)) F" |
|
214 |
proof - |
|
215 |
obtain c where "f' = (\<lambda>x. x * c)" |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
216 |
by (metis assms has_derivative_bounded_linear real_bounded_linear) |
| 56215 | 217 |
then show ?thesis |
218 |
by (metis assms that) |
|
219 |
qed |
|
220 |
||
221 |
lemma has_real_derivative_iff: |
|
222 |
fixes f :: "real\<Rightarrow>real" |
|
223 |
shows "(\<exists>f'. (f has_derivative (\<lambda>x. x * f')) F) = (\<exists>D. (f has_derivative D) F)" |
|
224 |
by (auto elim: has_real_derivative) |
|
225 |
||
226 |
definition complex_differentiable :: "[complex \<Rightarrow> complex, complex filter] \<Rightarrow> bool" |
|
227 |
(infixr "(complex'_differentiable)" 50) |
|
228 |
where "f complex_differentiable F \<equiv> \<exists>f'. (f has_field_derivative f') F" |
|
229 |
||
230 |
definition DD :: "['a \<Rightarrow> 'a::real_normed_field, 'a] \<Rightarrow> 'a" --{*for real, complex?*}
|
|
231 |
where "DD f x \<equiv> THE f'. (f has_derivative (\<lambda>x. x * f')) (at x)" |
|
232 |
||
233 |
definition holomorphic_on :: "[complex \<Rightarrow> complex, complex set] \<Rightarrow> bool" |
|
234 |
(infixl "(holomorphic'_on)" 50) |
|
235 |
where "f holomorphic_on s \<equiv> \<forall>x \<in> s. \<exists>f'. (f has_field_derivative f') (at x within s)" |
|
236 |
||
237 |
lemma holomorphic_on_empty: "f holomorphic_on {}"
|
|
238 |
by (simp add: holomorphic_on_def) |
|
239 |
||
240 |
lemma holomorphic_on_differentiable: |
|
241 |
"f holomorphic_on s \<longleftrightarrow> (\<forall>x \<in> s. f complex_differentiable (at x within s))" |
|
242 |
unfolding holomorphic_on_def complex_differentiable_def has_field_derivative_def |
|
243 |
by (metis mult_commute_abs) |
|
244 |
||
245 |
lemma holomorphic_on_open: |
|
246 |
"open s \<Longrightarrow> f holomorphic_on s \<longleftrightarrow> (\<forall>x \<in> s. \<exists>f'. DERIV f x :> f')" |
|
247 |
by (auto simp: holomorphic_on_def has_field_derivative_def at_within_open [of _ s]) |
|
248 |
||
249 |
lemma complex_differentiable_imp_continuous_at: |
|
250 |
"f complex_differentiable (at x) \<Longrightarrow> continuous (at x) f" |
|
251 |
by (metis DERIV_continuous complex_differentiable_def) |
|
252 |
||
253 |
lemma holomorphic_on_imp_continuous_on: |
|
254 |
"f holomorphic_on s \<Longrightarrow> continuous_on s f" |
|
255 |
by (metis DERIV_continuous continuous_on_eq_continuous_within holomorphic_on_def) |
|
256 |
||
257 |
lemma has_derivative_within_open: |
|
258 |
"a \<in> s \<Longrightarrow> open s \<Longrightarrow> (f has_field_derivative f') (at a within s) \<longleftrightarrow> DERIV f a :> f'" |
|
259 |
by (simp add: has_field_derivative_def) (metis has_derivative_within_open) |
|
260 |
||
261 |
lemma holomorphic_on_subset: |
|
262 |
"f holomorphic_on s \<Longrightarrow> t \<subseteq> s \<Longrightarrow> f holomorphic_on t" |
|
263 |
unfolding holomorphic_on_def |
|
264 |
by (metis DERIV_subset subsetD) |
|
265 |
||
266 |
lemma complex_differentiable_within_subset: |
|
267 |
"\<lbrakk>f complex_differentiable (at x within s); t \<subseteq> s\<rbrakk> |
|
268 |
\<Longrightarrow> f complex_differentiable (at x within t)" |
|
269 |
unfolding complex_differentiable_def |
|
270 |
by (metis DERIV_subset) |
|
271 |
||
272 |
lemma complex_differentiable_at_within: |
|
273 |
"\<lbrakk>f complex_differentiable (at x)\<rbrakk> |
|
274 |
\<Longrightarrow> f complex_differentiable (at x within s)" |
|
275 |
unfolding complex_differentiable_def |
|
276 |
by (metis DERIV_subset top_greatest) |
|
277 |
||
278 |
||
279 |
lemma has_derivative_mult_right: |
|
280 |
fixes c:: "'a :: real_normed_algebra" |
|
281 |
shows "((op * c) has_derivative (op * c)) F" |
|
282 |
by (rule has_derivative_mult_right [OF has_derivative_id]) |
|
283 |
||
284 |
lemma complex_differentiable_linear: |
|
285 |
"(op * c) complex_differentiable F" |
|
286 |
proof - |
|
287 |
have "\<And>u::complex. (\<lambda>x. x * u) = op * u" |
|
288 |
by (rule ext) (simp add: mult_ac) |
|
289 |
then show ?thesis |
|
290 |
unfolding complex_differentiable_def has_field_derivative_def |
|
291 |
by (force intro: has_derivative_mult_right) |
|
292 |
qed |
|
293 |
||
294 |
lemma complex_differentiable_const: |
|
295 |
"(\<lambda>z. c) complex_differentiable F" |
|
296 |
unfolding complex_differentiable_def has_field_derivative_def |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
297 |
by (rule exI [where x=0]) |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
298 |
(metis has_derivative_const lambda_zero) |
| 56215 | 299 |
|
300 |
lemma complex_differentiable_id: |
|
301 |
"(\<lambda>z. z) complex_differentiable F" |
|
302 |
unfolding complex_differentiable_def has_field_derivative_def |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
303 |
by (rule exI [where x=1]) |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
304 |
(simp add: lambda_one [symmetric]) |
| 56215 | 305 |
|
306 |
lemma complex_differentiable_minus: |
|
307 |
"f complex_differentiable F \<Longrightarrow> (\<lambda>z. -(f z)) complex_differentiable F" |
|
308 |
using assms unfolding complex_differentiable_def |
|
309 |
by (metis field_differentiable_minus) |
|
310 |
||
311 |
lemma complex_differentiable_add: |
|
312 |
assumes "f complex_differentiable F" "g complex_differentiable F" |
|
313 |
shows "(\<lambda>z. f z + g z) complex_differentiable F" |
|
314 |
using assms unfolding complex_differentiable_def |
|
315 |
by (metis field_differentiable_add) |
|
316 |
||
317 |
lemma complex_differentiable_diff: |
|
318 |
assumes "f complex_differentiable F" "g complex_differentiable F" |
|
319 |
shows "(\<lambda>z. f z - g z) complex_differentiable F" |
|
320 |
using assms unfolding complex_differentiable_def |
|
321 |
by (metis field_differentiable_diff) |
|
322 |
||
323 |
lemma complex_differentiable_inverse: |
|
324 |
assumes "f complex_differentiable (at a within s)" "f a \<noteq> 0" |
|
325 |
shows "(\<lambda>z. inverse (f z)) complex_differentiable (at a within s)" |
|
326 |
using assms unfolding complex_differentiable_def |
|
327 |
by (metis DERIV_inverse_fun) |
|
328 |
||
329 |
lemma complex_differentiable_mult: |
|
330 |
assumes "f complex_differentiable (at a within s)" |
|
331 |
"g complex_differentiable (at a within s)" |
|
332 |
shows "(\<lambda>z. f z * g z) complex_differentiable (at a within s)" |
|
333 |
using assms unfolding complex_differentiable_def |
|
334 |
by (metis DERIV_mult [of f _ a s g]) |
|
335 |
||
336 |
lemma complex_differentiable_divide: |
|
337 |
assumes "f complex_differentiable (at a within s)" |
|
338 |
"g complex_differentiable (at a within s)" |
|
339 |
"g a \<noteq> 0" |
|
340 |
shows "(\<lambda>z. f z / g z) complex_differentiable (at a within s)" |
|
341 |
using assms unfolding complex_differentiable_def |
|
342 |
by (metis DERIV_divide [of f _ a s g]) |
|
343 |
||
344 |
lemma complex_differentiable_power: |
|
345 |
assumes "f complex_differentiable (at a within s)" |
|
346 |
shows "(\<lambda>z. f z ^ n) complex_differentiable (at a within s)" |
|
347 |
using assms unfolding complex_differentiable_def |
|
348 |
by (metis DERIV_power) |
|
349 |
||
350 |
lemma complex_differentiable_transform_within: |
|
351 |
"0 < d \<Longrightarrow> |
|
352 |
x \<in> s \<Longrightarrow> |
|
353 |
(\<And>x'. x' \<in> s \<Longrightarrow> dist x' x < d \<Longrightarrow> f x' = g x') \<Longrightarrow> |
|
354 |
f complex_differentiable (at x within s) |
|
355 |
\<Longrightarrow> g complex_differentiable (at x within s)" |
|
356 |
unfolding complex_differentiable_def has_field_derivative_def |
|
357 |
by (blast intro: has_derivative_transform_within) |
|
358 |
||
359 |
lemma complex_differentiable_compose_within: |
|
360 |
assumes "f complex_differentiable (at a within s)" |
|
361 |
"g complex_differentiable (at (f a) within f`s)" |
|
362 |
shows "(g o f) complex_differentiable (at a within s)" |
|
363 |
using assms unfolding complex_differentiable_def |
|
364 |
by (metis DERIV_image_chain) |
|
365 |
||
366 |
lemma complex_differentiable_within_open: |
|
367 |
"\<lbrakk>a \<in> s; open s\<rbrakk> \<Longrightarrow> f complex_differentiable at a within s \<longleftrightarrow> |
|
368 |
f complex_differentiable at a" |
|
369 |
unfolding complex_differentiable_def |
|
370 |
by (metis at_within_open) |
|
371 |
||
372 |
lemma holomorphic_transform: |
|
373 |
"\<lbrakk>f holomorphic_on s; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> g holomorphic_on s" |
|
374 |
apply (auto simp: holomorphic_on_def has_field_derivative_def) |
|
375 |
by (metis complex_differentiable_def complex_differentiable_transform_within has_field_derivative_def linordered_field_no_ub) |
|
376 |
||
377 |
lemma holomorphic_eq: |
|
378 |
"(\<And>x. x \<in> s \<Longrightarrow> f x = g x) \<Longrightarrow> f holomorphic_on s \<longleftrightarrow> g holomorphic_on s" |
|
379 |
by (metis holomorphic_transform) |
|
380 |
||
381 |
subsection{*Holomorphic*}
|
|
382 |
||
383 |
lemma holomorphic_on_linear: |
|
384 |
"(op * c) holomorphic_on s" |
|
385 |
unfolding holomorphic_on_def by (metis DERIV_cmult_Id) |
|
386 |
||
387 |
lemma holomorphic_on_const: |
|
388 |
"(\<lambda>z. c) holomorphic_on s" |
|
389 |
unfolding holomorphic_on_def |
|
390 |
by (metis DERIV_const) |
|
391 |
||
392 |
lemma holomorphic_on_id: |
|
393 |
"id holomorphic_on s" |
|
394 |
unfolding holomorphic_on_def id_def |
|
395 |
by (metis DERIV_ident) |
|
396 |
||
397 |
lemma holomorphic_on_compose: |
|
398 |
"f holomorphic_on s \<Longrightarrow> g holomorphic_on (f ` s) |
|
399 |
\<Longrightarrow> (g o f) holomorphic_on s" |
|
400 |
unfolding holomorphic_on_def |
|
401 |
by (metis DERIV_image_chain imageI) |
|
402 |
||
403 |
lemma holomorphic_on_compose_gen: |
|
404 |
"\<lbrakk>f holomorphic_on s; g holomorphic_on t; f ` s \<subseteq> t\<rbrakk> \<Longrightarrow> (g o f) holomorphic_on s" |
|
405 |
unfolding holomorphic_on_def |
|
406 |
by (metis DERIV_image_chain DERIV_subset image_subset_iff) |
|
407 |
||
408 |
lemma holomorphic_on_minus: |
|
409 |
"f holomorphic_on s \<Longrightarrow> (\<lambda>z. -(f z)) holomorphic_on s" |
|
410 |
unfolding holomorphic_on_def |
|
411 |
by (metis DERIV_minus) |
|
412 |
||
413 |
lemma holomorphic_on_add: |
|
414 |
"\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z + g z) holomorphic_on s" |
|
415 |
unfolding holomorphic_on_def |
|
416 |
by (metis DERIV_add) |
|
417 |
||
418 |
lemma holomorphic_on_diff: |
|
419 |
"\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z - g z) holomorphic_on s" |
|
420 |
unfolding holomorphic_on_def |
|
421 |
by (metis DERIV_diff) |
|
422 |
||
423 |
lemma holomorphic_on_mult: |
|
424 |
"\<lbrakk>f holomorphic_on s; g holomorphic_on s\<rbrakk> \<Longrightarrow> (\<lambda>z. f z * g z) holomorphic_on s" |
|
425 |
unfolding holomorphic_on_def |
|
426 |
by auto (metis DERIV_mult) |
|
427 |
||
428 |
lemma holomorphic_on_inverse: |
|
429 |
"\<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" |
|
430 |
unfolding holomorphic_on_def |
|
431 |
by (metis DERIV_inverse') |
|
432 |
||
433 |
lemma holomorphic_on_divide: |
|
434 |
"\<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" |
|
435 |
unfolding holomorphic_on_def |
|
436 |
by (metis (full_types) DERIV_divide) |
|
437 |
||
438 |
lemma holomorphic_on_power: |
|
439 |
"f holomorphic_on s \<Longrightarrow> (\<lambda>z. (f z)^n) holomorphic_on s" |
|
440 |
unfolding holomorphic_on_def |
|
441 |
by (metis DERIV_power) |
|
442 |
||
443 |
lemma holomorphic_on_setsum: |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
444 |
"(\<And>i. i \<in> I \<Longrightarrow> (f i) holomorphic_on s) \<Longrightarrow> (\<lambda>x. setsum (\<lambda>i. f i x) I) holomorphic_on s" |
| 56215 | 445 |
unfolding holomorphic_on_def |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
446 |
apply (induct I rule: infinite_finite_induct) |
| 56215 | 447 |
apply (force intro: DERIV_const DERIV_add)+ |
448 |
done |
|
449 |
||
450 |
lemma DERIV_imp_DD: "DERIV f x :> f' \<Longrightarrow> DD f x = f'" |
|
451 |
apply (simp add: DD_def has_field_derivative_def mult_commute_abs) |
|
452 |
apply (rule the_equality, assumption) |
|
453 |
apply (metis DERIV_unique has_field_derivative_def) |
|
454 |
done |
|
455 |
||
456 |
lemma DD_iff_derivative_differentiable: |
|
457 |
fixes f :: "real\<Rightarrow>real" |
|
458 |
shows "DERIV f x :> DD f x \<longleftrightarrow> f differentiable at x" |
|
459 |
unfolding DD_def differentiable_def |
|
460 |
by (metis (full_types) DD_def DERIV_imp_DD has_field_derivative_def has_real_derivative_iff |
|
461 |
mult_commute_abs) |
|
462 |
||
463 |
lemma DD_iff_derivative_complex_differentiable: |
|
464 |
fixes f :: "complex\<Rightarrow>complex" |
|
465 |
shows "DERIV f x :> DD f x \<longleftrightarrow> f complex_differentiable at x" |
|
466 |
unfolding DD_def complex_differentiable_def |
|
467 |
by (metis DD_def DERIV_imp_DD) |
|
468 |
||
469 |
lemma complex_differentiable_compose: |
|
470 |
"f complex_differentiable at z \<Longrightarrow> g complex_differentiable at (f z) |
|
471 |
\<Longrightarrow> (g o f) complex_differentiable at z" |
|
472 |
by (metis complex_differentiable_at_within complex_differentiable_compose_within) |
|
473 |
||
474 |
lemma complex_derivative_chain: |
|
475 |
fixes z::complex |
|
476 |
shows |
|
477 |
"f complex_differentiable at z \<Longrightarrow> g complex_differentiable at (f z) |
|
478 |
\<Longrightarrow> DD (g o f) z = DD g (f z) * DD f z" |
|
479 |
by (metis DD_iff_derivative_complex_differentiable DERIV_chain DERIV_imp_DD) |
|
480 |
||
481 |
lemma comp_derivative_chain: |
|
482 |
fixes z::real |
|
483 |
shows "\<lbrakk>f differentiable at z; g differentiable at (f z)\<rbrakk> |
|
484 |
\<Longrightarrow> DD (g o f) z = DD g (f z) * DD f z" |
|
485 |
by (metis DD_iff_derivative_differentiable DERIV_chain DERIV_imp_DD) |
|
486 |
||
487 |
lemma complex_derivative_linear: "DD (\<lambda>w. c * w) = (\<lambda>z. c)" |
|
488 |
by (metis DERIV_imp_DD DERIV_cmult_Id) |
|
489 |
||
490 |
lemma complex_derivative_ident: "DD (\<lambda>w. w) = (\<lambda>z. 1)" |
|
491 |
by (metis DERIV_imp_DD DERIV_ident) |
|
492 |
||
493 |
lemma complex_derivative_const: "DD (\<lambda>w. c) = (\<lambda>z. 0)" |
|
494 |
by (metis DERIV_imp_DD DERIV_const) |
|
495 |
||
496 |
lemma complex_derivative_add: |
|
497 |
"\<lbrakk>f complex_differentiable at z; g complex_differentiable at z\<rbrakk> |
|
498 |
\<Longrightarrow> DD (\<lambda>w. f w + g w) z = DD f z + DD g z" |
|
499 |
unfolding complex_differentiable_def |
|
500 |
by (rule DERIV_imp_DD) (metis (poly_guards_query) DERIV_add DERIV_imp_DD) |
|
501 |
||
502 |
lemma complex_derivative_diff: |
|
503 |
"\<lbrakk>f complex_differentiable at z; g complex_differentiable at z\<rbrakk> |
|
504 |
\<Longrightarrow> DD (\<lambda>w. f w - g w) z = DD f z - DD g z" |
|
505 |
unfolding complex_differentiable_def |
|
506 |
by (rule DERIV_imp_DD) (metis (poly_guards_query) DERIV_diff DERIV_imp_DD) |
|
507 |
||
508 |
lemma complex_derivative_mult: |
|
509 |
"\<lbrakk>f complex_differentiable at z; g complex_differentiable at z\<rbrakk> |
|
510 |
\<Longrightarrow> DD (\<lambda>w. f w * g w) z = f z * DD g z + DD f z * g z" |
|
511 |
unfolding complex_differentiable_def |
|
512 |
by (rule DERIV_imp_DD) (metis DERIV_imp_DD DERIV_mult') |
|
513 |
||
514 |
lemma complex_derivative_cmult: |
|
515 |
"f complex_differentiable at z \<Longrightarrow> DD (\<lambda>w. c * f w) z = c * DD f z" |
|
516 |
unfolding complex_differentiable_def |
|
517 |
by (metis DERIV_cmult DERIV_imp_DD) |
|
518 |
||
519 |
lemma complex_derivative_cmult_right: |
|
520 |
"f complex_differentiable at z \<Longrightarrow> DD (\<lambda>w. f w * c) z = DD f z * c" |
|
521 |
unfolding complex_differentiable_def |
|
522 |
by (metis DERIV_cmult_right DERIV_imp_DD) |
|
523 |
||
524 |
lemma complex_derivative_transform_within_open: |
|
525 |
"\<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> |
|
526 |
\<Longrightarrow> DD f z = DD g z" |
|
527 |
unfolding holomorphic_on_def |
|
528 |
by (rule DERIV_imp_DD) (metis has_derivative_within_open DERIV_imp_DD DERIV_transform_within_open) |
|
529 |
||
530 |
lemma complex_derivative_compose_linear: |
|
531 |
"f complex_differentiable at (c * z) \<Longrightarrow> DD (\<lambda>w. f (c * w)) z = c * DD f (c * z)" |
|
532 |
apply (rule DERIV_imp_DD) |
|
533 |
apply (simp add: DD_iff_derivative_complex_differentiable [symmetric]) |
|
534 |
apply (metis DERIV_chain' DERIV_cmult_Id comm_semiring_1_class.normalizing_semiring_rules(7)) |
|
535 |
done |
|
536 |
||
537 |
subsection{*Caratheodory characterization.*}
|
|
538 |
||
539 |
lemma complex_differentiable_caratheodory_at: |
|
540 |
"f complex_differentiable (at z) \<longleftrightarrow> |
|
541 |
(\<exists>g. (\<forall>w. f(w) - f(z) = g(w) * (w - z)) \<and> continuous (at z) g)" |
|
542 |
using CARAT_DERIV [of f] |
|
543 |
by (simp add: complex_differentiable_def has_field_derivative_def) |
|
544 |
||
545 |
lemma complex_differentiable_caratheodory_within: |
|
546 |
"f complex_differentiable (at z within s) \<longleftrightarrow> |
|
547 |
(\<exists>g. (\<forall>w. f(w) - f(z) = g(w) * (w - z)) \<and> continuous (at z within s) g)" |
|
548 |
using DERIV_caratheodory_within [of f] |
|
549 |
by (simp add: complex_differentiable_def has_field_derivative_def) |
|
550 |
||
551 |
subsection{*analyticity on a set*}
|
|
552 |
||
553 |
definition analytic_on (infixl "(analytic'_on)" 50) |
|
554 |
where |
|
555 |
"f analytic_on s \<equiv> \<forall>x \<in> s. \<exists>e. 0 < e \<and> f holomorphic_on (ball x e)" |
|
556 |
||
557 |
lemma analytic_imp_holomorphic: |
|
558 |
"f analytic_on s \<Longrightarrow> f holomorphic_on s" |
|
559 |
unfolding analytic_on_def holomorphic_on_def |
|
560 |
apply (simp add: has_derivative_within_open [OF _ open_ball]) |
|
561 |
apply (metis DERIV_subset dist_self mem_ball top_greatest) |
|
562 |
done |
|
563 |
||
564 |
lemma analytic_on_open: |
|
565 |
"open s \<Longrightarrow> f analytic_on s \<longleftrightarrow> f holomorphic_on s" |
|
566 |
apply (auto simp: analytic_imp_holomorphic) |
|
567 |
apply (auto simp: analytic_on_def holomorphic_on_def) |
|
568 |
by (metis holomorphic_on_def holomorphic_on_subset open_contains_ball) |
|
569 |
||
570 |
lemma analytic_on_imp_differentiable_at: |
|
571 |
"f analytic_on s \<Longrightarrow> x \<in> s \<Longrightarrow> f complex_differentiable (at x)" |
|
572 |
apply (auto simp: analytic_on_def holomorphic_on_differentiable) |
|
573 |
by (metis Topology_Euclidean_Space.open_ball centre_in_ball complex_differentiable_within_open) |
|
574 |
||
575 |
lemma analytic_on_subset: |
|
576 |
"f analytic_on s \<Longrightarrow> t \<subseteq> s \<Longrightarrow> f analytic_on t" |
|
577 |
by (auto simp: analytic_on_def) |
|
578 |
||
579 |
lemma analytic_on_Un: |
|
580 |
"f analytic_on (s \<union> t) \<longleftrightarrow> f analytic_on s \<and> f analytic_on t" |
|
581 |
by (auto simp: analytic_on_def) |
|
582 |
||
583 |
lemma analytic_on_Union: |
|
584 |
"f analytic_on (\<Union> s) \<longleftrightarrow> (\<forall>t \<in> s. f analytic_on t)" |
|
585 |
by (auto simp: analytic_on_def) |
|
586 |
||
587 |
lemma analytic_on_holomorphic: |
|
588 |
"f analytic_on s \<longleftrightarrow> (\<exists>t. open t \<and> s \<subseteq> t \<and> f holomorphic_on t)" |
|
589 |
(is "?lhs = ?rhs") |
|
590 |
proof - |
|
591 |
have "?lhs \<longleftrightarrow> (\<exists>t. open t \<and> s \<subseteq> t \<and> f analytic_on t)" |
|
592 |
proof safe |
|
593 |
assume "f analytic_on s" |
|
594 |
then show "\<exists>t. open t \<and> s \<subseteq> t \<and> f analytic_on t" |
|
595 |
apply (simp add: analytic_on_def) |
|
596 |
apply (rule exI [where x="\<Union>{u. open u \<and> f analytic_on u}"], auto)
|
|
597 |
apply (metis Topology_Euclidean_Space.open_ball analytic_on_open centre_in_ball) |
|
598 |
by (metis analytic_on_def) |
|
599 |
next |
|
600 |
fix t |
|
601 |
assume "open t" "s \<subseteq> t" "f analytic_on t" |
|
602 |
then show "f analytic_on s" |
|
603 |
by (metis analytic_on_subset) |
|
604 |
qed |
|
605 |
also have "... \<longleftrightarrow> ?rhs" |
|
606 |
by (auto simp: analytic_on_open) |
|
607 |
finally show ?thesis . |
|
608 |
qed |
|
609 |
||
610 |
lemma analytic_on_linear: "(op * c) analytic_on s" |
|
611 |
apply (simp add: analytic_on_holomorphic holomorphic_on_linear) |
|
612 |
by (metis open_UNIV top_greatest) |
|
613 |
||
614 |
lemma analytic_on_const: "(\<lambda>z. c) analytic_on s" |
|
615 |
unfolding analytic_on_def |
|
616 |
by (metis holomorphic_on_const zero_less_one) |
|
617 |
||
618 |
lemma analytic_on_id: "id analytic_on s" |
|
619 |
unfolding analytic_on_def |
|
620 |
apply (simp add: holomorphic_on_id) |
|
621 |
by (metis gt_ex) |
|
622 |
||
623 |
lemma analytic_on_compose: |
|
624 |
assumes f: "f analytic_on s" |
|
625 |
and g: "g analytic_on (f ` s)" |
|
626 |
shows "(g o f) analytic_on s" |
|
627 |
unfolding analytic_on_def |
|
628 |
proof (intro ballI) |
|
629 |
fix x |
|
630 |
assume x: "x \<in> s" |
|
631 |
then obtain e where e: "0 < e" and fh: "f holomorphic_on ball x e" using f |
|
632 |
by (metis analytic_on_def) |
|
633 |
obtain e' where e': "0 < e'" and gh: "g holomorphic_on ball (f x) e'" using g |
|
634 |
by (metis analytic_on_def g image_eqI x) |
|
635 |
have "isCont f x" |
|
636 |
by (metis analytic_on_imp_differentiable_at complex_differentiable_imp_continuous_at f x) |
|
637 |
with e' obtain d where d: "0 < d" and fd: "f ` ball x d \<subseteq> ball (f x) e'" |
|
638 |
by (auto simp: continuous_at_ball) |
|
639 |
have "g \<circ> f holomorphic_on ball x (min d e)" |
|
640 |
apply (rule holomorphic_on_compose) |
|
641 |
apply (metis fh holomorphic_on_subset min.bounded_iff order_refl subset_ball) |
|
642 |
by (metis fd gh holomorphic_on_subset image_mono min.cobounded1 subset_ball) |
|
643 |
then show "\<exists>e>0. g \<circ> f holomorphic_on ball x e" |
|
644 |
by (metis d e min_less_iff_conj) |
|
645 |
qed |
|
646 |
||
647 |
lemma analytic_on_compose_gen: |
|
648 |
"f analytic_on s \<Longrightarrow> g analytic_on t \<Longrightarrow> (\<And>z. z \<in> s \<Longrightarrow> f z \<in> t) |
|
649 |
\<Longrightarrow> g o f analytic_on s" |
|
650 |
by (metis analytic_on_compose analytic_on_subset image_subset_iff) |
|
651 |
||
652 |
lemma analytic_on_neg: |
|
653 |
"f analytic_on s \<Longrightarrow> (\<lambda>z. -(f z)) analytic_on s" |
|
654 |
by (metis analytic_on_holomorphic holomorphic_on_minus) |
|
655 |
||
656 |
lemma analytic_on_add: |
|
657 |
assumes f: "f analytic_on s" |
|
658 |
and g: "g analytic_on s" |
|
659 |
shows "(\<lambda>z. f z + g z) analytic_on s" |
|
660 |
unfolding analytic_on_def |
|
661 |
proof (intro ballI) |
|
662 |
fix z |
|
663 |
assume z: "z \<in> s" |
|
664 |
then obtain e where e: "0 < e" and fh: "f holomorphic_on ball z e" using f |
|
665 |
by (metis analytic_on_def) |
|
666 |
obtain e' where e': "0 < e'" and gh: "g holomorphic_on ball z e'" using g |
|
667 |
by (metis analytic_on_def g z) |
|
668 |
have "(\<lambda>z. f z + g z) holomorphic_on ball z (min e e')" |
|
669 |
apply (rule holomorphic_on_add) |
|
670 |
apply (metis fh holomorphic_on_subset min.bounded_iff order_refl subset_ball) |
|
671 |
by (metis gh holomorphic_on_subset min.bounded_iff order_refl subset_ball) |
|
672 |
then show "\<exists>e>0. (\<lambda>z. f z + g z) holomorphic_on ball z e" |
|
673 |
by (metis e e' min_less_iff_conj) |
|
674 |
qed |
|
675 |
||
676 |
lemma analytic_on_diff: |
|
677 |
assumes f: "f analytic_on s" |
|
678 |
and g: "g analytic_on s" |
|
679 |
shows "(\<lambda>z. f z - g z) analytic_on s" |
|
680 |
unfolding analytic_on_def |
|
681 |
proof (intro ballI) |
|
682 |
fix z |
|
683 |
assume z: "z \<in> s" |
|
684 |
then obtain e where e: "0 < e" and fh: "f holomorphic_on ball z e" using f |
|
685 |
by (metis analytic_on_def) |
|
686 |
obtain e' where e': "0 < e'" and gh: "g holomorphic_on ball z e'" using g |
|
687 |
by (metis analytic_on_def g z) |
|
688 |
have "(\<lambda>z. f z - g z) holomorphic_on ball z (min e e')" |
|
689 |
apply (rule holomorphic_on_diff) |
|
690 |
apply (metis fh holomorphic_on_subset min.bounded_iff order_refl subset_ball) |
|
691 |
by (metis gh holomorphic_on_subset min.bounded_iff order_refl subset_ball) |
|
692 |
then show "\<exists>e>0. (\<lambda>z. f z - g z) holomorphic_on ball z e" |
|
693 |
by (metis e e' min_less_iff_conj) |
|
694 |
qed |
|
695 |
||
696 |
lemma analytic_on_mult: |
|
697 |
assumes f: "f analytic_on s" |
|
698 |
and g: "g analytic_on s" |
|
699 |
shows "(\<lambda>z. f z * g z) analytic_on s" |
|
700 |
unfolding analytic_on_def |
|
701 |
proof (intro ballI) |
|
702 |
fix z |
|
703 |
assume z: "z \<in> s" |
|
704 |
then obtain e where e: "0 < e" and fh: "f holomorphic_on ball z e" using f |
|
705 |
by (metis analytic_on_def) |
|
706 |
obtain e' where e': "0 < e'" and gh: "g holomorphic_on ball z e'" using g |
|
707 |
by (metis analytic_on_def g z) |
|
708 |
have "(\<lambda>z. f z * g z) holomorphic_on ball z (min e e')" |
|
709 |
apply (rule holomorphic_on_mult) |
|
710 |
apply (metis fh holomorphic_on_subset min.bounded_iff order_refl subset_ball) |
|
711 |
by (metis gh holomorphic_on_subset min.bounded_iff order_refl subset_ball) |
|
712 |
then show "\<exists>e>0. (\<lambda>z. f z * g z) holomorphic_on ball z e" |
|
713 |
by (metis e e' min_less_iff_conj) |
|
714 |
qed |
|
715 |
||
716 |
lemma analytic_on_inverse: |
|
717 |
assumes f: "f analytic_on s" |
|
718 |
and nz: "(\<And>z. z \<in> s \<Longrightarrow> f z \<noteq> 0)" |
|
719 |
shows "(\<lambda>z. inverse (f z)) analytic_on s" |
|
720 |
unfolding analytic_on_def |
|
721 |
proof (intro ballI) |
|
722 |
fix z |
|
723 |
assume z: "z \<in> s" |
|
724 |
then obtain e where e: "0 < e" and fh: "f holomorphic_on ball z e" using f |
|
725 |
by (metis analytic_on_def) |
|
726 |
have "continuous_on (ball z e) f" |
|
727 |
by (metis fh holomorphic_on_imp_continuous_on) |
|
728 |
then obtain e' where e': "0 < e'" and nz': "\<And>y. dist z y < e' \<Longrightarrow> f y \<noteq> 0" |
|
729 |
by (metis Topology_Euclidean_Space.open_ball centre_in_ball continuous_on_open_avoid e z nz) |
|
730 |
have "(\<lambda>z. inverse (f z)) holomorphic_on ball z (min e e')" |
|
731 |
apply (rule holomorphic_on_inverse) |
|
732 |
apply (metis fh holomorphic_on_subset min.cobounded2 min.commute subset_ball) |
|
733 |
by (metis nz' mem_ball min_less_iff_conj) |
|
734 |
then show "\<exists>e>0. (\<lambda>z. inverse (f z)) holomorphic_on ball z e" |
|
735 |
by (metis e e' min_less_iff_conj) |
|
736 |
qed |
|
737 |
||
738 |
||
739 |
lemma analytic_on_divide: |
|
740 |
assumes f: "f analytic_on s" |
|
741 |
and g: "g analytic_on s" |
|
742 |
and nz: "(\<And>z. z \<in> s \<Longrightarrow> g z \<noteq> 0)" |
|
743 |
shows "(\<lambda>z. f z / g z) analytic_on s" |
|
744 |
unfolding divide_inverse |
|
745 |
by (metis analytic_on_inverse analytic_on_mult f g nz) |
|
746 |
||
747 |
lemma analytic_on_power: |
|
748 |
"f analytic_on s \<Longrightarrow> (\<lambda>z. (f z) ^ n) analytic_on s" |
|
749 |
by (induct n) (auto simp: analytic_on_const analytic_on_mult) |
|
750 |
||
751 |
lemma analytic_on_setsum: |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
752 |
"(\<And>i. i \<in> I \<Longrightarrow> (f i) analytic_on s) \<Longrightarrow> (\<lambda>x. setsum (\<lambda>i. f i x) I) analytic_on s" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
753 |
by (induct I rule: infinite_finite_induct) (auto simp: analytic_on_const analytic_on_add) |
| 56215 | 754 |
|
755 |
subsection{*analyticity at a point.*}
|
|
756 |
||
757 |
lemma analytic_at_ball: |
|
758 |
"f analytic_on {z} \<longleftrightarrow> (\<exists>e. 0<e \<and> f holomorphic_on ball z e)"
|
|
759 |
by (metis analytic_on_def singleton_iff) |
|
760 |
||
761 |
lemma analytic_at: |
|
762 |
"f analytic_on {z} \<longleftrightarrow> (\<exists>s. open s \<and> z \<in> s \<and> f holomorphic_on s)"
|
|
763 |
by (metis analytic_on_holomorphic empty_subsetI insert_subset) |
|
764 |
||
765 |
lemma analytic_on_analytic_at: |
|
766 |
"f analytic_on s \<longleftrightarrow> (\<forall>z \<in> s. f analytic_on {z})"
|
|
767 |
by (metis analytic_at_ball analytic_on_def) |
|
768 |
||
769 |
lemma analytic_at_two: |
|
770 |
"f analytic_on {z} \<and> g analytic_on {z} \<longleftrightarrow>
|
|
771 |
(\<exists>s. open s \<and> z \<in> s \<and> f holomorphic_on s \<and> g holomorphic_on s)" |
|
772 |
(is "?lhs = ?rhs") |
|
773 |
proof |
|
774 |
assume ?lhs |
|
775 |
then obtain s t |
|
776 |
where st: "open s" "z \<in> s" "f holomorphic_on s" |
|
777 |
"open t" "z \<in> t" "g holomorphic_on t" |
|
778 |
by (auto simp: analytic_at) |
|
779 |
show ?rhs |
|
780 |
apply (rule_tac x="s \<inter> t" in exI) |
|
781 |
using st |
|
782 |
apply (auto simp: Diff_subset holomorphic_on_subset) |
|
783 |
done |
|
784 |
next |
|
785 |
assume ?rhs |
|
786 |
then show ?lhs |
|
787 |
by (force simp add: analytic_at) |
|
788 |
qed |
|
789 |
||
790 |
subsection{*Combining theorems for derivative with ``analytic at'' hypotheses*}
|
|
791 |
||
792 |
lemma |
|
793 |
assumes "f analytic_on {z}" "g analytic_on {z}"
|
|
794 |
shows complex_derivative_add_at: "DD (\<lambda>w. f w + g w) z = DD f z + DD g z" |
|
795 |
and complex_derivative_diff_at: "DD (\<lambda>w. f w - g w) z = DD f z - DD g z" |
|
796 |
and complex_derivative_mult_at: "DD (\<lambda>w. f w * g w) z = |
|
797 |
f z * DD g z + DD f z * g z" |
|
798 |
proof - |
|
799 |
obtain s where s: "open s" "z \<in> s" "f holomorphic_on s" "g holomorphic_on s" |
|
800 |
using assms by (metis analytic_at_two) |
|
801 |
show "DD (\<lambda>w. f w + g w) z = DD f z + DD g z" |
|
802 |
apply (rule DERIV_imp_DD [OF DERIV_add]) |
|
803 |
using s |
|
804 |
apply (auto simp: holomorphic_on_open complex_differentiable_def DD_iff_derivative_complex_differentiable) |
|
805 |
done |
|
806 |
show "DD (\<lambda>w. f w - g w) z = DD f z - DD g z" |
|
807 |
apply (rule DERIV_imp_DD [OF DERIV_diff]) |
|
808 |
using s |
|
809 |
apply (auto simp: holomorphic_on_open complex_differentiable_def DD_iff_derivative_complex_differentiable) |
|
810 |
done |
|
811 |
show "DD (\<lambda>w. f w * g w) z = f z * DD g z + DD f z * g z" |
|
812 |
apply (rule DERIV_imp_DD [OF DERIV_mult']) |
|
813 |
using s |
|
814 |
apply (auto simp: holomorphic_on_open complex_differentiable_def DD_iff_derivative_complex_differentiable) |
|
815 |
done |
|
816 |
qed |
|
817 |
||
818 |
lemma complex_derivative_cmult_at: |
|
819 |
"f analytic_on {z} \<Longrightarrow> DD (\<lambda>w. c * f w) z = c * DD f z"
|
|
820 |
by (auto simp: complex_derivative_mult_at complex_derivative_const analytic_on_const) |
|
821 |
||
822 |
lemma complex_derivative_cmult_right_at: |
|
823 |
"f analytic_on {z} \<Longrightarrow> DD (\<lambda>w. f w * c) z = DD f z * c"
|
|
824 |
by (auto simp: complex_derivative_mult_at complex_derivative_const analytic_on_const) |
|
825 |
||
826 |
text{*A composition lemma for functions of mixed type*}
|
|
827 |
lemma has_vector_derivative_real_complex: |
|
828 |
fixes f :: "complex \<Rightarrow> complex" |
|
829 |
assumes "DERIV f (of_real a) :> f'" |
|
830 |
shows "((\<lambda>x. f (of_real x)) has_vector_derivative f') (at a)" |
|
831 |
using diff_chain_at [OF has_derivative_ident, of f "op * f'" a] assms |
|
832 |
unfolding has_field_derivative_def has_vector_derivative_def o_def |
|
833 |
by (auto simp: mult_ac scaleR_conv_of_real) |
|
834 |
||
835 |
subsection{*Complex differentiation of sequences and series*}
|
|
836 |
||
837 |
lemma has_complex_derivative_sequence: |
|
838 |
fixes s :: "complex set" |
|
839 |
assumes cvs: "convex s" |
|
840 |
and df: "\<And>n x. x \<in> s \<Longrightarrow> (f n has_field_derivative f' n x) (at x within s)" |
|
841 |
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" |
|
842 |
and "\<exists>x l. x \<in> s \<and> ((\<lambda>n. f n x) ---> l) sequentially" |
|
843 |
shows "\<exists>g. \<forall>x \<in> s. ((\<lambda>n. f n x) ---> g x) sequentially \<and> |
|
844 |
(g has_field_derivative (g' x)) (at x within s)" |
|
845 |
proof - |
|
846 |
from assms obtain x l where x: "x \<in> s" and tf: "((\<lambda>n. f n x) ---> l) sequentially" |
|
847 |
by blast |
|
848 |
{ fix e::real assume e: "e > 0"
|
|
849 |
then obtain N where N: "\<forall>n\<ge>N. \<forall>x. x \<in> s \<longrightarrow> cmod (f' n x - g' x) \<le> e" |
|
850 |
by (metis conv) |
|
851 |
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" |
|
852 |
proof (rule exI [of _ N], clarify) |
|
853 |
fix n y h |
|
854 |
assume "N \<le> n" "y \<in> s" |
|
855 |
then have "cmod (f' n y - g' y) \<le> e" |
|
856 |
by (metis N) |
|
857 |
then have "cmod h * cmod (f' n y - g' y) \<le> cmod h * e" |
|
858 |
by (auto simp: antisym_conv2 mult_le_cancel_left norm_triangle_ineq2) |
|
859 |
then show "cmod (f' n y * h - g' y * h) \<le> e * cmod h" |
|
860 |
by (simp add: norm_mult [symmetric] field_simps) |
|
861 |
qed |
|
862 |
} note ** = this |
|
863 |
show ?thesis |
|
864 |
unfolding has_field_derivative_def |
|
865 |
proof (rule has_derivative_sequence [OF cvs _ _ x]) |
|
866 |
show "\<forall>n. \<forall>x\<in>s. (f n has_derivative (op * (f' n x))) (at x within s)" |
|
867 |
by (metis has_field_derivative_def df) |
|
868 |
next show "(\<lambda>n. f n x) ----> l" |
|
869 |
by (rule tf) |
|
870 |
next show "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. cmod (f' n x * h - g' x * h) \<le> e * cmod h" |
|
871 |
by (blast intro: **) |
|
872 |
qed |
|
873 |
qed |
|
874 |
||
875 |
||
876 |
lemma has_complex_derivative_series: |
|
877 |
fixes s :: "complex set" |
|
878 |
assumes cvs: "convex s" |
|
879 |
and df: "\<And>n x. x \<in> s \<Longrightarrow> (f n has_field_derivative f' n x) (at x within s)" |
|
880 |
and conv: "\<And>e. 0 < e \<Longrightarrow> \<exists>N. \<forall>n x. n \<ge> N \<longrightarrow> x \<in> s |
|
881 |
\<longrightarrow> cmod ((\<Sum>i<n. f' i x) - g' x) \<le> e" |
|
882 |
and "\<exists>x l. x \<in> s \<and> ((\<lambda>n. f n x) sums l)" |
|
883 |
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))" |
|
884 |
proof - |
|
885 |
from assms obtain x l where x: "x \<in> s" and sf: "((\<lambda>n. f n x) sums l)" |
|
886 |
by blast |
|
887 |
{ fix e::real assume e: "e > 0"
|
|
888 |
then obtain N where N: "\<forall>n x. n \<ge> N \<longrightarrow> x \<in> s |
|
889 |
\<longrightarrow> cmod ((\<Sum>i<n. f' i x) - g' x) \<le> e" |
|
890 |
by (metis conv) |
|
891 |
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" |
|
892 |
proof (rule exI [of _ N], clarify) |
|
893 |
fix n y h |
|
894 |
assume "N \<le> n" "y \<in> s" |
|
895 |
then have "cmod ((\<Sum>i<n. f' i y) - g' y) \<le> e" |
|
896 |
by (metis N) |
|
897 |
then have "cmod h * cmod ((\<Sum>i<n. f' i y) - g' y) \<le> cmod h * e" |
|
898 |
by (auto simp: antisym_conv2 mult_le_cancel_left norm_triangle_ineq2) |
|
899 |
then show "cmod ((\<Sum>i<n. h * f' i y) - g' y * h) \<le> e * cmod h" |
|
900 |
by (simp add: norm_mult [symmetric] field_simps setsum_right_distrib) |
|
901 |
qed |
|
902 |
} note ** = this |
|
903 |
show ?thesis |
|
904 |
unfolding has_field_derivative_def |
|
905 |
proof (rule has_derivative_series [OF cvs _ _ x]) |
|
906 |
fix n x |
|
907 |
assume "x \<in> s" |
|
908 |
then show "((f n) has_derivative (\<lambda>z. z * f' n x)) (at x within s)" |
|
909 |
by (metis df has_field_derivative_def mult_commute_abs) |
|
910 |
next show " ((\<lambda>n. f n x) sums l)" |
|
911 |
by (rule sf) |
|
912 |
next show "\<forall>e>0. \<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" |
|
913 |
by (blast intro: **) |
|
914 |
qed |
|
915 |
qed |
|
916 |
||
917 |
subsection{*Bound theorem*}
|
|
918 |
||
919 |
lemma complex_differentiable_bound: |
|
920 |
fixes s :: "complex set" |
|
921 |
assumes cvs: "convex s" |
|
922 |
and df: "\<And>z. z \<in> s \<Longrightarrow> (f has_field_derivative f' z) (at z within s)" |
|
923 |
and dn: "\<And>z. z \<in> s \<Longrightarrow> norm (f' z) \<le> B" |
|
924 |
and "x \<in> s" "y \<in> s" |
|
925 |
shows "norm(f x - f y) \<le> B * norm(x - y)" |
|
926 |
apply (rule differentiable_bound [OF cvs]) |
|
|
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
927 |
apply (rule ballI, erule df [unfolded has_field_derivative_def]) |
|
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
928 |
apply (rule ballI, rule onorm_le, simp add: norm_mult mult_right_mono dn) |
|
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
929 |
apply fact |
|
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
930 |
apply fact |
| 56215 | 931 |
done |
932 |
||
933 |
subsection{*Inverse function theorem for complex derivatives.*}
|
|
934 |
||
935 |
lemma has_complex_derivative_inverse_basic: |
|
936 |
fixes f :: "complex \<Rightarrow> complex" |
|
937 |
shows "DERIV f (g y) :> f' \<Longrightarrow> |
|
938 |
f' \<noteq> 0 \<Longrightarrow> |
|
939 |
continuous (at y) g \<Longrightarrow> |
|
940 |
open t \<Longrightarrow> |
|
941 |
y \<in> t \<Longrightarrow> |
|
942 |
(\<And>z. z \<in> t \<Longrightarrow> f (g z) = z) |
|
943 |
\<Longrightarrow> DERIV g y :> inverse (f')" |
|
944 |
unfolding has_field_derivative_def |
|
945 |
apply (rule has_derivative_inverse_basic) |
|
946 |
apply (auto simp: bounded_linear_mult_right) |
|
947 |
done |
|
948 |
||
949 |
(*Used only once, in Multivariate/cauchy.ml. *) |
|
950 |
lemma has_complex_derivative_inverse_strong: |
|
951 |
fixes f :: "complex \<Rightarrow> complex" |
|
952 |
shows "DERIV f x :> f' \<Longrightarrow> |
|
953 |
f' \<noteq> 0 \<Longrightarrow> |
|
954 |
open s \<Longrightarrow> |
|
955 |
x \<in> s \<Longrightarrow> |
|
956 |
continuous_on s f \<Longrightarrow> |
|
957 |
(\<And>z. z \<in> s \<Longrightarrow> g (f z) = z) |
|
958 |
\<Longrightarrow> DERIV g (f x) :> inverse (f')" |
|
959 |
unfolding has_field_derivative_def |
|
960 |
apply (rule has_derivative_inverse_strong [of s x f g ]) |
|
961 |
using assms |
|
962 |
by auto |
|
963 |
||
964 |
lemma has_complex_derivative_inverse_strong_x: |
|
965 |
fixes f :: "complex \<Rightarrow> complex" |
|
966 |
shows "DERIV f (g y) :> f' \<Longrightarrow> |
|
967 |
f' \<noteq> 0 \<Longrightarrow> |
|
968 |
open s \<Longrightarrow> |
|
969 |
continuous_on s f \<Longrightarrow> |
|
970 |
g y \<in> s \<Longrightarrow> f(g y) = y \<Longrightarrow> |
|
971 |
(\<And>z. z \<in> s \<Longrightarrow> g (f z) = z) |
|
972 |
\<Longrightarrow> DERIV g y :> inverse (f')" |
|
973 |
unfolding has_field_derivative_def |
|
974 |
apply (rule has_derivative_inverse_strong_x [of s g y f]) |
|
975 |
using assms |
|
976 |
by auto |
|
977 |
||
978 |
subsection{*Further useful properties of complex conjugation*}
|
|
979 |
||
980 |
lemma continuous_within_cnj: "continuous (at z within s) cnj" |
|
981 |
by (metis bounded_linear_cnj linear_continuous_within) |
|
982 |
||
983 |
lemma continuous_on_cnj: "continuous_on s cnj" |
|
984 |
by (metis bounded_linear_cnj linear_continuous_on) |
|
985 |
||
| 56332 | 986 |
subsection {*Some limit theorems about real part of real series etc.*}
|
| 56215 | 987 |
|
988 |
lemma real_lim: |
|
989 |
fixes l::complex |
|
| 56332 | 990 |
assumes "(f ---> l) F" and "~(trivial_limit F)" and "eventually P F" and "\<And>a. P a \<Longrightarrow> f a \<in> \<real>" |
| 56215 | 991 |
shows "l \<in> \<real>" |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
992 |
proof (rule Lim_in_closed_set[OF closed_complex_Reals _ assms(2,1)]) |
| 56332 | 993 |
show "eventually (\<lambda>x. f x \<in> \<real>) F" |
994 |
using assms(3, 4) by (auto intro: eventually_mono) |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
995 |
qed |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
996 |
|
| 56215 | 997 |
lemma real_lim_sequentially: |
998 |
fixes l::complex |
|
999 |
shows "(f ---> l) sequentially \<Longrightarrow> (\<exists>N. \<forall>n\<ge>N. f n \<in> \<real>) \<Longrightarrow> l \<in> \<real>" |
|
1000 |
by (rule real_lim [where F=sequentially]) (auto simp: eventually_sequentially) |
|
1001 |
||
1002 |
lemma real_series: |
|
1003 |
fixes l::complex |
|
1004 |
shows "f sums l \<Longrightarrow> (\<And>n. f n \<in> \<real>) \<Longrightarrow> l \<in> \<real>" |
|
1005 |
unfolding sums_def |
|
1006 |
by (metis real_lim_sequentially setsum_in_Reals) |
|
1007 |
||
1008 |
||
1009 |
lemma Lim_null_comparison_Re: |
|
1010 |
"eventually (\<lambda>x. norm(f x) \<le> Re(g x)) F \<Longrightarrow> (g ---> 0) F \<Longrightarrow> (f ---> 0) F" |
|
1011 |
by (metis Lim_null_comparison complex_Re_zero tendsto_Re) |
|
1012 |
||
1013 |
||
|
56217
dc429a5b13c4
Some rationalisation of basic lemmas
paulson <lp15@cam.ac.uk>
parents:
56215
diff
changeset
|
1014 |
(*MOVE? But not to Finite_Cartesian_Product*) |
| 56215 | 1015 |
lemma sums_vec_nth : |
1016 |
assumes "f sums a" |
|
1017 |
shows "(\<lambda>x. f x $ i) sums a $ i" |
|
1018 |
using assms unfolding sums_def |
|
1019 |
by (auto dest: tendsto_vec_nth [where i=i]) |
|
1020 |
||
1021 |
lemma summable_vec_nth : |
|
1022 |
assumes "summable f" |
|
1023 |
shows "summable (\<lambda>x. f x $ i)" |
|
1024 |
using assms unfolding summable_def |
|
1025 |
by (blast intro: sums_vec_nth) |
|
1026 |
||
1027 |
lemma setsum_Suc_reindex: |
|
1028 |
fixes f :: "nat \<Rightarrow> 'a::ab_group_add" |
|
1029 |
shows "setsum f {0..n} = f 0 - f (Suc n) + setsum (\<lambda>i. f (Suc i)) {0..n}"
|
|
1030 |
by (induct n) auto |
|
1031 |
||
|
56217
dc429a5b13c4
Some rationalisation of basic lemmas
paulson <lp15@cam.ac.uk>
parents:
56215
diff
changeset
|
1032 |
text{*A kind of complex Taylor theorem.*}
|
| 56215 | 1033 |
lemma complex_taylor: |
1034 |
assumes s: "convex s" |
|
1035 |
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)" |
|
1036 |
and B: "\<And>x. x \<in> s \<Longrightarrow> cmod (f (Suc n) x) \<le> B" |
|
1037 |
and w: "w \<in> s" |
|
1038 |
and z: "z \<in> s" |
|
1039 |
shows "cmod(f 0 z - (\<Sum>i\<le>n. f i w * (z-w) ^ i / of_nat (fact i))) |
|
1040 |
\<le> B * cmod(z - w)^(Suc n) / fact n" |
|
1041 |
proof - |
|
1042 |
have wzs: "closed_segment w z \<subseteq> s" using assms |
|
1043 |
by (metis convex_contains_segment) |
|
1044 |
{ fix u
|
|
1045 |
assume "u \<in> closed_segment w z" |
|
1046 |
then have "u \<in> s" |
|
1047 |
by (metis wzs subsetD) |
|
1048 |
have "(\<Sum>i\<le>n. f i u * (- of_nat i * (z-u)^(i - 1)) / of_nat (fact i) + |
|
1049 |
f (Suc i) u * (z-u)^i / of_nat (fact i)) = |
|
1050 |
f (Suc n) u * (z-u) ^ n / of_nat (fact n)" |
|
1051 |
proof (induction n) |
|
1052 |
case 0 show ?case by simp |
|
1053 |
next |
|
1054 |
case (Suc n) |
|
1055 |
have "(\<Sum>i\<le>Suc n. f i u * (- of_nat i * (z-u) ^ (i - 1)) / of_nat (fact i) + |
|
1056 |
f (Suc i) u * (z-u) ^ i / of_nat (fact i)) = |
|
1057 |
f (Suc n) u * (z-u) ^ n / of_nat (fact n) + |
|
1058 |
f (Suc (Suc n)) u * ((z-u) * (z-u) ^ n) / of_nat (fact (Suc n)) - |
|
1059 |
f (Suc n) u * ((1 + of_nat n) * (z-u) ^ n) / of_nat (fact (Suc n))" |
|
1060 |
using Suc by simp |
|
1061 |
also have "... = f (Suc (Suc n)) u * (z-u) ^ Suc n / of_nat (fact (Suc n))" |
|
1062 |
proof - |
|
1063 |
have "of_nat(fact(Suc n)) * |
|
1064 |
(f(Suc n) u *(z-u) ^ n / of_nat(fact n) + |
|
1065 |
f(Suc(Suc n)) u *((z-u) *(z-u) ^ n) / of_nat(fact(Suc n)) - |
|
1066 |
f(Suc n) u *((1 + of_nat n) *(z-u) ^ n) / of_nat(fact(Suc n))) = |
|
1067 |
(of_nat(fact(Suc n)) *(f(Suc n) u *(z-u) ^ n)) / of_nat(fact n) + |
|
1068 |
(of_nat(fact(Suc n)) *(f(Suc(Suc n)) u *((z-u) *(z-u) ^ n)) / of_nat(fact(Suc n))) - |
|
1069 |
(of_nat(fact(Suc n)) *(f(Suc n) u *(of_nat(Suc n) *(z-u) ^ n))) / of_nat(fact(Suc n))" |
|
1070 |
by (simp add: algebra_simps del: fact_Suc) |
|
1071 |
also have "... = |
|
1072 |
(of_nat (fact (Suc n)) * (f (Suc n) u * (z-u) ^ n)) / of_nat (fact n) + |
|
1073 |
(f (Suc (Suc n)) u * ((z-u) * (z-u) ^ n)) - |
|
1074 |
(f (Suc n) u * ((1 + of_nat n) * (z-u) ^ n))" |
|
1075 |
by (simp del: fact_Suc) |
|
1076 |
also have "... = |
|
1077 |
(of_nat (Suc n) * (f (Suc n) u * (z-u) ^ n)) + |
|
1078 |
(f (Suc (Suc n)) u * ((z-u) * (z-u) ^ n)) - |
|
1079 |
(f (Suc n) u * ((1 + of_nat n) * (z-u) ^ n))" |
|
1080 |
by (simp only: fact_Suc of_nat_mult mult_ac) simp |
|
1081 |
also have "... = f (Suc (Suc n)) u * ((z-u) * (z-u) ^ n)" |
|
1082 |
by (simp add: algebra_simps) |
|
1083 |
finally show ?thesis |
|
1084 |
by (simp add: mult_left_cancel [where c = "of_nat (fact (Suc n))", THEN iffD1] del: fact_Suc) |
|
1085 |
qed |
|
1086 |
finally show ?case . |
|
1087 |
qed |
|
1088 |
then have "((\<lambda>v. (\<Sum>i\<le>n. f i v * (z - v)^i / of_nat (fact i))) |
|
1089 |
has_field_derivative f (Suc n) u * (z-u) ^ n / of_nat (fact n)) |
|
1090 |
(at u within s)" |
|
1091 |
apply (intro DERIV_intros DERIV_power[THEN DERIV_cong]) |
|
1092 |
apply (blast intro: assms `u \<in> s`) |
|
1093 |
apply (rule refl)+ |
|
1094 |
apply (auto simp: field_simps) |
|
1095 |
done |
|
1096 |
} note sum_deriv = this |
|
1097 |
{ fix u
|
|
1098 |
assume u: "u \<in> closed_segment w z" |
|
1099 |
then have us: "u \<in> s" |
|
1100 |
by (metis wzs subsetD) |
|
1101 |
have "cmod (f (Suc n) u) * cmod (z - u) ^ n \<le> cmod (f (Suc n) u) * cmod (u - z) ^ n" |
|
1102 |
by (metis norm_minus_commute order_refl) |
|
1103 |
also have "... \<le> cmod (f (Suc n) u) * cmod (z - w) ^ n" |
|
1104 |
by (metis mult_left_mono norm_ge_zero power_mono segment_bound [OF u]) |
|
1105 |
also have "... \<le> B * cmod (z - w) ^ n" |
|
1106 |
by (metis norm_ge_zero zero_le_power mult_right_mono B [OF us]) |
|
1107 |
finally have "cmod (f (Suc n) u) * cmod (z - u) ^ n \<le> B * cmod (z - w) ^ n" . |
|
1108 |
} note cmod_bound = this |
|
1109 |
have "(\<Sum>i\<le>n. f i z * (z - z) ^ i / of_nat (fact i)) = (\<Sum>i\<le>n. (f i z / of_nat (fact i)) * 0 ^ i)" |
|
1110 |
by simp |
|
1111 |
also have "\<dots> = f 0 z / of_nat (fact 0)" |
|
1112 |
by (subst setsum_zero_power) simp |
|
1113 |
finally have "cmod (f 0 z - (\<Sum>i\<le>n. f i w * (z - w) ^ i / of_nat (fact i))) |
|
1114 |
\<le> cmod ((\<Sum>i\<le>n. f i w * (z - w) ^ i / of_nat (fact i)) - |
|
1115 |
(\<Sum>i\<le>n. f i z * (z - z) ^ i / of_nat (fact i)))" |
|
1116 |
by (simp add: norm_minus_commute) |
|
1117 |
also have "... \<le> B * cmod (z - w) ^ n / real_of_nat (fact n) * cmod (w - z)" |
|
1118 |
apply (rule complex_differentiable_bound |
|
1119 |
[where f' = "\<lambda>w. f (Suc n) w * (z - w)^n / of_nat(fact n)" |
|
1120 |
and s = "closed_segment w z", OF convex_segment]) |
|
1121 |
apply (auto simp: ends_in_segment real_of_nat_def DERIV_subset [OF sum_deriv wzs] |
|
1122 |
norm_divide norm_mult norm_power divide_le_cancel cmod_bound) |
|
1123 |
done |
|
1124 |
also have "... \<le> B * cmod (z - w) ^ Suc n / real (fact n)" |
|
1125 |
by (simp add: algebra_simps norm_minus_commute real_of_nat_def) |
|
1126 |
finally show ?thesis . |
|
1127 |
qed |
|
1128 |
||
|
56238
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1129 |
text{* Something more like the traditional MVT for real components.*}
|
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1130 |
lemma complex_mvt_line: |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1131 |
assumes "\<And>u. u \<in> closed_segment w z \<Longrightarrow> (f has_field_derivative f'(u)) (at u)" |
|
56238
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1132 |
shows "\<exists>u. u \<in> open_segment w z \<and> Re(f z) - Re(f w) = Re(f'(u) * (z - w))" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1133 |
proof - |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1134 |
have twz: "\<And>t. (1 - t) *\<^sub>R w + t *\<^sub>R z = w + t *\<^sub>R (z - w)" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1135 |
by (simp add: real_vector.scale_left_diff_distrib real_vector.scale_right_diff_distrib) |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1136 |
note assms[unfolded has_field_derivative_def, has_derivative_intros] |
|
56238
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1137 |
show ?thesis |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1138 |
apply (cut_tac mvt_simple |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1139 |
[of 0 1 "Re o f o (\<lambda>t. (1 - t) *\<^sub>R w + t *\<^sub>R z)" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1140 |
"\<lambda>u. Re o (\<lambda>h. f'((1 - u) *\<^sub>R w + u *\<^sub>R z) * h) o (\<lambda>t. t *\<^sub>R (z - w))"]) |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1141 |
apply auto |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1142 |
apply (rule_tac x="(1 - x) *\<^sub>R w + x *\<^sub>R z" in exI) |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1143 |
apply (auto simp add: open_segment_def twz) [] |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1144 |
apply (intro has_derivative_eq_intros has_derivative_at_within) |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1145 |
apply simp_all |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1146 |
apply (simp add: fun_eq_iff real_vector.scale_right_diff_distrib) |
|
56238
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1147 |
apply (force simp add: twz closed_segment_def) |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1148 |
done |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1149 |
qed |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1150 |
|
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1151 |
lemma complex_taylor_mvt: |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1152 |
assumes "\<And>i x. \<lbrakk>x \<in> closed_segment w z; i \<le> n\<rbrakk> \<Longrightarrow> ((f i) has_field_derivative f (Suc i) x) (at x)" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1153 |
shows "\<exists>u. u \<in> closed_segment w z \<and> |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1154 |
Re (f 0 z) = |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1155 |
Re ((\<Sum>i = 0..n. f i w * (z - w) ^ i / of_nat (fact i)) + |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1156 |
(f (Suc n) u * (z-u)^n / of_nat (fact n)) * (z - w))" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1157 |
proof - |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1158 |
{ fix u
|
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1159 |
assume u: "u \<in> closed_segment w z" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1160 |
have "(\<Sum>i = 0..n. |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1161 |
(f (Suc i) u * (z-u) ^ i - of_nat i * (f i u * (z-u) ^ (i - Suc 0))) / |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1162 |
of_nat (fact i)) = |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1163 |
f (Suc 0) u - |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1164 |
(f (Suc (Suc n)) u * ((z-u) ^ Suc n) - (of_nat (Suc n)) * (z-u) ^ n * f (Suc n) u) / |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1165 |
of_nat (fact (Suc n)) + |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1166 |
(\<Sum>i = 0..n. |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1167 |
(f (Suc (Suc i)) u * ((z-u) ^ Suc i) - of_nat (Suc i) * (f (Suc i) u * (z-u) ^ i)) / |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1168 |
of_nat (fact (Suc i)))" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1169 |
by (subst setsum_Suc_reindex) simp |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1170 |
also have "... = f (Suc 0) u - |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1171 |
(f (Suc (Suc n)) u * ((z-u) ^ Suc n) - (of_nat (Suc n)) * (z-u) ^ n * f (Suc n) u) / |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1172 |
of_nat (fact (Suc n)) + |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1173 |
(\<Sum>i = 0..n. |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1174 |
f (Suc (Suc i)) u * ((z-u) ^ Suc i) / of_nat (fact (Suc i)) - |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1175 |
f (Suc i) u * (z-u) ^ i / of_nat (fact i))" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1176 |
by (simp only: diff_divide_distrib fact_cancel mult_ac) |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1177 |
also have "... = f (Suc 0) u - |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1178 |
(f (Suc (Suc n)) u * (z-u) ^ Suc n - of_nat (Suc n) * (z-u) ^ n * f (Suc n) u) / |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1179 |
of_nat (fact (Suc n)) + |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1180 |
f (Suc (Suc n)) u * (z-u) ^ Suc n / of_nat (fact (Suc n)) - f (Suc 0) u" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1181 |
by (subst setsum_Suc_diff) auto |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1182 |
also have "... = f (Suc n) u * (z-u) ^ n / of_nat (fact n)" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1183 |
by (simp only: algebra_simps diff_divide_distrib fact_cancel) |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1184 |
finally have "(\<Sum>i = 0..n. (f (Suc i) u * (z - u) ^ i |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1185 |
- of_nat i * (f i u * (z-u) ^ (i - Suc 0))) / of_nat (fact i)) = |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1186 |
f (Suc n) u * (z - u) ^ n / of_nat (fact n)" . |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1187 |
then have "((\<lambda>u. \<Sum>i = 0..n. f i u * (z - u) ^ i / of_nat (fact i)) has_field_derivative |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1188 |
f (Suc n) u * (z - u) ^ n / of_nat (fact n)) (at u)" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1189 |
apply (intro DERIV_intros)+ |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1190 |
apply (force intro: u assms) |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1191 |
apply (rule refl)+ |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1192 |
apply (auto simp: mult_ac) |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1193 |
done |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1194 |
} |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1195 |
then show ?thesis |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1196 |
apply (cut_tac complex_mvt_line [of w z "\<lambda>u. \<Sum>i = 0..n. f i u * (z-u) ^ i / of_nat (fact i)" |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1197 |
"\<lambda>u. (f (Suc n) u * (z-u)^n / of_nat (fact n))"]) |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1198 |
apply (auto simp add: intro: open_closed_segment) |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1199 |
done |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1200 |
qed |
|
5d147e1e18d1
a few new lemmas and generalisations of old ones
paulson <lp15@cam.ac.uk>
parents:
56223
diff
changeset
|
1201 |
|
| 56215 | 1202 |
end |