author | hoelzl |
Fri, 25 Sep 2015 16:54:31 +0200 | |
changeset 61245 | b77bf45efe21 |
parent 61204 | 3e491e34a62e |
child 61518 | ff12606337e9 |
permissions | -rw-r--r-- |
53781 | 1 |
(* Title: HOL/Multivariate_Analysis/Derivative.thy |
2 |
Author: John Harrison |
|
3 |
Author: Robert Himmelmann, TU Muenchen (translation from HOL Light) |
|
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 |
|
60420 | 6 |
section \<open>Multivariate calculus in Euclidean space\<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 |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
9 |
imports Brouwer_Fixpoint Operator_Norm |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
10 |
begin |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
11 |
|
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
|
12 |
lemma netlimit_at_vector: (* TODO: move *) |
37730 | 13 |
fixes a :: "'a::real_normed_vector" |
14 |
shows "netlimit (at a) = a" |
|
15 |
proof (cases "\<exists>x. x \<noteq> a") |
|
16 |
case True then obtain x where x: "x \<noteq> a" .. |
|
17 |
have "\<not> trivial_limit (at a)" |
|
18 |
unfolding trivial_limit_def eventually_at dist_norm |
|
19 |
apply clarsimp |
|
20 |
apply (rule_tac x="a + scaleR (d / 2) (sgn (x - a))" in exI) |
|
21 |
apply (simp add: norm_sgn sgn_zero_iff x) |
|
22 |
done |
|
53781 | 23 |
then show ?thesis |
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
|
24 |
by (rule netlimit_within [of a UNIV]) |
37730 | 25 |
qed simp |
26 |
||
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 |
(* Because I do not want to type this all the time *) |
53781 | 28 |
lemmas linear_linear = linear_conv_bounded_linear[symmetric] |
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
|
29 |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
30 |
declare has_derivative_bounded_linear[dest] |
44137 | 31 |
|
60420 | 32 |
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
|
33 |
|
60420 | 34 |
subsubsection \<open>Combining theorems.\<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
|
35 |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
36 |
lemmas has_derivative_id = has_derivative_ident |
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
37 |
lemmas has_derivative_neg = has_derivative_minus |
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
38 |
lemmas has_derivative_sub = has_derivative_diff |
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
39 |
lemmas scaleR_right_has_derivative = has_derivative_scaleR_right |
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
40 |
lemmas scaleR_left_has_derivative = has_derivative_scaleR_left |
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
41 |
lemmas inner_right_has_derivative = has_derivative_inner_right |
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
42 |
lemmas inner_left_has_derivative = has_derivative_inner_left |
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
43 |
lemmas mult_right_has_derivative = has_derivative_mult_right |
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
44 |
lemmas mult_left_has_derivative = has_derivative_mult_left |
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
|
45 |
|
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
|
46 |
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
|
47 |
"(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
|
48 |
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
|
49 |
|
53781 | 50 |
|
60420 | 51 |
subsection \<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
|
52 |
|
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
|
53 |
lemma has_derivative_bilinear_within: |
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
|
54 |
assumes "(f has_derivative f') (at x within s)" |
53781 | 55 |
and "(g has_derivative g') (at x within s)" |
56 |
and "bounded_bilinear h" |
|
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
|
57 |
shows "((\<lambda>x. h (f x) (g x)) has_derivative (\<lambda>d. h (f x) (g' d) + h (f' d) (g x))) (at x within s)" |
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
|
58 |
using bounded_bilinear.FDERIV[OF assms(3,1,2)] . |
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
|
59 |
|
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
|
60 |
lemma has_derivative_bilinear_at: |
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
|
61 |
assumes "(f has_derivative f') (at x)" |
53781 | 62 |
and "(g has_derivative g') (at x)" |
63 |
and "bounded_bilinear h" |
|
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
|
64 |
shows "((\<lambda>x. h (f x) (g x)) has_derivative (\<lambda>d. h (f x) (g' d) + h (f' d) (g x))) (at x)" |
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
|
65 |
using has_derivative_bilinear_within[of f f' x UNIV g g' h] assms 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
|
66 |
|
60420 | 67 |
text \<open>These are the only cases we'll care about, probably.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
68 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
69 |
lemma has_derivative_within: "(f has_derivative f') (at x within s) \<longleftrightarrow> |
53781 | 70 |
bounded_linear f' \<and> ((\<lambda>y. (1 / norm(y - x)) *\<^sub>R (f y - (f x + f' (y - x)))) ---> 0) (at x within s)" |
71 |
unfolding has_derivative_def Lim |
|
57865 | 72 |
by (auto simp add: netlimit_within field_simps) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
73 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
74 |
lemma has_derivative_at: "(f has_derivative f') (at x) \<longleftrightarrow> |
53781 | 75 |
bounded_linear f' \<and> ((\<lambda>y. (1 / (norm(y - x))) *\<^sub>R (f y - (f x + f' (y - x)))) ---> 0) (at x)" |
76 |
using has_derivative_within [of f f' x UNIV] |
|
77 |
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
|
78 |
|
60420 | 79 |
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
|
80 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
81 |
lemma has_derivative_within': |
53781 | 82 |
"(f has_derivative f')(at x within s) \<longleftrightarrow> |
83 |
bounded_linear f' \<and> |
|
84 |
(\<forall>e>0. \<exists>d>0. \<forall>x'\<in>s. 0 < norm (x' - x) \<and> norm (x' - x) < d \<longrightarrow> |
|
85 |
norm (f x' - f x - f'(x' - x)) / norm (x' - x) < e)" |
|
36587 | 86 |
unfolding has_derivative_within Lim_within dist_norm |
53781 | 87 |
unfolding diff_0_right |
88 |
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
|
89 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
90 |
lemma has_derivative_at': |
53781 | 91 |
"(f has_derivative f') (at x) \<longleftrightarrow> bounded_linear f' \<and> |
92 |
(\<forall>e>0. \<exists>d>0. \<forall>x'. 0 < norm (x' - x) \<and> norm (x' - x) < d \<longrightarrow> |
|
93 |
norm (f x' - f x - f'(x' - x)) / norm (x' - x) < e)" |
|
94 |
using has_derivative_within' [of f f' x UNIV] |
|
95 |
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
|
96 |
|
53781 | 97 |
lemma has_derivative_at_within: |
98 |
"(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f') (at x within s)" |
|
99 |
unfolding has_derivative_within' has_derivative_at' |
|
100 |
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
|
101 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
102 |
lemma has_derivative_within_open: |
53781 | 103 |
"a \<in> s \<Longrightarrow> open s \<Longrightarrow> |
104 |
(f has_derivative f') (at a within s) \<longleftrightarrow> (f has_derivative f') (at a)" |
|
37730 | 105 |
by (simp only: 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
|
106 |
|
43338 | 107 |
lemma has_derivative_right: |
53781 | 108 |
fixes f :: "real \<Rightarrow> real" |
109 |
and y :: "real" |
|
43338 | 110 |
shows "(f has_derivative (op * y)) (at x within ({x <..} \<inter> I)) \<longleftrightarrow> |
111 |
((\<lambda>t. (f x - f t) / (x - t)) ---> y) (at x within ({x <..} \<inter> I))" |
|
112 |
proof - |
|
113 |
have "((\<lambda>t. (f t - (f x + y * (t - x))) / \<bar>t - x\<bar>) ---> 0) (at x within ({x<..} \<inter> I)) \<longleftrightarrow> |
|
114 |
((\<lambda>t. (f t - f x) / (t - x) - y) ---> 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
|
115 |
by (intro Lim_cong_within) (auto simp add: diff_divide_distrib add_divide_distrib) |
43338 | 116 |
also have "\<dots> \<longleftrightarrow> ((\<lambda>t. (f t - f x) / (t - x)) ---> y) (at x within ({x<..} \<inter> I))" |
117 |
by (simp add: Lim_null[symmetric]) |
|
118 |
also have "\<dots> \<longleftrightarrow> ((\<lambda>t. (f x - f t) / (x - t)) ---> y) (at x within ({x<..} \<inter> I))" |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
119 |
by (intro Lim_cong_within) (simp_all add: field_simps) |
43338 | 120 |
finally show ?thesis |
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
121 |
by (simp add: bounded_linear_mult_right has_derivative_within) |
43338 | 122 |
qed |
123 |
||
60420 | 124 |
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
|
125 |
|
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
126 |
lemma DERIV_within_iff: |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
127 |
"(f has_field_derivative D) (at a within s) \<longleftrightarrow> ((\<lambda>z. (f z - f a) / (z - a)) ---> D) (at a within s)" |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
128 |
proof - |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
129 |
have 1: "\<And>w y. ~(w = a) ==> y / (w - a) - D = (y - (w - a)*D)/(w - a)" |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57447
diff
changeset
|
130 |
by (metis divide_diff_eq_iff eq_iff_diff_eq_0 mult.commute) |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
131 |
show ?thesis |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
132 |
apply (simp add: has_field_derivative_def has_derivative_within bounded_linear_mult_right) |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
133 |
apply (simp add: LIM_zero_iff [where l = D, symmetric]) |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
134 |
apply (simp add: Lim_within dist_norm) |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
135 |
apply (simp add: nonzero_norm_divide [symmetric]) |
59815
cce82e360c2f
explicit commutative additive inverse operation;
haftmann
parents:
59558
diff
changeset
|
136 |
apply (simp add: 1 diff_diff_eq ac_simps) |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
137 |
done |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
138 |
qed |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
139 |
|
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
140 |
lemma DERIV_caratheodory_within: |
61104
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
141 |
"(f has_field_derivative l) (at x within s) \<longleftrightarrow> |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
142 |
(\<exists>g. (\<forall>z. f z - f x = g z * (z - x)) \<and> continuous (at x within s) g \<and> g x = l)" |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
143 |
(is "?lhs = ?rhs") |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
144 |
proof |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
145 |
assume ?lhs |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
146 |
show ?rhs |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
147 |
proof (intro exI conjI) |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
148 |
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
|
149 |
show "\<forall>z. f z - f x = ?g z * (z-x)" by simp |
60420 | 150 |
show "continuous (at x within s) ?g" using \<open>?lhs\<close> |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
151 |
by (auto simp add: continuous_within DERIV_within_iff cong: Lim_cong_within) |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
152 |
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
|
153 |
qed |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
154 |
next |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
155 |
assume ?rhs |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
156 |
then obtain g where |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
157 |
"(\<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
|
158 |
thus ?lhs |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
159 |
by (auto simp add: continuous_within DERIV_within_iff cong: Lim_cong_within) |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
160 |
qed |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
161 |
|
60420 | 162 |
subsubsection \<open>Limit transformation for 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
|
163 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
164 |
lemma has_derivative_transform_within: |
53781 | 165 |
assumes "0 < d" |
166 |
and "x \<in> s" |
|
167 |
and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
|
168 |
and "(f has_derivative f') (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
|
169 |
shows "(g has_derivative f') (at x within s)" |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
170 |
using assms |
53781 | 171 |
unfolding has_derivative_within |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
172 |
apply clarify |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
173 |
apply (rule Lim_transform_within, auto) |
53781 | 174 |
done |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
175 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
176 |
lemma has_derivative_transform_at: |
53781 | 177 |
assumes "0 < d" |
178 |
and "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" |
|
179 |
and "(f has_derivative f') (at x)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
180 |
shows "(g has_derivative f') (at x)" |
53781 | 181 |
using has_derivative_transform_within [of d x UNIV f g f'] assms |
182 |
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
|
183 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
184 |
lemma has_derivative_transform_within_open: |
53781 | 185 |
assumes "open s" |
186 |
and "x \<in> s" |
|
187 |
and "\<forall>y\<in>s. f y = g y" |
|
188 |
and "(f has_derivative f') (at x)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
189 |
shows "(g has_derivative f') (at x)" |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
190 |
using assms |
53781 | 191 |
unfolding has_derivative_at |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
192 |
apply clarify |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
193 |
apply (rule Lim_transform_within_open[OF assms(1,2)], auto) |
53781 | 194 |
done |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
195 |
|
60420 | 196 |
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
|
197 |
|
53781 | 198 |
definition |
199 |
differentiable_on :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a set \<Rightarrow> bool" |
|
56182
528fae0816ea
update syntax of has_*derivative to infix 50; fixed proofs
hoelzl
parents:
56181
diff
changeset
|
200 |
(infix "differentiable'_on" 50) |
53781 | 201 |
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
|
202 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
203 |
lemma differentiableI: "(f has_derivative f') net \<Longrightarrow> f differentiable net" |
53781 | 204 |
unfolding differentiable_def |
205 |
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
|
206 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
207 |
lemma differentiable_at_withinI: "f differentiable (at x) \<Longrightarrow> f differentiable (at x within s)" |
53781 | 208 |
unfolding differentiable_def |
209 |
using has_derivative_at_within |
|
210 |
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
|
211 |
|
61104
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
212 |
lemma differentiable_at_imp_differentiable_on: |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
213 |
"(\<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
|
214 |
by (metis differentiable_at_withinI differentiable_on_def) |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
215 |
|
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
216 |
corollary differentiable_iff_scaleR: |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
217 |
fixes f :: "real \<Rightarrow> 'a::real_normed_vector" |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
218 |
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
|
219 |
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
|
220 |
|
44123 | 221 |
lemma differentiable_within_open: (* TODO: delete *) |
53781 | 222 |
assumes "a \<in> s" |
223 |
and "open s" |
|
224 |
shows "f differentiable (at a within s) \<longleftrightarrow> f differentiable (at a)" |
|
225 |
using assms |
|
226 |
by (simp only: 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
|
227 |
|
44123 | 228 |
lemma differentiable_on_eq_differentiable_at: |
53781 | 229 |
"open s \<Longrightarrow> f differentiable_on s \<longleftrightarrow> (\<forall>x\<in>s. f differentiable at x)" |
44123 | 230 |
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
|
231 |
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
|
232 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
233 |
lemma differentiable_transform_within: |
53781 | 234 |
assumes "0 < d" |
235 |
and "x \<in> s" |
|
236 |
and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
|
44123 | 237 |
assumes "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
|
238 |
shows "g differentiable (at x within s)" |
53781 | 239 |
using assms(4) |
240 |
unfolding differentiable_def |
|
44123 | 241 |
by (auto intro!: has_derivative_transform_within[OF assms(1-3)]) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
242 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
243 |
lemma differentiable_transform_at: |
53781 | 244 |
assumes "0 < d" |
245 |
and "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" |
|
246 |
and "f differentiable at x" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
247 |
shows "g differentiable at x" |
53781 | 248 |
using assms(3) |
249 |
unfolding differentiable_def |
|
250 |
using has_derivative_transform_at[OF assms(1-2)] |
|
251 |
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
|
252 |
|
53781 | 253 |
|
60420 | 254 |
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
|
255 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
256 |
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
|
257 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
258 |
lemma frechet_derivative_works: |
53781 | 259 |
"f differentiable net \<longleftrightarrow> (f has_derivative (frechet_derivative f net)) net" |
260 |
unfolding frechet_derivative_def differentiable_def |
|
261 |
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
|
262 |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
263 |
lemma linear_frechet_derivative: "f differentiable net \<Longrightarrow> linear (frechet_derivative f net)" |
44123 | 264 |
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
|
265 |
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
|
266 |
|
53781 | 267 |
|
60420 | 268 |
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
|
269 |
|
44123 | 270 |
lemma 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
|
271 |
"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
|
272 |
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
|
273 |
|
44123 | 274 |
lemma differentiable_imp_continuous_on: |
275 |
"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
|
276 |
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
|
277 |
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
|
278 |
|
44123 | 279 |
lemma differentiable_on_subset: |
280 |
"f differentiable_on t \<Longrightarrow> s \<subseteq> t \<Longrightarrow> f differentiable_on s" |
|
53781 | 281 |
unfolding differentiable_on_def |
282 |
using differentiable_within_subset |
|
283 |
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
|
284 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
285 |
lemma differentiable_on_empty: "f differentiable_on {}" |
53781 | 286 |
unfolding differentiable_on_def |
287 |
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
|
288 |
|
60420 | 289 |
text \<open>Results about neighborhoods filter.\<close> |
56151 | 290 |
|
291 |
lemma eventually_nhds_metric_le: |
|
292 |
"eventually P (nhds a) = (\<exists>d>0. \<forall>x. dist x a \<le> d \<longrightarrow> P x)" |
|
293 |
unfolding eventually_nhds_metric by (safe, rule_tac x="d / 2" in exI, auto) |
|
294 |
||
295 |
lemma le_nhds: "F \<le> nhds a \<longleftrightarrow> (\<forall>S. open S \<and> a \<in> S \<longrightarrow> eventually (\<lambda>x. x \<in> S) F)" |
|
296 |
unfolding le_filter_def eventually_nhds by (fast elim: eventually_elim1) |
|
297 |
||
298 |
lemma le_nhds_metric: "F \<le> nhds a \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist x a < e) F)" |
|
299 |
unfolding le_filter_def eventually_nhds_metric by (fast elim: eventually_elim1) |
|
300 |
||
301 |
lemma le_nhds_metric_le: "F \<le> nhds a \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist x a \<le> e) F)" |
|
302 |
unfolding le_filter_def eventually_nhds_metric_le by (fast elim: eventually_elim1) |
|
303 |
||
60420 | 304 |
text \<open>Several results are easier using a "multiplied-out" variant. |
305 |
(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
|
306 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
307 |
lemma has_derivative_within_alt: |
53781 | 308 |
"(f has_derivative f') (at x within s) \<longleftrightarrow> bounded_linear f' \<and> |
309 |
(\<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 | 310 |
unfolding has_derivative_within filterlim_def le_nhds_metric_le eventually_filtermap |
59815
cce82e360c2f
explicit commutative additive inverse operation;
haftmann
parents:
59558
diff
changeset
|
311 |
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
|
312 |
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
|
313 |
|
56320 | 314 |
lemma has_derivative_within_alt2: |
315 |
"(f has_derivative f') (at x within s) \<longleftrightarrow> bounded_linear f' \<and> |
|
316 |
(\<forall>e>0. eventually (\<lambda>y. norm (f y - f x - f' (y - x)) \<le> e * norm (y - x)) (at x within s))" |
|
317 |
unfolding has_derivative_within filterlim_def le_nhds_metric_le eventually_filtermap |
|
59815
cce82e360c2f
explicit commutative additive inverse operation;
haftmann
parents:
59558
diff
changeset
|
318 |
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
|
319 |
by (force simp add: linear_0 bounded_linear.linear pos_divide_le_eq) |
56320 | 320 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
321 |
lemma has_derivative_at_alt: |
53781 | 322 |
"(f has_derivative f') (at x) \<longleftrightarrow> |
323 |
bounded_linear f' \<and> |
|
324 |
(\<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))" |
|
325 |
using has_derivative_within_alt[where s=UNIV] |
|
326 |
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
|
327 |
|
53781 | 328 |
|
60420 | 329 |
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
|
330 |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
331 |
lemma diff_chain_within[derivative_intros]: |
44123 | 332 |
assumes "(f has_derivative f') (at x within s)" |
53781 | 333 |
and "(g has_derivative g') (at (f x) within (f ` s))" |
334 |
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
|
335 |
using has_derivative_in_compose[OF assms] |
53781 | 336 |
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
|
337 |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
338 |
lemma diff_chain_at[derivative_intros]: |
53781 | 339 |
"(f has_derivative f') (at x) \<Longrightarrow> |
340 |
(g has_derivative g') (at (f x)) \<Longrightarrow> ((g \<circ> f) has_derivative (g' \<circ> f')) (at x)" |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
341 |
using has_derivative_compose[of f f' x UNIV g g'] |
53781 | 342 |
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
|
343 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
344 |
|
60420 | 345 |
subsection \<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
|
346 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
347 |
lemma differentiable_chain_at: |
53781 | 348 |
"f differentiable (at x) \<Longrightarrow> |
349 |
g differentiable (at (f x)) \<Longrightarrow> (g \<circ> f) differentiable (at x)" |
|
350 |
unfolding differentiable_def |
|
351 |
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
|
352 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
353 |
lemma differentiable_chain_within: |
53781 | 354 |
"f differentiable (at x within s) \<Longrightarrow> |
355 |
g differentiable (at(f x) within (f ` s)) \<Longrightarrow> (g \<circ> f) differentiable (at x within s)" |
|
356 |
unfolding differentiable_def |
|
357 |
by (meson diff_chain_within) |
|
358 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
359 |
|
60420 | 360 |
subsection \<open>Uniqueness of derivative\<close> |
37730 | 361 |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
362 |
|
60420 | 363 |
text \<open> |
37730 | 364 |
The general result is a bit messy because we need approachability of the |
365 |
limit point from any direction. But OK for nontrivial intervals etc. |
|
60420 | 366 |
\<close> |
51363
d4d00c804645
changed has_derivative_intros into a named theorems collection
hoelzl
parents:
50939
diff
changeset
|
367 |
|
44123 | 368 |
lemma frechet_derivative_unique_within: |
369 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
370 |
assumes "(f has_derivative f') (at x within s)" |
|
53781 | 371 |
and "(f has_derivative f'') (at x within s)" |
372 |
and "\<forall>i\<in>Basis. \<forall>e>0. \<exists>d. 0 < abs d \<and> abs d < e \<and> (x + d *\<^sub>R i) \<in> s" |
|
44123 | 373 |
shows "f' = f''" |
53781 | 374 |
proof - |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
375 |
note as = assms(1,2)[unfolded has_derivative_def] |
44123 | 376 |
then interpret f': bounded_linear f' by auto |
377 |
from as interpret f'': bounded_linear f'' by auto |
|
378 |
have "x islimpt s" unfolding islimpt_approachable |
|
53781 | 379 |
proof (rule, rule) |
380 |
fix e :: real |
|
381 |
assume "e > 0" |
|
55665 | 382 |
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 | 383 |
using assms(3) SOME_Basis \<open>e>0\<close> by blast |
53781 | 384 |
then show "\<exists>x'\<in>s. x' \<noteq> x \<and> dist x' x < e" |
385 |
apply (rule_tac x="x + d *\<^sub>R (SOME i. i \<in> Basis)" in bexI) |
|
386 |
unfolding dist_norm |
|
387 |
apply (auto simp: SOME_Basis nonzero_Basis) |
|
388 |
done |
|
44123 | 389 |
qed |
53781 | 390 |
then have *: "netlimit (at x within s) = x" |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
391 |
apply (auto intro!: netlimit_within) |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
392 |
by (metis trivial_limit_within) |
53781 | 393 |
show ?thesis |
394 |
apply (rule linear_eq_stdbasis) |
|
44123 | 395 |
unfolding linear_conv_bounded_linear |
53781 | 396 |
apply (rule as(1,2)[THEN conjunct1])+ |
397 |
proof (rule, rule ccontr) |
|
398 |
fix i :: 'a |
|
399 |
assume i: "i \<in> Basis" |
|
400 |
def e \<equiv> "norm (f' i - f'' i)" |
|
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
|
401 |
assume "f' i \<noteq> f'' i" |
53781 | 402 |
then have "e > 0" |
403 |
unfolding e_def by auto |
|
55665 | 404 |
obtain d where d: |
405 |
"0 < d" |
|
406 |
"(\<And>xa. xa\<in>s \<longrightarrow> 0 < dist xa x \<and> dist xa x < d \<longrightarrow> |
|
407 |
dist ((f xa - f x - f' (xa - x)) /\<^sub>R norm (xa - x) - |
|
408 |
(f xa - f x - f'' (xa - x)) /\<^sub>R norm (xa - x)) (0 - 0) < e)" |
|
409 |
using tendsto_diff [OF as(1,2)[THEN conjunct2]] |
|
410 |
unfolding * Lim_within |
|
60420 | 411 |
using \<open>e>0\<close> by blast |
55665 | 412 |
obtain c where c: "0 < \<bar>c\<bar>" "\<bar>c\<bar> < d \<and> x + c *\<^sub>R i \<in> s" |
413 |
using assms(3) i d(1) by blast |
|
53781 | 414 |
have *: "norm (- ((1 / \<bar>c\<bar>) *\<^sub>R f' (c *\<^sub>R i)) + (1 / \<bar>c\<bar>) *\<^sub>R f'' (c *\<^sub>R i)) = |
415 |
norm ((1 / abs c) *\<^sub>R (- (f' (c *\<^sub>R i)) + f'' (c *\<^sub>R i)))" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
416 |
unfolding scaleR_right_distrib by auto |
53781 | 417 |
also have "\<dots> = norm ((1 / abs c) *\<^sub>R (c *\<^sub>R (- (f' i) + f'' i)))" |
44123 | 418 |
unfolding f'.scaleR f''.scaleR |
53781 | 419 |
unfolding scaleR_right_distrib scaleR_minus_right |
420 |
by auto |
|
421 |
also have "\<dots> = e" |
|
422 |
unfolding e_def |
|
55665 | 423 |
using c(1) |
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
|
424 |
using norm_minus_cancel[of "f' i - f'' i"] |
54230
b1d955791529
more simplification rules on unary and binary minus
haftmann
parents:
53799
diff
changeset
|
425 |
by auto |
53781 | 426 |
finally show False |
427 |
using c |
|
55665 | 428 |
using d(2)[of "x + c *\<^sub>R i"] |
44123 | 429 |
unfolding dist_norm |
430 |
unfolding f'.scaleR f''.scaleR f'.add f''.add f'.diff f''.diff |
|
431 |
scaleR_scaleR scaleR_right_diff_distrib scaleR_right_distrib |
|
53781 | 432 |
using i |
433 |
by (auto simp: inverse_eq_divide) |
|
44123 | 434 |
qed |
435 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
436 |
|
37730 | 437 |
lemma frechet_derivative_unique_at: |
53781 | 438 |
"(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f'') (at x) \<Longrightarrow> f' = f''" |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
439 |
by (rule has_derivative_unique) |
41829 | 440 |
|
44123 | 441 |
lemma frechet_derivative_unique_within_closed_interval: |
56188 | 442 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
53781 | 443 |
assumes "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i" |
56188 | 444 |
and "x \<in> cbox a b" |
445 |
and "(f has_derivative f' ) (at x within cbox a b)" |
|
446 |
and "(f has_derivative f'') (at x within cbox a b)" |
|
44123 | 447 |
shows "f' = f''" |
448 |
apply(rule frechet_derivative_unique_within) |
|
449 |
apply(rule assms(3,4))+ |
|
53781 | 450 |
proof (rule, rule, rule) |
451 |
fix e :: real |
|
452 |
fix i :: 'a |
|
453 |
assume "e > 0" and i: "i \<in> Basis" |
|
56188 | 454 |
then show "\<exists>d. 0 < \<bar>d\<bar> \<and> \<bar>d\<bar> < e \<and> x + d *\<^sub>R i \<in> cbox a b" |
53781 | 455 |
proof (cases "x\<bullet>i = a\<bullet>i") |
456 |
case True |
|
457 |
then show ?thesis |
|
458 |
apply (rule_tac x="(min (b\<bullet>i - a\<bullet>i) e) / 2" in exI) |
|
60420 | 459 |
using assms(1)[THEN bspec[where x=i]] and \<open>e>0\<close> and assms(2) |
56188 | 460 |
unfolding mem_box |
53781 | 461 |
using i |
462 |
apply (auto simp add: field_simps inner_simps inner_Basis) |
|
463 |
done |
|
464 |
next |
|
56188 | 465 |
note * = assms(2)[unfolded mem_box, THEN bspec, OF i] |
53781 | 466 |
case False |
467 |
moreover have "a \<bullet> i < x \<bullet> i" |
|
468 |
using False * by auto |
|
44123 | 469 |
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
|
470 |
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 | 471 |
by auto |
53781 | 472 |
also have "\<dots> = a\<bullet>i + x\<bullet>i" |
473 |
by auto |
|
474 |
also have "\<dots> \<le> 2 * (x\<bullet>i)" |
|
475 |
using * by auto |
|
476 |
finally have "a \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e \<le> x \<bullet> i * 2" |
|
477 |
by auto |
|
44123 | 478 |
} |
53781 | 479 |
moreover have "min (x \<bullet> i - a \<bullet> i) e \<ge> 0" |
60420 | 480 |
using * and \<open>e>0\<close> by auto |
53781 | 481 |
then have "x \<bullet> i * 2 \<le> b \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e" |
482 |
using * by auto |
|
44123 | 483 |
ultimately show ?thesis |
53781 | 484 |
apply (rule_tac x="- (min (x\<bullet>i - a\<bullet>i) e) / 2" in exI) |
60420 | 485 |
using assms(1)[THEN bspec, OF i] and \<open>e>0\<close> and assms(2) |
56188 | 486 |
unfolding mem_box |
53781 | 487 |
using i |
488 |
apply (auto simp add: field_simps inner_simps inner_Basis) |
|
489 |
done |
|
44123 | 490 |
qed |
491 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
492 |
|
44123 | 493 |
lemma frechet_derivative_unique_within_open_interval: |
56188 | 494 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
495 |
assumes "x \<in> box a b" |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
496 |
and "(f has_derivative f' ) (at x within box a b)" |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
497 |
and "(f has_derivative f'') (at x within box a b)" |
37650 | 498 |
shows "f' = f''" |
499 |
proof - |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
500 |
from assms(1) have *: "at x within box a b = at x" |
56188 | 501 |
by (metis at_within_interior interior_open open_box) |
37650 | 502 |
from assms(2,3) [unfolded *] show "f' = f''" |
503 |
by (rule frechet_derivative_unique_at) |
|
504 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
505 |
|
37730 | 506 |
lemma frechet_derivative_at: |
53781 | 507 |
"(f has_derivative f') (at x) \<Longrightarrow> f' = frechet_derivative f (at x)" |
508 |
apply (rule frechet_derivative_unique_at[of f]) |
|
509 |
apply assumption |
|
510 |
unfolding frechet_derivative_works[symmetric] |
|
511 |
using differentiable_def |
|
512 |
apply auto |
|
513 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
514 |
|
56188 | 515 |
lemma frechet_derivative_within_cbox: |
516 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
53781 | 517 |
assumes "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i" |
56188 | 518 |
and "x \<in> cbox a b" |
519 |
and "(f has_derivative f') (at x within cbox a b)" |
|
520 |
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
|
521 |
using assms |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
522 |
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
|
523 |
|
53781 | 524 |
|
60420 | 525 |
subsection \<open>The traditional Rolle theorem in one dimension\<close> |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
526 |
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
527 |
lemma linear_componentwise: |
56196
32b7eafc5a52
remove unnecessary finiteness assumptions from lemmas about setsum
huffman
parents:
56193
diff
changeset
|
528 |
fixes f:: "'a::euclidean_space \<Rightarrow> 'b::real_inner" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
529 |
assumes lf: "linear f" |
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
|
530 |
shows "(f x) \<bullet> j = (\<Sum>i\<in>Basis. (x\<bullet>i) * (f i\<bullet>j))" (is "?lhs = ?rhs") |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
531 |
proof - |
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
|
532 |
have "?rhs = (\<Sum>i\<in>Basis. (x\<bullet>i) *\<^sub>R (f i))\<bullet>j" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
533 |
by (simp add: inner_setsum_left) |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
534 |
then show ?thesis |
56196
32b7eafc5a52
remove unnecessary finiteness assumptions from lemmas about setsum
huffman
parents:
56193
diff
changeset
|
535 |
unfolding linear_setsum_mul[OF lf, symmetric] |
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
|
536 |
unfolding euclidean_representation .. |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
537 |
qed |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
538 |
|
60420 | 539 |
text \<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
|
540 |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
541 |
lemma has_derivative_local_min: |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
542 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
543 |
assumes deriv: "(f has_derivative f') (at x)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
544 |
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
|
545 |
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
|
546 |
proof |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
547 |
fix h :: 'a |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
548 |
interpret f': bounded_linear f' |
56182
528fae0816ea
update syntax of has_*derivative to infix 50; fixed proofs
hoelzl
parents:
56181
diff
changeset
|
549 |
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
|
550 |
show "f' h = 0" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
551 |
proof (cases "h = 0") |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
552 |
assume "h \<noteq> 0" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
553 |
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
|
554 |
unfolding eventually_at by (force simp: dist_commute) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
555 |
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
|
556 |
by (intro derivative_eq_intros) auto |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
557 |
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
|
558 |
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
|
559 |
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
|
560 |
unfolding has_field_derivative_def by (simp add: f'.scaleR mult_commute_abs) |
60420 | 561 |
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
|
562 |
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 | 563 |
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
|
564 |
ultimately show "f' h = 0" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
565 |
by (rule DERIV_local_min) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
566 |
qed (simp add: f'.zero) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
567 |
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
|
568 |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
569 |
lemma has_derivative_local_max: |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
570 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
571 |
assumes "(f has_derivative f') (at x)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
572 |
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
|
573 |
shows "f' = (\<lambda>h. 0)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
574 |
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
|
575 |
using assms unfolding fun_eq_iff by simp |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
576 |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
577 |
lemma differential_zero_maxmin: |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
578 |
fixes f::"'a::real_normed_vector \<Rightarrow> real" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
579 |
assumes "x \<in> s" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
580 |
and "open s" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
581 |
and deriv: "(f has_derivative f') (at x)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
582 |
and mono: "(\<forall>y\<in>s. f y \<le> f x) \<or> (\<forall>y\<in>s. f x \<le> f y)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
583 |
shows "f' = (\<lambda>v. 0)" |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
584 |
using mono |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
585 |
proof |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
586 |
assume "\<forall>y\<in>s. f y \<le> f x" |
60420 | 587 |
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
|
588 |
unfolding eventually_at_topological by auto |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
589 |
with deriv show ?thesis |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
590 |
by (rule has_derivative_local_max) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
591 |
next |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
592 |
assume "\<forall>y\<in>s. f x \<le> f y" |
60420 | 593 |
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
|
594 |
unfolding eventually_at_topological by auto |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
595 |
with deriv show ?thesis |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
596 |
by (rule has_derivative_local_min) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
597 |
qed |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
598 |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
599 |
lemma differential_zero_maxmin_component: (* TODO: delete? *) |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
600 |
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
|
601 |
assumes k: "k \<in> Basis" |
53781 | 602 |
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
|
603 |
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
|
604 |
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
|
605 |
proof - |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
606 |
let ?f' = "frechet_derivative f (at x)" |
60420 | 607 |
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
|
608 |
moreover have "open (ball x e)" by simp |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
609 |
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
|
610 |
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
|
611 |
by (rule bounded_linear.has_derivative) |
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
612 |
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
|
613 |
using ball(2) by (rule differential_zero_maxmin) |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
614 |
then show ?thesis |
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
615 |
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
|
616 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
617 |
|
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
|
618 |
lemma rolle: |
53781 | 619 |
fixes f :: "real \<Rightarrow> real" |
620 |
assumes "a < b" |
|
621 |
and "f a = f b" |
|
56188 | 622 |
and "continuous_on {a .. b} f" |
623 |
and "\<forall>x\<in>{a <..< b}. (f has_derivative f' x) (at x)" |
|
624 |
shows "\<exists>x\<in>{a <..< b}. f' x = (\<lambda>v. 0)" |
|
53781 | 625 |
proof - |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
626 |
have "\<exists>x\<in>box a b. (\<forall>y\<in>box a b. f x \<le> f y) \<or> (\<forall>y\<in>box a b. f y \<le> f x)" |
53781 | 627 |
proof - |
628 |
have "(a + b) / 2 \<in> {a .. b}" |
|
629 |
using assms(1) by auto |
|
56188 | 630 |
then have *: "{a .. b} \<noteq> {}" |
53781 | 631 |
by auto |
55665 | 632 |
obtain d where d: |
56188 | 633 |
"d \<in>cbox a b" |
634 |
"\<forall>y\<in>cbox a b. f y \<le> f d" |
|
635 |
using continuous_attains_sup[OF compact_Icc * assms(3)] by auto |
|
55665 | 636 |
obtain c where c: |
56188 | 637 |
"c \<in> cbox a b" |
638 |
"\<forall>y\<in>cbox a b. f c \<le> f y" |
|
639 |
using continuous_attains_inf[OF compact_Icc * assms(3)] by auto |
|
44123 | 640 |
show ?thesis |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
641 |
proof (cases "d \<in> box a b \<or> c \<in> box a b") |
53781 | 642 |
case True |
643 |
then show ?thesis |
|
56188 | 644 |
by (metis c(2) d(2) box_subset_cbox subset_iff) |
44123 | 645 |
next |
646 |
def e \<equiv> "(a + b) /2" |
|
53781 | 647 |
case False |
648 |
then have "f d = f c" |
|
56188 | 649 |
using d c assms(2) by auto |
53781 | 650 |
then have "\<And>x. x \<in> {a..b} \<Longrightarrow> f x = f d" |
651 |
using c d |
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
652 |
by force |
53781 | 653 |
then show ?thesis |
654 |
apply (rule_tac x=e in bexI) |
|
655 |
unfolding e_def |
|
656 |
using assms(1) |
|
56188 | 657 |
apply auto |
53781 | 658 |
done |
44123 | 659 |
qed |
660 |
qed |
|
56188 | 661 |
then obtain x where x: "x \<in> {a <..< b}" "(\<forall>y\<in>{a <..< b}. f x \<le> f y) \<or> (\<forall>y\<in>{a <..< b}. f y \<le> f x)" |
662 |
by auto |
|
53781 | 663 |
then have "f' x = (\<lambda>v. 0)" |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
664 |
apply (rule_tac differential_zero_maxmin[of x "box a b" f "f' x"]) |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
665 |
using assms |
53781 | 666 |
apply auto |
667 |
done |
|
668 |
then show ?thesis |
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
669 |
by (metis x(1)) |
44123 | 670 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
671 |
|
53781 | 672 |
|
60420 | 673 |
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
|
674 |
|
53781 | 675 |
lemma mvt: |
676 |
fixes f :: "real \<Rightarrow> real" |
|
677 |
assumes "a < b" |
|
678 |
and "continuous_on {a..b} f" |
|
44123 | 679 |
assumes "\<forall>x\<in>{a<..<b}. (f has_derivative (f' x)) (at x)" |
53781 | 680 |
shows "\<exists>x\<in>{a<..<b}. f b - f a = (f' x) (b - a)" |
681 |
proof - |
|
56188 | 682 |
have "\<exists>x\<in>{a <..< b}. (\<lambda>xa. f' x xa - (f b - f a) / (b - a) * xa) = (\<lambda>v. 0)" |
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51363
diff
changeset
|
683 |
proof (intro rolle[OF assms(1), of "\<lambda>x. f x - (f b - f a) / (b - a) * x"] ballI) |
53781 | 684 |
fix x |
56188 | 685 |
assume x: "x \<in> {a <..< b}" |
53781 | 686 |
show "((\<lambda>x. f x - (f b - f a) / (b - a) * x) has_derivative |
687 |
(\<lambda>xa. f' x xa - (f b - f a) / (b - a) * xa)) (at x)" |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
688 |
by (intro derivative_intros assms(3)[rule_format,OF x]) |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56370
diff
changeset
|
689 |
qed (insert assms(1,2), auto intro!: continuous_intros simp: field_simps) |
55665 | 690 |
then obtain x where |
56188 | 691 |
"x \<in> {a <..< b}" |
55665 | 692 |
"(\<lambda>xa. f' x xa - (f b - f a) / (b - a) * xa) = (\<lambda>v. 0)" .. |
53781 | 693 |
then show ?thesis |
59558
5d9f0ace9af0
got rid of linordered_field_class.sign_simps(41) !
paulson <lp15@cam.ac.uk>
parents:
58877
diff
changeset
|
694 |
by (metis (hide_lams) assms(1) diff_less_iff(1) eq_iff_diff_eq_0 |
5d9f0ace9af0
got rid of linordered_field_class.sign_simps(41) !
paulson <lp15@cam.ac.uk>
parents:
58877
diff
changeset
|
695 |
zero_less_mult_iff nonzero_mult_divide_cancel_right not_real_square_gt_zero |
56188 | 696 |
times_divide_eq_left) |
44123 | 697 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
698 |
|
44123 | 699 |
lemma mvt_simple: |
53781 | 700 |
fixes f :: "real \<Rightarrow> real" |
701 |
assumes "a < b" |
|
702 |
and "\<forall>x\<in>{a..b}. (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
|
703 |
shows "\<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)" |
56264 | 704 |
proof (rule mvt) |
705 |
have "f differentiable_on {a..b}" |
|
706 |
using assms(2) unfolding differentiable_on_def differentiable_def by fast |
|
707 |
then show "continuous_on {a..b} f" |
|
708 |
by (rule differentiable_imp_continuous_on) |
|
709 |
show "\<forall>x\<in>{a<..<b}. (f has_derivative f' x) (at x)" |
|
710 |
proof |
|
711 |
fix x |
|
712 |
assume x: "x \<in> {a <..< b}" |
|
713 |
show "(f has_derivative f' x) (at x)" |
|
714 |
unfolding at_within_open[OF x open_greaterThanLessThan,symmetric] |
|
715 |
apply (rule has_derivative_within_subset) |
|
716 |
apply (rule assms(2)[rule_format]) |
|
717 |
using x |
|
718 |
apply auto |
|
719 |
done |
|
720 |
qed |
|
721 |
qed (rule assms(1)) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
722 |
|
44123 | 723 |
lemma mvt_very_simple: |
53781 | 724 |
fixes f :: "real \<Rightarrow> real" |
725 |
assumes "a \<le> b" |
|
56188 | 726 |
and "\<forall>x\<in>{a .. b}. (f has_derivative f' x) (at x within {a .. b})" |
727 |
shows "\<exists>x\<in>{a .. b}. f b - f a = f' x (b - a)" |
|
44123 | 728 |
proof (cases "a = b") |
53781 | 729 |
interpret bounded_linear "f' b" |
730 |
using assms(2) assms(1) by auto |
|
731 |
case True |
|
732 |
then show ?thesis |
|
733 |
apply (rule_tac x=a in bexI) |
|
734 |
using assms(2)[THEN bspec[where x=a]] |
|
735 |
unfolding has_derivative_def |
|
736 |
unfolding True |
|
737 |
using zero |
|
738 |
apply auto |
|
739 |
done |
|
740 |
next |
|
741 |
case False |
|
742 |
then show ?thesis |
|
743 |
using mvt_simple[OF _ assms(2)] |
|
744 |
using assms(1) |
|
745 |
by auto |
|
44123 | 746 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
747 |
|
60420 | 748 |
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
|
749 |
|
44123 | 750 |
lemma mvt_general: |
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
751 |
fixes f :: "real \<Rightarrow> 'a::real_inner" |
53781 | 752 |
assumes "a < b" |
56188 | 753 |
and "continuous_on {a .. b} f" |
53781 | 754 |
and "\<forall>x\<in>{a<..<b}. (f has_derivative f'(x)) (at x)" |
755 |
shows "\<exists>x\<in>{a<..<b}. norm (f b - f a) \<le> norm (f' x (b - a))" |
|
756 |
proof - |
|
56264 | 757 |
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)" |
53781 | 758 |
apply (rule mvt) |
759 |
apply (rule assms(1)) |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56370
diff
changeset
|
760 |
apply (intro continuous_intros assms(2)) |
53781 | 761 |
using assms(3) |
56264 | 762 |
apply (fast intro: has_derivative_inner_right) |
53781 | 763 |
done |
55665 | 764 |
then obtain x where x: |
765 |
"x \<in> {a<..<b}" |
|
56264 | 766 |
"(f b - f a) \<bullet> f b - (f b - f a) \<bullet> f a = (f b - f a) \<bullet> f' x (b - a)" .. |
53781 | 767 |
show ?thesis |
768 |
proof (cases "f a = f b") |
|
36844 | 769 |
case False |
53077 | 770 |
have "norm (f b - f a) * norm (f b - f a) = (norm (f b - f a))\<^sup>2" |
44123 | 771 |
by (simp add: power2_eq_square) |
53781 | 772 |
also have "\<dots> = (f b - f a) \<bullet> (f b - f a)" |
773 |
unfolding power2_norm_eq_inner .. |
|
44123 | 774 |
also have "\<dots> = (f b - f a) \<bullet> f' x (b - a)" |
56264 | 775 |
using x(2) by (simp only: inner_diff_right) |
44123 | 776 |
also have "\<dots> \<le> norm (f b - f a) * norm (f' x (b - a))" |
777 |
by (rule norm_cauchy_schwarz) |
|
53781 | 778 |
finally show ?thesis |
779 |
using False x(1) |
|
56217
dc429a5b13c4
Some rationalisation of basic lemmas
paulson <lp15@cam.ac.uk>
parents:
56196
diff
changeset
|
780 |
by (auto simp add: mult_left_cancel) |
44123 | 781 |
next |
53781 | 782 |
case True |
783 |
then show ?thesis |
|
784 |
using assms(1) |
|
785 |
apply (rule_tac x="(a + b) /2" in bexI) |
|
786 |
apply auto |
|
787 |
done |
|
44123 | 788 |
qed |
789 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
790 |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
791 |
|
60420 | 792 |
subsection \<open>More general bound theorems\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
793 |
|
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
794 |
lemma differentiable_bound_general: |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
795 |
fixes f :: "real \<Rightarrow> 'a::real_normed_vector" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
796 |
assumes "a < b" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
797 |
and f_cont: "continuous_on {a .. b} f" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
798 |
and phi_cont: "continuous_on {a .. b} \<phi>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
799 |
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
|
800 |
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
|
801 |
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
|
802 |
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
|
803 |
proof - |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
804 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
805 |
fix x assume x: "a < x" "x < b" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
806 |
have "0 \<le> norm (f' x)" by simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
807 |
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
|
808 |
finally have "0 \<le> \<phi>' x" . |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
809 |
} note phi'_nonneg = this |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
810 |
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
|
811 |
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
|
812 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
813 |
fix e::real assume "e > 0" |
60420 | 814 |
def e2 \<equiv> "e / 2" 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
|
815 |
let ?le = "\<lambda>x1. norm (f x1 - f a) \<le> \<phi> x1 - \<phi> a + e * (x1 - a) + e" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
816 |
def A \<equiv> "{x2. a \<le> x2 \<and> x2 \<le> b \<and> (\<forall>x1\<in>{a ..< x2}. ?le x1)}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
817 |
have A_subset: "A \<subseteq> {a .. b}" by (auto simp: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
818 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
819 |
fix x2 |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
820 |
assume a: "a \<le> x2" "x2 \<le> b" and le: "\<forall>x1\<in>{a..<x2}. ?le x1" |
60420 | 821 |
have "?le x2" using \<open>e > 0\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
822 |
proof cases |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
823 |
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
|
824 |
have "at x2 within {a <..<x2}\<noteq> bot" |
60420 | 825 |
using \<open>a < x2\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
826 |
by (auto simp: trivial_limit_within islimpt_in_closure) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
827 |
moreover |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
828 |
have "((\<lambda>x1. (\<phi> x1 - \<phi> a) + e * (x1 - a) + e) ---> (\<phi> x2 - \<phi> a) + e * (x2 - a) + e) (at x2 within {a <..<x2})" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
829 |
"((\<lambda>x1. norm (f x1 - f a)) ---> norm (f x2 - f a)) (at x2 within {a <..<x2})" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
830 |
using a |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
831 |
by (auto intro!: tendsto_eq_intros f_tendsto phi_tendsto |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
832 |
intro: tendsto_within_subset[where S="{a .. b}"]) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
833 |
moreover |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
834 |
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
|
835 |
by (auto simp: eventually_at_filter) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
836 |
hence "eventually ?le (at x2 within {a <..<x2})" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
837 |
unfolding eventually_at_filter |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
838 |
by eventually_elim (insert le, auto) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
839 |
ultimately |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
840 |
show ?thesis |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
841 |
by (rule tendsto_le) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
842 |
qed simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
843 |
} note le_cont = this |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
844 |
have "a \<in> A" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
845 |
using assms by (auto simp: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
846 |
hence [simp]: "A \<noteq> {}" by auto |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
847 |
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
|
848 |
by (simp add: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
849 |
have [simp]: "bdd_above A" by (auto simp: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
850 |
def y \<equiv> "Sup A" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
851 |
have "y \<le> b" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
852 |
unfolding y_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
853 |
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
|
854 |
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
|
855 |
by (auto simp: A_def intro!: le_cont) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
856 |
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
|
857 |
by (auto simp: y_def less_cSup_iff leI) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
858 |
have "a \<le> y" |
60420 | 859 |
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
|
860 |
have "y \<in> A" |
60420 | 861 |
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
|
862 |
by (auto simp: A_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
863 |
hence "A = {a .. y}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
864 |
using A_subset |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
865 |
by (auto simp: subset_iff y_def cSup_upper intro: A_ivl) |
60420 | 866 |
from le_cont[OF \<open>a \<le> y\<close> \<open>y \<le> b\<close> y_all_le] have le_y: "?le y" . |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
867 |
{ |
60420 | 868 |
assume "a \<noteq> y" with \<open>a \<le> y\<close> have "a < y" by simp |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
869 |
have "y = b" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
870 |
proof (rule ccontr) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
871 |
assume "y \<noteq> b" |
60420 | 872 |
hence "y < b" using \<open>y \<le> b\<close> by simp |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
873 |
let ?F = "at y within {y..<b}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
874 |
from f' phi' |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
875 |
have "(f has_vector_derivative f' y) ?F" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
876 |
and "(\<phi> has_vector_derivative \<phi>' y) ?F" |
60420 | 877 |
using \<open>a < y\<close> \<open>y < b\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
878 |
by (auto simp add: at_within_open[of _ "{a<..<b}"] has_vector_derivative_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
879 |
intro!: has_derivative_subset[where s="{a<..<b}" and t="{y..<b}"]) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
880 |
hence "\<forall>\<^sub>F x1 in ?F. norm (f x1 - f y - (x1 - y) *\<^sub>R f' y) \<le> e2 * \<bar>x1 - y\<bar>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
881 |
"\<forall>\<^sub>F x1 in ?F. norm (\<phi> x1 - \<phi> y - (x1 - y) *\<^sub>R \<phi>' y) \<le> e2 * \<bar>x1 - y\<bar>" |
60420 | 882 |
using \<open>e2 > 0\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
883 |
by (auto simp: has_derivative_within_alt2 has_vector_derivative_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
884 |
moreover |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
885 |
have "\<forall>\<^sub>F x1 in ?F. y \<le> x1" "\<forall>\<^sub>F x1 in ?F. x1 < b" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
886 |
by (auto simp: eventually_at_filter) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
887 |
ultimately |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
888 |
have "\<forall>\<^sub>F x1 in ?F. norm (f x1 - f y) \<le> (\<phi> x1 - \<phi> y) + e * \<bar>x1 - y\<bar>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
889 |
(is "\<forall>\<^sub>F x1 in ?F. ?le' x1") |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
890 |
proof eventually_elim |
60589 | 891 |
case (elim x1) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
892 |
from norm_triangle_ineq2[THEN order_trans, OF elim(1)] |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
893 |
have "norm (f x1 - f y) \<le> norm (f' y) * \<bar>x1 - y\<bar> + e2 * \<bar>x1 - y\<bar>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
894 |
by (simp add: ac_simps) |
60420 | 895 |
also have "norm (f' y) \<le> \<phi>' y" using bnd \<open>a < y\<close> \<open>y < b\<close> by simp |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
896 |
also |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
897 |
from elim have "\<phi>' y * \<bar>x1 - y\<bar> \<le> \<phi> x1 - \<phi> y + e2 * \<bar>x1 - y\<bar>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
898 |
by (simp add: ac_simps) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
899 |
finally |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
900 |
have "norm (f x1 - f y) \<le> \<phi> x1 - \<phi> y + e2 * \<bar>x1 - y\<bar> + e2 * \<bar>x1 - y\<bar>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
901 |
by (auto simp: mult_right_mono) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
902 |
thus ?case by (simp add: e2_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
903 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
904 |
moreover have "?le' y" by simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
905 |
ultimately obtain S |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
906 |
where S: "open S" "y \<in> S" "\<And>x. x\<in>S \<Longrightarrow> x \<in> {y..<b} \<Longrightarrow> ?le' x" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
907 |
unfolding eventually_at_topological |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
908 |
by metis |
60420 | 909 |
from \<open>open S\<close> obtain d where d: "\<And>x. dist x y < d \<Longrightarrow> x \<in> S" "d > 0" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
910 |
by (force simp: dist_commute open_real_def ball_def |
60420 | 911 |
dest!: bspec[OF _ \<open>y \<in> S\<close>]) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
912 |
def d' \<equiv> "min ((y + b)/2) (y + (d/2))" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
913 |
have "d' \<in> A" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
914 |
unfolding A_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
915 |
proof safe |
60420 | 916 |
show "a \<le> d'" using \<open>a < y\<close> \<open>0 < d\<close> \<open>y < b\<close> by (simp add: d'_def) |
917 |
show "d' \<le> b" using \<open>y < b\<close> by (simp add: d'_def min_def) |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
918 |
fix x1 |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
919 |
assume x1: "x1 \<in> {a..<d'}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
920 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
921 |
assume "x1 < y" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
922 |
hence "?le x1" |
60420 | 923 |
using \<open>x1 \<in> {a..<d'}\<close> y_all_le by auto |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
924 |
} moreover { |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
925 |
assume "x1 \<ge> y" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
926 |
hence x1': "x1 \<in> S" "x1 \<in> {y..<b}" using x1 |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
927 |
by (auto simp: d'_def dist_real_def intro!: d) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
928 |
have "norm (f x1 - f a) \<le> norm (f x1 - f y) + norm (f y - f a)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
929 |
by (rule order_trans[OF _ norm_triangle_ineq]) simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
930 |
also note S(3)[OF x1'] |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
931 |
also note le_y |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
932 |
finally have "?le x1" |
60420 | 933 |
using \<open>x1 \<ge> y\<close> by (auto simp: algebra_simps) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
934 |
} ultimately show "?le x1" by arith |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
935 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
936 |
hence "d' \<le> y" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
937 |
unfolding y_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
938 |
by (rule cSup_upper) simp |
60420 | 939 |
thus False 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
|
940 |
by (simp add: d'_def min_def split: split_if_asm) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
941 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
942 |
} moreover { |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
943 |
assume "a = y" |
60420 | 944 |
with \<open>a < b\<close> have "y < b" by simp |
945 |
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
|
946 |
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
|
947 |
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
|
948 |
by (auto simp: continuous_on_def tendsto_iff) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
949 |
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
|
950 |
by (auto simp: eventually_at_filter) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
951 |
have 4: "eventually (\<lambda>x::real. x < b) (at y within {y..b})" |
60420 | 952 |
using _ \<open>y < b\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
953 |
by (rule order_tendstoD) (auto intro!: tendsto_eq_intros) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
954 |
from 1 2 3 4 |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
955 |
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
|
956 |
proof eventually_elim |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
957 |
case (elim x1) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
958 |
have "norm (f x1 - f a) = norm (f x1 - f y)" |
60420 | 959 |
by (simp add: \<open>a = y\<close>) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
960 |
also have "norm (f x1 - f y) \<le> e2" |
60420 | 961 |
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
|
962 |
also have "\<dots> \<le> e2 + (\<phi> x1 - \<phi> a + e2 + e * (x1 - a))" |
60420 | 963 |
using \<open>0 < e\<close> elim |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
964 |
by (intro add_increasing2[OF add_nonneg_nonneg order.refl]) |
60420 | 965 |
(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
|
966 |
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
|
967 |
by (simp add: e2_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
968 |
finally show "?le x1" . |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
969 |
qed |
60420 | 970 |
from this[unfolded eventually_at_topological] \<open>?le y\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
971 |
obtain S |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
972 |
where S: "open S" "y \<in> S" "\<And>x. x\<in>S \<Longrightarrow> x \<in> {y..b} \<Longrightarrow> ?le x" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
973 |
by metis |
60420 | 974 |
from \<open>open S\<close> obtain d where d: "\<And>x. dist x y < d \<Longrightarrow> x \<in> S" "d > 0" |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
975 |
by (force simp: dist_commute open_real_def ball_def |
60420 | 976 |
dest!: bspec[OF _ \<open>y \<in> S\<close>]) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
977 |
def d' \<equiv> "min b (y + (d/2))" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
978 |
have "d' \<in> A" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
979 |
unfolding A_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
980 |
proof safe |
60420 | 981 |
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
|
982 |
show "d' \<le> b" by (simp add: d'_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
983 |
fix x1 |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
984 |
assume "x1 \<in> {a..<d'}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
985 |
hence "x1 \<in> S" "x1 \<in> {y..b}" |
60420 | 986 |
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
|
987 |
thus "?le x1" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
988 |
by (rule S) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
989 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
990 |
hence "d' \<le> y" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
991 |
unfolding y_def |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
992 |
by (rule cSup_upper) simp |
60420 | 993 |
hence "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
|
994 |
by (simp add: d'_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
995 |
} ultimately have "y = b" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
996 |
by auto |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
997 |
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
|
998 |
by (simp add: algebra_simps) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
999 |
} note * = this |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1000 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1001 |
fix e::real assume "e > 0" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1002 |
hence "norm (f b - f a) \<le> \<phi> b - \<phi> a + e" |
60420 | 1003 |
using *[of "e / (b - a + 1)"] \<open>a < b\<close> by simp |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1004 |
} thus ?thesis |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1005 |
by (rule field_le_epsilon) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1006 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1007 |
|
44123 | 1008 |
lemma differentiable_bound: |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1009 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1010 |
assumes "convex s" |
1011 |
and "\<forall>x\<in>s. (f has_derivative f' x) (at x within s)" |
|
1012 |
and "\<forall>x\<in>s. onorm (f' x) \<le> B" |
|
1013 |
and x: "x \<in> s" |
|
1014 |
and y: "y \<in> s" |
|
1015 |
shows "norm (f x - f y) \<le> B * norm (x - y)" |
|
1016 |
proof - |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1017 |
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
|
1018 |
let ?\<phi> = "\<lambda>h. h * B * norm (x - y)" |
53781 | 1019 |
have *: "\<And>u. u\<in>{0..1} \<Longrightarrow> x + u *\<^sub>R (y - x) \<in> s" |
44123 | 1020 |
using assms(1)[unfolded convex_alt,rule_format,OF x y] |
1021 |
unfolding scaleR_left_diff_distrib scaleR_right_diff_distrib |
|
1022 |
by (auto simp add: algebra_simps) |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1023 |
have 0: "continuous_on (?p ` {0..1}) f" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1024 |
using * |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1025 |
unfolding continuous_on_eq_continuous_within |
53781 | 1026 |
apply - |
1027 |
apply rule |
|
1028 |
apply (rule differentiable_imp_continuous_within) |
|
1029 |
unfolding differentiable_def |
|
1030 |
apply (rule_tac x="f' xa" in exI) |
|
1031 |
apply (rule has_derivative_within_subset) |
|
1032 |
apply (rule assms(2)[rule_format]) |
|
1033 |
apply auto |
|
1034 |
done |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1035 |
from * have 1: "continuous_on {0 .. 1} (f \<circ> ?p)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1036 |
by (intro continuous_intros 0)+ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1037 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1038 |
fix u::real assume u: "u \<in>{0 <..< 1}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1039 |
let ?u = "?p u" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1040 |
interpret linear "(f' ?u)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1041 |
using u by (auto intro!: has_derivative_linear assms(2)[rule_format] *) |
56188 | 1042 |
have "(f \<circ> ?p has_derivative (f' ?u) \<circ> (\<lambda>u. 0 + u *\<^sub>R (y - x))) (at u within box 0 1)" |
53781 | 1043 |
apply (rule diff_chain_within) |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1044 |
apply (rule derivative_intros)+ |
53781 | 1045 |
apply (rule has_derivative_within_subset) |
1046 |
apply (rule assms(2)[rule_format]) |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1047 |
using u * |
53781 | 1048 |
apply auto |
1049 |
done |
|
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1050 |
hence "((f \<circ> ?p) has_vector_derivative f' ?u (y - x)) (at u)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1051 |
by (simp add: has_derivative_within_open[OF u open_greaterThanLessThan] |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1052 |
scaleR has_vector_derivative_def o_def) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1053 |
} note 2 = this |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1054 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1055 |
have "continuous_on {0..1} ?\<phi>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1056 |
by (rule continuous_intros)+ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1057 |
} note 3 = this |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1058 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1059 |
fix u::real assume u: "u \<in>{0 <..< 1}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1060 |
have "(?\<phi> has_vector_derivative B * norm (x - y)) (at u)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1061 |
by (auto simp: has_vector_derivative_def intro!: derivative_eq_intros) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1062 |
} note 4 = this |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1063 |
{ |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1064 |
fix u::real assume u: "u \<in>{0 <..< 1}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1065 |
let ?u = "?p u" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1066 |
interpret bounded_linear "(f' ?u)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1067 |
using u by (auto intro!: has_derivative_bounded_linear assms(2)[rule_format] *) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1068 |
have "norm (f' ?u (y - x)) \<le> onorm (f' ?u) * norm (y - x)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1069 |
by (rule onorm) fact |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1070 |
also have "onorm (f' ?u) \<le> B" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1071 |
using u by (auto intro!: assms(3)[rule_format] *) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1072 |
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
|
1073 |
by (simp add: mult_right_mono norm_minus_commute) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1074 |
} 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
|
1075 |
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 | 1076 |
by (auto simp add: norm_minus_commute) |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1077 |
also |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1078 |
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
|
1079 |
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
|
1080 |
by simp |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1081 |
finally show ?thesis . |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1082 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1083 |
|
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1084 |
lemma |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1085 |
differentiable_bound_segment: |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1086 |
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
|
1087 |
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
|
1088 |
assumes f': "\<And>x. x \<in> G \<Longrightarrow> (f has_derivative f' x) (at x within G)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1089 |
assumes B: "\<forall>x\<in>{0..1}. onorm (f' (x0 + x *\<^sub>R a)) \<le> B" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1090 |
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
|
1091 |
proof - |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1092 |
let ?G = "(\<lambda>x. x0 + x *\<^sub>R a) ` {0..1}" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1093 |
have "?G = op + x0 ` (\<lambda>x. x *\<^sub>R a) ` {0..1}" by auto |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1094 |
also have "convex \<dots>" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1095 |
by (intro convex_translation convex_scaled convex_real_interval) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1096 |
finally have "convex ?G" . |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1097 |
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
|
1098 |
ultimately show ?thesis |
60420 | 1099 |
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
|
1100 |
differentiable_bound[of "(\<lambda>x. x0 + x *\<^sub>R a) ` {0..1}" f f' B "x0 + a" x0] |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1101 |
by (auto simp: ac_simps) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1102 |
qed |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1103 |
|
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1104 |
lemma differentiable_bound_linearization: |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1105 |
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
|
1106 |
assumes "\<And>t. t \<in> {0..1} \<Longrightarrow> a + t *\<^sub>R (b - a) \<in> S" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1107 |
assumes f'[derivative_intros]: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1108 |
assumes B: "\<forall>x\<in>S. onorm (f' x - f' x0) \<le> B" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1109 |
assumes "x0 \<in> S" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1110 |
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
|
1111 |
proof - |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1112 |
def g \<equiv> "\<lambda>x. f x - f' x0 x" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1113 |
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
|
1114 |
unfolding g_def using assms |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1115 |
by (auto intro!: derivative_eq_intros |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1116 |
bounded_linear.has_derivative[OF has_derivative_bounded_linear, OF f']) |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1117 |
from B have B: "\<forall>x\<in>{0..1}. onorm (\<lambda>i. f' (a + x *\<^sub>R (b - a)) i - f' x0 i) \<le> B" |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1118 |
using assms by (auto simp: fun_diff_def) |
60420 | 1119 |
from differentiable_bound_segment[OF assms(1) g B] \<open>x0 \<in> S\<close> |
60178
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1120 |
show ?thesis |
f620c70f9e9b
generalized differentiable_bound; some further variations of differentiable_bound
immler
parents:
60177
diff
changeset
|
1121 |
by (simp add: g_def field_simps linear_sub[OF has_derivative_linear[OF f']]) |
44123 | 1122 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1123 |
|
60420 | 1124 |
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
|
1125 |
|
44123 | 1126 |
lemma has_derivative_zero_constant: |
60179 | 1127 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1128 |
assumes "convex s" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1129 |
and "\<And>x. x \<in> s \<Longrightarrow> (f has_derivative (\<lambda>h. 0)) (at x within s)" |
44123 | 1130 |
shows "\<exists>c. \<forall>x\<in>s. f x = c" |
56332 | 1131 |
proof - |
1132 |
{ fix x y assume "x \<in> s" "y \<in> s" |
|
1133 |
then have "norm (f x - f y) \<le> 0 * norm (x - y)" |
|
1134 |
using assms by (intro differentiable_bound[of s]) (auto simp: onorm_zero) |
|
1135 |
then have "f x = f y" |
|
1136 |
by simp } |
|
53781 | 1137 |
then show ?thesis |
56332 | 1138 |
by metis |
53781 | 1139 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1140 |
|
53781 | 1141 |
lemma has_derivative_zero_unique: |
60179 | 1142 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1143 |
assumes "convex s" |
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1144 |
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
|
1145 |
and "x \<in> s" "y \<in> s" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1146 |
shows "f x = f y" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1147 |
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
|
1148 |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1149 |
lemma has_derivative_zero_unique_connected: |
60179 | 1150 |
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
|
1151 |
assumes "open s" "connected s" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1152 |
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
|
1153 |
assumes "x \<in> s" "y \<in> s" |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1154 |
shows "f x = f y" |
60420 | 1155 |
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
|
1156 |
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
|
1157 |
proof |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1158 |
fix a assume "a \<in> s" |
60420 | 1159 |
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
|
1160 |
by (rule openE) |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1161 |
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
|
1162 |
by (intro has_derivative_zero_constant) |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1163 |
(auto simp: at_within_open[OF _ open_ball] f convex_ball) |
60420 | 1164 |
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
|
1165 |
by auto |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1166 |
then show "eventually (\<lambda>b. f a = f b) (at a within s)" |
60420 | 1167 |
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
|
1168 |
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
|
1169 |
qed |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1170 |
qed |
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1171 |
|
60420 | 1172 |
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
|
1173 |
|
44123 | 1174 |
lemma has_derivative_inverse_basic: |
56226 | 1175 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
44123 | 1176 |
assumes "(f has_derivative f') (at (g y))" |
53781 | 1177 |
and "bounded_linear g'" |
1178 |
and "g' \<circ> f' = id" |
|
1179 |
and "continuous (at y) g" |
|
1180 |
and "open t" |
|
1181 |
and "y \<in> t" |
|
1182 |
and "\<forall>z\<in>t. f (g z) = z" |
|
44123 | 1183 |
shows "(g has_derivative g') (at y)" |
53781 | 1184 |
proof - |
44123 | 1185 |
interpret f': bounded_linear f' |
1186 |
using assms unfolding has_derivative_def by auto |
|
53781 | 1187 |
interpret g': bounded_linear g' |
1188 |
using assms by auto |
|
55665 | 1189 |
obtain C where C: "0 < C" "\<And>x. norm (g' x) \<le> norm x * C" |
1190 |
using bounded_linear.pos_bounded[OF assms(2)] by blast |
|
53781 | 1191 |
have lem1: "\<forall>e>0. \<exists>d>0. \<forall>z. |
1192 |
norm (z - y) < d \<longrightarrow> norm (g z - g y - g'(z - y)) \<le> e * norm (g z - g y)" |
|
1193 |
proof (rule, rule) |
|
61165 | 1194 |
fix e :: real |
1195 |
assume "e > 0" |
|
1196 |
with C(1) have *: "e / C > 0" by auto |
|
55665 | 1197 |
obtain d0 where d0: |
1198 |
"0 < d0" |
|
1199 |
"\<forall>ya. norm (ya - g y) < d0 \<longrightarrow> norm (f ya - f (g y) - f' (ya - g y)) \<le> e / C * norm (ya - g y)" |
|
1200 |
using assms(1) |
|
1201 |
unfolding has_derivative_at_alt |
|
1202 |
using * by blast |
|
1203 |
obtain d1 where d1: |
|
1204 |
"0 < d1" |
|
1205 |
"\<forall>x. 0 < dist x y \<and> dist x y < d1 \<longrightarrow> dist (g x) (g y) < d0" |
|
1206 |
using assms(4) |
|
1207 |
unfolding continuous_at Lim_at |
|
1208 |
using d0(1) by blast |
|
1209 |
obtain d2 where d2: |
|
1210 |
"0 < d2" |
|
1211 |
"\<forall>ya. dist ya y < d2 \<longrightarrow> ya \<in> t" |
|
1212 |
using assms(5) |
|
1213 |
unfolding open_dist |
|
1214 |
using assms(6) by blast |
|
1215 |
obtain d where d: "0 < d" "d < d1" "d < d2" |
|
1216 |
using real_lbound_gt_zero[OF d1(1) d2(1)] by blast |
|
61165 | 1217 |
then 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)" |
53781 | 1218 |
apply (rule_tac x=d in exI) |
1219 |
apply rule |
|
1220 |
defer |
|
1221 |
apply rule |
|
1222 |
apply rule |
|
1223 |
proof - |
|
1224 |
fix z |
|
1225 |
assume as: "norm (z - y) < d" |
|
1226 |
then have "z \<in> t" |
|
44123 | 1227 |
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
|
1228 |
have "norm (g z - g y - g' (z - y)) \<le> norm (g' (f (g z) - y - f' (g z - g y)))" |
44123 | 1229 |
unfolding g'.diff f'.diff |
53781 | 1230 |
unfolding assms(3)[unfolded o_def id_def, THEN fun_cong] |
60420 | 1231 |
unfolding assms(7)[rule_format,OF \<open>z\<in>t\<close>] |
53781 | 1232 |
apply (subst norm_minus_cancel[symmetric]) |
1233 |
apply auto |
|
1234 |
done |
|
1235 |
also have "\<dots> \<le> norm (f (g z) - y - f' (g z - g y)) * C" |
|
55665 | 1236 |
by (rule C(2)) |
44123 | 1237 |
also have "\<dots> \<le> (e / C) * norm (g z - g y) * C" |
53781 | 1238 |
apply (rule mult_right_mono) |
60420 | 1239 |
apply (rule d0(2)[rule_format,unfolded assms(7)[rule_format,OF \<open>y\<in>t\<close>]]) |
53781 | 1240 |
apply (cases "z = y") |
1241 |
defer |
|
55665 | 1242 |
apply (rule d1(2)[unfolded dist_norm,rule_format]) |
53781 | 1243 |
using as d C d0 |
1244 |
apply auto |
|
1245 |
done |
|
44123 | 1246 |
also have "\<dots> \<le> e * norm (g z - g y)" |
1247 |
using C by (auto simp add: field_simps) |
|
1248 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (g z - g y)" |
|
1249 |
by simp |
|
1250 |
qed auto |
|
1251 |
qed |
|
53781 | 1252 |
have *: "(0::real) < 1 / 2" |
1253 |
by auto |
|
55665 | 1254 |
obtain d where d: |
1255 |
"0 < d" |
|
1256 |
"\<forall>z. norm (z - y) < d \<longrightarrow> norm (g z - g y - g' (z - y)) \<le> 1 / 2 * norm (g z - g y)" |
|
1257 |
using lem1 * by blast |
|
1258 |
def B \<equiv> "C * 2" |
|
53781 | 1259 |
have "B > 0" |
1260 |
unfolding B_def using C by auto |
|
61165 | 1261 |
have lem2: "norm (g z - g y) \<le> B * norm (z - y)" if z: "norm(z - y) < d" for z |
1262 |
proof - |
|
44123 | 1263 |
have "norm (g z - g y) \<le> norm(g' (z - y)) + norm ((g z - g y) - g'(z - y))" |
53781 | 1264 |
by (rule norm_triangle_sub) |
1265 |
also have "\<dots> \<le> norm (g' (z - y)) + 1 / 2 * norm (g z - g y)" |
|
1266 |
apply (rule add_left_mono) |
|
61165 | 1267 |
using d and z |
53781 | 1268 |
apply auto |
1269 |
done |
|
44123 | 1270 |
also have "\<dots> \<le> norm (z - y) * C + 1 / 2 * norm (g z - g y)" |
53781 | 1271 |
apply (rule add_right_mono) |
1272 |
using C |
|
1273 |
apply auto |
|
1274 |
done |
|
61165 | 1275 |
finally show "norm (g z - g y) \<le> B * norm (z - y)" |
53781 | 1276 |
unfolding B_def |
1277 |
by (auto simp add: field_simps) |
|
44123 | 1278 |
qed |
53781 | 1279 |
show ?thesis |
1280 |
unfolding has_derivative_at_alt |
|
1281 |
apply rule |
|
1282 |
apply (rule assms) |
|
1283 |
apply rule |
|
1284 |
apply rule |
|
1285 |
proof - |
|
61165 | 1286 |
fix e :: real |
1287 |
assume "e > 0" |
|
1288 |
then have *: "e / B > 0" by (metis \<open>B > 0\<close> divide_pos_pos) |
|
55665 | 1289 |
obtain d' where d': |
1290 |
"0 < d'" |
|
1291 |
"\<forall>z. norm (z - y) < d' \<longrightarrow> norm (g z - g y - g' (z - y)) \<le> e / B * norm (g z - g y)" |
|
1292 |
using lem1 * by blast |
|
1293 |
obtain k where k: "0 < k" "k < d" "k < d'" |
|
1294 |
using real_lbound_gt_zero[OF d(1) d'(1)] by blast |
|
61165 | 1295 |
show "\<exists>d>0. \<forall>ya. norm (ya - y) < d \<longrightarrow> norm (g ya - g y - g' (ya - y)) \<le> e * norm (ya - y)" |
53781 | 1296 |
apply (rule_tac x=k in exI) |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
1297 |
apply auto |
53781 | 1298 |
proof - |
1299 |
fix z |
|
1300 |
assume as: "norm (z - y) < k" |
|
1301 |
then have "norm (g z - g y - g' (z - y)) \<le> e / B * norm(g z - g y)" |
|
44123 | 1302 |
using d' k by auto |
53781 | 1303 |
also have "\<dots> \<le> e * norm (z - y)" |
60420 | 1304 |
unfolding times_divide_eq_left pos_divide_le_eq[OF \<open>B>0\<close>] |
61165 | 1305 |
using lem2[of z] |
60420 | 1306 |
using k as using \<open>e > 0\<close> |
44123 | 1307 |
by (auto simp add: field_simps) |
1308 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (z - y)" |
|
53781 | 1309 |
by simp |
1310 |
qed(insert k, auto) |
|
44123 | 1311 |
qed |
1312 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1313 |
|
60420 | 1314 |
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
|
1315 |
|
44123 | 1316 |
lemma has_derivative_inverse_basic_x: |
56226 | 1317 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1318 |
assumes "(f has_derivative f') (at x)" |
1319 |
and "bounded_linear g'" |
|
1320 |
and "g' \<circ> f' = id" |
|
1321 |
and "continuous (at (f x)) g" |
|
1322 |
and "g (f x) = x" |
|
1323 |
and "open t" |
|
1324 |
and "f x \<in> t" |
|
1325 |
and "\<forall>y\<in>t. f (g y) = y" |
|
1326 |
shows "(g has_derivative g') (at (f x))" |
|
1327 |
apply (rule has_derivative_inverse_basic) |
|
1328 |
using assms |
|
1329 |
apply auto |
|
1330 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1331 |
|
60420 | 1332 |
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
|
1333 |
|
44123 | 1334 |
lemma has_derivative_inverse_dieudonne: |
56226 | 1335 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1336 |
assumes "open s" |
1337 |
and "open (f ` s)" |
|
1338 |
and "continuous_on s f" |
|
1339 |
and "continuous_on (f ` s) g" |
|
1340 |
and "\<forall>x\<in>s. g (f x) = x" |
|
1341 |
and "x \<in> s" |
|
1342 |
and "(f has_derivative f') (at x)" |
|
1343 |
and "bounded_linear g'" |
|
1344 |
and "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
|
1345 |
shows "(g has_derivative g') (at (f x))" |
53781 | 1346 |
apply (rule has_derivative_inverse_basic_x[OF assms(7-9) _ _ assms(2)]) |
1347 |
using assms(3-6) |
|
1348 |
unfolding continuous_on_eq_continuous_at[OF assms(1)] continuous_on_eq_continuous_at[OF assms(2)] |
|
1349 |
apply auto |
|
1350 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1351 |
|
60420 | 1352 |
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
|
1353 |
|
44123 | 1354 |
lemma has_derivative_inverse: |
56226 | 1355 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
53781 | 1356 |
assumes "compact s" |
1357 |
and "x \<in> s" |
|
1358 |
and "f x \<in> interior (f ` s)" |
|
1359 |
and "continuous_on s f" |
|
1360 |
and "\<forall>y\<in>s. g (f y) = y" |
|
1361 |
and "(f has_derivative f') (at x)" |
|
1362 |
and "bounded_linear g'" |
|
1363 |
and "g' \<circ> f' = id" |
|
44123 | 1364 |
shows "(g has_derivative g') (at (f x))" |
53781 | 1365 |
proof - |
1366 |
{ |
|
1367 |
fix y |
|
1368 |
assume "y \<in> interior (f ` s)" |
|
1369 |
then obtain x where "x \<in> s" and *: "y = f x" |
|
1370 |
unfolding image_iff |
|
1371 |
using interior_subset |
|
1372 |
by auto |
|
1373 |
have "f (g y) = y" |
|
60420 | 1374 |
unfolding * and assms(5)[rule_format,OF \<open>x\<in>s\<close>] .. |
44123 | 1375 |
} note * = this |
1376 |
show ?thesis |
|
53781 | 1377 |
apply (rule has_derivative_inverse_basic_x[OF assms(6-8)]) |
1378 |
apply (rule continuous_on_interior[OF _ assms(3)]) |
|
1379 |
apply (rule continuous_on_inv[OF assms(4,1)]) |
|
1380 |
apply (rule assms(2,5) assms(5)[rule_format] open_interior assms(3))+ |
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
1381 |
apply (metis *) |
53781 | 1382 |
done |
44123 | 1383 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1384 |
|
53781 | 1385 |
|
60420 | 1386 |
subsection \<open>Proving surjectivity via Brouwer fixpoint 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
|
1387 |
|
44123 | 1388 |
lemma brouwer_surjective: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1389 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
53781 | 1390 |
assumes "compact t" |
1391 |
and "convex t" |
|
1392 |
and "t \<noteq> {}" |
|
1393 |
and "continuous_on t f" |
|
1394 |
and "\<forall>x\<in>s. \<forall>y\<in>t. x + (y - f y) \<in> t" |
|
1395 |
and "x \<in> s" |
|
44123 | 1396 |
shows "\<exists>y\<in>t. f y = x" |
53781 | 1397 |
proof - |
1398 |
have *: "\<And>x y. f y = x \<longleftrightarrow> x + (y - f y) = y" |
|
1399 |
by (auto simp add: algebra_simps) |
|
44123 | 1400 |
show ?thesis |
1401 |
unfolding * |
|
53781 | 1402 |
apply (rule brouwer[OF assms(1-3), of "\<lambda>y. x + (y - f y)"]) |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56370
diff
changeset
|
1403 |
apply (rule continuous_intros assms)+ |
53781 | 1404 |
using assms(4-6) |
1405 |
apply auto |
|
1406 |
done |
|
44123 | 1407 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1408 |
|
44123 | 1409 |
lemma brouwer_surjective_cball: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1410 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
53781 | 1411 |
assumes "e > 0" |
1412 |
and "continuous_on (cball a e) f" |
|
1413 |
and "\<forall>x\<in>s. \<forall>y\<in>cball a e. x + (y - f y) \<in> cball a e" |
|
1414 |
and "x \<in> s" |
|
44123 | 1415 |
shows "\<exists>y\<in>cball a e. f y = x" |
53781 | 1416 |
apply (rule brouwer_surjective) |
1417 |
apply (rule compact_cball convex_cball)+ |
|
1418 |
unfolding cball_eq_empty |
|
1419 |
using assms |
|
1420 |
apply auto |
|
1421 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1422 |
|
60420 | 1423 |
text \<open>See Sussmann: "Multidifferential calculus", Theorem 2.1.1\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1424 |
|
44123 | 1425 |
lemma sussmann_open_mapping: |
56227 | 1426 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::euclidean_space" |
53781 | 1427 |
assumes "open s" |
1428 |
and "continuous_on s f" |
|
1429 |
and "x \<in> s" |
|
1430 |
and "(f has_derivative f') (at x)" |
|
1431 |
and "bounded_linear g'" "f' \<circ> g' = id" |
|
1432 |
and "t \<subseteq> s" |
|
1433 |
and "x \<in> interior t" |
|
44123 | 1434 |
shows "f x \<in> interior (f ` t)" |
53781 | 1435 |
proof - |
1436 |
interpret f': bounded_linear f' |
|
1437 |
using assms |
|
1438 |
unfolding has_derivative_def |
|
1439 |
by auto |
|
1440 |
interpret g': bounded_linear g' |
|
1441 |
using assms |
|
1442 |
by auto |
|
55665 | 1443 |
obtain B where B: "0 < B" "\<forall>x. norm (g' x) \<le> norm x * B" |
1444 |
using bounded_linear.pos_bounded[OF assms(5)] by blast |
|
56541 | 1445 |
hence *: "1 / (2 * B) > 0" by auto |
55665 | 1446 |
obtain e0 where e0: |
1447 |
"0 < e0" |
|
1448 |
"\<forall>y. norm (y - x) < e0 \<longrightarrow> norm (f y - f x - f' (y - x)) \<le> 1 / (2 * B) * norm (y - x)" |
|
1449 |
using assms(4) |
|
1450 |
unfolding has_derivative_at_alt |
|
1451 |
using * by blast |
|
1452 |
obtain e1 where e1: "0 < e1" "cball x e1 \<subseteq> t" |
|
1453 |
using assms(8) |
|
1454 |
unfolding mem_interior_cball |
|
1455 |
by blast |
|
56541 | 1456 |
have *: "0 < e0 / B" "0 < e1 / B" using e0 e1 B by auto |
55665 | 1457 |
obtain e where e: "0 < e" "e < e0 / B" "e < e1 / B" |
1458 |
using real_lbound_gt_zero[OF *] by blast |
|
53781 | 1459 |
have "\<forall>z\<in>cball (f x) (e / 2). \<exists>y\<in>cball (f x) e. f (x + g' (y - f x)) = z" |
1460 |
apply rule |
|
1461 |
apply (rule brouwer_surjective_cball[where s="cball (f x) (e/2)"]) |
|
1462 |
prefer 3 |
|
1463 |
apply rule |
|
1464 |
apply rule |
|
44123 | 1465 |
proof- |
1466 |
show "continuous_on (cball (f x) e) (\<lambda>y. f (x + g' (y - f x)))" |
|
1467 |
unfolding g'.diff |
|
53781 | 1468 |
apply (rule continuous_on_compose[of _ _ f, unfolded o_def]) |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56370
diff
changeset
|
1469 |
apply (rule continuous_intros linear_continuous_on[OF assms(5)])+ |
53781 | 1470 |
apply (rule continuous_on_subset[OF assms(2)]) |
1471 |
apply rule |
|
1472 |
apply (unfold image_iff) |
|
1473 |
apply (erule bexE) |
|
44123 | 1474 |
proof- |
53781 | 1475 |
fix y z |
1476 |
assume as: "y \<in>cball (f x) e" "z = x + (g' y - g' (f x))" |
|
44123 | 1477 |
have "dist x z = norm (g' (f x) - g' y)" |
1478 |
unfolding as(2) and dist_norm by auto |
|
1479 |
also have "\<dots> \<le> norm (f x - y) * B" |
|
53781 | 1480 |
unfolding g'.diff[symmetric] |
1481 |
using B |
|
1482 |
by auto |
|
44123 | 1483 |
also have "\<dots> \<le> e * B" |
53781 | 1484 |
using as(1)[unfolded mem_cball dist_norm] |
1485 |
using B |
|
1486 |
by auto |
|
1487 |
also have "\<dots> \<le> e1" |
|
1488 |
using e |
|
1489 |
unfolding less_divide_eq |
|
1490 |
using B |
|
1491 |
by auto |
|
1492 |
finally have "z \<in> cball x e1" |
|
1493 |
unfolding mem_cball |
|
1494 |
by force |
|
1495 |
then show "z \<in> s" |
|
1496 |
using e1 assms(7) by auto |
|
44123 | 1497 |
qed |
1498 |
next |
|
53781 | 1499 |
fix y z |
1500 |
assume as: "y \<in> cball (f x) (e / 2)" "z \<in> cball (f x) e" |
|
1501 |
have "norm (g' (z - f x)) \<le> norm (z - f x) * B" |
|
1502 |
using B by auto |
|
1503 |
also have "\<dots> \<le> e * B" |
|
1504 |
apply (rule mult_right_mono) |
|
44123 | 1505 |
using as(2)[unfolded mem_cball dist_norm] and B |
53781 | 1506 |
unfolding norm_minus_commute |
1507 |
apply auto |
|
1508 |
done |
|
1509 |
also have "\<dots> < e0" |
|
1510 |
using e and B |
|
1511 |
unfolding less_divide_eq |
|
1512 |
by auto |
|
1513 |
finally have *: "norm (x + g' (z - f x) - x) < e0" |
|
1514 |
by auto |
|
1515 |
have **: "f x + f' (x + g' (z - f x) - x) = z" |
|
1516 |
using assms(6)[unfolded o_def id_def,THEN cong] |
|
1517 |
by auto |
|
1518 |
have "norm (f x - (y + (z - f (x + g' (z - f x))))) \<le> |
|
1519 |
norm (f (x + g' (z - f x)) - z) + norm (f x - y)" |
|
44123 | 1520 |
using norm_triangle_ineq[of "f (x + g'(z - f x)) - z" "f x - y"] |
1521 |
by (auto simp add: algebra_simps) |
|
1522 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + norm (f x - y)" |
|
55665 | 1523 |
using e0(2)[rule_format, OF *] |
53781 | 1524 |
unfolding algebra_simps ** |
1525 |
by auto |
|
44123 | 1526 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + e/2" |
53781 | 1527 |
using as(1)[unfolded mem_cball dist_norm] |
1528 |
by auto |
|
44123 | 1529 |
also have "\<dots> \<le> 1 / (B * 2) * B * norm (z - f x) + e/2" |
53781 | 1530 |
using * and B |
1531 |
by (auto simp add: field_simps) |
|
1532 |
also have "\<dots> \<le> 1 / 2 * norm (z - f x) + e/2" |
|
1533 |
by auto |
|
1534 |
also have "\<dots> \<le> e/2 + e/2" |
|
1535 |
apply (rule add_right_mono) |
|
44123 | 1536 |
using as(2)[unfolded mem_cball dist_norm] |
53781 | 1537 |
unfolding norm_minus_commute |
1538 |
apply auto |
|
1539 |
done |
|
44123 | 1540 |
finally show "y + (z - f (x + g' (z - f x))) \<in> cball (f x) e" |
53781 | 1541 |
unfolding mem_cball dist_norm |
1542 |
by auto |
|
1543 |
qed (insert e, auto) note lem = this |
|
1544 |
show ?thesis |
|
1545 |
unfolding mem_interior |
|
1546 |
apply (rule_tac x="e/2" in exI) |
|
1547 |
apply rule |
|
1548 |
apply (rule divide_pos_pos) |
|
1549 |
prefer 3 |
|
44123 | 1550 |
proof |
53781 | 1551 |
fix y |
1552 |
assume "y \<in> ball (f x) (e / 2)" |
|
1553 |
then have *: "y \<in> cball (f x) (e / 2)" |
|
1554 |
by auto |
|
55665 | 1555 |
obtain z where z: "z \<in> cball (f x) e" "f (x + g' (z - f x)) = y" |
1556 |
using lem * by blast |
|
53781 | 1557 |
then have "norm (g' (z - f x)) \<le> norm (z - f x) * B" |
1558 |
using B |
|
1559 |
by (auto simp add: field_simps) |
|
44123 | 1560 |
also have "\<dots> \<le> e * B" |
53781 | 1561 |
apply (rule mult_right_mono) |
1562 |
using z(1) |
|
1563 |
unfolding mem_cball dist_norm norm_minus_commute |
|
1564 |
using B |
|
1565 |
apply auto |
|
1566 |
done |
|
1567 |
also have "\<dots> \<le> e1" |
|
1568 |
using e B unfolding less_divide_eq by auto |
|
1569 |
finally have "x + g'(z - f x) \<in> t" |
|
1570 |
apply - |
|
55665 | 1571 |
apply (rule e1(2)[unfolded subset_eq,rule_format]) |
53781 | 1572 |
unfolding mem_cball dist_norm |
1573 |
apply auto |
|
1574 |
done |
|
1575 |
then show "y \<in> f ` t" |
|
1576 |
using z by auto |
|
1577 |
qed (insert e, auto) |
|
44123 | 1578 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1579 |
|
60420 | 1580 |
text \<open>Hence the following eccentric variant of the inverse function theorem. |
53799 | 1581 |
This has no continuity assumptions, but we do need the inverse function. |
1582 |
We could put @{text "f' \<circ> g = I"} but this happens to fit with the minimal linear |
|
60420 | 1583 |
algebra theory I've set up so far.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1584 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1585 |
(* move before left_inverse_linear in Euclidean_Space*) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1586 |
|
53781 | 1587 |
lemma right_inverse_linear: |
1588 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
|
1589 |
assumes lf: "linear f" |
|
1590 |
and gf: "f \<circ> g = id" |
|
1591 |
shows "linear g" |
|
1592 |
proof - |
|
1593 |
from gf have fi: "surj f" |
|
1594 |
by (auto simp add: surj_def o_def id_def) metis |
|
1595 |
from linear_surjective_isomorphism[OF lf fi] |
|
1596 |
obtain h:: "'a \<Rightarrow> 'a" where h: "linear h" "\<forall>x. h (f x) = x" "\<forall>x. f (h x) = x" |
|
1597 |
by blast |
|
1598 |
have "h = g" |
|
1599 |
apply (rule ext) |
|
1600 |
using gf h(2,3) |
|
1601 |
apply (simp add: o_def id_def fun_eq_iff) |
|
1602 |
apply metis |
|
1603 |
done |
|
1604 |
with h(1) show ?thesis by blast |
|
1605 |
qed |
|
1606 |
||
44123 | 1607 |
lemma has_derivative_inverse_strong: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1608 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
53781 | 1609 |
assumes "open s" |
1610 |
and "x \<in> s" |
|
1611 |
and "continuous_on s f" |
|
1612 |
and "\<forall>x\<in>s. g (f x) = x" |
|
1613 |
and "(f has_derivative f') (at x)" |
|
1614 |
and "f' \<circ> g' = id" |
|
44123 | 1615 |
shows "(g has_derivative g') (at (f x))" |
53781 | 1616 |
proof - |
1617 |
have linf: "bounded_linear f'" |
|
44123 | 1618 |
using assms(5) unfolding has_derivative_def by auto |
53781 | 1619 |
then have ling: "bounded_linear g'" |
1620 |
unfolding linear_conv_bounded_linear[symmetric] |
|
1621 |
apply - |
|
1622 |
apply (rule right_inverse_linear) |
|
1623 |
using assms(6) |
|
1624 |
apply auto |
|
1625 |
done |
|
1626 |
moreover have "g' \<circ> f' = id" |
|
1627 |
using assms(6) linf ling |
|
1628 |
unfolding linear_conv_bounded_linear[symmetric] |
|
1629 |
using linear_inverse_left |
|
1630 |
by auto |
|
1631 |
moreover have *:"\<forall>t\<subseteq>s. x \<in> interior t \<longrightarrow> f x \<in> interior (f ` t)" |
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
1632 |
apply clarify |
53781 | 1633 |
apply (rule sussmann_open_mapping) |
1634 |
apply (rule assms ling)+ |
|
1635 |
apply auto |
|
1636 |
done |
|
1637 |
have "continuous (at (f x)) g" |
|
1638 |
unfolding continuous_at Lim_at |
|
1639 |
proof (rule, rule) |
|
1640 |
fix e :: real |
|
1641 |
assume "e > 0" |
|
1642 |
then have "f x \<in> interior (f ` (ball x e \<inter> s))" |
|
60420 | 1643 |
using *[rule_format,of "ball x e \<inter> s"] \<open>x \<in> s\<close> |
53781 | 1644 |
by (auto simp add: interior_open[OF open_ball] interior_open[OF assms(1)]) |
55665 | 1645 |
then obtain d where d: "0 < d" "ball (f x) d \<subseteq> f ` (ball x e \<inter> s)" |
1646 |
unfolding mem_interior 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
|
1647 |
show "\<exists>d>0. \<forall>y. 0 < dist y (f x) \<and> dist y (f x) < d \<longrightarrow> dist (g y) (g (f x)) < e" |
53781 | 1648 |
apply (rule_tac x=d in exI) |
1649 |
apply rule |
|
55665 | 1650 |
apply (rule d(1)) |
53781 | 1651 |
apply rule |
1652 |
apply rule |
|
1653 |
proof - |
|
61165 | 1654 |
fix y |
1655 |
assume "0 < dist y (f x) \<and> dist y (f x) < d" |
|
53781 | 1656 |
then have "g y \<in> g ` f ` (ball x e \<inter> s)" |
55665 | 1657 |
using d(2)[unfolded subset_eq,THEN bspec[where x=y]] |
53781 | 1658 |
by (auto simp add: dist_commute) |
1659 |
then have "g y \<in> ball x e \<inter> s" |
|
1660 |
using assms(4) by auto |
|
1661 |
then show "dist (g y) (g (f x)) < e" |
|
60420 | 1662 |
using assms(4)[rule_format,OF \<open>x \<in> s\<close>] |
44123 | 1663 |
by (auto simp add: dist_commute) |
1664 |
qed |
|
1665 |
qed |
|
1666 |
moreover have "f x \<in> interior (f ` s)" |
|
53781 | 1667 |
apply (rule sussmann_open_mapping) |
1668 |
apply (rule assms ling)+ |
|
60420 | 1669 |
using interior_open[OF assms(1)] and \<open>x \<in> s\<close> |
53781 | 1670 |
apply auto |
1671 |
done |
|
61165 | 1672 |
moreover have "f (g y) = y" if "y \<in> interior (f ` s)" for y |
53781 | 1673 |
proof - |
61165 | 1674 |
from that have "y \<in> f ` s" |
53781 | 1675 |
using interior_subset by auto |
55665 | 1676 |
then obtain z where "z \<in> s" "y = f z" unfolding image_iff .. |
61165 | 1677 |
then show ?thesis |
53781 | 1678 |
using assms(4) by auto |
44123 | 1679 |
qed |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
1680 |
ultimately show ?thesis using assms |
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
1681 |
by (metis has_derivative_inverse_basic_x open_interior) |
44123 | 1682 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1683 |
|
60420 | 1684 |
text \<open>A rewrite based on the other domain.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1685 |
|
44123 | 1686 |
lemma has_derivative_inverse_strong_x: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1687 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
53781 | 1688 |
assumes "open s" |
1689 |
and "g y \<in> s" |
|
1690 |
and "continuous_on s f" |
|
1691 |
and "\<forall>x\<in>s. g (f x) = x" |
|
1692 |
and "(f has_derivative f') (at (g y))" |
|
1693 |
and "f' \<circ> g' = id" |
|
1694 |
and "f (g y) = y" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1695 |
shows "(g has_derivative g') (at y)" |
53781 | 1696 |
using has_derivative_inverse_strong[OF assms(1-6)] |
1697 |
unfolding assms(7) |
|
1698 |
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
|
1699 |
|
60420 | 1700 |
text \<open>On a region.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1701 |
|
44123 | 1702 |
lemma has_derivative_inverse_on: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1703 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
53781 | 1704 |
assumes "open s" |
1705 |
and "\<forall>x\<in>s. (f has_derivative f'(x)) (at x)" |
|
1706 |
and "\<forall>x\<in>s. g (f x) = x" |
|
1707 |
and "f' x \<circ> g' x = id" |
|
1708 |
and "x \<in> s" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1709 |
shows "(g has_derivative g'(x)) (at (f x))" |
53781 | 1710 |
apply (rule has_derivative_inverse_strong[where g'="g' x" and f=f]) |
1711 |
apply (rule assms)+ |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1712 |
unfolding continuous_on_eq_continuous_at[OF assms(1)] |
53781 | 1713 |
apply rule |
1714 |
apply (rule differentiable_imp_continuous_within) |
|
1715 |
unfolding differentiable_def |
|
1716 |
using assms |
|
1717 |
apply auto |
|
1718 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1719 |
|
60420 | 1720 |
text \<open>Invertible derivative continous at a point implies local |
44123 | 1721 |
injectivity. It's only for this we need continuity of the derivative, |
1722 |
except of course if we want the fact that the inverse derivative is |
|
1723 |
also continuous. So if we know for some other reason that the inverse |
|
60420 | 1724 |
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
|
1725 |
|
53781 | 1726 |
lemma bounded_linear_sub: "bounded_linear f \<Longrightarrow> bounded_linear g \<Longrightarrow> bounded_linear (\<lambda>x. f x - g x)" |
44123 | 1727 |
using bounded_linear_add[of f "\<lambda>x. - g x"] bounded_linear_minus[of g] |
1728 |
by (auto simp add: algebra_simps) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1729 |
|
44123 | 1730 |
lemma has_derivative_locally_injective: |
53781 | 1731 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'm::euclidean_space" |
1732 |
assumes "a \<in> s" |
|
1733 |
and "open s" |
|
1734 |
and "bounded_linear g'" |
|
1735 |
and "g' \<circ> f' a = id" |
|
1736 |
and "\<forall>x\<in>s. (f has_derivative f' x) (at x)" |
|
1737 |
and "\<forall>e>0. \<exists>d>0. \<forall>x. dist a x < d \<longrightarrow> onorm (\<lambda>v. f' x v - f' a v) < e" |
|
1738 |
obtains t where "a \<in> t" "open t" "\<forall>x\<in>t. \<forall>x'\<in>t. f x' = f x \<longrightarrow> x' = x" |
|
1739 |
proof - |
|
1740 |
interpret bounded_linear g' |
|
1741 |
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
|
1742 |
note f'g' = assms(4)[unfolded id_def o_def,THEN cong] |
53781 | 1743 |
have "g' (f' a (\<Sum>Basis)) = (\<Sum>Basis)" "(\<Sum>Basis) \<noteq> (0::'n)" |
1744 |
defer |
|
1745 |
apply (subst euclidean_eq_iff) |
|
1746 |
using f'g' |
|
1747 |
apply auto |
|
1748 |
done |
|
1749 |
then have *: "0 < onorm g'" |
|
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
1750 |
unfolding onorm_pos_lt[OF assms(3)] |
53781 | 1751 |
by fastforce |
1752 |
def k \<equiv> "1 / onorm g' / 2" |
|
1753 |
have *: "k > 0" |
|
1754 |
unfolding k_def using * by auto |
|
55665 | 1755 |
obtain d1 where d1: |
1756 |
"0 < d1" |
|
1757 |
"\<And>x. dist a x < d1 \<Longrightarrow> onorm (\<lambda>v. f' x v - f' a v) < k" |
|
1758 |
using assms(6) * by blast |
|
60420 | 1759 |
from \<open>open s\<close> obtain d2 where "d2 > 0" "ball a d2 \<subseteq> s" |
1760 |
using \<open>a\<in>s\<close> .. |
|
53781 | 1761 |
obtain d2 where "d2 > 0" "ball a d2 \<subseteq> s" |
1762 |
using assms(2,1) .. |
|
55665 | 1763 |
obtain d2 where d2: "0 < d2" "ball a d2 \<subseteq> s" |
1764 |
using assms(2) |
|
1765 |
unfolding open_contains_ball |
|
60420 | 1766 |
using \<open>a\<in>s\<close> by blast |
55665 | 1767 |
obtain d where d: "0 < d" "d < d1" "d < d2" |
1768 |
using real_lbound_gt_zero[OF d1(1) d2(1)] by blast |
|
44123 | 1769 |
show ?thesis |
1770 |
proof |
|
53781 | 1771 |
show "a \<in> ball a d" |
1772 |
using d by auto |
|
44123 | 1773 |
show "\<forall>x\<in>ball a d. \<forall>x'\<in>ball a d. f x' = f x \<longrightarrow> x' = x" |
1774 |
proof (intro strip) |
|
53781 | 1775 |
fix x y |
1776 |
assume as: "x \<in> ball a d" "y \<in> ball a d" "f x = f y" |
|
1777 |
def ph \<equiv> "\<lambda>w. w - g' (f w - f x)" |
|
44123 | 1778 |
have ph':"ph = g' \<circ> (\<lambda>w. f' a w - (f w - f x))" |
53781 | 1779 |
unfolding ph_def o_def |
1780 |
unfolding diff |
|
1781 |
using f'g' |
|
44123 | 1782 |
by (auto simp add: algebra_simps) |
53781 | 1783 |
have "norm (ph x - ph y) \<le> (1 / 2) * norm (x - y)" |
1784 |
apply (rule differentiable_bound[OF convex_ball _ _ as(1-2), where f'="\<lambda>x v. v - g'(f' x v)"]) |
|
1785 |
apply (rule_tac[!] ballI) |
|
1786 |
proof - |
|
1787 |
fix u |
|
1788 |
assume u: "u \<in> ball a d" |
|
1789 |
then have "u \<in> s" |
|
1790 |
using d d2 by auto |
|
1791 |
have *: "(\<lambda>v. v - g' (f' u v)) = g' \<circ> (\<lambda>w. f' a w - f' u w)" |
|
1792 |
unfolding o_def and diff |
|
1793 |
using f'g' by auto |
|
41958 | 1794 |
show "(ph has_derivative (\<lambda>v. v - g' (f' u v))) (at u within ball a d)" |
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
|
1795 |
unfolding ph' * |
53781 | 1796 |
apply (simp add: comp_def) |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
1797 |
apply (rule bounded_linear.has_derivative[OF assms(3)]) |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1798 |
apply (rule derivative_intros) |
53781 | 1799 |
defer |
1800 |
apply (rule has_derivative_sub[where g'="\<lambda>x.0",unfolded diff_0_right]) |
|
1801 |
apply (rule has_derivative_at_within) |
|
60420 | 1802 |
using assms(5) and \<open>u \<in> s\<close> \<open>a \<in> s\<close> |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1803 |
apply (auto intro!: derivative_intros bounded_linear.has_derivative[of _ "\<lambda>x. x"] has_derivative_bounded_linear) |
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
|
1804 |
done |
53781 | 1805 |
have **: "bounded_linear (\<lambda>x. f' u x - f' a x)" "bounded_linear (\<lambda>x. f' a x - f' u x)" |
1806 |
apply (rule_tac[!] bounded_linear_sub) |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1807 |
apply (rule_tac[!] has_derivative_bounded_linear) |
60420 | 1808 |
using assms(5) \<open>u \<in> s\<close> \<open>a \<in> s\<close> |
53781 | 1809 |
apply auto |
1810 |
done |
|
44123 | 1811 |
have "onorm (\<lambda>v. v - g' (f' u v)) \<le> onorm g' * onorm (\<lambda>w. f' a w - f' u w)" |
53781 | 1812 |
unfolding * |
1813 |
apply (rule onorm_compose) |
|
1814 |
apply (rule assms(3) **)+ |
|
1815 |
done |
|
44123 | 1816 |
also have "\<dots> \<le> onorm g' * k" |
53781 | 1817 |
apply (rule mult_left_mono) |
55665 | 1818 |
using d1(2)[of u] |
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
1819 |
using onorm_neg[where f="\<lambda>x. f' u x - f' a x"] |
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
1820 |
using d and u and onorm_pos_le[OF assms(3)] |
53781 | 1821 |
apply (auto simp add: algebra_simps) |
1822 |
done |
|
1823 |
also have "\<dots> \<le> 1 / 2" |
|
1824 |
unfolding k_def by auto |
|
1825 |
finally show "onorm (\<lambda>v. v - g' (f' u v)) \<le> 1 / 2" . |
|
44123 | 1826 |
qed |
1827 |
moreover have "norm (ph y - ph x) = norm (y - x)" |
|
53781 | 1828 |
apply (rule arg_cong[where f=norm]) |
1829 |
unfolding ph_def |
|
1830 |
using diff |
|
1831 |
unfolding as |
|
1832 |
apply auto |
|
1833 |
done |
|
1834 |
ultimately show "x = y" |
|
1835 |
unfolding norm_minus_commute by auto |
|
44123 | 1836 |
qed |
1837 |
qed auto |
|
1838 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1839 |
|
53781 | 1840 |
|
60420 | 1841 |
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
|
1842 |
|
44123 | 1843 |
lemma has_derivative_sequence_lipschitz_lemma: |
60179 | 1844 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
44123 | 1845 |
assumes "convex s" |
53781 | 1846 |
and "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
1847 |
and "\<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. 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
|
1848 |
and "0 \<le> e" |
53781 | 1849 |
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)" |
1850 |
proof rule+ |
|
1851 |
fix m n x y |
|
1852 |
assume as: "N \<le> m" "N \<le> n" "x \<in> s" "y \<in> s" |
|
1853 |
show "norm ((f m x - f n x) - (f m y - f n y)) \<le> 2 * e * norm (x - y)" |
|
1854 |
apply (rule differentiable_bound[where f'="\<lambda>x h. f' m x h - f' n x h", OF assms(1) _ _ as(3-4)]) |
|
1855 |
apply (rule_tac[!] ballI) |
|
1856 |
proof - |
|
1857 |
fix x |
|
1858 |
assume "x \<in> s" |
|
44123 | 1859 |
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)" |
60420 | 1860 |
by (rule derivative_intros assms(2)[rule_format] \<open>x\<in>s\<close>)+ |
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1861 |
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
|
1862 |
proof (rule onorm_bound) |
53781 | 1863 |
fix h |
44123 | 1864 |
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)" |
1865 |
using norm_triangle_ineq[of "f' m x h - g' x h" "- f' n x h + g' x h"] |
|
53781 | 1866 |
unfolding norm_minus_commute |
1867 |
by (auto simp add: algebra_simps) |
|
1868 |
also have "\<dots> \<le> e * norm h + e * norm h" |
|
60420 | 1869 |
using assms(3)[rule_format,OF \<open>N \<le> m\<close> \<open>x \<in> s\<close>, of h] |
1870 |
using assms(3)[rule_format,OF \<open>N \<le> n\<close> \<open>x \<in> s\<close>, of h] |
|
53781 | 1871 |
by (auto simp add: field_simps) |
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1872 |
finally show "norm (f' m x h - f' n x h) \<le> 2 * e * norm h" |
53781 | 1873 |
by auto |
60420 | 1874 |
qed (simp add: \<open>0 \<le> e\<close>) |
44123 | 1875 |
qed |
1876 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1877 |
|
44123 | 1878 |
lemma has_derivative_sequence_lipschitz: |
60179 | 1879 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
44123 | 1880 |
assumes "convex s" |
53781 | 1881 |
and "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
1882 |
and "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm (f' n x h - g' x h) \<le> e * norm h" |
|
1883 |
shows "\<forall>e>0. \<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>y\<in>s. |
|
1884 |
norm ((f m x - f n x) - (f m y - f n y)) \<le> e * norm (x - y)" |
|
1885 |
proof (rule, rule) |
|
61165 | 1886 |
fix e :: real |
1887 |
assume "e > 0" |
|
1888 |
then have *: "2 * (1/2* e) = e" "1/2 * e >0" |
|
1889 |
by auto |
|
55665 | 1890 |
obtain N where "\<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm (f' n x h - g' x h) \<le> 1 / 2 * e * norm h" |
1891 |
using assms(3) *(2) by blast |
|
61165 | 1892 |
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 | 1893 |
apply (rule_tac x=N in exI) |
1894 |
apply (rule has_derivative_sequence_lipschitz_lemma[where e="1/2 *e", unfolded *]) |
|
60420 | 1895 |
using assms \<open>e > 0\<close> |
53781 | 1896 |
apply auto |
1897 |
done |
|
44123 | 1898 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1899 |
|
44123 | 1900 |
lemma has_derivative_sequence: |
60179 | 1901 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::banach" |
44123 | 1902 |
assumes "convex s" |
53781 | 1903 |
and "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
1904 |
and "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm (f' n x h - g' x h) \<le> e * norm h" |
|
1905 |
and "x0 \<in> s" |
|
1906 |
and "((\<lambda>n. f n x0) ---> l) sequentially" |
|
1907 |
shows "\<exists>g. \<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially \<and> (g has_derivative g'(x)) (at x within s)" |
|
1908 |
proof - |
|
1909 |
have lem1: "\<forall>e>0. \<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>y\<in>s. |
|
1910 |
norm ((f m x - f n x) - (f m y - f n y)) \<le> e * norm (x - y)" |
|
56320 | 1911 |
using assms(1,2,3) by (rule has_derivative_sequence_lipschitz) |
44123 | 1912 |
have "\<exists>g. \<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially" |
53781 | 1913 |
apply (rule bchoice) |
1914 |
unfolding convergent_eq_cauchy |
|
44123 | 1915 |
proof |
53781 | 1916 |
fix x |
1917 |
assume "x \<in> s" |
|
1918 |
show "Cauchy (\<lambda>n. f n x)" |
|
1919 |
proof (cases "x = x0") |
|
1920 |
case True |
|
1921 |
then show ?thesis |
|
1922 |
using LIMSEQ_imp_Cauchy[OF assms(5)] by auto |
|
44123 | 1923 |
next |
53781 | 1924 |
case False |
1925 |
show ?thesis |
|
1926 |
unfolding Cauchy_def |
|
1927 |
proof (rule, rule) |
|
1928 |
fix e :: real |
|
1929 |
assume "e > 0" |
|
56541 | 1930 |
hence *: "e / 2 > 0" "e / 2 / norm (x - x0) > 0" using False by auto |
55665 | 1931 |
obtain M where M: "\<forall>m\<ge>M. \<forall>n\<ge>M. dist (f m x0) (f n x0) < e / 2" |
1932 |
using LIMSEQ_imp_Cauchy[OF assms(5)] |
|
1933 |
unfolding Cauchy_def |
|
1934 |
using *(1) by blast |
|
1935 |
obtain N where N: |
|
1936 |
"\<forall>m\<ge>N. \<forall>n\<ge>N. |
|
1937 |
\<forall>xa\<in>s. \<forall>y\<in>s. norm (f m xa - f n xa - (f m y - f n y)) \<le> |
|
1938 |
e / 2 / norm (x - x0) * norm (xa - y)" |
|
1939 |
using lem1 *(2) by blast |
|
44123 | 1940 |
show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (f m x) (f n x) < e" |
53781 | 1941 |
apply (rule_tac x="max M N" in exI) |
1942 |
proof rule+ |
|
1943 |
fix m n |
|
1944 |
assume as: "max M N \<le>m" "max M N\<le>n" |
|
1945 |
have "dist (f m x) (f n x) \<le> |
|
1946 |
norm (f m x0 - f n x0) + norm (f m x - f n x - (f m x0 - f n x0))" |
|
1947 |
unfolding dist_norm |
|
1948 |
by (rule norm_triangle_sub) |
|
44123 | 1949 |
also have "\<dots> \<le> norm (f m x0 - f n x0) + e / 2" |
60420 | 1950 |
using N[rule_format,OF _ _ \<open>x\<in>s\<close> \<open>x0\<in>s\<close>, of m n] and as and False |
44123 | 1951 |
by auto |
1952 |
also have "\<dots> < e / 2 + e / 2" |
|
53781 | 1953 |
apply (rule add_strict_right_mono) |
1954 |
using as and M[rule_format] |
|
1955 |
unfolding dist_norm |
|
1956 |
apply auto |
|
1957 |
done |
|
1958 |
finally show "dist (f m x) (f n x) < e" |
|
1959 |
by auto |
|
44123 | 1960 |
qed |
1961 |
qed |
|
1962 |
qed |
|
1963 |
qed |
|
55665 | 1964 |
then obtain g where g: "\<forall>x\<in>s. (\<lambda>n. f n x) ----> g x" .. |
53781 | 1965 |
have lem2: "\<forall>e>0. \<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)" |
1966 |
proof (rule, rule) |
|
1967 |
fix e :: real |
|
1968 |
assume *: "e > 0" |
|
55665 | 1969 |
obtain N where |
1970 |
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)" |
|
1971 |
using lem1 * by blast |
|
44123 | 1972 |
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)" |
53781 | 1973 |
apply (rule_tac x=N in exI) |
1974 |
proof rule+ |
|
1975 |
fix n x y |
|
1976 |
assume as: "N \<le> n" "x \<in> s" "y \<in> s" |
|
56320 | 1977 |
have "((\<lambda>m. norm (f n x - f n y - (f m x - f m y))) ---> norm (f n x - f n y - (g x - g y))) sequentially" |
1978 |
by (intro tendsto_intros g[rule_format] as) |
|
1979 |
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 | 1980 |
unfolding eventually_sequentially |
53781 | 1981 |
apply (rule_tac x=N in exI) |
1982 |
apply rule |
|
1983 |
apply rule |
|
1984 |
proof - |
|
1985 |
fix m |
|
1986 |
assume "N \<le> m" |
|
1987 |
then show "norm (f n x - f n y - (f m x - f m y)) \<le> e * norm (x - y)" |
|
44123 | 1988 |
using N[rule_format, of n m x y] and as |
1989 |
by (auto simp add: algebra_simps) |
|
1990 |
qed |
|
56320 | 1991 |
ultimately show "norm (f n x - f n y - (g x - g y)) \<le> e * norm (x - y)" |
1992 |
by (rule tendsto_ge_const[OF trivial_limit_sequentially]) |
|
44123 | 1993 |
qed |
1994 |
qed |
|
56320 | 1995 |
have "\<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially \<and> (g has_derivative g' x) (at x within s)" |
1996 |
unfolding has_derivative_within_alt2 |
|
1997 |
proof (intro ballI conjI) |
|
53781 | 1998 |
fix x |
1999 |
assume "x \<in> s" |
|
56320 | 2000 |
then show "((\<lambda>n. f n x) ---> g x) sequentially" |
2001 |
by (simp add: g) |
|
53781 | 2002 |
have lem3: "\<forall>u. ((\<lambda>n. f' n x u) ---> g' x u) sequentially" |
56320 | 2003 |
unfolding filterlim_def le_nhds_metric_le eventually_filtermap dist_norm |
2004 |
proof (intro allI impI) |
|
53781 | 2005 |
fix u |
2006 |
fix e :: real |
|
2007 |
assume "e > 0" |
|
56320 | 2008 |
show "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e) sequentially" |
53781 | 2009 |
proof (cases "u = 0") |
2010 |
case True |
|
56320 | 2011 |
have "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e * norm u) sequentially" |
60420 | 2012 |
using assms(3)[folded eventually_sequentially] and \<open>0 < e\<close> and \<open>x \<in> s\<close> |
56320 | 2013 |
by (fast elim: eventually_elim1) |
2014 |
then show ?thesis |
|
60420 | 2015 |
using \<open>u = 0\<close> and \<open>0 < e\<close> by (auto elim: eventually_elim1) |
44123 | 2016 |
next |
53781 | 2017 |
case False |
60420 | 2018 |
with \<open>0 < e\<close> have "0 < e / norm u" by simp |
56320 | 2019 |
then have "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e / norm u * norm u) sequentially" |
60420 | 2020 |
using assms(3)[folded eventually_sequentially] and \<open>x \<in> s\<close> |
56320 | 2021 |
by (fast elim: eventually_elim1) |
2022 |
then show ?thesis |
|
60420 | 2023 |
using \<open>u \<noteq> 0\<close> by simp |
44123 | 2024 |
qed |
2025 |
qed |
|
2026 |
show "bounded_linear (g' x)" |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2027 |
proof |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2028 |
fix x' y z :: 'a |
53781 | 2029 |
fix c :: real |
60420 | 2030 |
note lin = assms(2)[rule_format,OF \<open>x\<in>s\<close>,THEN has_derivative_bounded_linear] |
44123 | 2031 |
show "g' x (c *\<^sub>R x') = c *\<^sub>R g' x x'" |
53781 | 2032 |
apply (rule tendsto_unique[OF trivial_limit_sequentially]) |
2033 |
apply (rule lem3[rule_format]) |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
2034 |
unfolding lin[THEN bounded_linear.linear, THEN linear_cmul] |
53781 | 2035 |
apply (intro tendsto_intros) |
2036 |
apply (rule lem3[rule_format]) |
|
2037 |
done |
|
44123 | 2038 |
show "g' x (y + z) = g' x y + g' x z" |
53781 | 2039 |
apply (rule tendsto_unique[OF trivial_limit_sequentially]) |
2040 |
apply (rule lem3[rule_format]) |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
2041 |
unfolding lin[THEN bounded_linear.linear, THEN linear_add] |
53781 | 2042 |
apply (rule tendsto_add) |
2043 |
apply (rule lem3[rule_format])+ |
|
2044 |
done |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2045 |
obtain N where N: "\<forall>h. norm (f' N x h - g' x h) \<le> 1 * norm h" |
60420 | 2046 |
using assms(3) \<open>x \<in> s\<close> by (fast intro: zero_less_one) |
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2047 |
have "bounded_linear (f' N x)" |
60420 | 2048 |
using assms(2) \<open>x \<in> s\<close> by fast |
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2049 |
from bounded_linear.bounded [OF this] |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2050 |
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
|
2051 |
{ |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2052 |
fix h |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2053 |
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
|
2054 |
by simp |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2055 |
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
|
2056 |
by (rule norm_triangle_ineq4) |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2057 |
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
|
2058 |
using N K by (fast intro: add_mono) |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2059 |
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
|
2060 |
by (simp add: ring_distribs) |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2061 |
} |
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
2062 |
then show "\<exists>K. \<forall>h. norm (g' x h) \<le> norm h * K" by fast |
44123 | 2063 |
qed |
56320 | 2064 |
show "\<forall>e>0. eventually (\<lambda>y. norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)) (at x within s)" |
53781 | 2065 |
proof (rule, rule) |
61165 | 2066 |
fix e :: real |
2067 |
assume "e > 0" |
|
2068 |
then have *: "e / 3 > 0" |
|
2069 |
by auto |
|
55665 | 2070 |
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" |
2071 |
using assms(3) * by blast |
|
2072 |
obtain N2 where |
|
2073 |
N2: "\<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)" |
|
2074 |
using lem2 * by blast |
|
56320 | 2075 |
let ?N = "max N1 N2" |
2076 |
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)" |
|
60420 | 2077 |
using assms(2)[unfolded has_derivative_within_alt2] and \<open>x \<in> s\<close> and * by fast |
56320 | 2078 |
moreover have "eventually (\<lambda>y. y \<in> s) (at x within s)" |
2079 |
unfolding eventually_at by (fast intro: zero_less_one) |
|
61165 | 2080 |
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 | 2081 |
proof (rule eventually_elim2) |
53781 | 2082 |
fix y |
56320 | 2083 |
assume "y \<in> s" |
2084 |
assume "norm (f ?N y - f ?N x - f' ?N x (y - x)) \<le> e / 3 * norm (y - x)" |
|
2085 |
moreover have "norm (g y - g x - (f ?N y - f ?N x)) \<le> e / 3 * norm (y - x)" |
|
60420 | 2086 |
using N2[rule_format, OF _ \<open>y \<in> s\<close> \<open>x \<in> s\<close>] |
56320 | 2087 |
by (simp add: norm_minus_commute) |
2088 |
ultimately have "norm (g y - g x - f' ?N x (y - x)) \<le> 2 * e / 3 * norm (y - x)" |
|
44123 | 2089 |
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 | 2090 |
by (auto simp add: algebra_simps) |
44123 | 2091 |
moreover |
2092 |
have " norm (f' ?N x (y - x) - g' x (y - x)) \<le> e / 3 * norm (y - x)" |
|
60420 | 2093 |
using N1 \<open>x \<in> s\<close> by auto |
41958 | 2094 |
ultimately show "norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)" |
44123 | 2095 |
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 | 2096 |
by (auto simp add: algebra_simps) |
44123 | 2097 |
qed |
2098 |
qed |
|
2099 |
qed |
|
56320 | 2100 |
then show ?thesis by fast |
44123 | 2101 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2102 |
|
60420 | 2103 |
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
|
2104 |
|
44123 | 2105 |
lemma has_antiderivative_sequence: |
60179 | 2106 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::banach" |
44123 | 2107 |
assumes "convex s" |
53781 | 2108 |
and "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
2109 |
and "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm (f' n x h - g' x h) \<le> e * norm h" |
|
2110 |
shows "\<exists>g. \<forall>x\<in>s. (g has_derivative g' x) (at x within s)" |
|
2111 |
proof (cases "s = {}") |
|
2112 |
case False |
|
2113 |
then obtain a where "a \<in> s" |
|
2114 |
by auto |
|
2115 |
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" |
|
2116 |
by auto |
|
44123 | 2117 |
show ?thesis |
53781 | 2118 |
apply (rule *) |
2119 |
apply (rule has_derivative_sequence[OF assms(1) _ assms(3), of "\<lambda>n x. f n x + (f 0 a - f n a)"]) |
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
2120 |
apply (metis assms(2) has_derivative_add_const) |
60420 | 2121 |
apply (rule \<open>a \<in> s\<close>) |
53781 | 2122 |
apply auto |
2123 |
done |
|
44123 | 2124 |
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
|
2125 |
|
44123 | 2126 |
lemma has_antiderivative_limit: |
60179 | 2127 |
fixes g' :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> 'b::banach" |
44123 | 2128 |
assumes "convex s" |
53781 | 2129 |
and "\<forall>e>0. \<exists>f f'. \<forall>x\<in>s. |
2130 |
(f has_derivative (f' x)) (at x within s) \<and> (\<forall>h. norm (f' x h - g' x h) \<le> e * norm h)" |
|
2131 |
shows "\<exists>g. \<forall>x\<in>s. (g has_derivative g' x) (at x within s)" |
|
2132 |
proof - |
|
2133 |
have *: "\<forall>n. \<exists>f f'. \<forall>x\<in>s. |
|
2134 |
(f has_derivative (f' x)) (at x within s) \<and> |
|
2135 |
(\<forall>h. norm(f' x h - g' x h) \<le> inverse (real (Suc n)) * norm h)" |
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
2136 |
by (metis assms(2) inverse_positive_iff_positive real_of_nat_Suc_gt_zero) |
55665 | 2137 |
obtain f where |
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
2138 |
*: "\<forall>x. \<exists>f'. \<forall>xa\<in>s. (f x has_derivative f' xa) (at xa within s) \<and> |
55665 | 2139 |
(\<forall>h. norm (f' xa h - g' xa h) \<le> inverse (real (Suc x)) * norm h)" |
2140 |
using *[THEN choice] .. |
|
2141 |
obtain f' where |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
2142 |
f: "\<forall>x. \<forall>xa\<in>s. (f x has_derivative f' x xa) (at xa within s) \<and> |
55665 | 2143 |
(\<forall>h. norm (f' x xa h - g' xa h) \<le> inverse (real (Suc x)) * norm h)" |
2144 |
using *[THEN choice] .. |
|
53781 | 2145 |
show ?thesis |
2146 |
apply (rule has_antiderivative_sequence[OF assms(1), of f f']) |
|
2147 |
defer |
|
2148 |
apply rule |
|
2149 |
apply rule |
|
2150 |
proof - |
|
2151 |
fix e :: real |
|
2152 |
assume "e > 0" |
|
55665 | 2153 |
obtain N where N: "inverse (real (Suc N)) < e" |
60420 | 2154 |
using reals_Archimedean[OF \<open>e>0\<close>] .. |
44123 | 2155 |
show "\<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm (f' n x h - g' x h) \<le> e * norm h" |
53781 | 2156 |
apply (rule_tac x=N in exI) |
61165 | 2157 |
apply rule |
2158 |
apply rule |
|
2159 |
apply rule |
|
2160 |
apply rule |
|
2161 |
proof - |
|
2162 |
fix n x h |
|
2163 |
assume n: "N \<le> n" and x: "x \<in> s" |
|
53781 | 2164 |
have *: "inverse (real (Suc n)) \<le> e" |
2165 |
apply (rule order_trans[OF _ N[THEN less_imp_le]]) |
|
61165 | 2166 |
using n |
53781 | 2167 |
apply (auto simp add: field_simps) |
2168 |
done |
|
61165 | 2169 |
show "norm (f' n x h - g' x h) \<le> e * norm h" |
2170 |
using f[rule_format,THEN conjunct2, OF x, of n, THEN spec[where x=h]] |
|
53781 | 2171 |
apply (rule order_trans) |
2172 |
using N * |
|
2173 |
apply (cases "h = 0") |
|
2174 |
apply auto |
|
2175 |
done |
|
44123 | 2176 |
qed |
53781 | 2177 |
qed (insert f, auto) |
44123 | 2178 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2179 |
|
53781 | 2180 |
|
60420 | 2181 |
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
|
2182 |
|
44123 | 2183 |
lemma has_derivative_series: |
60179 | 2184 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::banach" |
44123 | 2185 |
assumes "convex s" |
56183 | 2186 |
and "\<And>n x. x \<in> s \<Longrightarrow> ((f n) has_derivative (f' n x)) (at x within s)" |
56193
c726ecfb22b6
cleanup Series: sorted according to typeclass hierarchy, use {..<_} instead of {0..<_}
hoelzl
parents:
56188
diff
changeset
|
2187 |
and "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm (setsum (\<lambda>i. f' i x h) {..<n} - g' x h) \<le> e * norm h" |
53781 | 2188 |
and "x \<in> s" |
56183 | 2189 |
and "(\<lambda>n. f n x) sums l" |
2190 |
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)" |
|
2191 |
unfolding sums_def |
|
53781 | 2192 |
apply (rule has_derivative_sequence[OF assms(1) _ assms(3)]) |
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
2193 |
apply (metis assms(2) has_derivative_setsum) |
53781 | 2194 |
using assms(4-5) |
56183 | 2195 |
unfolding sums_def |
53781 | 2196 |
apply auto |
2197 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2198 |
|
61076 | 2199 |
text \<open>Considering derivative @{typ "real \<Rightarrow> 'b::real_normed_vector"} 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
|
2200 |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2201 |
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
|
2202 |
|
61245 | 2203 |
lemma vector_derivative_unique_within: |
2204 |
assumes not_bot: "at x within s \<noteq> bot" |
|
2205 |
and f': "(f has_vector_derivative f') (at x within s)" |
|
2206 |
and f'': "(f has_vector_derivative f'') (at x within s)" |
|
37730 | 2207 |
shows "f' = f''" |
53781 | 2208 |
proof - |
37730 | 2209 |
have "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
61245 | 2210 |
proof (rule frechet_derivative_unique_within) |
2211 |
show "\<forall>i\<in>Basis. \<forall>e>0. \<exists>d. 0 < \<bar>d\<bar> \<and> \<bar>d\<bar> < e \<and> x + d *\<^sub>R i \<in> s" |
|
2212 |
proof clarsimp |
|
2213 |
fix e :: real assume "0 < e" |
|
2214 |
with islimpt_approachable_real[of x s] not_bot |
|
2215 |
obtain x' where "x' \<in> s" "x' \<noteq> x" "\<bar>x' - x\<bar> < e" |
|
2216 |
by (auto simp add: trivial_limit_within) |
|
2217 |
then show "\<exists>d. d \<noteq> 0 \<and> \<bar>d\<bar> < e \<and> x + d \<in> s" |
|
2218 |
by (intro exI[of _ "x' - x"]) auto |
|
2219 |
qed |
|
2220 |
qed (insert f' f'', auto simp: has_vector_derivative_def) |
|
53781 | 2221 |
then show ?thesis |
2222 |
unfolding fun_eq_iff by auto |
|
37730 | 2223 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2224 |
|
61245 | 2225 |
lemma vector_derivative_unique_at: |
2226 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f'') (at x) \<Longrightarrow> f' = f''" |
|
2227 |
by (rule vector_derivative_unique_within) auto |
|
2228 |
||
2229 |
lemma differentiableI_vector: "(f has_vector_derivative y) F \<Longrightarrow> f differentiable F" |
|
2230 |
by (auto simp: differentiable_def has_vector_derivative_def) |
|
2231 |
||
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2232 |
lemma vector_derivative_works: |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2233 |
"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
|
2234 |
(is "?l = ?r") |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2235 |
proof |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2236 |
assume ?l |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2237 |
obtain f' where f': "(f has_derivative f') net" |
60420 | 2238 |
using \<open>?l\<close> unfolding differentiable_def .. |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2239 |
then interpret bounded_linear f' |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2240 |
by auto |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2241 |
show ?r |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2242 |
unfolding vector_derivative_def has_vector_derivative_def |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2243 |
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
|
2244 |
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
|
2245 |
|
61245 | 2246 |
lemma vector_derivative_within: |
2247 |
assumes not_bot: "at x within s \<noteq> bot" and y: "(f has_vector_derivative y) (at x within s)" |
|
2248 |
shows "vector_derivative f (at x within s) = y" |
|
2249 |
using y |
|
2250 |
by (intro vector_derivative_unique_within[OF not_bot vector_derivative_works[THEN iffD1] y]) |
|
2251 |
(auto simp: differentiable_def has_vector_derivative_def) |
|
2252 |
||
2253 |
lemma islimpt_closure_open: |
|
2254 |
fixes s :: "'a::perfect_space set" |
|
2255 |
assumes "open s" and t: "t = closure s" "x \<in> t" |
|
2256 |
shows "x islimpt t" |
|
2257 |
proof cases |
|
2258 |
assume "x \<in> s" |
|
2259 |
{ fix T assume "x \<in> T" "open T" |
|
2260 |
then have "open (s \<inter> T)" |
|
2261 |
using \<open>open s\<close> by auto |
|
2262 |
then have "s \<inter> T \<noteq> {x}" |
|
2263 |
using not_open_singleton[of x] by auto |
|
2264 |
with \<open>x \<in> T\<close> \<open>x \<in> s\<close> have "\<exists>y\<in>t. y \<in> T \<and> y \<noteq> x" |
|
2265 |
using closure_subset[of s] by (auto simp: t) } |
|
2266 |
then show ?thesis |
|
2267 |
by (auto intro!: islimptI) |
|
2268 |
next |
|
2269 |
assume "x \<notin> s" with t show ?thesis |
|
2270 |
unfolding t closure_def by (auto intro: islimpt_subset) |
|
2271 |
qed |
|
2272 |
||
44123 | 2273 |
lemma vector_derivative_unique_within_closed_interval: |
61245 | 2274 |
assumes ab: "a < b" "x \<in> cbox a b" |
2275 |
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 | 2276 |
shows "f' = f''" |
61245 | 2277 |
using ab |
2278 |
by (intro vector_derivative_unique_within[OF _ D]) |
|
2279 |
(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
|
2280 |
|
37730 | 2281 |
lemma vector_derivative_at: |
53781 | 2282 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> vector_derivative f (at x) = f'" |
61245 | 2283 |
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
|
2284 |
|
61104
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2285 |
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
|
2286 |
by (simp add: vector_derivative_at) |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2287 |
|
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2288 |
lemma vector_derivative_minus_at [simp]: |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2289 |
"f differentiable at a |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2290 |
\<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
|
2291 |
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
|
2292 |
|
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2293 |
lemma vector_derivative_add_at [simp]: |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2294 |
"\<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
|
2295 |
\<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
|
2296 |
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
|
2297 |
|
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2298 |
lemma vector_derivative_diff_at [simp]: |
3c2d4636cebc
new lemmas about vector_derivative, complex numbers, paths, etc.
paulson
parents:
61076
diff
changeset
|
2299 |
"\<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
|
2300 |
\<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
|
2301 |
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
|
2302 |
|
61204 | 2303 |
lemma vector_derivative_mult_at [simp]: |
2304 |
fixes f g :: "real \<Rightarrow> 'a :: real_normed_algebra" |
|
2305 |
shows "\<lbrakk>f differentiable at a; g differentiable at a\<rbrakk> |
|
2306 |
\<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" |
|
2307 |
by (simp add: vector_derivative_at has_vector_derivative_mult vector_derivative_works [symmetric]) |
|
2308 |
||
2309 |
lemma vector_derivative_scaleR_at [simp]: |
|
2310 |
"\<lbrakk>f differentiable at a; g differentiable at a\<rbrakk> |
|
2311 |
\<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" |
|
2312 |
apply (rule vector_derivative_at) |
|
2313 |
apply (rule has_vector_derivative_scaleR) |
|
2314 |
apply (auto simp: vector_derivative_works has_vector_derivative_def has_field_derivative_def mult_commute_abs) |
|
2315 |
done |
|
2316 |
||
44123 | 2317 |
lemma vector_derivative_within_closed_interval: |
61245 | 2318 |
assumes ab: "a < b" "x \<in> cbox a b" |
2319 |
assumes f: "(f has_vector_derivative f') (at x within cbox a b)" |
|
56188 | 2320 |
shows "vector_derivative f (at x within cbox a b) = f'" |
61245 | 2321 |
by (intro vector_derivative_unique_within_closed_interval[OF ab _ f] |
2322 |
vector_derivative_works[THEN iffD1] differentiableI_vector) |
|
2323 |
fact |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2324 |
|
53781 | 2325 |
lemma has_vector_derivative_within_subset: |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2326 |
"(f has_vector_derivative f') (at x within s) \<Longrightarrow> t \<subseteq> s \<Longrightarrow> (f has_vector_derivative f') (at x within t)" |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2327 |
by (auto simp: has_vector_derivative_def intro: has_derivative_within_subset) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2328 |
|
44123 | 2329 |
lemma has_vector_derivative_at_within: |
2330 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f') (at x within s)" |
|
2331 |
unfolding has_vector_derivative_def |
|
45031 | 2332 |
by (rule has_derivative_at_within) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2333 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2334 |
lemma has_vector_derivative_transform_within: |
53781 | 2335 |
assumes "0 < d" |
2336 |
and "x \<in> s" |
|
2337 |
and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
|
44123 | 2338 |
assumes "(f has_vector_derivative f') (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
|
2339 |
shows "(g has_vector_derivative f') (at x within s)" |
53781 | 2340 |
using assms |
2341 |
unfolding has_vector_derivative_def |
|
44123 | 2342 |
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
|
2343 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2344 |
lemma has_vector_derivative_transform_at: |
53781 | 2345 |
assumes "0 < d" |
2346 |
and "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" |
|
2347 |
and "(f has_vector_derivative f') (at x)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2348 |
shows "(g has_vector_derivative f') (at x)" |
53781 | 2349 |
using assms |
2350 |
unfolding has_vector_derivative_def |
|
44123 | 2351 |
by (rule has_derivative_transform_at) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2352 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2353 |
lemma has_vector_derivative_transform_within_open: |
53781 | 2354 |
assumes "open s" |
2355 |
and "x \<in> s" |
|
2356 |
and "\<forall>y\<in>s. f y = g y" |
|
2357 |
and "(f has_vector_derivative f') (at x)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2358 |
shows "(g has_vector_derivative f') (at x)" |
53781 | 2359 |
using assms |
2360 |
unfolding has_vector_derivative_def |
|
44123 | 2361 |
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
|
2362 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2363 |
lemma vector_diff_chain_at: |
44123 | 2364 |
assumes "(f has_vector_derivative f') (at x)" |
53781 | 2365 |
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
|
2366 |
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x)" |
53781 | 2367 |
using assms(2) |
2368 |
unfolding has_vector_derivative_def |
|
2369 |
apply - |
|
2370 |
apply (drule diff_chain_at[OF assms(1)[unfolded has_vector_derivative_def]]) |
|
2371 |
apply (simp only: o_def real_scaleR_def scaleR_scaleR) |
|
2372 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2373 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2374 |
lemma vector_diff_chain_within: |
44123 | 2375 |
assumes "(f has_vector_derivative f') (at x within s)" |
53781 | 2376 |
and "(g has_vector_derivative g') (at (f x) within f ` s)" |
2377 |
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x within s)" |
|
2378 |
using assms(2) |
|
2379 |
unfolding has_vector_derivative_def |
|
2380 |
apply - |
|
2381 |
apply (drule diff_chain_within[OF assms(1)[unfolded has_vector_derivative_def]]) |
|
2382 |
apply (simp only: o_def real_scaleR_def scaleR_scaleR) |
|
2383 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2384 |
|
60762 | 2385 |
lemma vector_derivative_const_at [simp]: "vector_derivative (\<lambda>x. c) (at a) = 0" |
2386 |
by (simp add: vector_derivative_at) |
|
2387 |
||
60800
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
2388 |
lemma vector_derivative_at_within_ivl: |
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
2389 |
"(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
|
2390 |
a \<le> x \<Longrightarrow> x \<le> b \<Longrightarrow> a<b \<Longrightarrow> vector_derivative f (at x within {a..b}) = f'" |
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
2391 |
using has_vector_derivative_at_within vector_derivative_within_closed_interval by fastforce |
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
2392 |
|
61204 | 2393 |
lemma vector_derivative_chain_at: |
2394 |
assumes "f differentiable at x" "(g differentiable at (f x))" |
|
2395 |
shows "vector_derivative (g \<circ> f) (at x) = |
|
2396 |
vector_derivative f (at x) *\<^sub>R vector_derivative g (at (f x))" |
|
2397 |
by (metis vector_diff_chain_at vector_derivative_at vector_derivative_works assms) |
|
2398 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2399 |
end |