| author | wenzelm |
| Fri, 11 Apr 2014 23:26:31 +0200 | |
| changeset 56547 | e9bb73d7b6cf |
| parent 56445 | 82ce19612fe8 |
| child 56541 | 0e3abadbef39 |
| 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 |
|
| 53781 | 6 |
header {* Multivariate calculus in Euclidean space *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
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 |
|
|
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
|
32 |
subsection {* Derivatives *}
|
|
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 |
|
|
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
|
34 |
subsubsection {* Combining theorems. *}
|
|
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 |
|
|
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
|
51 |
subsection {* Derivative with composed bilinear function. *}
|
|
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 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
67 |
text {* These are the only cases we'll care about, probably. *}
|
|
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 |
|
72 |
by (auto simp add: netlimit_within inverse_eq_divide 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 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
79 |
text {* More explicit epsilon-delta forms. *}
|
|
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 |
||
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
124 |
subsubsection {*Caratheodory characterization*}
|
|
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)" |
| 56445 | 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]) |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
136 |
apply (simp add: 1 diff_add_eq_diff_diff 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: |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
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 |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
150 |
show "continuous (at x within s) ?g" using `?lhs` |
|
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 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
162 |
subsubsection {* Limit transformation for derivatives *}
|
|
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 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
196 |
subsection {* Differentiability *}
|
|
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 |
|
| 44123 | 212 |
lemma differentiable_within_open: (* TODO: delete *) |
| 53781 | 213 |
assumes "a \<in> s" |
214 |
and "open s" |
|
215 |
shows "f differentiable (at a within s) \<longleftrightarrow> f differentiable (at a)" |
|
216 |
using assms |
|
217 |
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
|
218 |
|
| 44123 | 219 |
lemma differentiable_on_eq_differentiable_at: |
| 53781 | 220 |
"open s \<Longrightarrow> f differentiable_on s \<longleftrightarrow> (\<forall>x\<in>s. f differentiable at x)" |
| 44123 | 221 |
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
|
222 |
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
|
223 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
224 |
lemma differentiable_transform_within: |
| 53781 | 225 |
assumes "0 < d" |
226 |
and "x \<in> s" |
|
227 |
and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
|
| 44123 | 228 |
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
|
229 |
shows "g differentiable (at x within s)" |
| 53781 | 230 |
using assms(4) |
231 |
unfolding differentiable_def |
|
| 44123 | 232 |
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
|
233 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
234 |
lemma differentiable_transform_at: |
| 53781 | 235 |
assumes "0 < d" |
236 |
and "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" |
|
237 |
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
|
238 |
shows "g differentiable at x" |
| 53781 | 239 |
using assms(3) |
240 |
unfolding differentiable_def |
|
241 |
using has_derivative_transform_at[OF assms(1-2)] |
|
242 |
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
|
243 |
|
| 53781 | 244 |
|
245 |
subsection {* Frechet derivative and Jacobian matrix *}
|
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
246 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
247 |
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
|
248 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
249 |
lemma frechet_derivative_works: |
| 53781 | 250 |
"f differentiable net \<longleftrightarrow> (f has_derivative (frechet_derivative f net)) net" |
251 |
unfolding frechet_derivative_def differentiable_def |
|
252 |
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
|
253 |
|
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
254 |
lemma linear_frechet_derivative: "f differentiable net \<Longrightarrow> linear (frechet_derivative f net)" |
| 44123 | 255 |
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
|
256 |
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
|
257 |
|
| 53781 | 258 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
259 |
subsection {* Differentiability implies continuity *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
260 |
|
| 44123 | 261 |
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
|
262 |
"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
|
263 |
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
|
264 |
|
| 44123 | 265 |
lemma differentiable_imp_continuous_on: |
266 |
"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
|
267 |
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
|
268 |
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
|
269 |
|
| 44123 | 270 |
lemma differentiable_on_subset: |
271 |
"f differentiable_on t \<Longrightarrow> s \<subseteq> t \<Longrightarrow> f differentiable_on s" |
|
| 53781 | 272 |
unfolding differentiable_on_def |
273 |
using differentiable_within_subset |
|
274 |
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
|
275 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
276 |
lemma differentiable_on_empty: "f differentiable_on {}"
|
| 53781 | 277 |
unfolding differentiable_on_def |
278 |
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
|
279 |
|
| 56151 | 280 |
text {* Results about neighborhoods filter. *}
|
281 |
||
282 |
lemma eventually_nhds_metric_le: |
|
283 |
"eventually P (nhds a) = (\<exists>d>0. \<forall>x. dist x a \<le> d \<longrightarrow> P x)" |
|
284 |
unfolding eventually_nhds_metric by (safe, rule_tac x="d / 2" in exI, auto) |
|
285 |
||
286 |
lemma le_nhds: "F \<le> nhds a \<longleftrightarrow> (\<forall>S. open S \<and> a \<in> S \<longrightarrow> eventually (\<lambda>x. x \<in> S) F)" |
|
287 |
unfolding le_filter_def eventually_nhds by (fast elim: eventually_elim1) |
|
288 |
||
289 |
lemma le_nhds_metric: "F \<le> nhds a \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist x a < e) F)" |
|
290 |
unfolding le_filter_def eventually_nhds_metric by (fast elim: eventually_elim1) |
|
291 |
||
292 |
lemma le_nhds_metric_le: "F \<le> nhds a \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist x a \<le> e) F)" |
|
293 |
unfolding le_filter_def eventually_nhds_metric_le by (fast elim: eventually_elim1) |
|
294 |
||
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
295 |
text {* Several results are easier using a "multiplied-out" variant.
|
|
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
296 |
(I got this idea from Dieudonne's proof of the chain rule). *} |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
297 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
298 |
lemma has_derivative_within_alt: |
| 53781 | 299 |
"(f has_derivative f') (at x within s) \<longleftrightarrow> bounded_linear f' \<and> |
300 |
(\<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 | 301 |
unfolding has_derivative_within filterlim_def le_nhds_metric_le eventually_filtermap |
302 |
eventually_at dist_norm diff_add_eq_diff_diff |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
303 |
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
|
304 |
|
| 56320 | 305 |
lemma has_derivative_within_alt2: |
306 |
"(f has_derivative f') (at x within s) \<longleftrightarrow> bounded_linear f' \<and> |
|
307 |
(\<forall>e>0. eventually (\<lambda>y. norm (f y - f x - f' (y - x)) \<le> e * norm (y - x)) (at x within s))" |
|
308 |
unfolding has_derivative_within filterlim_def le_nhds_metric_le eventually_filtermap |
|
309 |
eventually_at dist_norm diff_add_eq_diff_diff |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
310 |
by (force simp add: linear_0 bounded_linear.linear pos_divide_le_eq) |
| 56320 | 311 |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
312 |
lemma has_derivative_at_alt: |
| 53781 | 313 |
"(f has_derivative f') (at x) \<longleftrightarrow> |
314 |
bounded_linear f' \<and> |
|
315 |
(\<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))" |
|
316 |
using has_derivative_within_alt[where s=UNIV] |
|
317 |
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
|
318 |
|
| 53781 | 319 |
|
320 |
subsection {* The chain rule *}
|
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
321 |
|
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
322 |
lemma diff_chain_within[derivative_intros]: |
| 44123 | 323 |
assumes "(f has_derivative f') (at x within s)" |
| 53781 | 324 |
and "(g has_derivative g') (at (f x) within (f ` s))" |
325 |
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
|
326 |
using has_derivative_in_compose[OF assms] |
| 53781 | 327 |
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
|
328 |
|
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
329 |
lemma diff_chain_at[derivative_intros]: |
| 53781 | 330 |
"(f has_derivative f') (at x) \<Longrightarrow> |
331 |
(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
|
332 |
using has_derivative_compose[of f f' x UNIV g g'] |
| 53781 | 333 |
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
|
334 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
335 |
|
| 53781 | 336 |
subsection {* Composition rules stated just for differentiability *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
337 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
338 |
lemma differentiable_chain_at: |
| 53781 | 339 |
"f differentiable (at x) \<Longrightarrow> |
340 |
g differentiable (at (f x)) \<Longrightarrow> (g \<circ> f) differentiable (at x)" |
|
341 |
unfolding differentiable_def |
|
342 |
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
|
343 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
344 |
lemma differentiable_chain_within: |
| 53781 | 345 |
"f differentiable (at x within s) \<Longrightarrow> |
346 |
g differentiable (at(f x) within (f ` s)) \<Longrightarrow> (g \<circ> f) differentiable (at x within s)" |
|
347 |
unfolding differentiable_def |
|
348 |
by (meson diff_chain_within) |
|
349 |
||
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
350 |
|
| 37730 | 351 |
subsection {* Uniqueness of derivative *}
|
352 |
||
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
353 |
|
| 37730 | 354 |
text {*
|
355 |
The general result is a bit messy because we need approachability of the |
|
356 |
limit point from any direction. But OK for nontrivial intervals etc. |
|
357 |
*} |
|
|
51363
d4d00c804645
changed has_derivative_intros into a named theorems collection
hoelzl
parents:
50939
diff
changeset
|
358 |
|
| 44123 | 359 |
lemma frechet_derivative_unique_within: |
360 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
361 |
assumes "(f has_derivative f') (at x within s)" |
|
| 53781 | 362 |
and "(f has_derivative f'') (at x within s)" |
363 |
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 | 364 |
shows "f' = f''" |
| 53781 | 365 |
proof - |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
366 |
note as = assms(1,2)[unfolded has_derivative_def] |
| 44123 | 367 |
then interpret f': bounded_linear f' by auto |
368 |
from as interpret f'': bounded_linear f'' by auto |
|
369 |
have "x islimpt s" unfolding islimpt_approachable |
|
| 53781 | 370 |
proof (rule, rule) |
371 |
fix e :: real |
|
372 |
assume "e > 0" |
|
| 55665 | 373 |
obtain d where "0 < \<bar>d\<bar>" and "\<bar>d\<bar> < e" and "x + d *\<^sub>R (SOME i. i \<in> Basis) \<in> s" |
374 |
using assms(3) SOME_Basis `e>0` by blast |
|
| 53781 | 375 |
then show "\<exists>x'\<in>s. x' \<noteq> x \<and> dist x' x < e" |
376 |
apply (rule_tac x="x + d *\<^sub>R (SOME i. i \<in> Basis)" in bexI) |
|
377 |
unfolding dist_norm |
|
378 |
apply (auto simp: SOME_Basis nonzero_Basis) |
|
379 |
done |
|
| 44123 | 380 |
qed |
| 53781 | 381 |
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
|
382 |
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
|
383 |
by (metis trivial_limit_within) |
| 53781 | 384 |
show ?thesis |
385 |
apply (rule linear_eq_stdbasis) |
|
| 44123 | 386 |
unfolding linear_conv_bounded_linear |
| 53781 | 387 |
apply (rule as(1,2)[THEN conjunct1])+ |
388 |
proof (rule, rule ccontr) |
|
389 |
fix i :: 'a |
|
390 |
assume i: "i \<in> Basis" |
|
391 |
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
|
392 |
assume "f' i \<noteq> f'' i" |
| 53781 | 393 |
then have "e > 0" |
394 |
unfolding e_def by auto |
|
| 55665 | 395 |
obtain d where d: |
396 |
"0 < d" |
|
397 |
"(\<And>xa. xa\<in>s \<longrightarrow> 0 < dist xa x \<and> dist xa x < d \<longrightarrow> |
|
398 |
dist ((f xa - f x - f' (xa - x)) /\<^sub>R norm (xa - x) - |
|
399 |
(f xa - f x - f'' (xa - x)) /\<^sub>R norm (xa - x)) (0 - 0) < e)" |
|
400 |
using tendsto_diff [OF as(1,2)[THEN conjunct2]] |
|
401 |
unfolding * Lim_within |
|
402 |
using `e>0` by blast |
|
403 |
obtain c where c: "0 < \<bar>c\<bar>" "\<bar>c\<bar> < d \<and> x + c *\<^sub>R i \<in> s" |
|
404 |
using assms(3) i d(1) by blast |
|
| 53781 | 405 |
have *: "norm (- ((1 / \<bar>c\<bar>) *\<^sub>R f' (c *\<^sub>R i)) + (1 / \<bar>c\<bar>) *\<^sub>R f'' (c *\<^sub>R i)) = |
406 |
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
|
407 |
unfolding scaleR_right_distrib by auto |
| 53781 | 408 |
also have "\<dots> = norm ((1 / abs c) *\<^sub>R (c *\<^sub>R (- (f' i) + f'' i)))" |
| 44123 | 409 |
unfolding f'.scaleR f''.scaleR |
| 53781 | 410 |
unfolding scaleR_right_distrib scaleR_minus_right |
411 |
by auto |
|
412 |
also have "\<dots> = e" |
|
413 |
unfolding e_def |
|
| 55665 | 414 |
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
|
415 |
using norm_minus_cancel[of "f' i - f'' i"] |
|
54230
b1d955791529
more simplification rules on unary and binary minus
haftmann
parents:
53799
diff
changeset
|
416 |
by auto |
| 53781 | 417 |
finally show False |
418 |
using c |
|
| 55665 | 419 |
using d(2)[of "x + c *\<^sub>R i"] |
| 44123 | 420 |
unfolding dist_norm |
421 |
unfolding f'.scaleR f''.scaleR f'.add f''.add f'.diff f''.diff |
|
422 |
scaleR_scaleR scaleR_right_diff_distrib scaleR_right_distrib |
|
| 53781 | 423 |
using i |
424 |
by (auto simp: inverse_eq_divide) |
|
| 44123 | 425 |
qed |
426 |
qed |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
427 |
|
| 37730 | 428 |
lemma frechet_derivative_unique_at: |
| 53781 | 429 |
"(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
|
430 |
by (rule has_derivative_unique) |
| 41829 | 431 |
|
| 44123 | 432 |
lemma frechet_derivative_unique_within_closed_interval: |
| 56188 | 433 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
| 53781 | 434 |
assumes "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i" |
| 56188 | 435 |
and "x \<in> cbox a b" |
436 |
and "(f has_derivative f' ) (at x within cbox a b)" |
|
437 |
and "(f has_derivative f'') (at x within cbox a b)" |
|
| 44123 | 438 |
shows "f' = f''" |
439 |
apply(rule frechet_derivative_unique_within) |
|
440 |
apply(rule assms(3,4))+ |
|
| 53781 | 441 |
proof (rule, rule, rule) |
442 |
fix e :: real |
|
443 |
fix i :: 'a |
|
444 |
assume "e > 0" and i: "i \<in> Basis" |
|
| 56188 | 445 |
then show "\<exists>d. 0 < \<bar>d\<bar> \<and> \<bar>d\<bar> < e \<and> x + d *\<^sub>R i \<in> cbox a b" |
| 53781 | 446 |
proof (cases "x\<bullet>i = a\<bullet>i") |
447 |
case True |
|
448 |
then show ?thesis |
|
449 |
apply (rule_tac x="(min (b\<bullet>i - a\<bullet>i) e) / 2" in exI) |
|
|
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
|
450 |
using assms(1)[THEN bspec[where x=i]] and `e>0` and assms(2) |
| 56188 | 451 |
unfolding mem_box |
| 53781 | 452 |
using i |
453 |
apply (auto simp add: field_simps inner_simps inner_Basis) |
|
454 |
done |
|
455 |
next |
|
| 56188 | 456 |
note * = assms(2)[unfolded mem_box, THEN bspec, OF i] |
| 53781 | 457 |
case False |
458 |
moreover have "a \<bullet> i < x \<bullet> i" |
|
459 |
using False * by auto |
|
| 44123 | 460 |
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
|
461 |
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 | 462 |
by auto |
| 53781 | 463 |
also have "\<dots> = a\<bullet>i + x\<bullet>i" |
464 |
by auto |
|
465 |
also have "\<dots> \<le> 2 * (x\<bullet>i)" |
|
466 |
using * by auto |
|
467 |
finally have "a \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e \<le> x \<bullet> i * 2" |
|
468 |
by auto |
|
| 44123 | 469 |
} |
| 53781 | 470 |
moreover have "min (x \<bullet> i - a \<bullet> i) e \<ge> 0" |
471 |
using * and `e>0` by auto |
|
472 |
then have "x \<bullet> i * 2 \<le> b \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e" |
|
473 |
using * by auto |
|
| 44123 | 474 |
ultimately show ?thesis |
| 53781 | 475 |
apply (rule_tac x="- (min (x\<bullet>i - a\<bullet>i) e) / 2" in exI) |
|
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
|
476 |
using assms(1)[THEN bspec, OF i] and `e>0` and assms(2) |
| 56188 | 477 |
unfolding mem_box |
| 53781 | 478 |
using i |
479 |
apply (auto simp add: field_simps inner_simps inner_Basis) |
|
480 |
done |
|
| 44123 | 481 |
qed |
482 |
qed |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
483 |
|
| 44123 | 484 |
lemma frechet_derivative_unique_within_open_interval: |
| 56188 | 485 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
486 |
assumes "x \<in> box a b" |
|
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
487 |
and "(f has_derivative f' ) (at x within box a b)" |
|
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
488 |
and "(f has_derivative f'') (at x within box a b)" |
| 37650 | 489 |
shows "f' = f''" |
490 |
proof - |
|
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
491 |
from assms(1) have *: "at x within box a b = at x" |
| 56188 | 492 |
by (metis at_within_interior interior_open open_box) |
| 37650 | 493 |
from assms(2,3) [unfolded *] show "f' = f''" |
494 |
by (rule frechet_derivative_unique_at) |
|
495 |
qed |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
496 |
|
| 37730 | 497 |
lemma frechet_derivative_at: |
| 53781 | 498 |
"(f has_derivative f') (at x) \<Longrightarrow> f' = frechet_derivative f (at x)" |
499 |
apply (rule frechet_derivative_unique_at[of f]) |
|
500 |
apply assumption |
|
501 |
unfolding frechet_derivative_works[symmetric] |
|
502 |
using differentiable_def |
|
503 |
apply auto |
|
504 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
505 |
|
| 56188 | 506 |
lemma frechet_derivative_within_cbox: |
507 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
| 53781 | 508 |
assumes "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i" |
| 56188 | 509 |
and "x \<in> cbox a b" |
510 |
and "(f has_derivative f') (at x within cbox a b)" |
|
511 |
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
|
512 |
using assms |
|
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
513 |
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
|
514 |
|
| 53781 | 515 |
|
516 |
subsection {* The traditional Rolle theorem in one dimension *}
|
|
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
517 |
|
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
518 |
lemma linear_componentwise: |
|
56196
32b7eafc5a52
remove unnecessary finiteness assumptions from lemmas about setsum
huffman
parents:
56193
diff
changeset
|
519 |
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
|
520 |
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
|
521 |
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
|
522 |
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
|
523 |
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
|
524 |
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
|
525 |
then show ?thesis |
|
56196
32b7eafc5a52
remove unnecessary finiteness assumptions from lemmas about setsum
huffman
parents:
56193
diff
changeset
|
526 |
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
|
527 |
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
|
528 |
qed |
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
529 |
|
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
530 |
text {* Derivatives of local minima and maxima are zero. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
531 |
|
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
532 |
lemma has_derivative_local_min: |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
533 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
534 |
assumes deriv: "(f has_derivative f') (at x)" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
535 |
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
|
536 |
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
|
537 |
proof |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
538 |
fix h :: 'a |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
539 |
interpret f': bounded_linear f' |
|
56182
528fae0816ea
update syntax of has_*derivative to infix 50; fixed proofs
hoelzl
parents:
56181
diff
changeset
|
540 |
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
|
541 |
show "f' h = 0" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
542 |
proof (cases "h = 0") |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
543 |
assume "h \<noteq> 0" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
544 |
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
|
545 |
unfolding eventually_at by (force simp: dist_commute) |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
546 |
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
|
547 |
by (intro derivative_eq_intros) auto |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
548 |
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
|
549 |
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
|
550 |
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
|
551 |
unfolding has_field_derivative_def by (simp add: f'.scaleR mult_commute_abs) |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
552 |
moreover have "0 < d / norm h" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
553 |
using d1 and `h \<noteq> 0` by (simp add: divide_pos_pos) |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
554 |
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)" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
555 |
using `h \<noteq> 0` by (auto simp add: d2 dist_norm pos_less_divide_eq) |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
556 |
ultimately show "f' h = 0" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
557 |
by (rule DERIV_local_min) |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
558 |
qed (simp add: f'.zero) |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
559 |
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
|
560 |
|
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
561 |
lemma has_derivative_local_max: |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
562 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
563 |
assumes "(f has_derivative f') (at x)" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
564 |
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
|
565 |
shows "f' = (\<lambda>h. 0)" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
566 |
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
|
567 |
using assms unfolding fun_eq_iff by simp |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
568 |
|
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
569 |
lemma differential_zero_maxmin: |
|
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 "x \<in> s" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
572 |
and "open s" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
573 |
and deriv: "(f has_derivative f') (at x)" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
574 |
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
|
575 |
shows "f' = (\<lambda>v. 0)" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
576 |
using mono |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
577 |
proof |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
578 |
assume "\<forall>y\<in>s. f y \<le> f x" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
579 |
with `x \<in> s` and `open s` have "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
|
580 |
unfolding eventually_at_topological by auto |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
581 |
with deriv show ?thesis |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
582 |
by (rule has_derivative_local_max) |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
583 |
next |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
584 |
assume "\<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
|
585 |
with `x \<in> s` and `open s` have "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
|
586 |
unfolding eventually_at_topological by auto |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
587 |
with deriv show ?thesis |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
588 |
by (rule has_derivative_local_min) |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
589 |
qed |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
590 |
|
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
591 |
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
|
592 |
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
|
593 |
assumes k: "k \<in> Basis" |
| 53781 | 594 |
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
|
595 |
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
|
596 |
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
|
597 |
proof - |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
598 |
let ?f' = "frechet_derivative f (at x)" |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
599 |
have "x \<in> ball x e" using `0 < e` by simp |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
600 |
moreover have "open (ball x e)" by simp |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
601 |
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
|
602 |
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
|
603 |
by (rule bounded_linear.has_derivative) |
|
56133
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
604 |
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
|
605 |
using ball(2) by (rule differential_zero_maxmin) |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
606 |
then show ?thesis |
|
304e37faf1ac
generalization of differential_zero_maxmin to class real_normed_vector
huffman
parents:
56117
diff
changeset
|
607 |
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
|
608 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
609 |
|
|
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
|
610 |
lemma rolle: |
| 53781 | 611 |
fixes f :: "real \<Rightarrow> real" |
612 |
assumes "a < b" |
|
613 |
and "f a = f b" |
|
| 56188 | 614 |
and "continuous_on {a .. b} f"
|
615 |
and "\<forall>x\<in>{a <..< b}. (f has_derivative f' x) (at x)"
|
|
616 |
shows "\<exists>x\<in>{a <..< b}. f' x = (\<lambda>v. 0)"
|
|
| 53781 | 617 |
proof - |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
618 |
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 | 619 |
proof - |
620 |
have "(a + b) / 2 \<in> {a .. b}"
|
|
621 |
using assms(1) by auto |
|
| 56188 | 622 |
then have *: "{a .. b} \<noteq> {}"
|
| 53781 | 623 |
by auto |
| 55665 | 624 |
obtain d where d: |
| 56188 | 625 |
"d \<in>cbox a b" |
626 |
"\<forall>y\<in>cbox a b. f y \<le> f d" |
|
627 |
using continuous_attains_sup[OF compact_Icc * assms(3)] by auto |
|
| 55665 | 628 |
obtain c where c: |
| 56188 | 629 |
"c \<in> cbox a b" |
630 |
"\<forall>y\<in>cbox a b. f c \<le> f y" |
|
631 |
using continuous_attains_inf[OF compact_Icc * assms(3)] by auto |
|
| 44123 | 632 |
show ?thesis |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
633 |
proof (cases "d \<in> box a b \<or> c \<in> box a b") |
| 53781 | 634 |
case True |
635 |
then show ?thesis |
|
| 56188 | 636 |
by (metis c(2) d(2) box_subset_cbox subset_iff) |
| 44123 | 637 |
next |
638 |
def e \<equiv> "(a + b) /2" |
|
| 53781 | 639 |
case False |
640 |
then have "f d = f c" |
|
| 56188 | 641 |
using d c assms(2) by auto |
| 53781 | 642 |
then have "\<And>x. x \<in> {a..b} \<Longrightarrow> f x = f d"
|
643 |
using c d |
|
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
644 |
by force |
| 53781 | 645 |
then show ?thesis |
646 |
apply (rule_tac x=e in bexI) |
|
647 |
unfolding e_def |
|
648 |
using assms(1) |
|
| 56188 | 649 |
apply auto |
| 53781 | 650 |
done |
| 44123 | 651 |
qed |
652 |
qed |
|
| 56188 | 653 |
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)"
|
654 |
by auto |
|
| 53781 | 655 |
then have "f' x = (\<lambda>v. 0)" |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54230
diff
changeset
|
656 |
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
|
657 |
using assms |
| 53781 | 658 |
apply auto |
659 |
done |
|
660 |
then show ?thesis |
|
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
661 |
by (metis x(1)) |
| 44123 | 662 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
663 |
|
| 53781 | 664 |
|
665 |
subsection {* One-dimensional mean value theorem *}
|
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
666 |
|
| 53781 | 667 |
lemma mvt: |
668 |
fixes f :: "real \<Rightarrow> real" |
|
669 |
assumes "a < b" |
|
670 |
and "continuous_on {a..b} f"
|
|
| 44123 | 671 |
assumes "\<forall>x\<in>{a<..<b}. (f has_derivative (f' x)) (at x)"
|
| 53781 | 672 |
shows "\<exists>x\<in>{a<..<b}. f b - f a = (f' x) (b - a)"
|
673 |
proof - |
|
| 56188 | 674 |
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
|
675 |
proof (intro rolle[OF assms(1), of "\<lambda>x. f x - (f b - f a) / (b - a) * x"] ballI) |
| 53781 | 676 |
fix x |
| 56188 | 677 |
assume x: "x \<in> {a <..< b}"
|
| 53781 | 678 |
show "((\<lambda>x. f x - (f b - f a) / (b - a) * x) has_derivative |
679 |
(\<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
|
680 |
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
|
681 |
qed (insert assms(1,2), auto intro!: continuous_intros simp: field_simps) |
| 55665 | 682 |
then obtain x where |
| 56188 | 683 |
"x \<in> {a <..< b}"
|
| 55665 | 684 |
"(\<lambda>xa. f' x xa - (f b - f a) / (b - a) * xa) = (\<lambda>v. 0)" .. |
| 53781 | 685 |
then show ?thesis |
| 56188 | 686 |
by (metis (erased, hide_lams) assms(1) diff_less_iff(1) eq_iff_diff_eq_0 |
687 |
linordered_field_class.sign_simps(41) nonzero_mult_divide_cancel_right not_real_square_gt_zero |
|
688 |
times_divide_eq_left) |
|
| 44123 | 689 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
690 |
|
| 44123 | 691 |
lemma mvt_simple: |
| 53781 | 692 |
fixes f :: "real \<Rightarrow> real" |
693 |
assumes "a < b" |
|
694 |
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
|
695 |
shows "\<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)"
|
| 56264 | 696 |
proof (rule mvt) |
697 |
have "f differentiable_on {a..b}"
|
|
698 |
using assms(2) unfolding differentiable_on_def differentiable_def by fast |
|
699 |
then show "continuous_on {a..b} f"
|
|
700 |
by (rule differentiable_imp_continuous_on) |
|
701 |
show "\<forall>x\<in>{a<..<b}. (f has_derivative f' x) (at x)"
|
|
702 |
proof |
|
703 |
fix x |
|
704 |
assume x: "x \<in> {a <..< b}"
|
|
705 |
show "(f has_derivative f' x) (at x)" |
|
706 |
unfolding at_within_open[OF x open_greaterThanLessThan,symmetric] |
|
707 |
apply (rule has_derivative_within_subset) |
|
708 |
apply (rule assms(2)[rule_format]) |
|
709 |
using x |
|
710 |
apply auto |
|
711 |
done |
|
712 |
qed |
|
713 |
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
|
714 |
|
| 44123 | 715 |
lemma mvt_very_simple: |
| 53781 | 716 |
fixes f :: "real \<Rightarrow> real" |
717 |
assumes "a \<le> b" |
|
| 56188 | 718 |
and "\<forall>x\<in>{a .. b}. (f has_derivative f' x) (at x within {a .. b})"
|
719 |
shows "\<exists>x\<in>{a .. b}. f b - f a = f' x (b - a)"
|
|
| 44123 | 720 |
proof (cases "a = b") |
| 53781 | 721 |
interpret bounded_linear "f' b" |
722 |
using assms(2) assms(1) by auto |
|
723 |
case True |
|
724 |
then show ?thesis |
|
725 |
apply (rule_tac x=a in bexI) |
|
726 |
using assms(2)[THEN bspec[where x=a]] |
|
727 |
unfolding has_derivative_def |
|
728 |
unfolding True |
|
729 |
using zero |
|
730 |
apply auto |
|
731 |
done |
|
732 |
next |
|
733 |
case False |
|
734 |
then show ?thesis |
|
735 |
using mvt_simple[OF _ assms(2)] |
|
736 |
using assms(1) |
|
737 |
by auto |
|
| 44123 | 738 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
739 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
740 |
text {* A nice generalization (see Havin's proof of 5.19 from Rudin's book). *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
741 |
|
| 44123 | 742 |
lemma mvt_general: |
|
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
743 |
fixes f :: "real \<Rightarrow> 'a::real_inner" |
| 53781 | 744 |
assumes "a < b" |
| 56188 | 745 |
and "continuous_on {a .. b} f"
|
| 53781 | 746 |
and "\<forall>x\<in>{a<..<b}. (f has_derivative f'(x)) (at x)"
|
747 |
shows "\<exists>x\<in>{a<..<b}. norm (f b - f a) \<le> norm (f' x (b - a))"
|
|
748 |
proof - |
|
| 56264 | 749 |
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 | 750 |
apply (rule mvt) |
751 |
apply (rule assms(1)) |
|
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56370
diff
changeset
|
752 |
apply (intro continuous_intros assms(2)) |
| 53781 | 753 |
using assms(3) |
| 56264 | 754 |
apply (fast intro: has_derivative_inner_right) |
| 53781 | 755 |
done |
| 55665 | 756 |
then obtain x where x: |
757 |
"x \<in> {a<..<b}"
|
|
| 56264 | 758 |
"(f b - f a) \<bullet> f b - (f b - f a) \<bullet> f a = (f b - f a) \<bullet> f' x (b - a)" .. |
| 53781 | 759 |
show ?thesis |
760 |
proof (cases "f a = f b") |
|
| 36844 | 761 |
case False |
| 53077 | 762 |
have "norm (f b - f a) * norm (f b - f a) = (norm (f b - f a))\<^sup>2" |
| 44123 | 763 |
by (simp add: power2_eq_square) |
| 53781 | 764 |
also have "\<dots> = (f b - f a) \<bullet> (f b - f a)" |
765 |
unfolding power2_norm_eq_inner .. |
|
| 44123 | 766 |
also have "\<dots> = (f b - f a) \<bullet> f' x (b - a)" |
| 56264 | 767 |
using x(2) by (simp only: inner_diff_right) |
| 44123 | 768 |
also have "\<dots> \<le> norm (f b - f a) * norm (f' x (b - a))" |
769 |
by (rule norm_cauchy_schwarz) |
|
| 53781 | 770 |
finally show ?thesis |
771 |
using False x(1) |
|
|
56217
dc429a5b13c4
Some rationalisation of basic lemmas
paulson <lp15@cam.ac.uk>
parents:
56196
diff
changeset
|
772 |
by (auto simp add: mult_left_cancel) |
| 44123 | 773 |
next |
| 53781 | 774 |
case True |
775 |
then show ?thesis |
|
776 |
using assms(1) |
|
777 |
apply (rule_tac x="(a + b) /2" in bexI) |
|
778 |
apply auto |
|
779 |
done |
|
| 44123 | 780 |
qed |
781 |
qed |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
782 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
783 |
text {* Still more general bound theorem. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
784 |
|
| 44123 | 785 |
lemma differentiable_bound: |
|
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
786 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_inner" |
| 53781 | 787 |
assumes "convex s" |
788 |
and "\<forall>x\<in>s. (f has_derivative f' x) (at x within s)" |
|
789 |
and "\<forall>x\<in>s. onorm (f' x) \<le> B" |
|
790 |
and x: "x \<in> s" |
|
791 |
and y: "y \<in> s" |
|
792 |
shows "norm (f x - f y) \<le> B * norm (x - y)" |
|
793 |
proof - |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
794 |
let ?p = "\<lambda>u. x + u *\<^sub>R (y - x)" |
| 53781 | 795 |
have *: "\<And>u. u\<in>{0..1} \<Longrightarrow> x + u *\<^sub>R (y - x) \<in> s"
|
| 44123 | 796 |
using assms(1)[unfolded convex_alt,rule_format,OF x y] |
797 |
unfolding scaleR_left_diff_distrib scaleR_right_diff_distrib |
|
798 |
by (auto simp add: algebra_simps) |
|
| 56188 | 799 |
then have 1: "continuous_on {0 .. 1} (f \<circ> ?p)"
|
| 53781 | 800 |
apply - |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56370
diff
changeset
|
801 |
apply (rule continuous_intros)+ |
| 44123 | 802 |
unfolding continuous_on_eq_continuous_within |
| 53781 | 803 |
apply rule |
804 |
apply (rule differentiable_imp_continuous_within) |
|
805 |
unfolding differentiable_def |
|
806 |
apply (rule_tac x="f' xa" in exI) |
|
807 |
apply (rule has_derivative_within_subset) |
|
808 |
apply (rule assms(2)[rule_format]) |
|
809 |
apply auto |
|
810 |
done |
|
| 56188 | 811 |
have 2: "\<forall>u\<in>{0 <..< 1}.
|
| 53781 | 812 |
((f \<circ> ?p) has_derivative f' (x + u *\<^sub>R (y - x)) \<circ> (\<lambda>u. 0 + u *\<^sub>R (y - x))) (at u)" |
| 44123 | 813 |
proof rule |
814 |
case goal1 |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
815 |
let ?u = "x + u *\<^sub>R (y - x)" |
| 56188 | 816 |
have "(f \<circ> ?p has_derivative (f' ?u) \<circ> (\<lambda>u. 0 + u *\<^sub>R (y - x))) (at u within box 0 1)" |
| 53781 | 817 |
apply (rule diff_chain_within) |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
818 |
apply (rule derivative_intros)+ |
| 53781 | 819 |
apply (rule has_derivative_within_subset) |
820 |
apply (rule assms(2)[rule_format]) |
|
821 |
using goal1 * |
|
822 |
apply auto |
|
823 |
done |
|
824 |
then show ?case |
|
| 56188 | 825 |
by (simp add: has_derivative_within_open[OF goal1 open_greaterThanLessThan]) |
| 44123 | 826 |
qed |
| 55665 | 827 |
obtain u where u: |
828 |
"u \<in> {0<..<1}"
|
|
829 |
"norm ((f \<circ> (\<lambda>u. x + u *\<^sub>R (y - x))) 1 - (f \<circ> (\<lambda>u. x + u *\<^sub>R (y - x))) 0) |
|
830 |
\<le> norm ((f' (x + u *\<^sub>R (y - x)) \<circ> (\<lambda>u. 0 + u *\<^sub>R (y - x))) (1 - 0))" |
|
831 |
using mvt_general[OF zero_less_one 1 2] .. |
|
| 53781 | 832 |
have **: "\<And>x y. x \<in> s \<Longrightarrow> norm (f' x y) \<le> B * norm y" |
833 |
proof - |
|
| 44123 | 834 |
case goal1 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
835 |
have "norm (f' x y) \<le> onorm (f' x) * norm y" |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
836 |
by (rule onorm[OF has_derivative_bounded_linear[OF assms(2)[rule_format,OF goal1]]]) |
| 44123 | 837 |
also have "\<dots> \<le> B * norm y" |
| 53781 | 838 |
apply (rule mult_right_mono) |
| 44123 | 839 |
using assms(3)[rule_format,OF goal1] |
| 53781 | 840 |
apply (auto simp add: field_simps) |
841 |
done |
|
842 |
finally show ?case |
|
843 |
by simp |
|
| 44123 | 844 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
845 |
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 | 846 |
by (auto simp add: norm_minus_commute) |
847 |
also have "\<dots> \<le> norm (f' (x + u *\<^sub>R (y - x)) (y - x))" |
|
848 |
using u by auto |
|
849 |
also have "\<dots> \<le> B * norm(y - x)" |
|
850 |
apply (rule **) |
|
851 |
using * and u |
|
852 |
apply auto |
|
853 |
done |
|
854 |
finally show ?thesis |
|
855 |
by (auto simp add: norm_minus_commute) |
|
| 44123 | 856 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
857 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
858 |
text {* In particular. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
859 |
|
| 44123 | 860 |
lemma has_derivative_zero_constant: |
| 56227 | 861 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_inner" |
| 53781 | 862 |
assumes "convex s" |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
863 |
and "\<And>x. x \<in> s \<Longrightarrow> (f has_derivative (\<lambda>h. 0)) (at x within s)" |
| 44123 | 864 |
shows "\<exists>c. \<forall>x\<in>s. f x = c" |
| 56332 | 865 |
proof - |
866 |
{ fix x y assume "x \<in> s" "y \<in> s"
|
|
867 |
then have "norm (f x - f y) \<le> 0 * norm (x - y)" |
|
868 |
using assms by (intro differentiable_bound[of s]) (auto simp: onorm_zero) |
|
869 |
then have "f x = f y" |
|
870 |
by simp } |
|
| 53781 | 871 |
then show ?thesis |
| 56332 | 872 |
by metis |
| 53781 | 873 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
874 |
|
| 53781 | 875 |
lemma has_derivative_zero_unique: |
| 56227 | 876 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_inner" |
| 53781 | 877 |
assumes "convex s" |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
878 |
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
|
879 |
and "x \<in> s" "y \<in> s" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
880 |
shows "f x = f y" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
881 |
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
|
882 |
|
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
883 |
lemma has_derivative_zero_unique_connected: |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
884 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_inner" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
885 |
assumes "open s" "connected s" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
886 |
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
|
887 |
assumes "x \<in> s" "y \<in> s" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
888 |
shows "f x = f y" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
889 |
proof (rule connected_local_const[where f=f, OF `connected s` `x\<in>s` `y\<in>s`]) |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
890 |
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
|
891 |
proof |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
892 |
fix a assume "a \<in> s" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
893 |
with `open s` obtain e where "0 < e" "ball a e \<subseteq> s" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
894 |
by (rule openE) |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
895 |
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
|
896 |
by (intro has_derivative_zero_constant) |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
897 |
(auto simp: at_within_open[OF _ open_ball] f convex_ball) |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
898 |
with `0<e` have "\<forall>x\<in>ball a e. f a = f x" |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
899 |
by auto |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
900 |
then show "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
|
901 |
using `0<e` unfolding eventually_at_topological |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
902 |
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
|
903 |
qed |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
904 |
qed |
|
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
905 |
|
| 53781 | 906 |
subsection {* Differentiability of inverse function (most basic form) *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
907 |
|
| 44123 | 908 |
lemma has_derivative_inverse_basic: |
| 56226 | 909 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
| 44123 | 910 |
assumes "(f has_derivative f') (at (g y))" |
| 53781 | 911 |
and "bounded_linear g'" |
912 |
and "g' \<circ> f' = id" |
|
913 |
and "continuous (at y) g" |
|
914 |
and "open t" |
|
915 |
and "y \<in> t" |
|
916 |
and "\<forall>z\<in>t. f (g z) = z" |
|
| 44123 | 917 |
shows "(g has_derivative g') (at y)" |
| 53781 | 918 |
proof - |
| 44123 | 919 |
interpret f': bounded_linear f' |
920 |
using assms unfolding has_derivative_def by auto |
|
| 53781 | 921 |
interpret g': bounded_linear g' |
922 |
using assms by auto |
|
| 55665 | 923 |
obtain C where C: "0 < C" "\<And>x. norm (g' x) \<le> norm x * C" |
924 |
using bounded_linear.pos_bounded[OF assms(2)] by blast |
|
| 53781 | 925 |
have lem1: "\<forall>e>0. \<exists>d>0. \<forall>z. |
926 |
norm (z - y) < d \<longrightarrow> norm (g z - g y - g'(z - y)) \<le> e * norm (g z - g y)" |
|
927 |
proof (rule, rule) |
|
| 44123 | 928 |
case goal1 |
| 53781 | 929 |
have *: "e / C > 0" |
930 |
apply (rule divide_pos_pos) |
|
| 55665 | 931 |
using `e > 0` C(1) |
| 53781 | 932 |
apply auto |
933 |
done |
|
| 55665 | 934 |
obtain d0 where d0: |
935 |
"0 < d0" |
|
936 |
"\<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)" |
|
937 |
using assms(1) |
|
938 |
unfolding has_derivative_at_alt |
|
939 |
using * by blast |
|
940 |
obtain d1 where d1: |
|
941 |
"0 < d1" |
|
942 |
"\<forall>x. 0 < dist x y \<and> dist x y < d1 \<longrightarrow> dist (g x) (g y) < d0" |
|
943 |
using assms(4) |
|
944 |
unfolding continuous_at Lim_at |
|
945 |
using d0(1) by blast |
|
946 |
obtain d2 where d2: |
|
947 |
"0 < d2" |
|
948 |
"\<forall>ya. dist ya y < d2 \<longrightarrow> ya \<in> t" |
|
949 |
using assms(5) |
|
950 |
unfolding open_dist |
|
951 |
using assms(6) by blast |
|
952 |
obtain d where d: "0 < d" "d < d1" "d < d2" |
|
953 |
using real_lbound_gt_zero[OF d1(1) d2(1)] by blast |
|
| 53781 | 954 |
then show ?case |
955 |
apply (rule_tac x=d in exI) |
|
956 |
apply rule |
|
957 |
defer |
|
958 |
apply rule |
|
959 |
apply rule |
|
960 |
proof - |
|
961 |
fix z |
|
962 |
assume as: "norm (z - y) < d" |
|
963 |
then have "z \<in> t" |
|
| 44123 | 964 |
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
|
965 |
have "norm (g z - g y - g' (z - y)) \<le> norm (g' (f (g z) - y - f' (g z - g y)))" |
| 44123 | 966 |
unfolding g'.diff f'.diff |
| 53781 | 967 |
unfolding assms(3)[unfolded o_def id_def, THEN fun_cong] |
| 44123 | 968 |
unfolding assms(7)[rule_format,OF `z\<in>t`] |
| 53781 | 969 |
apply (subst norm_minus_cancel[symmetric]) |
970 |
apply auto |
|
971 |
done |
|
972 |
also have "\<dots> \<le> norm (f (g z) - y - f' (g z - g y)) * C" |
|
| 55665 | 973 |
by (rule C(2)) |
| 44123 | 974 |
also have "\<dots> \<le> (e / C) * norm (g z - g y) * C" |
| 53781 | 975 |
apply (rule mult_right_mono) |
| 55665 | 976 |
apply (rule d0(2)[rule_format,unfolded assms(7)[rule_format,OF `y\<in>t`]]) |
| 53781 | 977 |
apply (cases "z = y") |
978 |
defer |
|
| 55665 | 979 |
apply (rule d1(2)[unfolded dist_norm,rule_format]) |
| 53781 | 980 |
using as d C d0 |
981 |
apply auto |
|
982 |
done |
|
| 44123 | 983 |
also have "\<dots> \<le> e * norm (g z - g y)" |
984 |
using C by (auto simp add: field_simps) |
|
985 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (g z - g y)" |
|
986 |
by simp |
|
987 |
qed auto |
|
988 |
qed |
|
| 53781 | 989 |
have *: "(0::real) < 1 / 2" |
990 |
by auto |
|
| 55665 | 991 |
obtain d where d: |
992 |
"0 < d" |
|
993 |
"\<forall>z. norm (z - y) < d \<longrightarrow> norm (g z - g y - g' (z - y)) \<le> 1 / 2 * norm (g z - g y)" |
|
994 |
using lem1 * by blast |
|
995 |
def B \<equiv> "C * 2" |
|
| 53781 | 996 |
have "B > 0" |
997 |
unfolding B_def using C by auto |
|
998 |
have lem2: "\<forall>z. norm(z - y) < d \<longrightarrow> norm (g z - g y) \<le> B * norm (z - y)" |
|
999 |
proof (rule, rule) |
|
1000 |
case goal1 |
|
| 44123 | 1001 |
have "norm (g z - g y) \<le> norm(g' (z - y)) + norm ((g z - g y) - g'(z - y))" |
| 53781 | 1002 |
by (rule norm_triangle_sub) |
1003 |
also have "\<dots> \<le> norm (g' (z - y)) + 1 / 2 * norm (g z - g y)" |
|
1004 |
apply (rule add_left_mono) |
|
1005 |
using d and goal1 |
|
1006 |
apply auto |
|
1007 |
done |
|
| 44123 | 1008 |
also have "\<dots> \<le> norm (z - y) * C + 1 / 2 * norm (g z - g y)" |
| 53781 | 1009 |
apply (rule add_right_mono) |
1010 |
using C |
|
1011 |
apply auto |
|
1012 |
done |
|
1013 |
finally show ?case |
|
1014 |
unfolding B_def |
|
1015 |
by (auto simp add: field_simps) |
|
| 44123 | 1016 |
qed |
| 53781 | 1017 |
show ?thesis |
1018 |
unfolding has_derivative_at_alt |
|
1019 |
apply rule |
|
1020 |
apply (rule assms) |
|
1021 |
apply rule |
|
1022 |
apply rule |
|
1023 |
proof - |
|
1024 |
case goal1 |
|
1025 |
then have *: "e / B >0" |
|
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
1026 |
by (metis `0 < B` divide_pos_pos) |
| 55665 | 1027 |
obtain d' where d': |
1028 |
"0 < d'" |
|
1029 |
"\<forall>z. norm (z - y) < d' \<longrightarrow> norm (g z - g y - g' (z - y)) \<le> e / B * norm (g z - g y)" |
|
1030 |
using lem1 * by blast |
|
1031 |
obtain k where k: "0 < k" "k < d" "k < d'" |
|
1032 |
using real_lbound_gt_zero[OF d(1) d'(1)] by blast |
|
| 44123 | 1033 |
show ?case |
| 53781 | 1034 |
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
|
1035 |
apply auto |
| 53781 | 1036 |
proof - |
1037 |
fix z |
|
1038 |
assume as: "norm (z - y) < k" |
|
1039 |
then have "norm (g z - g y - g' (z - y)) \<le> e / B * norm(g z - g y)" |
|
| 44123 | 1040 |
using d' k by auto |
| 53781 | 1041 |
also have "\<dots> \<le> e * norm (z - y)" |
| 44123 | 1042 |
unfolding times_divide_eq_left pos_divide_le_eq[OF `B>0`] |
| 53781 | 1043 |
using lem2[THEN spec[where x=z]] |
1044 |
using k as using `e > 0` |
|
| 44123 | 1045 |
by (auto simp add: field_simps) |
1046 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (z - y)" |
|
| 53781 | 1047 |
by simp |
1048 |
qed(insert k, auto) |
|
| 44123 | 1049 |
qed |
1050 |
qed |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1051 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1052 |
text {* Simply rewrite that based on the domain point x. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1053 |
|
| 44123 | 1054 |
lemma has_derivative_inverse_basic_x: |
| 56226 | 1055 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
| 53781 | 1056 |
assumes "(f has_derivative f') (at x)" |
1057 |
and "bounded_linear g'" |
|
1058 |
and "g' \<circ> f' = id" |
|
1059 |
and "continuous (at (f x)) g" |
|
1060 |
and "g (f x) = x" |
|
1061 |
and "open t" |
|
1062 |
and "f x \<in> t" |
|
1063 |
and "\<forall>y\<in>t. f (g y) = y" |
|
1064 |
shows "(g has_derivative g') (at (f x))" |
|
1065 |
apply (rule has_derivative_inverse_basic) |
|
1066 |
using assms |
|
1067 |
apply auto |
|
1068 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1069 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1070 |
text {* This is the version in Dieudonne', assuming continuity of f and g. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1071 |
|
| 44123 | 1072 |
lemma has_derivative_inverse_dieudonne: |
| 56226 | 1073 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
| 53781 | 1074 |
assumes "open s" |
1075 |
and "open (f ` s)" |
|
1076 |
and "continuous_on s f" |
|
1077 |
and "continuous_on (f ` s) g" |
|
1078 |
and "\<forall>x\<in>s. g (f x) = x" |
|
1079 |
and "x \<in> s" |
|
1080 |
and "(f has_derivative f') (at x)" |
|
1081 |
and "bounded_linear g'" |
|
1082 |
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
|
1083 |
shows "(g has_derivative g') (at (f x))" |
| 53781 | 1084 |
apply (rule has_derivative_inverse_basic_x[OF assms(7-9) _ _ assms(2)]) |
1085 |
using assms(3-6) |
|
1086 |
unfolding continuous_on_eq_continuous_at[OF assms(1)] continuous_on_eq_continuous_at[OF assms(2)] |
|
1087 |
apply auto |
|
1088 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1089 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1090 |
text {* Here's the simplest way of not assuming much about g. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1091 |
|
| 44123 | 1092 |
lemma has_derivative_inverse: |
| 56226 | 1093 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
| 53781 | 1094 |
assumes "compact s" |
1095 |
and "x \<in> s" |
|
1096 |
and "f x \<in> interior (f ` s)" |
|
1097 |
and "continuous_on s f" |
|
1098 |
and "\<forall>y\<in>s. g (f y) = y" |
|
1099 |
and "(f has_derivative f') (at x)" |
|
1100 |
and "bounded_linear g'" |
|
1101 |
and "g' \<circ> f' = id" |
|
| 44123 | 1102 |
shows "(g has_derivative g') (at (f x))" |
| 53781 | 1103 |
proof - |
1104 |
{
|
|
1105 |
fix y |
|
1106 |
assume "y \<in> interior (f ` s)" |
|
1107 |
then obtain x where "x \<in> s" and *: "y = f x" |
|
1108 |
unfolding image_iff |
|
1109 |
using interior_subset |
|
1110 |
by auto |
|
1111 |
have "f (g y) = y" |
|
1112 |
unfolding * and assms(5)[rule_format,OF `x\<in>s`] .. |
|
| 44123 | 1113 |
} note * = this |
1114 |
show ?thesis |
|
| 53781 | 1115 |
apply (rule has_derivative_inverse_basic_x[OF assms(6-8)]) |
1116 |
apply (rule continuous_on_interior[OF _ assms(3)]) |
|
1117 |
apply (rule continuous_on_inv[OF assms(4,1)]) |
|
1118 |
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
|
1119 |
apply (metis *) |
| 53781 | 1120 |
done |
| 44123 | 1121 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1122 |
|
| 53781 | 1123 |
|
1124 |
subsection {* Proving surjectivity via Brouwer fixpoint theorem *}
|
|
|
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 brouwer_surjective: |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1127 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
| 53781 | 1128 |
assumes "compact t" |
1129 |
and "convex t" |
|
1130 |
and "t \<noteq> {}"
|
|
1131 |
and "continuous_on t f" |
|
1132 |
and "\<forall>x\<in>s. \<forall>y\<in>t. x + (y - f y) \<in> t" |
|
1133 |
and "x \<in> s" |
|
| 44123 | 1134 |
shows "\<exists>y\<in>t. f y = x" |
| 53781 | 1135 |
proof - |
1136 |
have *: "\<And>x y. f y = x \<longleftrightarrow> x + (y - f y) = y" |
|
1137 |
by (auto simp add: algebra_simps) |
|
| 44123 | 1138 |
show ?thesis |
1139 |
unfolding * |
|
| 53781 | 1140 |
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
|
1141 |
apply (rule continuous_intros assms)+ |
| 53781 | 1142 |
using assms(4-6) |
1143 |
apply auto |
|
1144 |
done |
|
| 44123 | 1145 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1146 |
|
| 44123 | 1147 |
lemma brouwer_surjective_cball: |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1148 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
| 53781 | 1149 |
assumes "e > 0" |
1150 |
and "continuous_on (cball a e) f" |
|
1151 |
and "\<forall>x\<in>s. \<forall>y\<in>cball a e. x + (y - f y) \<in> cball a e" |
|
1152 |
and "x \<in> s" |
|
| 44123 | 1153 |
shows "\<exists>y\<in>cball a e. f y = x" |
| 53781 | 1154 |
apply (rule brouwer_surjective) |
1155 |
apply (rule compact_cball convex_cball)+ |
|
1156 |
unfolding cball_eq_empty |
|
1157 |
using assms |
|
1158 |
apply auto |
|
1159 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1160 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1161 |
text {* See Sussmann: "Multidifferential calculus", Theorem 2.1.1 *}
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1162 |
|
| 44123 | 1163 |
lemma sussmann_open_mapping: |
| 56227 | 1164 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::euclidean_space" |
| 53781 | 1165 |
assumes "open s" |
1166 |
and "continuous_on s f" |
|
1167 |
and "x \<in> s" |
|
1168 |
and "(f has_derivative f') (at x)" |
|
1169 |
and "bounded_linear g'" "f' \<circ> g' = id" |
|
1170 |
and "t \<subseteq> s" |
|
1171 |
and "x \<in> interior t" |
|
| 44123 | 1172 |
shows "f x \<in> interior (f ` t)" |
| 53781 | 1173 |
proof - |
1174 |
interpret f': bounded_linear f' |
|
1175 |
using assms |
|
1176 |
unfolding has_derivative_def |
|
1177 |
by auto |
|
1178 |
interpret g': bounded_linear g' |
|
1179 |
using assms |
|
1180 |
by auto |
|
| 55665 | 1181 |
obtain B where B: "0 < B" "\<forall>x. norm (g' x) \<le> norm x * B" |
1182 |
using bounded_linear.pos_bounded[OF assms(5)] by blast |
|
| 53781 | 1183 |
then have *: "1 / (2 * B) > 0" |
1184 |
by (auto intro!: divide_pos_pos) |
|
| 55665 | 1185 |
obtain e0 where e0: |
1186 |
"0 < e0" |
|
1187 |
"\<forall>y. norm (y - x) < e0 \<longrightarrow> norm (f y - f x - f' (y - x)) \<le> 1 / (2 * B) * norm (y - x)" |
|
1188 |
using assms(4) |
|
1189 |
unfolding has_derivative_at_alt |
|
1190 |
using * by blast |
|
1191 |
obtain e1 where e1: "0 < e1" "cball x e1 \<subseteq> t" |
|
1192 |
using assms(8) |
|
1193 |
unfolding mem_interior_cball |
|
1194 |
by blast |
|
| 53781 | 1195 |
have *: "0 < e0 / B" "0 < e1 / B" |
1196 |
apply (rule_tac[!] divide_pos_pos) |
|
1197 |
using e0 e1 B |
|
1198 |
apply auto |
|
1199 |
done |
|
| 55665 | 1200 |
obtain e where e: "0 < e" "e < e0 / B" "e < e1 / B" |
1201 |
using real_lbound_gt_zero[OF *] by blast |
|
| 53781 | 1202 |
have "\<forall>z\<in>cball (f x) (e / 2). \<exists>y\<in>cball (f x) e. f (x + g' (y - f x)) = z" |
1203 |
apply rule |
|
1204 |
apply (rule brouwer_surjective_cball[where s="cball (f x) (e/2)"]) |
|
1205 |
prefer 3 |
|
1206 |
apply rule |
|
1207 |
apply rule |
|
| 44123 | 1208 |
proof- |
1209 |
show "continuous_on (cball (f x) e) (\<lambda>y. f (x + g' (y - f x)))" |
|
1210 |
unfolding g'.diff |
|
| 53781 | 1211 |
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
|
1212 |
apply (rule continuous_intros linear_continuous_on[OF assms(5)])+ |
| 53781 | 1213 |
apply (rule continuous_on_subset[OF assms(2)]) |
1214 |
apply rule |
|
1215 |
apply (unfold image_iff) |
|
1216 |
apply (erule bexE) |
|
| 44123 | 1217 |
proof- |
| 53781 | 1218 |
fix y z |
1219 |
assume as: "y \<in>cball (f x) e" "z = x + (g' y - g' (f x))" |
|
| 44123 | 1220 |
have "dist x z = norm (g' (f x) - g' y)" |
1221 |
unfolding as(2) and dist_norm by auto |
|
1222 |
also have "\<dots> \<le> norm (f x - y) * B" |
|
| 53781 | 1223 |
unfolding g'.diff[symmetric] |
1224 |
using B |
|
1225 |
by auto |
|
| 44123 | 1226 |
also have "\<dots> \<le> e * B" |
| 53781 | 1227 |
using as(1)[unfolded mem_cball dist_norm] |
1228 |
using B |
|
1229 |
by auto |
|
1230 |
also have "\<dots> \<le> e1" |
|
1231 |
using e |
|
1232 |
unfolding less_divide_eq |
|
1233 |
using B |
|
1234 |
by auto |
|
1235 |
finally have "z \<in> cball x e1" |
|
1236 |
unfolding mem_cball |
|
1237 |
by force |
|
1238 |
then show "z \<in> s" |
|
1239 |
using e1 assms(7) by auto |
|
| 44123 | 1240 |
qed |
1241 |
next |
|
| 53781 | 1242 |
fix y z |
1243 |
assume as: "y \<in> cball (f x) (e / 2)" "z \<in> cball (f x) e" |
|
1244 |
have "norm (g' (z - f x)) \<le> norm (z - f x) * B" |
|
1245 |
using B by auto |
|
1246 |
also have "\<dots> \<le> e * B" |
|
1247 |
apply (rule mult_right_mono) |
|
| 44123 | 1248 |
using as(2)[unfolded mem_cball dist_norm] and B |
| 53781 | 1249 |
unfolding norm_minus_commute |
1250 |
apply auto |
|
1251 |
done |
|
1252 |
also have "\<dots> < e0" |
|
1253 |
using e and B |
|
1254 |
unfolding less_divide_eq |
|
1255 |
by auto |
|
1256 |
finally have *: "norm (x + g' (z - f x) - x) < e0" |
|
1257 |
by auto |
|
1258 |
have **: "f x + f' (x + g' (z - f x) - x) = z" |
|
1259 |
using assms(6)[unfolded o_def id_def,THEN cong] |
|
1260 |
by auto |
|
1261 |
have "norm (f x - (y + (z - f (x + g' (z - f x))))) \<le> |
|
1262 |
norm (f (x + g' (z - f x)) - z) + norm (f x - y)" |
|
| 44123 | 1263 |
using norm_triangle_ineq[of "f (x + g'(z - f x)) - z" "f x - y"] |
1264 |
by (auto simp add: algebra_simps) |
|
1265 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + norm (f x - y)" |
|
| 55665 | 1266 |
using e0(2)[rule_format, OF *] |
| 53781 | 1267 |
unfolding algebra_simps ** |
1268 |
by auto |
|
| 44123 | 1269 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + e/2" |
| 53781 | 1270 |
using as(1)[unfolded mem_cball dist_norm] |
1271 |
by auto |
|
| 44123 | 1272 |
also have "\<dots> \<le> 1 / (B * 2) * B * norm (z - f x) + e/2" |
| 53781 | 1273 |
using * and B |
1274 |
by (auto simp add: field_simps) |
|
1275 |
also have "\<dots> \<le> 1 / 2 * norm (z - f x) + e/2" |
|
1276 |
by auto |
|
1277 |
also have "\<dots> \<le> e/2 + e/2" |
|
1278 |
apply (rule add_right_mono) |
|
| 44123 | 1279 |
using as(2)[unfolded mem_cball dist_norm] |
| 53781 | 1280 |
unfolding norm_minus_commute |
1281 |
apply auto |
|
1282 |
done |
|
| 44123 | 1283 |
finally show "y + (z - f (x + g' (z - f x))) \<in> cball (f x) e" |
| 53781 | 1284 |
unfolding mem_cball dist_norm |
1285 |
by auto |
|
1286 |
qed (insert e, auto) note lem = this |
|
1287 |
show ?thesis |
|
1288 |
unfolding mem_interior |
|
1289 |
apply (rule_tac x="e/2" in exI) |
|
1290 |
apply rule |
|
1291 |
apply (rule divide_pos_pos) |
|
1292 |
prefer 3 |
|
| 44123 | 1293 |
proof |
| 53781 | 1294 |
fix y |
1295 |
assume "y \<in> ball (f x) (e / 2)" |
|
1296 |
then have *: "y \<in> cball (f x) (e / 2)" |
|
1297 |
by auto |
|
| 55665 | 1298 |
obtain z where z: "z \<in> cball (f x) e" "f (x + g' (z - f x)) = y" |
1299 |
using lem * by blast |
|
| 53781 | 1300 |
then have "norm (g' (z - f x)) \<le> norm (z - f x) * B" |
1301 |
using B |
|
1302 |
by (auto simp add: field_simps) |
|
| 44123 | 1303 |
also have "\<dots> \<le> e * B" |
| 53781 | 1304 |
apply (rule mult_right_mono) |
1305 |
using z(1) |
|
1306 |
unfolding mem_cball dist_norm norm_minus_commute |
|
1307 |
using B |
|
1308 |
apply auto |
|
1309 |
done |
|
1310 |
also have "\<dots> \<le> e1" |
|
1311 |
using e B unfolding less_divide_eq by auto |
|
1312 |
finally have "x + g'(z - f x) \<in> t" |
|
1313 |
apply - |
|
| 55665 | 1314 |
apply (rule e1(2)[unfolded subset_eq,rule_format]) |
| 53781 | 1315 |
unfolding mem_cball dist_norm |
1316 |
apply auto |
|
1317 |
done |
|
1318 |
then show "y \<in> f ` t" |
|
1319 |
using z by auto |
|
1320 |
qed (insert e, auto) |
|
| 44123 | 1321 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1322 |
|
| 53799 | 1323 |
text {* Hence the following eccentric variant of the inverse function theorem.
|
1324 |
This has no continuity assumptions, but we do need the inverse function. |
|
1325 |
We could put @{text "f' \<circ> g = I"} but this happens to fit with the minimal linear
|
|
1326 |
algebra theory I've set up so far. *} |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1327 |
|
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1328 |
(* 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
|
1329 |
|
| 53781 | 1330 |
lemma right_inverse_linear: |
1331 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
|
1332 |
assumes lf: "linear f" |
|
1333 |
and gf: "f \<circ> g = id" |
|
1334 |
shows "linear g" |
|
1335 |
proof - |
|
1336 |
from gf have fi: "surj f" |
|
1337 |
by (auto simp add: surj_def o_def id_def) metis |
|
1338 |
from linear_surjective_isomorphism[OF lf fi] |
|
1339 |
obtain h:: "'a \<Rightarrow> 'a" where h: "linear h" "\<forall>x. h (f x) = x" "\<forall>x. f (h x) = x" |
|
1340 |
by blast |
|
1341 |
have "h = g" |
|
1342 |
apply (rule ext) |
|
1343 |
using gf h(2,3) |
|
1344 |
apply (simp add: o_def id_def fun_eq_iff) |
|
1345 |
apply metis |
|
1346 |
done |
|
1347 |
with h(1) show ?thesis by blast |
|
1348 |
qed |
|
1349 |
||
| 44123 | 1350 |
lemma has_derivative_inverse_strong: |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1351 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
| 53781 | 1352 |
assumes "open s" |
1353 |
and "x \<in> s" |
|
1354 |
and "continuous_on s f" |
|
1355 |
and "\<forall>x\<in>s. g (f x) = x" |
|
1356 |
and "(f has_derivative f') (at x)" |
|
1357 |
and "f' \<circ> g' = id" |
|
| 44123 | 1358 |
shows "(g has_derivative g') (at (f x))" |
| 53781 | 1359 |
proof - |
1360 |
have linf: "bounded_linear f'" |
|
| 44123 | 1361 |
using assms(5) unfolding has_derivative_def by auto |
| 53781 | 1362 |
then have ling: "bounded_linear g'" |
1363 |
unfolding linear_conv_bounded_linear[symmetric] |
|
1364 |
apply - |
|
1365 |
apply (rule right_inverse_linear) |
|
1366 |
using assms(6) |
|
1367 |
apply auto |
|
1368 |
done |
|
1369 |
moreover have "g' \<circ> f' = id" |
|
1370 |
using assms(6) linf ling |
|
1371 |
unfolding linear_conv_bounded_linear[symmetric] |
|
1372 |
using linear_inverse_left |
|
1373 |
by auto |
|
1374 |
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
|
1375 |
apply clarify |
| 53781 | 1376 |
apply (rule sussmann_open_mapping) |
1377 |
apply (rule assms ling)+ |
|
1378 |
apply auto |
|
1379 |
done |
|
1380 |
have "continuous (at (f x)) g" |
|
1381 |
unfolding continuous_at Lim_at |
|
1382 |
proof (rule, rule) |
|
1383 |
fix e :: real |
|
1384 |
assume "e > 0" |
|
1385 |
then have "f x \<in> interior (f ` (ball x e \<inter> s))" |
|
1386 |
using *[rule_format,of "ball x e \<inter> s"] `x \<in> s` |
|
1387 |
by (auto simp add: interior_open[OF open_ball] interior_open[OF assms(1)]) |
|
| 55665 | 1388 |
then obtain d where d: "0 < d" "ball (f x) d \<subseteq> f ` (ball x e \<inter> s)" |
1389 |
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
|
1390 |
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 | 1391 |
apply (rule_tac x=d in exI) |
1392 |
apply rule |
|
| 55665 | 1393 |
apply (rule d(1)) |
| 53781 | 1394 |
apply rule |
1395 |
apply rule |
|
1396 |
proof - |
|
1397 |
case goal1 |
|
1398 |
then have "g y \<in> g ` f ` (ball x e \<inter> s)" |
|
| 55665 | 1399 |
using d(2)[unfolded subset_eq,THEN bspec[where x=y]] |
| 53781 | 1400 |
by (auto simp add: dist_commute) |
1401 |
then have "g y \<in> ball x e \<inter> s" |
|
1402 |
using assms(4) by auto |
|
1403 |
then show "dist (g y) (g (f x)) < e" |
|
1404 |
using assms(4)[rule_format,OF `x \<in> s`] |
|
| 44123 | 1405 |
by (auto simp add: dist_commute) |
1406 |
qed |
|
1407 |
qed |
|
1408 |
moreover have "f x \<in> interior (f ` s)" |
|
| 53781 | 1409 |
apply (rule sussmann_open_mapping) |
1410 |
apply (rule assms ling)+ |
|
1411 |
using interior_open[OF assms(1)] and `x \<in> s` |
|
1412 |
apply auto |
|
1413 |
done |
|
| 44123 | 1414 |
moreover have "\<And>y. y \<in> interior (f ` s) \<Longrightarrow> f (g y) = y" |
| 53781 | 1415 |
proof - |
1416 |
case goal1 |
|
1417 |
then have "y \<in> f ` s" |
|
1418 |
using interior_subset by auto |
|
| 55665 | 1419 |
then obtain z where "z \<in> s" "y = f z" unfolding image_iff .. |
| 53781 | 1420 |
then show ?case |
1421 |
using assms(4) by auto |
|
| 44123 | 1422 |
qed |
|
55970
6d123f0ae358
Some new proofs. Tidying up, esp to remove "apply rule".
paulson <lp15@cam.ac.uk>
parents:
55665
diff
changeset
|
1423 |
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
|
1424 |
by (metis has_derivative_inverse_basic_x open_interior) |
| 44123 | 1425 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1426 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1427 |
text {* A rewrite based on the other domain. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1428 |
|
| 44123 | 1429 |
lemma has_derivative_inverse_strong_x: |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1430 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
| 53781 | 1431 |
assumes "open s" |
1432 |
and "g y \<in> s" |
|
1433 |
and "continuous_on s f" |
|
1434 |
and "\<forall>x\<in>s. g (f x) = x" |
|
1435 |
and "(f has_derivative f') (at (g y))" |
|
1436 |
and "f' \<circ> g' = id" |
|
1437 |
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
|
1438 |
shows "(g has_derivative g') (at y)" |
| 53781 | 1439 |
using has_derivative_inverse_strong[OF assms(1-6)] |
1440 |
unfolding assms(7) |
|
1441 |
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
|
1442 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1443 |
text {* On a region. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1444 |
|
| 44123 | 1445 |
lemma has_derivative_inverse_on: |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55970
diff
changeset
|
1446 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
| 53781 | 1447 |
assumes "open s" |
1448 |
and "\<forall>x\<in>s. (f has_derivative f'(x)) (at x)" |
|
1449 |
and "\<forall>x\<in>s. g (f x) = x" |
|
1450 |
and "f' x \<circ> g' x = id" |
|
1451 |
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
|
1452 |
shows "(g has_derivative g'(x)) (at (f x))" |
| 53781 | 1453 |
apply (rule has_derivative_inverse_strong[where g'="g' x" and f=f]) |
1454 |
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
|
1455 |
unfolding continuous_on_eq_continuous_at[OF assms(1)] |
| 53781 | 1456 |
apply rule |
1457 |
apply (rule differentiable_imp_continuous_within) |
|
1458 |
unfolding differentiable_def |
|
1459 |
using assms |
|
1460 |
apply auto |
|
1461 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1462 |
|
| 44123 | 1463 |
text {* Invertible derivative continous at a point implies local
|
1464 |
injectivity. It's only for this we need continuity of the derivative, |
|
1465 |
except of course if we want the fact that the inverse derivative is |
|
1466 |
also continuous. So if we know for some other reason that the inverse |
|
1467 |
function exists, it's OK. *} |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1468 |
|
| 53781 | 1469 |
lemma bounded_linear_sub: "bounded_linear f \<Longrightarrow> bounded_linear g \<Longrightarrow> bounded_linear (\<lambda>x. f x - g x)" |
| 44123 | 1470 |
using bounded_linear_add[of f "\<lambda>x. - g x"] bounded_linear_minus[of g] |
1471 |
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
|
1472 |
|
| 44123 | 1473 |
lemma has_derivative_locally_injective: |
| 53781 | 1474 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'm::euclidean_space" |
1475 |
assumes "a \<in> s" |
|
1476 |
and "open s" |
|
1477 |
and "bounded_linear g'" |
|
1478 |
and "g' \<circ> f' a = id" |
|
1479 |
and "\<forall>x\<in>s. (f has_derivative f' x) (at x)" |
|
1480 |
and "\<forall>e>0. \<exists>d>0. \<forall>x. dist a x < d \<longrightarrow> onorm (\<lambda>v. f' x v - f' a v) < e" |
|
1481 |
obtains t where "a \<in> t" "open t" "\<forall>x\<in>t. \<forall>x'\<in>t. f x' = f x \<longrightarrow> x' = x" |
|
1482 |
proof - |
|
1483 |
interpret bounded_linear g' |
|
1484 |
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
|
1485 |
note f'g' = assms(4)[unfolded id_def o_def,THEN cong] |
| 53781 | 1486 |
have "g' (f' a (\<Sum>Basis)) = (\<Sum>Basis)" "(\<Sum>Basis) \<noteq> (0::'n)" |
1487 |
defer |
|
1488 |
apply (subst euclidean_eq_iff) |
|
1489 |
using f'g' |
|
1490 |
apply auto |
|
1491 |
done |
|
1492 |
then have *: "0 < onorm g'" |
|
|
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
1493 |
unfolding onorm_pos_lt[OF assms(3)] |
| 53781 | 1494 |
by fastforce |
1495 |
def k \<equiv> "1 / onorm g' / 2" |
|
1496 |
have *: "k > 0" |
|
1497 |
unfolding k_def using * by auto |
|
| 55665 | 1498 |
obtain d1 where d1: |
1499 |
"0 < d1" |
|
1500 |
"\<And>x. dist a x < d1 \<Longrightarrow> onorm (\<lambda>v. f' x v - f' a v) < k" |
|
1501 |
using assms(6) * by blast |
|
| 53781 | 1502 |
from `open s` obtain d2 where "d2 > 0" "ball a d2 \<subseteq> s" |
1503 |
using `a\<in>s` .. |
|
1504 |
obtain d2 where "d2 > 0" "ball a d2 \<subseteq> s" |
|
1505 |
using assms(2,1) .. |
|
| 55665 | 1506 |
obtain d2 where d2: "0 < d2" "ball a d2 \<subseteq> s" |
1507 |
using assms(2) |
|
1508 |
unfolding open_contains_ball |
|
1509 |
using `a\<in>s` by blast |
|
1510 |
obtain d where d: "0 < d" "d < d1" "d < d2" |
|
1511 |
using real_lbound_gt_zero[OF d1(1) d2(1)] by blast |
|
| 44123 | 1512 |
show ?thesis |
1513 |
proof |
|
| 53781 | 1514 |
show "a \<in> ball a d" |
1515 |
using d by auto |
|
| 44123 | 1516 |
show "\<forall>x\<in>ball a d. \<forall>x'\<in>ball a d. f x' = f x \<longrightarrow> x' = x" |
1517 |
proof (intro strip) |
|
| 53781 | 1518 |
fix x y |
1519 |
assume as: "x \<in> ball a d" "y \<in> ball a d" "f x = f y" |
|
1520 |
def ph \<equiv> "\<lambda>w. w - g' (f w - f x)" |
|
| 44123 | 1521 |
have ph':"ph = g' \<circ> (\<lambda>w. f' a w - (f w - f x))" |
| 53781 | 1522 |
unfolding ph_def o_def |
1523 |
unfolding diff |
|
1524 |
using f'g' |
|
| 44123 | 1525 |
by (auto simp add: algebra_simps) |
| 53781 | 1526 |
have "norm (ph x - ph y) \<le> (1 / 2) * norm (x - y)" |
1527 |
apply (rule differentiable_bound[OF convex_ball _ _ as(1-2), where f'="\<lambda>x v. v - g'(f' x v)"]) |
|
1528 |
apply (rule_tac[!] ballI) |
|
1529 |
proof - |
|
1530 |
fix u |
|
1531 |
assume u: "u \<in> ball a d" |
|
1532 |
then have "u \<in> s" |
|
1533 |
using d d2 by auto |
|
1534 |
have *: "(\<lambda>v. v - g' (f' u v)) = g' \<circ> (\<lambda>w. f' a w - f' u w)" |
|
1535 |
unfolding o_def and diff |
|
1536 |
using f'g' by auto |
|
| 41958 | 1537 |
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
|
1538 |
unfolding ph' * |
| 53781 | 1539 |
apply (simp add: comp_def) |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
1540 |
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
|
1541 |
apply (rule derivative_intros) |
| 53781 | 1542 |
defer |
1543 |
apply (rule has_derivative_sub[where g'="\<lambda>x.0",unfolded diff_0_right]) |
|
1544 |
apply (rule has_derivative_at_within) |
|
1545 |
using assms(5) and `u \<in> s` `a \<in> s` |
|
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1546 |
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
|
1547 |
done |
| 53781 | 1548 |
have **: "bounded_linear (\<lambda>x. f' u x - f' a x)" "bounded_linear (\<lambda>x. f' a x - f' u x)" |
1549 |
apply (rule_tac[!] bounded_linear_sub) |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1550 |
apply (rule_tac[!] has_derivative_bounded_linear) |
| 53781 | 1551 |
using assms(5) `u \<in> s` `a \<in> s` |
1552 |
apply auto |
|
1553 |
done |
|
| 44123 | 1554 |
have "onorm (\<lambda>v. v - g' (f' u v)) \<le> onorm g' * onorm (\<lambda>w. f' a w - f' u w)" |
| 53781 | 1555 |
unfolding * |
1556 |
apply (rule onorm_compose) |
|
1557 |
apply (rule assms(3) **)+ |
|
1558 |
done |
|
| 44123 | 1559 |
also have "\<dots> \<le> onorm g' * k" |
| 53781 | 1560 |
apply (rule mult_left_mono) |
| 55665 | 1561 |
using d1(2)[of u] |
|
56223
7696903b9e61
generalize theory of operator norms to work with class real_normed_vector
huffman
parents:
56217
diff
changeset
|
1562 |
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
|
1563 |
using d and u and onorm_pos_le[OF assms(3)] |
| 53781 | 1564 |
apply (auto simp add: algebra_simps) |
1565 |
done |
|
1566 |
also have "\<dots> \<le> 1 / 2" |
|
1567 |
unfolding k_def by auto |
|
1568 |
finally show "onorm (\<lambda>v. v - g' (f' u v)) \<le> 1 / 2" . |
|
| 44123 | 1569 |
qed |
1570 |
moreover have "norm (ph y - ph x) = norm (y - x)" |
|
| 53781 | 1571 |
apply (rule arg_cong[where f=norm]) |
1572 |
unfolding ph_def |
|
1573 |
using diff |
|
1574 |
unfolding as |
|
1575 |
apply auto |
|
1576 |
done |
|
1577 |
ultimately show "x = y" |
|
1578 |
unfolding norm_minus_commute by auto |
|
| 44123 | 1579 |
qed |
1580 |
qed auto |
|
1581 |
qed |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1582 |
|
| 53781 | 1583 |
|
1584 |
subsection {* Uniformly convergent sequence of derivatives *}
|
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1585 |
|
| 44123 | 1586 |
lemma has_derivative_sequence_lipschitz_lemma: |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1587 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::real_inner" |
| 44123 | 1588 |
assumes "convex s" |
| 53781 | 1589 |
and "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
1590 |
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
|
1591 |
and "0 \<le> e" |
| 53781 | 1592 |
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)" |
1593 |
proof rule+ |
|
1594 |
fix m n x y |
|
1595 |
assume as: "N \<le> m" "N \<le> n" "x \<in> s" "y \<in> s" |
|
1596 |
show "norm ((f m x - f n x) - (f m y - f n y)) \<le> 2 * e * norm (x - y)" |
|
1597 |
apply (rule differentiable_bound[where f'="\<lambda>x h. f' m x h - f' n x h", OF assms(1) _ _ as(3-4)]) |
|
1598 |
apply (rule_tac[!] ballI) |
|
1599 |
proof - |
|
1600 |
fix x |
|
1601 |
assume "x \<in> s" |
|
| 44123 | 1602 |
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)" |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1603 |
by (rule derivative_intros assms(2)[rule_format] `x\<in>s`)+ |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1604 |
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
|
1605 |
proof (rule onorm_bound) |
| 53781 | 1606 |
fix h |
| 44123 | 1607 |
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)" |
1608 |
using norm_triangle_ineq[of "f' m x h - g' x h" "- f' n x h + g' x h"] |
|
| 53781 | 1609 |
unfolding norm_minus_commute |
1610 |
by (auto simp add: algebra_simps) |
|
1611 |
also have "\<dots> \<le> e * norm h + e * norm h" |
|
1612 |
using assms(3)[rule_format,OF `N \<le> m` `x \<in> s`, of h] |
|
1613 |
using assms(3)[rule_format,OF `N \<le> n` `x \<in> s`, of h] |
|
1614 |
by (auto simp add: field_simps) |
|
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1615 |
finally show "norm (f' m x h - f' n x h) \<le> 2 * e * norm h" |
| 53781 | 1616 |
by auto |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1617 |
qed (simp add: `0 \<le> e`) |
| 44123 | 1618 |
qed |
1619 |
qed |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1620 |
|
| 44123 | 1621 |
lemma has_derivative_sequence_lipschitz: |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1622 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::real_inner" |
| 44123 | 1623 |
assumes "convex s" |
| 53781 | 1624 |
and "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
1625 |
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" |
|
1626 |
shows "\<forall>e>0. \<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>y\<in>s. |
|
1627 |
norm ((f m x - f n x) - (f m y - f n y)) \<le> e * norm (x - y)" |
|
1628 |
proof (rule, rule) |
|
1629 |
case goal1 have *: "2 * (1/2* e) = e" "1/2 * e >0" |
|
1630 |
using `e > 0` by auto |
|
| 55665 | 1631 |
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" |
1632 |
using assms(3) *(2) by blast |
|
| 53781 | 1633 |
then show ?case |
1634 |
apply (rule_tac x=N in exI) |
|
1635 |
apply (rule has_derivative_sequence_lipschitz_lemma[where e="1/2 *e", unfolded *]) |
|
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1636 |
using assms `e > 0` |
| 53781 | 1637 |
apply auto |
1638 |
done |
|
| 44123 | 1639 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1640 |
|
| 44123 | 1641 |
lemma has_derivative_sequence: |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1642 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::{real_inner, complete_space}"
|
| 44123 | 1643 |
assumes "convex s" |
| 53781 | 1644 |
and "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
1645 |
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" |
|
1646 |
and "x0 \<in> s" |
|
1647 |
and "((\<lambda>n. f n x0) ---> l) sequentially" |
|
1648 |
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)" |
|
1649 |
proof - |
|
1650 |
have lem1: "\<forall>e>0. \<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>y\<in>s. |
|
1651 |
norm ((f m x - f n x) - (f m y - f n y)) \<le> e * norm (x - y)" |
|
| 56320 | 1652 |
using assms(1,2,3) by (rule has_derivative_sequence_lipschitz) |
| 44123 | 1653 |
have "\<exists>g. \<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially" |
| 53781 | 1654 |
apply (rule bchoice) |
1655 |
unfolding convergent_eq_cauchy |
|
| 44123 | 1656 |
proof |
| 53781 | 1657 |
fix x |
1658 |
assume "x \<in> s" |
|
1659 |
show "Cauchy (\<lambda>n. f n x)" |
|
1660 |
proof (cases "x = x0") |
|
1661 |
case True |
|
1662 |
then show ?thesis |
|
1663 |
using LIMSEQ_imp_Cauchy[OF assms(5)] by auto |
|
| 44123 | 1664 |
next |
| 53781 | 1665 |
case False |
1666 |
show ?thesis |
|
1667 |
unfolding Cauchy_def |
|
1668 |
proof (rule, rule) |
|
1669 |
fix e :: real |
|
1670 |
assume "e > 0" |
|
1671 |
then have *: "e / 2 > 0" "e / 2 / norm (x - x0) > 0" |
|
| 44123 | 1672 |
using False by (auto intro!: divide_pos_pos) |
| 55665 | 1673 |
obtain M where M: "\<forall>m\<ge>M. \<forall>n\<ge>M. dist (f m x0) (f n x0) < e / 2" |
1674 |
using LIMSEQ_imp_Cauchy[OF assms(5)] |
|
1675 |
unfolding Cauchy_def |
|
1676 |
using *(1) by blast |
|
1677 |
obtain N where N: |
|
1678 |
"\<forall>m\<ge>N. \<forall>n\<ge>N. |
|
1679 |
\<forall>xa\<in>s. \<forall>y\<in>s. norm (f m xa - f n xa - (f m y - f n y)) \<le> |
|
1680 |
e / 2 / norm (x - x0) * norm (xa - y)" |
|
1681 |
using lem1 *(2) by blast |
|
| 44123 | 1682 |
show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (f m x) (f n x) < e" |
| 53781 | 1683 |
apply (rule_tac x="max M N" in exI) |
1684 |
proof rule+ |
|
1685 |
fix m n |
|
1686 |
assume as: "max M N \<le>m" "max M N\<le>n" |
|
1687 |
have "dist (f m x) (f n x) \<le> |
|
1688 |
norm (f m x0 - f n x0) + norm (f m x - f n x - (f m x0 - f n x0))" |
|
1689 |
unfolding dist_norm |
|
1690 |
by (rule norm_triangle_sub) |
|
| 44123 | 1691 |
also have "\<dots> \<le> norm (f m x0 - f n x0) + e / 2" |
1692 |
using N[rule_format,OF _ _ `x\<in>s` `x0\<in>s`, of m n] and as and False |
|
1693 |
by auto |
|
1694 |
also have "\<dots> < e / 2 + e / 2" |
|
| 53781 | 1695 |
apply (rule add_strict_right_mono) |
1696 |
using as and M[rule_format] |
|
1697 |
unfolding dist_norm |
|
1698 |
apply auto |
|
1699 |
done |
|
1700 |
finally show "dist (f m x) (f n x) < e" |
|
1701 |
by auto |
|
| 44123 | 1702 |
qed |
1703 |
qed |
|
1704 |
qed |
|
1705 |
qed |
|
| 55665 | 1706 |
then obtain g where g: "\<forall>x\<in>s. (\<lambda>n. f n x) ----> g x" .. |
| 53781 | 1707 |
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)" |
1708 |
proof (rule, rule) |
|
1709 |
fix e :: real |
|
1710 |
assume *: "e > 0" |
|
| 55665 | 1711 |
obtain N where |
1712 |
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)" |
|
1713 |
using lem1 * by blast |
|
| 44123 | 1714 |
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 | 1715 |
apply (rule_tac x=N in exI) |
1716 |
proof rule+ |
|
1717 |
fix n x y |
|
1718 |
assume as: "N \<le> n" "x \<in> s" "y \<in> s" |
|
| 56320 | 1719 |
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" |
1720 |
by (intro tendsto_intros g[rule_format] as) |
|
1721 |
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 | 1722 |
unfolding eventually_sequentially |
| 53781 | 1723 |
apply (rule_tac x=N in exI) |
1724 |
apply rule |
|
1725 |
apply rule |
|
1726 |
proof - |
|
1727 |
fix m |
|
1728 |
assume "N \<le> m" |
|
1729 |
then show "norm (f n x - f n y - (f m x - f m y)) \<le> e * norm (x - y)" |
|
| 44123 | 1730 |
using N[rule_format, of n m x y] and as |
1731 |
by (auto simp add: algebra_simps) |
|
1732 |
qed |
|
| 56320 | 1733 |
ultimately show "norm (f n x - f n y - (g x - g y)) \<le> e * norm (x - y)" |
1734 |
by (rule tendsto_ge_const[OF trivial_limit_sequentially]) |
|
| 44123 | 1735 |
qed |
1736 |
qed |
|
| 56320 | 1737 |
have "\<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially \<and> (g has_derivative g' x) (at x within s)" |
1738 |
unfolding has_derivative_within_alt2 |
|
1739 |
proof (intro ballI conjI) |
|
| 53781 | 1740 |
fix x |
1741 |
assume "x \<in> s" |
|
| 56320 | 1742 |
then show "((\<lambda>n. f n x) ---> g x) sequentially" |
1743 |
by (simp add: g) |
|
| 53781 | 1744 |
have lem3: "\<forall>u. ((\<lambda>n. f' n x u) ---> g' x u) sequentially" |
| 56320 | 1745 |
unfolding filterlim_def le_nhds_metric_le eventually_filtermap dist_norm |
1746 |
proof (intro allI impI) |
|
| 53781 | 1747 |
fix u |
1748 |
fix e :: real |
|
1749 |
assume "e > 0" |
|
| 56320 | 1750 |
show "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e) sequentially" |
| 53781 | 1751 |
proof (cases "u = 0") |
1752 |
case True |
|
| 56320 | 1753 |
have "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e * norm u) sequentially" |
1754 |
using assms(3)[folded eventually_sequentially] and `0 < e` and `x \<in> s` |
|
1755 |
by (fast elim: eventually_elim1) |
|
1756 |
then show ?thesis |
|
1757 |
using `u = 0` and `0 < e` by (auto elim: eventually_elim1) |
|
| 44123 | 1758 |
next |
| 53781 | 1759 |
case False |
| 56320 | 1760 |
with `0 < e` have "0 < e / norm u" |
1761 |
by (simp add: divide_pos_pos) |
|
1762 |
then have "eventually (\<lambda>n. norm (f' n x u - g' x u) \<le> e / norm u * norm u) sequentially" |
|
1763 |
using assms(3)[folded eventually_sequentially] and `x \<in> s` |
|
1764 |
by (fast elim: eventually_elim1) |
|
1765 |
then show ?thesis |
|
1766 |
using `u \<noteq> 0` by simp |
|
| 44123 | 1767 |
qed |
1768 |
qed |
|
1769 |
show "bounded_linear (g' x)" |
|
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1770 |
proof |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1771 |
fix x' y z :: 'a |
| 53781 | 1772 |
fix c :: real |
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1773 |
note lin = assms(2)[rule_format,OF `x\<in>s`,THEN has_derivative_bounded_linear] |
| 44123 | 1774 |
show "g' x (c *\<^sub>R x') = c *\<^sub>R g' x x'" |
| 53781 | 1775 |
apply (rule tendsto_unique[OF trivial_limit_sequentially]) |
1776 |
apply (rule lem3[rule_format]) |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1777 |
unfolding lin[THEN bounded_linear.linear, THEN linear_cmul] |
| 53781 | 1778 |
apply (intro tendsto_intros) |
1779 |
apply (rule lem3[rule_format]) |
|
1780 |
done |
|
| 44123 | 1781 |
show "g' x (y + z) = g' x y + g' x z" |
| 53781 | 1782 |
apply (rule tendsto_unique[OF trivial_limit_sequentially]) |
1783 |
apply (rule lem3[rule_format]) |
|
|
56369
2704ca85be98
moved generic theorems from Complex_Analysis_Basic; fixed some theorem names
hoelzl
parents:
56332
diff
changeset
|
1784 |
unfolding lin[THEN bounded_linear.linear, THEN linear_add] |
| 53781 | 1785 |
apply (rule tendsto_add) |
1786 |
apply (rule lem3[rule_format])+ |
|
1787 |
done |
|
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1788 |
obtain N where N: "\<forall>h. norm (f' N x h - g' x h) \<le> 1 * norm h" |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1789 |
using assms(3) `x \<in> s` by (fast intro: zero_less_one order_refl) |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1790 |
have "bounded_linear (f' N x)" |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1791 |
using assms(2) `x \<in> s` by (fast dest: has_derivative_bounded_linear) |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1792 |
from bounded_linear.bounded [OF this] |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1793 |
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
|
1794 |
{
|
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1795 |
fix h |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1796 |
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
|
1797 |
by simp |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1798 |
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
|
1799 |
by (rule norm_triangle_ineq4) |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1800 |
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
|
1801 |
using N K by (fast intro: add_mono) |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1802 |
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
|
1803 |
by (simp add: ring_distribs) |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1804 |
} |
|
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1805 |
then show "\<exists>K. \<forall>h. norm (g' x h) \<le> norm h * K" by fast |
| 44123 | 1806 |
qed |
| 56320 | 1807 |
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 | 1808 |
proof (rule, rule) |
1809 |
case goal1 |
|
1810 |
have *: "e / 3 > 0" |
|
1811 |
using goal1 by auto |
|
| 55665 | 1812 |
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" |
1813 |
using assms(3) * by blast |
|
1814 |
obtain N2 where |
|
1815 |
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)" |
|
1816 |
using lem2 * by blast |
|
| 56320 | 1817 |
let ?N = "max N1 N2" |
1818 |
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)" |
|
1819 |
using assms(2)[unfolded has_derivative_within_alt2] and `x \<in> s` and * by fast |
|
1820 |
moreover have "eventually (\<lambda>y. y \<in> s) (at x within s)" |
|
1821 |
unfolding eventually_at by (fast intro: zero_less_one) |
|
1822 |
ultimately show ?case |
|
1823 |
proof (rule eventually_elim2) |
|
| 53781 | 1824 |
fix y |
| 56320 | 1825 |
assume "y \<in> s" |
1826 |
assume "norm (f ?N y - f ?N x - f' ?N x (y - x)) \<le> e / 3 * norm (y - x)" |
|
1827 |
moreover have "norm (g y - g x - (f ?N y - f ?N x)) \<le> e / 3 * norm (y - x)" |
|
1828 |
using N2[rule_format, OF _ `y \<in> s` `x \<in> s`] |
|
1829 |
by (simp add: norm_minus_commute) |
|
1830 |
ultimately have "norm (g y - g x - f' ?N x (y - x)) \<le> 2 * e / 3 * norm (y - x)" |
|
| 44123 | 1831 |
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 | 1832 |
by (auto simp add: algebra_simps) |
| 44123 | 1833 |
moreover |
1834 |
have " norm (f' ?N x (y - x) - g' x (y - x)) \<le> e / 3 * norm (y - x)" |
|
| 53781 | 1835 |
using N1 `x \<in> s` by auto |
| 41958 | 1836 |
ultimately show "norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)" |
| 44123 | 1837 |
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 | 1838 |
by (auto simp add: algebra_simps) |
| 44123 | 1839 |
qed |
1840 |
qed |
|
1841 |
qed |
|
| 56320 | 1842 |
then show ?thesis by fast |
| 44123 | 1843 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1844 |
|
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1845 |
text {* Can choose to line up antiderivatives if we want. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1846 |
|
| 44123 | 1847 |
lemma has_antiderivative_sequence: |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1848 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::{real_inner, complete_space}"
|
| 44123 | 1849 |
assumes "convex s" |
| 53781 | 1850 |
and "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
1851 |
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" |
|
1852 |
shows "\<exists>g. \<forall>x\<in>s. (g has_derivative g' x) (at x within s)" |
|
1853 |
proof (cases "s = {}")
|
|
1854 |
case False |
|
1855 |
then obtain a where "a \<in> s" |
|
1856 |
by auto |
|
1857 |
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" |
|
1858 |
by auto |
|
| 44123 | 1859 |
show ?thesis |
| 53781 | 1860 |
apply (rule *) |
1861 |
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
|
1862 |
apply (metis assms(2) has_derivative_add_const) |
| 53781 | 1863 |
apply (rule `a \<in> s`) |
1864 |
apply auto |
|
1865 |
done |
|
| 44123 | 1866 |
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
|
1867 |
|
| 44123 | 1868 |
lemma has_antiderivative_limit: |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1869 |
fixes g' :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> 'b::{real_inner, complete_space}"
|
| 44123 | 1870 |
assumes "convex s" |
| 53781 | 1871 |
and "\<forall>e>0. \<exists>f f'. \<forall>x\<in>s. |
1872 |
(f has_derivative (f' x)) (at x within s) \<and> (\<forall>h. norm (f' x h - g' x h) \<le> e * norm h)" |
|
1873 |
shows "\<exists>g. \<forall>x\<in>s. (g has_derivative g' x) (at x within s)" |
|
1874 |
proof - |
|
1875 |
have *: "\<forall>n. \<exists>f f'. \<forall>x\<in>s. |
|
1876 |
(f has_derivative (f' x)) (at x within s) \<and> |
|
1877 |
(\<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
|
1878 |
by (metis assms(2) inverse_positive_iff_positive real_of_nat_Suc_gt_zero) |
| 55665 | 1879 |
obtain f where |
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
1880 |
*: "\<forall>x. \<exists>f'. \<forall>xa\<in>s. (f x has_derivative f' xa) (at xa within s) \<and> |
| 55665 | 1881 |
(\<forall>h. norm (f' xa h - g' xa h) \<le> inverse (real (Suc x)) * norm h)" |
1882 |
using *[THEN choice] .. |
|
1883 |
obtain f' where |
|
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
1884 |
f: "\<forall>x. \<forall>xa\<in>s. (f x has_derivative f' x xa) (at xa within s) \<and> |
| 55665 | 1885 |
(\<forall>h. norm (f' x xa h - g' xa h) \<le> inverse (real (Suc x)) * norm h)" |
1886 |
using *[THEN choice] .. |
|
| 53781 | 1887 |
show ?thesis |
1888 |
apply (rule has_antiderivative_sequence[OF assms(1), of f f']) |
|
1889 |
defer |
|
1890 |
apply rule |
|
1891 |
apply rule |
|
1892 |
proof - |
|
1893 |
fix e :: real |
|
1894 |
assume "e > 0" |
|
| 55665 | 1895 |
obtain N where N: "inverse (real (Suc N)) < e" |
1896 |
using reals_Archimedean[OF `e>0`] .. |
|
| 44123 | 1897 |
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 | 1898 |
apply (rule_tac x=N in exI) |
1899 |
proof rule+ |
|
| 44123 | 1900 |
case goal1 |
| 53781 | 1901 |
have *: "inverse (real (Suc n)) \<le> e" |
1902 |
apply (rule order_trans[OF _ N[THEN less_imp_le]]) |
|
1903 |
using goal1(1) |
|
1904 |
apply (auto simp add: field_simps) |
|
1905 |
done |
|
| 44123 | 1906 |
show ?case |
| 53781 | 1907 |
using f[rule_format,THEN conjunct2,OF goal1(2), of n, THEN spec[where x=h]] |
1908 |
apply (rule order_trans) |
|
1909 |
using N * |
|
1910 |
apply (cases "h = 0") |
|
1911 |
apply auto |
|
1912 |
done |
|
| 44123 | 1913 |
qed |
| 53781 | 1914 |
qed (insert f, auto) |
| 44123 | 1915 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1916 |
|
| 53781 | 1917 |
|
1918 |
subsection {* Differentiation of a series *}
|
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1919 |
|
| 44123 | 1920 |
lemma has_derivative_series: |
|
56271
61b1e3d88e91
generalized theorems about derivatives of limits of sequences of funtions
huffman
parents:
56264
diff
changeset
|
1921 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector \<Rightarrow> 'b::{real_inner, complete_space}"
|
| 44123 | 1922 |
assumes "convex s" |
| 56183 | 1923 |
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
|
1924 |
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 | 1925 |
and "x \<in> s" |
| 56183 | 1926 |
and "(\<lambda>n. f n x) sums l" |
1927 |
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)" |
|
1928 |
unfolding sums_def |
|
| 53781 | 1929 |
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
|
1930 |
apply (metis assms(2) has_derivative_setsum) |
| 53781 | 1931 |
using assms(4-5) |
| 56183 | 1932 |
unfolding sums_def |
| 53781 | 1933 |
apply auto |
1934 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1935 |
|
| 53781 | 1936 |
text {* Considering derivative @{typ "real \<Rightarrow> 'b\<Colon>real_normed_vector"} as a vector. *}
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1937 |
|
|
56181
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
1938 |
lemma has_field_derivative_iff_has_vector_derivative: |
|
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
1939 |
"(f has_field_derivative y) F \<longleftrightarrow> (f has_vector_derivative y) F" |
|
2aa0b19e74f3
unify syntax for has_derivative and differentiable
hoelzl
parents:
56151
diff
changeset
|
1940 |
unfolding has_vector_derivative_def has_field_derivative_def real_scaleR_def mult_commute_abs .. |
|
50418
bd68cf816dd3
fundamental theorem of calculus for the Lebesgue integral
hoelzl
parents:
46898
diff
changeset
|
1941 |
|
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1942 |
lemma has_vector_derivative_const[simp, derivative_intros]: "((\<lambda>x. c) has_vector_derivative 0) net" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1943 |
by (auto simp: has_vector_derivative_def) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1944 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1945 |
lemma has_vector_derivative_id[simp, derivative_intros]: "((\<lambda>x. x) has_vector_derivative 1) net" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1946 |
by (auto simp: has_vector_derivative_def) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1947 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1948 |
lemma has_vector_derivative_neg[derivative_intros]: |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1949 |
"(f has_vector_derivative f') net \<Longrightarrow> ((\<lambda>x. - f x) has_vector_derivative (- f')) net" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1950 |
by (auto simp: has_vector_derivative_def) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1951 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1952 |
lemma has_vector_derivative_add[derivative_intros]: |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1953 |
"(f has_vector_derivative f') net \<Longrightarrow> (g has_vector_derivative g') net \<Longrightarrow> |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1954 |
((\<lambda>x. f x + g x) has_vector_derivative (f' + g')) net" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1955 |
by (auto simp: has_vector_derivative_def scaleR_right_distrib) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1956 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1957 |
lemma has_vector_derivative_sub[derivative_intros]: |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1958 |
"(f has_vector_derivative f') net \<Longrightarrow> (g has_vector_derivative g') net \<Longrightarrow> |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1959 |
((\<lambda>x. f x - g x) has_vector_derivative (f' - g')) net" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1960 |
by (auto simp: has_vector_derivative_def scaleR_diff_right) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1961 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1962 |
lemma (in bounded_linear) has_vector_derivative: |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1963 |
assumes "(g has_vector_derivative g') (at x within s)" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1964 |
shows "((\<lambda>x. f (g x)) has_vector_derivative f g') (at x within s)" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1965 |
using has_derivative[OF assms[unfolded has_vector_derivative_def]] |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1966 |
by (simp add: has_vector_derivative_def scaleR) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1967 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1968 |
lemma (in bounded_bilinear) has_vector_derivative: |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1969 |
assumes "(f has_vector_derivative f') (at x within s)" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1970 |
and "(g has_vector_derivative g') (at x within s)" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1971 |
shows "((\<lambda>x. f x ** g x) has_vector_derivative (f x ** g' + f' ** g x)) (at x within s)" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1972 |
using FDERIV[OF assms(1-2)[unfolded has_vector_derivative_def]] |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1973 |
by (simp add: has_vector_derivative_def scaleR_right scaleR_left scaleR_right_distrib) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1974 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1975 |
lemma has_vector_derivative_scaleR[derivative_intros]: |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1976 |
"(f has_field_derivative f') (at x within s) \<Longrightarrow> (g has_vector_derivative g') (at x within s) \<Longrightarrow> |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1977 |
((\<lambda>x. f x *\<^sub>R g x) has_vector_derivative (f x *\<^sub>R g' + f' *\<^sub>R g x)) (at x within s)" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1978 |
unfolding has_field_derivative_iff_has_vector_derivative |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1979 |
by (rule bounded_bilinear.has_vector_derivative[OF bounded_bilinear_scaleR]) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1980 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1981 |
lemma has_vector_derivative_mult[derivative_intros]: |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1982 |
"(f has_vector_derivative f') (at x within s) \<Longrightarrow> (g has_vector_derivative g') (at x within s) \<Longrightarrow> |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1983 |
((\<lambda>x. f x * g x) has_vector_derivative (f x * g' + f' * g x :: 'a :: real_normed_algebra)) (at x within s)" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1984 |
by (rule bounded_bilinear.has_vector_derivative[OF bounded_bilinear_mult]) |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1985 |
|
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
1986 |
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
|
1987 |
|
| 37730 | 1988 |
lemma vector_derivative_unique_at: |
1989 |
assumes "(f has_vector_derivative f') (at x)" |
|
| 53781 | 1990 |
and "(f has_vector_derivative f'') (at x)" |
| 37730 | 1991 |
shows "f' = f''" |
| 53781 | 1992 |
proof - |
| 37730 | 1993 |
have "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
1994 |
using assms [unfolded has_vector_derivative_def] |
|
1995 |
by (rule frechet_derivative_unique_at) |
|
| 53781 | 1996 |
then show ?thesis |
1997 |
unfolding fun_eq_iff by auto |
|
| 37730 | 1998 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1999 |
|
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2000 |
lemma vector_derivative_works: |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2001 |
"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
|
2002 |
(is "?l = ?r") |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2003 |
proof |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2004 |
assume ?l |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2005 |
obtain f' where f': "(f has_derivative f') net" |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2006 |
using `?l` unfolding differentiable_def .. |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2007 |
then interpret bounded_linear f' |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2008 |
by auto |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2009 |
show ?r |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2010 |
unfolding vector_derivative_def has_vector_derivative_def |
|
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2011 |
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
|
2012 |
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
|
2013 |
|
| 44123 | 2014 |
lemma vector_derivative_unique_within_closed_interval: |
| 53781 | 2015 |
assumes "a < b" |
| 56188 | 2016 |
and "x \<in> cbox a b" |
2017 |
assumes "(f has_vector_derivative f') (at x within cbox a b)" |
|
2018 |
assumes "(f has_vector_derivative f'') (at x within cbox a b)" |
|
| 44123 | 2019 |
shows "f' = f''" |
| 53781 | 2020 |
proof - |
2021 |
have *: "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
|
2022 |
apply (rule frechet_derivative_unique_within_closed_interval[of "a" "b"]) |
|
2023 |
using assms(3-)[unfolded has_vector_derivative_def] |
|
2024 |
using assms(1-2) |
|
2025 |
apply auto |
|
2026 |
done |
|
| 44123 | 2027 |
show ?thesis |
| 53781 | 2028 |
proof (rule ccontr) |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53077
diff
changeset
|
2029 |
assume **: "f' \<noteq> f''" |
|
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53077
diff
changeset
|
2030 |
with * have "(\<lambda>x. x *\<^sub>R f') 1 = (\<lambda>x. x *\<^sub>R f'') 1" |
|
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53077
diff
changeset
|
2031 |
by (auto simp: fun_eq_iff) |
|
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53077
diff
changeset
|
2032 |
with ** show False |
|
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53077
diff
changeset
|
2033 |
unfolding o_def by auto |
| 44123 | 2034 |
qed |
2035 |
qed |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2036 |
|
| 37730 | 2037 |
lemma vector_derivative_at: |
| 53781 | 2038 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> vector_derivative f (at x) = f'" |
2039 |
apply (rule vector_derivative_unique_at) |
|
2040 |
defer |
|
2041 |
apply assumption |
|
2042 |
unfolding vector_derivative_works[symmetric] differentiable_def |
|
2043 |
unfolding has_vector_derivative_def |
|
2044 |
apply auto |
|
2045 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2046 |
|
| 44123 | 2047 |
lemma vector_derivative_within_closed_interval: |
| 53781 | 2048 |
assumes "a < b" |
| 56188 | 2049 |
and "x \<in> cbox a b" |
2050 |
assumes "(f has_vector_derivative f') (at x within cbox a b)" |
|
2051 |
shows "vector_derivative f (at x within cbox a b) = f'" |
|
| 53781 | 2052 |
apply (rule vector_derivative_unique_within_closed_interval) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2053 |
using vector_derivative_works[unfolded differentiable_def] |
| 53781 | 2054 |
using assms |
2055 |
apply (auto simp add:has_vector_derivative_def) |
|
2056 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2057 |
|
| 53781 | 2058 |
lemma has_vector_derivative_within_subset: |
|
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
2059 |
"(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
|
2060 |
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
|
2061 |
|
| 44123 | 2062 |
lemma has_vector_derivative_at_within: |
2063 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f') (at x within s)" |
|
2064 |
unfolding has_vector_derivative_def |
|
| 45031 | 2065 |
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
|
2066 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2067 |
lemma has_vector_derivative_transform_within: |
| 53781 | 2068 |
assumes "0 < d" |
2069 |
and "x \<in> s" |
|
2070 |
and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
|
| 44123 | 2071 |
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
|
2072 |
shows "(g has_vector_derivative f') (at x within s)" |
| 53781 | 2073 |
using assms |
2074 |
unfolding has_vector_derivative_def |
|
| 44123 | 2075 |
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
|
2076 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2077 |
lemma has_vector_derivative_transform_at: |
| 53781 | 2078 |
assumes "0 < d" |
2079 |
and "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" |
|
2080 |
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
|
2081 |
shows "(g has_vector_derivative f') (at x)" |
| 53781 | 2082 |
using assms |
2083 |
unfolding has_vector_derivative_def |
|
| 44123 | 2084 |
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
|
2085 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2086 |
lemma has_vector_derivative_transform_within_open: |
| 53781 | 2087 |
assumes "open s" |
2088 |
and "x \<in> s" |
|
2089 |
and "\<forall>y\<in>s. f y = g y" |
|
2090 |
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
|
2091 |
shows "(g has_vector_derivative f') (at x)" |
| 53781 | 2092 |
using assms |
2093 |
unfolding has_vector_derivative_def |
|
| 44123 | 2094 |
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
|
2095 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2096 |
lemma vector_diff_chain_at: |
| 44123 | 2097 |
assumes "(f has_vector_derivative f') (at x)" |
| 53781 | 2098 |
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
|
2099 |
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x)" |
| 53781 | 2100 |
using assms(2) |
2101 |
unfolding has_vector_derivative_def |
|
2102 |
apply - |
|
2103 |
apply (drule diff_chain_at[OF assms(1)[unfolded has_vector_derivative_def]]) |
|
2104 |
apply (simp only: o_def real_scaleR_def scaleR_scaleR) |
|
2105 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2106 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2107 |
lemma vector_diff_chain_within: |
| 44123 | 2108 |
assumes "(f has_vector_derivative f') (at x within s)" |
| 53781 | 2109 |
and "(g has_vector_derivative g') (at (f x) within f ` s)" |
2110 |
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x within s)" |
|
2111 |
using assms(2) |
|
2112 |
unfolding has_vector_derivative_def |
|
2113 |
apply - |
|
2114 |
apply (drule diff_chain_within[OF assms(1)[unfolded has_vector_derivative_def]]) |
|
2115 |
apply (simp only: o_def real_scaleR_def scaleR_scaleR) |
|
2116 |
done |
|
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2117 |
|
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2118 |
end |