author | paulson |
Tue, 22 Apr 2025 17:35:13 +0100 | |
changeset 82539 | fadbfb9e65f3 |
parent 82529 | ff4b062aae57 |
parent 82538 | 4b132ea7d575 |
permissions | -rw-r--r-- |
63627 | 1 |
(* Title: HOL/Analysis/Derivative.thy |
53781 | 2 |
Author: John Harrison |
68239 | 3 |
Author: Robert Himmelmann, TU Muenchen (translation from HOL Light); tidied by LCP |
36350 | 4 |
*) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
5 |
|
68838 | 6 |
section \<open>Derivative\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
7 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
8 |
theory Derivative |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70614
diff
changeset
|
9 |
imports |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70614
diff
changeset
|
10 |
Bounded_Linear_Function |
71028
c2465b429e6e
Line_Segment is independent of Convex_Euclidean_Space
immler
parents:
71008
diff
changeset
|
11 |
Line_Segment |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
12 |
Convex_Euclidean_Space |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
13 |
begin |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
14 |
|
63938 | 15 |
declare bounded_linear_inner_left [intro] |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61907
diff
changeset
|
16 |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
17 |
declare has_derivative_bounded_linear[dest] |
44137 | 18 |
|
60420 | 19 |
subsection \<open>Derivatives\<close> |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
20 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
21 |
lemma has_derivative_add_const: |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
22 |
"(f has_derivative f') net \<Longrightarrow> ((\<lambda>x. f x + c) has_derivative f') net" |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
23 |
by (intro derivative_eq_intros) auto |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
24 |
|
53781 | 25 |
|
70136 | 26 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Derivative with composed bilinear function\<close> |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
27 |
|
60420 | 28 |
text \<open>More explicit epsilon-delta forms.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
29 |
|
68838 | 30 |
proposition has_derivative_within': |
53781 | 31 |
"(f has_derivative f')(at x within s) \<longleftrightarrow> |
32 |
bounded_linear f' \<and> |
|
33 |
(\<forall>e>0. \<exists>d>0. \<forall>x'\<in>s. 0 < norm (x' - x) \<and> norm (x' - x) < d \<longrightarrow> |
|
34 |
norm (f x' - f x - f'(x' - x)) / norm (x' - x) < e)" |
|
36587 | 35 |
unfolding has_derivative_within Lim_within dist_norm |
53781 | 36 |
by (simp add: diff_diff_eq) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
37 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
38 |
lemma has_derivative_at': |
68239 | 39 |
"(f has_derivative f') (at x) |
40 |
\<longleftrightarrow> bounded_linear f' \<and> |
|
41 |
(\<forall>e>0. \<exists>d>0. \<forall>x'. 0 < norm (x' - x) \<and> norm (x' - x) < d \<longrightarrow> |
|
42 |
norm (f x' - f x - f'(x' - x)) / norm (x' - x) < e)" |
|
43 |
using has_derivative_within' [of f f' x UNIV] by simp |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
44 |
|
70614 | 45 |
lemma has_derivative_componentwise_within: |
46 |
"(f has_derivative f') (at a within S) \<longleftrightarrow> |
|
47 |
(\<forall>i \<in> Basis. ((\<lambda>x. f x \<bullet> i) has_derivative (\<lambda>x. f' x \<bullet> i)) (at a within S))" |
|
48 |
apply (simp add: has_derivative_within) |
|
49 |
apply (subst tendsto_componentwise_iff) |
|
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
50 |
apply (simp add: ball_conj_distrib inner_diff_left inner_left_distrib flip: bounded_linear_componentwise_iff) |
70614 | 51 |
done |
52 |
||
67979
53323937ee25
new material about vec, real^1, etc.
paulson <lp15@cam.ac.uk>
parents:
67968
diff
changeset
|
53 |
lemma has_derivative_at_withinI: |
53781 | 54 |
"(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f') (at x within s)" |
55 |
unfolding has_derivative_within' has_derivative_at' |
|
56 |
by blast |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
57 |
|
43338 | 58 |
lemma has_derivative_right: |
53781 | 59 |
fixes f :: "real \<Rightarrow> real" |
60 |
and y :: "real" |
|
69064
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
nipkow
parents:
69020
diff
changeset
|
61 |
shows "(f has_derivative ((*) y)) (at x within ({x <..} \<inter> I)) \<longleftrightarrow> |
68239 | 62 |
((\<lambda>t. (f x - f t) / (x - t)) \<longlongrightarrow> y) (at x within ({x <..} \<inter> I))" |
43338 | 63 |
proof - |
61973 | 64 |
have "((\<lambda>t. (f t - (f x + y * (t - x))) / \<bar>t - x\<bar>) \<longlongrightarrow> 0) (at x within ({x<..} \<inter> I)) \<longleftrightarrow> |
65 |
((\<lambda>t. (f t - f x) / (t - x) - y) \<longlongrightarrow> 0) (at x within ({x<..} \<inter> I))" |
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
66 |
by (intro Lim_cong_within) (auto simp add: diff_divide_distrib add_divide_distrib) |
61973 | 67 |
also have "\<dots> \<longleftrightarrow> ((\<lambda>t. (f t - f x) / (t - x)) \<longlongrightarrow> y) (at x within ({x<..} \<inter> I))" |
43338 | 68 |
by (simp add: Lim_null[symmetric]) |
61973 | 69 |
also have "\<dots> \<longleftrightarrow> ((\<lambda>t. (f x - f t) / (x - t)) \<longlongrightarrow> y) (at x within ({x<..} \<inter> I))" |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
70 |
by (intro Lim_cong_within) (simp_all add: field_simps) |
43338 | 71 |
finally show ?thesis |
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
72 |
by (simp add: bounded_linear_mult_right has_derivative_within) |
43338 | 73 |
qed |
74 |
||
60420 | 75 |
subsubsection \<open>Caratheodory characterization\<close> |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
76 |
|
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
77 |
lemma DERIV_caratheodory_within: |
68095
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
78 |
"(f has_field_derivative l) (at x within S) \<longleftrightarrow> |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
79 |
(\<exists>g. (\<forall>z. f z - f x = g z * (z - x)) \<and> continuous (at x within S) g \<and> g x = l)" |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
80 |
(is "?lhs = ?rhs") |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
81 |
proof |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
82 |
assume ?lhs |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
83 |
show ?rhs |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
84 |
proof (intro exI conjI) |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
85 |
let ?g = "(%z. if z = x then l else (f z - f x) / (z-x))" |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
86 |
show "\<forall>z. f z - f x = ?g z * (z-x)" by simp |
68095
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
87 |
show "continuous (at x within S) ?g" using \<open>?lhs\<close> |
68239 | 88 |
by (auto simp add: continuous_within has_field_derivative_iff cong: Lim_cong_within) |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
89 |
show "?g x = l" by simp |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
90 |
qed |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
91 |
next |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
92 |
assume ?rhs |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
93 |
then obtain g where |
68095
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
94 |
"(\<forall>z. f z - f x = g z * (z-x))" and "continuous (at x within S) g" and "g x = l" by blast |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
95 |
thus ?lhs |
68239 | 96 |
by (auto simp add: continuous_within has_field_derivative_iff cong: Lim_cong_within) |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
97 |
qed |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
98 |
|
60420 | 99 |
subsection \<open>Differentiability\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
100 |
|
70136 | 101 |
definition\<^marker>\<open>tag important\<close> |
53781 | 102 |
differentiable_on :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a set \<Rightarrow> bool" |
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
79566
diff
changeset
|
103 |
(infix \<open>differentiable'_on\<close> 50) |
53781 | 104 |
where "f differentiable_on s \<longleftrightarrow> (\<forall>x\<in>s. f differentiable (at x within s))" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
105 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
106 |
lemma differentiableI: "(f has_derivative f') net \<Longrightarrow> f differentiable net" |
53781 | 107 |
unfolding differentiable_def |
108 |
by auto |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
109 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62408
diff
changeset
|
110 |
lemma differentiable_onD: "\<lbrakk>f differentiable_on S; x \<in> S\<rbrakk> \<Longrightarrow> f differentiable (at x within S)" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62408
diff
changeset
|
111 |
using differentiable_on_def by blast |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62408
diff
changeset
|
112 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
113 |
lemma differentiable_at_withinI: "f differentiable (at x) \<Longrightarrow> f differentiable (at x within s)" |
53781 | 114 |
unfolding differentiable_def |
67979
53323937ee25
new material about vec, real^1, etc.
paulson <lp15@cam.ac.uk>
parents:
67968
diff
changeset
|
115 |
using has_derivative_at_withinI |
53781 | 116 |
by blast |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
117 |
|
61104
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
118 |
lemma differentiable_at_imp_differentiable_on: |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
119 |
"(\<And>x. x \<in> s \<Longrightarrow> f differentiable at x) \<Longrightarrow> f differentiable_on s" |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
120 |
by (metis differentiable_at_withinI differentiable_on_def) |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
121 |
|
70136 | 122 |
corollary\<^marker>\<open>tag unimportant\<close> differentiable_iff_scaleR: |
61104
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
123 |
fixes f :: "real \<Rightarrow> 'a::real_normed_vector" |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
124 |
shows "f differentiable F \<longleftrightarrow> (\<exists>d. (f has_derivative (\<lambda>x. x *\<^sub>R d)) F)" |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
125 |
by (auto simp: differentiable_def dest: has_derivative_linear linear_imp_scaleR) |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
126 |
|
44123 | 127 |
lemma differentiable_on_eq_differentiable_at: |
53781 | 128 |
"open s \<Longrightarrow> f differentiable_on s \<longleftrightarrow> (\<forall>x\<in>s. f differentiable at x)" |
44123 | 129 |
unfolding differentiable_on_def |
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51478
diff
changeset
|
130 |
by (metis at_within_interior interior_open) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
131 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
132 |
lemma differentiable_transform_within: |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
61975
diff
changeset
|
133 |
assumes "f differentiable (at x within s)" |
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
61975
diff
changeset
|
134 |
and "0 < d" |
53781 | 135 |
and "x \<in> s" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
61975
diff
changeset
|
136 |
and "\<And>x'. \<lbrakk>x'\<in>s; dist x' x < d\<rbrakk> \<Longrightarrow> f x' = g x'" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
137 |
shows "g differentiable (at x within s)" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
61975
diff
changeset
|
138 |
using assms has_derivative_transform_within unfolding differentiable_def |
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
61975
diff
changeset
|
139 |
by blast |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
140 |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
141 |
lemma differentiable_on_ident [simp, derivative_intros]: "(\<lambda>x. x) differentiable_on S" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
142 |
by (simp add: differentiable_at_imp_differentiable_on) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
143 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
144 |
lemma differentiable_on_id [simp, derivative_intros]: "id differentiable_on S" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
145 |
by (simp add: id_def) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
146 |
|
63955 | 147 |
lemma differentiable_on_const [simp, derivative_intros]: "(\<lambda>z. c) differentiable_on S" |
148 |
by (simp add: differentiable_on_def) |
|
149 |
||
150 |
lemma differentiable_on_mult [simp, derivative_intros]: |
|
151 |
fixes f :: "'M::real_normed_vector \<Rightarrow> 'a::real_normed_algebra" |
|
152 |
shows "\<lbrakk>f differentiable_on S; g differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>z. f z * g z) differentiable_on S" |
|
68239 | 153 |
unfolding differentiable_on_def differentiable_def |
63955 | 154 |
using differentiable_def differentiable_mult by blast |
155 |
||
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
156 |
lemma differentiable_on_compose: |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
157 |
"\<lbrakk>g differentiable_on S; f differentiable_on (g ` S)\<rbrakk> \<Longrightarrow> (\<lambda>x. f (g x)) differentiable_on S" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
158 |
by (simp add: differentiable_in_compose differentiable_on_def) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
159 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
160 |
lemma bounded_linear_imp_differentiable_on: "bounded_linear f \<Longrightarrow> f differentiable_on S" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
161 |
by (simp add: differentiable_on_def bounded_linear_imp_differentiable) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
162 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
163 |
lemma linear_imp_differentiable_on: |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
164 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
165 |
shows "linear f \<Longrightarrow> f differentiable_on S" |
78475 | 166 |
by (simp add: differentiable_on_def linear_imp_differentiable) |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
167 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
168 |
lemma differentiable_on_minus [simp, derivative_intros]: |
78475 | 169 |
"f differentiable_on S \<Longrightarrow> (\<lambda>z. -(f z)) differentiable_on S" |
170 |
by (simp add: differentiable_on_def) |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
171 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
172 |
lemma differentiable_on_add [simp, derivative_intros]: |
78475 | 173 |
"\<lbrakk>f differentiable_on S; g differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>z. f z + g z) differentiable_on S" |
174 |
by (simp add: differentiable_on_def) |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
175 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
176 |
lemma differentiable_on_diff [simp, derivative_intros]: |
78475 | 177 |
"\<lbrakk>f differentiable_on S; g differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>z. f z - g z) differentiable_on S" |
178 |
by (simp add: differentiable_on_def) |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
179 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
180 |
lemma differentiable_on_inverse [simp, derivative_intros]: |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
181 |
fixes f :: "'a :: real_normed_vector \<Rightarrow> 'b :: real_normed_field" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
182 |
shows "f differentiable_on S \<Longrightarrow> (\<And>x. x \<in> S \<Longrightarrow> f x \<noteq> 0) \<Longrightarrow> (\<lambda>x. inverse (f x)) differentiable_on S" |
78475 | 183 |
by (simp add: differentiable_on_def) |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
184 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
185 |
lemma differentiable_on_scaleR [derivative_intros, simp]: |
78475 | 186 |
"\<lbrakk>f differentiable_on S; g differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>x. f x *\<^sub>R g x) differentiable_on S" |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
187 |
unfolding differentiable_on_def |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
188 |
by (blast intro: differentiable_scaleR) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
189 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
190 |
lemma has_derivative_sqnorm_at [derivative_intros, simp]: |
68239 | 191 |
"((\<lambda>x. (norm x)\<^sup>2) has_derivative (\<lambda>x. 2 *\<^sub>R (a \<bullet> x))) (at a)" |
192 |
using bounded_bilinear.FDERIV [of "(\<bullet>)" id id a _ id id] |
|
193 |
by (auto simp: inner_commute dot_square_norm bounded_bilinear_inner) |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
194 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
195 |
lemma differentiable_sqnorm_at [derivative_intros, simp]: |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
196 |
fixes a :: "'a :: {real_normed_vector,real_inner}" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
197 |
shows "(\<lambda>x. (norm x)\<^sup>2) differentiable (at a)" |
78475 | 198 |
by (force simp add: differentiable_def intro: has_derivative_sqnorm_at) |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
199 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
200 |
lemma differentiable_on_sqnorm [derivative_intros, simp]: |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
201 |
fixes S :: "'a :: {real_normed_vector,real_inner} set" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
202 |
shows "(\<lambda>x. (norm x)\<^sup>2) differentiable_on S" |
78475 | 203 |
by (simp add: differentiable_at_imp_differentiable_on) |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
204 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
205 |
lemma differentiable_norm_at [derivative_intros, simp]: |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
206 |
fixes a :: "'a :: {real_normed_vector,real_inner}" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
207 |
shows "a \<noteq> 0 \<Longrightarrow> norm differentiable (at a)" |
78475 | 208 |
using differentiableI has_derivative_norm by blast |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
209 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
210 |
lemma differentiable_on_norm [derivative_intros, simp]: |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
211 |
fixes S :: "'a :: {real_normed_vector,real_inner} set" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
212 |
shows "0 \<notin> S \<Longrightarrow> norm differentiable_on S" |
78475 | 213 |
by (metis differentiable_at_imp_differentiable_on differentiable_norm_at) |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
214 |
|
53781 | 215 |
|
60420 | 216 |
subsection \<open>Frechet derivative and Jacobian matrix\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
217 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
218 |
definition "frechet_derivative f net = (SOME f'. (f has_derivative f') net)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
219 |
|
68838 | 220 |
proposition frechet_derivative_works: |
53781 | 221 |
"f differentiable net \<longleftrightarrow> (f has_derivative (frechet_derivative f net)) net" |
222 |
unfolding frechet_derivative_def differentiable_def |
|
223 |
unfolding some_eq_ex[of "\<lambda> f' . (f has_derivative f') net"] .. |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
224 |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
225 |
lemma linear_frechet_derivative: "f differentiable net \<Longrightarrow> linear (frechet_derivative f net)" |
44123 | 226 |
unfolding frechet_derivative_works has_derivative_def |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
227 |
by (auto intro: bounded_linear.linear) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
228 |
|
70725
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
229 |
lemma frechet_derivative_const [simp]: "frechet_derivative (\<lambda>x. c) (at a) = (\<lambda>x. 0)" |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
230 |
using differentiable_const frechet_derivative_works has_derivative_const has_derivative_unique by blast |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
231 |
|
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
232 |
lemma frechet_derivative_id [simp]: "frechet_derivative id (at a) = id" |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
233 |
using differentiable_def frechet_derivative_works has_derivative_id has_derivative_unique by blast |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
234 |
|
70737 | 235 |
lemma frechet_derivative_ident [simp]: "frechet_derivative (\<lambda>x. x) (at a) = (\<lambda>x. x)" |
236 |
by (metis eq_id_iff frechet_derivative_id) |
|
237 |
||
53781 | 238 |
|
60420 | 239 |
subsection \<open>Differentiability implies continuity\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
240 |
|
68838 | 241 |
proposition differentiable_imp_continuous_within: |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
242 |
"f differentiable (at x within s) \<Longrightarrow> continuous (at x within s) f" |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
243 |
by (auto simp: differentiable_def intro: has_derivative_continuous) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
244 |
|
44123 | 245 |
lemma differentiable_imp_continuous_on: |
246 |
"f differentiable_on s \<Longrightarrow> continuous_on s f" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
247 |
unfolding differentiable_on_def continuous_on_eq_continuous_within |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
248 |
using differentiable_imp_continuous_within by blast |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
249 |
|
44123 | 250 |
lemma differentiable_on_subset: |
251 |
"f differentiable_on t \<Longrightarrow> s \<subseteq> t \<Longrightarrow> f differentiable_on s" |
|
53781 | 252 |
unfolding differentiable_on_def |
253 |
using differentiable_within_subset |
|
254 |
by blast |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
255 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
256 |
lemma differentiable_on_empty: "f differentiable_on {}" |
53781 | 257 |
unfolding differentiable_on_def |
258 |
by auto |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
259 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
260 |
lemma has_derivative_continuous_on: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
261 |
"(\<And>x. x \<in> s \<Longrightarrow> (f has_derivative f' x) (at x within s)) \<Longrightarrow> continuous_on s f" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
262 |
by (auto intro!: differentiable_imp_continuous_on differentiableI simp: differentiable_on_def) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
263 |
|
60420 | 264 |
text \<open>Results about neighborhoods filter.\<close> |
56151 | 265 |
|
266 |
lemma eventually_nhds_metric_le: |
|
267 |
"eventually P (nhds a) = (\<exists>d>0. \<forall>x. dist x a \<le> d \<longrightarrow> P x)" |
|
268 |
unfolding eventually_nhds_metric by (safe, rule_tac x="d / 2" in exI, auto) |
|
269 |
||
270 |
lemma le_nhds: "F \<le> nhds a \<longleftrightarrow> (\<forall>S. open S \<and> a \<in> S \<longrightarrow> eventually (\<lambda>x. x \<in> S) F)" |
|
61810 | 271 |
unfolding le_filter_def eventually_nhds by (fast elim: eventually_mono) |
56151 | 272 |
|
273 |
lemma le_nhds_metric: "F \<le> nhds a \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist x a < e) F)" |
|
61810 | 274 |
unfolding le_filter_def eventually_nhds_metric by (fast elim: eventually_mono) |
56151 | 275 |
|
276 |
lemma le_nhds_metric_le: "F \<le> nhds a \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist x a \<le> e) F)" |
|
61810 | 277 |
unfolding le_filter_def eventually_nhds_metric_le by (fast elim: eventually_mono) |
56151 | 278 |
|
60420 | 279 |
text \<open>Several results are easier using a "multiplied-out" variant. |
280 |
(I got this idea from Dieudonne's proof of the chain rule).\<close> |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
281 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
282 |
lemma has_derivative_within_alt: |
53781 | 283 |
"(f has_derivative f') (at x within s) \<longleftrightarrow> bounded_linear f' \<and> |
284 |
(\<forall>e>0. \<exists>d>0. \<forall>y\<in>s. norm(y - x) < d \<longrightarrow> norm (f y - f x - f' (y - x)) \<le> e * norm (y - x))" |
|
56151 | 285 |
unfolding has_derivative_within filterlim_def le_nhds_metric_le eventually_filtermap |
59815
cce82e360c2f
explicit commutative additive inverse operation;
haftmann
parents:
59558
diff
changeset
|
286 |
eventually_at dist_norm diff_diff_eq |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
287 |
by (force simp add: linear_0 bounded_linear.linear pos_divide_le_eq) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
288 |
|
56320 | 289 |
lemma has_derivative_within_alt2: |
290 |
"(f has_derivative f') (at x within s) \<longleftrightarrow> bounded_linear f' \<and> |
|
291 |
(\<forall>e>0. eventually (\<lambda>y. norm (f y - f x - f' (y - x)) \<le> e * norm (y - x)) (at x within s))" |
|
292 |
unfolding has_derivative_within filterlim_def le_nhds_metric_le eventually_filtermap |
|
59815
cce82e360c2f
explicit commutative additive inverse operation;
haftmann
parents:
59558
diff
changeset
|
293 |
eventually_at dist_norm diff_diff_eq |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
294 |
by (force simp add: linear_0 bounded_linear.linear pos_divide_le_eq) |
56320 | 295 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
296 |
lemma has_derivative_at_alt: |
53781 | 297 |
"(f has_derivative f') (at x) \<longleftrightarrow> |
298 |
bounded_linear f' \<and> |
|
299 |
(\<forall>e>0. \<exists>d>0. \<forall>y. norm(y - x) < d \<longrightarrow> norm (f y - f x - f'(y - x)) \<le> e * norm (y - x))" |
|
300 |
using has_derivative_within_alt[where s=UNIV] |
|
301 |
by simp |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
302 |
|
53781 | 303 |
|
60420 | 304 |
subsection \<open>The chain rule\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
305 |
|
68838 | 306 |
proposition diff_chain_within[derivative_intros]: |
44123 | 307 |
assumes "(f has_derivative f') (at x within s)" |
53781 | 308 |
and "(g has_derivative g') (at (f x) within (f ` s))" |
309 |
shows "((g \<circ> f) has_derivative (g' \<circ> f'))(at x within s)" |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
310 |
using has_derivative_in_compose[OF assms] |
53781 | 311 |
by (simp add: comp_def) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
312 |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
313 |
lemma diff_chain_at[derivative_intros]: |
53781 | 314 |
"(f has_derivative f') (at x) \<Longrightarrow> |
315 |
(g has_derivative g') (at (f x)) \<Longrightarrow> ((g \<circ> f) has_derivative (g' \<circ> f')) (at x)" |
|
77140
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
316 |
by (meson diff_chain_within has_derivative_at_withinI) |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
317 |
|
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
318 |
lemma has_vector_derivative_shift: "(f has_vector_derivative D x) (at x) |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
319 |
\<Longrightarrow> ((+) d \<circ> f has_vector_derivative D x) (at x)" |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
320 |
using diff_chain_at [OF _ shift_has_derivative_id] |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
321 |
by (simp add: has_derivative_iff_Ex has_vector_derivative_def) |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
322 |
|
68095
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
323 |
lemma has_vector_derivative_within_open: |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
324 |
"a \<in> S \<Longrightarrow> open S \<Longrightarrow> |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
325 |
(f has_vector_derivative f') (at a within S) \<longleftrightarrow> (f has_vector_derivative f') (at a)" |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
326 |
by (simp only: at_within_interior interior_open) |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
327 |
|
64394 | 328 |
lemma field_vector_diff_chain_within: |
68095
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
329 |
assumes Df: "(f has_vector_derivative f') (at x within S)" |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
330 |
and Dg: "(g has_field_derivative g') (at (f x) within f ` S)" |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
331 |
shows "((g \<circ> f) has_vector_derivative (f' * g')) (at x within S)" |
64394 | 332 |
using diff_chain_within[OF Df[unfolded has_vector_derivative_def] |
333 |
Dg [unfolded has_field_derivative_def]] |
|
334 |
by (auto simp: o_def mult.commute has_vector_derivative_def) |
|
335 |
||
336 |
lemma vector_derivative_diff_chain_within: |
|
68095
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
337 |
assumes Df: "(f has_vector_derivative f') (at x within S)" |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
338 |
and Dg: "(g has_derivative g') (at (f x) within f`S)" |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
339 |
shows "((g \<circ> f) has_vector_derivative (g' f')) (at x within S)" |
64394 | 340 |
using diff_chain_within[OF Df[unfolded has_vector_derivative_def] Dg] |
341 |
linear.scaleR[OF has_derivative_linear[OF Dg]] |
|
342 |
unfolding has_vector_derivative_def o_def |
|
343 |
by (auto simp: o_def mult.commute has_vector_derivative_def) |
|
344 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
345 |
|
70136 | 346 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Composition rules stated just for differentiability\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
347 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
348 |
lemma differentiable_chain_at: |
53781 | 349 |
"f differentiable (at x) \<Longrightarrow> |
350 |
g differentiable (at (f x)) \<Longrightarrow> (g \<circ> f) differentiable (at x)" |
|
351 |
unfolding differentiable_def |
|
352 |
by (meson diff_chain_at) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
353 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
354 |
lemma differentiable_chain_within: |
68095
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
355 |
"f differentiable (at x within S) \<Longrightarrow> |
4fa3e63ecc7e
starting to tidy up Interval_Integral.thy
paulson <lp15@cam.ac.uk>
parents:
68073
diff
changeset
|
356 |
g differentiable (at(f x) within (f ` S)) \<Longrightarrow> (g \<circ> f) differentiable (at x within S)" |
53781 | 357 |
unfolding differentiable_def |
358 |
by (meson diff_chain_within) |
|
359 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
360 |
|
60420 | 361 |
subsection \<open>Uniqueness of derivative\<close> |
37730 | 362 |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
363 |
|
70136 | 364 |
text\<^marker>\<open>tag important\<close> \<open> |
37730 | 365 |
The general result is a bit messy because we need approachability of the |
366 |
limit point from any direction. But OK for nontrivial intervals etc. |
|
60420 | 367 |
\<close> |
51363
d4d00c804645
changed has_derivative_intros into a named theorems collection
hoelzl
parents:
50939
diff
changeset
|
368 |
|
68838 | 369 |
proposition frechet_derivative_unique_within: |
44123 | 370 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
68239 | 371 |
assumes 1: "(f has_derivative f') (at x within S)" |
372 |
and 2: "(f has_derivative f'') (at x within S)" |
|
373 |
and S: "\<And>i e. \<lbrakk>i\<in>Basis; e>0\<rbrakk> \<Longrightarrow> \<exists>d. 0 < \<bar>d\<bar> \<and> \<bar>d\<bar> < e \<and> (x + d *\<^sub>R i) \<in> S" |
|
44123 | 374 |
shows "f' = f''" |
53781 | 375 |
proof - |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
376 |
note as = assms(1,2)[unfolded has_derivative_def] |
44123 | 377 |
then interpret f': bounded_linear f' by auto |
378 |
from as interpret f'': bounded_linear f'' by auto |
|
68058 | 379 |
have "x islimpt S" unfolding islimpt_approachable |
68239 | 380 |
proof (intro allI impI) |
53781 | 381 |
fix e :: real |
382 |
assume "e > 0" |
|
68058 | 383 |
obtain d where "0 < \<bar>d\<bar>" and "\<bar>d\<bar> < e" and "x + d *\<^sub>R (SOME i. i \<in> Basis) \<in> S" |
60420 | 384 |
using assms(3) SOME_Basis \<open>e>0\<close> by blast |
68058 | 385 |
then show "\<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e" |
68239 | 386 |
by (rule_tac x="x + d *\<^sub>R (SOME i. i \<in> Basis)" in bexI) (auto simp: dist_norm SOME_Basis nonzero_Basis) qed |
68058 | 387 |
then have *: "netlimit (at x within S) = x" |
68239 | 388 |
by (simp add: Lim_ident_at trivial_limit_within) |
53781 | 389 |
show ?thesis |
68058 | 390 |
proof (rule linear_eq_stdbasis) |
391 |
show "linear f'" "linear f''" |
|
392 |
unfolding linear_conv_bounded_linear using as by auto |
|
393 |
next |
|
53781 | 394 |
fix i :: 'a |
395 |
assume i: "i \<in> Basis" |
|
63040 | 396 |
define e where "e = norm (f' i - f'' i)" |
68058 | 397 |
show "f' i = f'' i" |
398 |
proof (rule ccontr) |
|
399 |
assume "f' i \<noteq> f'' i" |
|
400 |
then have "e > 0" |
|
401 |
unfolding e_def by auto |
|
402 |
obtain d where d: |
|
403 |
"0 < d" |
|
404 |
"(\<And>y. y\<in>S \<longrightarrow> 0 < dist y x \<and> dist y x < d \<longrightarrow> |
|
405 |
dist ((f y - f x - f' (y - x)) /\<^sub>R norm (y - x) - |
|
406 |
(f y - f x - f'' (y - x)) /\<^sub>R norm (y - x)) (0 - 0) < e)" |
|
407 |
using tendsto_diff [OF as(1,2)[THEN conjunct2]] |
|
408 |
unfolding * Lim_within |
|
409 |
using \<open>e>0\<close> by blast |
|
410 |
obtain c where c: "0 < \<bar>c\<bar>" "\<bar>c\<bar> < d \<and> x + c *\<^sub>R i \<in> S" |
|
411 |
using assms(3) i d(1) by blast |
|
412 |
have *: "norm (- ((1 / \<bar>c\<bar>) *\<^sub>R f' (c *\<^sub>R i)) + (1 / \<bar>c\<bar>) *\<^sub>R f'' (c *\<^sub>R i)) = |
|
61945 | 413 |
norm ((1 / \<bar>c\<bar>) *\<^sub>R (- (f' (c *\<^sub>R i)) + f'' (c *\<^sub>R i)))" |
68058 | 414 |
unfolding scaleR_right_distrib by auto |
415 |
also have "\<dots> = norm ((1 / \<bar>c\<bar>) *\<^sub>R (c *\<^sub>R (- (f' i) + f'' i)))" |
|
416 |
unfolding f'.scaleR f''.scaleR |
|
417 |
unfolding scaleR_right_distrib scaleR_minus_right |
|
418 |
by auto |
|
419 |
also have "\<dots> = e" |
|
420 |
unfolding e_def |
|
421 |
using c(1) |
|
422 |
using norm_minus_cancel[of "f' i - f'' i"] |
|
423 |
by auto |
|
424 |
finally show False |
|
425 |
using c |
|
426 |
using d(2)[of "x + c *\<^sub>R i"] |
|
427 |
unfolding dist_norm |
|
428 |
unfolding f'.scaleR f''.scaleR f'.add f''.add f'.diff f''.diff |
|
429 |
scaleR_scaleR scaleR_right_diff_distrib scaleR_right_distrib |
|
430 |
using i |
|
431 |
by (auto simp: inverse_eq_divide) |
|
432 |
qed |
|
44123 | 433 |
qed |
434 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
435 |
|
68838 | 436 |
proposition frechet_derivative_unique_within_closed_interval: |
56188 | 437 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
68239 | 438 |
assumes ab: "\<And>i. i\<in>Basis \<Longrightarrow> a\<bullet>i < b\<bullet>i" |
439 |
and x: "x \<in> cbox a b" |
|
56188 | 440 |
and "(f has_derivative f' ) (at x within cbox a b)" |
441 |
and "(f has_derivative f'') (at x within cbox a b)" |
|
44123 | 442 |
shows "f' = f''" |
68239 | 443 |
proof (rule frechet_derivative_unique_within) |
53781 | 444 |
fix e :: real |
445 |
fix i :: 'a |
|
446 |
assume "e > 0" and i: "i \<in> Basis" |
|
56188 | 447 |
then show "\<exists>d. 0 < \<bar>d\<bar> \<and> \<bar>d\<bar> < e \<and> x + d *\<^sub>R i \<in> cbox a b" |
53781 | 448 |
proof (cases "x\<bullet>i = a\<bullet>i") |
449 |
case True |
|
68239 | 450 |
with ab[of i] \<open>e>0\<close> x i show ?thesis |
451 |
by (rule_tac x="(min (b\<bullet>i - a\<bullet>i) e) / 2" in exI) |
|
452 |
(auto simp add: mem_box field_simps inner_simps inner_Basis) |
|
53781 | 453 |
next |
454 |
case False |
|
455 |
moreover have "a \<bullet> i < x \<bullet> i" |
|
68239 | 456 |
using False i mem_box(2) x by force |
44123 | 457 |
moreover { |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
458 |
have "a \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e \<le> a\<bullet>i *2 + x\<bullet>i - a\<bullet>i" |
44123 | 459 |
by auto |
53781 | 460 |
also have "\<dots> = a\<bullet>i + x\<bullet>i" |
461 |
by auto |
|
462 |
also have "\<dots> \<le> 2 * (x\<bullet>i)" |
|
68239 | 463 |
using \<open>a \<bullet> i < x \<bullet> i\<close> by auto |
53781 | 464 |
finally have "a \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e \<le> x \<bullet> i * 2" |
465 |
by auto |
|
44123 | 466 |
} |
53781 | 467 |
moreover have "min (x \<bullet> i - a \<bullet> i) e \<ge> 0" |
68239 | 468 |
by (simp add: \<open>0 < e\<close> \<open>a \<bullet> i < x \<bullet> i\<close> less_eq_real_def) |
53781 | 469 |
then have "x \<bullet> i * 2 \<le> b \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e" |
68239 | 470 |
using i mem_box(2) x by force |
44123 | 471 |
ultimately show ?thesis |
68239 | 472 |
using ab[of i] \<open>e>0\<close> x i |
473 |
by (rule_tac x="- (min (x\<bullet>i - a\<bullet>i) e) / 2" in exI) |
|
474 |
(auto simp add: mem_box field_simps inner_simps inner_Basis) |
|
44123 | 475 |
qed |
68239 | 476 |
qed (use assms in auto) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
477 |
|
44123 | 478 |
lemma frechet_derivative_unique_within_open_interval: |
56188 | 479 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
68239 | 480 |
assumes x: "x \<in> box a b" |
481 |
and f: "(f has_derivative f' ) (at x within box a b)" "(f has_derivative f'') (at x within box a b)" |
|
37650 | 482 |
shows "f' = f''" |
78475 | 483 |
by (metis at_within_open assms has_derivative_unique open_box) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
484 |
|
37730 | 485 |
lemma frechet_derivative_at: |
53781 | 486 |
"(f has_derivative f') (at x) \<Longrightarrow> f' = frechet_derivative f (at x)" |
68239 | 487 |
using differentiable_def frechet_derivative_works has_derivative_unique by blast |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
488 |
|
70725
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
489 |
lemma frechet_derivative_compose: |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
490 |
"frechet_derivative (f o g) (at x) = frechet_derivative (f) (at (g x)) o frechet_derivative g (at x)" |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
491 |
if "g differentiable at x" "f differentiable at (g x)" |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
492 |
by (metis diff_chain_at frechet_derivative_at frechet_derivative_works that) |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
493 |
|
56188 | 494 |
lemma frechet_derivative_within_cbox: |
495 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
68239 | 496 |
assumes "\<And>i. i\<in>Basis \<Longrightarrow> a\<bullet>i < b\<bullet>i" |
56188 | 497 |
and "x \<in> cbox a b" |
498 |
and "(f has_derivative f') (at x within cbox a b)" |
|
499 |
shows "frechet_derivative f (at x within cbox a b) = f'" |
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
500 |
using assms |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
501 |
by (metis Derivative.differentiableI frechet_derivative_unique_within_closed_interval frechet_derivative_works) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
502 |
|
70725
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
503 |
lemma frechet_derivative_transform_within_open: |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
504 |
"frechet_derivative f (at x) = frechet_derivative g (at x)" |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
505 |
if "f differentiable at x" "open X" "x \<in> X" "\<And>x. x \<in> X \<Longrightarrow> f x = g x" |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
506 |
by (meson frechet_derivative_at frechet_derivative_works has_derivative_transform_within_open that) |
e19c18b4a0dd
Four new results from Smooth_Manifolds/Analysis_More
paulson <lp15@cam.ac.uk>
parents:
70641
diff
changeset
|
507 |
|
53781 | 508 |
|
69631 | 509 |
subsection \<open>Derivatives of local minima and maxima are zero\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
510 |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
511 |
lemma has_derivative_local_min: |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
512 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
513 |
assumes deriv: "(f has_derivative f') (at x)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
514 |
assumes min: "eventually (\<lambda>y. f x \<le> f y) (at x)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
515 |
shows "f' = (\<lambda>h. 0)" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
516 |
proof |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
517 |
fix h :: 'a |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
518 |
interpret f': bounded_linear f' |
56182
528fae0816ea
update syntax of has_*derivative to infix 50; fixed proofs
hoelzl
parents:
56181
diff
changeset
|
519 |
using deriv by (rule has_derivative_bounded_linear) |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
520 |
show "f' h = 0" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
521 |
proof (cases "h = 0") |
68239 | 522 |
case False |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
523 |
from min obtain d where d1: "0 < d" and d2: "\<forall>y\<in>ball x d. f x \<le> f y" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
524 |
unfolding eventually_at by (force simp: dist_commute) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
525 |
have "FDERIV (\<lambda>r. x + r *\<^sub>R h) 0 :> (\<lambda>r. r *\<^sub>R h)" |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
526 |
by (intro derivative_eq_intros) auto |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
527 |
then have "FDERIV (\<lambda>r. f (x + r *\<^sub>R h)) 0 :> (\<lambda>k. f' (k *\<^sub>R h))" |
56182
528fae0816ea
update syntax of has_*derivative to infix 50; fixed proofs
hoelzl
parents:
56181
diff
changeset
|
528 |
by (rule has_derivative_compose, simp add: deriv) |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
529 |
then have "DERIV (\<lambda>r. f (x + r *\<^sub>R h)) 0 :> f' h" |
56182
528fae0816ea
update syntax of has_*derivative to infix 50; fixed proofs
hoelzl
parents:
56181
diff
changeset
|
530 |
unfolding has_field_derivative_def by (simp add: f'.scaleR mult_commute_abs) |
60420 | 531 |
moreover have "0 < d / norm h" using d1 and \<open>h \<noteq> 0\<close> by simp |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
532 |
moreover have "\<forall>y. \<bar>0 - y\<bar> < d / norm h \<longrightarrow> f (x + 0 *\<^sub>R h) \<le> f (x + y *\<^sub>R h)" |
60420 | 533 |
using \<open>h \<noteq> 0\<close> by (auto simp add: d2 dist_norm pos_less_divide_eq) |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
534 |
ultimately show "f' h = 0" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
535 |
by (rule DERIV_local_min) |
68239 | 536 |
qed simp |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
537 |
qed |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
538 |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
539 |
lemma has_derivative_local_max: |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
540 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
541 |
assumes "(f has_derivative f') (at x)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
542 |
assumes "eventually (\<lambda>y. f y \<le> f x) (at x)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
543 |
shows "f' = (\<lambda>h. 0)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
544 |
using has_derivative_local_min [of "\<lambda>x. - f x" "\<lambda>h. - f' h" "x"] |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
545 |
using assms unfolding fun_eq_iff by simp |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
546 |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
547 |
lemma differential_zero_maxmin: |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
548 |
fixes f::"'a::real_normed_vector \<Rightarrow> real" |
68239 | 549 |
assumes "x \<in> S" |
550 |
and "open S" |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
551 |
and deriv: "(f has_derivative f') (at x)" |
68239 | 552 |
and mono: "(\<forall>y\<in>S. f y \<le> f x) \<or> (\<forall>y\<in>S. f x \<le> f y)" |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
553 |
shows "f' = (\<lambda>v. 0)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
554 |
using mono |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
555 |
proof |
68239 | 556 |
assume "\<forall>y\<in>S. f y \<le> f x" |
557 |
with \<open>x \<in> S\<close> and \<open>open S\<close> have "eventually (\<lambda>y. f y \<le> f x) (at x)" |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
558 |
unfolding eventually_at_topological by auto |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
559 |
with deriv show ?thesis |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
560 |
by (rule has_derivative_local_max) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
561 |
next |
68239 | 562 |
assume "\<forall>y\<in>S. f x \<le> f y" |
563 |
with \<open>x \<in> S\<close> and \<open>open S\<close> have "eventually (\<lambda>y. f x \<le> f y) (at x)" |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
564 |
unfolding eventually_at_topological by auto |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
565 |
with deriv show ?thesis |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
566 |
by (rule has_derivative_local_min) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
567 |
qed |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
568 |
|
69020
4f94e262976d
elimination of near duplication involving Rolle's theorem and the MVT
paulson <lp15@cam.ac.uk>
parents:
68838
diff
changeset
|
569 |
lemma differential_zero_maxmin_component: |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
570 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
571 |
assumes k: "k \<in> Basis" |
53781 | 572 |
and ball: "0 < e" "(\<forall>y \<in> ball x e. (f y)\<bullet>k \<le> (f x)\<bullet>k) \<or> (\<forall>y\<in>ball x e. (f x)\<bullet>k \<le> (f y)\<bullet>k)" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
573 |
and diff: "f differentiable (at x)" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
574 |
shows "(\<Sum>j\<in>Basis. (frechet_derivative f (at x) j \<bullet> k) *\<^sub>R j) = (0::'a)" (is "?D k = 0") |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
575 |
proof - |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
576 |
let ?f' = "frechet_derivative f (at x)" |
60420 | 577 |
have "x \<in> ball x e" using \<open>0 < e\<close> by simp |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
578 |
moreover have "open (ball x e)" by simp |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
579 |
moreover have "((\<lambda>x. f x \<bullet> k) has_derivative (\<lambda>h. ?f' h \<bullet> k)) (at x)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
580 |
using bounded_linear_inner_left diff[unfolded frechet_derivative_works] |
56182
528fae0816ea
update syntax of has_*derivative to infix 50; fixed proofs
hoelzl
parents:
56181
diff
changeset
|
581 |
by (rule bounded_linear.has_derivative) |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
582 |
ultimately have "(\<lambda>h. frechet_derivative f (at x) h \<bullet> k) = (\<lambda>v. 0)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
583 |
using ball(2) by (rule differential_zero_maxmin) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
584 |
then show ?thesis |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
585 |
unfolding fun_eq_iff by simp |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
586 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
587 |
|
60420 | 588 |
subsection \<open>One-dimensional mean value theorem\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
589 |
|
44123 | 590 |
lemma mvt_simple: |
53781 | 591 |
fixes f :: "real \<Rightarrow> real" |
592 |
assumes "a < b" |
|
68241
39a311f50344
correcting the statements of the MVTs
paulson <lp15@cam.ac.uk>
parents:
68239
diff
changeset
|
593 |
and derf: "\<And>x. \<lbrakk>a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> (f has_derivative f' x) (at x within {a..b})" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
594 |
shows "\<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)" |
56264 | 595 |
proof (rule mvt) |
596 |
have "f differentiable_on {a..b}" |
|
68241
39a311f50344
correcting the statements of the MVTs
paulson <lp15@cam.ac.uk>
parents:
68239
diff
changeset
|
597 |
using derf unfolding differentiable_on_def differentiable_def by force |
56264 | 598 |
then show "continuous_on {a..b} f" |
599 |
by (rule differentiable_imp_continuous_on) |
|
68239 | 600 |
show "(f has_derivative f' x) (at x)" if "a < x" "x < b" for x |
68241
39a311f50344
correcting the statements of the MVTs
paulson <lp15@cam.ac.uk>
parents:
68239
diff
changeset
|
601 |
by (metis at_within_Icc_at derf leI order.asym that) |
69020
4f94e262976d
elimination of near duplication involving Rolle's theorem and the MVT
paulson <lp15@cam.ac.uk>
parents:
68838
diff
changeset
|
602 |
qed (use assms in auto) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
603 |
|
44123 | 604 |
lemma mvt_very_simple: |
53781 | 605 |
fixes f :: "real \<Rightarrow> real" |
606 |
assumes "a \<le> b" |
|
68241
39a311f50344
correcting the statements of the MVTs
paulson <lp15@cam.ac.uk>
parents:
68239
diff
changeset
|
607 |
and derf: "\<And>x. \<lbrakk>a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> (f has_derivative f' x) (at x within {a..b})" |
68239 | 608 |
shows "\<exists>x\<in>{a..b}. f b - f a = f' x (b - a)" |
44123 | 609 |
proof (cases "a = b") |
53781 | 610 |
interpret bounded_linear "f' b" |
78475 | 611 |
using assms by auto |
53781 | 612 |
case True |
613 |
then show ?thesis |
|
68239 | 614 |
by force |
53781 | 615 |
next |
616 |
case False |
|
617 |
then show ?thesis |
|
68239 | 618 |
using mvt_simple[OF _ derf] |
619 |
by (metis \<open>a \<le> b\<close> atLeastAtMost_iff dual_order.order_iff_strict greaterThanLessThan_iff) |
|
44123 | 620 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
621 |
|
60420 | 622 |
text \<open>A nice generalization (see Havin's proof of 5.19 from Rudin's book).\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
623 |
|
44123 | 624 |
lemma mvt_general: |
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
625 |
fixes f :: "real \<Rightarrow> 'a::real_inner" |
53781 | 626 |
assumes "a < b" |
68239 | 627 |
and contf: "continuous_on {a..b} f" |
628 |
and derf: "\<And>x. \<lbrakk>a < x; x < b\<rbrakk> \<Longrightarrow> (f has_derivative f' x) (at x)" |
|
53781 | 629 |
shows "\<exists>x\<in>{a<..<b}. norm (f b - f a) \<le> norm (f' x (b - a))" |
630 |
proof - |
|
56264 | 631 |
have "\<exists>x\<in>{a<..<b}. (f b - f a) \<bullet> f b - (f b - f a) \<bullet> f a = (f b - f a) \<bullet> f' x (b - a)" |
69020
4f94e262976d
elimination of near duplication involving Rolle's theorem and the MVT
paulson <lp15@cam.ac.uk>
parents:
68838
diff
changeset
|
632 |
apply (rule mvt [OF \<open>a < b\<close>, where f = "\<lambda>x. (f b - f a) \<bullet> f x"]) |
68239 | 633 |
apply (intro continuous_intros contf) |
69020
4f94e262976d
elimination of near duplication involving Rolle's theorem and the MVT
paulson <lp15@cam.ac.uk>
parents:
68838
diff
changeset
|
634 |
using derf apply (auto intro: has_derivative_inner_right) |
53781 | 635 |
done |
68239 | 636 |
then obtain x where x: "x \<in> {a<..<b}" |
56264 | 637 |
"(f b - f a) \<bullet> f b - (f b - f a) \<bullet> f a = (f b - f a) \<bullet> f' x (b - a)" .. |
53781 | 638 |
show ?thesis |
639 |
proof (cases "f a = f b") |
|
36844 | 640 |
case False |
53077 | 641 |
have "norm (f b - f a) * norm (f b - f a) = (norm (f b - f a))\<^sup>2" |
44123 | 642 |
by (simp add: power2_eq_square) |
53781 | 643 |
also have "\<dots> = (f b - f a) \<bullet> (f b - f a)" |
644 |
unfolding power2_norm_eq_inner .. |
|
44123 | 645 |
also have "\<dots> = (f b - f a) \<bullet> f' x (b - a)" |
56264 | 646 |
using x(2) by (simp only: inner_diff_right) |
44123 | 647 |
also have "\<dots> \<le> norm (f b - f a) * norm (f' x (b - a))" |
648 |
by (rule norm_cauchy_schwarz) |
|
53781 | 649 |
finally show ?thesis |
650 |
using False x(1) |
|
56217
dc429a5b13c4
Some rationalisation of basic lemmas
paulson <lp15@cam.ac.uk>
parents:
56196
diff
changeset
|
651 |
by (auto simp add: mult_left_cancel) |
44123 | 652 |
next |
53781 | 653 |
case True |
654 |
then show ?thesis |
|
68239 | 655 |
using \<open>a < b\<close> by (rule_tac x="(a + b) /2" in bexI) auto |
44123 | 656 |
qed |
657 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
658 |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
659 |
|
60420 | 660 |
subsection \<open>More general bound theorems\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
661 |
|
68239 | 662 |
proposition differentiable_bound_general: |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
663 |
fixes f :: "real \<Rightarrow> 'a::real_normed_vector" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
664 |
assumes "a < b" |
68239 | 665 |
and f_cont: "continuous_on {a..b} f" |
666 |
and phi_cont: "continuous_on {a..b} \<phi>" |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
667 |
and f': "\<And>x. a < x \<Longrightarrow> x < b \<Longrightarrow> (f has_vector_derivative f' x) (at x)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
668 |
and phi': "\<And>x. a < x \<Longrightarrow> x < b \<Longrightarrow> (\<phi> has_vector_derivative \<phi>' x) (at x)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
669 |
and bnd: "\<And>x. a < x \<Longrightarrow> x < b \<Longrightarrow> norm (f' x) \<le> \<phi>' x" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
670 |
shows "norm (f b - f a) \<le> \<phi> b - \<phi> a" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
671 |
proof - |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
672 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
673 |
fix x assume x: "a < x" "x < b" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
674 |
have "0 \<le> norm (f' x)" by simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
675 |
also have "\<dots> \<le> \<phi>' x" using x by (auto intro!: bnd) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
676 |
finally have "0 \<le> \<phi>' x" . |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
677 |
} note phi'_nonneg = this |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
678 |
note f_tendsto = assms(2)[simplified continuous_on_def, rule_format] |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
679 |
note phi_tendsto = assms(3)[simplified continuous_on_def, rule_format] |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
680 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
681 |
fix e::real assume "e > 0" |
63040 | 682 |
define e2 where "e2 = e / 2" |
683 |
with \<open>e > 0\<close> have "e2 > 0" by simp |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
684 |
let ?le = "\<lambda>x1. norm (f x1 - f a) \<le> \<phi> x1 - \<phi> a + e * (x1 - a) + e" |
63040 | 685 |
define A where "A = {x2. a \<le> x2 \<and> x2 \<le> b \<and> (\<forall>x1\<in>{a ..< x2}. ?le x1)}" |
68239 | 686 |
have A_subset: "A \<subseteq> {a..b}" by (auto simp: A_def) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
687 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
688 |
fix x2 |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
689 |
assume a: "a \<le> x2" "x2 \<le> b" and le: "\<forall>x1\<in>{a..<x2}. ?le x1" |
60420 | 690 |
have "?le x2" using \<open>e > 0\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
691 |
proof cases |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
692 |
assume "x2 \<noteq> a" with a have "a < x2" by simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
693 |
have "at x2 within {a <..<x2}\<noteq> bot" |
60420 | 694 |
using \<open>a < x2\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
695 |
by (auto simp: trivial_limit_within islimpt_in_closure) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
696 |
moreover |
61973 | 697 |
have "((\<lambda>x1. (\<phi> x1 - \<phi> a) + e * (x1 - a) + e) \<longlongrightarrow> (\<phi> x2 - \<phi> a) + e * (x2 - a) + e) (at x2 within {a <..<x2})" |
698 |
"((\<lambda>x1. norm (f x1 - f a)) \<longlongrightarrow> norm (f x2 - f a)) (at x2 within {a <..<x2})" |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
699 |
using a |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
700 |
by (auto intro!: tendsto_eq_intros f_tendsto phi_tendsto |
68239 | 701 |
intro: tendsto_within_subset[where S="{a..b}"]) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
702 |
moreover |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
703 |
have "eventually (\<lambda>x. x > a) (at x2 within {a <..<x2})" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
704 |
by (auto simp: eventually_at_filter) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
705 |
hence "eventually ?le (at x2 within {a <..<x2})" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
706 |
unfolding eventually_at_filter |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
707 |
by eventually_elim (insert le, auto) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
708 |
ultimately |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
709 |
show ?thesis |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
710 |
by (rule tendsto_le) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
711 |
qed simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
712 |
} note le_cont = this |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
713 |
have "a \<in> A" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
714 |
using assms by (auto simp: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
715 |
hence [simp]: "A \<noteq> {}" by auto |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
716 |
have A_ivl: "\<And>x1 x2. x2 \<in> A \<Longrightarrow> x1 \<in> {a ..x2} \<Longrightarrow> x1 \<in> A" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
717 |
by (simp add: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
718 |
have [simp]: "bdd_above A" by (auto simp: A_def) |
63040 | 719 |
define y where "y = Sup A" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
720 |
have "y \<le> b" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
721 |
unfolding y_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
722 |
by (simp add: cSup_le_iff) (simp add: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
723 |
have leI: "\<And>x x1. a \<le> x1 \<Longrightarrow> x \<in> A \<Longrightarrow> x1 < x \<Longrightarrow> ?le x1" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
724 |
by (auto simp: A_def intro!: le_cont) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
725 |
have y_all_le: "\<forall>x1\<in>{a..<y}. ?le x1" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
726 |
by (auto simp: y_def less_cSup_iff leI) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
727 |
have "a \<le> y" |
60420 | 728 |
by (metis \<open>a \<in> A\<close> \<open>bdd_above A\<close> cSup_upper y_def) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
729 |
have "y \<in> A" |
60420 | 730 |
using y_all_le \<open>a \<le> y\<close> \<open>y \<le> b\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
731 |
by (auto simp: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
732 |
hence "A = {a .. y}" |
68239 | 733 |
using A_subset by (auto simp: subset_iff y_def cSup_upper intro: A_ivl) |
60420 | 734 |
from le_cont[OF \<open>a \<le> y\<close> \<open>y \<le> b\<close> y_all_le] have le_y: "?le y" . |
68239 | 735 |
have "y = b" |
736 |
proof (cases "a = y") |
|
737 |
case True |
|
60420 | 738 |
with \<open>a < b\<close> have "y < b" by simp |
739 |
with \<open>a = y\<close> f_cont phi_cont \<open>e2 > 0\<close> |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
740 |
have 1: "\<forall>\<^sub>F x in at y within {y..b}. dist (f x) (f y) < e2" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
741 |
and 2: "\<forall>\<^sub>F x in at y within {y..b}. dist (\<phi> x) (\<phi> y) < e2" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
742 |
by (auto simp: continuous_on_def tendsto_iff) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
743 |
have 3: "eventually (\<lambda>x. y < x) (at y within {y..b})" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
744 |
by (auto simp: eventually_at_filter) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
745 |
have 4: "eventually (\<lambda>x::real. x < b) (at y within {y..b})" |
60420 | 746 |
using _ \<open>y < b\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
747 |
by (rule order_tendstoD) (auto intro!: tendsto_eq_intros) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
748 |
from 1 2 3 4 |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
749 |
have eventually_le: "eventually (\<lambda>x. ?le x) (at y within {y .. b})" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
750 |
proof eventually_elim |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
751 |
case (elim x1) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
752 |
have "norm (f x1 - f a) = norm (f x1 - f y)" |
60420 | 753 |
by (simp add: \<open>a = y\<close>) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
754 |
also have "norm (f x1 - f y) \<le> e2" |
60420 | 755 |
using elim \<open>a = y\<close> by (auto simp : dist_norm intro!: less_imp_le) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
756 |
also have "\<dots> \<le> e2 + (\<phi> x1 - \<phi> a + e2 + e * (x1 - a))" |
60420 | 757 |
using \<open>0 < e\<close> elim |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
758 |
by (intro add_increasing2[OF add_nonneg_nonneg order.refl]) |
60420 | 759 |
(auto simp: \<open>a = y\<close> dist_norm intro!: mult_nonneg_nonneg) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
760 |
also have "\<dots> = \<phi> x1 - \<phi> a + e * (x1 - a) + e" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
761 |
by (simp add: e2_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
762 |
finally show "?le x1" . |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
763 |
qed |
60420 | 764 |
from this[unfolded eventually_at_topological] \<open>?le y\<close> |
68239 | 765 |
obtain S where S: "open S" "y \<in> S" "\<And>x. x\<in>S \<Longrightarrow> x \<in> {y..b} \<Longrightarrow> ?le x" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
766 |
by metis |
60420 | 767 |
from \<open>open S\<close> obtain d where d: "\<And>x. dist x y < d \<Longrightarrow> x \<in> S" "d > 0" |
62101 | 768 |
by (force simp: dist_commute open_dist ball_def dest!: bspec[OF _ \<open>y \<in> S\<close>]) |
63040 | 769 |
define d' where "d' = min b (y + (d/2))" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
770 |
have "d' \<in> A" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
771 |
unfolding A_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
772 |
proof safe |
60420 | 773 |
show "a \<le> d'" using \<open>a = y\<close> \<open>0 < d\<close> \<open>y < b\<close> by (simp add: d'_def) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
774 |
show "d' \<le> b" by (simp add: d'_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
775 |
fix x1 |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
776 |
assume "x1 \<in> {a..<d'}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
777 |
hence "x1 \<in> S" "x1 \<in> {y..b}" |
60420 | 778 |
by (auto simp: \<open>a = y\<close> d'_def dist_real_def intro!: d ) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
779 |
thus "?le x1" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
780 |
by (rule S) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
781 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
782 |
hence "d' \<le> y" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
783 |
unfolding y_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
784 |
by (rule cSup_upper) simp |
68239 | 785 |
then show "y = b" using \<open>d > 0\<close> \<open>y < b\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
786 |
by (simp add: d'_def) |
68239 | 787 |
next |
788 |
case False |
|
789 |
with \<open>a \<le> y\<close> have "a < y" by simp |
|
790 |
show "y = b" |
|
791 |
proof (rule ccontr) |
|
792 |
assume "y \<noteq> b" |
|
793 |
hence "y < b" using \<open>y \<le> b\<close> by simp |
|
794 |
let ?F = "at y within {y..<b}" |
|
795 |
from f' phi' |
|
796 |
have "(f has_vector_derivative f' y) ?F" |
|
797 |
and "(\<phi> has_vector_derivative \<phi>' y) ?F" |
|
798 |
using \<open>a < y\<close> \<open>y < b\<close> |
|
799 |
by (auto simp add: at_within_open[of _ "{a<..<b}"] has_vector_derivative_def |
|
800 |
intro!: has_derivative_subset[where s="{a<..<b}" and t="{y..<b}"]) |
|
801 |
hence "\<forall>\<^sub>F x1 in ?F. norm (f x1 - f y - (x1 - y) *\<^sub>R f' y) \<le> e2 * \<bar>x1 - y\<bar>" |
|
802 |
"\<forall>\<^sub>F x1 in ?F. norm (\<phi> x1 - \<phi> y - (x1 - y) *\<^sub>R \<phi>' y) \<le> e2 * \<bar>x1 - y\<bar>" |
|
803 |
using \<open>e2 > 0\<close> |
|
804 |
by (auto simp: has_derivative_within_alt2 has_vector_derivative_def) |
|
805 |
moreover |
|
806 |
have "\<forall>\<^sub>F x1 in ?F. y \<le> x1" "\<forall>\<^sub>F x1 in ?F. x1 < b" |
|
807 |
by (auto simp: eventually_at_filter) |
|
808 |
ultimately |
|
809 |
have "\<forall>\<^sub>F x1 in ?F. norm (f x1 - f y) \<le> (\<phi> x1 - \<phi> y) + e * \<bar>x1 - y\<bar>" |
|
810 |
(is "\<forall>\<^sub>F x1 in ?F. ?le' x1") |
|
811 |
proof eventually_elim |
|
812 |
case (elim x1) |
|
813 |
from norm_triangle_ineq2[THEN order_trans, OF elim(1)] |
|
814 |
have "norm (f x1 - f y) \<le> norm (f' y) * \<bar>x1 - y\<bar> + e2 * \<bar>x1 - y\<bar>" |
|
815 |
by (simp add: ac_simps) |
|
816 |
also have "norm (f' y) \<le> \<phi>' y" using bnd \<open>a < y\<close> \<open>y < b\<close> by simp |
|
817 |
also have "\<phi>' y * \<bar>x1 - y\<bar> \<le> \<phi> x1 - \<phi> y + e2 * \<bar>x1 - y\<bar>" |
|
818 |
using elim by (simp add: ac_simps) |
|
819 |
finally |
|
820 |
have "norm (f x1 - f y) \<le> \<phi> x1 - \<phi> y + e2 * \<bar>x1 - y\<bar> + e2 * \<bar>x1 - y\<bar>" |
|
821 |
by (auto simp: mult_right_mono) |
|
822 |
thus ?case by (simp add: e2_def) |
|
823 |
qed |
|
824 |
moreover have "?le' y" by simp |
|
825 |
ultimately obtain S |
|
826 |
where S: "open S" "y \<in> S" "\<And>x. x\<in>S \<Longrightarrow> x \<in> {y..<b} \<Longrightarrow> ?le' x" |
|
827 |
unfolding eventually_at_topological |
|
828 |
by metis |
|
829 |
from \<open>open S\<close> obtain d where d: "\<And>x. dist x y < d \<Longrightarrow> x \<in> S" "d > 0" |
|
830 |
by (force simp: dist_commute open_dist ball_def dest!: bspec[OF _ \<open>y \<in> S\<close>]) |
|
831 |
define d' where "d' = min ((y + b)/2) (y + (d/2))" |
|
832 |
have "d' \<in> A" |
|
833 |
unfolding A_def |
|
834 |
proof safe |
|
835 |
show "a \<le> d'" using \<open>a < y\<close> \<open>0 < d\<close> \<open>y < b\<close> by (simp add: d'_def) |
|
836 |
show "d' \<le> b" using \<open>y < b\<close> by (simp add: d'_def min_def) |
|
837 |
fix x1 |
|
838 |
assume x1: "x1 \<in> {a..<d'}" |
|
839 |
show "?le x1" |
|
840 |
proof (cases "x1 < y") |
|
841 |
case True |
|
842 |
then show ?thesis |
|
843 |
using \<open>y \<in> A\<close> local.leI x1 by auto |
|
844 |
next |
|
845 |
case False |
|
846 |
hence x1': "x1 \<in> S" "x1 \<in> {y..<b}" using x1 |
|
847 |
by (auto simp: d'_def dist_real_def intro!: d) |
|
848 |
have "norm (f x1 - f a) \<le> norm (f x1 - f y) + norm (f y - f a)" |
|
849 |
by (rule order_trans[OF _ norm_triangle_ineq]) simp |
|
850 |
also note S(3)[OF x1'] |
|
851 |
also note le_y |
|
852 |
finally show "?le x1" |
|
853 |
using False by (auto simp: algebra_simps) |
|
854 |
qed |
|
855 |
qed |
|
856 |
hence "d' \<le> y" |
|
857 |
unfolding y_def by (rule cSup_upper) simp |
|
858 |
thus False using \<open>d > 0\<close> \<open>y < b\<close> |
|
859 |
by (simp add: d'_def min_def split: if_split_asm) |
|
860 |
qed |
|
861 |
qed |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
862 |
with le_y have "norm (f b - f a) \<le> \<phi> b - \<phi> a + e * (b - a + 1)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
863 |
by (simp add: algebra_simps) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
864 |
} note * = this |
68239 | 865 |
show ?thesis |
866 |
proof (rule field_le_epsilon) |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
867 |
fix e::real assume "e > 0" |
68239 | 868 |
then show "norm (f b - f a) \<le> \<phi> b - \<phi> a + e" |
60420 | 869 |
using *[of "e / (b - a + 1)"] \<open>a < b\<close> by simp |
68239 | 870 |
qed |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
871 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
872 |
|
44123 | 873 |
lemma differentiable_bound: |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
874 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
68239 | 875 |
assumes "convex S" |
876 |
and derf: "\<And>x. x\<in>S \<Longrightarrow> (f has_derivative f' x) (at x within S)" |
|
877 |
and B: "\<And>x. x \<in> S \<Longrightarrow> onorm (f' x) \<le> B" |
|
878 |
and x: "x \<in> S" |
|
879 |
and y: "y \<in> S" |
|
53781 | 880 |
shows "norm (f x - f y) \<le> B * norm (x - y)" |
881 |
proof - |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
882 |
let ?p = "\<lambda>u. x + u *\<^sub>R (y - x)" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
883 |
let ?\<phi> = "\<lambda>h. h * B * norm (x - y)" |
68239 | 884 |
have *: "x + u *\<^sub>R (y - x) \<in> S" if "u \<in> {0..1}" for u |
885 |
proof - |
|
886 |
have "u *\<^sub>R y = u *\<^sub>R (y - x) + u *\<^sub>R x" |
|
887 |
by (simp add: scale_right_diff_distrib) |
|
888 |
then show "x + u *\<^sub>R (y - x) \<in> S" |
|
70346 | 889 |
using that \<open>convex S\<close> x y by (simp add: convex_alt) |
890 |
(metis pth_b(2) pth_c(1) scaleR_collapse) |
|
68239 | 891 |
qed |
892 |
have "\<And>z. z \<in> (\<lambda>u. x + u *\<^sub>R (y - x)) ` {0..1} \<Longrightarrow> |
|
893 |
(f has_derivative f' z) (at z within (\<lambda>u. x + u *\<^sub>R (y - x)) ` {0..1})" |
|
72445
2c2de074832e
tidying and removal of legacy name
paulson <lp15@cam.ac.uk>
parents:
71633
diff
changeset
|
894 |
by (auto intro: * has_derivative_subset [OF derf]) |
68239 | 895 |
then have "continuous_on (?p ` {0..1}) f" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
896 |
unfolding continuous_on_eq_continuous_within |
68239 | 897 |
by (meson has_derivative_continuous) |
898 |
with * have 1: "continuous_on {0 .. 1} (f \<circ> ?p)" |
|
899 |
by (intro continuous_intros)+ |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
900 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
901 |
fix u::real assume u: "u \<in>{0 <..< 1}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
902 |
let ?u = "?p u" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
903 |
interpret linear "(f' ?u)" |
68239 | 904 |
using u by (auto intro!: has_derivative_linear derf *) |
56188 | 905 |
have "(f \<circ> ?p has_derivative (f' ?u) \<circ> (\<lambda>u. 0 + u *\<^sub>R (y - x))) (at u within box 0 1)" |
72445
2c2de074832e
tidying and removal of legacy name
paulson <lp15@cam.ac.uk>
parents:
71633
diff
changeset
|
906 |
by (intro derivative_intros has_derivative_subset [OF derf]) (use u * in auto) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
907 |
hence "((f \<circ> ?p) has_vector_derivative f' ?u (y - x)) (at u)" |
70999
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
908 |
by (simp add: at_within_open[OF u open_greaterThanLessThan] scaleR has_vector_derivative_def o_def) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
909 |
} note 2 = this |
68239 | 910 |
have 3: "continuous_on {0..1} ?\<phi>" |
911 |
by (rule continuous_intros)+ |
|
912 |
have 4: "(?\<phi> has_vector_derivative B * norm (x - y)) (at u)" for u |
|
913 |
by (auto simp: has_vector_derivative_def intro!: derivative_eq_intros) |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
914 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
915 |
fix u::real assume u: "u \<in>{0 <..< 1}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
916 |
let ?u = "?p u" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
917 |
interpret bounded_linear "(f' ?u)" |
68239 | 918 |
using u by (auto intro!: has_derivative_bounded_linear derf *) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
919 |
have "norm (f' ?u (y - x)) \<le> onorm (f' ?u) * norm (y - x)" |
67682
00c436488398
tuned proofs -- prefer explicit names for facts from 'interpret';
wenzelm
parents:
67399
diff
changeset
|
920 |
by (rule onorm) (rule bounded_linear) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
921 |
also have "onorm (f' ?u) \<le> B" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
922 |
using u by (auto intro!: assms(3)[rule_format] *) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
923 |
finally have "norm ((f' ?u) (y - x)) \<le> B * norm (x - y)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
924 |
by (simp add: mult_right_mono norm_minus_commute) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
925 |
} note 5 = this |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
926 |
have "norm (f x - f y) = norm ((f \<circ> (\<lambda>u. x + u *\<^sub>R (y - x))) 1 - (f \<circ> (\<lambda>u. x + u *\<^sub>R (y - x))) 0)" |
53781 | 927 |
by (auto simp add: norm_minus_commute) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
928 |
also |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
929 |
from differentiable_bound_general[OF zero_less_one 1, OF 3 2 4 5] |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
930 |
have "norm ((f \<circ> ?p) 1 - (f \<circ> ?p) 0) \<le> B * norm (x - y)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
931 |
by simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
932 |
finally show ?thesis . |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
933 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
934 |
|
71167
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
935 |
lemma field_differentiable_bound: |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
936 |
fixes S :: "'a::real_normed_field set" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
937 |
assumes cvs: "convex S" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
938 |
and df: "\<And>z. z \<in> S \<Longrightarrow> (f has_field_derivative f' z) (at z within S)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
939 |
and dn: "\<And>z. z \<in> S \<Longrightarrow> norm (f' z) \<le> B" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
940 |
and "x \<in> S" "y \<in> S" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
941 |
shows "norm(f x - f y) \<le> B * norm(x - y)" |
78475 | 942 |
proof (rule differentiable_bound [OF cvs]) |
943 |
show "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative (*) (f' x)) (at x within S)" |
|
944 |
by (simp add: df has_field_derivative_imp_has_derivative) |
|
945 |
show "\<And>x. x \<in> S \<Longrightarrow> onorm ((*) (f' x)) \<le> B" |
|
946 |
by (metis (no_types, opaque_lifting) dn norm_mult onorm_le order.refl order_trans) |
|
947 |
qed (use assms in auto) |
|
71167
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
948 |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
949 |
lemma |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
950 |
differentiable_bound_segment: |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
951 |
fixes f::"'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
952 |
assumes "\<And>t. t \<in> {0..1} \<Longrightarrow> x0 + t *\<^sub>R a \<in> G" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
953 |
assumes f': "\<And>x. x \<in> G \<Longrightarrow> (f has_derivative f' x) (at x within G)" |
68239 | 954 |
assumes B: "\<And>x. x \<in> {0..1} \<Longrightarrow> onorm (f' (x0 + x *\<^sub>R a)) \<le> B" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
955 |
shows "norm (f (x0 + a) - f x0) \<le> norm a * B" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
956 |
proof - |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
957 |
let ?G = "(\<lambda>x. x0 + x *\<^sub>R a) ` {0..1}" |
67399 | 958 |
have "?G = (+) x0 ` (\<lambda>x. x *\<^sub>R a) ` {0..1}" by auto |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
959 |
also have "convex \<dots>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
960 |
by (intro convex_translation convex_scaled convex_real_interval) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
961 |
finally have "convex ?G" . |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
962 |
moreover have "?G \<subseteq> G" "x0 \<in> ?G" "x0 + a \<in> ?G" using assms by (auto intro: image_eqI[where x=1]) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
963 |
ultimately show ?thesis |
60420 | 964 |
using has_derivative_subset[OF f' \<open>?G \<subseteq> G\<close>] B |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
965 |
differentiable_bound[of "(\<lambda>x. x0 + x *\<^sub>R a) ` {0..1}" f f' B "x0 + a" x0] |
68239 | 966 |
by (force simp: ac_simps) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
967 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
968 |
|
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
969 |
lemma differentiable_bound_linearization: |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
970 |
fixes f::"'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
68239 | 971 |
assumes S: "\<And>t. t \<in> {0..1} \<Longrightarrow> a + t *\<^sub>R (b - a) \<in> S" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
972 |
assumes f'[derivative_intros]: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)" |
68239 | 973 |
assumes B: "\<And>x. x \<in> S \<Longrightarrow> onorm (f' x - f' x0) \<le> B" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
974 |
assumes "x0 \<in> S" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
975 |
shows "norm (f b - f a - f' x0 (b - a)) \<le> norm (b - a) * B" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
976 |
proof - |
63040 | 977 |
define g where [abs_def]: "g x = f x - f' x0 x" for x |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
978 |
have g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative (\<lambda>i. f' x i - f' x0 i)) (at x within S)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
979 |
unfolding g_def using assms |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
980 |
by (auto intro!: derivative_eq_intros |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
981 |
bounded_linear.has_derivative[OF has_derivative_bounded_linear, OF f']) |
68239 | 982 |
from B have "\<forall>x\<in>{0..1}. onorm (\<lambda>i. f' (a + x *\<^sub>R (b - a)) i - f' x0 i) \<le> B" |
983 |
using assms by (auto simp: fun_diff_def) |
|
984 |
with differentiable_bound_segment[OF S g] \<open>x0 \<in> S\<close> |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
985 |
show ?thesis |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63170
diff
changeset
|
986 |
by (simp add: g_def field_simps linear_diff[OF has_derivative_linear[OF f']]) |
44123 | 987 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
988 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
989 |
lemma vector_differentiable_bound_linearization: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
990 |
fixes f::"real \<Rightarrow> 'b::real_normed_vector" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
991 |
assumes f': "\<And>x. x \<in> S \<Longrightarrow> (f has_vector_derivative f' x) (at x within S)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
992 |
assumes "closed_segment a b \<subseteq> S" |
68239 | 993 |
assumes B: "\<And>x. x \<in> S \<Longrightarrow> norm (f' x - f' x0) \<le> B" |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
994 |
assumes "x0 \<in> S" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
995 |
shows "norm (f b - f a - (b - a) *\<^sub>R f' x0) \<le> norm (b - a) * B" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
996 |
using assms |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
997 |
by (intro differentiable_bound_linearization[of a b S f "\<lambda>x h. h *\<^sub>R f' x" x0 B]) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
998 |
(force simp: closed_segment_real_eq has_vector_derivative_def |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
999 |
scaleR_diff_right[symmetric] mult.commute[of B] |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1000 |
intro!: onorm_le mult_left_mono)+ |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1001 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1002 |
|
60420 | 1003 |
text \<open>In particular.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1004 |
|
44123 | 1005 |
lemma has_derivative_zero_constant: |
60179 | 1006 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1007 |
assumes "convex s" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1008 |
and "\<And>x. x \<in> s \<Longrightarrow> (f has_derivative (\<lambda>h. 0)) (at x within s)" |
44123 | 1009 |
shows "\<exists>c. \<forall>x\<in>s. f x = c" |
56332 | 1010 |
proof - |
1011 |
{ fix x y assume "x \<in> s" "y \<in> s" |
|
1012 |
then have "norm (f x - f y) \<le> 0 * norm (x - y)" |
|
1013 |
using assms by (intro differentiable_bound[of s]) (auto simp: onorm_zero) |
|
1014 |
then have "f x = f y" |
|
1015 |
by simp } |
|
53781 | 1016 |
then show ?thesis |
56332 | 1017 |
by metis |
53781 | 1018 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1019 |
|
61524
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61520
diff
changeset
|
1020 |
lemma has_field_derivative_zero_constant: |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61520
diff
changeset
|
1021 |
assumes "convex s" "\<And>x. x \<in> s \<Longrightarrow> (f has_field_derivative 0) (at x within s)" |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61520
diff
changeset
|
1022 |
shows "\<exists>c. \<forall>x\<in>s. f (x) = (c :: 'a :: real_normed_field)" |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61520
diff
changeset
|
1023 |
proof (rule has_derivative_zero_constant) |
69064
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
nipkow
parents:
69020
diff
changeset
|
1024 |
have A: "(*) 0 = (\<lambda>_. 0 :: 'a)" by (intro ext) simp |
61524
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61520
diff
changeset
|
1025 |
fix x assume "x \<in> s" thus "(f has_derivative (\<lambda>h. 0)) (at x within s)" |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61520
diff
changeset
|
1026 |
using assms(2)[of x] by (simp add: has_field_derivative_def A) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61520
diff
changeset
|
1027 |
qed fact |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61520
diff
changeset
|
1028 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1029 |
lemma |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1030 |
has_vector_derivative_zero_constant: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1031 |
assumes "convex s" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1032 |
assumes "\<And>x. x \<in> s \<Longrightarrow> (f has_vector_derivative 0) (at x within s)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1033 |
obtains c where "\<And>x. x \<in> s \<Longrightarrow> f x = c" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1034 |
using has_derivative_zero_constant[of s f] assms |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1035 |
by (auto simp: has_vector_derivative_def) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1036 |
|
53781 | 1037 |
lemma has_derivative_zero_unique: |
60179 | 1038 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1039 |
assumes "convex s" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1040 |
and "\<And>x. x \<in> s \<Longrightarrow> (f has_derivative (\<lambda>h. 0)) (at x within s)" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1041 |
and "x \<in> s" "y \<in> s" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1042 |
shows "f x = f y" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1043 |
using has_derivative_zero_constant[OF assms(1,2)] assms(3-) by force |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1044 |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1045 |
lemma has_derivative_zero_unique_connected: |
60179 | 1046 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1047 |
assumes "open s" "connected s" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1048 |
assumes f: "\<And>x. x \<in> s \<Longrightarrow> (f has_derivative (\<lambda>x. 0)) (at x)" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1049 |
assumes "x \<in> s" "y \<in> s" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1050 |
shows "f x = f y" |
60420 | 1051 |
proof (rule connected_local_const[where f=f, OF \<open>connected s\<close> \<open>x\<in>s\<close> \<open>y\<in>s\<close>]) |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1052 |
show "\<forall>a\<in>s. eventually (\<lambda>b. f a = f b) (at a within s)" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1053 |
proof |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1054 |
fix a assume "a \<in> s" |
60420 | 1055 |
with \<open>open s\<close> obtain e where "0 < e" "ball a e \<subseteq> s" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1056 |
by (rule openE) |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1057 |
then have "\<exists>c. \<forall>x\<in>ball a e. f x = c" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1058 |
by (intro has_derivative_zero_constant) |
71633 | 1059 |
(auto simp: at_within_open[OF _ open_ball] f) |
60420 | 1060 |
with \<open>0<e\<close> have "\<forall>x\<in>ball a e. f a = f x" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1061 |
by auto |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1062 |
then show "eventually (\<lambda>b. f a = f b) (at a within s)" |
60420 | 1063 |
using \<open>0<e\<close> unfolding eventually_at_topological |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1064 |
by (intro exI[of _ "ball a e"]) auto |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1065 |
qed |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1066 |
qed |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1067 |
|
60420 | 1068 |
subsection \<open>Differentiability of inverse function (most basic form)\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1069 |
|
44123 | 1070 |
lemma has_derivative_inverse_basic: |
56226 | 1071 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
68055 | 1072 |
assumes derf: "(f has_derivative f') (at (g y))" |
1073 |
and ling': "bounded_linear g'" |
|
53781 | 1074 |
and "g' \<circ> f' = id" |
68055 | 1075 |
and contg: "continuous (at y) g" |
1076 |
and "open T" |
|
1077 |
and "y \<in> T" |
|
1078 |
and fg: "\<And>z. z \<in> T \<Longrightarrow> f (g z) = z" |
|
44123 | 1079 |
shows "(g has_derivative g') (at y)" |
53781 | 1080 |
proof - |
44123 | 1081 |
interpret f': bounded_linear f' |
1082 |
using assms unfolding has_derivative_def by auto |
|
53781 | 1083 |
interpret g': bounded_linear g' |
1084 |
using assms by auto |
|
55665 | 1085 |
obtain C where C: "0 < C" "\<And>x. norm (g' x) \<le> norm x * C" |
1086 |
using bounded_linear.pos_bounded[OF assms(2)] by blast |
|
53781 | 1087 |
have lem1: "\<forall>e>0. \<exists>d>0. \<forall>z. |
1088 |
norm (z - y) < d \<longrightarrow> norm (g z - g y - g'(z - y)) \<le> e * norm (g z - g y)" |
|
68055 | 1089 |
proof (intro allI impI) |
61165 | 1090 |
fix e :: real |
1091 |
assume "e > 0" |
|
1092 |
with C(1) have *: "e / C > 0" by auto |
|
68055 | 1093 |
obtain d0 where "0 < d0" and d0: |
1094 |
"\<And>u. norm (u - g y) < d0 \<Longrightarrow> norm (f u - f (g y) - f' (u - g y)) \<le> e / C * norm (u - g y)" |
|
1095 |
using derf * unfolding has_derivative_at_alt by blast |
|
1096 |
obtain d1 where "0 < d1" and d1: "\<And>x. \<lbrakk>0 < dist x y; dist x y < d1\<rbrakk> \<Longrightarrow> dist (g x) (g y) < d0" |
|
1097 |
using contg \<open>0 < d0\<close> unfolding continuous_at Lim_at by blast |
|
1098 |
obtain d2 where "0 < d2" and d2: "\<And>u. dist u y < d2 \<Longrightarrow> u \<in> T" |
|
1099 |
using \<open>open T\<close> \<open>y \<in> T\<close> unfolding open_dist by blast |
|
55665 | 1100 |
obtain d where d: "0 < d" "d < d1" "d < d2" |
68527
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68241
diff
changeset
|
1101 |
using field_lbound_gt_zero[OF \<open>0 < d1\<close> \<open>0 < d2\<close>] by blast |
68055 | 1102 |
show "\<exists>d>0. \<forall>z. norm (z - y) < d \<longrightarrow> norm (g z - g y - g' (z - y)) \<le> e * norm (g z - g y)" |
1103 |
proof (intro exI allI impI conjI) |
|
53781 | 1104 |
fix z |
1105 |
assume as: "norm (z - y) < d" |
|
68055 | 1106 |
then have "z \<in> T" |
44123 | 1107 |
using d2 d unfolding dist_norm by auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1108 |
have "norm (g z - g y - g' (z - y)) \<le> norm (g' (f (g z) - y - f' (g z - g y)))" |
44123 | 1109 |
unfolding g'.diff f'.diff |
68055 | 1110 |
unfolding assms(3)[unfolded o_def id_def, THEN fun_cong] fg[OF \<open>z\<in>T\<close>] |
1111 |
by (simp add: norm_minus_commute) |
|
53781 | 1112 |
also have "\<dots> \<le> norm (f (g z) - y - f' (g z - g y)) * C" |
55665 | 1113 |
by (rule C(2)) |
44123 | 1114 |
also have "\<dots> \<le> (e / C) * norm (g z - g y) * C" |
68055 | 1115 |
proof - |
1116 |
have "norm (g z - g y) < d0" |
|
1117 |
by (metis as cancel_comm_monoid_add_class.diff_cancel d(2) \<open>0 < d0\<close> d1 diff_gt_0_iff_gt diff_strict_mono dist_norm dist_self zero_less_dist_iff) |
|
1118 |
then show ?thesis |
|
79566 | 1119 |
by (metis C(1) \<open>y \<in> T\<close> d0 fg mult_le_cancel_right_pos) |
68055 | 1120 |
qed |
44123 | 1121 |
also have "\<dots> \<le> e * norm (g z - g y)" |
1122 |
using C by (auto simp add: field_simps) |
|
1123 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (g z - g y)" |
|
1124 |
by simp |
|
68055 | 1125 |
qed (use d in auto) |
44123 | 1126 |
qed |
53781 | 1127 |
have *: "(0::real) < 1 / 2" |
1128 |
by auto |
|
68055 | 1129 |
obtain d where "0 < d" and d: |
1130 |
"\<And>z. norm (z - y) < d \<Longrightarrow> norm (g z - g y - g' (z - y)) \<le> 1/2 * norm (g z - g y)" |
|
55665 | 1131 |
using lem1 * by blast |
63040 | 1132 |
define B where "B = C * 2" |
53781 | 1133 |
have "B > 0" |
1134 |
unfolding B_def using C by auto |
|
61165 | 1135 |
have lem2: "norm (g z - g y) \<le> B * norm (z - y)" if z: "norm(z - y) < d" for z |
1136 |
proof - |
|
44123 | 1137 |
have "norm (g z - g y) \<le> norm(g' (z - y)) + norm ((g z - g y) - g'(z - y))" |
53781 | 1138 |
by (rule norm_triangle_sub) |
1139 |
also have "\<dots> \<le> norm (g' (z - y)) + 1 / 2 * norm (g z - g y)" |
|
68055 | 1140 |
by (rule add_left_mono) (use d z in auto) |
44123 | 1141 |
also have "\<dots> \<le> norm (z - y) * C + 1 / 2 * norm (g z - g y)" |
68055 | 1142 |
by (rule add_right_mono) (use C in auto) |
61165 | 1143 |
finally show "norm (g z - g y) \<le> B * norm (z - y)" |
53781 | 1144 |
unfolding B_def |
1145 |
by (auto simp add: field_simps) |
|
44123 | 1146 |
qed |
53781 | 1147 |
show ?thesis |
1148 |
unfolding has_derivative_at_alt |
|
68055 | 1149 |
proof (intro conjI assms allI impI) |
61165 | 1150 |
fix e :: real |
1151 |
assume "e > 0" |
|
1152 |
then have *: "e / B > 0" by (metis \<open>B > 0\<close> divide_pos_pos) |
|
68055 | 1153 |
obtain d' where "0 < d'" and d': |
1154 |
"\<And>z. norm (z - y) < d' \<Longrightarrow> norm (g z - g y - g' (z - y)) \<le> e / B * norm (g z - g y)" |
|
55665 | 1155 |
using lem1 * by blast |
1156 |
obtain k where k: "0 < k" "k < d" "k < d'" |
|
68527
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68241
diff
changeset
|
1157 |
using field_lbound_gt_zero[OF \<open>0 < d\<close> \<open>0 < d'\<close>] by blast |
61165 | 1158 |
show "\<exists>d>0. \<forall>ya. norm (ya - y) < d \<longrightarrow> norm (g ya - g y - g' (ya - y)) \<le> e * norm (ya - y)" |
68055 | 1159 |
proof (intro exI allI impI conjI) |
53781 | 1160 |
fix z |
1161 |
assume as: "norm (z - y) < k" |
|
1162 |
then have "norm (g z - g y - g' (z - y)) \<le> e / B * norm(g z - g y)" |
|
44123 | 1163 |
using d' k by auto |
53781 | 1164 |
also have "\<dots> \<le> e * norm (z - y)" |
60420 | 1165 |
unfolding times_divide_eq_left pos_divide_le_eq[OF \<open>B>0\<close>] |
68055 | 1166 |
using lem2[of z] k as \<open>e > 0\<close> |
44123 | 1167 |
by (auto simp add: field_simps) |
1168 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (z - y)" |
|
53781 | 1169 |
by simp |
68055 | 1170 |
qed (use k in auto) |
44123 | 1171 |
qed |
1172 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1173 |
|
71167
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1174 |
text\<^marker>\<open>tag unimportant\<close>\<open>Inverse function theorem for complex derivatives\<close> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1175 |
lemma has_field_derivative_inverse_basic: |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1176 |
shows "DERIV f (g y) :> f' \<Longrightarrow> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1177 |
f' \<noteq> 0 \<Longrightarrow> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1178 |
continuous (at y) g \<Longrightarrow> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1179 |
open t \<Longrightarrow> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1180 |
y \<in> t \<Longrightarrow> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1181 |
(\<And>z. z \<in> t \<Longrightarrow> f (g z) = z) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1182 |
\<Longrightarrow> DERIV g y :> inverse (f')" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1183 |
unfolding has_field_derivative_def |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1184 |
by (rule has_derivative_inverse_basic) (auto simp: bounded_linear_mult_right) |
71167
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
1185 |
|
60420 | 1186 |
text \<open>Simply rewrite that based on the domain point x.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1187 |
|
44123 | 1188 |
lemma has_derivative_inverse_basic_x: |
56226 | 1189 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1190 |
assumes "(f has_derivative f') (at x)" |
1191 |
and "bounded_linear g'" |
|
1192 |
and "g' \<circ> f' = id" |
|
1193 |
and "continuous (at (f x)) g" |
|
1194 |
and "g (f x) = x" |
|
68055 | 1195 |
and "open T" |
1196 |
and "f x \<in> T" |
|
1197 |
and "\<And>y. y \<in> T \<Longrightarrow> f (g y) = y" |
|
53781 | 1198 |
shows "(g has_derivative g') (at (f x))" |
68055 | 1199 |
by (rule has_derivative_inverse_basic) (use assms in auto) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1200 |
|
60420 | 1201 |
text \<open>This is the version in Dieudonne', assuming continuity of f and g.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1202 |
|
44123 | 1203 |
lemma has_derivative_inverse_dieudonne: |
56226 | 1204 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
68055 | 1205 |
assumes "open S" |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1206 |
and fS: "open (f ` S)" |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1207 |
and A: "continuous_on S f" "continuous_on (f ` S) g" |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1208 |
"\<And>x. x \<in> S \<Longrightarrow> g (f x) = x" "x \<in> S" |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1209 |
and B: "(f has_derivative f') (at x)" "bounded_linear g'" "g' \<circ> f' = id" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1210 |
shows "(g has_derivative g') (at (f x))" |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1211 |
using A fS continuous_on_eq_continuous_at |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1212 |
by (intro has_derivative_inverse_basic_x[OF B _ _ fS]) force+ |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1213 |
|
60420 | 1214 |
text \<open>Here's the simplest way of not assuming much about g.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1215 |
|
68838 | 1216 |
proposition has_derivative_inverse: |
56226 | 1217 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
68055 | 1218 |
assumes "compact S" |
1219 |
and "x \<in> S" |
|
1220 |
and fx: "f x \<in> interior (f ` S)" |
|
1221 |
and "continuous_on S f" |
|
68239 | 1222 |
and gf: "\<And>y. y \<in> S \<Longrightarrow> g (f y) = y" |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1223 |
and B: "(f has_derivative f') (at x)" "bounded_linear g'" "g' \<circ> f' = id" |
44123 | 1224 |
shows "(g has_derivative g') (at (f x))" |
53781 | 1225 |
proof - |
68239 | 1226 |
have *: "\<And>y. y \<in> interior (f ` S) \<Longrightarrow> f (g y) = y" |
1227 |
by (metis gf image_iff interior_subset subsetCE) |
|
44123 | 1228 |
show ?thesis |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1229 |
using assms * continuous_on_interior continuous_on_inv fx |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1230 |
by (intro has_derivative_inverse_basic_x[OF B, where T = "interior (f`S)"]) blast+ |
44123 | 1231 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1232 |
|
53781 | 1233 |
|
70381
b151d1f00204
More results about measure and integration theory
paulson <lp15@cam.ac.uk>
parents:
70365
diff
changeset
|
1234 |
text \<open>Invertible derivative continuous at a point implies local |
44123 | 1235 |
injectivity. It's only for this we need continuity of the derivative, |
1236 |
except of course if we want the fact that the inverse derivative is |
|
1237 |
also continuous. So if we know for some other reason that the inverse |
|
60420 | 1238 |
function exists, it's OK.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1239 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62207
diff
changeset
|
1240 |
proposition has_derivative_locally_injective: |
53781 | 1241 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'm::euclidean_space" |
68239 | 1242 |
assumes "a \<in> S" |
1243 |
and "open S" |
|
68055 | 1244 |
and bling: "bounded_linear g'" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62207
diff
changeset
|
1245 |
and "g' \<circ> f' a = id" |
68239 | 1246 |
and derf: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x)" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62207
diff
changeset
|
1247 |
and "\<And>e. e > 0 \<Longrightarrow> \<exists>d>0. \<forall>x. dist a x < d \<longrightarrow> onorm (\<lambda>v. f' x v - f' a v) < e" |
68239 | 1248 |
obtains r where "r > 0" "ball a r \<subseteq> S" "inj_on f (ball a r)" |
53781 | 1249 |
proof - |
1250 |
interpret bounded_linear g' |
|
1251 |
using assms by auto |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1252 |
note f'g' = assms(4)[unfolded id_def o_def,THEN cong] |
53781 | 1253 |
have "g' (f' a (\<Sum>Basis)) = (\<Sum>Basis)" "(\<Sum>Basis) \<noteq> (0::'n)" |
68055 | 1254 |
using f'g' by auto |
53781 | 1255 |
then have *: "0 < onorm g'" |
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
1256 |
unfolding onorm_pos_lt[OF assms(3)] |
53781 | 1257 |
by fastforce |
63040 | 1258 |
define k where "k = 1 / onorm g' / 2" |
53781 | 1259 |
have *: "k > 0" |
1260 |
unfolding k_def using * by auto |
|
55665 | 1261 |
obtain d1 where d1: |
1262 |
"0 < d1" |
|
1263 |
"\<And>x. dist a x < d1 \<Longrightarrow> onorm (\<lambda>v. f' x v - f' a v) < k" |
|
1264 |
using assms(6) * by blast |
|
68239 | 1265 |
from \<open>open S\<close> obtain d2 where "d2 > 0" "ball a d2 \<subseteq> S" |
1266 |
using \<open>a\<in>S\<close> .. |
|
1267 |
obtain d2 where d2: "0 < d2" "ball a d2 \<subseteq> S" |
|
1268 |
using \<open>0 < d2\<close> \<open>ball a d2 \<subseteq> S\<close> by blast |
|
55665 | 1269 |
obtain d where d: "0 < d" "d < d1" "d < d2" |
68527
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68241
diff
changeset
|
1270 |
using field_lbound_gt_zero[OF d1(1) d2(1)] by blast |
44123 | 1271 |
show ?thesis |
1272 |
proof |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62207
diff
changeset
|
1273 |
show "0 < d" by (fact d) |
68239 | 1274 |
show "ball a d \<subseteq> S" |
1275 |
using \<open>d < d2\<close> \<open>ball a d2 \<subseteq> S\<close> by auto |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62207
diff
changeset
|
1276 |
show "inj_on f (ball a d)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62207
diff
changeset
|
1277 |
unfolding inj_on_def |
44123 | 1278 |
proof (intro strip) |
53781 | 1279 |
fix x y |
1280 |
assume as: "x \<in> ball a d" "y \<in> ball a d" "f x = f y" |
|
63040 | 1281 |
define ph where [abs_def]: "ph w = w - g' (f w - f x)" for w |
44123 | 1282 |
have ph':"ph = g' \<circ> (\<lambda>w. f' a w - (f w - f x))" |
68239 | 1283 |
unfolding ph_def o_def by (simp add: diff f'g') |
53781 | 1284 |
have "norm (ph x - ph y) \<le> (1 / 2) * norm (x - y)" |
68239 | 1285 |
proof (rule differentiable_bound[OF convex_ball _ _ as(1-2)]) |
53781 | 1286 |
fix u |
1287 |
assume u: "u \<in> ball a d" |
|
68239 | 1288 |
then have "u \<in> S" |
53781 | 1289 |
using d d2 by auto |
1290 |
have *: "(\<lambda>v. v - g' (f' u v)) = g' \<circ> (\<lambda>w. f' a w - f' u w)" |
|
1291 |
unfolding o_def and diff |
|
1292 |
using f'g' by auto |
|
68055 | 1293 |
have blin: "bounded_linear (f' a)" |
68239 | 1294 |
using \<open>a \<in> S\<close> derf by blast |
41958 | 1295 |
show "(ph has_derivative (\<lambda>v. v - g' (f' u v))) (at u within ball a d)" |
68055 | 1296 |
unfolding ph' * comp_def |
68239 | 1297 |
by (rule \<open>u \<in> S\<close> derivative_eq_intros has_derivative_at_withinI [OF derf] bounded_linear.has_derivative [OF blin] bounded_linear.has_derivative [OF bling] |simp)+ |
53781 | 1298 |
have **: "bounded_linear (\<lambda>x. f' u x - f' a x)" "bounded_linear (\<lambda>x. f' a x - f' u x)" |
68239 | 1299 |
using \<open>u \<in> S\<close> blin bounded_linear_sub derf by auto |
1300 |
then have "onorm (\<lambda>v. v - g' (f' u v)) \<le> onorm g' * onorm (\<lambda>w. f' a w - f' u w)" |
|
1301 |
by (simp add: "*" bounded_linear_axioms onorm_compose) |
|
44123 | 1302 |
also have "\<dots> \<le> onorm g' * k" |
53781 | 1303 |
apply (rule mult_left_mono) |
55665 | 1304 |
using d1(2)[of u] |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1305 |
using onorm_neg[where f="\<lambda>x. f' u x - f' a x"] d u onorm_pos_le[OF bling] |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1306 |
apply (auto simp: algebra_simps) |
53781 | 1307 |
done |
1308 |
also have "\<dots> \<le> 1 / 2" |
|
1309 |
unfolding k_def by auto |
|
1310 |
finally show "onorm (\<lambda>v. v - g' (f' u v)) \<le> 1 / 2" . |
|
44123 | 1311 |
qed |
1312 |
moreover have "norm (ph y - ph x) = norm (y - x)" |
|
68239 | 1313 |
by (simp add: as(3) ph_def) |
53781 | 1314 |
ultimately show "x = y" |
1315 |
unfolding norm_minus_commute by auto |
|
44123 | 1316 |
qed |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62207
diff
changeset
|
1317 |
qed |
44123 | 1318 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1319 |
|
53781 | 1320 |
|
60420 | 1321 |
subsection \<open>Uniformly convergent sequence of derivatives\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1322 |
|
44123 | 1323 |
lemma has_derivative_sequence_lipschitz_lemma: |
60179 | 1324 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
68239 | 1325 |
assumes "convex S" |
1326 |
and derf: "\<And>n x. x \<in> S \<Longrightarrow> ((f n) has_derivative (f' n x)) (at x within S)" |
|
1327 |
and nle: "\<And>n x h. \<lbrakk>n\<ge>N; x \<in> S\<rbrakk> \<Longrightarrow> norm (f' n x h - g' x h) \<le> e * norm h" |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1328 |
and "0 \<le> e" |
68239 | 1329 |
shows "\<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>y\<in>S. norm ((f m x - f n x) - (f m y - f n y)) \<le> 2 * e * norm (x - y)" |
1330 |
proof clarify |
|
53781 | 1331 |
fix m n x y |
68239 | 1332 |
assume as: "N \<le> m" "N \<le> n" "x \<in> S" "y \<in> S" |
53781 | 1333 |
show "norm ((f m x - f n x) - (f m y - f n y)) \<le> 2 * e * norm (x - y)" |
68239 | 1334 |
proof (rule differentiable_bound[where f'="\<lambda>x h. f' m x h - f' n x h", OF \<open>convex S\<close> _ _ as(3-4)]) |
53781 | 1335 |
fix x |
68239 | 1336 |
assume "x \<in> S" |
1337 |
show "((\<lambda>a. f m a - f n a) has_derivative (\<lambda>h. f' m x h - f' n x h)) (at x within S)" |
|
1338 |
by (rule derivative_intros derf \<open>x\<in>S\<close>)+ |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1339 |
show "onorm (\<lambda>h. f' m x h - f' n x h) \<le> 2 * e" |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1340 |
proof (rule onorm_bound) |
53781 | 1341 |
fix h |
44123 | 1342 |
have "norm (f' m x h - f' n x h) \<le> norm (f' m x h - g' x h) + norm (f' n x h - g' x h)" |
1343 |
using norm_triangle_ineq[of "f' m x h - g' x h" "- f' n x h + g' x h"] |
|
68239 | 1344 |
by (auto simp add: algebra_simps norm_minus_commute) |
53781 | 1345 |
also have "\<dots> \<le> e * norm h + e * norm h" |
68239 | 1346 |
using nle[OF \<open>N \<le> m\<close> \<open>x \<in> S\<close>, of h] nle[OF \<open>N \<le> n\<close> \<open>x \<in> S\<close>, of h] |
53781 | 1347 |
by (auto simp add: field_simps) |
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1348 |
finally show "norm (f' m x h - f' n x h) \<le> 2 * e * norm h" |
53781 | 1349 |
by auto |
60420 | 1350 |
qed (simp add: \<open>0 \<le> e\<close>) |
44123 | 1351 |
qed |
1352 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1353 |
|
68055 | 1354 |
lemma has_derivative_sequence_Lipschitz: |
60179 | 1355 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
68055 | 1356 |
assumes "convex S" |
1357 |
and "\<And>n x. x \<in> S \<Longrightarrow> ((f n) has_derivative (f' n x)) (at x within S)" |
|
68239 | 1358 |
and nle: "\<And>e. e > 0 \<Longrightarrow> \<forall>\<^sub>F n in sequentially. \<forall>x\<in>S. \<forall>h. norm (f' n x h - g' x h) \<le> e * norm h" |
68055 | 1359 |
and "e > 0" |
1360 |
shows "\<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>y\<in>S. |
|
53781 | 1361 |
norm ((f m x - f n x) - (f m y - f n y)) \<le> e * norm (x - y)" |
68055 | 1362 |
proof - |
68239 | 1363 |
have *: "2 * (e/2) = e" |
1364 |
using \<open>e > 0\<close> by auto |
|
1365 |
obtain N where "\<forall>n\<ge>N. \<forall>x\<in>S. \<forall>h. norm (f' n x h - g' x h) \<le> (e/2) * norm h" |
|
1366 |
using nle \<open>e > 0\<close> |
|
1367 |
unfolding eventually_sequentially |
|
1368 |
by (metis less_divide_eq_numeral1(1) mult_zero_left) |
|
68055 | 1369 |
then show "\<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>y\<in>S. norm (f m x - f n x - (f m y - f n y)) \<le> e * norm (x - y)" |
53781 | 1370 |
apply (rule_tac x=N in exI) |
68239 | 1371 |
apply (rule has_derivative_sequence_lipschitz_lemma[where e="e/2", unfolded *]) |
60420 | 1372 |
using assms \<open>e > 0\<close> |
53781 | 1373 |
apply auto |
1374 |
done |
|
44123 | 1375 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1376 |
|
68838 | 1377 |
proposition has_derivative_sequence: |
60179 | 1378 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::banach" |
68055 | 1379 |
assumes "convex S" |
68239 | 1380 |
and derf: "\<And>n x. x \<in> S \<Longrightarrow> ((f n) has_derivative (f' n x)) (at x within S)" |
1381 |
and nle: "\<And>e. e > 0 \<Longrightarrow> \<forall>\<^sub>F n in sequentially. \<forall>x\<in>S. \<forall>h. norm (f' n x h - g' x h) \<le> e * norm h" |
|
68055 | 1382 |
and "x0 \<in> S" |
68239 | 1383 |
and lim: "((\<lambda>n. f n x0) \<longlongrightarrow> l) sequentially" |
1384 |
shows "\<exists>g. \<forall>x\<in>S. (\<lambda>n. f n x) \<longlonglongrightarrow> g x \<and> (g has_derivative g'(x)) (at x within S)" |
|
53781 | 1385 |
proof - |
68055 | 1386 |
have lem1: "\<And>e. e > 0 \<Longrightarrow> \<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>y\<in>S. |
53781 | 1387 |
norm ((f m x - f n x) - (f m y - f n y)) \<le> e * norm (x - y)" |
68055 | 1388 |
using assms(1,2,3) by (rule has_derivative_sequence_Lipschitz) |
1389 |
have "\<exists>g. \<forall>x\<in>S. ((\<lambda>n. f n x) \<longlongrightarrow> g x) sequentially" |
|
68239 | 1390 |
proof (intro ballI bchoice) |
53781 | 1391 |
fix x |
68055 | 1392 |
assume "x \<in> S" |
68239 | 1393 |
show "\<exists>y. (\<lambda>n. f n x) \<longlonglongrightarrow> y" |
1394 |
unfolding convergent_eq_Cauchy |
|
53781 | 1395 |
proof (cases "x = x0") |
1396 |
case True |
|
68239 | 1397 |
then show "Cauchy (\<lambda>n. f n x)" |
1398 |
using LIMSEQ_imp_Cauchy[OF lim] by auto |
|
44123 | 1399 |
next |
53781 | 1400 |
case False |
68239 | 1401 |
show "Cauchy (\<lambda>n. f n x)" |
53781 | 1402 |
unfolding Cauchy_def |
68055 | 1403 |
proof (intro allI impI) |
53781 | 1404 |
fix e :: real |
1405 |
assume "e > 0" |
|
56541 | 1406 |
hence *: "e / 2 > 0" "e / 2 / norm (x - x0) > 0" using False by auto |
55665 | 1407 |
obtain M where M: "\<forall>m\<ge>M. \<forall>n\<ge>M. dist (f m x0) (f n x0) < e / 2" |
68239 | 1408 |
using LIMSEQ_imp_Cauchy[OF lim] * unfolding Cauchy_def by blast |
55665 | 1409 |
obtain N where N: |
1410 |
"\<forall>m\<ge>N. \<forall>n\<ge>N. |
|
68239 | 1411 |
\<forall>u\<in>S. \<forall>y\<in>S. norm (f m u - f n u - (f m y - f n y)) \<le> |
1412 |
e / 2 / norm (x - x0) * norm (u - y)" |
|
55665 | 1413 |
using lem1 *(2) by blast |
44123 | 1414 |
show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (f m x) (f n x) < e" |
68055 | 1415 |
proof (intro exI allI impI) |
53781 | 1416 |
fix m n |
1417 |
assume as: "max M N \<le>m" "max M N\<le>n" |
|
68239 | 1418 |
have "dist (f m x) (f n x) \<le> norm (f m x0 - f n x0) + norm (f m x - f n x - (f m x0 - f n x0))" |
53781 | 1419 |
unfolding dist_norm |
1420 |
by (rule norm_triangle_sub) |
|
44123 | 1421 |
also have "\<dots> \<le> norm (f m x0 - f n x0) + e / 2" |
68239 | 1422 |
using N \<open>x\<in>S\<close> \<open>x0\<in>S\<close> as False by fastforce |
44123 | 1423 |
also have "\<dots> < e / 2 + e / 2" |
68239 | 1424 |
by (rule add_strict_right_mono) (use as M in \<open>auto simp: dist_norm\<close>) |
53781 | 1425 |
finally show "dist (f m x) (f n x) < e" |
1426 |
by auto |
|
44123 | 1427 |
qed |
1428 |
qed |
|
1429 |
qed |
|
1430 |
qed |
|
68055 | 1431 |
then obtain g where g: "\<forall>x\<in>S. (\<lambda>n. f n x) \<longlonglongrightarrow> g x" .. |
68239 | 1432 |
have lem2: "\<exists>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>y\<in>S. norm ((f n x - f n y) - (g x - g y)) \<le> e * norm (x - y)" if "e > 0" for e |
1433 |
proof - |
|
55665 | 1434 |
obtain N where |
68055 | 1435 |
N: "\<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>y\<in>S. norm (f m x - f n x - (f m y - f n y)) \<le> e * norm (x - y)" |
68239 | 1436 |
using lem1 \<open>e > 0\<close> by blast |
68055 | 1437 |
show "\<exists>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>y\<in>S. norm (f n x - f n y - (g x - g y)) \<le> e * norm (x - y)" |
68239 | 1438 |
proof (intro exI ballI allI impI) |
53781 | 1439 |
fix n x y |
68055 | 1440 |
assume as: "N \<le> n" "x \<in> S" "y \<in> S" |
61973 | 1441 |
have "((\<lambda>m. norm (f n x - f n y - (f m x - f m y))) \<longlongrightarrow> norm (f n x - f n y - (g x - g y))) sequentially" |
56320 | 1442 |
by (intro tendsto_intros g[rule_format] as) |
1443 |
moreover have "eventually (\<lambda>m. norm (f n x - f n y - (f m x - f m y)) \<le> e * norm (x - y)) sequentially" |
|
44123 | 1444 |
unfolding eventually_sequentially |
68055 | 1445 |
proof (intro exI allI impI) |
53781 | 1446 |
fix m |
1447 |
assume "N \<le> m" |
|
1448 |
then show "norm (f n x - f n y - (f m x - f m y)) \<le> e * norm (x - y)" |
|
68239 | 1449 |
using N as by (auto simp add: algebra_simps) |
44123 | 1450 |
qed |
56320 | 1451 |
ultimately show "norm (f n x - f n y - (g x - g y)) \<le> e * norm (x - y)" |
63952
354808e9f44b
new material connected with HOL Light measure theory, plus more rationalisation
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1452 |
by (simp add: tendsto_upperbound) |
44123 | 1453 |
qed |
1454 |
qed |
|
68055 | 1455 |
have "\<forall>x\<in>S. ((\<lambda>n. f n x) \<longlongrightarrow> g x) sequentially \<and> (g has_derivative g' x) (at x within S)" |
56320 | 1456 |
unfolding has_derivative_within_alt2 |
68239 | 1457 |
proof (intro ballI conjI allI impI) |
53781 | 1458 |
fix x |
68055 | 1459 |
assume "x \<in> S" |
68239 | 1460 |
then show "(\<lambda>n. f n x) \<longlonglongrightarrow> g x" |
56320 | 1461 |
by (simp add: g) |
68239 | 1462 |
have tog': "(\<lambda>n. f' n x u) \<longlonglongrightarrow> g' x u" for u |
56320 | 1463 |
unfolding filterlim_def le_nhds_metric_le eventually_filtermap dist_norm |
1464 |
proof (intro allI impI) |
|
53781 | 1465 |
fix e :: real |
1466 |
assume "e > 0" |
|
56320 | 1467 |
show "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e) sequentially" |
53781 | 1468 |
proof (cases "u = 0") |
1469 |
case True |
|
56320 | 1470 |
have "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e * norm u) sequentially" |
68239 | 1471 |
using nle \<open>0 < e\<close> \<open>x \<in> S\<close> by (fast elim: eventually_mono) |
56320 | 1472 |
then show ?thesis |
68239 | 1473 |
using \<open>u = 0\<close> \<open>0 < e\<close> by (auto elim: eventually_mono) |
44123 | 1474 |
next |
53781 | 1475 |
case False |
60420 | 1476 |
with \<open>0 < e\<close> have "0 < e / norm u" by simp |
56320 | 1477 |
then have "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e / norm u * norm u) sequentially" |
68239 | 1478 |
using nle \<open>x \<in> S\<close> by (fast elim: eventually_mono) |
56320 | 1479 |
then show ?thesis |
60420 | 1480 |
using \<open>u \<noteq> 0\<close> by simp |
44123 | 1481 |
qed |
1482 |
qed |
|
1483 |
show "bounded_linear (g' x)" |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1484 |
proof |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1485 |
fix x' y z :: 'a |
53781 | 1486 |
fix c :: real |
68055 | 1487 |
note lin = assms(2)[rule_format,OF \<open>x\<in>S\<close>,THEN has_derivative_bounded_linear] |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1488 |
have "(\<lambda>n. f' n x (c *\<^sub>R x')) \<longlonglongrightarrow> c *\<^sub>R g' x x'" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1489 |
unfolding lin[THEN bounded_linear.linear, THEN linear_cmul] |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1490 |
by (intro tendsto_intros tog') |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1491 |
then show "g' x (c *\<^sub>R x') = c *\<^sub>R g' x x'" |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1492 |
using LIMSEQ_unique tog' by blast |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1493 |
have "(\<lambda>n. f' n x (y + z)) \<longlonglongrightarrow> g' x y + g' x z" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1494 |
unfolding lin[THEN bounded_linear.linear, THEN linear_add] |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1495 |
by (simp add: tendsto_add tog') |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1496 |
then show "g' x (y + z) = g' x y + g' x z" |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1497 |
using LIMSEQ_unique tog' by blast |
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1498 |
obtain N where N: "\<forall>h. norm (f' N x h - g' x h) \<le> 1 * norm h" |
68239 | 1499 |
using nle \<open>x \<in> S\<close> unfolding eventually_sequentially by (fast intro: zero_less_one) |
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1500 |
have "bounded_linear (f' N x)" |
68239 | 1501 |
using derf \<open>x \<in> S\<close> by fast |
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1502 |
from bounded_linear.bounded [OF this] |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1503 |
obtain K where K: "\<forall>h. norm (f' N x h) \<le> norm h * K" .. |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1504 |
{ |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1505 |
fix h |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1506 |
have "norm (g' x h) = norm (f' N x h - (f' N x h - g' x h))" |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1507 |
by simp |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1508 |
also have "\<dots> \<le> norm (f' N x h) + norm (f' N x h - g' x h)" |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1509 |
by (rule norm_triangle_ineq4) |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1510 |
also have "\<dots> \<le> norm h * K + 1 * norm h" |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1511 |
using N K by (fast intro: add_mono) |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1512 |
finally have "norm (g' x h) \<le> norm h * (K + 1)" |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1513 |
by (simp add: ring_distribs) |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1514 |
} |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1515 |
then show "\<exists>K. \<forall>h. norm (g' x h) \<le> norm h * K" by fast |
44123 | 1516 |
qed |
68239 | 1517 |
show "eventually (\<lambda>y. norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)) (at x within S)" |
1518 |
if "e > 0" for e |
|
1519 |
proof - |
|
1520 |
have *: "e / 3 > 0" |
|
1521 |
using that by auto |
|
68055 | 1522 |
obtain N1 where N1: "\<forall>n\<ge>N1. \<forall>x\<in>S. \<forall>h. norm (f' n x h - g' x h) \<le> e / 3 * norm h" |
68239 | 1523 |
using nle * unfolding eventually_sequentially by blast |
55665 | 1524 |
obtain N2 where |
68239 | 1525 |
N2[rule_format]: "\<forall>n\<ge>N2. \<forall>x\<in>S. \<forall>y\<in>S. norm (f n x - f n y - (g x - g y)) \<le> e / 3 * norm (x - y)" |
55665 | 1526 |
using lem2 * by blast |
56320 | 1527 |
let ?N = "max N1 N2" |
68055 | 1528 |
have "eventually (\<lambda>y. norm (f ?N y - f ?N x - f' ?N x (y - x)) \<le> e / 3 * norm (y - x)) (at x within S)" |
68239 | 1529 |
using derf[unfolded has_derivative_within_alt2] and \<open>x \<in> S\<close> and * by fast |
68055 | 1530 |
moreover have "eventually (\<lambda>y. y \<in> S) (at x within S)" |
56320 | 1531 |
unfolding eventually_at by (fast intro: zero_less_one) |
68055 | 1532 |
ultimately show "\<forall>\<^sub>F y in at x within S. norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)" |
56320 | 1533 |
proof (rule eventually_elim2) |
53781 | 1534 |
fix y |
68055 | 1535 |
assume "y \<in> S" |
56320 | 1536 |
assume "norm (f ?N y - f ?N x - f' ?N x (y - x)) \<le> e / 3 * norm (y - x)" |
1537 |
moreover have "norm (g y - g x - (f ?N y - f ?N x)) \<le> e / 3 * norm (y - x)" |
|
68239 | 1538 |
using N2[OF _ \<open>y \<in> S\<close> \<open>x \<in> S\<close>] |
56320 | 1539 |
by (simp add: norm_minus_commute) |
1540 |
ultimately have "norm (g y - g x - f' ?N x (y - x)) \<le> 2 * e / 3 * norm (y - x)" |
|
44123 | 1541 |
using norm_triangle_le[of "g y - g x - (f ?N y - f ?N x)" "f ?N y - f ?N x - f' ?N x (y - x)" "2 * e / 3 * norm (y - x)"] |
53781 | 1542 |
by (auto simp add: algebra_simps) |
44123 | 1543 |
moreover |
1544 |
have " norm (f' ?N x (y - x) - g' x (y - x)) \<le> e / 3 * norm (y - x)" |
|
68055 | 1545 |
using N1 \<open>x \<in> S\<close> by auto |
41958 | 1546 |
ultimately show "norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)" |
44123 | 1547 |
using norm_triangle_le[of "g y - g x - f' (max N1 N2) x (y - x)" "f' (max N1 N2) x (y - x) - g' x (y - x)"] |
53781 | 1548 |
by (auto simp add: algebra_simps) |
44123 | 1549 |
qed |
1550 |
qed |
|
1551 |
qed |
|
56320 | 1552 |
then show ?thesis by fast |
44123 | 1553 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1554 |
|
60420 | 1555 |
text \<open>Can choose to line up antiderivatives if we want.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1556 |
|
44123 | 1557 |
lemma has_antiderivative_sequence: |
60179 | 1558 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::banach" |
68055 | 1559 |
assumes "convex S" |
1560 |
and der: "\<And>n x. x \<in> S \<Longrightarrow> ((f n) has_derivative (f' n x)) (at x within S)" |
|
68239 | 1561 |
and no: "\<And>e. e > 0 \<Longrightarrow> \<forall>\<^sub>F n in sequentially. |
1562 |
\<forall>x\<in>S. \<forall>h. norm (f' n x h - g' x h) \<le> e * norm h" |
|
68055 | 1563 |
shows "\<exists>g. \<forall>x\<in>S. (g has_derivative g' x) (at x within S)" |
1564 |
proof (cases "S = {}") |
|
53781 | 1565 |
case False |
68055 | 1566 |
then obtain a where "a \<in> S" |
53781 | 1567 |
by auto |
68055 | 1568 |
have *: "\<And>P Q. \<exists>g. \<forall>x\<in>S. P g x \<and> Q g x \<Longrightarrow> \<exists>g. \<forall>x\<in>S. Q g x" |
53781 | 1569 |
by auto |
44123 | 1570 |
show ?thesis |
53781 | 1571 |
apply (rule *) |
68055 | 1572 |
apply (rule has_derivative_sequence [OF \<open>convex S\<close> _ no, of "\<lambda>n x. f n x + (f 0 a - f n a)"]) |
1573 |
apply (metis assms(2) has_derivative_add_const) |
|
1574 |
using \<open>a \<in> S\<close> |
|
68239 | 1575 |
apply auto |
53781 | 1576 |
done |
44123 | 1577 |
qed auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1578 |
|
44123 | 1579 |
lemma has_antiderivative_limit: |
60179 | 1580 |
fixes g' :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> 'b::banach" |
68055 | 1581 |
assumes "convex S" |
1582 |
and "\<And>e. e>0 \<Longrightarrow> \<exists>f f'. \<forall>x\<in>S. |
|
1583 |
(f has_derivative (f' x)) (at x within S) \<and> (\<forall>h. norm (f' x h - g' x h) \<le> e * norm h)" |
|
1584 |
shows "\<exists>g. \<forall>x\<in>S. (g has_derivative g' x) (at x within S)" |
|
53781 | 1585 |
proof - |
68055 | 1586 |
have *: "\<forall>n. \<exists>f f'. \<forall>x\<in>S. |
1587 |
(f has_derivative (f' x)) (at x within S) \<and> |
|
53781 | 1588 |
(\<forall>h. norm(f' x h - g' x h) \<le> inverse (real (Suc n)) * norm h)" |
61649
268d88ec9087
Tweaks for "real": Removal of [iff] status for some lemmas, adding [simp] for others. Plus fixes.
paulson <lp15@cam.ac.uk>
parents:
61560
diff
changeset
|
1589 |
by (simp add: assms(2)) |
55665 | 1590 |
obtain f where |
68055 | 1591 |
*: "\<And>x. \<exists>f'. \<forall>xa\<in>S. (f x has_derivative f' xa) (at xa within S) \<and> |
1592 |
(\<forall>h. norm (f' xa h - g' xa h) \<le> inverse (real (Suc x)) * norm h)" |
|
1593 |
using * by metis |
|
55665 | 1594 |
obtain f' where |
68055 | 1595 |
f': "\<And>x. \<forall>z\<in>S. (f x has_derivative f' x z) (at z within S) \<and> |
1596 |
(\<forall>h. norm (f' x z h - g' z h) \<le> inverse (real (Suc x)) * norm h)" |
|
1597 |
using * by metis |
|
53781 | 1598 |
show ?thesis |
68055 | 1599 |
proof (rule has_antiderivative_sequence[OF \<open>convex S\<close>, of f f']) |
53781 | 1600 |
fix e :: real |
1601 |
assume "e > 0" |
|
55665 | 1602 |
obtain N where N: "inverse (real (Suc N)) < e" |
60420 | 1603 |
using reals_Archimedean[OF \<open>e>0\<close>] .. |
68239 | 1604 |
show "\<forall>\<^sub>F n in sequentially. \<forall>x\<in>S. \<forall>h. norm (f' n x h - g' x h) \<le> e * norm h" |
1605 |
unfolding eventually_sequentially |
|
68055 | 1606 |
proof (intro exI allI ballI impI) |
61165 | 1607 |
fix n x h |
68055 | 1608 |
assume n: "N \<le> n" and x: "x \<in> S" |
53781 | 1609 |
have *: "inverse (real (Suc n)) \<le> e" |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1610 |
using n N |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1611 |
by (smt (verit, best) le_imp_inverse_le of_nat_0_less_iff of_nat_Suc of_nat_le_iff zero_less_Suc) |
61165 | 1612 |
show "norm (f' n x h - g' x h) \<le> e * norm h" |
68055 | 1613 |
by (meson "*" mult_right_mono norm_ge_zero order.trans x f') |
44123 | 1614 |
qed |
68055 | 1615 |
qed (use f' in auto) |
44123 | 1616 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1617 |
|
53781 | 1618 |
|
60420 | 1619 |
subsection \<open>Differentiation of a series\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1620 |
|
68838 | 1621 |
proposition has_derivative_series: |
60179 | 1622 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::banach" |
68055 | 1623 |
assumes "convex S" |
1624 |
and "\<And>n x. x \<in> S \<Longrightarrow> ((f n) has_derivative (f' n x)) (at x within S)" |
|
68239 | 1625 |
and "\<And>e. e>0 \<Longrightarrow> \<forall>\<^sub>F n in sequentially. \<forall>x\<in>S. \<forall>h. norm (sum (\<lambda>i. f' i x h) {..<n} - g' x h) \<le> e * norm h" |
68055 | 1626 |
and "x \<in> S" |
56183 | 1627 |
and "(\<lambda>n. f n x) sums l" |
68055 | 1628 |
shows "\<exists>g. \<forall>x\<in>S. (\<lambda>n. f n x) sums (g x) \<and> (g has_derivative g' x) (at x within S)" |
56183 | 1629 |
unfolding sums_def |
53781 | 1630 |
apply (rule has_derivative_sequence[OF assms(1) _ assms(3)]) |
64267 | 1631 |
apply (metis assms(2) has_derivative_sum) |
53781 | 1632 |
using assms(4-5) |
56183 | 1633 |
unfolding sums_def |
53781 | 1634 |
apply auto |
1635 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1636 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1637 |
lemma has_field_derivative_series: |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1638 |
fixes f :: "nat \<Rightarrow> ('a :: {real_normed_field,banach}) \<Rightarrow> 'a" |
68055 | 1639 |
assumes "convex S" |
1640 |
assumes "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x within S)" |
|
1641 |
assumes "uniform_limit S (\<lambda>n x. \<Sum>i<n. f' i x) g' sequentially" |
|
1642 |
assumes "x0 \<in> S" "summable (\<lambda>n. f n x0)" |
|
1643 |
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)" |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1644 |
unfolding has_field_derivative_def |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1645 |
proof (rule has_derivative_series) |
68239 | 1646 |
show "\<forall>\<^sub>F n in sequentially. |
1647 |
\<forall>x\<in>S. \<forall>h. norm ((\<Sum>i<n. f' i x * h) - g' x * h) \<le> e * norm h" if "e > 0" for e |
|
1648 |
unfolding eventually_sequentially |
|
68055 | 1649 |
proof - |
1650 |
from that assms(3) obtain N where N: "\<And>n x. n \<ge> N \<Longrightarrow> x \<in> S \<Longrightarrow> norm ((\<Sum>i<n. f' i x) - g' x) < e" |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1651 |
unfolding uniform_limit_iff eventually_at_top_linorder dist_norm by blast |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1652 |
{ |
68055 | 1653 |
fix n :: nat and x h :: 'a assume nx: "n \<ge> N" "x \<in> S" |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1654 |
have "norm ((\<Sum>i<n. f' i x * h) - g' x * h) = norm ((\<Sum>i<n. f' i x) - g' x) * norm h" |
64267 | 1655 |
by (simp add: norm_mult [symmetric] ring_distribs sum_distrib_right) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1656 |
also from N[OF nx] have "norm ((\<Sum>i<n. f' i x) - g' x) \<le> e" by simp |
61649
268d88ec9087
Tweaks for "real": Removal of [iff] status for some lemmas, adding [simp] for others. Plus fixes.
paulson <lp15@cam.ac.uk>
parents:
61560
diff
changeset
|
1657 |
hence "norm ((\<Sum>i<n. f' i x) - g' x) * norm h \<le> e * norm h" |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1658 |
by (intro mult_right_mono) simp_all |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1659 |
finally have "norm ((\<Sum>i<n. f' i x * h) - g' x * h) \<le> e * norm h" . |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1660 |
} |
68055 | 1661 |
thus "\<exists>N. \<forall>n\<ge>N. \<forall>x\<in>S. \<forall>h. norm ((\<Sum>i<n. f' i x * h) - g' x * h) \<le> e * norm h" by blast |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1662 |
qed |
68055 | 1663 |
qed (use assms in \<open>auto simp: has_field_derivative_def\<close>) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1664 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1665 |
lemma has_field_derivative_series': |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1666 |
fixes f :: "nat \<Rightarrow> ('a :: {real_normed_field,banach}) \<Rightarrow> 'a" |
68055 | 1667 |
assumes "convex S" |
1668 |
assumes "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x within S)" |
|
1669 |
assumes "uniformly_convergent_on S (\<lambda>n x. \<Sum>i<n. f' i x)" |
|
1670 |
assumes "x0 \<in> S" "summable (\<lambda>n. f n x0)" "x \<in> interior S" |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1671 |
shows "summable (\<lambda>n. f n x)" "((\<lambda>x. \<Sum>n. f n x) has_field_derivative (\<Sum>n. f' n x)) (at x)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1672 |
proof - |
68055 | 1673 |
from \<open>x \<in> interior S\<close> have "x \<in> S" using interior_subset by blast |
63040 | 1674 |
define g' where [abs_def]: "g' x = (\<Sum>i. f' i x)" for x |
68055 | 1675 |
from assms(3) have "uniform_limit S (\<lambda>n x. \<Sum>i<n. f' i x) g' sequentially" |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1676 |
by (simp add: uniformly_convergent_uniform_limit_iff suminf_eq_lim g'_def) |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1677 |
from has_field_derivative_series[OF assms(1,2) this assms(4,5)] obtain g where g: |
68055 | 1678 |
"\<And>x. x \<in> S \<Longrightarrow> (\<lambda>n. f n x) sums g x" |
1679 |
"\<And>x. x \<in> S \<Longrightarrow> (g has_field_derivative g' x) (at x within S)" by blast |
|
1680 |
from g(1)[OF \<open>x \<in> S\<close>] show "summable (\<lambda>n. f n x)" by (simp add: sums_iff) |
|
1681 |
from g(2)[OF \<open>x \<in> S\<close>] \<open>x \<in> interior S\<close> have "(g has_field_derivative g' x) (at x)" |
|
1682 |
by (simp add: at_within_interior[of x S]) |
|
61649
268d88ec9087
Tweaks for "real": Removal of [iff] status for some lemmas, adding [simp] for others. Plus fixes.
paulson <lp15@cam.ac.uk>
parents:
61560
diff
changeset
|
1683 |
also have "(g has_field_derivative g' x) (at x) \<longleftrightarrow> |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1684 |
((\<lambda>x. \<Sum>n. f n x) has_field_derivative g' x) (at x)" |
68055 | 1685 |
using eventually_nhds_in_nhd[OF \<open>x \<in> interior S\<close>] interior_subset[of S] g(1) |
61810 | 1686 |
by (intro DERIV_cong_ev) (auto elim!: eventually_mono simp: sums_iff) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1687 |
finally show "((\<lambda>x. \<Sum>n. f n x) has_field_derivative g' x) (at x)" . |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1688 |
qed |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1689 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1690 |
lemma differentiable_series: |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1691 |
fixes f :: "nat \<Rightarrow> ('a :: {real_normed_field,banach}) \<Rightarrow> 'a" |
68055 | 1692 |
assumes "convex S" "open S" |
1693 |
assumes "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x)" |
|
1694 |
assumes "uniformly_convergent_on S (\<lambda>n x. \<Sum>i<n. f' i x)" |
|
1695 |
assumes "x0 \<in> S" "summable (\<lambda>n. f n x0)" and x: "x \<in> S" |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1696 |
shows "summable (\<lambda>n. f n x)" and "(\<lambda>x. \<Sum>n. f n x) differentiable (at x)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1697 |
proof - |
68055 | 1698 |
from assms(4) obtain g' where A: "uniform_limit S (\<lambda>n x. \<Sum>i<n. f' i x) g' sequentially" |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1699 |
unfolding uniformly_convergent_on_def by blast |
68055 | 1700 |
from x and \<open>open S\<close> have S: "at x within S = at x" by (rule at_within_open) |
1701 |
have "\<exists>g. \<forall>x\<in>S. (\<lambda>n. f n x) sums g x \<and> (g has_field_derivative g' x) (at x within S)" |
|
1702 |
by (intro has_field_derivative_series[of S f f' g' x0] assms A has_field_derivative_at_within) |
|
1703 |
then obtain g where g: "\<And>x. x \<in> S \<Longrightarrow> (\<lambda>n. f n x) sums g x" |
|
1704 |
"\<And>x. x \<in> S \<Longrightarrow> (g has_field_derivative g' x) (at x within S)" by blast |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1705 |
from g[OF x] show "summable (\<lambda>n. f n x)" by (auto simp: summable_def) |
69064
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
nipkow
parents:
69020
diff
changeset
|
1706 |
from g(2)[OF x] have g': "(g has_derivative (*) (g' x)) (at x)" |
68055 | 1707 |
by (simp add: has_field_derivative_def S) |
69064
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
nipkow
parents:
69020
diff
changeset
|
1708 |
have "((\<lambda>x. \<Sum>n. f n x) has_derivative (*) (g' x)) (at x)" |
68055 | 1709 |
by (rule has_derivative_transform_within_open[OF g' \<open>open S\<close> x]) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1710 |
(insert g, auto simp: sums_iff) |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1711 |
thus "(\<lambda>x. \<Sum>n. f n x) differentiable (at x)" unfolding differentiable_def |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1712 |
by (auto simp: summable_def differentiable_def has_field_derivative_def) |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1713 |
qed |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1714 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1715 |
lemma differentiable_series': |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1716 |
fixes f :: "nat \<Rightarrow> ('a :: {real_normed_field,banach}) \<Rightarrow> 'a" |
68055 | 1717 |
assumes "convex S" "open S" |
1718 |
assumes "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x)" |
|
1719 |
assumes "uniformly_convergent_on S (\<lambda>n x. \<Sum>i<n. f' i x)" |
|
1720 |
assumes "x0 \<in> S" "summable (\<lambda>n. f n x0)" |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1721 |
shows "(\<lambda>x. \<Sum>n. f n x) differentiable (at x0)" |
68055 | 1722 |
using differentiable_series[OF assms, of x0] \<open>x0 \<in> S\<close> by blast+ |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1723 |
|
68838 | 1724 |
subsection \<open>Derivative as a vector\<close> |
1725 |
||
69597 | 1726 |
text \<open>Considering derivative \<^typ>\<open>real \<Rightarrow> 'b::real_normed_vector\<close> as a vector.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1727 |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1728 |
definition "vector_derivative f net = (SOME f'. (f has_vector_derivative f') net)" |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1729 |
|
61245 | 1730 |
lemma vector_derivative_unique_within: |
68055 | 1731 |
assumes not_bot: "at x within S \<noteq> bot" |
1732 |
and f': "(f has_vector_derivative f') (at x within S)" |
|
1733 |
and f'': "(f has_vector_derivative f'') (at x within S)" |
|
37730 | 1734 |
shows "f' = f''" |
53781 | 1735 |
proof - |
37730 | 1736 |
have "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
68239 | 1737 |
proof (rule frechet_derivative_unique_within, simp_all) |
1738 |
show "\<exists>d. d \<noteq> 0 \<and> \<bar>d\<bar> < e \<and> x + d \<in> S" if "0 < e" for e |
|
1739 |
proof - |
|
1740 |
from that |
|
68055 | 1741 |
obtain x' where "x' \<in> S" "x' \<noteq> x" "\<bar>x' - x\<bar> < e" |
68239 | 1742 |
using islimpt_approachable_real[of x S] not_bot |
61245 | 1743 |
by (auto simp add: trivial_limit_within) |
68239 | 1744 |
then show ?thesis |
82529
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1745 |
using eq_iff_diff_eq_0 by (metis add.commute diff_add_cancel) |
61245 | 1746 |
qed |
68239 | 1747 |
qed (use f' f'' in \<open>auto simp: has_vector_derivative_def\<close>) |
53781 | 1748 |
then show ?thesis |
61649
268d88ec9087
Tweaks for "real": Removal of [iff] status for some lemmas, adding [simp] for others. Plus fixes.
paulson <lp15@cam.ac.uk>
parents:
61560
diff
changeset
|
1749 |
unfolding fun_eq_iff by (metis scaleR_one) |
37730 | 1750 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1751 |
|
61245 | 1752 |
lemma vector_derivative_unique_at: |
1753 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f'') (at x) \<Longrightarrow> f' = f''" |
|
1754 |
by (rule vector_derivative_unique_within) auto |
|
1755 |
||
1756 |
lemma differentiableI_vector: "(f has_vector_derivative y) F \<Longrightarrow> f differentiable F" |
|
1757 |
by (auto simp: differentiable_def has_vector_derivative_def) |
|
1758 |
||
68838 | 1759 |
proposition vector_derivative_works: |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1760 |
"f differentiable net \<longleftrightarrow> (f has_vector_derivative (vector_derivative f net)) net" |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1761 |
(is "?l = ?r") |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1762 |
proof |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1763 |
assume ?l |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1764 |
obtain f' where f': "(f has_derivative f') net" |
60420 | 1765 |
using \<open>?l\<close> unfolding differentiable_def .. |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1766 |
then interpret bounded_linear f' |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1767 |
by auto |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1768 |
show ?r |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1769 |
unfolding vector_derivative_def has_vector_derivative_def |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1770 |
by (rule someI[of _ "f' 1"]) (simp add: scaleR[symmetric] f') |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1771 |
qed (auto simp: vector_derivative_def has_vector_derivative_def differentiable_def) |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1772 |
|
61245 | 1773 |
lemma vector_derivative_within: |
68055 | 1774 |
assumes not_bot: "at x within S \<noteq> bot" and y: "(f has_vector_derivative y) (at x within S)" |
1775 |
shows "vector_derivative f (at x within S) = y" |
|
61245 | 1776 |
using y |
1777 |
by (intro vector_derivative_unique_within[OF not_bot vector_derivative_works[THEN iffD1] y]) |
|
1778 |
(auto simp: differentiable_def has_vector_derivative_def) |
|
1779 |
||
82529
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1780 |
lemma vector_derivative_translate [simp]: |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1781 |
"vector_derivative ((+) z \<circ> g) (at x within A) = vector_derivative g (at x within A)" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1782 |
proof - |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1783 |
have "(((+) z \<circ> g) has_vector_derivative g') (at x within A)" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1784 |
if "(g has_vector_derivative g') (at x within A)" for g :: "real \<Rightarrow> 'a" and z g' |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1785 |
unfolding o_def using that by (auto intro!: derivative_eq_intros) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1786 |
from this[of g _ z] this[of "\<lambda>x. z + g x" _ "-z"] show ?thesis |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1787 |
unfolding vector_derivative_def |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1788 |
by (intro arg_cong[where f = Eps] ext) (auto simp: o_def algebra_simps) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1789 |
qed |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
1790 |
|
73928
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1791 |
lemma deriv_of_real [simp]: |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1792 |
"at x within A \<noteq> bot \<Longrightarrow> vector_derivative of_real (at x within A) = 1" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1793 |
by (auto intro!: vector_derivative_within derivative_eq_intros) |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1794 |
|
61520
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1795 |
lemma frechet_derivative_eq_vector_derivative: |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1796 |
assumes "f differentiable (at x)" |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1797 |
shows "(frechet_derivative f (at x)) = (\<lambda>r. r *\<^sub>R vector_derivative f (at x))" |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1798 |
using assms |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1799 |
by (auto simp: differentiable_iff_scaleR vector_derivative_def has_vector_derivative_def |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1800 |
intro: someI frechet_derivative_at [symmetric]) |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1801 |
|
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1802 |
lemma has_real_derivative: |
61649
268d88ec9087
Tweaks for "real": Removal of [iff] status for some lemmas, adding [simp] for others. Plus fixes.
paulson <lp15@cam.ac.uk>
parents:
61560
diff
changeset
|
1803 |
fixes f :: "real \<Rightarrow> real" |
61520
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1804 |
assumes "(f has_derivative f') F" |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1805 |
obtains c where "(f has_real_derivative c) F" |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1806 |
proof - |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1807 |
obtain c where "f' = (\<lambda>x. x * c)" |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1808 |
by (metis assms has_derivative_bounded_linear real_bounded_linear) |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1809 |
then show ?thesis |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1810 |
by (metis assms that has_field_derivative_def mult_commute_abs) |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1811 |
qed |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1812 |
|
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1813 |
lemma has_real_derivative_iff: |
61649
268d88ec9087
Tweaks for "real": Removal of [iff] status for some lemmas, adding [simp] for others. Plus fixes.
paulson <lp15@cam.ac.uk>
parents:
61560
diff
changeset
|
1814 |
fixes f :: "real \<Rightarrow> real" |
61520
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1815 |
shows "(\<exists>c. (f has_real_derivative c) F) = (\<exists>D. (f has_derivative D) F)" |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1816 |
by (metis has_field_derivative_def has_real_derivative) |
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61518
diff
changeset
|
1817 |
|
64008
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
hoelzl
parents:
63955
diff
changeset
|
1818 |
lemma has_vector_derivative_cong_ev: |
68055 | 1819 |
assumes *: "eventually (\<lambda>x. x \<in> S \<longrightarrow> f x = g x) (nhds x)" "f x = g x" |
1820 |
shows "(f has_vector_derivative f') (at x within S) = (g has_vector_derivative f') (at x within S)" |
|
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1821 |
proof (cases "at x within S = bot") |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1822 |
case True |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1823 |
then show ?thesis |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1824 |
by (simp add: has_derivative_def has_vector_derivative_def) |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1825 |
next |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1826 |
case False |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1827 |
then show ?thesis |
64008
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
hoelzl
parents:
63955
diff
changeset
|
1828 |
unfolding has_vector_derivative_def has_derivative_def |
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
hoelzl
parents:
63955
diff
changeset
|
1829 |
using * |
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
hoelzl
parents:
63955
diff
changeset
|
1830 |
apply (intro refl conj_cong filterlim_cong) |
70065
cc89a395b5a3
Free_Abelian_Groups finally working; fixed some duplicates; cleaned up some proofs
paulson <lp15@cam.ac.uk>
parents:
69712
diff
changeset
|
1831 |
apply (auto simp: Lim_ident_at eventually_at_filter elim: eventually_mono) |
64008
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
hoelzl
parents:
63955
diff
changeset
|
1832 |
done |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1833 |
qed |
64008
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
hoelzl
parents:
63955
diff
changeset
|
1834 |
|
73928
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1835 |
lemma vector_derivative_cong_eq: |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1836 |
assumes "eventually (\<lambda>x. x \<in> A \<longrightarrow> f x = g x) (nhds x)" "x = y" "A = B" "x \<in> A" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1837 |
shows "vector_derivative f (at x within A) = vector_derivative g (at y within B)" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1838 |
proof - |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1839 |
have "f x = g x" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1840 |
using assms eventually_nhds_x_imp_x by blast |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1841 |
hence "(\<lambda>D. (f has_vector_derivative D) (at x within A)) = |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1842 |
(\<lambda>D. (g has_vector_derivative D) (at x within A))" using assms |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1843 |
by (intro ext has_vector_derivative_cong_ev refl assms) simp_all |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1844 |
thus ?thesis by (simp add: vector_derivative_def assms) |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1845 |
qed |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
1846 |
|
61245 | 1847 |
lemma islimpt_closure_open: |
1848 |
fixes s :: "'a::perfect_space set" |
|
1849 |
assumes "open s" and t: "t = closure s" "x \<in> t" |
|
1850 |
shows "x islimpt t" |
|
1851 |
proof cases |
|
61649
268d88ec9087
Tweaks for "real": Removal of [iff] status for some lemmas, adding [simp] for others. Plus fixes.
paulson <lp15@cam.ac.uk>
parents:
61560
diff
changeset
|
1852 |
assume "x \<in> s" |
61245 | 1853 |
{ fix T assume "x \<in> T" "open T" |
1854 |
then have "open (s \<inter> T)" |
|
1855 |
using \<open>open s\<close> by auto |
|
1856 |
then have "s \<inter> T \<noteq> {x}" |
|
1857 |
using not_open_singleton[of x] by auto |
|
1858 |
with \<open>x \<in> T\<close> \<open>x \<in> s\<close> have "\<exists>y\<in>t. y \<in> T \<and> y \<noteq> x" |
|
1859 |
using closure_subset[of s] by (auto simp: t) } |
|
1860 |
then show ?thesis |
|
1861 |
by (auto intro!: islimptI) |
|
1862 |
next |
|
1863 |
assume "x \<notin> s" with t show ?thesis |
|
1864 |
unfolding t closure_def by (auto intro: islimpt_subset) |
|
1865 |
qed |
|
1866 |
||
44123 | 1867 |
lemma vector_derivative_unique_within_closed_interval: |
61245 | 1868 |
assumes ab: "a < b" "x \<in> cbox a b" |
1869 |
assumes D: "(f has_vector_derivative f') (at x within cbox a b)" "(f has_vector_derivative f'') (at x within cbox a b)" |
|
44123 | 1870 |
shows "f' = f''" |
61245 | 1871 |
using ab |
1872 |
by (intro vector_derivative_unique_within[OF _ D]) |
|
1873 |
(auto simp: trivial_limit_within intro!: islimpt_closure_open[where s="{a <..< b}"]) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1874 |
|
37730 | 1875 |
lemma vector_derivative_at: |
53781 | 1876 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> vector_derivative f (at x) = f'" |
61245 | 1877 |
by (intro vector_derivative_within at_neq_bot) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1878 |
|
61104
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1879 |
lemma has_vector_derivative_id_at [simp]: "vector_derivative (\<lambda>x. x) (at a) = 1" |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1880 |
by (simp add: vector_derivative_at) |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1881 |
|
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1882 |
lemma vector_derivative_minus_at [simp]: |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1883 |
"f differentiable at a |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1884 |
\<Longrightarrow> vector_derivative (\<lambda>x. - f x) (at a) = - vector_derivative f (at a)" |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1885 |
by (simp add: vector_derivative_at has_vector_derivative_minus vector_derivative_works [symmetric]) |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1886 |
|
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1887 |
lemma vector_derivative_add_at [simp]: |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1888 |
"\<lbrakk>f differentiable at a; g differentiable at a\<rbrakk> |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1889 |
\<Longrightarrow> vector_derivative (\<lambda>x. f x + g x) (at a) = vector_derivative f (at a) + vector_derivative g (at a)" |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1890 |
by (simp add: vector_derivative_at has_vector_derivative_add vector_derivative_works [symmetric]) |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1891 |
|
73885
26171a89466a
A few useful lemmas about derivatives, colinearity and other topics
paulson <lp15@cam.ac.uk>
parents:
73795
diff
changeset
|
1892 |
lemma vector_derivative_diff_at [simp,derivative_intros]: |
61104
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1893 |
"\<lbrakk>f differentiable at a; g differentiable at a\<rbrakk> |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1894 |
\<Longrightarrow> vector_derivative (\<lambda>x. f x - g x) (at a) = vector_derivative f (at a) - vector_derivative g (at a)" |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1895 |
by (simp add: vector_derivative_at has_vector_derivative_diff vector_derivative_works [symmetric]) |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
1896 |
|
61204 | 1897 |
lemma vector_derivative_mult_at [simp]: |
1898 |
fixes f g :: "real \<Rightarrow> 'a :: real_normed_algebra" |
|
1899 |
shows "\<lbrakk>f differentiable at a; g differentiable at a\<rbrakk> |
|
1900 |
\<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" |
|
1901 |
by (simp add: vector_derivative_at has_vector_derivative_mult vector_derivative_works [symmetric]) |
|
1902 |
||
1903 |
lemma vector_derivative_scaleR_at [simp]: |
|
1904 |
"\<lbrakk>f differentiable at a; g differentiable at a\<rbrakk> |
|
1905 |
\<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" |
|
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1906 |
apply (intro vector_derivative_at has_vector_derivative_scaleR) |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1907 |
apply (auto simp: vector_derivative_works has_vector_derivative_def has_field_derivative_def mult_commute_abs) |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1908 |
done |
61204 | 1909 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1910 |
lemma vector_derivative_within_cbox: |
61245 | 1911 |
assumes ab: "a < b" "x \<in> cbox a b" |
1912 |
assumes f: "(f has_vector_derivative f') (at x within cbox a b)" |
|
56188 | 1913 |
shows "vector_derivative f (at x within cbox a b) = f'" |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
1914 |
by (metis assms box_real(2) f islimpt_Icc trivial_limit_within vector_derivative_within) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1915 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1916 |
lemma vector_derivative_within_closed_interval: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1917 |
fixes f::"real \<Rightarrow> 'a::euclidean_space" |
68239 | 1918 |
assumes "a < b" and "x \<in> {a..b}" |
1919 |
assumes "(f has_vector_derivative f') (at x within {a..b})" |
|
1920 |
shows "vector_derivative f (at x within {a..b}) = f'" |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1921 |
using assms vector_derivative_within_cbox |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1922 |
by fastforce |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1923 |
|
53781 | 1924 |
lemma has_vector_derivative_within_subset: |
68239 | 1925 |
"(f has_vector_derivative f') (at x within S) \<Longrightarrow> T \<subseteq> S \<Longrightarrow> (f has_vector_derivative f') (at x within T)" |
72445
2c2de074832e
tidying and removal of legacy name
paulson <lp15@cam.ac.uk>
parents:
71633
diff
changeset
|
1926 |
by (auto simp: has_vector_derivative_def intro: has_derivative_subset) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1927 |
|
44123 | 1928 |
lemma has_vector_derivative_at_within: |
68239 | 1929 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f') (at x within S)" |
44123 | 1930 |
unfolding has_vector_derivative_def |
67979
53323937ee25
new material about vec, real^1, etc.
paulson <lp15@cam.ac.uk>
parents:
67968
diff
changeset
|
1931 |
by (rule has_derivative_at_withinI) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1932 |
|
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61824
diff
changeset
|
1933 |
lemma has_vector_derivative_weaken: |
68239 | 1934 |
fixes x D and f g S T |
1935 |
assumes f: "(f has_vector_derivative D) (at x within T)" |
|
1936 |
and "x \<in> S" "S \<subseteq> T" |
|
1937 |
and "\<And>x. x \<in> S \<Longrightarrow> f x = g x" |
|
1938 |
shows "(g has_vector_derivative D) (at x within S)" |
|
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61824
diff
changeset
|
1939 |
proof - |
68239 | 1940 |
have "(f has_vector_derivative D) (at x within S) \<longleftrightarrow> (g has_vector_derivative D) (at x within S)" |
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61824
diff
changeset
|
1941 |
unfolding has_vector_derivative_def has_derivative_iff_norm |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61824
diff
changeset
|
1942 |
using assms by (intro conj_cong Lim_cong_within refl) auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61824
diff
changeset
|
1943 |
then show ?thesis |
68239 | 1944 |
using has_vector_derivative_within_subset[OF f \<open>S \<subseteq> T\<close>] by simp |
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61824
diff
changeset
|
1945 |
qed |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61824
diff
changeset
|
1946 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1947 |
lemma has_vector_derivative_transform_within: |
68239 | 1948 |
assumes "(f has_vector_derivative f') (at x within S)" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
61975
diff
changeset
|
1949 |
and "0 < d" |
68239 | 1950 |
and "x \<in> S" |
1951 |
and "\<And>x'. \<lbrakk>x'\<in>S; dist x' x < d\<rbrakk> \<Longrightarrow> f x' = g x'" |
|
1952 |
shows "(g has_vector_derivative f') (at x within S)" |
|
53781 | 1953 |
using assms |
1954 |
unfolding has_vector_derivative_def |
|
44123 | 1955 |
by (rule has_derivative_transform_within) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1956 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1957 |
lemma has_vector_derivative_transform_within_open: |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
61975
diff
changeset
|
1958 |
assumes "(f has_vector_derivative f') (at x)" |
68239 | 1959 |
and "open S" |
1960 |
and "x \<in> S" |
|
1961 |
and "\<And>y. y\<in>S \<Longrightarrow> f y = g y" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1962 |
shows "(g has_vector_derivative f') (at x)" |
53781 | 1963 |
using assms |
1964 |
unfolding has_vector_derivative_def |
|
44123 | 1965 |
by (rule has_derivative_transform_within_open) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1966 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1967 |
lemma has_vector_derivative_transform: |
68239 | 1968 |
assumes "x \<in> S" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" |
1969 |
assumes f': "(f has_vector_derivative f') (at x within S)" |
|
1970 |
shows "(g has_vector_derivative f') (at x within S)" |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1971 |
using assms |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1972 |
unfolding has_vector_derivative_def |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1973 |
by (rule has_derivative_transform) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1974 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1975 |
lemma vector_diff_chain_at: |
44123 | 1976 |
assumes "(f has_vector_derivative f') (at x)" |
53781 | 1977 |
and "(g has_vector_derivative g') (at (f x))" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1978 |
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x)" |
68239 | 1979 |
using assms has_vector_derivative_at_within has_vector_derivative_def vector_derivative_diff_chain_within by blast |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1980 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1981 |
lemma vector_diff_chain_within: |
44123 | 1982 |
assumes "(f has_vector_derivative f') (at x within s)" |
53781 | 1983 |
and "(g has_vector_derivative g') (at (f x) within f ` s)" |
1984 |
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x within s)" |
|
68239 | 1985 |
using assms has_vector_derivative_def vector_derivative_diff_chain_within by blast |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1986 |
|
60762 | 1987 |
lemma vector_derivative_const_at [simp]: "vector_derivative (\<lambda>x. c) (at a) = 0" |
1988 |
by (simp add: vector_derivative_at) |
|
1989 |
||
60800
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
1990 |
lemma vector_derivative_at_within_ivl: |
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
1991 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> |
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
1992 |
a \<le> x \<Longrightarrow> x \<le> b \<Longrightarrow> a<b \<Longrightarrow> vector_derivative f (at x within {a..b}) = f'" |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
1993 |
using has_vector_derivative_at_within vector_derivative_within_cbox by fastforce |
60800
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
1994 |
|
61204 | 1995 |
lemma vector_derivative_chain_at: |
1996 |
assumes "f differentiable at x" "(g differentiable at (f x))" |
|
1997 |
shows "vector_derivative (g \<circ> f) (at x) = |
|
1998 |
vector_derivative f (at x) *\<^sub>R vector_derivative g (at (f x))" |
|
1999 |
by (metis vector_diff_chain_at vector_derivative_at vector_derivative_works assms) |
|
2000 |
||
62408
86f27b264d3d
Conformal_mappings: a big development in complex analysis (+ some lemmas)
paulson <lp15@cam.ac.uk>
parents:
62393
diff
changeset
|
2001 |
lemma field_vector_diff_chain_at: (*thanks to Wenda Li*) |
86f27b264d3d
Conformal_mappings: a big development in complex analysis (+ some lemmas)
paulson <lp15@cam.ac.uk>
parents:
62393
diff
changeset
|
2002 |
assumes Df: "(f has_vector_derivative f') (at x)" |
86f27b264d3d
Conformal_mappings: a big development in complex analysis (+ some lemmas)
paulson <lp15@cam.ac.uk>
parents:
62393
diff
changeset
|
2003 |
and Dg: "(g has_field_derivative g') (at (f x))" |
86f27b264d3d
Conformal_mappings: a big development in complex analysis (+ some lemmas)
paulson <lp15@cam.ac.uk>
parents:
62393
diff
changeset
|
2004 |
shows "((g \<circ> f) has_vector_derivative (f' * g')) (at x)" |
86f27b264d3d
Conformal_mappings: a big development in complex analysis (+ some lemmas)
paulson <lp15@cam.ac.uk>
parents:
62393
diff
changeset
|
2005 |
using diff_chain_at[OF Df[unfolded has_vector_derivative_def] |
86f27b264d3d
Conformal_mappings: a big development in complex analysis (+ some lemmas)
paulson <lp15@cam.ac.uk>
parents:
62393
diff
changeset
|
2006 |
Dg [unfolded has_field_derivative_def]] |
86f27b264d3d
Conformal_mappings: a big development in complex analysis (+ some lemmas)
paulson <lp15@cam.ac.uk>
parents:
62393
diff
changeset
|
2007 |
by (auto simp: o_def mult.commute has_vector_derivative_def) |
86f27b264d3d
Conformal_mappings: a big development in complex analysis (+ some lemmas)
paulson <lp15@cam.ac.uk>
parents:
62393
diff
changeset
|
2008 |
|
64394 | 2009 |
lemma vector_derivative_chain_within: |
68239 | 2010 |
assumes "at x within S \<noteq> bot" "f differentiable (at x within S)" |
2011 |
"(g has_derivative g') (at (f x) within f ` S)" |
|
2012 |
shows "vector_derivative (g \<circ> f) (at x within S) = |
|
2013 |
g' (vector_derivative f (at x within S)) " |
|
2014 |
apply (rule vector_derivative_within [OF \<open>at x within S \<noteq> bot\<close>]) |
|
64394 | 2015 |
apply (rule vector_derivative_diff_chain_within) |
2016 |
using assms(2-3) vector_derivative_works |
|
2017 |
by auto |
|
2018 |
||
69553 | 2019 |
subsection \<open>Field differentiability\<close> |
64394 | 2020 |
|
70136 | 2021 |
definition\<^marker>\<open>tag important\<close> field_differentiable :: "['a \<Rightarrow> 'a::real_normed_field, 'a filter] \<Rightarrow> bool" |
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
79566
diff
changeset
|
2022 |
(infixr \<open>(field'_differentiable)\<close> 50) |
64394 | 2023 |
where "f field_differentiable F \<equiv> \<exists>f'. (f has_field_derivative f') F" |
2024 |
||
2025 |
lemma field_differentiable_imp_differentiable: |
|
2026 |
"f field_differentiable F \<Longrightarrow> f differentiable F" |
|
2027 |
unfolding field_differentiable_def differentiable_def |
|
2028 |
using has_field_derivative_imp_has_derivative by auto |
|
2029 |
||
2030 |
lemma field_differentiable_imp_continuous_at: |
|
68239 | 2031 |
"f field_differentiable (at x within S) \<Longrightarrow> continuous (at x within S) f" |
64394 | 2032 |
by (metis DERIV_continuous field_differentiable_def) |
2033 |
||
2034 |
lemma field_differentiable_within_subset: |
|
68239 | 2035 |
"\<lbrakk>f field_differentiable (at x within S); T \<subseteq> S\<rbrakk> \<Longrightarrow> f field_differentiable (at x within T)" |
64394 | 2036 |
by (metis DERIV_subset field_differentiable_def) |
2037 |
||
2038 |
lemma field_differentiable_at_within: |
|
2039 |
"\<lbrakk>f field_differentiable (at x)\<rbrakk> |
|
68239 | 2040 |
\<Longrightarrow> f field_differentiable (at x within S)" |
64394 | 2041 |
unfolding field_differentiable_def |
2042 |
by (metis DERIV_subset top_greatest) |
|
2043 |
||
69064
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
nipkow
parents:
69020
diff
changeset
|
2044 |
lemma field_differentiable_linear [simp,derivative_intros]: "((*) c) field_differentiable F" |
68239 | 2045 |
unfolding field_differentiable_def has_field_derivative_def mult_commute_abs |
2046 |
by (force intro: has_derivative_mult_right) |
|
64394 | 2047 |
|
2048 |
lemma field_differentiable_const [simp,derivative_intros]: "(\<lambda>z. c) field_differentiable F" |
|
2049 |
unfolding field_differentiable_def has_field_derivative_def |
|
2050 |
using DERIV_const has_field_derivative_imp_has_derivative by blast |
|
2051 |
||
2052 |
lemma field_differentiable_ident [simp,derivative_intros]: "(\<lambda>z. z) field_differentiable F" |
|
2053 |
unfolding field_differentiable_def has_field_derivative_def |
|
2054 |
using DERIV_ident has_field_derivative_def by blast |
|
2055 |
||
2056 |
lemma field_differentiable_id [simp,derivative_intros]: "id field_differentiable F" |
|
2057 |
unfolding id_def by (rule field_differentiable_ident) |
|
2058 |
||
2059 |
lemma field_differentiable_minus [derivative_intros]: |
|
2060 |
"f field_differentiable F \<Longrightarrow> (\<lambda>z. - (f z)) field_differentiable F" |
|
75078
ec86cb2418e1
an assortment of new or stronger lemmas
paulson <lp15@cam.ac.uk>
parents:
74969
diff
changeset
|
2061 |
unfolding field_differentiable_def by (metis field_differentiable_minus) |
ec86cb2418e1
an assortment of new or stronger lemmas
paulson <lp15@cam.ac.uk>
parents:
74969
diff
changeset
|
2062 |
|
ec86cb2418e1
an assortment of new or stronger lemmas
paulson <lp15@cam.ac.uk>
parents:
74969
diff
changeset
|
2063 |
lemma field_differentiable_diff_const [simp,derivative_intros]: |
ec86cb2418e1
an assortment of new or stronger lemmas
paulson <lp15@cam.ac.uk>
parents:
74969
diff
changeset
|
2064 |
"(-)c field_differentiable F" |
ec86cb2418e1
an assortment of new or stronger lemmas
paulson <lp15@cam.ac.uk>
parents:
74969
diff
changeset
|
2065 |
unfolding field_differentiable_def by (rule derivative_eq_intros exI | force)+ |
64394 | 2066 |
|
2067 |
lemma field_differentiable_add [derivative_intros]: |
|
2068 |
assumes "f field_differentiable F" "g field_differentiable F" |
|
2069 |
shows "(\<lambda>z. f z + g z) field_differentiable F" |
|
2070 |
using assms unfolding field_differentiable_def |
|
2071 |
by (metis field_differentiable_add) |
|
2072 |
||
2073 |
lemma field_differentiable_add_const [simp,derivative_intros]: |
|
67399 | 2074 |
"(+) c field_differentiable F" |
64394 | 2075 |
by (simp add: field_differentiable_add) |
2076 |
||
2077 |
lemma field_differentiable_sum [derivative_intros]: |
|
2078 |
"(\<And>i. i \<in> I \<Longrightarrow> (f i) field_differentiable F) \<Longrightarrow> (\<lambda>z. \<Sum>i\<in>I. f i z) field_differentiable F" |
|
2079 |
by (induct I rule: infinite_finite_induct) |
|
2080 |
(auto intro: field_differentiable_add field_differentiable_const) |
|
2081 |
||
2082 |
lemma field_differentiable_diff [derivative_intros]: |
|
2083 |
assumes "f field_differentiable F" "g field_differentiable F" |
|
2084 |
shows "(\<lambda>z. f z - g z) field_differentiable F" |
|
2085 |
using assms unfolding field_differentiable_def |
|
2086 |
by (metis field_differentiable_diff) |
|
2087 |
||
2088 |
lemma field_differentiable_inverse [derivative_intros]: |
|
68239 | 2089 |
assumes "f field_differentiable (at a within S)" "f a \<noteq> 0" |
2090 |
shows "(\<lambda>z. inverse (f z)) field_differentiable (at a within S)" |
|
64394 | 2091 |
using assms unfolding field_differentiable_def |
2092 |
by (metis DERIV_inverse_fun) |
|
2093 |
||
2094 |
lemma field_differentiable_mult [derivative_intros]: |
|
68239 | 2095 |
assumes "f field_differentiable (at a within S)" |
2096 |
"g field_differentiable (at a within S)" |
|
2097 |
shows "(\<lambda>z. f z * g z) field_differentiable (at a within S)" |
|
64394 | 2098 |
using assms unfolding field_differentiable_def |
68239 | 2099 |
by (metis DERIV_mult [of f _ a S g]) |
64394 | 2100 |
|
2101 |
lemma field_differentiable_divide [derivative_intros]: |
|
68239 | 2102 |
assumes "f field_differentiable (at a within S)" |
2103 |
"g field_differentiable (at a within S)" |
|
64394 | 2104 |
"g a \<noteq> 0" |
68239 | 2105 |
shows "(\<lambda>z. f z / g z) field_differentiable (at a within S)" |
64394 | 2106 |
using assms unfolding field_differentiable_def |
68239 | 2107 |
by (metis DERIV_divide [of f _ a S g]) |
64394 | 2108 |
|
2109 |
lemma field_differentiable_power [derivative_intros]: |
|
68239 | 2110 |
assumes "f field_differentiable (at a within S)" |
2111 |
shows "(\<lambda>z. f z ^ n) field_differentiable (at a within S)" |
|
64394 | 2112 |
using assms unfolding field_differentiable_def |
2113 |
by (metis DERIV_power) |
|
2114 |
||
77166
0fb350e7477b
More new material thanks to Manuel
paulson <lp15@cam.ac.uk>
parents:
77140
diff
changeset
|
2115 |
lemma field_differentiable_cnj_cnj: |
0fb350e7477b
More new material thanks to Manuel
paulson <lp15@cam.ac.uk>
parents:
77140
diff
changeset
|
2116 |
assumes "f field_differentiable (at (cnj z))" |
0fb350e7477b
More new material thanks to Manuel
paulson <lp15@cam.ac.uk>
parents:
77140
diff
changeset
|
2117 |
shows "(cnj \<circ> f \<circ> cnj) field_differentiable (at z)" |
0fb350e7477b
More new material thanks to Manuel
paulson <lp15@cam.ac.uk>
parents:
77140
diff
changeset
|
2118 |
using has_field_derivative_cnj_cnj assms |
0fb350e7477b
More new material thanks to Manuel
paulson <lp15@cam.ac.uk>
parents:
77140
diff
changeset
|
2119 |
by (auto simp: field_differentiable_def) |
0fb350e7477b
More new material thanks to Manuel
paulson <lp15@cam.ac.uk>
parents:
77140
diff
changeset
|
2120 |
|
64394 | 2121 |
lemma field_differentiable_transform_within: |
2122 |
"0 < d \<Longrightarrow> |
|
68239 | 2123 |
x \<in> S \<Longrightarrow> |
2124 |
(\<And>x'. x' \<in> S \<Longrightarrow> dist x' x < d \<Longrightarrow> f x' = g x') \<Longrightarrow> |
|
2125 |
f field_differentiable (at x within S) |
|
2126 |
\<Longrightarrow> g field_differentiable (at x within S)" |
|
64394 | 2127 |
unfolding field_differentiable_def has_field_derivative_def |
2128 |
by (blast intro: has_derivative_transform_within) |
|
2129 |
||
2130 |
lemma field_differentiable_compose_within: |
|
68239 | 2131 |
assumes "f field_differentiable (at a within S)" |
2132 |
"g field_differentiable (at (f a) within f`S)" |
|
2133 |
shows "(g o f) field_differentiable (at a within S)" |
|
64394 | 2134 |
using assms unfolding field_differentiable_def |
2135 |
by (metis DERIV_image_chain) |
|
2136 |
||
2137 |
lemma field_differentiable_compose: |
|
2138 |
"f field_differentiable at z \<Longrightarrow> g field_differentiable at (f z) |
|
2139 |
\<Longrightarrow> (g o f) field_differentiable at z" |
|
2140 |
by (metis field_differentiable_at_within field_differentiable_compose_within) |
|
2141 |
||
2142 |
lemma field_differentiable_within_open: |
|
68239 | 2143 |
"\<lbrakk>a \<in> S; open S\<rbrakk> \<Longrightarrow> f field_differentiable at a within S \<longleftrightarrow> |
64394 | 2144 |
f field_differentiable at a" |
2145 |
unfolding field_differentiable_def |
|
2146 |
by (metis at_within_open) |
|
2147 |
||
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2148 |
lemma exp_scaleR_has_vector_derivative_right: |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2149 |
"((\<lambda>t. exp (t *\<^sub>R A)) has_vector_derivative exp (t *\<^sub>R A) * A) (at t within T)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2150 |
unfolding has_vector_derivative_def |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2151 |
proof (rule has_derivativeI) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2152 |
let ?F = "at t within (T \<inter> {t - 1 <..< t + 1})" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2153 |
have *: "at t within T = ?F" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2154 |
by (rule at_within_nhd[where S="{t - 1 <..< t + 1}"]) auto |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2155 |
let ?e = "\<lambda>i x. (inverse (1 + real i) * inverse (fact i) * (x - t) ^ i) *\<^sub>R (A * A ^ i)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2156 |
have "\<forall>\<^sub>F n in sequentially. |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2157 |
\<forall>x\<in>T \<inter> {t - 1<..<t + 1}. norm (?e n x) \<le> norm (A ^ (n + 1) /\<^sub>R fact (n + 1))" |
70817
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2158 |
apply (auto simp: algebra_split_simps intro!: eventuallyI) |
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2159 |
apply (rule mult_left_mono) |
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2160 |
apply (auto simp add: field_simps power_abs intro!: divide_right_mono power_le_one) |
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2161 |
done |
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2162 |
then have "uniform_limit (T \<inter> {t - 1<..<t + 1}) (\<lambda>n x. \<Sum>i<n. ?e i x) (\<lambda>x. \<Sum>i. ?e i x) sequentially" |
69529 | 2163 |
by (rule Weierstrass_m_test_ev) (intro summable_ignore_initial_segment summable_norm_exp) |
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2164 |
moreover |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2165 |
have "\<forall>\<^sub>F x in sequentially. x > 0" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2166 |
by (metis eventually_gt_at_top) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2167 |
then have |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2168 |
"\<forall>\<^sub>F n in sequentially. ((\<lambda>x. \<Sum>i<n. ?e i x) \<longlongrightarrow> A) ?F" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2169 |
by eventually_elim |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2170 |
(auto intro!: tendsto_eq_intros |
69529 | 2171 |
simp: power_0_left if_distrib if_distribR |
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2172 |
cong: if_cong) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2173 |
ultimately |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2174 |
have [tendsto_intros]: "((\<lambda>x. \<Sum>i. ?e i x) \<longlongrightarrow> A) ?F" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2175 |
by (auto intro!: swap_uniform_limit[where f="\<lambda>n x. \<Sum>i < n. ?e i x" and F = sequentially]) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2176 |
have [tendsto_intros]: "((\<lambda>x. if x = t then 0 else 1) \<longlongrightarrow> 1) ?F" |
70365
4df0628e8545
a few new lemmas and a bit of tidying
paulson <lp15@cam.ac.uk>
parents:
70346
diff
changeset
|
2177 |
by (rule tendsto_eventually) (simp add: eventually_at_filter) |
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2178 |
have "((\<lambda>y. ((y - t) / abs (y - t)) *\<^sub>R ((\<Sum>n. ?e n y) - A)) \<longlongrightarrow> 0) (at t within T)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2179 |
unfolding * |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2180 |
by (rule tendsto_norm_zero_cancel) (auto intro!: tendsto_eq_intros) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2181 |
|
68239 | 2182 |
moreover have "\<forall>\<^sub>F x in at t within T. x \<noteq> t" |
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2183 |
by (simp add: eventually_at_filter) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2184 |
then have "\<forall>\<^sub>F x in at t within T. ((x - t) / \<bar>x - t\<bar>) *\<^sub>R ((\<Sum>n. ?e n x) - A) = |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2185 |
(exp ((x - t) *\<^sub>R A) - 1 - (x - t) *\<^sub>R A) /\<^sub>R norm (x - t)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2186 |
proof eventually_elim |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2187 |
case (elim x) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2188 |
have "(exp ((x - t) *\<^sub>R A) - 1 - (x - t) *\<^sub>R A) /\<^sub>R norm (x - t) = |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2189 |
((\<Sum>n. (x - t) *\<^sub>R ?e n x) - (x - t) *\<^sub>R A) /\<^sub>R norm (x - t)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2190 |
unfolding exp_first_term |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2191 |
by (simp add: ac_simps) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2192 |
also |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2193 |
have "summable (\<lambda>n. ?e n x)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2194 |
proof - |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2195 |
from elim have "?e n x = (((x - t) *\<^sub>R A) ^ (n + 1)) /\<^sub>R fact (n + 1) /\<^sub>R (x - t)" for n |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2196 |
by simp |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2197 |
then show ?thesis |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2198 |
by (auto simp only: |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2199 |
intro!: summable_scaleR_right summable_ignore_initial_segment summable_exp_generic) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2200 |
qed |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2201 |
then have "(\<Sum>n. (x - t) *\<^sub>R ?e n x) = (x - t) *\<^sub>R (\<Sum>n. ?e n x)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2202 |
by (rule suminf_scaleR_right[symmetric]) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2203 |
also have "(\<dots> - (x - t) *\<^sub>R A) /\<^sub>R norm (x - t) = (x - t) *\<^sub>R ((\<Sum>n. ?e n x) - A) /\<^sub>R norm (x - t)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2204 |
by (simp add: algebra_simps) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2205 |
finally show ?case |
70817
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2206 |
by simp (simp add: field_simps) |
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2207 |
qed |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2208 |
|
68239 | 2209 |
ultimately have "((\<lambda>y. (exp ((y - t) *\<^sub>R A) - 1 - (y - t) *\<^sub>R A) /\<^sub>R norm (y - t)) \<longlongrightarrow> 0) (at t within T)" |
70532
fcf3b891ccb1
new material; rotated premises of Lim_transform_eventually
paulson <lp15@cam.ac.uk>
parents:
70381
diff
changeset
|
2210 |
by (rule Lim_transform_eventually) |
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2211 |
from tendsto_mult_right_zero[OF this, where c="exp (t *\<^sub>R A)"] |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2212 |
show "((\<lambda>y. (exp (y *\<^sub>R A) - exp (t *\<^sub>R A) - (y - t) *\<^sub>R (exp (t *\<^sub>R A) * A)) /\<^sub>R norm (y - t)) \<longlongrightarrow> 0) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2213 |
(at t within T)" |
70532
fcf3b891ccb1
new material; rotated premises of Lim_transform_eventually
paulson <lp15@cam.ac.uk>
parents:
70381
diff
changeset
|
2214 |
by (rule Lim_transform_eventually) |
71633 | 2215 |
(auto simp: field_split_simps exp_add_commuting[symmetric]) |
62949
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2216 |
qed (rule bounded_linear_scaleR_left) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2217 |
|
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2218 |
lemma exp_times_scaleR_commute: "exp (t *\<^sub>R A) * A = A * exp (t *\<^sub>R A)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2219 |
using exp_times_arg_commute[symmetric, of "t *\<^sub>R A"] |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2220 |
by (auto simp: algebra_simps) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2221 |
|
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2222 |
lemma exp_scaleR_has_vector_derivative_left: "((\<lambda>t. exp (t *\<^sub>R A)) has_vector_derivative A * exp (t *\<^sub>R A)) (at t)" |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2223 |
using exp_scaleR_has_vector_derivative_right[of A t] |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2224 |
by (simp add: exp_times_scaleR_commute) |
f36a54da47a4
added derivative of scaling in exponential function
immler
parents:
62533
diff
changeset
|
2225 |
|
71167
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2226 |
lemma field_differentiable_series: |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2227 |
fixes f :: "nat \<Rightarrow> 'a::{real_normed_field,banach} \<Rightarrow> 'a" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2228 |
assumes "convex S" "open S" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2229 |
assumes "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2230 |
assumes "uniformly_convergent_on S (\<lambda>n x. \<Sum>i<n. f' i x)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2231 |
assumes "x0 \<in> S" "summable (\<lambda>n. f n x0)" and x: "x \<in> S" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2232 |
shows "(\<lambda>x. \<Sum>n. f n x) field_differentiable (at x)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2233 |
proof - |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2234 |
from assms(4) obtain g' where A: "uniform_limit S (\<lambda>n x. \<Sum>i<n. f' i x) g' sequentially" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2235 |
unfolding uniformly_convergent_on_def by blast |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2236 |
from x and \<open>open S\<close> have S: "at x within S = at x" by (rule at_within_open) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2237 |
have "\<exists>g. \<forall>x\<in>S. (\<lambda>n. f n x) sums g x \<and> (g has_field_derivative g' x) (at x within S)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2238 |
by (intro has_field_derivative_series[of S f f' g' x0] assms A has_field_derivative_at_within) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2239 |
then obtain g where g: "\<And>x. x \<in> S \<Longrightarrow> (\<lambda>n. f n x) sums g x" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2240 |
"\<And>x. x \<in> S \<Longrightarrow> (g has_field_derivative g' x) (at x within S)" by blast |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2241 |
from g(2)[OF x] have g': "(g has_derivative (*) (g' x)) (at x)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2242 |
by (simp add: has_field_derivative_def S) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2243 |
have "((\<lambda>x. \<Sum>n. f n x) has_derivative (*) (g' x)) (at x)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2244 |
by (rule has_derivative_transform_within_open[OF g' \<open>open S\<close> x]) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2245 |
(insert g, auto simp: sums_iff) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2246 |
thus "(\<lambda>x. \<Sum>n. f n x) field_differentiable (at x)" unfolding differentiable_def |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2247 |
by (auto simp: summable_def field_differentiable_def has_field_derivative_def) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2248 |
qed |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2249 |
|
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2250 |
subsubsection\<^marker>\<open>tag unimportant\<close>\<open>Caratheodory characterization\<close> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2251 |
|
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2252 |
lemma field_differentiable_caratheodory_at: |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2253 |
"f field_differentiable (at z) \<longleftrightarrow> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2254 |
(\<exists>g. (\<forall>w. f(w) - f(z) = g(w) * (w - z)) \<and> continuous (at z) g)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2255 |
using CARAT_DERIV [of f] |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2256 |
by (simp add: field_differentiable_def has_field_derivative_def) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2257 |
|
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2258 |
lemma field_differentiable_caratheodory_within: |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2259 |
"f field_differentiable (at z within s) \<longleftrightarrow> |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2260 |
(\<exists>g. (\<forall>w. f(w) - f(z) = g(w) * (w - z)) \<and> continuous (at z within s) g)" |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2261 |
using DERIV_caratheodory_within [of f] |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2262 |
by (simp add: field_differentiable_def has_field_derivative_def) |
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2263 |
|
b4d409c65a76
Rearrangement of material in Complex_Analysis_Basics, which contained much that had nothing to do with complex analysis.
paulson <lp15@cam.ac.uk>
parents:
71028
diff
changeset
|
2264 |
|
68838 | 2265 |
subsection \<open>Field derivative\<close> |
2266 |
||
70136 | 2267 |
definition\<^marker>\<open>tag important\<close> deriv :: "('a \<Rightarrow> 'a::real_normed_field) \<Rightarrow> 'a \<Rightarrow> 'a" where |
68838 | 2268 |
"deriv f x \<equiv> SOME D. DERIV f x :> D" |
2269 |
||
82529
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2270 |
lemma deriv_shift_0: "deriv f z = deriv (f \<circ> (\<lambda>x. z + x)) 0" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2271 |
proof - |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2272 |
have *: "(f \<circ> (+) z has_field_derivative D) (at z')" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2273 |
if "(f has_field_derivative D) (at (z + z'))" for D z z' and f :: "'a \<Rightarrow> 'a" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2274 |
proof - |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2275 |
have "(f \<circ> (+) z has_field_derivative D * 1) (at z')" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2276 |
by (rule DERIV_chain that derivative_eq_intros refl)+ auto |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2277 |
thus ?thesis by simp |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2278 |
qed |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2279 |
have "(\<lambda>D. (f has_field_derivative D) (at z)) = (\<lambda> D. (f \<circ> (+) z has_field_derivative D) (at 0))" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2280 |
using *[of f _ z 0] *[of "f \<circ> (+) z" _ "-z" z] by (intro ext iffI) (auto simp: o_def) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2281 |
thus ?thesis |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2282 |
by (simp add: deriv_def) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2283 |
qed |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2284 |
|
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2285 |
lemma deriv_shift_0': "NO_MATCH 0 z \<Longrightarrow> deriv f z = deriv (f \<circ> (\<lambda>x. z + x)) 0" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2286 |
by (rule deriv_shift_0) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2287 |
|
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2288 |
lemma higher_deriv_shift_0: "(deriv ^^ n) f z = (deriv ^^ n) (f \<circ> (\<lambda>x. z + x)) 0" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2289 |
proof (induction n arbitrary: f) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2290 |
case (Suc n) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2291 |
have "(deriv ^^ Suc n) f z = (deriv ^^ n) (deriv f) z" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2292 |
by (subst funpow_Suc_right) auto |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2293 |
also have "\<dots> = (deriv ^^ n) (\<lambda>x. deriv f (z + x)) 0" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2294 |
by (subst Suc) (auto simp: o_def) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2295 |
also have "\<dots> = (deriv ^^ n) (\<lambda>x. deriv (\<lambda>xa. f (z + x + xa)) 0) 0" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2296 |
by (subst deriv_shift_0) (auto simp: o_def) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2297 |
also have "(\<lambda>x. deriv (\<lambda>xa. f (z + x + xa)) 0) = deriv (\<lambda>x. f (z + x))" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2298 |
by (rule ext) (simp add: deriv_shift_0' o_def add_ac) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2299 |
also have "(deriv ^^ n) \<dots> 0 = (deriv ^^ Suc n) (f \<circ> (\<lambda>x. z + x)) 0" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2300 |
by (subst funpow_Suc_right) (auto simp: o_def) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2301 |
finally show ?case . |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2302 |
qed auto |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2303 |
|
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2304 |
lemma higher_deriv_shift_0': "NO_MATCH 0 z \<Longrightarrow> (deriv ^^ n) f z = (deriv ^^ n) (f \<circ> (\<lambda>x. z + x)) 0" |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2305 |
by (rule higher_deriv_shift_0) |
ff4b062aae57
moved some lemmas to where they fit better
Manuel Eberl <manuel@pruvisto.org>
parents:
82486
diff
changeset
|
2306 |
|
68838 | 2307 |
lemma DERIV_imp_deriv: "DERIV f x :> f' \<Longrightarrow> deriv f x = f'" |
2308 |
unfolding deriv_def by (metis some_equality DERIV_unique) |
|
2309 |
||
2310 |
lemma DERIV_deriv_iff_has_field_derivative: |
|
2311 |
"DERIV f x :> deriv f x \<longleftrightarrow> (\<exists>f'. (f has_field_derivative f') (at x))" |
|
2312 |
by (auto simp: has_field_derivative_def DERIV_imp_deriv) |
|
2313 |
||
2314 |
lemma DERIV_deriv_iff_real_differentiable: |
|
2315 |
fixes x :: real |
|
2316 |
shows "DERIV f x :> deriv f x \<longleftrightarrow> f differentiable at x" |
|
2317 |
unfolding differentiable_def by (metis DERIV_imp_deriv has_real_derivative_iff) |
|
2318 |
||
73928
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2319 |
lemma DERIV_deriv_iff_field_differentiable: |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2320 |
"DERIV f x :> deriv f x \<longleftrightarrow> f field_differentiable at x" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2321 |
unfolding field_differentiable_def by (metis DERIV_imp_deriv) |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2322 |
|
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2323 |
lemma vector_derivative_of_real_left: |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2324 |
assumes "f differentiable at x" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2325 |
shows "vector_derivative (\<lambda>x. of_real (f x)) (at x) = of_real (deriv f x)" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2326 |
by (metis DERIV_deriv_iff_real_differentiable assms has_vector_derivative_of_real vector_derivative_at) |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2327 |
|
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2328 |
lemma vector_derivative_of_real_right: |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2329 |
assumes "f field_differentiable at (of_real x)" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2330 |
shows "vector_derivative (\<lambda>x. f (of_real x)) (at x) = deriv f (of_real x)" |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2331 |
by (metis DERIV_deriv_iff_field_differentiable assms has_vector_derivative_real_field vector_derivative_at) |
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2332 |
|
68838 | 2333 |
lemma deriv_cong_ev: |
2334 |
assumes "eventually (\<lambda>x. f x = g x) (nhds x)" "x = y" |
|
2335 |
shows "deriv f x = deriv g y" |
|
2336 |
proof - |
|
2337 |
have "(\<lambda>D. (f has_field_derivative D) (at x)) = (\<lambda>D. (g has_field_derivative D) (at y))" |
|
2338 |
by (intro ext DERIV_cong_ev refl assms) |
|
2339 |
thus ?thesis by (simp add: deriv_def assms) |
|
2340 |
qed |
|
2341 |
||
2342 |
lemma higher_deriv_cong_ev: |
|
2343 |
assumes "eventually (\<lambda>x. f x = g x) (nhds x)" "x = y" |
|
2344 |
shows "(deriv ^^ n) f x = (deriv ^^ n) g y" |
|
2345 |
proof - |
|
2346 |
from assms(1) have "eventually (\<lambda>x. (deriv ^^ n) f x = (deriv ^^ n) g x) (nhds x)" |
|
2347 |
proof (induction n arbitrary: f g) |
|
2348 |
case (Suc n) |
|
2349 |
from Suc.prems have "eventually (\<lambda>y. eventually (\<lambda>z. f z = g z) (nhds y)) (nhds x)" |
|
2350 |
by (simp add: eventually_eventually) |
|
2351 |
hence "eventually (\<lambda>x. deriv f x = deriv g x) (nhds x)" |
|
2352 |
by eventually_elim (rule deriv_cong_ev, simp_all) |
|
2353 |
thus ?case by (auto intro!: deriv_cong_ev Suc simp: funpow_Suc_right simp del: funpow.simps) |
|
2354 |
qed auto |
|
73928
3b76524f5a85
Imported lots of material from Stirling_Formula/Gamma_Asymptotics
paulson <lp15@cam.ac.uk>
parents:
73885
diff
changeset
|
2355 |
with \<open>x = y\<close> eventually_nhds_x_imp_x show ?thesis by blast |
68838 | 2356 |
qed |
2357 |
||
2358 |
lemma real_derivative_chain: |
|
2359 |
fixes x :: real |
|
2360 |
shows "f differentiable at x \<Longrightarrow> g differentiable at (f x) |
|
2361 |
\<Longrightarrow> deriv (g o f) x = deriv g (f x) * deriv f x" |
|
2362 |
by (metis DERIV_deriv_iff_real_differentiable DERIV_chain DERIV_imp_deriv) |
|
2363 |
lemma field_derivative_eq_vector_derivative: |
|
2364 |
"(deriv f x) = vector_derivative f (at x)" |
|
2365 |
by (simp add: mult.commute deriv_def vector_derivative_def has_vector_derivative_def has_field_derivative_def) |
|
2366 |
||
2367 |
proposition field_differentiable_derivI: |
|
2368 |
"f field_differentiable (at x) \<Longrightarrow> (f has_field_derivative deriv f x) (at x)" |
|
2369 |
by (simp add: field_differentiable_def DERIV_deriv_iff_has_field_derivative) |
|
2370 |
||
2371 |
lemma vector_derivative_chain_at_general: |
|
2372 |
assumes "f differentiable at x" "g field_differentiable at (f x)" |
|
2373 |
shows "vector_derivative (g \<circ> f) (at x) = vector_derivative f (at x) * deriv g (f x)" |
|
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2374 |
using assms field_differentiable_derivI field_vector_diff_chain_at |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2375 |
vector_derivative_at vector_derivative_works by blast |
68838 | 2376 |
|
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2377 |
lemma deriv_chain: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2378 |
"f field_differentiable at x \<Longrightarrow> g field_differentiable at (f x) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2379 |
\<Longrightarrow> deriv (g o f) x = deriv g (f x) * deriv f x" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2380 |
by (metis DERIV_deriv_iff_field_differentiable DERIV_chain DERIV_imp_deriv) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2381 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2382 |
lemma deriv_linear [simp]: "deriv (\<lambda>w. c * w) = (\<lambda>z. c)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2383 |
by (metis DERIV_imp_deriv DERIV_cmult_Id) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2384 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2385 |
lemma deriv_uminus [simp]: "deriv (\<lambda>w. -w) = (\<lambda>z. -1)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2386 |
using deriv_linear[of "-1"] by (simp del: deriv_linear) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2387 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2388 |
lemma deriv_ident [simp]: "deriv (\<lambda>w. w) = (\<lambda>z. 1)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2389 |
by (metis DERIV_imp_deriv DERIV_ident) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2390 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2391 |
lemma deriv_id [simp]: "deriv id = (\<lambda>z. 1)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2392 |
by (simp add: id_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2393 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2394 |
lemma deriv_const [simp]: "deriv (\<lambda>w. c) = (\<lambda>z. 0)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2395 |
by (metis DERIV_imp_deriv DERIV_const) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2396 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2397 |
lemma deriv_add [simp]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2398 |
"\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2399 |
\<Longrightarrow> deriv (\<lambda>w. f w + g w) z = deriv f z + deriv g z" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2400 |
unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2401 |
by (auto intro!: DERIV_imp_deriv derivative_intros) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2402 |
|
74969 | 2403 |
lemma deriv_minus [simp]: |
2404 |
"f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. - f w) z = - deriv f z" |
|
2405 |
by (simp add: DERIV_deriv_iff_field_differentiable DERIV_imp_deriv Deriv.field_differentiable_minus) |
|
2406 |
||
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2407 |
lemma deriv_diff [simp]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2408 |
"\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2409 |
\<Longrightarrow> deriv (\<lambda>w. f w - g w) z = deriv f z - deriv g z" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2410 |
unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2411 |
by (auto intro!: DERIV_imp_deriv derivative_intros) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2412 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2413 |
lemma deriv_mult [simp]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2414 |
"\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2415 |
\<Longrightarrow> deriv (\<lambda>w. f w * g w) z = f z * deriv g z + deriv f z * g z" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2416 |
unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2417 |
by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2418 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2419 |
lemma deriv_cmult: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2420 |
"f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. c * f w) z = c * deriv f z" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2421 |
by simp |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2422 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2423 |
lemma deriv_cmult_right: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2424 |
"f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w * c) z = deriv f z * c" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2425 |
by simp |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2426 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2427 |
lemma deriv_inverse [simp]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2428 |
"\<lbrakk>f field_differentiable at z; f z \<noteq> 0\<rbrakk> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2429 |
\<Longrightarrow> deriv (\<lambda>w. inverse (f w)) z = - deriv f z / f z ^ 2" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2430 |
unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2431 |
by (safe intro!: DERIV_imp_deriv derivative_eq_intros) (auto simp: field_split_simps power2_eq_square) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2432 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2433 |
lemma deriv_divide [simp]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2434 |
"\<lbrakk>f field_differentiable at z; g field_differentiable at z; g z \<noteq> 0\<rbrakk> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2435 |
\<Longrightarrow> deriv (\<lambda>w. f w / g w) z = (deriv f z * g z - f z * deriv g z) / g z ^ 2" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2436 |
by (simp add: field_class.field_divide_inverse field_differentiable_inverse) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2437 |
(simp add: field_split_simps power2_eq_square) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2438 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2439 |
lemma deriv_cdivide_right: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2440 |
"f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w / c) z = deriv f z / c" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2441 |
by (simp add: field_class.field_divide_inverse) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2442 |
|
74969 | 2443 |
lemma deriv_pow: "\<lbrakk>f field_differentiable at z\<rbrakk> |
2444 |
\<Longrightarrow> deriv (\<lambda>w. f w ^ n) z = (if n=0 then 0 else n * deriv f z * f z ^ (n - Suc 0))" |
|
2445 |
unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
|
2446 |
by (auto intro!: DERIV_imp_deriv derivative_eq_intros) |
|
2447 |
||
2448 |
lemma deriv_sum [simp]: |
|
2449 |
"\<lbrakk>\<And>i. f i field_differentiable at z\<rbrakk> |
|
2450 |
\<Longrightarrow> deriv (\<lambda>w. sum (\<lambda>i. f i w) S) z = sum (\<lambda>i. deriv (f i) z) S" |
|
2451 |
unfolding DERIV_deriv_iff_field_differentiable[symmetric] |
|
2452 |
by (auto intro!: DERIV_imp_deriv derivative_intros) |
|
2453 |
||
78700
4de5b127c124
Importing or moving a few more useful theorems
paulson <lp15@cam.ac.uk>
parents:
78475
diff
changeset
|
2454 |
lemma deriv_compose_linear': |
4de5b127c124
Importing or moving a few more useful theorems
paulson <lp15@cam.ac.uk>
parents:
78475
diff
changeset
|
2455 |
assumes "f field_differentiable at (c*z + a)" |
4de5b127c124
Importing or moving a few more useful theorems
paulson <lp15@cam.ac.uk>
parents:
78475
diff
changeset
|
2456 |
shows "deriv (\<lambda>w. f (c*w + a)) z = c * deriv f (c*z + a)" |
4de5b127c124
Importing or moving a few more useful theorems
paulson <lp15@cam.ac.uk>
parents:
78475
diff
changeset
|
2457 |
apply (subst deriv_chain [where f="\<lambda>w. c*w + a",unfolded comp_def]) |
4de5b127c124
Importing or moving a few more useful theorems
paulson <lp15@cam.ac.uk>
parents:
78475
diff
changeset
|
2458 |
using assms by (auto intro: derivative_intros) |
4de5b127c124
Importing or moving a few more useful theorems
paulson <lp15@cam.ac.uk>
parents:
78475
diff
changeset
|
2459 |
|
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2460 |
lemma deriv_compose_linear: |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2461 |
assumes "f field_differentiable at (c * z)" |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2462 |
shows "deriv (\<lambda>w. f (c * w)) z = c * deriv f (c * z)" |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2463 |
proof - |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2464 |
have "deriv (\<lambda>a. f (c * a)) z = deriv f (c * z) * c" |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2465 |
using assms by (simp add: DERIV_chain2 DERIV_deriv_iff_field_differentiable DERIV_imp_deriv) |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2466 |
then show ?thesis |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2467 |
by simp |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2468 |
qed |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2469 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2470 |
lemma nonzero_deriv_nonconstant: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2471 |
assumes df: "DERIV f \<xi> :> df" and S: "open S" "\<xi> \<in> S" and "df \<noteq> 0" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2472 |
shows "\<not> f constant_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2473 |
unfolding constant_on_def |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2474 |
by (metis \<open>df \<noteq> 0\<close> has_field_derivative_transform_within_open [OF df S] DERIV_const DERIV_unique) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2475 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
2476 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2477 |
subsection \<open>Relation between convexity and derivative\<close> |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2478 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2479 |
(* TODO: Generalise to real vector spaces? *) |
68838 | 2480 |
proposition convex_on_imp_above_tangent: |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2481 |
assumes convex: "convex_on A f" and connected: "connected A" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2482 |
assumes c: "c \<in> interior A" and x : "x \<in> A" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2483 |
assumes deriv: "(f has_field_derivative f') (at c within A)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2484 |
shows "f x - f c \<ge> f' * (x - c)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2485 |
proof (cases x c rule: linorder_cases) |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2486 |
assume xc: "x > c" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2487 |
let ?A' = "interior A \<inter> {c<..}" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2488 |
from c have "c \<in> interior A \<inter> closure {c<..}" by auto |
63128 | 2489 |
also have "\<dots> \<subseteq> closure (interior A \<inter> {c<..})" by (intro open_Int_closure_subset) auto |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2490 |
finally have "at c within ?A' \<noteq> bot" by (subst at_within_eq_bot_iff) auto |
61973 | 2491 |
moreover from deriv have "((\<lambda>y. (f y - f c) / (y - c)) \<longlongrightarrow> f') (at c within ?A')" |
68239 | 2492 |
unfolding has_field_derivative_iff using interior_subset[of A] by (blast intro: tendsto_mono at_le) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2493 |
moreover from eventually_at_right_real[OF xc] |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2494 |
have "eventually (\<lambda>y. (f y - f c) / (y - c) \<le> (f x - f c) / (x - c)) (at_right c)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2495 |
proof eventually_elim |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2496 |
fix y assume y: "y \<in> {c<..<x}" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2497 |
with convex connected x c have "f y \<le> (f x - f c) / (x - c) * (y - c) + f c" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2498 |
using interior_subset[of A] |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2499 |
by (intro convex_onD_Icc' convex_on_subset[OF convex] connected_contains_Icc) auto |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2500 |
hence "f y - f c \<le> (f x - f c) / (x - c) * (y - c)" by simp |
70817
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2501 |
thus "(f y - f c) / (y - c) \<le> (f x - f c) / (x - c)" using y xc by (simp add: field_split_simps) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2502 |
qed |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2503 |
hence "eventually (\<lambda>y. (f y - f c) / (y - c) \<le> (f x - f c) / (x - c)) (at c within ?A')" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2504 |
by (blast intro: filter_leD at_le) |
63952
354808e9f44b
new material connected with HOL Light measure theory, plus more rationalisation
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
2505 |
ultimately have "f' \<le> (f x - f c) / (x - c)" by (simp add: tendsto_upperbound) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2506 |
thus ?thesis using xc by (simp add: field_simps) |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2507 |
next |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2508 |
assume xc: "x < c" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2509 |
let ?A' = "interior A \<inter> {..<c}" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2510 |
from c have "c \<in> interior A \<inter> closure {..<c}" by auto |
63128 | 2511 |
also have "\<dots> \<subseteq> closure (interior A \<inter> {..<c})" by (intro open_Int_closure_subset) auto |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2512 |
finally have "at c within ?A' \<noteq> bot" by (subst at_within_eq_bot_iff) auto |
61973 | 2513 |
moreover from deriv have "((\<lambda>y. (f y - f c) / (y - c)) \<longlongrightarrow> f') (at c within ?A')" |
68239 | 2514 |
unfolding has_field_derivative_iff using interior_subset[of A] by (blast intro: tendsto_mono at_le) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2515 |
moreover from eventually_at_left_real[OF xc] |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2516 |
have "eventually (\<lambda>y. (f y - f c) / (y - c) \<ge> (f x - f c) / (x - c)) (at_left c)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2517 |
proof eventually_elim |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2518 |
fix y assume y: "y \<in> {x<..<c}" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2519 |
with convex connected x c have "f y \<le> (f x - f c) / (c - x) * (c - y) + f c" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2520 |
using interior_subset[of A] |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2521 |
by (intro convex_onD_Icc'' convex_on_subset[OF convex] connected_contains_Icc) auto |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2522 |
hence "f y - f c \<le> (f x - f c) * ((c - y) / (c - x))" by simp |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2523 |
also have "(c - y) / (c - x) = (y - c) / (x - c)" using y xc by (simp add: field_simps) |
61649
268d88ec9087
Tweaks for "real": Removal of [iff] status for some lemmas, adding [simp] for others. Plus fixes.
paulson <lp15@cam.ac.uk>
parents:
61560
diff
changeset
|
2524 |
finally show "(f y - f c) / (y - c) \<ge> (f x - f c) / (x - c)" using y xc |
70817
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2525 |
by (simp add: field_split_simps) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2526 |
qed |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2527 |
hence "eventually (\<lambda>y. (f y - f c) / (y - c) \<ge> (f x - f c) / (x - c)) (at c within ?A')" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2528 |
by (blast intro: filter_leD at_le) |
63952
354808e9f44b
new material connected with HOL Light measure theory, plus more rationalisation
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
2529 |
ultimately have "f' \<ge> (f x - f c) / (x - c)" by (simp add: tendsto_lowerbound) |
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2530 |
thus ?thesis using xc by (simp add: field_simps) |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2531 |
qed simp_all |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2532 |
|
62207 | 2533 |
|
2534 |
subsection \<open>Partial derivatives\<close> |
|
2535 |
||
2536 |
lemma eventually_at_Pair_within_TimesI1: |
|
2537 |
fixes x::"'a::metric_space" |
|
2538 |
assumes "\<forall>\<^sub>F x' in at x within X. P x'" |
|
2539 |
assumes "P x" |
|
2540 |
shows "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. P x'" |
|
2541 |
proof - |
|
2542 |
from assms[unfolded eventually_at_topological] |
|
2543 |
obtain S where S: "open S" "x \<in> S" "\<And>x'. x' \<in> X \<Longrightarrow> x' \<in> S \<Longrightarrow> P x'" |
|
2544 |
by metis |
|
2545 |
show "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. P x'" |
|
2546 |
unfolding eventually_at_topological |
|
2547 |
by (auto intro!: exI[where x="S \<times> UNIV"] S open_Times) |
|
2548 |
qed |
|
2549 |
||
2550 |
lemma eventually_at_Pair_within_TimesI2: |
|
2551 |
fixes x::"'a::metric_space" |
|
68239 | 2552 |
assumes "\<forall>\<^sub>F y' in at y within Y. P y'" "P y" |
62207 | 2553 |
shows "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. P y'" |
2554 |
proof - |
|
2555 |
from assms[unfolded eventually_at_topological] |
|
2556 |
obtain S where S: "open S" "y \<in> S" "\<And>y'. y' \<in> Y \<Longrightarrow> y' \<in> S \<Longrightarrow> P y'" |
|
2557 |
by metis |
|
2558 |
show "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. P y'" |
|
2559 |
unfolding eventually_at_topological |
|
2560 |
by (auto intro!: exI[where x="UNIV \<times> S"] S open_Times) |
|
2561 |
qed |
|
2562 |
||
68838 | 2563 |
proposition has_derivative_partialsI: |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2564 |
fixes f::"'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector \<Rightarrow> 'c::real_normed_vector" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2565 |
assumes fx: "((\<lambda>x. f x y) has_derivative fx) (at x within X)" |
62207 | 2566 |
assumes fy: "\<And>x y. x \<in> X \<Longrightarrow> y \<in> Y \<Longrightarrow> ((\<lambda>y. f x y) has_derivative blinfun_apply (fy x y)) (at y within Y)" |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2567 |
assumes fy_cont[unfolded continuous_within]: "continuous (at (x, y) within X \<times> Y) (\<lambda>(x, y). fy x y)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2568 |
assumes "y \<in> Y" "convex Y" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2569 |
shows "((\<lambda>(x, y). f x y) has_derivative (\<lambda>(tx, ty). fx tx + fy x y ty)) (at (x, y) within X \<times> Y)" |
62207 | 2570 |
proof (safe intro!: has_derivativeI tendstoI, goal_cases) |
2571 |
case (2 e') |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2572 |
interpret fx: bounded_linear "fx" using fx by (rule has_derivative_bounded_linear) |
63040 | 2573 |
define e where "e = e' / 9" |
62207 | 2574 |
have "e > 0" using \<open>e' > 0\<close> by (simp add: e_def) |
2575 |
||
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2576 |
from fy_cont[THEN tendstoD, OF \<open>e > 0\<close>] |
62207 | 2577 |
have "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. dist (fy x' y') (fy x y) < e" |
2578 |
by (auto simp: split_beta') |
|
2579 |
from this[unfolded eventually_at] obtain d' where |
|
2580 |
"d' > 0" |
|
2581 |
"\<And>x' y'. x' \<in> X \<Longrightarrow> y' \<in> Y \<Longrightarrow> (x', y') \<noteq> (x, y) \<Longrightarrow> dist (x', y') (x, y) < d' \<Longrightarrow> |
|
2582 |
dist (fy x' y') (fy x y) < e" |
|
2583 |
by auto |
|
2584 |
then |
|
2585 |
have d': "x' \<in> X \<Longrightarrow> y' \<in> Y \<Longrightarrow> dist (x', y') (x, y) < d' \<Longrightarrow> dist (fy x' y') (fy x y) < e" |
|
2586 |
for x' y' |
|
2587 |
using \<open>0 < e\<close> |
|
2588 |
by (cases "(x', y') = (x, y)") auto |
|
63040 | 2589 |
define d where "d = d' / sqrt 2" |
62207 | 2590 |
have "d > 0" using \<open>0 < d'\<close> by (simp add: d_def) |
2591 |
have d: "x' \<in> X \<Longrightarrow> y' \<in> Y \<Longrightarrow> dist x' x < d \<Longrightarrow> dist y' y < d \<Longrightarrow> dist (fy x' y') (fy x y) < e" |
|
2592 |
for x' y' |
|
2593 |
by (auto simp: dist_prod_def d_def intro!: d' real_sqrt_sum_squares_less) |
|
2594 |
||
2595 |
let ?S = "ball y d \<inter> Y" |
|
2596 |
have "convex ?S" |
|
2597 |
by (auto intro!: convex_Int \<open>convex Y\<close>) |
|
2598 |
{ |
|
2599 |
fix x'::'a and y'::'b |
|
2600 |
assume x': "x' \<in> X" and y': "y' \<in> Y" |
|
2601 |
assume dx': "dist x' x < d" and dy': "dist y' y < d" |
|
2602 |
have "norm (fy x' y' - fy x' y) \<le> dist (fy x' y') (fy x y) + dist (fy x' y) (fy x y)" |
|
2603 |
by norm |
|
2604 |
also have "dist (fy x' y') (fy x y) < e" |
|
2605 |
by (rule d; fact) |
|
2606 |
also have "dist (fy x' y) (fy x y) < e" |
|
2607 |
by (auto intro!: d simp: dist_prod_def x' \<open>d > 0\<close> \<open>y \<in> Y\<close> dx') |
|
2608 |
finally |
|
2609 |
have "norm (fy x' y' - fy x' y) < e + e" |
|
2610 |
by arith |
|
2611 |
then have "onorm (blinfun_apply (fy x' y') - blinfun_apply (fy x' y)) < e + e" |
|
2612 |
by (auto simp: norm_blinfun.rep_eq blinfun.diff_left[abs_def] fun_diff_def) |
|
2613 |
} note onorm = this |
|
2614 |
||
2615 |
have ev_mem: "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. (x', y') \<in> X \<times> Y" |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2616 |
using \<open>y \<in> Y\<close> |
62207 | 2617 |
by (auto simp: eventually_at intro!: zero_less_one) |
2618 |
moreover |
|
2619 |
have ev_dist: "\<forall>\<^sub>F xy in at (x, y) within X \<times> Y. dist xy (x, y) < d" if "d > 0" for d |
|
2620 |
using eventually_at_ball[OF that] |
|
71174 | 2621 |
by (rule eventually_elim2) (auto simp: dist_commute intro!: eventually_True) |
62207 | 2622 |
note ev_dist[OF \<open>0 < d\<close>] |
2623 |
ultimately |
|
2624 |
have "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. |
|
2625 |
norm (f x' y' - f x' y - (fy x' y) (y' - y)) \<le> norm (y' - y) * (e + e)" |
|
2626 |
proof (eventually_elim, safe) |
|
2627 |
fix x' y' |
|
2628 |
assume "x' \<in> X" and y': "y' \<in> Y" |
|
2629 |
assume dist: "dist (x', y') (x, y) < d" |
|
2630 |
then have dx: "dist x' x < d" and dy: "dist y' y < d" |
|
2631 |
unfolding dist_prod_def fst_conv snd_conv atomize_conj |
|
2632 |
by (metis le_less_trans real_sqrt_sum_squares_ge1 real_sqrt_sum_squares_ge2) |
|
2633 |
{ |
|
2634 |
fix t::real |
|
2635 |
assume "t \<in> {0 .. 1}" |
|
2636 |
then have "y + t *\<^sub>R (y' - y) \<in> closed_segment y y'" |
|
2637 |
by (auto simp: closed_segment_def algebra_simps intro!: exI[where x=t]) |
|
2638 |
also |
|
2639 |
have "\<dots> \<subseteq> ball y d \<inter> Y" |
|
2640 |
using \<open>y \<in> Y\<close> \<open>0 < d\<close> dy y' |
|
2641 |
by (intro \<open>convex ?S\<close>[unfolded convex_contains_segment, rule_format, of y y']) |
|
68239 | 2642 |
(auto simp: dist_commute) |
62207 | 2643 |
finally have "y + t *\<^sub>R (y' - y) \<in> ?S" . |
2644 |
} note seg = this |
|
2645 |
||
68239 | 2646 |
have "\<And>x. x \<in> ball y d \<inter> Y \<Longrightarrow> onorm (blinfun_apply (fy x' x) - blinfun_apply (fy x' y)) \<le> e + e" |
2647 |
by (safe intro!: onorm less_imp_le \<open>x' \<in> X\<close> dx) (auto simp: dist_commute \<open>0 < d\<close> \<open>y \<in> Y\<close>) |
|
72445
2c2de074832e
tidying and removal of legacy name
paulson <lp15@cam.ac.uk>
parents:
71633
diff
changeset
|
2648 |
with seg has_derivative_subset[OF assms(2)[OF \<open>x' \<in> X\<close>]] |
62207 | 2649 |
show "norm (f x' y' - f x' y - (fy x' y) (y' - y)) \<le> norm (y' - y) * (e + e)" |
2650 |
by (rule differentiable_bound_linearization[where S="?S"]) |
|
2651 |
(auto intro!: \<open>0 < d\<close> \<open>y \<in> Y\<close>) |
|
2652 |
qed |
|
2653 |
moreover |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2654 |
let ?le = "\<lambda>x'. norm (f x' y - f x y - (fx) (x' - x)) \<le> norm (x' - x) * e" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2655 |
from fx[unfolded has_derivative_within, THEN conjunct2, THEN tendstoD, OF \<open>0 < e\<close>] |
62207 | 2656 |
have "\<forall>\<^sub>F x' in at x within X. ?le x'" |
70817
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2657 |
by eventually_elim (simp, |
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2658 |
simp add: dist_norm field_split_simps split: if_split_asm) |
62207 | 2659 |
then have "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. ?le x'" |
2660 |
by (rule eventually_at_Pair_within_TimesI1) |
|
68239 | 2661 |
(simp add: blinfun.bilinear_simps) |
62207 | 2662 |
moreover have "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. norm ((x', y') - (x, y)) \<noteq> 0" |
2663 |
unfolding norm_eq_zero right_minus_eq |
|
2664 |
by (auto simp: eventually_at intro!: zero_less_one) |
|
2665 |
moreover |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2666 |
from fy_cont[THEN tendstoD, OF \<open>0 < e\<close>] |
62207 | 2667 |
have "\<forall>\<^sub>F x' in at x within X. norm (fy x' y - fy x y) < e" |
2668 |
unfolding eventually_at |
|
2669 |
using \<open>y \<in> Y\<close> |
|
2670 |
by (auto simp: dist_prod_def dist_norm) |
|
2671 |
then have "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. norm (fy x' y - fy x y) < e" |
|
2672 |
by (rule eventually_at_Pair_within_TimesI1) |
|
2673 |
(simp add: blinfun.bilinear_simps \<open>0 < e\<close>) |
|
2674 |
ultimately |
|
2675 |
have "\<forall>\<^sub>F (x', y') in at (x, y) within X \<times> Y. |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2676 |
norm ((f x' y' - f x y - (fx (x' - x) + fy x y (y' - y))) /\<^sub>R |
62207 | 2677 |
norm ((x', y') - (x, y))) |
2678 |
< e'" |
|
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2679 |
proof (eventually_elim, safe) |
62207 | 2680 |
fix x' y' |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2681 |
have "norm (f x' y' - f x y - (fx (x' - x) + fy x y (y' - y))) \<le> |
62207 | 2682 |
norm (f x' y' - f x' y - fy x' y (y' - y)) + |
2683 |
norm (fy x y (y' - y) - fy x' y (y' - y)) + |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2684 |
norm (f x' y - f x y - fx (x' - x))" |
62207 | 2685 |
by norm |
2686 |
also |
|
2687 |
assume nz: "norm ((x', y') - (x, y)) \<noteq> 0" |
|
2688 |
and nfy: "norm (fy x' y - fy x y) < e" |
|
2689 |
assume "norm (f x' y' - f x' y - blinfun_apply (fy x' y) (y' - y)) \<le> norm (y' - y) * (e + e)" |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2690 |
also assume "norm (f x' y - f x y - (fx) (x' - x)) \<le> norm (x' - x) * e" |
62207 | 2691 |
also |
2692 |
have "norm ((fy x y) (y' - y) - (fy x' y) (y' - y)) \<le> norm ((fy x y) - (fy x' y)) * norm (y' - y)" |
|
2693 |
by (auto simp: blinfun.bilinear_simps[symmetric] intro!: norm_blinfun) |
|
2694 |
also have "\<dots> \<le> (e + e) * norm (y' - y)" |
|
2695 |
using \<open>e > 0\<close> nfy |
|
2696 |
by (auto simp: norm_minus_commute intro!: mult_right_mono) |
|
2697 |
also have "norm (x' - x) * e \<le> norm (x' - x) * (e + e)" |
|
2698 |
using \<open>0 < e\<close> by simp |
|
2699 |
also have "norm (y' - y) * (e + e) + (e + e) * norm (y' - y) + norm (x' - x) * (e + e) \<le> |
|
2700 |
(norm (y' - y) + norm (x' - x)) * (4 * e)" |
|
2701 |
using \<open>e > 0\<close> |
|
2702 |
by (simp add: algebra_simps) |
|
2703 |
also have "\<dots> \<le> 2 * norm ((x', y') - (x, y)) * (4 * e)" |
|
2704 |
using \<open>0 < e\<close> real_sqrt_sum_squares_ge1[of "norm (x' - x)" "norm (y' - y)"] |
|
2705 |
real_sqrt_sum_squares_ge2[of "norm (y' - y)" "norm (x' - x)"] |
|
2706 |
by (auto intro!: mult_right_mono simp: norm_prod_def |
|
2707 |
simp del: real_sqrt_sum_squares_ge1 real_sqrt_sum_squares_ge2) |
|
2708 |
also have "\<dots> \<le> norm ((x', y') - (x, y)) * (8 * e)" |
|
2709 |
by simp |
|
2710 |
also have "\<dots> < norm ((x', y') - (x, y)) * e'" |
|
2711 |
using \<open>0 < e'\<close> nz |
|
2712 |
by (auto simp: e_def) |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2713 |
finally show "norm ((f x' y' - f x y - (fx (x' - x) + fy x y (y' - y))) /\<^sub>R norm ((x', y') - (x, y))) < e'" |
70817
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
haftmann
parents:
70802
diff
changeset
|
2714 |
by (simp add: dist_norm) (auto simp add: field_split_simps) |
62207 | 2715 |
qed |
2716 |
then show ?case |
|
2717 |
by eventually_elim (auto simp: dist_norm field_simps) |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2718 |
next |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2719 |
from has_derivative_bounded_linear[OF fx] |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2720 |
obtain fxb where "fx = blinfun_apply fxb" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2721 |
by (metis bounded_linear_Blinfun_apply) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2722 |
then show "bounded_linear (\<lambda>(tx, ty). fx tx + blinfun_apply (fy x y) ty)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2723 |
by (auto intro!: bounded_linear_intros simp: split_beta') |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2724 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2725 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2726 |
|
70136 | 2727 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Differentiable case distinction\<close> |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2728 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2729 |
lemma has_derivative_within_If_eq: |
68239 | 2730 |
"((\<lambda>x. if P x then f x else g x) has_derivative f') (at x within S) = |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2731 |
(bounded_linear f' \<and> |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2732 |
((\<lambda>y.(if P y then (f y - ((if P x then f x else g x) + f' (y - x)))/\<^sub>R norm (y - x) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2733 |
else (g y - ((if P x then f x else g x) + f' (y - x)))/\<^sub>R norm (y - x))) |
68239 | 2734 |
\<longlongrightarrow> 0) (at x within S))" |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2735 |
(is "_ = (_ \<and> (?if \<longlongrightarrow> 0) _)") |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2736 |
proof - |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2737 |
have "(\<lambda>y. (1 / norm (y - x)) *\<^sub>R |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2738 |
((if P y then f y else g y) - |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2739 |
((if P x then f x else g x) + f' (y - x)))) = ?if" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2740 |
by (auto simp: inverse_eq_divide) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2741 |
thus ?thesis by (auto simp: has_derivative_within) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2742 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2743 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2744 |
lemma has_derivative_If_within_closures: |
68239 | 2745 |
assumes f': "x \<in> S \<union> (closure S \<inter> closure T) \<Longrightarrow> |
2746 |
(f has_derivative f' x) (at x within S \<union> (closure S \<inter> closure T))" |
|
2747 |
assumes g': "x \<in> T \<union> (closure S \<inter> closure T) \<Longrightarrow> |
|
2748 |
(g has_derivative g' x) (at x within T \<union> (closure S \<inter> closure T))" |
|
2749 |
assumes connect: "x \<in> closure S \<Longrightarrow> x \<in> closure T \<Longrightarrow> f x = g x" |
|
2750 |
assumes connect': "x \<in> closure S \<Longrightarrow> x \<in> closure T \<Longrightarrow> f' x = g' x" |
|
2751 |
assumes x_in: "x \<in> S \<union> T" |
|
2752 |
shows "((\<lambda>x. if x \<in> S then f x else g x) has_derivative |
|
2753 |
(if x \<in> S then f' x else g' x)) (at x within (S \<union> T))" |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2754 |
proof - |
68239 | 2755 |
from f' x_in interpret f': bounded_linear "if x \<in> S then f' x else (\<lambda>x. 0)" |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2756 |
by (auto simp add: has_derivative_within) |
68239 | 2757 |
from g' interpret g': bounded_linear "if x \<in> T then g' x else (\<lambda>x. 0)" |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2758 |
by (auto simp add: has_derivative_within) |
68239 | 2759 |
have bl: "bounded_linear (if x \<in> S then f' x else g' x)" |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2760 |
using f'.scaleR f'.bounded f'.add g'.scaleR g'.bounded g'.add x_in |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2761 |
by (unfold_locales; force) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2762 |
show ?thesis |
68239 | 2763 |
using f' g' closure_subset[of T] closure_subset[of S] |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2764 |
unfolding has_derivative_within_If_eq |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2765 |
by (intro conjI bl tendsto_If_within_closures x_in) |
69712 | 2766 |
(auto simp: has_derivative_within inverse_eq_divide connect connect' subsetD) |
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2767 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2768 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2769 |
lemma has_vector_derivative_If_within_closures: |
68239 | 2770 |
assumes x_in: "x \<in> S \<union> T" |
2771 |
assumes "u = S \<union> T" |
|
2772 |
assumes f': "x \<in> S \<union> (closure S \<inter> closure T) \<Longrightarrow> |
|
2773 |
(f has_vector_derivative f' x) (at x within S \<union> (closure S \<inter> closure T))" |
|
2774 |
assumes g': "x \<in> T \<union> (closure S \<inter> closure T) \<Longrightarrow> |
|
2775 |
(g has_vector_derivative g' x) (at x within T \<union> (closure S \<inter> closure T))" |
|
2776 |
assumes connect: "x \<in> closure S \<Longrightarrow> x \<in> closure T \<Longrightarrow> f x = g x" |
|
2777 |
assumes connect': "x \<in> closure S \<Longrightarrow> x \<in> closure T \<Longrightarrow> f' x = g' x" |
|
2778 |
shows "((\<lambda>x. if x \<in> S then f x else g x) has_vector_derivative |
|
2779 |
(if x \<in> S then f' x else g' x)) (at x within u)" |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67682
diff
changeset
|
2780 |
unfolding has_vector_derivative_def assms |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2781 |
using x_in f' g' |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2782 |
by (intro has_derivative_If_within_closures[where ?f' = "\<lambda>x a. a *\<^sub>R f' x" and ?g' = "\<lambda>x a. a *\<^sub>R g' x", |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2783 |
THEN has_derivative_eq_rhs]; force simp: assms has_vector_derivative_def) |
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
2784 |
|
62207 | 2785 |
|
70999
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2786 |
subsection\<^marker>\<open>tag important\<close>\<open>The Inverse Function Theorem\<close> |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2787 |
|
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2788 |
lemma linear_injective_contraction: |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2789 |
assumes "linear f" "c < 1" and le: "\<And>x. norm (f x - x) \<le> c * norm x" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2790 |
shows "inj f" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2791 |
unfolding linear_injective_0[OF \<open>linear f\<close>] |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2792 |
proof safe |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2793 |
fix x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2794 |
assume "f x = 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2795 |
with le [of x] have "norm x \<le> c * norm x" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2796 |
by simp |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2797 |
then show "x = 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2798 |
using \<open>c < 1\<close> by (simp add: mult_le_cancel_right1) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2799 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2800 |
|
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2801 |
text\<open>From an online proof by J. Michael Boardman, Department of Mathematics, Johns Hopkins University\<close> |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2802 |
lemma inverse_function_theorem_scaled: |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2803 |
fixes f::"'a::euclidean_space \<Rightarrow> 'a" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2804 |
and f'::"'a \<Rightarrow> ('a \<Rightarrow>\<^sub>L 'a)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2805 |
assumes "open U" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2806 |
and derf: "\<And>x. x \<in> U \<Longrightarrow> (f has_derivative blinfun_apply (f' x)) (at x)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2807 |
and contf: "continuous_on U f'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2808 |
and "0 \<in> U" and [simp]: "f 0 = 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2809 |
and id: "f' 0 = id_blinfun" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2810 |
obtains U' V g g' where "open U'" "U' \<subseteq> U" "0 \<in> U'" "open V" "0 \<in> V" "homeomorphism U' V f g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2811 |
"\<And>y. y \<in> V \<Longrightarrow> (g has_derivative (g' y)) (at y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2812 |
"\<And>y. y \<in> V \<Longrightarrow> g' y = inv (blinfun_apply (f'(g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2813 |
"\<And>y. y \<in> V \<Longrightarrow> bij (blinfun_apply (f'(g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2814 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2815 |
obtain d1 where "cball 0 d1 \<subseteq> U" "d1 > 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2816 |
using \<open>open U\<close> \<open>0 \<in> U\<close> open_contains_cball by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2817 |
obtain d2 where d2: "\<And>x. \<lbrakk>x \<in> U; dist x 0 \<le> d2\<rbrakk> \<Longrightarrow> dist (f' x) (f' 0) < 1/2" "0 < d2" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2818 |
using continuous_onE [OF contf, of 0 "1/2"] by (metis \<open>0 \<in> U\<close> half_gt_zero_iff zero_less_one) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2819 |
obtain \<delta> where le: "\<And>x. norm x \<le> \<delta> \<Longrightarrow> dist (f' x) id_blinfun \<le> 1/2" and "0 < \<delta>" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2820 |
and subU: "cball 0 \<delta> \<subseteq> U" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2821 |
proof |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2822 |
show "min d1 d2 > 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2823 |
by (simp add: \<open>0 < d1\<close> \<open>0 < d2\<close>) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2824 |
show "cball 0 (min d1 d2) \<subseteq> U" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2825 |
using \<open>cball 0 d1 \<subseteq> U\<close> by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2826 |
show "dist (f' x) id_blinfun \<le> 1/2" if "norm x \<le> min d1 d2" for x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2827 |
using \<open>cball 0 d1 \<subseteq> U\<close> d2 that id by fastforce |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2828 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2829 |
let ?D = "cball 0 \<delta>" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2830 |
define V:: "'a set" where "V \<equiv> ball 0 (\<delta>/2)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2831 |
have 4: "norm (f (x + h) - f x - h) \<le> 1/2 * norm h" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2832 |
if "x \<in> ?D" "x+h \<in> ?D" for x h |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2833 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2834 |
let ?w = "\<lambda>x. f x - x" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2835 |
have B: "\<And>x. x \<in> ?D \<Longrightarrow> onorm (blinfun_apply (f' x - id_blinfun)) \<le> 1/2" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2836 |
by (metis dist_norm le mem_cball_0 norm_blinfun.rep_eq) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2837 |
have "\<And>x. x \<in> ?D \<Longrightarrow> (?w has_derivative (blinfun_apply (f' x - id_blinfun))) (at x)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2838 |
by (rule derivative_eq_intros derf subsetD [OF subU] | force simp: blinfun.diff_left)+ |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2839 |
then have Dw: "\<And>x. x \<in> ?D \<Longrightarrow> (?w has_derivative (blinfun_apply (f' x - id_blinfun))) (at x within ?D)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2840 |
using has_derivative_at_withinI by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2841 |
have "norm (?w (x+h) - ?w x) \<le> (1/2) * norm h" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2842 |
using differentiable_bound [OF convex_cball Dw B] that by fastforce |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2843 |
then show ?thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2844 |
by (auto simp: algebra_simps) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2845 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2846 |
have for_g: "\<exists>!x. norm x < \<delta> \<and> f x = y" if y: "norm y < \<delta>/2" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2847 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2848 |
let ?u = "\<lambda>x. x + (y - f x)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2849 |
have *: "norm (?u x) < \<delta>" if "x \<in> ?D" for x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2850 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2851 |
have fxx: "norm (f x - x) \<le> \<delta>/2" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2852 |
using 4 [of 0 x] \<open>0 < \<delta>\<close> \<open>f 0 = 0\<close> that by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2853 |
have "norm (?u x) \<le> norm y + norm (f x - x)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2854 |
by (metis add.commute add_diff_eq norm_minus_commute norm_triangle_ineq) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2855 |
also have "\<dots> < \<delta>/2 + \<delta>/2" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2856 |
using fxx y by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2857 |
finally show ?thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2858 |
by simp |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2859 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2860 |
have "\<exists>!x \<in> ?D. ?u x = x" |
82486 | 2861 |
proof (rule Banach_fix) |
70999
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2862 |
show "cball 0 \<delta> \<noteq> {}" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2863 |
using \<open>0 < \<delta>\<close> by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2864 |
show "(\<lambda>x. x + (y - f x)) ` cball 0 \<delta> \<subseteq> cball 0 \<delta>" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2865 |
using * by force |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2866 |
have "dist (x + (y - f x)) (xh + (y - f xh)) * 2 \<le> dist x xh" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2867 |
if "norm x \<le> \<delta>" and "norm xh \<le> \<delta>" for x xh |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2868 |
using that 4 [of x "xh-x"] by (auto simp: dist_norm norm_minus_commute algebra_simps) |
82538
4b132ea7d575
More tidying and some variable renaming
paulson <lp15@cam.ac.uk>
parents:
82486
diff
changeset
|
2869 |
then show "\<And>x z. \<lbrakk>x\<in>cball 0 \<delta>; z\<in>cball 0 \<delta>\<rbrakk> \<Longrightarrow> dist (x + (y - f x)) (z + (y - f z)) \<le> (1/2) * dist x z" |
70999
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2870 |
by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2871 |
qed (auto simp: complete_eq_closed) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2872 |
then show ?thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2873 |
by (metis "*" add_cancel_right_right eq_iff_diff_eq_0 le_less mem_cball_0) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2874 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2875 |
define g where "g \<equiv> \<lambda>y. THE x. norm x < \<delta> \<and> f x = y" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2876 |
have g: "norm (g y) < \<delta> \<and> f (g y) = y" if "norm y < \<delta>/2" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2877 |
unfolding g_def using that theI' [OF for_g] by meson |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2878 |
then have fg[simp]: "f (g y) = y" if "y \<in> V" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2879 |
using that by (auto simp: V_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2880 |
have 5: "norm (g y' - g y) \<le> 2 * norm (y' - y)" if "y \<in> V" "y' \<in> V" for y y' |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2881 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2882 |
have no: "norm (g y) \<le> \<delta>" "norm (g y') \<le> \<delta>" and [simp]: "f (g y) = y" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2883 |
using that g unfolding V_def by force+ |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2884 |
have "norm (g y' - g y) \<le> norm (g y' - g y - (y' - y)) + norm (y' - y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2885 |
by (simp add: add.commute norm_triangle_sub) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2886 |
also have "\<dots> \<le> (1/2) * norm (g y' - g y) + norm (y' - y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2887 |
using 4 [of "g y" "g y' - g y"] that no by (simp add: g norm_minus_commute V_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2888 |
finally show ?thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2889 |
by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2890 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2891 |
have contg: "continuous_on V g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2892 |
proof |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2893 |
fix y::'a and e::real |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2894 |
assume "0 < e" and y: "y \<in> V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2895 |
show "\<exists>d>0. \<forall>x'\<in>V. dist x' y < d \<longrightarrow> dist (g x') (g y) \<le> e" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2896 |
proof (intro exI conjI ballI impI) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2897 |
show "0 < e/2" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2898 |
by (simp add: \<open>0 < e\<close>) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2899 |
qed (use 5 y in \<open>force simp: dist_norm\<close>) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2900 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2901 |
show thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2902 |
proof |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2903 |
define U' where "U' \<equiv> (f -` V) \<inter> ball 0 \<delta>" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2904 |
have contf: "continuous_on U f" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2905 |
using derf has_derivative_at_withinI by (fast intro: has_derivative_continuous_on) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2906 |
then have "continuous_on (ball 0 \<delta>) f" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2907 |
by (meson ball_subset_cball continuous_on_subset subU) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2908 |
then show "open U'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2909 |
by (simp add: U'_def V_def Int_commute continuous_open_preimage) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2910 |
show "0 \<in> U'" "U' \<subseteq> U" "open V" "0 \<in> V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2911 |
using \<open>0 < \<delta>\<close> subU by (auto simp: U'_def V_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2912 |
show hom: "homeomorphism U' V f g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2913 |
proof |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2914 |
show "continuous_on U' f" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2915 |
using \<open>U' \<subseteq> U\<close> contf continuous_on_subset by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2916 |
show "continuous_on V g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2917 |
using contg by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2918 |
show "f ` U' \<subseteq> V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2919 |
using U'_def by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2920 |
show "g ` V \<subseteq> U'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2921 |
by (simp add: U'_def V_def g image_subset_iff) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2922 |
show "g (f x) = x" if "x \<in> U'" for x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2923 |
by (metis that fg Int_iff U'_def V_def for_g g mem_ball_0 vimage_eq) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2924 |
show "f (g y) = y" if "y \<in> V" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2925 |
using that by (simp add: g V_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2926 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2927 |
show bij: "bij (blinfun_apply (f'(g y)))" if "y \<in> V" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2928 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2929 |
have inj: "inj (blinfun_apply (f' (g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2930 |
proof (rule linear_injective_contraction) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2931 |
show "linear (blinfun_apply (f' (g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2932 |
using blinfun.bounded_linear_right bounded_linear_def by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2933 |
next |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2934 |
fix x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2935 |
have "norm (blinfun_apply (f' (g y)) x - x) = norm (blinfun_apply (f' (g y) - id_blinfun) x)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2936 |
by (simp add: blinfun.diff_left) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2937 |
also have "\<dots> \<le> norm (f' (g y) - id_blinfun) * norm x" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2938 |
by (rule norm_blinfun) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2939 |
also have "\<dots> \<le> (1/2) * norm x" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2940 |
proof (rule mult_right_mono) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2941 |
show "norm (f' (g y) - id_blinfun) \<le> 1/2" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2942 |
using that g [of y] le by (auto simp: V_def dist_norm) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2943 |
qed auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2944 |
finally show "norm (blinfun_apply (f' (g y)) x - x) \<le> (1/2) * norm x" . |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2945 |
qed auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2946 |
moreover |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2947 |
have "surj (blinfun_apply (f' (g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2948 |
using blinfun.bounded_linear_right bounded_linear_def |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2949 |
by (blast intro!: linear_inj_imp_surj [OF _ inj]) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2950 |
ultimately show ?thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2951 |
using bijI by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2952 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2953 |
define g' where "g' \<equiv> \<lambda>y. inv (blinfun_apply (f'(g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2954 |
show "(g has_derivative g' y) (at y)" if "y \<in> V" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2955 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2956 |
have gy: "g y \<in> U" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2957 |
using g subU that unfolding V_def by fastforce |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2958 |
obtain e where e: "\<And>h. f (g y + h) = y + blinfun_apply (f' (g y)) h + e h" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2959 |
and e0: "(\<lambda>h. norm (e h) / norm h) \<midarrow>0\<rightarrow> 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2960 |
using iffD1 [OF has_derivative_iff_Ex derf [OF gy]] \<open>y \<in> V\<close> by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2961 |
have [simp]: "e 0 = 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2962 |
using e [of 0] that by simp |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2963 |
let ?INV = "inv (blinfun_apply (f' (g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2964 |
have inj: "inj (blinfun_apply (f' (g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2965 |
using bij bij_betw_def that by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2966 |
have "(g has_derivative g' y) (at y within V)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2967 |
unfolding has_derivative_at_within_iff_Ex [OF \<open>y \<in> V\<close> \<open>open V\<close>] |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2968 |
proof |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2969 |
show blinv: "bounded_linear (g' y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2970 |
unfolding g'_def using derf gy inj inj_linear_imp_inv_bounded_linear by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2971 |
define eg where "eg \<equiv> \<lambda>k. - ?INV (e (g (y+k) - g y))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2972 |
have "g (y+k) = g y + g' y k + eg k" if "y + k \<in> V" for k |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2973 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2974 |
have "?INV k = ?INV (blinfun_apply (f' (g y)) (g (y+k) - g y) + e (g (y+k) - g y))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2975 |
using e [of "g(y+k) - g y"] that by simp |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2976 |
then have "g (y+k) = g y + ?INV k - ?INV (e (g (y+k) - g y))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2977 |
using inj blinv by (simp add: linear_simps g'_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2978 |
then show ?thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2979 |
by (auto simp: eg_def g'_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2980 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2981 |
moreover have "(\<lambda>k. norm (eg k) / norm k) \<midarrow>0\<rightarrow> 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2982 |
proof (rule Lim_null_comparison) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2983 |
let ?g = "\<lambda>k. 2 * onorm ?INV * norm (e (g (y+k) - g y)) / norm (g (y+k) - g y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2984 |
show "\<forall>\<^sub>F k in at 0. norm (norm (eg k) / norm k) \<le> ?g k" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2985 |
unfolding eventually_at_topological |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2986 |
proof (intro exI conjI ballI impI) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2987 |
show "open ((+)(-y) ` V)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2988 |
using \<open>open V\<close> open_translation by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2989 |
show "0 \<in> (+)(-y) ` V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2990 |
by (simp add: that) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2991 |
show "norm (norm (eg k) / norm k) \<le> 2 * onorm (inv (blinfun_apply (f' (g y)))) * norm (e (g (y+k) - g y)) / norm (g (y+k) - g y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2992 |
if "k \<in> (+)(-y) ` V" "k \<noteq> 0" for k |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2993 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2994 |
have "y+k \<in> V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2995 |
using that by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2996 |
have "norm (norm (eg k) / norm k) \<le> onorm ?INV * norm (e (g (y+k) - g y)) / norm k" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2997 |
using blinv g'_def onorm by (force simp: eg_def divide_simps) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2998 |
also have "\<dots> = (norm (g (y+k) - g y) / norm k) * (onorm ?INV * (norm (e (g (y+k) - g y)) / norm (g (y+k) - g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
2999 |
by (simp add: divide_simps) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3000 |
also have "\<dots> \<le> 2 * (onorm ?INV * (norm (e (g (y+k) - g y)) / norm (g (y+k) - g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3001 |
apply (rule mult_right_mono) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3002 |
using 5 [of y "y+k"] \<open>y \<in> V\<close> \<open>y + k \<in> V\<close> onorm_pos_le [OF blinv] |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3003 |
apply (auto simp: divide_simps zero_le_mult_iff zero_le_divide_iff g'_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3004 |
done |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3005 |
finally show "norm (norm (eg k) / norm k) \<le> 2 * onorm ?INV * norm (e (g (y+k) - g y)) / norm (g (y+k) - g y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3006 |
by simp |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3007 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3008 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3009 |
have 1: "(\<lambda>h. norm (e h) / norm h) \<midarrow>0\<rightarrow> (norm (e 0) / norm 0)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3010 |
using e0 by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3011 |
have 2: "(\<lambda>k. g (y+k) - g y) \<midarrow>0\<rightarrow> 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3012 |
using contg \<open>open V\<close> \<open>y \<in> V\<close> LIM_offset_zero_iff LIM_zero_iff at_within_open continuous_on_def by fastforce |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3013 |
from tendsto_compose [OF 1 2, simplified] |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3014 |
have "(\<lambda>k. norm (e (g (y+k) - g y)) / norm (g (y+k) - g y)) \<midarrow>0\<rightarrow> 0" . |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3015 |
from tendsto_mult_left [OF this] show "?g \<midarrow>0\<rightarrow> 0" by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3016 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3017 |
ultimately show "\<exists>e. (\<forall>k. y + k \<in> V \<longrightarrow> g (y+k) = g y + g' y k + e k) \<and> (\<lambda>k. norm (e k) / norm k) \<midarrow>0\<rightarrow> 0" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3018 |
by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3019 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3020 |
then show ?thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3021 |
by (metis \<open>open V\<close> at_within_open that) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3022 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3023 |
show "g' y = inv (blinfun_apply (f' (g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3024 |
if "y \<in> V" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3025 |
by (simp add: g'_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3026 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3027 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3028 |
|
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3029 |
|
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3030 |
text\<open>We need all this to justify the scaling and translations.\<close> |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3031 |
theorem inverse_function_theorem: |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3032 |
fixes f::"'a::euclidean_space \<Rightarrow> 'a" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3033 |
and f'::"'a \<Rightarrow> ('a \<Rightarrow>\<^sub>L 'a)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3034 |
assumes "open U" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3035 |
and derf: "\<And>x. x \<in> U \<Longrightarrow> (f has_derivative (blinfun_apply (f' x))) (at x)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3036 |
and contf: "continuous_on U f'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3037 |
and "x0 \<in> U" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3038 |
and invf: "invf o\<^sub>L f' x0 = id_blinfun" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3039 |
obtains U' V g g' where "open U'" "U' \<subseteq> U" "x0 \<in> U'" "open V" "f x0 \<in> V" "homeomorphism U' V f g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3040 |
"\<And>y. y \<in> V \<Longrightarrow> (g has_derivative (g' y)) (at y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3041 |
"\<And>y. y \<in> V \<Longrightarrow> g' y = inv (blinfun_apply (f'(g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3042 |
"\<And>y. y \<in> V \<Longrightarrow> bij (blinfun_apply (f'(g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3043 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3044 |
have apply1 [simp]: "\<And>i. blinfun_apply invf (blinfun_apply (f' x0) i) = i" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3045 |
by (metis blinfun_apply_blinfun_compose blinfun_apply_id_blinfun invf) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3046 |
have apply2 [simp]: "\<And>i. blinfun_apply (f' x0) (blinfun_apply invf i) = i" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3047 |
by (metis apply1 bij_inv_eq_iff blinfun_bij1 invf) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3048 |
have [simp]: "(range (blinfun_apply invf)) = UNIV" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3049 |
using apply1 surjI by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3050 |
let ?f = "invf \<circ> (\<lambda>x. (f \<circ> (+)x0)x - f x0)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3051 |
let ?f' = "\<lambda>x. invf o\<^sub>L (f' (x + x0))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3052 |
obtain U' V g g' where "open U'" and U': "U' \<subseteq> (+)(-x0) ` U" "0 \<in> U'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3053 |
and "open V" "0 \<in> V" and hom: "homeomorphism U' V ?f g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3054 |
and derg: "\<And>y. y \<in> V \<Longrightarrow> (g has_derivative (g' y)) (at y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3055 |
and g': "\<And>y. y \<in> V \<Longrightarrow> g' y = inv (?f'(g y))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3056 |
and bij: "\<And>y. y \<in> V \<Longrightarrow> bij (?f'(g y))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3057 |
proof (rule inverse_function_theorem_scaled [of "(+)(-x0) ` U" ?f "?f'"]) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3058 |
show ope: "open ((+) (- x0) ` U)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3059 |
using \<open>open U\<close> open_translation by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3060 |
show "(?f has_derivative blinfun_apply (?f' x)) (at x)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3061 |
if "x \<in> (+) (- x0) ` U" for x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3062 |
using that |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3063 |
apply clarify |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3064 |
apply (rule derf derivative_eq_intros | simp add: blinfun_compose.rep_eq)+ |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3065 |
done |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3066 |
have YY: "(\<lambda>x. f' (x + x0)) \<midarrow>u-x0\<rightarrow> f' u" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3067 |
if "f' \<midarrow>u\<rightarrow> f' u" "u \<in> U" for u |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3068 |
using that LIM_offset [where k = x0] by (auto simp: algebra_simps) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3069 |
then have "continuous_on ((+) (- x0) ` U) (\<lambda>x. f' (x + x0))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3070 |
using contf \<open>open U\<close> Lim_at_imp_Lim_at_within |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3071 |
by (fastforce simp: continuous_on_def at_within_open_NO_MATCH ope) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3072 |
then show "continuous_on ((+) (- x0) ` U) ?f'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3073 |
by (intro continuous_intros) simp |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3074 |
qed (auto simp: invf \<open>x0 \<in> U\<close>) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3075 |
show thesis |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3076 |
proof |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3077 |
let ?U' = "(+)x0 ` U'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3078 |
let ?V = "((+)(f x0) \<circ> f' x0) ` V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3079 |
let ?g = "(+)x0 \<circ> g \<circ> invf \<circ> (+)(- f x0)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3080 |
let ?g' = "\<lambda>y. inv (blinfun_apply (f' (?g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3081 |
show oU': "open ?U'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3082 |
by (simp add: \<open>open U'\<close> open_translation) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3083 |
show subU: "?U' \<subseteq> U" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3084 |
using ComplI \<open>U' \<subseteq> (+) (- x0) ` U\<close> by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3085 |
show "x0 \<in> ?U'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3086 |
by (simp add: \<open>0 \<in> U'\<close>) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3087 |
show "open ?V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3088 |
using blinfun_bij2 [OF invf] |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3089 |
by (metis \<open>open V\<close> bij_is_surj blinfun.bounded_linear_right bounded_linear_def image_comp open_surjective_linear_image open_translation) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3090 |
show "f x0 \<in> ?V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3091 |
using \<open>0 \<in> V\<close> image_iff by fastforce |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3092 |
show "homeomorphism ?U' ?V f ?g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3093 |
proof |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3094 |
show "continuous_on ?U' f" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3095 |
by (meson subU continuous_on_eq_continuous_at derf has_derivative_continuous oU' subsetD) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3096 |
have "?f ` U' \<subseteq> V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3097 |
using hom homeomorphism_image1 by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3098 |
then show "f ` ?U' \<subseteq> ?V" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3099 |
unfolding image_subset_iff |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3100 |
by (clarsimp simp: image_def) (metis apply2 add.commute diff_add_cancel) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3101 |
show "?g ` ?V \<subseteq> ?U'" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3102 |
using hom invf by (auto simp: image_def homeomorphism_def) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3103 |
show "?g (f x) = x" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3104 |
if "x \<in> ?U'" for x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3105 |
using that hom homeomorphism_apply1 by fastforce |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3106 |
have "continuous_on V g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3107 |
using hom homeomorphism_def by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3108 |
then show "continuous_on ?V ?g" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3109 |
by (intro continuous_intros) (auto elim!: continuous_on_subset) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3110 |
have fg: "?f (g x) = x" if "x \<in> V" for x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3111 |
using hom homeomorphism_apply2 that by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3112 |
show "f (?g y) = y" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3113 |
if "y \<in> ?V" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3114 |
using that fg by (simp add: image_iff) (metis apply2 add.commute diff_add_cancel) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3115 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3116 |
show "(?g has_derivative ?g' y) (at y)" "bij (blinfun_apply (f' (?g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3117 |
if "y \<in> ?V" for y |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3118 |
proof - |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3119 |
have 1: "bij (blinfun_apply invf)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3120 |
using blinfun_bij1 invf by blast |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3121 |
then have 2: "bij (blinfun_apply (f' (x0 + g x)))" if "x \<in> V" for x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3122 |
by (metis add.commute bij bij_betw_comp_iff2 blinfun_compose.rep_eq that top_greatest) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3123 |
then show "bij (blinfun_apply (f' (?g y)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3124 |
using that by auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3125 |
have "g' x \<circ> blinfun_apply invf = inv (blinfun_apply (f' (x0 + g x)))" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3126 |
if "x \<in> V" for x |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3127 |
using that |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3128 |
by (simp add: g' o_inv_distrib blinfun_compose.rep_eq 1 2 add.commute bij_is_inj flip: o_assoc) |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3129 |
then show "(?g has_derivative ?g' y) (at y)" |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3130 |
using that invf |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3131 |
by clarsimp (rule derg derivative_eq_intros | simp flip: id_def)+ |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3132 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3133 |
qed auto |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3134 |
qed |
5b753486c075
Inverse function theorem + lemmas
paulson <lp15@cam.ac.uk>
parents:
70817
diff
changeset
|
3135 |
|
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3136 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3137 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Piecewise differentiable functions\<close> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3138 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3139 |
definition piecewise_differentiable_on |
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
79566
diff
changeset
|
3140 |
(infixr \<open>piecewise'_differentiable'_on\<close> 50) |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3141 |
where "f piecewise_differentiable_on i \<equiv> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3142 |
continuous_on i f \<and> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3143 |
(\<exists>S. finite S \<and> (\<forall>x \<in> i - S. f differentiable (at x within i)))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3144 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3145 |
lemma piecewise_differentiable_on_imp_continuous_on: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3146 |
"f piecewise_differentiable_on S \<Longrightarrow> continuous_on S f" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3147 |
by (simp add: piecewise_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3148 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3149 |
lemma piecewise_differentiable_on_subset: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3150 |
"f piecewise_differentiable_on S \<Longrightarrow> T \<le> S \<Longrightarrow> f piecewise_differentiable_on T" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3151 |
using continuous_on_subset |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
3152 |
by (smt (verit) Diff_iff differentiable_within_subset in_mono piecewise_differentiable_on_def) |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3153 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3154 |
lemma differentiable_on_imp_piecewise_differentiable: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3155 |
fixes a:: "'a::{linorder_topology,real_normed_vector}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3156 |
shows "f differentiable_on {a..b} \<Longrightarrow> f piecewise_differentiable_on {a..b}" |
76832
ab08604729a2
A further round of proof consolidation
paulson <lp15@cam.ac.uk>
parents:
75078
diff
changeset
|
3157 |
using differentiable_imp_continuous_on differentiable_onD piecewise_differentiable_on_def by fastforce |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3158 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3159 |
lemma differentiable_imp_piecewise_differentiable: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3160 |
"(\<And>x. x \<in> S \<Longrightarrow> f differentiable (at x within S)) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3161 |
\<Longrightarrow> f piecewise_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3162 |
by (auto simp: piecewise_differentiable_on_def differentiable_imp_continuous_on differentiable_on_def |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3163 |
intro: differentiable_within_subset) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3164 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3165 |
lemma piecewise_differentiable_const [iff]: "(\<lambda>x. z) piecewise_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3166 |
by (simp add: differentiable_imp_piecewise_differentiable) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3167 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3168 |
lemma piecewise_differentiable_compose: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3169 |
"\<lbrakk>f piecewise_differentiable_on S; g piecewise_differentiable_on (f ` S); |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3170 |
\<And>x. finite (S \<inter> f-`{x})\<rbrakk> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3171 |
\<Longrightarrow> (g \<circ> f) piecewise_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3172 |
apply (simp add: piecewise_differentiable_on_def, safe) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3173 |
apply (blast intro: continuous_on_compose2) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3174 |
apply (rename_tac A B) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3175 |
apply (rule_tac x="A \<union> (\<Union>x\<in>B. S \<inter> f-`{x})" in exI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3176 |
apply (blast intro!: differentiable_chain_within) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3177 |
done |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3178 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3179 |
lemma piecewise_differentiable_affine: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3180 |
fixes m::real |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3181 |
assumes "f piecewise_differentiable_on ((\<lambda>x. m *\<^sub>R x + c) ` S)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3182 |
shows "(f \<circ> (\<lambda>x. m *\<^sub>R x + c)) piecewise_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3183 |
proof (cases "m = 0") |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3184 |
case True |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3185 |
then show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3186 |
unfolding o_def |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3187 |
by (force intro: differentiable_imp_piecewise_differentiable differentiable_const) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3188 |
next |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3189 |
case False |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3190 |
show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3191 |
apply (rule piecewise_differentiable_compose [OF differentiable_imp_piecewise_differentiable]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3192 |
apply (rule assms derivative_intros | simp add: False vimage_def real_vector_affinity_eq)+ |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3193 |
done |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3194 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3195 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3196 |
lemma piecewise_differentiable_cases: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3197 |
fixes c::real |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3198 |
assumes "f piecewise_differentiable_on {a..c}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3199 |
"g piecewise_differentiable_on {c..b}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3200 |
"a \<le> c" "c \<le> b" "f c = g c" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3201 |
shows "(\<lambda>x. if x \<le> c then f x else g x) piecewise_differentiable_on {a..b}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3202 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3203 |
obtain S T where st: "finite S" "finite T" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3204 |
and fd: "\<And>x. x \<in> {a..c} - S \<Longrightarrow> f differentiable at x within {a..c}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3205 |
and gd: "\<And>x. x \<in> {c..b} - T \<Longrightarrow> g differentiable at x within {c..b}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3206 |
using assms |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3207 |
by (auto simp: piecewise_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3208 |
have finabc: "finite ({a,b,c} \<union> (S \<union> T))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3209 |
by (metis \<open>finite S\<close> \<open>finite T\<close> finite_Un finite_insert finite.emptyI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3210 |
have "continuous_on {a..c} f" "continuous_on {c..b} g" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3211 |
using assms piecewise_differentiable_on_def by auto |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3212 |
then have "continuous_on {a..b} (\<lambda>x. if x \<le> c then f x else g x)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3213 |
using continuous_on_cases [OF closed_real_atLeastAtMost [of a c], |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3214 |
OF closed_real_atLeastAtMost [of c b], |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3215 |
of f g "\<lambda>x. x\<le>c"] assms |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3216 |
by (force simp: ivl_disj_un_two_touch) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3217 |
moreover |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3218 |
{ fix x |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3219 |
assume x: "x \<in> {a..b} - ({a,b,c} \<union> (S \<union> T))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3220 |
have "(\<lambda>x. if x \<le> c then f x else g x) differentiable at x within {a..b}" (is "?diff_fg") |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3221 |
proof (cases x c rule: le_cases) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3222 |
case le show ?diff_fg |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3223 |
proof (rule differentiable_transform_within [where d = "dist x c"]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3224 |
have "f differentiable at x" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3225 |
using x le fd [of x] at_within_interior [of x "{a..c}"] by simp |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3226 |
then show "f differentiable at x within {a..b}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3227 |
by (simp add: differentiable_at_withinI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3228 |
qed (use x le st dist_real_def in auto) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3229 |
next |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3230 |
case ge show ?diff_fg |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3231 |
proof (rule differentiable_transform_within [where d = "dist x c"]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3232 |
have "g differentiable at x" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3233 |
using x ge gd [of x] at_within_interior [of x "{c..b}"] by simp |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3234 |
then show "g differentiable at x within {a..b}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3235 |
by (simp add: differentiable_at_withinI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3236 |
qed (use x ge st dist_real_def in auto) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3237 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3238 |
} |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3239 |
then have "\<exists>S. finite S \<and> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3240 |
(\<forall>x\<in>{a..b} - S. (\<lambda>x. if x \<le> c then f x else g x) differentiable at x within {a..b})" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3241 |
by (meson finabc) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3242 |
ultimately show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3243 |
by (simp add: piecewise_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3244 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3245 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3246 |
lemma piecewise_differentiable_neg: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3247 |
"f piecewise_differentiable_on S \<Longrightarrow> (\<lambda>x. -(f x)) piecewise_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3248 |
by (auto simp: piecewise_differentiable_on_def continuous_on_minus) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3249 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3250 |
lemma piecewise_differentiable_add: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3251 |
assumes "f piecewise_differentiable_on i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3252 |
"g piecewise_differentiable_on i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3253 |
shows "(\<lambda>x. f x + g x) piecewise_differentiable_on i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3254 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3255 |
obtain S T where st: "finite S" "finite T" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3256 |
"\<forall>x\<in>i - S. f differentiable at x within i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3257 |
"\<forall>x\<in>i - T. g differentiable at x within i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3258 |
using assms by (auto simp: piecewise_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3259 |
then have "finite (S \<union> T) \<and> (\<forall>x\<in>i - (S \<union> T). (\<lambda>x. f x + g x) differentiable at x within i)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3260 |
by auto |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3261 |
moreover have "continuous_on i f" "continuous_on i g" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3262 |
using assms piecewise_differentiable_on_def by auto |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3263 |
ultimately show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3264 |
by (auto simp: piecewise_differentiable_on_def continuous_on_add) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3265 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3266 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3267 |
lemma piecewise_differentiable_diff: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3268 |
"\<lbrakk>f piecewise_differentiable_on S; g piecewise_differentiable_on S\<rbrakk> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3269 |
\<Longrightarrow> (\<lambda>x. f x - g x) piecewise_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3270 |
unfolding diff_conv_add_uminus |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3271 |
by (metis piecewise_differentiable_add piecewise_differentiable_neg) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3272 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3273 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3274 |
subsection\<open>The concept of continuously differentiable\<close> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3275 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3276 |
text \<open> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3277 |
John Harrison writes as follows: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3278 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3279 |
``The usual assumption in complex analysis texts is that a path \<open>\<gamma>\<close> should be piecewise |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3280 |
continuously differentiable, which ensures that the path integral exists at least for any continuous |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3281 |
f, since all piecewise continuous functions are integrable. However, our notion of validity is |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3282 |
weaker, just piecewise differentiability\ldots{} [namely] continuity plus differentiability except on a |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3283 |
finite set\ldots{} [Our] underlying theory of integration is the Kurzweil-Henstock theory. In contrast to |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3284 |
the Riemann or Lebesgue theory (but in common with a simple notion based on antiderivatives), this |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3285 |
can integrate all derivatives.'' |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3286 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3287 |
"Formalizing basic complex analysis." From Insight to Proof: Festschrift in Honour of Andrzej Trybulec. |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3288 |
Studies in Logic, Grammar and Rhetoric 10.23 (2007): 151-165. |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3289 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3290 |
And indeed he does not assume that his derivatives are continuous, but the penalty is unreasonably |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3291 |
difficult proofs concerning winding numbers. We need a self-contained and straightforward theorem |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3292 |
asserting that all derivatives can be integrated before we can adopt Harrison's choice.\<close> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3293 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3294 |
definition\<^marker>\<open>tag important\<close> C1_differentiable_on :: "(real \<Rightarrow> 'a::real_normed_vector) \<Rightarrow> real set \<Rightarrow> bool" |
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
79566
diff
changeset
|
3295 |
(infix \<open>C1'_differentiable'_on\<close> 50) |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3296 |
where |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3297 |
"f C1_differentiable_on S \<longleftrightarrow> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3298 |
(\<exists>D. (\<forall>x \<in> S. (f has_vector_derivative (D x)) (at x)) \<and> continuous_on S D)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3299 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3300 |
lemma C1_differentiable_on_eq: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3301 |
"f C1_differentiable_on S \<longleftrightarrow> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3302 |
(\<forall>x \<in> S. f differentiable at x) \<and> continuous_on S (\<lambda>x. vector_derivative f (at x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3303 |
(is "?lhs = ?rhs") |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3304 |
proof |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3305 |
assume ?lhs |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3306 |
then show ?rhs |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3307 |
unfolding C1_differentiable_on_def |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3308 |
by (metis (no_types, lifting) continuous_on_eq differentiableI_vector vector_derivative_at) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3309 |
next |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3310 |
assume ?rhs |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3311 |
then show ?lhs |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3312 |
using C1_differentiable_on_def vector_derivative_works by fastforce |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3313 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3314 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3315 |
lemma C1_differentiable_on_subset: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3316 |
"f C1_differentiable_on T \<Longrightarrow> S \<subseteq> T \<Longrightarrow> f C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3317 |
unfolding C1_differentiable_on_def continuous_on_eq_continuous_within |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3318 |
by (blast intro: continuous_within_subset) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3319 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3320 |
lemma C1_differentiable_compose: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3321 |
assumes fg: "f C1_differentiable_on S" "g C1_differentiable_on (f ` S)" and fin: "\<And>x. finite (S \<inter> f-`{x})" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3322 |
shows "(g \<circ> f) C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3323 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3324 |
have "\<And>x. x \<in> S \<Longrightarrow> g \<circ> f differentiable at x" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3325 |
by (meson C1_differentiable_on_eq assms differentiable_chain_at imageI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3326 |
moreover have "continuous_on S (\<lambda>x. vector_derivative (g \<circ> f) (at x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3327 |
proof (rule continuous_on_eq [of _ "\<lambda>x. vector_derivative f (at x) *\<^sub>R vector_derivative g (at (f x))"]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3328 |
show "continuous_on S (\<lambda>x. vector_derivative f (at x) *\<^sub>R vector_derivative g (at (f x)))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3329 |
using fg |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3330 |
apply (clarsimp simp add: C1_differentiable_on_eq) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3331 |
apply (rule Limits.continuous_on_scaleR, assumption) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3332 |
by (metis (mono_tags, lifting) continuous_at_imp_continuous_on continuous_on_compose continuous_on_cong differentiable_imp_continuous_within o_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3333 |
show "\<And>x. x \<in> S \<Longrightarrow> vector_derivative f (at x) *\<^sub>R vector_derivative g (at (f x)) = vector_derivative (g \<circ> f) (at x)" |
73932
fd21b4a93043
added opaque_combs and renamed hide_lams to opaque_lifting
desharna
parents:
73795
diff
changeset
|
3334 |
by (metis (mono_tags, opaque_lifting) C1_differentiable_on_eq fg imageI vector_derivative_chain_at) |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3335 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3336 |
ultimately show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3337 |
by (simp add: C1_differentiable_on_eq) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3338 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3339 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3340 |
lemma C1_diff_imp_diff: "f C1_differentiable_on S \<Longrightarrow> f differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3341 |
by (simp add: C1_differentiable_on_eq differentiable_at_imp_differentiable_on) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3342 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3343 |
lemma C1_differentiable_on_ident [simp, derivative_intros]: "(\<lambda>x. x) C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3344 |
by (auto simp: C1_differentiable_on_eq) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3345 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3346 |
lemma C1_differentiable_on_const [simp, derivative_intros]: "(\<lambda>z. a) C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3347 |
by (auto simp: C1_differentiable_on_eq) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3348 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3349 |
lemma C1_differentiable_on_add [simp, derivative_intros]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3350 |
"f C1_differentiable_on S \<Longrightarrow> g C1_differentiable_on S \<Longrightarrow> (\<lambda>x. f x + g x) C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3351 |
unfolding C1_differentiable_on_eq by (auto intro: continuous_intros) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3352 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3353 |
lemma C1_differentiable_on_minus [simp, derivative_intros]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3354 |
"f C1_differentiable_on S \<Longrightarrow> (\<lambda>x. - f x) C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3355 |
unfolding C1_differentiable_on_eq by (auto intro: continuous_intros) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3356 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3357 |
lemma C1_differentiable_on_diff [simp, derivative_intros]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3358 |
"f C1_differentiable_on S \<Longrightarrow> g C1_differentiable_on S \<Longrightarrow> (\<lambda>x. f x - g x) C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3359 |
unfolding C1_differentiable_on_eq by (auto intro: continuous_intros) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3360 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3361 |
lemma C1_differentiable_on_mult [simp, derivative_intros]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3362 |
fixes f g :: "real \<Rightarrow> 'a :: real_normed_algebra" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3363 |
shows "f C1_differentiable_on S \<Longrightarrow> g C1_differentiable_on S \<Longrightarrow> (\<lambda>x. f x * g x) C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3364 |
unfolding C1_differentiable_on_eq |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3365 |
by (auto simp: continuous_on_add continuous_on_mult continuous_at_imp_continuous_on differentiable_imp_continuous_within) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3366 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3367 |
lemma C1_differentiable_on_scaleR [simp, derivative_intros]: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3368 |
"f C1_differentiable_on S \<Longrightarrow> g C1_differentiable_on S \<Longrightarrow> (\<lambda>x. f x *\<^sub>R g x) C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3369 |
unfolding C1_differentiable_on_eq |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3370 |
by (rule continuous_intros | simp add: continuous_at_imp_continuous_on differentiable_imp_continuous_within)+ |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3371 |
|
73795 | 3372 |
lemma C1_differentiable_on_of_real [derivative_intros]: "of_real C1_differentiable_on S" |
3373 |
unfolding C1_differentiable_on_def |
|
77140
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3374 |
using vector_derivative_works by fastforce |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3375 |
|
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3376 |
lemma C1_differentiable_on_translation: |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3377 |
"f C1_differentiable_on U - S \<Longrightarrow> (+) d \<circ> f C1_differentiable_on U - S" |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3378 |
by (metis C1_differentiable_on_def has_vector_derivative_shift) |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3379 |
|
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3380 |
lemma C1_differentiable_on_translation_eq: |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3381 |
fixes d :: "'a::real_normed_vector" |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3382 |
shows "(+) d \<circ> f C1_differentiable_on i - S \<longleftrightarrow> f C1_differentiable_on i - S" |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3383 |
by (force simp: o_def intro: C1_differentiable_on_translation dest: C1_differentiable_on_translation [of concl: "-d"]) |
73795 | 3384 |
|
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3385 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3386 |
definition\<^marker>\<open>tag important\<close> piecewise_C1_differentiable_on |
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
79566
diff
changeset
|
3387 |
(infixr \<open>piecewise'_C1'_differentiable'_on\<close> 50) |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3388 |
where "f piecewise_C1_differentiable_on i \<equiv> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3389 |
continuous_on i f \<and> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3390 |
(\<exists>S. finite S \<and> (f C1_differentiable_on (i - S)))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3391 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3392 |
lemma C1_differentiable_imp_piecewise: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3393 |
"f C1_differentiable_on S \<Longrightarrow> f piecewise_C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3394 |
by (auto simp: piecewise_C1_differentiable_on_def C1_differentiable_on_eq continuous_at_imp_continuous_on differentiable_imp_continuous_within) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3395 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3396 |
lemma piecewise_C1_imp_differentiable: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3397 |
"f piecewise_C1_differentiable_on i \<Longrightarrow> f piecewise_differentiable_on i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3398 |
by (auto simp: piecewise_C1_differentiable_on_def piecewise_differentiable_on_def |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3399 |
C1_differentiable_on_def differentiable_def has_vector_derivative_def |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3400 |
intro: has_derivative_at_withinI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3401 |
|
77140
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3402 |
lemma piecewise_C1_differentiable_on_translation_eq: |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3403 |
"((+) d \<circ> f piecewise_C1_differentiable_on i) \<longleftrightarrow> (f piecewise_C1_differentiable_on i)" |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3404 |
unfolding piecewise_C1_differentiable_on_def continuous_on_translation_eq |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3405 |
by (metis C1_differentiable_on_translation_eq) |
9a60c1759543
Lots more new material thanks to Manuel Eberl
paulson <lp15@cam.ac.uk>
parents:
76832
diff
changeset
|
3406 |
|
73795 | 3407 |
lemma piecewise_C1_differentiable_compose [derivative_intros]: |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3408 |
assumes fg: "f piecewise_C1_differentiable_on S" "g piecewise_C1_differentiable_on (f ` S)" and fin: "\<And>x. finite (S \<inter> f-`{x})" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3409 |
shows "(g \<circ> f) piecewise_C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3410 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3411 |
have "continuous_on S (\<lambda>x. g (f x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3412 |
by (metis continuous_on_compose2 fg order_refl piecewise_C1_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3413 |
moreover have "\<exists>T. finite T \<and> g \<circ> f C1_differentiable_on S - T" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3414 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3415 |
obtain F where "finite F" and F: "f C1_differentiable_on S - F" and f: "f piecewise_C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3416 |
using fg by (auto simp: piecewise_C1_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3417 |
obtain G where "finite G" and G: "g C1_differentiable_on f ` S - G" and g: "g piecewise_C1_differentiable_on f ` S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3418 |
using fg by (auto simp: piecewise_C1_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3419 |
show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3420 |
proof (intro exI conjI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3421 |
show "finite (F \<union> (\<Union>x\<in>G. S \<inter> f-`{x}))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3422 |
using fin by (auto simp only: Int_Union \<open>finite F\<close> \<open>finite G\<close> finite_UN finite_imageI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3423 |
show "g \<circ> f C1_differentiable_on S - (F \<union> (\<Union>x\<in>G. S \<inter> f -` {x}))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3424 |
apply (rule C1_differentiable_compose) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3425 |
apply (blast intro: C1_differentiable_on_subset [OF F]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3426 |
apply (blast intro: C1_differentiable_on_subset [OF G]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3427 |
by (simp add: C1_differentiable_on_subset G Diff_Int_distrib2 fin) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3428 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3429 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3430 |
ultimately show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3431 |
by (simp add: piecewise_C1_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3432 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3433 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3434 |
lemma piecewise_C1_differentiable_on_subset: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3435 |
"f piecewise_C1_differentiable_on S \<Longrightarrow> T \<le> S \<Longrightarrow> f piecewise_C1_differentiable_on T" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3436 |
by (auto simp: piecewise_C1_differentiable_on_def elim!: continuous_on_subset C1_differentiable_on_subset) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3437 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3438 |
lemma C1_differentiable_imp_continuous_on: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3439 |
"f C1_differentiable_on S \<Longrightarrow> continuous_on S f" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3440 |
unfolding C1_differentiable_on_eq continuous_on_eq_continuous_within |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3441 |
using differentiable_at_withinI differentiable_imp_continuous_within by blast |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3442 |
|
73795 | 3443 |
lemma C1_differentiable_on_empty [iff,derivative_intros]: "f C1_differentiable_on {}" |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3444 |
unfolding C1_differentiable_on_def |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3445 |
by auto |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3446 |
|
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3447 |
lemma piecewise_C1_differentiable_affine: |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3448 |
fixes m::real |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3449 |
assumes "f piecewise_C1_differentiable_on ((\<lambda>x. m * x + c) ` S)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3450 |
shows "(f \<circ> (\<lambda>x. m *\<^sub>R x + c)) piecewise_C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3451 |
proof (cases "m = 0") |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3452 |
case True |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3453 |
then show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3454 |
unfolding o_def by (auto simp: piecewise_C1_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3455 |
next |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3456 |
case False |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3457 |
have *: "\<And>x. finite (S \<inter> {y. m * y + c = x})" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3458 |
using False not_finite_existsD by fastforce |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3459 |
show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3460 |
apply (rule piecewise_C1_differentiable_compose [OF C1_differentiable_imp_piecewise]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3461 |
apply (rule * assms derivative_intros | simp add: False vimage_def)+ |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3462 |
done |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3463 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3464 |
|
73795 | 3465 |
lemma piecewise_C1_differentiable_cases [derivative_intros]: |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3466 |
fixes c::real |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3467 |
assumes "f piecewise_C1_differentiable_on {a..c}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3468 |
"g piecewise_C1_differentiable_on {c..b}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3469 |
"a \<le> c" "c \<le> b" "f c = g c" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3470 |
shows "(\<lambda>x. if x \<le> c then f x else g x) piecewise_C1_differentiable_on {a..b}" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3471 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3472 |
obtain S T where st: "f C1_differentiable_on ({a..c} - S)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3473 |
"g C1_differentiable_on ({c..b} - T)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3474 |
"finite S" "finite T" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3475 |
using assms |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3476 |
by (force simp: piecewise_C1_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3477 |
then have f_diff: "f differentiable_on {a..<c} - S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3478 |
and g_diff: "g differentiable_on {c<..b} - T" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3479 |
by (simp_all add: C1_differentiable_on_eq differentiable_at_withinI differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3480 |
have "continuous_on {a..c} f" "continuous_on {c..b} g" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3481 |
using assms piecewise_C1_differentiable_on_def by auto |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3482 |
then have cab: "continuous_on {a..b} (\<lambda>x. if x \<le> c then f x else g x)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3483 |
using continuous_on_cases [OF closed_real_atLeastAtMost [of a c], |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3484 |
OF closed_real_atLeastAtMost [of c b], |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3485 |
of f g "\<lambda>x. x\<le>c"] assms |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3486 |
by (force simp: ivl_disj_un_two_touch) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3487 |
{ fix x |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3488 |
assume x: "x \<in> {a..b} - insert c (S \<union> T)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3489 |
have "(\<lambda>x. if x \<le> c then f x else g x) differentiable at x" (is "?diff_fg") |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3490 |
proof (cases x c rule: le_cases) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3491 |
case le show ?diff_fg |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3492 |
apply (rule differentiable_transform_within [where f=f and d = "dist x c"]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3493 |
using x dist_real_def le st by (auto simp: C1_differentiable_on_eq) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3494 |
next |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3495 |
case ge show ?diff_fg |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3496 |
apply (rule differentiable_transform_within [where f=g and d = "dist x c"]) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3497 |
using dist_nz x dist_real_def ge st x by (auto simp: C1_differentiable_on_eq) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3498 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3499 |
} |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3500 |
then have "(\<forall>x \<in> {a..b} - insert c (S \<union> T). (\<lambda>x. if x \<le> c then f x else g x) differentiable at x)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3501 |
by auto |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3502 |
moreover |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3503 |
{ assume fcon: "continuous_on ({a<..<c} - S) (\<lambda>x. vector_derivative f (at x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3504 |
and gcon: "continuous_on ({c<..<b} - T) (\<lambda>x. vector_derivative g (at x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3505 |
have "open ({a<..<c} - S)" "open ({c<..<b} - T)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3506 |
using st by (simp_all add: open_Diff finite_imp_closed) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3507 |
moreover have "continuous_on ({a<..<c} - S) (\<lambda>x. vector_derivative (\<lambda>x. if x \<le> c then f x else g x) (at x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3508 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3509 |
have "((\<lambda>x. if x \<le> c then f x else g x) has_vector_derivative vector_derivative f (at x)) (at x)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3510 |
if "a < x" "x < c" "x \<notin> S" for x |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3511 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3512 |
have f: "f differentiable at x" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3513 |
by (meson C1_differentiable_on_eq Diff_iff atLeastAtMost_iff less_eq_real_def st(1) that) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3514 |
show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3515 |
using that |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3516 |
apply (rule_tac f=f and d="dist x c" in has_vector_derivative_transform_within) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3517 |
apply (auto simp: dist_norm vector_derivative_works [symmetric] f) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3518 |
done |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3519 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3520 |
then show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3521 |
by (metis (no_types, lifting) continuous_on_eq [OF fcon] DiffE greaterThanLessThan_iff vector_derivative_at) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3522 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3523 |
moreover have "continuous_on ({c<..<b} - T) (\<lambda>x. vector_derivative (\<lambda>x. if x \<le> c then f x else g x) (at x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3524 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3525 |
have "((\<lambda>x. if x \<le> c then f x else g x) has_vector_derivative vector_derivative g (at x)) (at x)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3526 |
if "c < x" "x < b" "x \<notin> T" for x |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3527 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3528 |
have g: "g differentiable at x" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3529 |
by (metis C1_differentiable_on_eq DiffD1 DiffI atLeastAtMost_diff_ends greaterThanLessThan_iff st(2) that) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3530 |
show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3531 |
using that |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3532 |
apply (rule_tac f=g and d="dist x c" in has_vector_derivative_transform_within) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3533 |
apply (auto simp: dist_norm vector_derivative_works [symmetric] g) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3534 |
done |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3535 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3536 |
then show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3537 |
by (metis (no_types, lifting) continuous_on_eq [OF gcon] DiffE greaterThanLessThan_iff vector_derivative_at) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3538 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3539 |
ultimately have "continuous_on ({a<..<b} - insert c (S \<union> T)) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3540 |
(\<lambda>x. vector_derivative (\<lambda>x. if x \<le> c then f x else g x) (at x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3541 |
by (rule continuous_on_subset [OF continuous_on_open_Un], auto) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3542 |
} note * = this |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3543 |
have "continuous_on ({a<..<b} - insert c (S \<union> T)) (\<lambda>x. vector_derivative (\<lambda>x. if x \<le> c then f x else g x) (at x))" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3544 |
using st |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3545 |
by (auto simp: C1_differentiable_on_eq elim!: continuous_on_subset intro: *) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3546 |
ultimately have "\<exists>S. finite S \<and> ((\<lambda>x. if x \<le> c then f x else g x) C1_differentiable_on {a..b} - S)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3547 |
apply (rule_tac x="{a,b,c} \<union> S \<union> T" in exI) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3548 |
using st by (auto simp: C1_differentiable_on_eq elim!: continuous_on_subset) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3549 |
with cab show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3550 |
by (simp add: piecewise_C1_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3551 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3552 |
|
73795 | 3553 |
lemma piecewise_C1_differentiable_const [derivative_intros]: |
3554 |
"(\<lambda>x. c) piecewise_C1_differentiable_on S" |
|
3555 |
by (simp add: C1_differentiable_imp_piecewise) |
|
3556 |
||
3557 |
lemma piecewise_C1_differentiable_scaleR [derivative_intros]: |
|
3558 |
"\<lbrakk>f piecewise_C1_differentiable_on S\<rbrakk> |
|
3559 |
\<Longrightarrow> (\<lambda>x. c *\<^sub>R f x) piecewise_C1_differentiable_on S" |
|
3560 |
by (force simp add: piecewise_C1_differentiable_on_def continuous_on_scaleR) |
|
3561 |
||
3562 |
lemma piecewise_C1_differentiable_neg [derivative_intros]: |
|
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3563 |
"f piecewise_C1_differentiable_on S \<Longrightarrow> (\<lambda>x. -(f x)) piecewise_C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3564 |
unfolding piecewise_C1_differentiable_on_def |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3565 |
by (auto intro!: continuous_on_minus C1_differentiable_on_minus) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3566 |
|
73795 | 3567 |
lemma piecewise_C1_differentiable_add [derivative_intros]: |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3568 |
assumes "f piecewise_C1_differentiable_on i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3569 |
"g piecewise_C1_differentiable_on i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3570 |
shows "(\<lambda>x. f x + g x) piecewise_C1_differentiable_on i" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3571 |
proof - |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3572 |
obtain S t where st: "finite S" "finite t" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3573 |
"f C1_differentiable_on (i-S)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3574 |
"g C1_differentiable_on (i-t)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3575 |
using assms by (auto simp: piecewise_C1_differentiable_on_def) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3576 |
then have "finite (S \<union> t) \<and> (\<lambda>x. f x + g x) C1_differentiable_on i - (S \<union> t)" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3577 |
by (auto intro: C1_differentiable_on_add elim!: C1_differentiable_on_subset) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3578 |
moreover have "continuous_on i f" "continuous_on i g" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3579 |
using assms piecewise_C1_differentiable_on_def by auto |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3580 |
ultimately show ?thesis |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3581 |
by (auto simp: piecewise_C1_differentiable_on_def continuous_on_add) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3582 |
qed |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3583 |
|
73795 | 3584 |
lemma piecewise_C1_differentiable_diff [derivative_intros]: |
71189
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3585 |
"\<lbrakk>f piecewise_C1_differentiable_on S; g piecewise_C1_differentiable_on S\<rbrakk> |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3586 |
\<Longrightarrow> (\<lambda>x. f x - g x) piecewise_C1_differentiable_on S" |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3587 |
unfolding diff_conv_add_uminus |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3588 |
by (metis piecewise_C1_differentiable_add piecewise_C1_differentiable_neg) |
954ee5acaae0
Split off new HOL-Complex_Analysis session from HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
71174
diff
changeset
|
3589 |
|
73795 | 3590 |
lemma piecewise_C1_differentiable_cmult_right [derivative_intros]: |
3591 |
fixes c::complex |
|
3592 |
shows "f piecewise_C1_differentiable_on S |
|
3593 |
\<Longrightarrow> (\<lambda>x. f x * c) piecewise_C1_differentiable_on S" |
|
3594 |
by (force simp: piecewise_C1_differentiable_on_def continuous_on_mult_right) |
|
3595 |
||
3596 |
lemma piecewise_C1_differentiable_cmult_left [derivative_intros]: |
|
3597 |
fixes c::complex |
|
3598 |
shows "f piecewise_C1_differentiable_on S |
|
3599 |
\<Longrightarrow> (\<lambda>x. c * f x) piecewise_C1_differentiable_on S" |
|
3600 |
using piecewise_C1_differentiable_cmult_right [of f S c] by (simp add: mult.commute) |
|
3601 |
||
3602 |
lemma piecewise_C1_differentiable_on_of_real [derivative_intros]: |
|
3603 |
"of_real piecewise_C1_differentiable_on S" |
|
3604 |
by (simp add: C1_differentiable_imp_piecewise C1_differentiable_on_of_real) |
|
3605 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3606 |
end |