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