author | huffman |
Wed, 17 Aug 2011 15:12:34 -0700 | |
changeset 44262 | 355d5438f5fb |
parent 44140 | 2c10c35dd4be |
child 44282 | f0de18b62d63 |
permissions | -rw-r--r-- |
36350 | 1 |
(* Title: HOL/Multivariate_Analysis/Derivative.thy |
2 |
Author: John Harrison |
|
3 |
Translation from HOL Light: Robert Himmelmann, TU Muenchen |
|
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 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
6 |
header {* Multivariate calculus in Euclidean space. *} |
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 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
12 |
(* Because I do not want to type this all the time *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
13 |
lemmas linear_linear = linear_conv_bounded_linear[THEN sym] |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
14 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
15 |
subsection {* Derivatives *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
16 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
17 |
text {* The definition is slightly tricky since we make it work over |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
18 |
nets of a particular form. This lets us prove theorems generally and use |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
19 |
"at a" or "at a within s" for restriction to a set (1-sided on R etc.) *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
20 |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
43338
diff
changeset
|
21 |
definition has_derivative :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('a filter \<Rightarrow> bool)" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
22 |
(infixl "(has'_derivative)" 12) where |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
23 |
"(f has_derivative f') net \<equiv> bounded_linear f' \<and> ((\<lambda>y. (1 / (norm (y - netlimit net))) *\<^sub>R |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
24 |
(f y - (f (netlimit net) + f'(y - netlimit net)))) ---> 0) net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
25 |
|
44137 | 26 |
lemma derivative_linear[dest]: |
27 |
"(f has_derivative f') net \<Longrightarrow> bounded_linear f'" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
28 |
unfolding has_derivative_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
29 |
|
37730 | 30 |
lemma netlimit_at_vector: |
44137 | 31 |
(* TODO: move *) |
37730 | 32 |
fixes a :: "'a::real_normed_vector" |
33 |
shows "netlimit (at a) = a" |
|
34 |
proof (cases "\<exists>x. x \<noteq> a") |
|
35 |
case True then obtain x where x: "x \<noteq> a" .. |
|
36 |
have "\<not> trivial_limit (at a)" |
|
37 |
unfolding trivial_limit_def eventually_at dist_norm |
|
38 |
apply clarsimp |
|
39 |
apply (rule_tac x="a + scaleR (d / 2) (sgn (x - a))" in exI) |
|
40 |
apply (simp add: norm_sgn sgn_zero_iff x) |
|
41 |
done |
|
42 |
thus ?thesis |
|
43 |
by (rule netlimit_within [of a UNIV, unfolded within_UNIV]) |
|
44 |
qed simp |
|
45 |
||
46 |
lemma FDERIV_conv_has_derivative: |
|
44137 | 47 |
shows "FDERIV f x :> f' = (f has_derivative f') (at x)" |
48 |
unfolding fderiv_def has_derivative_def netlimit_at_vector |
|
49 |
by (simp add: diff_diff_eq Lim_at_zero [where a=x] |
|
50 |
LIM_norm_zero_iff [where 'b='b, symmetric]) |
|
51 |
||
52 |
lemma DERIV_conv_has_derivative: |
|
53 |
"(DERIV f x :> f') = (f has_derivative op * f') (at x)" |
|
54 |
unfolding deriv_fderiv FDERIV_conv_has_derivative |
|
55 |
by (subst mult_commute, rule refl) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
56 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
57 |
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
|
58 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
59 |
lemma has_derivative_within: "(f has_derivative f') (at x within s) \<longleftrightarrow> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
60 |
bounded_linear f' \<and> ((\<lambda>y. (1 / norm(y - x)) *\<^sub>R (f y - (f x + f' (y - x)))) ---> 0) (at x within s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
61 |
unfolding has_derivative_def and Lim by(auto simp add:netlimit_within) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
62 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
63 |
lemma has_derivative_at: "(f has_derivative f') (at x) \<longleftrightarrow> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
64 |
bounded_linear f' \<and> ((\<lambda>y. (1 / (norm(y - x))) *\<^sub>R (f y - (f x + f' (y - x)))) ---> 0) (at x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
65 |
apply(subst within_UNIV[THEN sym]) unfolding has_derivative_within unfolding within_UNIV by auto |
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 {* 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
|
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': |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
70 |
"(f has_derivative f')(at x within s) \<longleftrightarrow> bounded_linear f' \<and> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
71 |
(\<forall>e>0. \<exists>d>0. \<forall>x'\<in>s. 0 < norm(x' - x) \<and> norm(x' - x) < d |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
72 |
\<longrightarrow> norm(f x' - f x - f'(x' - x)) / norm(x' - x) < e)" |
36587 | 73 |
unfolding has_derivative_within Lim_within dist_norm |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
74 |
unfolding diff_0_right 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
|
75 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
76 |
lemma has_derivative_at': |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
77 |
"(f has_derivative f') (at x) \<longleftrightarrow> bounded_linear f' \<and> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
78 |
(\<forall>e>0. \<exists>d>0. \<forall>x'. 0 < norm(x' - x) \<and> norm(x' - x) < d |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
79 |
\<longrightarrow> norm(f x' - f x - f'(x' - x)) / norm(x' - x) < e)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
80 |
apply(subst within_UNIV[THEN sym]) unfolding has_derivative_within' by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
81 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
82 |
lemma has_derivative_at_within: "(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f') (at x within s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
83 |
unfolding has_derivative_within' has_derivative_at' by meson |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
84 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
85 |
lemma has_derivative_within_open: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
86 |
"a \<in> s \<Longrightarrow> open s \<Longrightarrow> ((f has_derivative f') (at a within s) \<longleftrightarrow> (f has_derivative f') (at a))" |
37730 | 87 |
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
|
88 |
|
43338 | 89 |
lemma has_derivative_right: |
90 |
fixes f :: "real \<Rightarrow> real" and y :: "real" |
|
91 |
shows "(f has_derivative (op * y)) (at x within ({x <..} \<inter> I)) \<longleftrightarrow> |
|
92 |
((\<lambda>t. (f x - f t) / (x - t)) ---> y) (at x within ({x <..} \<inter> I))" |
|
93 |
proof - |
|
94 |
have "((\<lambda>t. (f t - (f x + y * (t - x))) / \<bar>t - x\<bar>) ---> 0) (at x within ({x<..} \<inter> I)) \<longleftrightarrow> |
|
95 |
((\<lambda>t. (f t - f x) / (t - x) - y) ---> 0) (at x within ({x<..} \<inter> I))" |
|
96 |
by (intro Lim_cong_within) (auto simp add: divide.diff divide.add) |
|
97 |
also have "\<dots> \<longleftrightarrow> ((\<lambda>t. (f t - f x) / (t - x)) ---> y) (at x within ({x<..} \<inter> I))" |
|
98 |
by (simp add: Lim_null[symmetric]) |
|
99 |
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
|
100 |
by (intro Lim_cong_within) (simp_all add: field_simps) |
43338 | 101 |
finally show ?thesis |
102 |
by (simp add: mult.bounded_linear_right has_derivative_within) |
|
103 |
qed |
|
104 |
||
37648 | 105 |
lemma bounded_linear_imp_linear: "bounded_linear f \<Longrightarrow> linear f" (* TODO: move elsewhere *) |
106 |
proof - |
|
107 |
assume "bounded_linear f" |
|
108 |
then interpret f: bounded_linear f . |
|
109 |
show "linear f" |
|
110 |
by (simp add: f.add f.scaleR linear_def) |
|
111 |
qed |
|
112 |
||
113 |
lemma derivative_is_linear: |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
114 |
"(f has_derivative f') net \<Longrightarrow> linear f'" |
37648 | 115 |
by (rule derivative_linear [THEN bounded_linear_imp_linear]) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
116 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
117 |
subsubsection {* Combining theorems. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
118 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
119 |
lemma has_derivative_id: "((\<lambda>x. x) has_derivative (\<lambda>h. h)) net" |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
120 |
unfolding has_derivative_def |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
121 |
by (simp add: bounded_linear_ident tendsto_const) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
122 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
123 |
lemma has_derivative_const: "((\<lambda>x. c) has_derivative (\<lambda>h. 0)) net" |
44125 | 124 |
unfolding has_derivative_def |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
125 |
by (simp add: bounded_linear_zero tendsto_const) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
126 |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
127 |
lemma (in bounded_linear) has_derivative': "(f has_derivative f) net" |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
128 |
unfolding has_derivative_def apply(rule,rule bounded_linear_axioms) |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
129 |
unfolding diff by (simp add: tendsto_const) |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
130 |
|
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
131 |
lemma (in bounded_linear) bounded_linear: "bounded_linear f" .. |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
132 |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
133 |
lemma (in bounded_linear) has_derivative: |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
134 |
assumes "((\<lambda>x. g x) has_derivative (\<lambda>h. g' h)) net" |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
135 |
shows "((\<lambda>x. f (g x)) has_derivative (\<lambda>h. f (g' h))) net" |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
136 |
using assms unfolding has_derivative_def |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
137 |
apply safe |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
138 |
apply (erule bounded_linear_compose [OF local.bounded_linear]) |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
139 |
apply (drule local.tendsto) |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
140 |
apply (simp add: local.scaleR local.diff local.add local.zero) |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
141 |
done |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
142 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
143 |
lemma has_derivative_neg: |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
144 |
assumes "(f has_derivative f') net" |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
145 |
shows "((\<lambda>x. -(f x)) has_derivative (\<lambda>h. -(f' h))) net" |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
146 |
using scaleR_right.has_derivative [where r="-1", OF 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
|
147 |
|
44123 | 148 |
lemma has_derivative_add: |
149 |
assumes "(f has_derivative f') net" and "(g has_derivative g') net" |
|
150 |
shows "((\<lambda>x. f(x) + g(x)) has_derivative (\<lambda>h. f'(h) + g'(h))) net" |
|
151 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
152 |
note as = assms[unfolded has_derivative_def] |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
153 |
show ?thesis unfolding has_derivative_def apply(rule,rule bounded_linear_add) |
44125 | 154 |
using tendsto_add[OF as(1)[THEN conjunct2] as(2)[THEN conjunct2]] and as |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
155 |
by (auto simp add: algebra_simps) |
44123 | 156 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
157 |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
158 |
lemma has_derivative_add_const: |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
159 |
"(f has_derivative f') net \<Longrightarrow> ((\<lambda>x. f x + c) has_derivative f') net" |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
160 |
by (drule has_derivative_add, rule has_derivative_const, auto) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
161 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
162 |
lemma has_derivative_sub: |
44123 | 163 |
assumes "(f has_derivative f') net" and "(g has_derivative g') net" |
164 |
shows "((\<lambda>x. f(x) - g(x)) has_derivative (\<lambda>h. f'(h) - g'(h))) net" |
|
165 |
unfolding diff_minus by (intro has_derivative_add has_derivative_neg assms) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
166 |
|
44123 | 167 |
lemma has_derivative_setsum: |
168 |
assumes "finite s" and "\<forall>a\<in>s. ((f a) has_derivative (f' a)) net" |
|
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 "((\<lambda>x. setsum (\<lambda>a. f a x) s) has_derivative (\<lambda>h. setsum (\<lambda>a. f' a h) s)) net" |
44123 | 170 |
using assms by (induct, simp_all add: has_derivative_const has_derivative_add) |
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
171 |
text {* Somewhat different results for derivative of scalar multiplier. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
172 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
173 |
(** move **) |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
174 |
lemma linear_vmul_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
|
175 |
assumes lf: "linear f" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
176 |
shows "linear (\<lambda>x. f x $$ k *\<^sub>R v)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
177 |
using lf |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
178 |
by (auto simp add: linear_def algebra_simps) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
179 |
|
44123 | 180 |
lemmas has_derivative_intros = |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
181 |
has_derivative_id has_derivative_const |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
182 |
has_derivative_add has_derivative_sub has_derivative_neg |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
183 |
has_derivative_add_const |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
184 |
scaleR_left.has_derivative scaleR_right.has_derivative |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
185 |
inner_left.has_derivative inner_right.has_derivative |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
186 |
euclidean_component.has_derivative |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
187 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
188 |
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
|
189 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
190 |
lemma has_derivative_transform_within: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
191 |
assumes "0 < d" "x \<in> s" "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" "(f has_derivative f') (at x within s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
192 |
shows "(g has_derivative f') (at x within s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
193 |
using assms(4) unfolding has_derivative_within apply- apply(erule conjE,rule,assumption) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
194 |
apply(rule Lim_transform_within[OF assms(1)]) defer apply assumption |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
195 |
apply(rule,rule) apply(drule assms(3)[rule_format]) using assms(3)[rule_format, OF assms(2)] by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
196 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
197 |
lemma has_derivative_transform_at: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
198 |
assumes "0 < d" "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" "(f has_derivative f') (at x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
199 |
shows "(g has_derivative f') (at x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
200 |
apply(subst within_UNIV[THEN sym]) apply(rule has_derivative_transform_within[OF assms(1)]) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
201 |
using assms(2-3) unfolding within_UNIV by auto |
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 has_derivative_transform_within_open: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
204 |
assumes "open s" "x \<in> s" "\<forall>y\<in>s. f y = g y" "(f has_derivative f') (at x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
205 |
shows "(g has_derivative f') (at x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
206 |
using assms(4) unfolding has_derivative_at apply- apply(erule conjE,rule,assumption) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
207 |
apply(rule Lim_transform_within_open[OF assms(1,2)]) defer apply assumption |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
208 |
apply(rule,rule) apply(drule assms(3)[rule_format]) using assms(3)[rule_format, OF assms(2)] by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
209 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
210 |
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
|
211 |
|
36362
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36334
diff
changeset
|
212 |
no_notation Deriv.differentiable (infixl "differentiable" 60) |
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36334
diff
changeset
|
213 |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
43338
diff
changeset
|
214 |
definition differentiable :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a filter \<Rightarrow> bool" (infixr "differentiable" 30) where |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
215 |
"f differentiable net \<equiv> (\<exists>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
|
216 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
217 |
definition differentiable_on :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a set \<Rightarrow> bool" (infixr "differentiable'_on" 30) where |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
218 |
"f differentiable_on s \<equiv> (\<forall>x\<in>s. f differentiable (at x within s))" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
219 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
220 |
lemma differentiableI: "(f has_derivative f') net \<Longrightarrow> f differentiable net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
221 |
unfolding differentiable_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
222 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
223 |
lemma differentiable_at_withinI: "f differentiable (at x) \<Longrightarrow> f differentiable (at x within s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
224 |
unfolding differentiable_def using has_derivative_at_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
|
225 |
|
44123 | 226 |
lemma differentiable_within_open: (* TODO: delete *) |
227 |
assumes "a \<in> s" and "open s" |
|
228 |
shows "f differentiable (at a within s) \<longleftrightarrow> (f differentiable (at a))" |
|
37730 | 229 |
using assms 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
|
230 |
|
44123 | 231 |
lemma differentiable_on_eq_differentiable_at: |
232 |
"open s \<Longrightarrow> (f differentiable_on s \<longleftrightarrow> (\<forall>x\<in>s. f differentiable at x))" |
|
233 |
unfolding differentiable_on_def |
|
234 |
by (auto simp add: 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
|
235 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
236 |
lemma differentiable_transform_within: |
44123 | 237 |
assumes "0 < d" and "x \<in> s" and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
238 |
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
|
239 |
shows "g differentiable (at x within s)" |
44123 | 240 |
using assms(4) unfolding differentiable_def |
241 |
by (auto intro!: has_derivative_transform_within[OF assms(1-3)]) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
242 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
243 |
lemma differentiable_transform_at: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
244 |
assumes "0 < d" "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" "f differentiable at x" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
245 |
shows "g differentiable at x" |
44123 | 246 |
using assms(3) unfolding differentiable_def |
247 |
using has_derivative_transform_at[OF assms(1-2)] 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
|
248 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
249 |
subsection {* Frechet derivative and Jacobian matrix. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
250 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
251 |
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
|
252 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
253 |
lemma frechet_derivative_works: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
254 |
"f differentiable net \<longleftrightarrow> (f has_derivative (frechet_derivative f net)) net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
255 |
unfolding frechet_derivative_def differentiable_def and some_eq_ex[of "\<lambda> 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
|
256 |
|
37648 | 257 |
lemma linear_frechet_derivative: |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
258 |
shows "f differentiable net \<Longrightarrow> linear(frechet_derivative f net)" |
44123 | 259 |
unfolding frechet_derivative_works has_derivative_def |
260 |
by (auto intro: bounded_linear_imp_linear) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
261 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
262 |
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
|
263 |
|
44123 | 264 |
lemma Lim_mul_norm_within: |
265 |
fixes f::"'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
266 |
shows "(f ---> 0) (at a within s) \<Longrightarrow> ((\<lambda>x. norm(x - a) *\<^sub>R f(x)) ---> 0) (at a within s)" |
44123 | 267 |
unfolding Lim_within apply(rule,rule) |
268 |
apply(erule_tac x=e in allE,erule impE,assumption,erule exE,erule conjE) |
|
269 |
apply(rule_tac x="min d 1" in exI) apply rule defer |
|
270 |
apply(rule,erule_tac x=x in ballE) unfolding dist_norm diff_0_right |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
271 |
by(auto intro!: mult_strict_mono[of _ "1::real", unfolded mult_1_left]) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
272 |
|
44123 | 273 |
lemma differentiable_imp_continuous_within: |
274 |
assumes "f differentiable (at x within s)" |
|
275 |
shows "continuous (at x within s) f" |
|
276 |
proof- |
|
277 |
from assms guess f' unfolding differentiable_def has_derivative_within .. |
|
278 |
note f'=this |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
279 |
then interpret bounded_linear f' by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
280 |
have *:"\<And>xa. x\<noteq>xa \<Longrightarrow> (f' \<circ> (\<lambda>y. y - x)) xa + norm (xa - x) *\<^sub>R ((1 / norm (xa - x)) *\<^sub>R (f xa - (f x + f' (xa - x)))) - ((f' \<circ> (\<lambda>y. y - x)) x + 0) = f xa - f x" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
281 |
using zero by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
282 |
have **:"continuous (at x within s) (f' \<circ> (\<lambda>y. y - x))" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
283 |
apply(rule continuous_within_compose) apply(rule continuous_intros)+ |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
284 |
by(rule linear_continuous_within[OF f'[THEN conjunct1]]) |
44123 | 285 |
show ?thesis unfolding continuous_within |
286 |
using f'[THEN conjunct2, THEN Lim_mul_norm_within] |
|
44125 | 287 |
apply- apply(drule tendsto_add) |
44123 | 288 |
apply(rule **[unfolded continuous_within]) |
289 |
unfolding Lim_within and dist_norm |
|
290 |
apply (rule, rule) |
|
291 |
apply (erule_tac x=e in allE) |
|
292 |
apply (erule impE | assumption)+ |
|
293 |
apply (erule exE, rule_tac x=d in exI) |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
294 |
by (auto simp add: zero *) |
44123 | 295 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
296 |
|
44123 | 297 |
lemma differentiable_imp_continuous_at: |
298 |
"f differentiable at x \<Longrightarrow> continuous (at x) f" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
299 |
by(rule differentiable_imp_continuous_within[of _ x UNIV, unfolded within_UNIV]) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
300 |
|
44123 | 301 |
lemma differentiable_imp_continuous_on: |
302 |
"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
|
303 |
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
|
304 |
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
|
305 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
306 |
lemma has_derivative_within_subset: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
307 |
"(f has_derivative f') (at x within s) \<Longrightarrow> t \<subseteq> s \<Longrightarrow> (f has_derivative f') (at x within t)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
308 |
unfolding has_derivative_within using Lim_within_subset by blast |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
309 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
310 |
lemma differentiable_within_subset: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
311 |
"f differentiable (at x within t) \<Longrightarrow> s \<subseteq> t \<Longrightarrow> f differentiable (at x within s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
312 |
unfolding differentiable_def using has_derivative_within_subset by blast |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
313 |
|
44123 | 314 |
lemma differentiable_on_subset: |
315 |
"f differentiable_on t \<Longrightarrow> s \<subseteq> t \<Longrightarrow> f differentiable_on s" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
316 |
unfolding differentiable_on_def using differentiable_within_subset by blast |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
317 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
318 |
lemma differentiable_on_empty: "f differentiable_on {}" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
319 |
unfolding differentiable_on_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
320 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
321 |
text {* Several results are easier using a "multiplied-out" variant. |
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
322 |
(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
|
323 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
324 |
lemma has_derivative_within_alt: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
325 |
"(f has_derivative f') (at x within s) \<longleftrightarrow> bounded_linear f' \<and> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
326 |
(\<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))" (is "?lhs \<longleftrightarrow> ?rhs") |
44123 | 327 |
proof |
328 |
assume ?lhs thus ?rhs |
|
329 |
unfolding has_derivative_within apply-apply(erule conjE,rule,assumption) |
|
330 |
unfolding Lim_within |
|
331 |
apply(rule,erule_tac x=e in allE,rule,erule impE,assumption) |
|
332 |
apply(erule exE,rule_tac x=d in exI) |
|
333 |
apply(erule conjE,rule,assumption,rule,rule) |
|
334 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
335 |
fix x y e d assume as:"0 < e" "0 < d" "norm (y - x) < d" "\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
336 |
dist ((1 / norm (xa - x)) *\<^sub>R (f xa - (f x + f' (xa - x)))) 0 < e" "y \<in> s" "bounded_linear f'" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
337 |
then interpret bounded_linear f' by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
338 |
show "norm (f y - f x - f' (y - x)) \<le> e * norm (y - x)" proof(cases "y=x") |
44123 | 339 |
case True thus ?thesis using `bounded_linear f'` by(auto simp add: zero) |
340 |
next |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
341 |
case False hence "norm (f y - (f x + f' (y - x))) < e * norm (y - x)" using as(4)[rule_format, OF `y\<in>s`] |
41958 | 342 |
unfolding dist_norm diff_0_right using as(3) |
343 |
using pos_divide_less_eq[OF False[unfolded dist_nz], unfolded dist_norm] |
|
344 |
by (auto simp add: linear_0 linear_sub) |
|
44123 | 345 |
thus ?thesis by(auto simp add:algebra_simps) |
346 |
qed |
|
347 |
qed |
|
348 |
next |
|
349 |
assume ?rhs thus ?lhs unfolding has_derivative_within Lim_within |
|
350 |
apply-apply(erule conjE,rule,assumption) |
|
351 |
apply(rule,erule_tac x="e/2" in allE,rule,erule impE) defer |
|
352 |
apply(erule exE,rule_tac x=d in exI) |
|
353 |
apply(erule conjE,rule,assumption,rule,rule) |
|
354 |
unfolding dist_norm diff_0_right norm_scaleR |
|
355 |
apply(erule_tac x=xa in ballE,erule impE) |
|
356 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
357 |
fix e d y assume "bounded_linear f'" "0 < e" "0 < d" "y \<in> s" "0 < norm (y - x) \<and> norm (y - x) < d" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
358 |
"norm (f y - f x - f' (y - x)) \<le> e / 2 * norm (y - x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
359 |
thus "\<bar>1 / norm (y - x)\<bar> * norm (f y - (f x + f' (y - x))) < e" |
44123 | 360 |
apply(rule_tac le_less_trans[of _ "e/2"]) |
361 |
by(auto intro!:mult_imp_div_pos_le simp add:algebra_simps) |
|
362 |
qed auto |
|
363 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
364 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
365 |
lemma has_derivative_at_alt: |
35172
579dd5570f96
Added integration to Multivariate-Analysis (upto FTC)
himmelma
parents:
35028
diff
changeset
|
366 |
"(f has_derivative f') (at x) \<longleftrightarrow> bounded_linear f' \<and> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
367 |
(\<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))" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
368 |
using has_derivative_within_alt[where s=UNIV] unfolding within_UNIV by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
369 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
370 |
subsection {* The chain rule. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
371 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
372 |
lemma diff_chain_within: |
44123 | 373 |
assumes "(f has_derivative f') (at x within s)" |
374 |
assumes "(g has_derivative g') (at (f x) within (f ` s))" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
375 |
shows "((g o f) has_derivative (g' o f'))(at x within s)" |
44123 | 376 |
unfolding has_derivative_within_alt |
377 |
apply(rule,rule bounded_linear_compose[unfolded o_def[THEN sym]]) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
378 |
apply(rule assms(2)[unfolded has_derivative_def,THEN conjE],assumption) |
44123 | 379 |
apply(rule assms(1)[unfolded has_derivative_def,THEN conjE],assumption) |
380 |
proof(rule,rule) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
381 |
note assms = assms[unfolded has_derivative_within_alt] |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
382 |
fix e::real assume "0<e" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
383 |
guess B1 using bounded_linear.pos_bounded[OF assms(1)[THEN conjunct1, rule_format]] .. note B1 = this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
384 |
guess B2 using bounded_linear.pos_bounded[OF assms(2)[THEN conjunct1, rule_format]] .. note B2 = this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
385 |
have *:"e / 2 / B2 > 0" using `e>0` B2 apply-apply(rule divide_pos_pos) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
386 |
guess d1 using assms(1)[THEN conjunct2, rule_format, OF *] .. note d1 = this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
387 |
have *:"e / 2 / (1 + B1) > 0" using `e>0` B1 apply-apply(rule divide_pos_pos) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
388 |
guess de using assms(2)[THEN conjunct2, rule_format, OF *] .. note de = this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
389 |
guess d2 using assms(1)[THEN conjunct2, rule_format, OF zero_less_one] .. note d2 = this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
390 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
391 |
def d0 \<equiv> "(min d1 d2)/2" have d0:"d0>0" "d0 < d1" "d0 < d2" unfolding d0_def using d1 d2 by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
392 |
def d \<equiv> "(min d0 (de / (B1 + 1))) / 2" have "de * 2 / (B1 + 1) > de / (B1 + 1)" apply(rule divide_strict_right_mono) using B1 de by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
393 |
hence d:"d>0" "d < d1" "d < d2" "d < (de / (B1 + 1))" unfolding d_def using d0 d1 d2 de B1 by(auto intro!: divide_pos_pos simp add:min_less_iff_disj not_less) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
394 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
395 |
show "\<exists>d>0. \<forall>y\<in>s. norm (y - x) < d \<longrightarrow> norm ((g \<circ> f) y - (g \<circ> f) x - (g' \<circ> f') (y - x)) \<le> e * norm (y - x)" apply(rule_tac x=d in exI) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
396 |
proof(rule,rule `d>0`,rule,rule) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
397 |
fix y assume as:"y \<in> s" "norm (y - x) < d" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
398 |
hence 1:"norm (f y - f x - f' (y - x)) \<le> min (norm (y - x)) (e / 2 / B2 * norm (y - x))" using d1 d2 d by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
399 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
400 |
have "norm (f y - f x) \<le> norm (f y - f x - f' (y - x)) + norm (f' (y - x))" |
44123 | 401 |
using norm_triangle_sub[of "f y - f x" "f' (y - x)"] |
402 |
by(auto simp add:algebra_simps) |
|
403 |
also have "\<dots> \<le> norm (f y - f x - f' (y - x)) + B1 * norm (y - x)" |
|
404 |
apply(rule add_left_mono) using B1 by(auto simp add:algebra_simps) |
|
405 |
also have "\<dots> \<le> min (norm (y - x)) (e / 2 / B2 * norm (y - x)) + B1 * norm (y - x)" |
|
406 |
apply(rule add_right_mono) using d1 d2 d as 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
|
407 |
also have "\<dots> \<le> norm (y - x) + B1 * norm (y - x)" by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
408 |
also have "\<dots> = norm (y - x) * (1 + B1)" by(auto simp add:field_simps) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
409 |
finally have 3:"norm (f y - f x) \<le> norm (y - x) * (1 + B1)" by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
410 |
|
44123 | 411 |
hence "norm (f y - f x) \<le> d * (1 + B1)" apply- |
412 |
apply(rule order_trans,assumption,rule mult_right_mono) |
|
413 |
using as B1 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
|
414 |
also have "\<dots> < de" using d B1 by(auto simp add:field_simps) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
415 |
finally have "norm (g (f y) - g (f x) - g' (f y - f x)) \<le> e / 2 / (1 + B1) * norm (f y - f x)" |
44123 | 416 |
apply-apply(rule de[THEN conjunct2,rule_format]) |
417 |
using `y\<in>s` using d as 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
|
418 |
also have "\<dots> = (e / 2) * (1 / (1 + B1) * norm (f y - f x))" by auto |
44123 | 419 |
also have "\<dots> \<le> e / 2 * norm (y - x)" apply(rule mult_left_mono) |
420 |
using `e>0` and 3 using B1 and `e>0` by(auto simp add: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
|
421 |
finally have 4:"norm (g (f y) - g (f x) - g' (f y - f x)) \<le> e / 2 * norm (y - x)" by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
422 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
423 |
interpret g': bounded_linear g' using assms(2) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
424 |
interpret f': bounded_linear f' using assms(1) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
425 |
have "norm (- g' (f' (y - x)) + g' (f y - f x)) = norm (g' (f y - f x - f' (y - x)))" |
36350 | 426 |
by(auto simp add:algebra_simps f'.diff g'.diff g'.add) |
44123 | 427 |
also have "\<dots> \<le> B2 * norm (f y - f x - f' (y - x))" using B2 |
428 |
by (auto simp add: algebra_simps) |
|
429 |
also have "\<dots> \<le> B2 * (e / 2 / B2 * norm (y - x))" |
|
430 |
apply (rule mult_left_mono) using as d1 d2 d B2 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
|
431 |
also have "\<dots> \<le> e / 2 * norm (y - x)" using B2 by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
432 |
finally have 5:"norm (- g' (f' (y - x)) + g' (f y - f x)) \<le> e / 2 * norm (y - x)" by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
433 |
|
44123 | 434 |
have "norm (g (f y) - g (f x) - g' (f y - f x)) + norm (g (f y) - g (f x) - g' (f' (y - x)) - (g (f y) - g (f x) - g' (f y - f x))) \<le> e * norm (y - x)" |
435 |
using 5 4 by auto |
|
436 |
thus "norm ((g \<circ> f) y - (g \<circ> f) x - (g' \<circ> f') (y - x)) \<le> e * norm (y - x)" |
|
437 |
unfolding o_def apply- apply(rule order_trans, rule norm_triangle_sub) |
|
438 |
by assumption |
|
439 |
qed |
|
440 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
441 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
442 |
lemma diff_chain_at: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
443 |
"(f has_derivative f') (at x) \<Longrightarrow> (g has_derivative g') (at (f x)) \<Longrightarrow> ((g o f) has_derivative (g' o f')) (at x)" |
44123 | 444 |
using diff_chain_within[of f f' x UNIV g g'] |
445 |
using has_derivative_within_subset[of g g' "f x" UNIV "range f"] |
|
446 |
unfolding within_UNIV 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
|
447 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
448 |
subsection {* Composition rules stated just for differentiability. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
449 |
|
44123 | 450 |
lemma differentiable_const [intro]: |
451 |
"(\<lambda>z. c) differentiable (net::'a::real_normed_vector filter)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
452 |
unfolding differentiable_def using has_derivative_const by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
453 |
|
44123 | 454 |
lemma differentiable_id [intro]: |
455 |
"(\<lambda>z. z) differentiable (net::'a::real_normed_vector filter)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
456 |
unfolding differentiable_def using has_derivative_id by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
457 |
|
44123 | 458 |
lemma differentiable_cmul [intro]: |
459 |
"f differentiable net \<Longrightarrow> |
|
460 |
(\<lambda>x. c *\<^sub>R f(x)) differentiable (net::'a::real_normed_vector filter)" |
|
461 |
unfolding differentiable_def |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
462 |
apply(erule exE, drule scaleR_right.has_derivative) 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
|
463 |
|
44123 | 464 |
lemma differentiable_neg [intro]: |
465 |
"f differentiable net \<Longrightarrow> |
|
466 |
(\<lambda>z. -(f z)) differentiable (net::'a::real_normed_vector filter)" |
|
467 |
unfolding differentiable_def |
|
468 |
apply(erule exE, drule has_derivative_neg) 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
|
469 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
470 |
lemma differentiable_add: "f differentiable net \<Longrightarrow> g differentiable net |
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
43338
diff
changeset
|
471 |
\<Longrightarrow> (\<lambda>z. f z + g z) differentiable (net::'a::real_normed_vector filter)" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
472 |
unfolding differentiable_def apply(erule exE)+ apply(rule_tac x="\<lambda>z. f' z + f'a z" in exI) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
473 |
apply(rule has_derivative_add) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
474 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
475 |
lemma differentiable_sub: "f differentiable net \<Longrightarrow> g differentiable net |
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
43338
diff
changeset
|
476 |
\<Longrightarrow> (\<lambda>z. f z - g z) differentiable (net::'a::real_normed_vector filter)" |
44123 | 477 |
unfolding differentiable_def apply(erule exE)+ |
478 |
apply(rule_tac x="\<lambda>z. f' z - f'a z" in exI) |
|
479 |
apply(rule has_derivative_sub) 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
|
480 |
|
37648 | 481 |
lemma differentiable_setsum: |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
482 |
assumes "finite s" "\<forall>a\<in>s. (f a) differentiable net" |
44123 | 483 |
shows "(\<lambda>x. setsum (\<lambda>a. f a x) s) differentiable net" |
484 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
485 |
guess f' using bchoice[OF assms(2)[unfolded differentiable_def]] .. |
44123 | 486 |
thus ?thesis unfolding differentiable_def apply- |
487 |
apply(rule,rule has_derivative_setsum[where f'=f'],rule assms(1)) by auto |
|
488 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
489 |
|
37648 | 490 |
lemma differentiable_setsum_numseg: |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
491 |
shows "\<forall>i. m \<le> i \<and> i \<le> n \<longrightarrow> (f i) differentiable net \<Longrightarrow> (\<lambda>x. setsum (\<lambda>a. f a x) {m::nat..n}) differentiable net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
492 |
apply(rule differentiable_setsum) using finite_atLeastAtMost[of n m] by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
493 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
494 |
lemma differentiable_chain_at: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
495 |
"f differentiable (at x) \<Longrightarrow> g differentiable (at(f x)) \<Longrightarrow> (g o f) differentiable (at x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
496 |
unfolding differentiable_def by(meson diff_chain_at) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
497 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
498 |
lemma differentiable_chain_within: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
499 |
"f differentiable (at x within s) \<Longrightarrow> g differentiable (at(f x) within (f ` s)) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
500 |
\<Longrightarrow> (g o f) differentiable (at x within s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
501 |
unfolding differentiable_def by(meson diff_chain_within) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
502 |
|
37730 | 503 |
subsection {* Uniqueness of derivative *} |
504 |
||
505 |
text {* |
|
506 |
The general result is a bit messy because we need approachability of the |
|
507 |
limit point from any direction. But OK for nontrivial intervals etc. |
|
508 |
*} |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
509 |
|
44123 | 510 |
lemma frechet_derivative_unique_within: |
511 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
512 |
assumes "(f has_derivative f') (at x within s)" |
|
513 |
assumes "(f has_derivative f'') (at x within s)" |
|
514 |
assumes "(\<forall>i<DIM('a). \<forall>e>0. \<exists>d. 0 < abs(d) \<and> abs(d) < e \<and> (x + d *\<^sub>R basis i) \<in> s)" |
|
515 |
shows "f' = f''" |
|
516 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
517 |
note as = assms(1,2)[unfolded has_derivative_def] |
44123 | 518 |
then interpret f': bounded_linear f' by auto |
519 |
from as interpret f'': bounded_linear f'' by auto |
|
520 |
have "x islimpt s" unfolding islimpt_approachable |
|
521 |
proof(rule,rule) |
|
522 |
fix e::real assume "0<e" guess d |
|
523 |
using assms(3)[rule_format,OF DIM_positive `e>0`] .. |
|
524 |
thus "\<exists>x'\<in>s. x' \<noteq> x \<and> dist x' x < e" |
|
525 |
apply(rule_tac x="x + d *\<^sub>R basis 0" in bexI) |
|
526 |
unfolding dist_norm by auto |
|
527 |
qed |
|
528 |
hence *:"netlimit (at x within s) = x" apply-apply(rule netlimit_within) |
|
529 |
unfolding trivial_limit_within by simp |
|
530 |
show ?thesis apply(rule linear_eq_stdbasis) |
|
531 |
unfolding linear_conv_bounded_linear |
|
532 |
apply(rule as(1,2)[THEN conjunct1])+ |
|
533 |
proof(rule,rule,rule ccontr) |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
534 |
fix i assume i:"i<DIM('a)" def e \<equiv> "norm (f' (basis i) - f'' (basis i))" |
44123 | 535 |
assume "f' (basis i) \<noteq> f'' (basis i)" |
536 |
hence "e>0" unfolding e_def by auto |
|
44125 | 537 |
guess d using tendsto_diff [OF as(1,2)[THEN conjunct2], unfolded * Lim_within,rule_format,OF `e>0`] .. note d=this |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
538 |
guess c using assms(3)[rule_format,OF i d[THEN conjunct1]] .. note c=this |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
539 |
have *:"norm (- ((1 / \<bar>c\<bar>) *\<^sub>R f' (c *\<^sub>R basis i)) + (1 / \<bar>c\<bar>) *\<^sub>R f'' (c *\<^sub>R basis i)) = norm ((1 / abs c) *\<^sub>R (- (f' (c *\<^sub>R basis i)) + f'' (c *\<^sub>R basis i)))" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
540 |
unfolding scaleR_right_distrib by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
541 |
also have "\<dots> = norm ((1 / abs c) *\<^sub>R (c *\<^sub>R (- (f' (basis i)) + f'' (basis i))))" |
44123 | 542 |
unfolding f'.scaleR f''.scaleR |
543 |
unfolding scaleR_right_distrib scaleR_minus_right by auto |
|
544 |
also have "\<dots> = e" unfolding e_def using c[THEN conjunct1] |
|
545 |
using norm_minus_cancel[of "f' (basis i) - f'' (basis i)"] |
|
546 |
by (auto simp add: add.commute ab_diff_minus) |
|
547 |
finally show False using c |
|
548 |
using d[THEN conjunct2,rule_format,of "x + c *\<^sub>R basis i"] |
|
549 |
unfolding dist_norm |
|
550 |
unfolding f'.scaleR f''.scaleR f'.add f''.add f'.diff f''.diff |
|
551 |
scaleR_scaleR scaleR_right_diff_distrib scaleR_right_distrib |
|
552 |
using i by auto |
|
553 |
qed |
|
554 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
555 |
|
37730 | 556 |
lemma frechet_derivative_unique_at: |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
557 |
shows "(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f'') (at x) \<Longrightarrow> f' = f''" |
37730 | 558 |
unfolding FDERIV_conv_has_derivative [symmetric] |
559 |
by (rule FDERIV_unique) |
|
41829 | 560 |
|
44123 | 561 |
lemma continuous_isCont: "isCont f x = continuous (at x) f" |
562 |
unfolding isCont_def LIM_def |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
563 |
unfolding continuous_at Lim_at unfolding dist_nz by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
564 |
|
44123 | 565 |
lemma frechet_derivative_unique_within_closed_interval: |
566 |
fixes f::"'a::ordered_euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
567 |
assumes "\<forall>i<DIM('a). a$$i < b$$i" "x \<in> {a..b}" (is "x\<in>?I") |
|
568 |
assumes "(f has_derivative f' ) (at x within {a..b})" |
|
569 |
assumes "(f has_derivative f'') (at x within {a..b})" |
|
570 |
shows "f' = f''" |
|
571 |
apply(rule frechet_derivative_unique_within) |
|
572 |
apply(rule assms(3,4))+ |
|
573 |
proof(rule,rule,rule,rule) |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
574 |
fix e::real and i assume "e>0" and i:"i<DIM('a)" |
44123 | 575 |
thus "\<exists>d. 0 < \<bar>d\<bar> \<and> \<bar>d\<bar> < e \<and> x + d *\<^sub>R basis i \<in> {a..b}" |
576 |
proof(cases "x$$i=a$$i") |
|
577 |
case True thus ?thesis |
|
578 |
apply(rule_tac x="(min (b$$i - a$$i) e) / 2" in exI) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
579 |
using assms(1)[THEN spec[where x=i]] and `e>0` and assms(2) |
44123 | 580 |
unfolding mem_interval euclidean_simps basis_component |
581 |
using i by (auto simp add: field_simps) |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
582 |
next note * = assms(2)[unfolded mem_interval,THEN spec[where x=i]] |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
583 |
case False moreover have "a $$ i < x $$ i" using False * by auto |
44123 | 584 |
moreover { |
585 |
have "a $$ i * 2 + min (x $$ i - a $$ i) e \<le> a$$i *2 + x$$i - a$$i" |
|
586 |
by auto |
|
587 |
also have "\<dots> = a$$i + x$$i" by auto |
|
588 |
also have "\<dots> \<le> 2 * x$$i" using * by auto |
|
589 |
finally have "a $$ i * 2 + min (x $$ i - a $$ i) e \<le> x $$ i * 2" by auto |
|
590 |
} |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
591 |
moreover have "min (x $$ i - a $$ i) e \<ge> 0" using * and `e>0` by auto |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
592 |
hence "x $$ i * 2 \<le> b $$ i * 2 + min (x $$ i - a $$ i) e" using * by auto |
44123 | 593 |
ultimately show ?thesis |
594 |
apply(rule_tac x="- (min (x$$i - a$$i) e) / 2" in exI) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
595 |
using assms(1)[THEN spec[where x=i]] and `e>0` and assms(2) |
44123 | 596 |
unfolding mem_interval euclidean_simps basis_component |
597 |
using i by (auto simp add: field_simps) |
|
598 |
qed |
|
599 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
600 |
|
44123 | 601 |
lemma frechet_derivative_unique_within_open_interval: |
602 |
fixes f::"'a::ordered_euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
603 |
assumes "x \<in> {a<..<b}" |
|
604 |
assumes "(f has_derivative f' ) (at x within {a<..<b})" |
|
605 |
assumes "(f has_derivative f'') (at x within {a<..<b})" |
|
37650 | 606 |
shows "f' = f''" |
607 |
proof - |
|
608 |
from assms(1) have *: "at x within {a<..<b} = at x" |
|
609 |
by (simp add: at_within_interior interior_open open_interval) |
|
610 |
from assms(2,3) [unfolded *] show "f' = f''" |
|
611 |
by (rule frechet_derivative_unique_at) |
|
612 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
613 |
|
37730 | 614 |
lemma frechet_derivative_at: |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
615 |
shows "(f has_derivative f') (at x) \<Longrightarrow> (f' = frechet_derivative f (at x))" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
616 |
apply(rule frechet_derivative_unique_at[of f],assumption) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
617 |
unfolding frechet_derivative_works[THEN sym] using differentiable_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
618 |
|
44123 | 619 |
lemma frechet_derivative_within_closed_interval: |
620 |
fixes f::"'a::ordered_euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
621 |
assumes "\<forall>i<DIM('a). a$$i < b$$i" and "x \<in> {a..b}" |
|
622 |
assumes "(f has_derivative f') (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
|
623 |
shows "frechet_derivative f (at x within {a.. b}) = f'" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
624 |
apply(rule frechet_derivative_unique_within_closed_interval[where f=f]) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
625 |
apply(rule assms(1,2))+ unfolding frechet_derivative_works[THEN sym] |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
626 |
unfolding differentiable_def using assms(3) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
627 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
628 |
subsection {* The traditional Rolle theorem in one dimension. *} |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
629 |
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
630 |
lemma linear_componentwise: |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
631 |
fixes f:: "'a::euclidean_space \<Rightarrow> 'b::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
|
632 |
assumes lf: "linear f" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
633 |
shows "(f x) $$ j = (\<Sum>i<DIM('a). (x$$i) * (f (basis i)$$j))" (is "?lhs = ?rhs") |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
634 |
proof - |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
635 |
have fA: "finite {..<DIM('a)}" by simp |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
636 |
have "?rhs = (\<Sum>i<DIM('a). x$$i *\<^sub>R f (basis i))$$j" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
637 |
by (simp add: euclidean_simps) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
638 |
then show ?thesis |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
639 |
unfolding linear_setsum_mul[OF lf fA, symmetric] |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
640 |
unfolding euclidean_representation[symmetric] .. |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
641 |
qed |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
642 |
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
643 |
text {* We do not introduce @{text jacobian}, which is defined on matrices, instead we use |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
644 |
the unfolding of it. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
645 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
646 |
lemma jacobian_works: |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
647 |
"(f::('a::euclidean_space) \<Rightarrow> ('b::euclidean_space)) differentiable net \<longleftrightarrow> |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
648 |
(f has_derivative (\<lambda>h. \<chi>\<chi> i. |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
649 |
\<Sum>j<DIM('a). frechet_derivative f net (basis j) $$ i * h $$ j)) net" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
650 |
(is "?differentiable \<longleftrightarrow> (f has_derivative (\<lambda>h. \<chi>\<chi> i. ?SUM h i)) net") |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
651 |
proof |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
652 |
assume *: ?differentiable |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
653 |
{ fix h i |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
654 |
have "?SUM h i = frechet_derivative f net h $$ i" using * |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
655 |
by (auto intro!: setsum_cong |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
656 |
simp: linear_componentwise[of _ h i] linear_frechet_derivative) } |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
657 |
thus "(f has_derivative (\<lambda>h. \<chi>\<chi> i. ?SUM h i)) net" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
658 |
using * by (simp add: frechet_derivative_works) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
659 |
qed (auto intro!: differentiableI) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
660 |
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
661 |
lemma differential_zero_maxmin_component: |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
662 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::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
|
663 |
assumes k: "k < DIM('b)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
664 |
and ball: "0 < e" "((\<forall>y \<in> ball x e. (f y)$$k \<le> (f x)$$k) \<or> (\<forall>y\<in>ball x e. (f x)$$k \<le> (f y)$$k))" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
665 |
and diff: "f differentiable (at x)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
666 |
shows "(\<chi>\<chi> j. frechet_derivative f (at x) (basis j) $$ k) = (0::'a)" (is "?D k = 0") |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
667 |
proof (rule ccontr) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
668 |
assume "?D k \<noteq> 0" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
669 |
then obtain j where j: "?D k $$ j \<noteq> 0" "j < DIM('a)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
670 |
unfolding euclidean_lambda_beta euclidean_eq[of _ "0::'a"] by auto |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
671 |
hence *: "\<bar>?D k $$ j\<bar> / 2 > 0" by auto |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
672 |
note as = diff[unfolded jacobian_works has_derivative_at_alt] |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
673 |
guess e' using as[THEN conjunct2, rule_format, OF *] .. note e' = this |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
674 |
guess d using real_lbound_gt_zero[OF ball(1) e'[THEN conjunct1]] .. note d = this |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
675 |
{ fix c assume "abs c \<le> d" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
676 |
hence *:"norm (x + c *\<^sub>R basis j - x) < e'" using norm_basis[of j] d by auto |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
677 |
let ?v = "(\<chi>\<chi> i. \<Sum>l<DIM('a). ?D i $$ l * (c *\<^sub>R basis j :: 'a) $$ l)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
678 |
have if_dist: "\<And> P a b c. a * (if P then b else c) = (if P then a * b else a * c)" by auto |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
679 |
have "\<bar>(f (x + c *\<^sub>R basis j) - f x - ?v) $$ k\<bar> \<le> |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
680 |
norm (f (x + c *\<^sub>R basis j) - f x - ?v)" by (rule component_le_norm) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
681 |
also have "\<dots> \<le> \<bar>?D k $$ j\<bar> / 2 * \<bar>c\<bar>" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
682 |
using e'[THEN conjunct2, rule_format, OF *] and norm_basis[of j] by fastsimp |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
683 |
finally have "\<bar>(f (x + c *\<^sub>R basis j) - f x - ?v) $$ k\<bar> \<le> \<bar>?D k $$ j\<bar> / 2 * \<bar>c\<bar>" by simp |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
684 |
hence "\<bar>f (x + c *\<^sub>R basis j) $$ k - f x $$ k - c * ?D k $$ j\<bar> \<le> \<bar>?D k $$ j\<bar> / 2 * \<bar>c\<bar>" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
685 |
unfolding euclidean_simps euclidean_lambda_beta using j k |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
686 |
by (simp add: if_dist setsum_cases field_simps) } note * = this |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
687 |
have "x + d *\<^sub>R basis j \<in> ball x e" "x - d *\<^sub>R basis j \<in> ball x e" |
36587 | 688 |
unfolding mem_ball dist_norm using norm_basis[of j] d by auto |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
689 |
hence **:"((f (x - d *\<^sub>R basis j))$$k \<le> (f x)$$k \<and> (f (x + d *\<^sub>R basis j))$$k \<le> (f x)$$k) \<or> |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
690 |
((f (x - d *\<^sub>R basis j))$$k \<ge> (f x)$$k \<and> (f (x + d *\<^sub>R basis j))$$k \<ge> (f x)$$k)" using ball by auto |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
691 |
have ***: "\<And>y y1 y2 d dx::real. |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
692 |
(y1\<le>y\<and>y2\<le>y) \<or> (y\<le>y1\<and>y\<le>y2) \<Longrightarrow> d < abs dx \<Longrightarrow> abs(y1 - y - - dx) \<le> d \<Longrightarrow> (abs (y2 - y - dx) \<le> d) \<Longrightarrow> False" by arith |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
693 |
show False apply(rule ***[OF **, where dx="d * ?D k $$ j" and d="\<bar>?D k $$ j\<bar> / 2 * \<bar>d\<bar>"]) |
44123 | 694 |
using *[of "-d"] and *[of d] and d[THEN conjunct1] and j |
695 |
unfolding mult_minus_left |
|
696 |
unfolding abs_mult diff_minus_eq_add scaleR.minus_left |
|
697 |
unfolding algebra_simps by (auto intro: mult_pos_pos) |
|
34906 | 698 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
699 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
700 |
text {* In particular if we have a mapping into @{typ "real"}. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
701 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
702 |
lemma differential_zero_maxmin: |
37650 | 703 |
fixes f::"'a\<Colon>euclidean_space \<Rightarrow> real" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
704 |
assumes "x \<in> s" "open s" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
705 |
and deriv: "(f has_derivative f') (at x)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
706 |
and mono: "(\<forall>y\<in>s. f y \<le> f x) \<or> (\<forall>y\<in>s. f x \<le> f y)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
707 |
shows "f' = (\<lambda>v. 0)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
708 |
proof - |
44123 | 709 |
obtain e where e:"e>0" "ball x e \<subseteq> s" |
710 |
using `open s`[unfolded open_contains_ball] and `x \<in> s` by auto |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
711 |
with differential_zero_maxmin_component[where 'b=real, of 0 e x f, simplified] |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
712 |
have "(\<chi>\<chi> j. frechet_derivative f (at x) (basis j)) = (0::'a)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
713 |
unfolding differentiable_def using mono deriv by auto |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
714 |
with frechet_derivative_at[OF deriv, symmetric] |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
715 |
have "\<forall>i<DIM('a). f' (basis i) = 0" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
716 |
by (simp add: euclidean_eq[of _ "0::'a"]) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
717 |
with derivative_is_linear[OF deriv, THEN linear_componentwise, of _ 0] |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
718 |
show ?thesis by (simp add: fun_eq_iff) |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
719 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
720 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
721 |
lemma rolle: fixes f::"real\<Rightarrow>real" |
44123 | 722 |
assumes "a < b" and "f a = f b" and "continuous_on {a..b} f" |
723 |
assumes "\<forall>x\<in>{a<..<b}. (f has_derivative f'(x)) (at x)" |
|
724 |
shows "\<exists>x\<in>{a<..<b}. f' x = (\<lambda>v. 0)" |
|
725 |
proof- |
|
726 |
have "\<exists>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))" |
|
727 |
proof- |
|
728 |
have "(a + b) / 2 \<in> {a .. b}" using assms(1) by auto |
|
729 |
hence *:"{a .. b}\<noteq>{}" by auto |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
730 |
guess d using continuous_attains_sup[OF compact_interval * assms(3)] .. note d=this |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
731 |
guess c using continuous_attains_inf[OF compact_interval * assms(3)] .. note c=this |
44123 | 732 |
show ?thesis |
733 |
proof(cases "d\<in>{a<..<b} \<or> c\<in>{a<..<b}") |
|
734 |
case True thus ?thesis |
|
735 |
apply(erule_tac disjE) apply(rule_tac x=d in bexI) |
|
736 |
apply(rule_tac[3] x=c in bexI) |
|
737 |
using d c by auto |
|
738 |
next |
|
739 |
def e \<equiv> "(a + b) /2" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
740 |
case False hence "f d = f c" using d c assms(2) by auto |
44123 | 741 |
hence "\<And>x. x\<in>{a..b} \<Longrightarrow> f x = f d" |
742 |
using c d apply- apply(erule_tac x=x in ballE)+ by auto |
|
743 |
thus ?thesis |
|
744 |
apply(rule_tac x=e in bexI) unfolding e_def using assms(1) by auto |
|
745 |
qed |
|
746 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
747 |
then guess x .. note x=this |
44123 | 748 |
hence "f' x = (\<lambda>v. 0)" |
749 |
apply(rule_tac differential_zero_maxmin[of x "{a<..<b}" f "f' x"]) |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
750 |
defer apply(rule open_interval) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
751 |
apply(rule assms(4)[unfolded has_derivative_at[THEN sym],THEN bspec[where x=x]],assumption) |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
752 |
unfolding o_def apply(erule disjE,rule disjI2) by auto |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
753 |
thus ?thesis apply(rule_tac x=x in bexI) unfolding o_def apply rule |
44123 | 754 |
apply(drule_tac x=v in fun_cong) using x(1) by auto |
755 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
756 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
757 |
subsection {* One-dimensional mean value theorem. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
758 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
759 |
lemma mvt: fixes f::"real \<Rightarrow> real" |
44123 | 760 |
assumes "a < b" and "continuous_on {a .. b} f" |
761 |
assumes "\<forall>x\<in>{a<..<b}. (f has_derivative (f' x)) (at x)" |
|
762 |
shows "\<exists>x\<in>{a<..<b}. (f b - f a = (f' x) (b - a))" |
|
763 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
764 |
have "\<exists>x\<in>{a<..<b}. (\<lambda>xa. f' x xa - (f b - f a) / (b - a) * xa) = (\<lambda>v. 0)" |
44123 | 765 |
apply(rule rolle[OF assms(1), of "\<lambda>x. f x - (f b - f a) / (b - a) * x"]) |
766 |
defer |
|
767 |
apply(rule continuous_on_intros assms(2) continuous_on_cmul[where 'b=real, unfolded real_scaleR_def])+ |
|
768 |
proof |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
769 |
fix x assume x:"x \<in> {a<..<b}" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
770 |
show "((\<lambda>x. f x - (f b - f a) / (b - a) * x) has_derivative (\<lambda>xa. f' x xa - (f b - f a) / (b - a) * xa)) (at x)" |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
771 |
by (intro has_derivative_intros assms(3)[rule_format,OF x] |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
772 |
mult_right.has_derivative) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
773 |
qed(insert assms(1), auto simp add:field_simps) |
44123 | 774 |
then guess x .. |
775 |
thus ?thesis apply(rule_tac x=x in bexI) |
|
776 |
apply(drule fun_cong[of _ _ "b - a"]) by auto |
|
777 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
778 |
|
44123 | 779 |
lemma mvt_simple: |
780 |
fixes f::"real \<Rightarrow> real" |
|
781 |
assumes "a<b" 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
|
782 |
shows "\<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)" |
44123 | 783 |
apply(rule mvt) |
784 |
apply(rule assms(1), rule differentiable_imp_continuous_on) |
|
785 |
unfolding differentiable_on_def differentiable_def defer |
|
786 |
proof |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
787 |
fix x assume x:"x \<in> {a<..<b}" show "(f has_derivative f' x) (at x)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
788 |
unfolding has_derivative_within_open[OF x open_interval,THEN sym] |
44123 | 789 |
apply(rule has_derivative_within_subset) |
790 |
apply(rule assms(2)[rule_format]) |
|
791 |
using x by auto |
|
792 |
qed(insert assms(2), auto) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
793 |
|
44123 | 794 |
lemma mvt_very_simple: |
795 |
fixes f::"real \<Rightarrow> real" |
|
796 |
assumes "a \<le> b" and "\<forall>x\<in>{a..b}. (f has_derivative f'(x)) (at x within {a..b})" |
|
797 |
shows "\<exists>x\<in>{a..b}. f b - f a = f' x (b - a)" |
|
798 |
proof (cases "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
|
799 |
interpret bounded_linear "f' b" using assms(2) assms(1) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
800 |
case True thus ?thesis apply(rule_tac x=a in bexI) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
801 |
using assms(2)[THEN bspec[where x=a]] unfolding has_derivative_def |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
802 |
unfolding True using zero by auto next |
44123 | 803 |
case False thus ?thesis using mvt_simple[OF _ assms(2)] using assms(1) by auto |
804 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
805 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
806 |
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
|
807 |
|
44123 | 808 |
lemma mvt_general: |
809 |
fixes f::"real\<Rightarrow>'a::euclidean_space" |
|
810 |
assumes "a<b" and "continuous_on {a..b} f" |
|
811 |
assumes "\<forall>x\<in>{a<..<b}. (f has_derivative f'(x)) (at x)" |
|
812 |
shows "\<exists>x\<in>{a<..<b}. norm(f b - f a) \<le> norm(f'(x) (b - a))" |
|
813 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
814 |
have "\<exists>x\<in>{a<..<b}. (op \<bullet> (f b - f a) \<circ> f) b - (op \<bullet> (f b - f a) \<circ> f) a = (f b - f a) \<bullet> f' x (b - a)" |
44123 | 815 |
apply(rule mvt) apply(rule assms(1)) |
816 |
apply(rule continuous_on_inner continuous_on_intros assms(2))+ |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
817 |
unfolding o_def apply(rule,rule has_derivative_intros) |
44123 | 818 |
using assms(3) 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
|
819 |
then guess x .. note x=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
820 |
show ?thesis proof(cases "f a = f b") |
36844 | 821 |
case False |
44123 | 822 |
have "norm (f b - f a) * norm (f b - f a) = norm (f b - f a)^2" |
823 |
by (simp add: power2_eq_square) |
|
35542 | 824 |
also have "\<dots> = (f b - f a) \<bullet> (f b - f a)" unfolding power2_norm_eq_inner .. |
44123 | 825 |
also have "\<dots> = (f b - f a) \<bullet> f' x (b - a)" |
826 |
using x unfolding inner_simps by (auto simp add: inner_diff_left) |
|
827 |
also have "\<dots> \<le> norm (f b - f a) * norm (f' x (b - a))" |
|
828 |
by (rule norm_cauchy_schwarz) |
|
829 |
finally show ?thesis using False x(1) |
|
830 |
by (auto simp add: real_mult_left_cancel) |
|
831 |
next |
|
832 |
case True thus ?thesis using assms(1) |
|
833 |
apply (rule_tac x="(a + b) /2" in bexI) by auto |
|
834 |
qed |
|
835 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
836 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
837 |
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
|
838 |
|
44123 | 839 |
lemma differentiable_bound: |
840 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
841 |
assumes "convex s" and "\<forall>x\<in>s. (f has_derivative f'(x)) (at x within s)" |
|
842 |
assumes "\<forall>x\<in>s. onorm(f' x) \<le> B" and x:"x\<in>s" and y:"y\<in>s" |
|
843 |
shows "norm(f x - f y) \<le> B * norm(x - y)" |
|
844 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
845 |
let ?p = "\<lambda>u. x + u *\<^sub>R (y - x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
846 |
have *:"\<And>u. u\<in>{0..1} \<Longrightarrow> x + u *\<^sub>R (y - x) \<in> s" |
44123 | 847 |
using assms(1)[unfolded convex_alt,rule_format,OF x y] |
848 |
unfolding scaleR_left_diff_distrib scaleR_right_diff_distrib |
|
849 |
by (auto simp add: algebra_simps) |
|
850 |
hence 1:"continuous_on {0..1} (f \<circ> ?p)" apply- |
|
851 |
apply(rule continuous_on_intros continuous_on_vmul)+ |
|
852 |
unfolding continuous_on_eq_continuous_within |
|
853 |
apply(rule,rule differentiable_imp_continuous_within) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
854 |
unfolding differentiable_def apply(rule_tac x="f' xa" in exI) |
44123 | 855 |
apply(rule has_derivative_within_subset) |
856 |
apply(rule assms(2)[rule_format]) by auto |
|
857 |
have 2:"\<forall>u\<in>{0<..<1}. ((f \<circ> ?p) has_derivative f' (x + u *\<^sub>R (y - x)) \<circ> (\<lambda>u. 0 + u *\<^sub>R (y - x))) (at u)" |
|
858 |
proof rule |
|
859 |
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
|
860 |
let ?u = "x + u *\<^sub>R (y - x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
861 |
have "(f \<circ> ?p has_derivative (f' ?u) \<circ> (\<lambda>u. 0 + u *\<^sub>R (y - x))) (at u within {0<..<1})" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
862 |
apply(rule diff_chain_within) apply(rule has_derivative_intros)+ |
44123 | 863 |
apply(rule has_derivative_within_subset) |
864 |
apply(rule assms(2)[rule_format]) using goal1 * by auto |
|
865 |
thus ?case |
|
866 |
unfolding has_derivative_within_open[OF goal1 open_interval] by auto |
|
867 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
868 |
guess u using mvt_general[OF zero_less_one 1 2] .. note u = this |
44123 | 869 |
have **:"\<And>x y. x\<in>s \<Longrightarrow> norm (f' x y) \<le> B * norm y" |
870 |
proof- |
|
871 |
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
|
872 |
have "norm (f' x y) \<le> onorm (f' x) * norm y" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
873 |
using onorm(1)[OF derivative_is_linear[OF assms(2)[rule_format,OF goal1]]] by assumption |
44123 | 874 |
also have "\<dots> \<le> B * norm y" |
875 |
apply(rule mult_right_mono) |
|
876 |
using assms(3)[rule_format,OF goal1] |
|
877 |
by(auto simp add:field_simps) |
|
878 |
finally show ?case by simp |
|
879 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
880 |
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)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
881 |
by(auto simp add:norm_minus_commute) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
882 |
also have "\<dots> \<le> norm (f' (x + u *\<^sub>R (y - x)) (y - x))" using u by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
883 |
also have "\<dots> \<le> B * norm(y - x)" apply(rule **) using * and u by auto |
44123 | 884 |
finally show ?thesis by(auto simp add:norm_minus_commute) |
885 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
886 |
|
44123 | 887 |
lemma differentiable_bound_real: |
888 |
fixes f::"real \<Rightarrow> real" |
|
889 |
assumes "convex s" and "\<forall>x\<in>s. (f has_derivative f' x) (at x within s)" |
|
890 |
assumes "\<forall>x\<in>s. onorm(f' x) \<le> B" and x:"x\<in>s" and y:"y\<in>s" |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
891 |
shows "norm(f x - f y) \<le> B * norm(x - y)" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
892 |
using differentiable_bound[of s f f' B x y] |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
893 |
unfolding Ball_def image_iff o_def using assms by auto |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
894 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
895 |
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
|
896 |
|
44123 | 897 |
lemma has_derivative_zero_constant: |
898 |
fixes f::"real\<Rightarrow>real" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
899 |
assumes "convex s" "\<forall>x\<in>s. (f has_derivative (\<lambda>h. 0)) (at x within s)" |
44123 | 900 |
shows "\<exists>c. \<forall>x\<in>s. f x = c" |
901 |
proof(cases "s={}") |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
902 |
case False then obtain x where "x\<in>s" by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
903 |
have "\<And>y. y\<in>s \<Longrightarrow> f x = f y" proof- case goal1 |
44123 | 904 |
thus ?case |
905 |
using differentiable_bound_real[OF assms(1-2), of 0 x y] and `x\<in>s` |
|
906 |
unfolding onorm_const by auto qed |
|
907 |
thus ?thesis apply(rule_tac x="f x" in exI) by auto |
|
908 |
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
|
909 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
910 |
lemma has_derivative_zero_unique: fixes f::"real\<Rightarrow>real" |
44123 | 911 |
assumes "convex s" and "a \<in> s" and "f a = c" |
912 |
assumes "\<forall>x\<in>s. (f has_derivative (\<lambda>h. 0)) (at x within s)" and "x\<in>s" |
|
913 |
shows "f x = c" |
|
914 |
using has_derivative_zero_constant[OF assms(1,4)] using assms(2-3,5) 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
|
915 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
916 |
subsection {* Differentiability of inverse function (most basic form). *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
917 |
|
44123 | 918 |
lemma has_derivative_inverse_basic: |
919 |
fixes f::"'b::euclidean_space \<Rightarrow> 'c::euclidean_space" |
|
920 |
assumes "(f has_derivative f') (at (g y))" |
|
921 |
assumes "bounded_linear g'" and "g' \<circ> f' = id" and "continuous (at y) g" |
|
922 |
assumes "open t" and "y \<in> t" and "\<forall>z\<in>t. f(g z) = z" |
|
923 |
shows "(g has_derivative g') (at y)" |
|
924 |
proof- |
|
925 |
interpret f': bounded_linear f' |
|
926 |
using assms unfolding has_derivative_def 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
|
927 |
interpret g': bounded_linear g' using assms by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
928 |
guess C using bounded_linear.pos_bounded[OF assms(2)] .. note C = this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
929 |
(* have fgid:"\<And>x. g' (f' x) = x" using assms(3) unfolding o_def id_def apply()*) |
44123 | 930 |
have lem1:"\<forall>e>0. \<exists>d>0. \<forall>z. norm(z - y) < d \<longrightarrow> norm(g z - g y - g'(z - y)) \<le> e * norm(g z - g y)" |
931 |
proof(rule,rule) |
|
932 |
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
|
933 |
have *:"e / C > 0" apply(rule divide_pos_pos) using `e>0` C by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
934 |
guess d0 using assms(1)[unfolded has_derivative_at_alt,THEN conjunct2,rule_format,OF *] .. note d0=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
935 |
guess d1 using assms(4)[unfolded continuous_at Lim_at,rule_format,OF d0[THEN conjunct1]] .. note d1=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
936 |
guess d2 using assms(5)[unfolded open_dist,rule_format,OF assms(6)] .. note d2=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
937 |
guess d using real_lbound_gt_zero[OF d1[THEN conjunct1] d2[THEN conjunct1]] .. note d=this |
44123 | 938 |
thus ?case apply(rule_tac x=d in exI) apply rule defer |
939 |
proof(rule,rule) |
|
940 |
fix z assume as:"norm (z - y) < d" hence "z\<in>t" |
|
941 |
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
|
942 |
have "norm (g z - g y - g' (z - y)) \<le> norm (g' (f (g z) - y - f' (g z - g y)))" |
44123 | 943 |
unfolding g'.diff f'.diff |
944 |
unfolding assms(3)[unfolded o_def id_def, THEN fun_cong] |
|
945 |
unfolding assms(7)[rule_format,OF `z\<in>t`] |
|
946 |
apply(subst norm_minus_cancel[THEN sym]) by auto |
|
947 |
also have "\<dots> \<le> norm(f (g z) - y - f' (g z - g y)) * C" |
|
948 |
by (rule C [THEN conjunct2, rule_format]) |
|
949 |
also have "\<dots> \<le> (e / C) * norm (g z - g y) * C" |
|
950 |
apply(rule mult_right_mono) |
|
951 |
apply(rule d0[THEN conjunct2,rule_format,unfolded assms(7)[rule_format,OF `y\<in>t`]]) |
|
952 |
apply(cases "z=y") defer |
|
953 |
apply(rule d1[THEN conjunct2, unfolded dist_norm,rule_format]) |
|
954 |
using as d C d0 by auto |
|
955 |
also have "\<dots> \<le> e * norm (g z - g y)" |
|
956 |
using C by (auto simp add: field_simps) |
|
957 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (g z - g y)" |
|
958 |
by simp |
|
959 |
qed auto |
|
960 |
qed |
|
961 |
have *:"(0::real) < 1 / 2" by auto |
|
962 |
guess d using lem1[rule_format,OF *] .. note d=this |
|
963 |
def B\<equiv>"C*2" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
964 |
have "B>0" unfolding B_def using C by auto |
44123 | 965 |
have lem2:"\<forall>z. norm(z - y) < d \<longrightarrow> norm(g z - g y) \<le> B * norm(z - y)" |
966 |
proof(rule,rule) case goal1 |
|
967 |
have "norm (g z - g y) \<le> norm(g' (z - y)) + norm ((g z - g y) - g'(z - y))" |
|
968 |
by(rule norm_triangle_sub) |
|
969 |
also have "\<dots> \<le> norm(g' (z - y)) + 1 / 2 * norm (g z - g y)" |
|
970 |
apply(rule add_left_mono) using d and goal1 by auto |
|
971 |
also have "\<dots> \<le> norm (z - y) * C + 1 / 2 * norm (g z - g y)" |
|
972 |
apply(rule add_right_mono) using C by auto |
|
973 |
finally show ?case unfolding B_def by(auto simp add:field_simps) |
|
974 |
qed |
|
975 |
show ?thesis unfolding has_derivative_at_alt |
|
976 |
proof(rule,rule assms,rule,rule) 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
|
977 |
hence *:"e/B >0" apply-apply(rule divide_pos_pos) using `B>0` by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
978 |
guess d' using lem1[rule_format,OF *] .. note d'=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
979 |
guess k using real_lbound_gt_zero[OF d[THEN conjunct1] d'[THEN conjunct1]] .. note k=this |
44123 | 980 |
show ?case |
981 |
apply(rule_tac x=k in exI,rule) defer |
|
982 |
proof(rule,rule) |
|
983 |
fix z assume as:"norm(z - y) < k" |
|
984 |
hence "norm (g z - g y - g' (z - y)) \<le> e / B * norm(g z - g y)" |
|
985 |
using d' k by auto |
|
986 |
also have "\<dots> \<le> e * norm(z - y)" |
|
987 |
unfolding times_divide_eq_left pos_divide_le_eq[OF `B>0`] |
|
988 |
using lem2[THEN spec[where x=z]] using k as using `e>0` |
|
989 |
by (auto simp add: field_simps) |
|
990 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (z - y)" |
|
991 |
by simp qed(insert k, auto) |
|
992 |
qed |
|
993 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
994 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
995 |
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
|
996 |
|
44123 | 997 |
lemma has_derivative_inverse_basic_x: |
998 |
fixes f::"'b::euclidean_space \<Rightarrow> 'c::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
|
999 |
assumes "(f has_derivative f') (at x)" "bounded_linear g'" "g' o f' = id" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1000 |
"continuous (at (f x)) g" "g(f x) = x" "open t" "f x \<in> t" "\<forall>y\<in>t. f(g y) = y" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1001 |
shows "(g has_derivative g') (at (f(x)))" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1002 |
apply(rule has_derivative_inverse_basic) using assms by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1003 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1004 |
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
|
1005 |
|
44123 | 1006 |
lemma has_derivative_inverse_dieudonne: |
1007 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::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
|
1008 |
assumes "open s" "open (f ` s)" "continuous_on s f" "continuous_on (f ` s) g" "\<forall>x\<in>s. g(f x) = x" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1009 |
(**) "x\<in>s" "(f has_derivative f') (at x)" "bounded_linear g'" "g' o f' = id" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1010 |
shows "(g has_derivative g') (at (f x))" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1011 |
apply(rule has_derivative_inverse_basic_x[OF assms(7-9) _ _ assms(2)]) |
44123 | 1012 |
using assms(3-6) unfolding continuous_on_eq_continuous_at[OF assms(1)] |
1013 |
continuous_on_eq_continuous_at[OF assms(2)] 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
|
1014 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1015 |
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
|
1016 |
|
44123 | 1017 |
lemma has_derivative_inverse: |
1018 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::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
|
1019 |
assumes "compact s" "x \<in> s" "f x \<in> interior(f ` s)" "continuous_on s f" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1020 |
"\<forall>y\<in>s. g(f y) = y" "(f has_derivative f') (at x)" "bounded_linear g'" "g' \<circ> f' = id" |
44123 | 1021 |
shows "(g has_derivative g') (at (f x))" |
1022 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1023 |
{ fix y assume "y\<in>interior (f ` s)" |
44123 | 1024 |
then obtain x where "x\<in>s" and *:"y = f x" |
1025 |
unfolding image_iff using interior_subset by auto |
|
1026 |
have "f (g y) = y" unfolding * and assms(5)[rule_format,OF `x\<in>s`] .. |
|
1027 |
} note * = this |
|
1028 |
show ?thesis |
|
1029 |
apply(rule has_derivative_inverse_basic_x[OF assms(6-8)]) |
|
1030 |
apply(rule continuous_on_interior[OF _ assms(3)]) |
|
1031 |
apply(rule continuous_on_inverse[OF assms(4,1)]) |
|
1032 |
apply(rule assms(2,5) assms(5)[rule_format] open_interior assms(3))+ |
|
1033 |
by(rule, rule *, assumption) |
|
1034 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1035 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1036 |
subsection {* Proving surjectivity via Brouwer fixpoint theorem. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1037 |
|
44123 | 1038 |
lemma brouwer_surjective: |
1039 |
fixes f::"'n::ordered_euclidean_space \<Rightarrow> 'n" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1040 |
assumes "compact t" "convex t" "t \<noteq> {}" "continuous_on t f" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1041 |
"\<forall>x\<in>s. \<forall>y\<in>t. x + (y - f y) \<in> t" "x\<in>s" |
44123 | 1042 |
shows "\<exists>y\<in>t. f y = x" |
1043 |
proof- |
|
1044 |
have *:"\<And>x y. f y = x \<longleftrightarrow> x + (y - f y) = y" |
|
1045 |
by(auto simp add:algebra_simps) |
|
1046 |
show ?thesis |
|
1047 |
unfolding * |
|
1048 |
apply(rule brouwer[OF assms(1-3), of "\<lambda>y. x + (y - f y)"]) |
|
1049 |
apply(rule continuous_on_intros assms)+ using assms(4-6) by auto |
|
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 |
|
44123 | 1052 |
lemma brouwer_surjective_cball: |
1053 |
fixes f::"'n::ordered_euclidean_space \<Rightarrow> 'n" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1054 |
assumes "0 < e" "continuous_on (cball a e) f" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1055 |
"\<forall>x\<in>s. \<forall>y\<in>cball a e. x + (y - f y) \<in> cball a e" "x\<in>s" |
44123 | 1056 |
shows "\<exists>y\<in>cball a e. f y = x" |
1057 |
apply(rule brouwer_surjective) |
|
1058 |
apply(rule compact_cball convex_cball)+ |
|
1059 |
unfolding cball_eq_empty 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
|
1060 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1061 |
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
|
1062 |
|
44123 | 1063 |
lemma sussmann_open_mapping: |
1064 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::ordered_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
|
1065 |
assumes "open s" "continuous_on s f" "x \<in> s" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1066 |
"(f has_derivative f') (at x)" "bounded_linear g'" "f' \<circ> g' = id" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1067 |
"t \<subseteq> s" "x \<in> interior t" |
44123 | 1068 |
shows "f x \<in> interior (f ` t)" |
1069 |
proof- |
|
1070 |
interpret f':bounded_linear f' |
|
1071 |
using assms unfolding has_derivative_def 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
|
1072 |
interpret g':bounded_linear g' using assms by auto |
44123 | 1073 |
guess B using bounded_linear.pos_bounded[OF assms(5)] .. note B=this |
1074 |
hence *:"1/(2*B)>0" by (auto intro!: divide_pos_pos) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1075 |
guess e0 using assms(4)[unfolded has_derivative_at_alt,THEN conjunct2,rule_format,OF *] .. note e0=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1076 |
guess e1 using assms(8)[unfolded mem_interior_cball] .. note e1=this |
44123 | 1077 |
have *:"0<e0/B" "0<e1/B" |
1078 |
apply(rule_tac[!] divide_pos_pos) using e0 e1 B 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
|
1079 |
guess e using real_lbound_gt_zero[OF *] .. note e=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1080 |
have "\<forall>z\<in>cball (f x) (e/2). \<exists>y\<in>cball (f x) e. f (x + g' (y - f x)) = z" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1081 |
apply(rule,rule brouwer_surjective_cball[where s="cball (f x) (e/2)"]) |
44123 | 1082 |
prefer 3 apply(rule,rule) |
1083 |
proof- |
|
1084 |
show "continuous_on (cball (f x) e) (\<lambda>y. f (x + g' (y - f x)))" |
|
1085 |
unfolding g'.diff |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1086 |
apply(rule continuous_on_compose[of _ _ f, unfolded o_def]) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1087 |
apply(rule continuous_on_intros linear_continuous_on[OF assms(5)])+ |
44123 | 1088 |
apply(rule continuous_on_subset[OF assms(2)]) |
1089 |
apply(rule,unfold image_iff,erule bexE) |
|
1090 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1091 |
fix y z assume as:"y \<in>cball (f x) e" "z = x + (g' y - g' (f x))" |
44123 | 1092 |
have "dist x z = norm (g' (f x) - g' y)" |
1093 |
unfolding as(2) and dist_norm by auto |
|
1094 |
also have "\<dots> \<le> norm (f x - y) * B" |
|
1095 |
unfolding g'.diff[THEN sym] using B by auto |
|
1096 |
also have "\<dots> \<le> e * B" |
|
1097 |
using as(1)[unfolded mem_cball dist_norm] using B 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
|
1098 |
also have "\<dots> \<le> e1" using e unfolding less_divide_eq using B by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1099 |
finally have "z\<in>cball x e1" unfolding mem_cball by force |
44123 | 1100 |
thus "z \<in> s" using e1 assms(7) by auto |
1101 |
qed |
|
1102 |
next |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1103 |
fix y z assume as:"y \<in> cball (f x) (e / 2)" "z \<in> cball (f x) e" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1104 |
have "norm (g' (z - f x)) \<le> norm (z - f x) * B" using B by auto |
44123 | 1105 |
also have "\<dots> \<le> e * B" apply(rule mult_right_mono) |
1106 |
using as(2)[unfolded mem_cball dist_norm] and B |
|
1107 |
unfolding norm_minus_commute by auto |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1108 |
also have "\<dots> < e0" using e and B unfolding less_divide_eq by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1109 |
finally have *:"norm (x + g' (z - f x) - x) < e0" by auto |
44123 | 1110 |
have **:"f x + f' (x + g' (z - f x) - x) = z" |
1111 |
using assms(6)[unfolded o_def id_def,THEN cong] 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
|
1112 |
have "norm (f x - (y + (z - f (x + g' (z - f x))))) \<le> norm (f (x + g' (z - f x)) - z) + norm (f x - y)" |
44123 | 1113 |
using norm_triangle_ineq[of "f (x + g'(z - f x)) - z" "f x - y"] |
1114 |
by (auto simp add: algebra_simps) |
|
1115 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + norm (f x - y)" |
|
1116 |
using e0[THEN conjunct2,rule_format,OF *] |
|
1117 |
unfolding algebra_simps ** by auto |
|
1118 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + e/2" |
|
1119 |
using as(1)[unfolded mem_cball dist_norm] by auto |
|
1120 |
also have "\<dots> \<le> 1 / (B * 2) * B * norm (z - f x) + e/2" |
|
1121 |
using * and B by (auto simp add: 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
|
1122 |
also have "\<dots> \<le> 1 / 2 * norm (z - f x) + e/2" by auto |
44123 | 1123 |
also have "\<dots> \<le> e/2 + e/2" apply(rule add_right_mono) |
1124 |
using as(2)[unfolded mem_cball dist_norm] |
|
1125 |
unfolding norm_minus_commute by auto |
|
1126 |
finally show "y + (z - f (x + g' (z - f x))) \<in> cball (f x) e" |
|
1127 |
unfolding mem_cball 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
|
1128 |
qed(insert e, auto) note lem = this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1129 |
show ?thesis unfolding mem_interior apply(rule_tac x="e/2" in exI) |
44123 | 1130 |
apply(rule,rule divide_pos_pos) prefer 3 |
1131 |
proof |
|
1132 |
fix y assume "y \<in> ball (f x) (e/2)" |
|
1133 |
hence *:"y\<in>cball (f x) (e/2)" 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
|
1134 |
guess z using lem[rule_format,OF *] .. note z=this |
44123 | 1135 |
hence "norm (g' (z - f x)) \<le> norm (z - f x) * B" |
1136 |
using B by (auto simp add: field_simps) |
|
1137 |
also have "\<dots> \<le> e * B" |
|
1138 |
apply (rule mult_right_mono) using z(1) |
|
1139 |
unfolding mem_cball dist_norm norm_minus_commute using B 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
|
1140 |
also have "\<dots> \<le> e1" using e B unfolding less_divide_eq by auto |
44123 | 1141 |
finally have "x + g'(z - f x) \<in> t" apply- |
1142 |
apply(rule e1[THEN conjunct2,unfolded subset_eq,rule_format]) |
|
36587 | 1143 |
unfolding mem_cball dist_norm by auto |
44123 | 1144 |
thus "y \<in> f ` t" using z by auto |
1145 |
qed(insert e, auto) |
|
1146 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1147 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1148 |
text {* Hence the following eccentric variant of the inverse function theorem. *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1149 |
(* This has no continuity assumptions, but we do need the inverse function. *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1150 |
(* We could put f' o g = I but this happens to fit with the minimal linear *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1151 |
(* algebra theory I've set up so far. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1152 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1153 |
(* 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
|
1154 |
|
44123 | 1155 |
lemma right_inverse_linear: |
1156 |
fixes f::"'a::euclidean_space => 'a" |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1157 |
assumes lf: "linear f" and gf: "f o g = id" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1158 |
shows "linear g" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1159 |
proof- |
40702 | 1160 |
from gf have fi: "surj f" by (auto simp add: surj_def o_def id_def) metis |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1161 |
from linear_surjective_isomorphism[OF lf fi] |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1162 |
obtain h:: "'a => 'a" where |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1163 |
h: "linear h" "\<forall>x. h (f x) = x" "\<forall>x. f (h x) = x" by blast |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1164 |
have "h = g" apply (rule ext) using gf h(2,3) |
40702 | 1165 |
by (simp add: o_def id_def fun_eq_iff) metis |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1166 |
with h(1) show ?thesis by blast |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1167 |
qed |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1168 |
|
44123 | 1169 |
lemma has_derivative_inverse_strong: |
1170 |
fixes f::"'n::ordered_euclidean_space \<Rightarrow> 'n" |
|
1171 |
assumes "open s" and "x \<in> s" and "continuous_on s f" |
|
1172 |
assumes "\<forall>x\<in>s. g(f x) = x" "(f has_derivative f') (at x)" and "f' o g' = id" |
|
1173 |
shows "(g has_derivative g') (at (f x))" |
|
1174 |
proof- |
|
1175 |
have linf:"bounded_linear f'" |
|
1176 |
using assms(5) unfolding has_derivative_def by auto |
|
1177 |
hence ling:"bounded_linear g'" |
|
1178 |
unfolding linear_conv_bounded_linear[THEN sym] |
|
1179 |
apply- apply(rule right_inverse_linear) using assms(6) by auto |
|
1180 |
moreover have "g' \<circ> f' = id" using assms(6) linf ling |
|
1181 |
unfolding linear_conv_bounded_linear[THEN sym] |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1182 |
using linear_inverse_left by auto |
44123 | 1183 |
moreover have *:"\<forall>t\<subseteq>s. x\<in>interior t \<longrightarrow> f x \<in> interior (f ` t)" |
1184 |
apply(rule,rule,rule,rule sussmann_open_mapping ) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1185 |
apply(rule assms ling)+ by auto |
44123 | 1186 |
have "continuous (at (f x)) g" unfolding continuous_at Lim_at |
1187 |
proof(rule,rule) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1188 |
fix e::real assume "e>0" |
44123 | 1189 |
hence "f x \<in> interior (f ` (ball x e \<inter> s))" |
1190 |
using *[rule_format,of "ball x e \<inter> s"] `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
|
1191 |
by(auto simp add: interior_open[OF open_ball] interior_open[OF assms(1)]) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1192 |
then guess d unfolding mem_interior .. note d=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1193 |
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" |
44123 | 1194 |
apply(rule_tac x=d in exI) |
1195 |
apply(rule,rule d[THEN conjunct1]) |
|
1196 |
proof(rule,rule) case goal1 |
|
1197 |
hence "g y \<in> g ` f ` (ball x e \<inter> s)" |
|
1198 |
using d[THEN conjunct2,unfolded subset_eq,THEN bspec[where x=y]] |
|
41958 | 1199 |
by(auto simp add:dist_commute) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1200 |
hence "g y \<in> ball x e \<inter> s" using assms(4) by auto |
44123 | 1201 |
thus "dist (g y) (g (f x)) < e" |
1202 |
using assms(4)[rule_format,OF `x\<in>s`] |
|
1203 |
by (auto simp add: dist_commute) |
|
1204 |
qed |
|
1205 |
qed |
|
1206 |
moreover have "f x \<in> interior (f ` s)" |
|
1207 |
apply(rule sussmann_open_mapping) |
|
1208 |
apply(rule assms ling)+ |
|
1209 |
using interior_open[OF assms(1)] and `x\<in>s` by auto |
|
1210 |
moreover have "\<And>y. y \<in> interior (f ` s) \<Longrightarrow> f (g y) = y" |
|
1211 |
proof- case goal1 |
|
1212 |
hence "y\<in>f ` s" using interior_subset by auto |
|
1213 |
then guess z unfolding image_iff .. |
|
1214 |
thus ?case using assms(4) by auto |
|
1215 |
qed |
|
1216 |
ultimately show ?thesis |
|
1217 |
apply- apply(rule has_derivative_inverse_basic_x[OF assms(5)]) |
|
1218 |
using assms by auto |
|
1219 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1220 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1221 |
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
|
1222 |
|
44123 | 1223 |
lemma has_derivative_inverse_strong_x: |
1224 |
fixes f::"'a::ordered_euclidean_space \<Rightarrow> 'a" |
|
1225 |
assumes "open s" and "g y \<in> s" and "continuous_on s f" |
|
1226 |
assumes "\<forall>x\<in>s. g(f x) = x" "(f has_derivative f') (at (g y))" |
|
1227 |
assumes "f' o g' = id" 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
|
1228 |
shows "(g has_derivative g') (at y)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1229 |
using has_derivative_inverse_strong[OF assms(1-6)] unfolding assms(7) by simp |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1230 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1231 |
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
|
1232 |
|
44123 | 1233 |
lemma has_derivative_inverse_on: |
1234 |
fixes f::"'n::ordered_euclidean_space \<Rightarrow> 'n" |
|
1235 |
assumes "open s" and "\<forall>x\<in>s. (f has_derivative f'(x)) (at x)" |
|
1236 |
assumes "\<forall>x\<in>s. g(f x) = x" and "f'(x) o g'(x) = id" 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
|
1237 |
shows "(g has_derivative g'(x)) (at (f x))" |
44123 | 1238 |
apply(rule has_derivative_inverse_strong[where g'="g' x" and f=f]) |
1239 |
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
|
1240 |
unfolding continuous_on_eq_continuous_at[OF assms(1)] |
44123 | 1241 |
apply(rule,rule differentiable_imp_continuous_at) |
1242 |
unfolding differentiable_def 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
|
1243 |
|
44123 | 1244 |
text {* Invertible derivative continous at a point implies local |
1245 |
injectivity. It's only for this we need continuity of the derivative, |
|
1246 |
except of course if we want the fact that the inverse derivative is |
|
1247 |
also continuous. So if we know for some other reason that the inverse |
|
1248 |
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
|
1249 |
|
44123 | 1250 |
lemma bounded_linear_sub: |
1251 |
"bounded_linear f \<Longrightarrow> bounded_linear g ==> bounded_linear (\<lambda>x. f x - g x)" |
|
1252 |
using bounded_linear_add[of f "\<lambda>x. - g x"] bounded_linear_minus[of g] |
|
1253 |
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
|
1254 |
|
44123 | 1255 |
lemma has_derivative_locally_injective: |
1256 |
fixes f::"'n::euclidean_space \<Rightarrow> 'm::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
|
1257 |
assumes "a \<in> s" "open s" "bounded_linear g'" "g' o f'(a) = id" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1258 |
"\<forall>x\<in>s. (f has_derivative f'(x)) (at x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1259 |
"\<forall>e>0. \<exists>d>0. \<forall>x. dist a x < d \<longrightarrow> onorm(\<lambda>v. f' x v - f' a v) < e" |
44123 | 1260 |
obtains t where "a \<in> t" "open t" "\<forall>x\<in>t. \<forall>x'\<in>t. (f x' = f x) \<longrightarrow> (x' = x)" |
1261 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1262 |
interpret bounded_linear g' using assms by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1263 |
note f'g' = assms(4)[unfolded id_def o_def,THEN cong] |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1264 |
have "g' (f' a (\<chi>\<chi> i.1)) = (\<chi>\<chi> i.1)" "(\<chi>\<chi> i.1) \<noteq> (0::'n)" defer |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1265 |
apply(subst euclidean_eq) using f'g' by auto |
44123 | 1266 |
hence *:"0 < onorm g'" |
1267 |
unfolding onorm_pos_lt[OF assms(3)[unfolded linear_linear]] by fastsimp |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1268 |
def k \<equiv> "1 / onorm g' / 2" have *:"k>0" unfolding k_def using * by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1269 |
guess d1 using assms(6)[rule_format,OF *] .. note d1=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1270 |
from `open s` obtain d2 where "d2>0" "ball a d2 \<subseteq> s" using `a\<in>s` .. |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1271 |
obtain d2 where "d2>0" "ball a d2 \<subseteq> s" using assms(2,1) .. |
44123 | 1272 |
guess d2 using assms(2)[unfolded open_contains_ball,rule_format,OF `a\<in>s`] .. |
1273 |
note d2=this |
|
1274 |
guess d using real_lbound_gt_zero[OF d1[THEN conjunct1] d2[THEN conjunct1]] .. |
|
1275 |
note d = this |
|
1276 |
show ?thesis |
|
1277 |
proof |
|
1278 |
show "a\<in>ball a d" using d by auto |
|
1279 |
show "\<forall>x\<in>ball a d. \<forall>x'\<in>ball a d. f x' = f x \<longrightarrow> x' = x" |
|
1280 |
proof (intro strip) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1281 |
fix x y assume as:"x\<in>ball a d" "y\<in>ball a d" "f x = f y" |
44123 | 1282 |
def ph \<equiv> "\<lambda>w. w - g'(f w - f x)" |
1283 |
have ph':"ph = g' \<circ> (\<lambda>w. f' a w - (f w - f x))" |
|
1284 |
unfolding ph_def o_def unfolding diff using f'g' |
|
1285 |
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
|
1286 |
have "norm (ph x - ph y) \<le> (1/2) * norm (x - y)" |
41958 | 1287 |
apply(rule differentiable_bound[OF convex_ball _ _ as(1-2), where f'="\<lambda>x v. v - g'(f' x v)"]) |
44123 | 1288 |
apply(rule_tac[!] ballI) |
1289 |
proof- |
|
1290 |
fix u assume u:"u \<in> ball a d" |
|
1291 |
hence "u\<in>s" using d d2 by auto |
|
1292 |
have *:"(\<lambda>v. v - g' (f' u v)) = g' \<circ> (\<lambda>w. f' a w - f' u w)" |
|
1293 |
unfolding o_def and diff using f'g' by auto |
|
41958 | 1294 |
show "(ph has_derivative (\<lambda>v. v - g' (f' u v))) (at u within ball a d)" |
44123 | 1295 |
unfolding ph' * apply(rule diff_chain_within) defer |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
1296 |
apply(rule bounded_linear.has_derivative'[OF assms(3)]) |
44123 | 1297 |
apply(rule has_derivative_intros) defer |
1298 |
apply(rule has_derivative_sub[where g'="\<lambda>x.0",unfolded diff_0_right]) |
|
1299 |
apply(rule has_derivative_at_within) |
|
1300 |
using assms(5) and `u\<in>s` `a\<in>s` |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
1301 |
by(auto intro!: has_derivative_intros bounded_linear.has_derivative' derivative_linear) |
44123 | 1302 |
have **:"bounded_linear (\<lambda>x. f' u x - f' a x)" |
1303 |
"bounded_linear (\<lambda>x. f' a x - f' u x)" |
|
1304 |
apply(rule_tac[!] bounded_linear_sub) |
|
1305 |
apply(rule_tac[!] derivative_linear) |
|
1306 |
using assms(5) `u\<in>s` `a\<in>s` by auto |
|
1307 |
have "onorm (\<lambda>v. v - g' (f' u v)) \<le> onorm g' * onorm (\<lambda>w. f' a w - f' u w)" |
|
1308 |
unfolding * apply(rule onorm_compose) |
|
1309 |
unfolding linear_conv_bounded_linear by(rule assms(3) **)+ |
|
1310 |
also have "\<dots> \<le> onorm g' * k" |
|
1311 |
apply(rule mult_left_mono) |
|
1312 |
using d1[THEN conjunct2,rule_format,of u] |
|
1313 |
using onorm_neg[OF **(1)[unfolded linear_linear]] |
|
1314 |
using d and u and onorm_pos_le[OF assms(3)[unfolded linear_linear]] |
|
1315 |
by (auto simp add: algebra_simps) |
|
41958 | 1316 |
also have "\<dots> \<le> 1/2" unfolding k_def by auto |
44123 | 1317 |
finally show "onorm (\<lambda>v. v - g' (f' u v)) \<le> 1 / 2" by assumption |
1318 |
qed |
|
1319 |
moreover have "norm (ph y - ph x) = norm (y - x)" |
|
1320 |
apply(rule arg_cong[where f=norm]) |
|
41958 | 1321 |
unfolding ph_def using diff unfolding as by auto |
44123 | 1322 |
ultimately show "x = y" unfolding norm_minus_commute by auto |
1323 |
qed |
|
1324 |
qed auto |
|
1325 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1326 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1327 |
subsection {* Uniformly convergent sequence of derivatives. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1328 |
|
44123 | 1329 |
lemma has_derivative_sequence_lipschitz_lemma: |
1330 |
fixes f::"nat \<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1331 |
assumes "convex s" |
|
1332 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1333 |
assumes "\<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm(f' n x h - g' x h) \<le> e * norm(h)" |
|
1334 |
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)" |
|
1335 |
proof (default)+ |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1336 |
fix m n x y assume as:"N\<le>m" "N\<le>n" "x\<in>s" "y\<in>s" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1337 |
show "norm((f m x - f n x) - (f m y - f n y)) \<le> 2 * e * norm(x - y)" |
44123 | 1338 |
apply(rule differentiable_bound[where f'="\<lambda>x h. f' m x h - f' n x h", OF assms(1) _ _ as(3-4)]) |
1339 |
apply(rule_tac[!] ballI) |
|
1340 |
proof- |
|
1341 |
fix x assume "x\<in>s" |
|
1342 |
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)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1343 |
by(rule has_derivative_intros assms(2)[rule_format] `x\<in>s`)+ |
44123 | 1344 |
{ fix h |
1345 |
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)" |
|
1346 |
using norm_triangle_ineq[of "f' m x h - g' x h" "- f' n x h + g' x h"] |
|
1347 |
unfolding norm_minus_commute by (auto simp add: algebra_simps) |
|
1348 |
also have "\<dots> \<le> e * norm h+ e * norm h" |
|
1349 |
using assms(3)[rule_format,OF `N\<le>m` `x\<in>s`, of h] |
|
1350 |
using assms(3)[rule_format,OF `N\<le>n` `x\<in>s`, of h] |
|
41958 | 1351 |
by(auto simp add: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
|
1352 |
finally have "norm (f' m x h - f' n x h) \<le> 2 * e * norm h" by auto } |
44123 | 1353 |
thus "onorm (\<lambda>h. f' m x h - f' n x h) \<le> 2 * e" |
1354 |
apply-apply(rule onorm(2)) apply(rule linear_compose_sub) |
|
1355 |
unfolding linear_conv_bounded_linear |
|
1356 |
using assms(2)[rule_format,OF `x\<in>s`, THEN derivative_linear] |
|
1357 |
by auto |
|
1358 |
qed |
|
1359 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1360 |
|
44123 | 1361 |
lemma has_derivative_sequence_lipschitz: |
1362 |
fixes f::"nat \<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1363 |
assumes "convex s" |
|
1364 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1365 |
assumes "\<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)" |
|
1366 |
assumes "0 < e" |
|
1367 |
shows "\<forall>e>0. \<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>y\<in>s. norm((f m x - f n x) - (f m y - f n y)) \<le> e * norm(x - y)" |
|
1368 |
proof(rule,rule) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1369 |
case goal1 have *:"2 * (1/2* e) = e" "1/2 * e >0" using `e>0` by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1370 |
guess N using assms(3)[rule_format,OF *(2)] .. |
44123 | 1371 |
thus ?case |
1372 |
apply(rule_tac x=N in exI) |
|
1373 |
apply(rule has_derivative_sequence_lipschitz_lemma[where e="1/2 *e", unfolded *]) |
|
1374 |
using assms by auto |
|
1375 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1376 |
|
44123 | 1377 |
lemma has_derivative_sequence: |
1378 |
fixes f::"nat\<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1379 |
assumes "convex s" |
|
1380 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1381 |
assumes "\<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)" |
|
1382 |
assumes "x0 \<in> s" and "((\<lambda>n. f n x0) ---> l) sequentially" |
|
1383 |
shows "\<exists>g. \<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially \<and> |
|
1384 |
(g has_derivative g'(x)) (at x within s)" |
|
1385 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1386 |
have lem1:"\<forall>e>0. \<exists>N. \<forall>m\<ge>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>y\<in>s. norm((f m x - f n x) - (f m y - f n y)) \<le> e * norm(x - y)" |
44123 | 1387 |
apply(rule has_derivative_sequence_lipschitz[where e="42::nat"]) |
1388 |
apply(rule assms)+ by auto |
|
1389 |
have "\<exists>g. \<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially" |
|
1390 |
apply(rule bchoice) unfolding convergent_eq_cauchy |
|
1391 |
proof |
|
1392 |
fix x assume "x\<in>s" show "Cauchy (\<lambda>n. f n x)" |
|
1393 |
proof(cases "x=x0") |
|
1394 |
case True thus ?thesis using convergent_imp_cauchy[OF assms(5)] by auto |
|
1395 |
next |
|
1396 |
case False show ?thesis unfolding Cauchy_def |
|
1397 |
proof(rule,rule) |
|
1398 |
fix e::real assume "e>0" |
|
1399 |
hence *:"e/2>0" "e/2/norm(x-x0)>0" |
|
1400 |
using False by (auto intro!: divide_pos_pos) |
|
41958 | 1401 |
guess M using convergent_imp_cauchy[OF assms(5), unfolded Cauchy_def, rule_format,OF *(1)] .. note M=this |
1402 |
guess N using lem1[rule_format,OF *(2)] .. note N = this |
|
44123 | 1403 |
show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (f m x) (f n x) < e" |
1404 |
apply(rule_tac x="max M N" in exI) |
|
1405 |
proof(default+) |
|
41958 | 1406 |
fix m n assume as:"max M N \<le>m" "max M N\<le>n" |
1407 |
have "dist (f m x) (f n x) \<le> norm (f m x0 - f n x0) + norm (f m x - f n x - (f m x0 - f n x0))" |
|
1408 |
unfolding dist_norm by(rule norm_triangle_sub) |
|
44123 | 1409 |
also have "\<dots> \<le> norm (f m x0 - f n x0) + e / 2" |
1410 |
using N[rule_format,OF _ _ `x\<in>s` `x0\<in>s`, of m n] and as and False |
|
1411 |
by auto |
|
1412 |
also have "\<dots> < e / 2 + e / 2" |
|
1413 |
apply(rule add_strict_right_mono) |
|
1414 |
using as and M[rule_format] unfolding dist_norm by auto |
|
1415 |
finally show "dist (f m x) (f n x) < e" by auto |
|
1416 |
qed |
|
1417 |
qed |
|
1418 |
qed |
|
1419 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1420 |
then guess g .. note g = this |
44123 | 1421 |
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)" |
1422 |
proof(rule,rule) |
|
1423 |
fix e::real assume *:"e>0" |
|
1424 |
guess N using lem1[rule_format,OF *] .. note N=this |
|
1425 |
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)" |
|
1426 |
apply(rule_tac x=N in exI) |
|
1427 |
proof(default+) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1428 |
fix n x y assume as:"N \<le> n" "x \<in> s" "y \<in> s" |
44123 | 1429 |
have "eventually (\<lambda>xa. norm (f n x - f n y - (f xa x - f xa y)) \<le> e * norm (x - y)) sequentially" |
1430 |
unfolding eventually_sequentially |
|
1431 |
apply(rule_tac x=N in exI) |
|
1432 |
proof(rule,rule) |
|
1433 |
fix m assume "N\<le>m" |
|
1434 |
thus "norm (f n x - f n y - (f m x - f m y)) \<le> e * norm (x - y)" |
|
1435 |
using N[rule_format, of n m x y] and as |
|
1436 |
by (auto simp add: algebra_simps) |
|
1437 |
qed |
|
1438 |
thus "norm (f n x - f n y - (g x - g y)) \<le> e * norm (x - y)" |
|
1439 |
apply- |
|
41958 | 1440 |
apply(rule Lim_norm_ubound[OF trivial_limit_sequentially, where f="\<lambda>m. (f n x - f n y) - (f m x - f m y)"]) |
44125 | 1441 |
apply(rule tendsto_intros g[rule_format] as)+ by assumption |
44123 | 1442 |
qed |
1443 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1444 |
show ?thesis unfolding has_derivative_within_alt apply(rule_tac x=g in exI) |
44123 | 1445 |
apply(rule,rule,rule g[rule_format],assumption) |
1446 |
proof fix x assume "x\<in>s" |
|
1447 |
have lem3:"\<forall>u. ((\<lambda>n. f' n x u) ---> g' x u) sequentially" |
|
1448 |
unfolding Lim_sequentially |
|
1449 |
proof(rule,rule,rule) |
|
1450 |
fix u and e::real assume "e>0" |
|
1451 |
show "\<exists>N. \<forall>n\<ge>N. dist (f' n x u) (g' x u) < e" |
|
1452 |
proof(cases "u=0") |
|
41958 | 1453 |
case True guess N using assms(3)[rule_format,OF `e>0`] .. note N=this |
1454 |
show ?thesis apply(rule_tac x=N in exI) unfolding True |
|
44123 | 1455 |
using N[rule_format,OF _ `x\<in>s`,of _ 0] and `e>0` by auto |
1456 |
next |
|
1457 |
case False hence *:"e / 2 / norm u > 0" |
|
1458 |
using `e>0` by (auto intro!: divide_pos_pos) |
|
41958 | 1459 |
guess N using assms(3)[rule_format,OF *] .. note N=this |
44123 | 1460 |
show ?thesis apply(rule_tac x=N in exI) |
1461 |
proof(rule,rule) case goal1 |
|
1462 |
show ?case unfolding dist_norm |
|
1463 |
using N[rule_format,OF goal1 `x\<in>s`, of u] False `e>0` |
|
1464 |
by (auto simp add:field_simps) |
|
1465 |
qed |
|
1466 |
qed |
|
1467 |
qed |
|
1468 |
show "bounded_linear (g' x)" |
|
1469 |
unfolding linear_linear linear_def |
|
1470 |
apply(rule,rule,rule) defer |
|
1471 |
proof(rule,rule) |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1472 |
fix x' y z::"'m" and c::real |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1473 |
note lin = assms(2)[rule_format,OF `x\<in>s`,THEN derivative_linear] |
44123 | 1474 |
show "g' x (c *\<^sub>R x') = c *\<^sub>R g' x x'" |
1475 |
apply(rule tendsto_unique[OF trivial_limit_sequentially]) |
|
41958 | 1476 |
apply(rule lem3[rule_format]) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1477 |
unfolding lin[unfolded bounded_linear_def bounded_linear_axioms_def,THEN conjunct2,THEN conjunct1,rule_format] |
44125 | 1478 |
apply (intro tendsto_intros) by(rule lem3[rule_format]) |
44123 | 1479 |
show "g' x (y + z) = g' x y + g' x z" |
1480 |
apply(rule tendsto_unique[OF trivial_limit_sequentially]) |
|
1481 |
apply(rule lem3[rule_format]) |
|
1482 |
unfolding lin[unfolded bounded_linear_def additive_def,THEN conjunct1,rule_format] |
|
44125 | 1483 |
apply(rule tendsto_add) by(rule lem3[rule_format])+ |
44123 | 1484 |
qed |
1485 |
show "\<forall>e>0. \<exists>d>0. \<forall>y\<in>s. norm (y - x) < d \<longrightarrow> norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)" |
|
1486 |
proof(rule,rule) case goal1 |
|
1487 |
have *:"e/3>0" using goal1 by auto |
|
1488 |
guess N1 using assms(3)[rule_format,OF *] .. note N1=this |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1489 |
guess N2 using lem2[rule_format,OF *] .. note N2=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1490 |
guess d1 using assms(2)[unfolded has_derivative_within_alt, rule_format,OF `x\<in>s`, of "max N1 N2",THEN conjunct2,rule_format,OF *] .. note d1=this |
44123 | 1491 |
show ?case apply(rule_tac x=d1 in exI) apply(rule,rule d1[THEN conjunct1]) |
1492 |
proof(rule,rule) |
|
1493 |
fix y assume as:"y \<in> s" "norm (y - x) < d1" |
|
1494 |
let ?N ="max N1 N2" |
|
1495 |
have "norm (g y - g x - (f ?N y - f ?N x)) \<le> e /3 * norm (y - x)" |
|
1496 |
apply(subst norm_minus_cancel[THEN sym]) |
|
1497 |
using N2[rule_format, OF _ `y\<in>s` `x\<in>s`, of ?N] by auto |
|
1498 |
moreover |
|
1499 |
have "norm (f ?N y - f ?N x - f' ?N x (y - x)) \<le> e / 3 * norm (y - x)" |
|
1500 |
using d1 and as by auto |
|
1501 |
ultimately |
|
41958 | 1502 |
have "norm (g y - g x - f' ?N x (y - x)) \<le> 2 * e / 3 * norm (y - x)" |
44123 | 1503 |
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)"] |
1504 |
by (auto simp add:algebra_simps) |
|
1505 |
moreover |
|
1506 |
have " norm (f' ?N x (y - x) - g' x (y - x)) \<le> e / 3 * norm (y - x)" |
|
1507 |
using N1 `x\<in>s` by auto |
|
41958 | 1508 |
ultimately show "norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)" |
44123 | 1509 |
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)"] |
1510 |
by(auto simp add:algebra_simps) |
|
1511 |
qed |
|
1512 |
qed |
|
1513 |
qed |
|
1514 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1515 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1516 |
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
|
1517 |
|
44123 | 1518 |
lemma has_antiderivative_sequence: |
1519 |
fixes f::"nat\<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1520 |
assumes "convex s" |
|
1521 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1522 |
assumes "\<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" |
|
1523 |
shows "\<exists>g. \<forall>x\<in>s. (g has_derivative g'(x)) (at x within s)" |
|
1524 |
proof(cases "s={}") |
|
1525 |
case False then obtain a where "a\<in>s" by auto |
|
1526 |
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" by auto |
|
1527 |
show ?thesis |
|
1528 |
apply(rule *) |
|
1529 |
apply(rule has_derivative_sequence[OF assms(1) _ assms(3), of "\<lambda>n x. f n x + (f 0 a - f n a)"]) |
|
1530 |
apply(rule,rule) |
|
1531 |
apply(rule has_derivative_add_const, rule assms(2)[rule_format], assumption) |
|
44125 | 1532 |
apply(rule `a\<in>s`) by(auto intro!: tendsto_const) |
44123 | 1533 |
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
|
1534 |
|
44123 | 1535 |
lemma has_antiderivative_limit: |
1536 |
fixes g'::"'m::euclidean_space \<Rightarrow> 'm \<Rightarrow> 'n::euclidean_space" |
|
1537 |
assumes "convex s" |
|
1538 |
assumes "\<forall>e>0. \<exists>f f'. \<forall>x\<in>s. (f has_derivative (f' x)) (at x within s) \<and> (\<forall>h. norm(f' x h - g' x h) \<le> e * norm(h))" |
|
1539 |
shows "\<exists>g. \<forall>x\<in>s. (g has_derivative g'(x)) (at x within s)" |
|
1540 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1541 |
have *:"\<forall>n. \<exists>f f'. \<forall>x\<in>s. (f has_derivative (f' x)) (at x within s) \<and> (\<forall>h. norm(f' x h - g' x h) \<le> inverse (real (Suc n)) * norm(h))" |
44123 | 1542 |
apply(rule) using assms(2) |
1543 |
apply(erule_tac x="inverse (real (Suc n))" in allE) by auto |
|
1544 |
guess f using *[THEN choice] .. note * = this |
|
1545 |
guess f' using *[THEN choice] .. note f=this |
|
1546 |
show ?thesis apply(rule has_antiderivative_sequence[OF assms(1), of f f']) defer |
|
1547 |
proof(rule,rule) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1548 |
fix e::real assume "0<e" guess N using reals_Archimedean[OF `e>0`] .. note N=this |
44123 | 1549 |
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" |
1550 |
apply(rule_tac x=N in exI) |
|
1551 |
proof(default+) |
|
1552 |
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
|
1553 |
have *:"inverse (real (Suc n)) \<le> e" apply(rule order_trans[OF _ N[THEN less_imp_le]]) |
41958 | 1554 |
using goal1(1) by(auto simp add:field_simps) |
44123 | 1555 |
show ?case |
1556 |
using f[rule_format,THEN conjunct2,OF goal1(2), of n, THEN spec[where x=h]] |
|
1557 |
apply(rule order_trans) using N * apply(cases "h=0") by auto |
|
1558 |
qed |
|
1559 |
qed(insert f,auto) |
|
1560 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1561 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1562 |
subsection {* Differentiation of a series. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1563 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1564 |
definition sums_seq :: "(nat \<Rightarrow> 'a::real_normed_vector) \<Rightarrow> 'a \<Rightarrow> (nat set) \<Rightarrow> bool" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1565 |
(infixl "sums'_seq" 12) where "(f sums_seq l) s \<equiv> ((\<lambda>n. setsum f (s \<inter> {0..n})) ---> l) sequentially" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1566 |
|
44123 | 1567 |
lemma has_derivative_series: |
1568 |
fixes f::"nat \<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1569 |
assumes "convex s" |
|
1570 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1571 |
assumes "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm(setsum (\<lambda>i. f' i x h) (k \<inter> {0..n}) - g' x h) \<le> e * norm(h)" |
|
1572 |
assumes "x\<in>s" and "((\<lambda>n. f n x) sums_seq l) k" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1573 |
shows "\<exists>g. \<forall>x\<in>s. ((\<lambda>n. f n x) sums_seq (g x)) k \<and> (g has_derivative g'(x)) (at x within s)" |
44123 | 1574 |
unfolding sums_seq_def |
1575 |
apply(rule has_derivative_sequence[OF assms(1) _ assms(3)]) |
|
1576 |
apply(rule,rule) |
|
1577 |
apply(rule has_derivative_setsum) defer |
|
1578 |
apply(rule,rule assms(2)[rule_format],assumption) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1579 |
using assms(4-5) unfolding sums_seq_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1580 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1581 |
subsection {* Derivative with composed bilinear function. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1582 |
|
37650 | 1583 |
lemma has_derivative_bilinear_within: |
44123 | 1584 |
assumes "(f has_derivative f') (at x within s)" |
1585 |
assumes "(g has_derivative g') (at x within s)" |
|
1586 |
assumes "bounded_bilinear h" |
|
1587 |
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)" |
|
1588 |
proof- |
|
1589 |
have "(g ---> g x) (at x within s)" |
|
1590 |
apply(rule differentiable_imp_continuous_within[unfolded continuous_within]) |
|
1591 |
using assms(2) unfolding differentiable_def by auto |
|
1592 |
moreover |
|
1593 |
interpret f':bounded_linear f' |
|
1594 |
using assms unfolding has_derivative_def by auto |
|
1595 |
interpret g':bounded_linear g' |
|
1596 |
using assms unfolding has_derivative_def by auto |
|
1597 |
interpret h:bounded_bilinear h |
|
1598 |
using assms by auto |
|
1599 |
have "((\<lambda>y. f' (y - x)) ---> 0) (at x within s)" |
|
1600 |
unfolding f'.zero[THEN sym] |
|
44125 | 1601 |
using bounded_linear.tendsto [of f' "\<lambda>y. y - x" 0 "at x within s"] |
1602 |
using tendsto_diff [OF Lim_within_id tendsto_const, of x x s] |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1603 |
unfolding id_def using assms(1) unfolding has_derivative_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1604 |
hence "((\<lambda>y. f x + f' (y - x)) ---> f x) (at x within s)" |
44125 | 1605 |
using tendsto_add[OF tendsto_const, of "\<lambda>y. f' (y - x)" 0 "at x within s" "f x"] |
44123 | 1606 |
by auto |
1607 |
ultimately |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1608 |
have *:"((\<lambda>x'. h (f x + f' (x' - x)) ((1/(norm (x' - x))) *\<^sub>R (g x' - (g x + g' (x' - x)))) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1609 |
+ h ((1/ (norm (x' - x))) *\<^sub>R (f x' - (f x + f' (x' - x)))) (g x')) ---> h (f x) 0 + h 0 (g x)) (at x within s)" |
44125 | 1610 |
apply-apply(rule tendsto_add) apply(rule_tac[!] Lim_bilinear[OF _ _ assms(3)]) |
44123 | 1611 |
using assms(1-2) unfolding has_derivative_within 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
|
1612 |
guess B using bounded_bilinear.pos_bounded[OF assms(3)] .. note B=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1613 |
guess C using f'.pos_bounded .. note C=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1614 |
guess D using g'.pos_bounded .. note D=this |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1615 |
have bcd:"B * C * D > 0" using B C D by (auto intro!: mult_pos_pos) |
44123 | 1616 |
have **:"((\<lambda>y. (1/(norm(y - x))) *\<^sub>R (h (f'(y - x)) (g'(y - x)))) ---> 0) (at x within s)" |
1617 |
unfolding Lim_within |
|
1618 |
proof(rule,rule) 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
|
1619 |
hence "e/(B*C*D)>0" using B C D by(auto intro!:divide_pos_pos mult_pos_pos) |
44123 | 1620 |
thus ?case apply(rule_tac x="e/(B*C*D)" in exI,rule) |
1621 |
proof(rule,rule,erule conjE) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1622 |
fix y assume as:"y \<in> s" "0 < dist y x" "dist y x < e / (B * C * D)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1623 |
have "norm (h (f' (y - x)) (g' (y - x))) \<le> norm (f' (y - x)) * norm (g' (y - x)) * B" using B by auto |
44123 | 1624 |
also have "\<dots> \<le> (norm (y - x) * C) * (D * norm (y - x)) * B" |
1625 |
apply(rule mult_right_mono) |
|
1626 |
apply(rule mult_mono) using B C D |
|
1627 |
by (auto simp add: field_simps intro!:mult_nonneg_nonneg) |
|
1628 |
also have "\<dots> = (B * C * D * norm (y - x)) * norm (y - x)" |
|
1629 |
by (auto simp add: field_simps) |
|
1630 |
also have "\<dots> < e * norm (y - x)" |
|
1631 |
apply(rule mult_strict_right_mono) |
|
1632 |
using as(3)[unfolded dist_norm] and as(2) |
|
1633 |
unfolding pos_less_divide_eq[OF bcd] by (auto simp add: 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
|
1634 |
finally show "dist ((1 / norm (y - x)) *\<^sub>R h (f' (y - x)) (g' (y - x))) 0 < e" |
44123 | 1635 |
unfolding dist_norm apply-apply(cases "y = x") |
1636 |
by(auto simp add: field_simps) |
|
1637 |
qed |
|
1638 |
qed |
|
37650 | 1639 |
have "bounded_linear (\<lambda>d. h (f x) (g' d) + h (f' d) (g x))" |
1640 |
apply (rule bounded_linear_add) |
|
1641 |
apply (rule bounded_linear_compose [OF h.bounded_linear_right `bounded_linear g'`]) |
|
1642 |
apply (rule bounded_linear_compose [OF h.bounded_linear_left `bounded_linear f'`]) |
|
1643 |
done |
|
44125 | 1644 |
thus ?thesis using tendsto_add[OF * **] unfolding has_derivative_within |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1645 |
unfolding g'.add f'.scaleR f'.add g'.scaleR f'.diff g'.diff |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1646 |
h.add_right h.add_left scaleR_right_distrib h.scaleR_left h.scaleR_right h.diff_right h.diff_left |
44123 | 1647 |
scaleR_right_diff_distrib h.zero_right h.zero_left |
1648 |
by(auto simp add:field_simps) |
|
1649 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1650 |
|
37650 | 1651 |
lemma has_derivative_bilinear_at: |
44123 | 1652 |
assumes "(f has_derivative f') (at x)" |
1653 |
assumes "(g has_derivative g') (at x)" |
|
1654 |
assumes "bounded_bilinear h" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1655 |
shows "((\<lambda>x. h (f x) (g x)) has_derivative (\<lambda>d. h (f x) (g' d) + h (f' d) (g x))) (at x)" |
44123 | 1656 |
using has_derivative_bilinear_within[of f f' x UNIV g g' h] |
1657 |
unfolding within_UNIV 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
|
1658 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1659 |
subsection {* 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
|
1660 |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
43338
diff
changeset
|
1661 |
definition has_vector_derivative :: "(real \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'b \<Rightarrow> (real filter \<Rightarrow> bool)" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1662 |
(infixl "has'_vector'_derivative" 12) where |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1663 |
"(f has_vector_derivative f') net \<equiv> (f has_derivative (\<lambda>x. x *\<^sub>R f')) net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1664 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1665 |
definition "vector_derivative f net \<equiv> (SOME f'. (f has_vector_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
|
1666 |
|
44123 | 1667 |
lemma vector_derivative_works: |
1668 |
fixes f::"real \<Rightarrow> 'a::real_normed_vector" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1669 |
shows "f differentiable net \<longleftrightarrow> (f has_vector_derivative (vector_derivative f net)) net" (is "?l = ?r") |
44123 | 1670 |
proof |
1671 |
assume ?l guess f' using `?l`[unfolded differentiable_def] .. note f' = this |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1672 |
then interpret bounded_linear f' by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1673 |
thus ?r unfolding vector_derivative_def has_vector_derivative_def |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1674 |
apply-apply(rule someI_ex,rule_tac x="f' 1" in exI) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1675 |
using f' unfolding scaleR[THEN sym] by auto |
44123 | 1676 |
next |
1677 |
assume ?r thus ?l |
|
1678 |
unfolding vector_derivative_def has_vector_derivative_def differentiable_def |
|
1679 |
by auto |
|
1680 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1681 |
|
37730 | 1682 |
lemma vector_derivative_unique_at: |
1683 |
assumes "(f has_vector_derivative f') (at x)" |
|
1684 |
assumes "(f has_vector_derivative f'') (at x)" |
|
1685 |
shows "f' = f''" |
|
1686 |
proof- |
|
1687 |
have "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
|
1688 |
using assms [unfolded has_vector_derivative_def] |
|
1689 |
by (rule frechet_derivative_unique_at) |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
1690 |
thus ?thesis unfolding fun_eq_iff by auto |
37730 | 1691 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1692 |
|
44123 | 1693 |
lemma vector_derivative_unique_within_closed_interval: |
1694 |
fixes f::"real \<Rightarrow> 'n::ordered_euclidean_space" |
|
1695 |
assumes "a < b" and "x \<in> {a..b}" |
|
1696 |
assumes "(f has_vector_derivative f') (at x within {a..b})" |
|
1697 |
assumes "(f has_vector_derivative f'') (at x within {a..b})" |
|
1698 |
shows "f' = f''" |
|
1699 |
proof- |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1700 |
have *:"(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1701 |
apply(rule frechet_derivative_unique_within_closed_interval[of "a" "b"]) |
44123 | 1702 |
using assms(3-)[unfolded has_vector_derivative_def] using assms(1-2) |
1703 |
by auto |
|
1704 |
show ?thesis |
|
1705 |
proof(rule ccontr) |
|
1706 |
assume "f' \<noteq> f''" |
|
1707 |
moreover |
|
1708 |
hence "(\<lambda>x. x *\<^sub>R f') 1 = (\<lambda>x. x *\<^sub>R f'') 1" |
|
1709 |
using * by (auto simp: fun_eq_iff) |
|
1710 |
ultimately show False unfolding o_def by auto |
|
1711 |
qed |
|
1712 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1713 |
|
37730 | 1714 |
lemma vector_derivative_at: |
1715 |
shows "(f has_vector_derivative f') (at x) \<Longrightarrow> vector_derivative f (at x) = f'" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1716 |
apply(rule vector_derivative_unique_at) defer apply assumption |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1717 |
unfolding vector_derivative_works[THEN sym] differentiable_def |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1718 |
unfolding has_vector_derivative_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1719 |
|
44123 | 1720 |
lemma vector_derivative_within_closed_interval: |
1721 |
fixes f::"real \<Rightarrow> 'a::ordered_euclidean_space" |
|
1722 |
assumes "a < b" and "x \<in> {a..b}" |
|
1723 |
assumes "(f has_vector_derivative f') (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
|
1724 |
shows "vector_derivative f (at x within {a..b}) = f'" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1725 |
apply(rule vector_derivative_unique_within_closed_interval) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1726 |
using vector_derivative_works[unfolded differentiable_def] |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1727 |
using assms by(auto simp add:has_vector_derivative_def) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1728 |
|
34981 | 1729 |
lemma has_vector_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
|
1730 |
"(f has_vector_derivative f') (at x within s) \<Longrightarrow> t \<subseteq> s \<Longrightarrow> (f has_vector_derivative f') (at x within t)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1731 |
unfolding has_vector_derivative_def apply(rule has_derivative_within_subset) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1732 |
|
34981 | 1733 |
lemma has_vector_derivative_const: |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1734 |
"((\<lambda>x. c) has_vector_derivative 0) net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1735 |
unfolding has_vector_derivative_def using has_derivative_const by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1736 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1737 |
lemma has_vector_derivative_id: "((\<lambda>x::real. x) has_vector_derivative 1) net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1738 |
unfolding has_vector_derivative_def using has_derivative_id by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1739 |
|
44123 | 1740 |
lemma has_vector_derivative_cmul: |
1741 |
"(f has_vector_derivative f') net \<Longrightarrow> ((\<lambda>x. c *\<^sub>R f x) has_vector_derivative (c *\<^sub>R f')) net" |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
1742 |
unfolding has_vector_derivative_def |
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
1743 |
apply (drule scaleR_right.has_derivative) |
44123 | 1744 |
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
|
1745 |
|
44123 | 1746 |
lemma has_vector_derivative_cmul_eq: |
1747 |
assumes "c \<noteq> 0" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1748 |
shows "(((\<lambda>x. c *\<^sub>R f x) has_vector_derivative (c *\<^sub>R f')) net \<longleftrightarrow> (f has_vector_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
|
1749 |
apply rule apply(drule has_vector_derivative_cmul[where c="1/c"]) defer |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1750 |
apply(rule has_vector_derivative_cmul) using assms by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1751 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1752 |
lemma has_vector_derivative_neg: |
44123 | 1753 |
"(f has_vector_derivative f') net \<Longrightarrow> ((\<lambda>x. -(f x)) has_vector_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
|
1754 |
unfolding has_vector_derivative_def apply(drule has_derivative_neg) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1755 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1756 |
lemma has_vector_derivative_add: |
44123 | 1757 |
assumes "(f has_vector_derivative f') net" |
1758 |
assumes "(g has_vector_derivative g') net" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1759 |
shows "((\<lambda>x. f(x) + g(x)) has_vector_derivative (f' + g')) net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1760 |
using has_derivative_add[OF assms[unfolded has_vector_derivative_def]] |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1761 |
unfolding has_vector_derivative_def unfolding scaleR_right_distrib by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1762 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1763 |
lemma has_vector_derivative_sub: |
44123 | 1764 |
assumes "(f has_vector_derivative f') net" |
1765 |
assumes "(g has_vector_derivative g') net" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1766 |
shows "((\<lambda>x. f(x) - g(x)) has_vector_derivative (f' - g')) net" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1767 |
using has_derivative_sub[OF assms[unfolded has_vector_derivative_def]] |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1768 |
unfolding has_vector_derivative_def scaleR_right_diff_distrib by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1769 |
|
37650 | 1770 |
lemma has_vector_derivative_bilinear_within: |
44123 | 1771 |
assumes "(f has_vector_derivative f') (at x within s)" |
1772 |
assumes "(g has_vector_derivative g') (at x within s)" |
|
1773 |
assumes "bounded_bilinear h" |
|
1774 |
shows "((\<lambda>x. h (f x) (g x)) has_vector_derivative (h (f x) g' + h f' (g x))) (at x within s)" |
|
1775 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1776 |
interpret bounded_bilinear h using assms by auto |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1777 |
show ?thesis using has_derivative_bilinear_within[OF assms(1-2)[unfolded has_vector_derivative_def], of h] |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1778 |
unfolding o_def has_vector_derivative_def |
44123 | 1779 |
using assms(3) unfolding scaleR_right scaleR_left scaleR_right_distrib |
1780 |
by auto |
|
1781 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1782 |
|
37650 | 1783 |
lemma has_vector_derivative_bilinear_at: |
44123 | 1784 |
assumes "(f has_vector_derivative f') (at x)" |
1785 |
assumes "(g has_vector_derivative g') (at x)" |
|
1786 |
assumes "bounded_bilinear h" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1787 |
shows "((\<lambda>x. h (f x) (g x)) has_vector_derivative (h (f x) g' + h f' (g x))) (at x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1788 |
apply(rule has_vector_derivative_bilinear_within[where s=UNIV, unfolded within_UNIV]) using assms by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1789 |
|
44123 | 1790 |
lemma has_vector_derivative_at_within: |
1791 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f') (at x within s)" |
|
1792 |
unfolding has_vector_derivative_def |
|
1793 |
by (rule has_derivative_at_within) auto |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1794 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1795 |
lemma has_vector_derivative_transform_within: |
44123 | 1796 |
assumes "0 < d" and "x \<in> s" and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
1797 |
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
|
1798 |
shows "(g has_vector_derivative f') (at x within s)" |
44123 | 1799 |
using assms unfolding has_vector_derivative_def |
1800 |
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
|
1801 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1802 |
lemma has_vector_derivative_transform_at: |
44123 | 1803 |
assumes "0 < d" and "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" |
1804 |
assumes "(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
|
1805 |
shows "(g has_vector_derivative f') (at x)" |
44123 | 1806 |
using assms unfolding has_vector_derivative_def |
1807 |
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
|
1808 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1809 |
lemma has_vector_derivative_transform_within_open: |
44123 | 1810 |
assumes "open s" and "x \<in> s" and "\<forall>y\<in>s. f y = g y" |
1811 |
assumes "(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
|
1812 |
shows "(g has_vector_derivative f') (at x)" |
44123 | 1813 |
using assms unfolding has_vector_derivative_def |
1814 |
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
|
1815 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1816 |
lemma vector_diff_chain_at: |
44123 | 1817 |
assumes "(f has_vector_derivative f') (at x)" |
1818 |
assumes "(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
|
1819 |
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x)" |
44123 | 1820 |
using assms(2) unfolding has_vector_derivative_def apply- |
1821 |
apply(drule diff_chain_at[OF assms(1)[unfolded has_vector_derivative_def]]) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1822 |
unfolding o_def scaleR.scaleR_left by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1823 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1824 |
lemma vector_diff_chain_within: |
44123 | 1825 |
assumes "(f has_vector_derivative f') (at x within s)" |
1826 |
assumes "(g has_vector_derivative g') (at (f x) within f ` s)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1827 |
shows "((g o f) has_vector_derivative (f' *\<^sub>R g')) (at x within s)" |
44123 | 1828 |
using assms(2) unfolding has_vector_derivative_def apply- |
1829 |
apply(drule diff_chain_within[OF assms(1)[unfolded has_vector_derivative_def]]) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1830 |
unfolding o_def scaleR.scaleR_left by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1831 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1832 |
end |