author | immler |
Mon, 22 Apr 2013 18:39:12 +0200 | |
changeset 51733 | 70abecafe9ac |
parent 51642 | 400ec5ae7f8f |
child 53077 | a1b3784f8129 |
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 |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
12 |
lemma bounded_linear_imp_linear: "bounded_linear f \<Longrightarrow> linear f" (* TODO: move elsewhere *) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
13 |
proof - |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
14 |
assume "bounded_linear f" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
15 |
then interpret f: bounded_linear f . |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
16 |
show "linear f" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
17 |
by (simp add: f.add f.scaleR linear_def) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
18 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
19 |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
20 |
lemma netlimit_at_vector: (* TODO: move *) |
37730 | 21 |
fixes a :: "'a::real_normed_vector" |
22 |
shows "netlimit (at a) = a" |
|
23 |
proof (cases "\<exists>x. x \<noteq> a") |
|
24 |
case True then obtain x where x: "x \<noteq> a" .. |
|
25 |
have "\<not> trivial_limit (at a)" |
|
26 |
unfolding trivial_limit_def eventually_at dist_norm |
|
27 |
apply clarsimp |
|
28 |
apply (rule_tac x="a + scaleR (d / 2) (sgn (x - a))" in exI) |
|
29 |
apply (simp add: norm_sgn sgn_zero_iff x) |
|
30 |
done |
|
31 |
thus ?thesis |
|
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51478
diff
changeset
|
32 |
by (rule netlimit_within [of a UNIV]) |
37730 | 33 |
qed simp |
34 |
||
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
35 |
(* Because I do not want to type this all the time *) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
36 |
lemmas linear_linear = linear_conv_bounded_linear[THEN sym] |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
37 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
38 |
lemma derivative_linear[dest]: |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
39 |
"(f has_derivative f') net \<Longrightarrow> bounded_linear f'" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
40 |
unfolding has_derivative_def by auto |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
41 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
42 |
lemma derivative_is_linear: |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
43 |
"(f has_derivative f') net \<Longrightarrow> linear f'" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
44 |
by (rule derivative_linear [THEN bounded_linear_imp_linear]) |
44137 | 45 |
|
46 |
lemma DERIV_conv_has_derivative: |
|
47 |
"(DERIV f x :> f') = (f has_derivative op * f') (at x)" |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
48 |
using deriv_fderiv[of f x UNIV f'] by (subst (asm) mult_commute) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
49 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
50 |
subsection {* Derivatives *} |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
51 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
52 |
subsubsection {* Combining theorems. *} |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
53 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
54 |
lemmas has_derivative_id = FDERIV_ident |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
55 |
lemmas has_derivative_const = FDERIV_const |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
56 |
lemmas has_derivative_neg = FDERIV_minus |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
57 |
lemmas has_derivative_add = FDERIV_add |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
58 |
lemmas has_derivative_sub = FDERIV_diff |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
59 |
lemmas has_derivative_setsum = FDERIV_setsum |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
60 |
lemmas scaleR_right_has_derivative = FDERIV_scaleR_right |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
61 |
lemmas scaleR_left_has_derivative = FDERIV_scaleR_left |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
62 |
lemmas inner_right_has_derivative = FDERIV_inner_right |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
63 |
lemmas inner_left_has_derivative = FDERIV_inner_left |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
64 |
lemmas mult_right_has_derivative = FDERIV_mult_right |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
65 |
lemmas mult_left_has_derivative = FDERIV_mult_left |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
66 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
67 |
lemma has_derivative_add_const: |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
68 |
"(f has_derivative f') net \<Longrightarrow> ((\<lambda>x. f x + c) has_derivative f') net" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
69 |
by (intro FDERIV_eq_intros) auto |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
70 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
71 |
subsection {* Derivative with composed bilinear function. *} |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
72 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
73 |
lemma has_derivative_bilinear_within: |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
74 |
assumes "(f has_derivative f') (at x within s)" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
75 |
assumes "(g has_derivative g') (at x within s)" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
76 |
assumes "bounded_bilinear h" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
77 |
shows "((\<lambda>x. h (f x) (g x)) has_derivative (\<lambda>d. h (f x) (g' d) + h (f' d) (g x))) (at x within s)" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
78 |
using bounded_bilinear.FDERIV[OF assms(3,1,2)] . |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
79 |
|
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
80 |
lemma has_derivative_bilinear_at: |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
81 |
assumes "(f has_derivative f') (at x)" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
82 |
assumes "(g has_derivative g') (at x)" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
83 |
assumes "bounded_bilinear h" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
84 |
shows "((\<lambda>x. h (f x) (g x)) has_derivative (\<lambda>d. h (f x) (g' d) + h (f' d) (g x))) (at x)" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
85 |
using has_derivative_bilinear_within[of f f' x UNIV g g' h] assms by simp |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
86 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
87 |
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
|
88 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
89 |
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
|
90 |
bounded_linear f' \<and> ((\<lambda>y. (1 / norm(y - x)) *\<^sub>R (f y - (f x + f' (y - x)))) ---> 0) (at x within s)" |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
91 |
unfolding has_derivative_def Lim by (auto simp add: netlimit_within inverse_eq_divide field_simps) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
92 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
93 |
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
|
94 |
bounded_linear f' \<and> ((\<lambda>y. (1 / (norm(y - x))) *\<^sub>R (f y - (f x + f' (y - x)))) ---> 0) (at x)" |
45031 | 95 |
using has_derivative_within [of f f' x UNIV] by simp |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
96 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
97 |
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
|
98 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
99 |
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
|
100 |
"(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
|
101 |
(\<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
|
102 |
\<longrightarrow> norm(f x' - f x - f'(x' - x)) / norm(x' - x) < e)" |
36587 | 103 |
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
|
104 |
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
|
105 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
106 |
lemma 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
|
107 |
"(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
|
108 |
(\<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
|
109 |
\<longrightarrow> norm(f x' - f x - f'(x' - x)) / norm(x' - x) < e)" |
45031 | 110 |
using has_derivative_within' [of f f' x UNIV] by simp |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
111 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
112 |
lemma has_derivative_at_within: "(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f') (at x within s)" |
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51478
diff
changeset
|
113 |
unfolding has_derivative_within' has_derivative_at' by blast |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
114 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
115 |
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
|
116 |
"a \<in> s \<Longrightarrow> open s \<Longrightarrow> ((f has_derivative f') (at a within s) \<longleftrightarrow> (f has_derivative f') (at a))" |
37730 | 117 |
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
|
118 |
|
43338 | 119 |
lemma has_derivative_right: |
120 |
fixes f :: "real \<Rightarrow> real" and y :: "real" |
|
121 |
shows "(f has_derivative (op * y)) (at x within ({x <..} \<inter> I)) \<longleftrightarrow> |
|
122 |
((\<lambda>t. (f x - f t) / (x - t)) ---> y) (at x within ({x <..} \<inter> I))" |
|
123 |
proof - |
|
124 |
have "((\<lambda>t. (f t - (f x + y * (t - x))) / \<bar>t - x\<bar>) ---> 0) (at x within ({x<..} \<inter> I)) \<longleftrightarrow> |
|
125 |
((\<lambda>t. (f t - f x) / (t - x) - y) ---> 0) (at x within ({x<..} \<inter> I))" |
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
126 |
by (intro Lim_cong_within) (auto simp add: diff_divide_distrib add_divide_distrib) |
43338 | 127 |
also have "\<dots> \<longleftrightarrow> ((\<lambda>t. (f t - f x) / (t - x)) ---> y) (at x within ({x<..} \<inter> I))" |
128 |
by (simp add: Lim_null[symmetric]) |
|
129 |
also have "\<dots> \<longleftrightarrow> ((\<lambda>t. (f x - f t) / (x - t)) ---> y) (at x within ({x<..} \<inter> I))" |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
130 |
by (intro Lim_cong_within) (simp_all add: field_simps) |
43338 | 131 |
finally show ?thesis |
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
132 |
by (simp add: bounded_linear_mult_right has_derivative_within) |
43338 | 133 |
qed |
134 |
||
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
135 |
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
|
136 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
137 |
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
|
138 |
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
|
139 |
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
|
140 |
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
|
141 |
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
|
142 |
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
|
143 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
144 |
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
|
145 |
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
|
146 |
shows "(g has_derivative f') (at x)" |
45031 | 147 |
using has_derivative_transform_within [of d x UNIV f g f'] assms by simp |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
148 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
149 |
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
|
150 |
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
|
151 |
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
|
152 |
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
|
153 |
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
|
154 |
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
|
155 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
156 |
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
|
157 |
|
36362
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36334
diff
changeset
|
158 |
no_notation Deriv.differentiable (infixl "differentiable" 60) |
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36334
diff
changeset
|
159 |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
160 |
abbreviation differentiable :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a filter \<Rightarrow> bool" (infixr "differentiable" 30) where |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
161 |
"f differentiable net \<equiv> isDiff net f" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
162 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
163 |
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
|
164 |
"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
|
165 |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
166 |
lemmas differentiable_def = isDiff_def |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
167 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
168 |
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
|
169 |
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
|
170 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
171 |
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
|
172 |
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
|
173 |
|
44123 | 174 |
lemma differentiable_within_open: (* TODO: delete *) |
175 |
assumes "a \<in> s" and "open s" |
|
176 |
shows "f differentiable (at a within s) \<longleftrightarrow> (f differentiable (at a))" |
|
37730 | 177 |
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
|
178 |
|
44123 | 179 |
lemma differentiable_on_eq_differentiable_at: |
180 |
"open s \<Longrightarrow> (f differentiable_on s \<longleftrightarrow> (\<forall>x\<in>s. f differentiable at x))" |
|
181 |
unfolding differentiable_on_def |
|
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51478
diff
changeset
|
182 |
by (metis at_within_interior interior_open) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
183 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
184 |
lemma differentiable_transform_within: |
44123 | 185 |
assumes "0 < d" and "x \<in> s" and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
186 |
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
|
187 |
shows "g differentiable (at x within s)" |
44123 | 188 |
using assms(4) unfolding differentiable_def |
189 |
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
|
190 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
191 |
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
|
192 |
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
|
193 |
shows "g differentiable at x" |
44123 | 194 |
using assms(3) unfolding differentiable_def |
195 |
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
|
196 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
197 |
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
|
198 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
199 |
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
|
200 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
201 |
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
|
202 |
"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
|
203 |
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
|
204 |
|
37648 | 205 |
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
|
206 |
shows "f differentiable net \<Longrightarrow> linear(frechet_derivative f net)" |
44123 | 207 |
unfolding frechet_derivative_works has_derivative_def |
208 |
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
|
209 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
210 |
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
|
211 |
|
44123 | 212 |
lemma Lim_mul_norm_within: |
213 |
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
|
214 |
shows "(f ---> 0) (at a within s) \<Longrightarrow> ((\<lambda>x. norm(x - a) *\<^sub>R f(x)) ---> 0) (at a within s)" |
44123 | 215 |
unfolding Lim_within apply(rule,rule) |
216 |
apply(erule_tac x=e in allE,erule impE,assumption,erule exE,erule conjE) |
|
217 |
apply(rule_tac x="min d 1" in exI) apply rule defer |
|
218 |
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
|
219 |
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
|
220 |
|
44123 | 221 |
lemma differentiable_imp_continuous_within: |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
222 |
"f differentiable (at x within s) \<Longrightarrow> continuous (at x within s) f" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
223 |
by (auto simp: differentiable_def intro: FDERIV_continuous) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
224 |
|
44123 | 225 |
lemma differentiable_imp_continuous_on: |
226 |
"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
|
227 |
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
|
228 |
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
|
229 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
230 |
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
|
231 |
"(f has_derivative f') (at x within s) \<Longrightarrow> t \<subseteq> s \<Longrightarrow> (f has_derivative f') (at x within t)" |
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51478
diff
changeset
|
232 |
unfolding has_derivative_within using tendsto_within_subset by blast |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
233 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
234 |
lemma differentiable_within_subset: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
235 |
"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
|
236 |
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
|
237 |
|
44123 | 238 |
lemma differentiable_on_subset: |
239 |
"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
|
240 |
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
|
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 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
|
243 |
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
|
244 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
245 |
text {* Several results are easier using a "multiplied-out" variant. |
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
246 |
(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
|
247 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
248 |
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
|
249 |
"(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
|
250 |
(\<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 | 251 |
proof |
252 |
assume ?lhs thus ?rhs |
|
253 |
unfolding has_derivative_within apply-apply(erule conjE,rule,assumption) |
|
254 |
unfolding Lim_within |
|
255 |
apply(rule,erule_tac x=e in allE,rule,erule impE,assumption) |
|
256 |
apply(erule exE,rule_tac x=d in exI) |
|
257 |
apply(erule conjE,rule,assumption,rule,rule) |
|
258 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
259 |
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
|
260 |
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
|
261 |
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
|
262 |
show "norm (f y - f x - f' (y - x)) \<le> e * norm (y - x)" proof(cases "y=x") |
44123 | 263 |
case True thus ?thesis using `bounded_linear f'` by(auto simp add: zero) |
264 |
next |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
265 |
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 | 266 |
unfolding dist_norm diff_0_right using as(3) |
267 |
using pos_divide_less_eq[OF False[unfolded dist_nz], unfolded dist_norm] |
|
268 |
by (auto simp add: linear_0 linear_sub) |
|
44123 | 269 |
thus ?thesis by(auto simp add:algebra_simps) |
270 |
qed |
|
271 |
qed |
|
272 |
next |
|
273 |
assume ?rhs thus ?lhs unfolding has_derivative_within Lim_within |
|
274 |
apply-apply(erule conjE,rule,assumption) |
|
275 |
apply(rule,erule_tac x="e/2" in allE,rule,erule impE) defer |
|
276 |
apply(erule exE,rule_tac x=d in exI) |
|
277 |
apply(erule conjE,rule,assumption,rule,rule) |
|
278 |
unfolding dist_norm diff_0_right norm_scaleR |
|
279 |
apply(erule_tac x=xa in ballE,erule impE) |
|
280 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
281 |
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
|
282 |
"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
|
283 |
thus "\<bar>1 / norm (y - x)\<bar> * norm (f y - (f x + f' (y - x))) < e" |
44123 | 284 |
apply(rule_tac le_less_trans[of _ "e/2"]) |
285 |
by(auto intro!:mult_imp_div_pos_le simp add:algebra_simps) |
|
286 |
qed auto |
|
287 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
288 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
289 |
lemma has_derivative_at_alt: |
35172
579dd5570f96
Added integration to Multivariate-Analysis (upto FTC)
himmelma
parents:
35028
diff
changeset
|
290 |
"(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
|
291 |
(\<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))" |
45031 | 292 |
using has_derivative_within_alt[where s=UNIV] by simp |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
293 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
294 |
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
|
295 |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
296 |
lemma diff_chain_within[FDERIV_intros]: |
44123 | 297 |
assumes "(f has_derivative f') (at x within s)" |
298 |
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
|
299 |
shows "((g o f) has_derivative (g' o f'))(at x within s)" |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
300 |
using FDERIV_in_compose[OF assms] by (simp add: comp_def) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
301 |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
302 |
lemma diff_chain_at[FDERIV_intros]: |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
303 |
"(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)" |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
304 |
using FDERIV_compose[of f f' x UNIV g g'] by (simp add: comp_def) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
305 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
306 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
307 |
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
|
308 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
309 |
lemma differentiable_chain_at: |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
310 |
"f differentiable (at x) \<Longrightarrow> g differentiable (at (f x)) \<Longrightarrow> (g o f) differentiable (at x)" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
311 |
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
|
312 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
313 |
lemma differentiable_chain_within: |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
314 |
"f differentiable (at x within s) \<Longrightarrow> g differentiable (at(f x) within (f ` s)) \<Longrightarrow> (g o 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
|
315 |
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
|
316 |
|
37730 | 317 |
subsection {* Uniqueness of derivative *} |
318 |
||
319 |
text {* |
|
320 |
The general result is a bit messy because we need approachability of the |
|
321 |
limit point from any direction. But OK for nontrivial intervals etc. |
|
322 |
*} |
|
51363
d4d00c804645
changed has_derivative_intros into a named theorems collection
hoelzl
parents:
50939
diff
changeset
|
323 |
|
44123 | 324 |
lemma frechet_derivative_unique_within: |
325 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
326 |
assumes "(f has_derivative f') (at x within s)" |
|
327 |
assumes "(f has_derivative f'') (at x within s)" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
328 |
assumes "(\<forall>i\<in>Basis. \<forall>e>0. \<exists>d. 0 < abs(d) \<and> abs(d) < e \<and> (x + d *\<^sub>R i) \<in> s)" |
44123 | 329 |
shows "f' = f''" |
330 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
331 |
note as = assms(1,2)[unfolded has_derivative_def] |
44123 | 332 |
then interpret f': bounded_linear f' by auto |
333 |
from as interpret f'': bounded_linear f'' by auto |
|
334 |
have "x islimpt s" unfolding islimpt_approachable |
|
335 |
proof(rule,rule) |
|
336 |
fix e::real assume "0<e" guess d |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
337 |
using assms(3)[rule_format,OF SOME_Basis `e>0`] .. |
44123 | 338 |
thus "\<exists>x'\<in>s. x' \<noteq> x \<and> dist x' x < e" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
339 |
apply(rule_tac x="x + d *\<^sub>R (SOME i. i \<in> Basis)" in bexI) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
340 |
unfolding dist_norm by (auto simp: SOME_Basis nonzero_Basis) |
44123 | 341 |
qed |
342 |
hence *:"netlimit (at x within s) = x" apply-apply(rule netlimit_within) |
|
343 |
unfolding trivial_limit_within by simp |
|
344 |
show ?thesis apply(rule linear_eq_stdbasis) |
|
345 |
unfolding linear_conv_bounded_linear |
|
346 |
apply(rule as(1,2)[THEN conjunct1])+ |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
347 |
proof(rule,rule ccontr) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
348 |
fix i :: 'a assume i:"i \<in> Basis" def e \<equiv> "norm (f' i - f'' i)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
349 |
assume "f' i \<noteq> f'' i" |
44123 | 350 |
hence "e>0" unfolding e_def by auto |
44125 | 351 |
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
|
352 |
guess c using assms(3)[rule_format,OF i d[THEN conjunct1]] .. note c=this |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
353 |
have *:"norm (- ((1 / \<bar>c\<bar>) *\<^sub>R f' (c *\<^sub>R i)) + (1 / \<bar>c\<bar>) *\<^sub>R f'' (c *\<^sub>R i)) = norm ((1 / abs c) *\<^sub>R (- (f' (c *\<^sub>R i)) + f'' (c *\<^sub>R i)))" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
354 |
unfolding scaleR_right_distrib by auto |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
355 |
also have "\<dots> = norm ((1 / abs c) *\<^sub>R (c *\<^sub>R (- (f' i) + f'' i)))" |
44123 | 356 |
unfolding f'.scaleR f''.scaleR |
357 |
unfolding scaleR_right_distrib scaleR_minus_right by auto |
|
358 |
also have "\<dots> = e" unfolding e_def using c[THEN conjunct1] |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
359 |
using norm_minus_cancel[of "f' i - f'' i"] |
44123 | 360 |
by (auto simp add: add.commute ab_diff_minus) |
361 |
finally show False using c |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
362 |
using d[THEN conjunct2,rule_format,of "x + c *\<^sub>R i"] |
44123 | 363 |
unfolding dist_norm |
364 |
unfolding f'.scaleR f''.scaleR f'.add f''.add f'.diff f''.diff |
|
365 |
scaleR_scaleR scaleR_right_diff_distrib scaleR_right_distrib |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
366 |
using i by (auto simp: inverse_eq_divide) |
44123 | 367 |
qed |
368 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
369 |
|
37730 | 370 |
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
|
371 |
shows "(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f'') (at x) \<Longrightarrow> f' = f''" |
37730 | 372 |
by (rule FDERIV_unique) |
41829 | 373 |
|
44123 | 374 |
lemma frechet_derivative_unique_within_closed_interval: |
375 |
fixes f::"'a::ordered_euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
376 |
assumes "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i" "x \<in> {a..b}" (is "x\<in>?I") |
44123 | 377 |
assumes "(f has_derivative f' ) (at x within {a..b})" |
378 |
assumes "(f has_derivative f'') (at x within {a..b})" |
|
379 |
shows "f' = f''" |
|
380 |
apply(rule frechet_derivative_unique_within) |
|
381 |
apply(rule assms(3,4))+ |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
382 |
proof(rule,rule,rule) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
383 |
fix e::real and i :: 'a assume "e>0" and i:"i\<in>Basis" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
384 |
thus "\<exists>d. 0 < \<bar>d\<bar> \<and> \<bar>d\<bar> < e \<and> x + d *\<^sub>R i \<in> {a..b}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
385 |
proof(cases "x\<bullet>i=a\<bullet>i") |
44123 | 386 |
case True thus ?thesis |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
387 |
apply(rule_tac x="(min (b\<bullet>i - a\<bullet>i) e) / 2" in exI) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
388 |
using assms(1)[THEN bspec[where x=i]] and `e>0` and assms(2) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
389 |
unfolding mem_interval |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
390 |
using i by (auto simp add: field_simps inner_simps inner_Basis) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
391 |
next |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
392 |
note * = assms(2)[unfolded mem_interval, THEN bspec, OF i] |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
393 |
case False moreover have "a \<bullet> i < x \<bullet> i" using False * by auto |
44123 | 394 |
moreover { |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
395 |
have "a \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e \<le> a\<bullet>i *2 + x\<bullet>i - a\<bullet>i" |
44123 | 396 |
by auto |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
397 |
also have "\<dots> = a\<bullet>i + x\<bullet>i" by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
398 |
also have "\<dots> \<le> 2 * (x\<bullet>i)" using * by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
399 |
finally have "a \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e \<le> x \<bullet> i * 2" by auto |
44123 | 400 |
} |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
401 |
moreover have "min (x \<bullet> i - a \<bullet> i) e \<ge> 0" using * and `e>0` by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
402 |
hence "x \<bullet> i * 2 \<le> b \<bullet> i * 2 + min (x \<bullet> i - a \<bullet> i) e" using * by auto |
44123 | 403 |
ultimately show ?thesis |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
404 |
apply(rule_tac x="- (min (x\<bullet>i - a\<bullet>i) e) / 2" in exI) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
405 |
using assms(1)[THEN bspec, OF i] and `e>0` and assms(2) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
406 |
unfolding mem_interval |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
407 |
using i by (auto simp add: field_simps inner_simps inner_Basis) |
44123 | 408 |
qed |
409 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
410 |
|
44123 | 411 |
lemma frechet_derivative_unique_within_open_interval: |
412 |
fixes f::"'a::ordered_euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
413 |
assumes "x \<in> {a<..<b}" |
|
414 |
assumes "(f has_derivative f' ) (at x within {a<..<b})" |
|
415 |
assumes "(f has_derivative f'') (at x within {a<..<b})" |
|
37650 | 416 |
shows "f' = f''" |
417 |
proof - |
|
418 |
from assms(1) have *: "at x within {a<..<b} = at x" |
|
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51478
diff
changeset
|
419 |
by (metis at_within_interior interior_open open_interval) |
37650 | 420 |
from assms(2,3) [unfolded *] show "f' = f''" |
421 |
by (rule frechet_derivative_unique_at) |
|
422 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
423 |
|
37730 | 424 |
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
|
425 |
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
|
426 |
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
|
427 |
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
|
428 |
|
44123 | 429 |
lemma frechet_derivative_within_closed_interval: |
430 |
fixes f::"'a::ordered_euclidean_space \<Rightarrow> 'b::real_normed_vector" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
431 |
assumes "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i" and "x \<in> {a..b}" |
44123 | 432 |
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
|
433 |
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
|
434 |
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
|
435 |
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
|
436 |
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
|
437 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
438 |
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
|
439 |
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
440 |
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
|
441 |
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
|
442 |
assumes lf: "linear f" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
443 |
shows "(f x) \<bullet> j = (\<Sum>i\<in>Basis. (x\<bullet>i) * (f i\<bullet>j))" (is "?lhs = ?rhs") |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
444 |
proof - |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
445 |
have fA: "finite Basis" by simp |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
446 |
have "?rhs = (\<Sum>i\<in>Basis. (x\<bullet>i) *\<^sub>R (f i))\<bullet>j" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
447 |
by (simp add: inner_setsum_left) |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
448 |
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
|
449 |
unfolding linear_setsum_mul[OF lf fA, symmetric] |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
450 |
unfolding euclidean_representation .. |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
451 |
qed |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
452 |
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
453 |
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
|
454 |
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
|
455 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
456 |
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
|
457 |
"(f::('a::euclidean_space) \<Rightarrow> ('b::euclidean_space)) differentiable net \<longleftrightarrow> |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
458 |
(f has_derivative (\<lambda>h. \<Sum>i\<in>Basis. |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
459 |
(\<Sum>j\<in>Basis. frechet_derivative f net (j) \<bullet> i * (h \<bullet> j)) *\<^sub>R i)) net" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
460 |
(is "?differentiable \<longleftrightarrow> (f has_derivative (\<lambda>h. \<Sum>i\<in>Basis. ?SUM h i *\<^sub>R i)) 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
|
461 |
proof |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
462 |
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
|
463 |
{ fix h i |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
464 |
have "?SUM h i = frechet_derivative f net h \<bullet> i" using * |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
465 |
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
|
466 |
simp: linear_componentwise[of _ h i] linear_frechet_derivative) } |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
467 |
with * show "(f has_derivative (\<lambda>h. \<Sum>i\<in>Basis. ?SUM h i *\<^sub>R i)) net" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
468 |
by (simp add: frechet_derivative_works euclidean_representation) |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
469 |
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
|
470 |
|
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
471 |
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
|
472 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
473 |
assumes k: "k \<in> Basis" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
474 |
and ball: "0 < e" "((\<forall>y \<in> ball x e. (f y)\<bullet>k \<le> (f x)\<bullet>k) \<or> (\<forall>y\<in>ball x e. (f x)\<bullet>k \<le> (f y)\<bullet>k))" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
475 |
and diff: "f differentiable (at x)" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
476 |
shows "(\<Sum>j\<in>Basis. (frechet_derivative f (at x) j \<bullet> k) *\<^sub>R j) = (0::'a)" (is "?D k = 0") |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
477 |
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
|
478 |
assume "?D k \<noteq> 0" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
479 |
then obtain j where j: "?D k \<bullet> j \<noteq> 0" "j \<in> Basis" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
480 |
unfolding euclidean_eq_iff[of _ "0::'a"] by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
481 |
hence *: "\<bar>?D k \<bullet> j\<bar> / 2 > 0" 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
|
482 |
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
|
483 |
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
|
484 |
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
|
485 |
{ fix c assume "abs c \<le> d" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
486 |
hence *:"norm (x + c *\<^sub>R j - x) < e'" using norm_Basis[OF j(2)] d by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
487 |
let ?v = "(\<Sum>i\<in>Basis. (\<Sum>l\<in>Basis. ?D i \<bullet> l * ((c *\<^sub>R j :: 'a) \<bullet> l)) *\<^sub>R i)" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
488 |
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 |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
489 |
have "\<bar>(f (x + c *\<^sub>R j) - f x - ?v) \<bullet> k\<bar> \<le> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
490 |
norm (f (x + c *\<^sub>R j) - f x - ?v)" by (rule Basis_le_norm[OF k]) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
491 |
also have "\<dots> \<le> \<bar>?D k \<bullet> j\<bar> / 2 * \<bar>c\<bar>" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
492 |
using e'[THEN conjunct2, rule_format, OF *] and norm_Basis[OF j(2)] j |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
493 |
by simp |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
494 |
finally have "\<bar>(f (x + c *\<^sub>R j) - f x - ?v) \<bullet> k\<bar> \<le> \<bar>?D k \<bullet> j\<bar> / 2 * \<bar>c\<bar>" by simp |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
495 |
hence "\<bar>f (x + c *\<^sub>R j) \<bullet> k - f x \<bullet> k - c * (?D k \<bullet> j)\<bar> \<le> \<bar>?D k \<bullet> j\<bar> / 2 * \<bar>c\<bar>" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
496 |
using j k |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
497 |
by (simp add: inner_simps field_simps inner_Basis setsum_cases if_dist) } |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
498 |
note * = this |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
499 |
have "x + d *\<^sub>R j \<in> ball x e" "x - d *\<^sub>R j \<in> ball x e" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
500 |
unfolding mem_ball dist_norm using norm_Basis[OF j(2)] d by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
501 |
hence **:"((f (x - d *\<^sub>R j))\<bullet>k \<le> (f x)\<bullet>k \<and> (f (x + d *\<^sub>R j))\<bullet>k \<le> (f x)\<bullet>k) \<or> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
502 |
((f (x - d *\<^sub>R j))\<bullet>k \<ge> (f x)\<bullet>k \<and> (f (x + d *\<^sub>R j))\<bullet>k \<ge> (f x)\<bullet>k)" using ball 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
|
503 |
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
|
504 |
(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 |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
505 |
show False apply(rule ***[OF **, where dx="d * (?D k \<bullet> j)" and d="\<bar>?D k \<bullet> j\<bar> / 2 * \<bar>d\<bar>"]) |
44123 | 506 |
using *[of "-d"] and *[of d] and d[THEN conjunct1] and j |
507 |
unfolding mult_minus_left |
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
508 |
unfolding abs_mult diff_minus_eq_add scaleR_minus_left |
44123 | 509 |
unfolding algebra_simps by (auto intro: mult_pos_pos) |
34906 | 510 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
511 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
512 |
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
|
513 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
514 |
lemma differential_zero_maxmin: |
37650 | 515 |
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
|
516 |
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
|
517 |
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
|
518 |
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
|
519 |
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
|
520 |
proof - |
44123 | 521 |
obtain e where e:"e>0" "ball x e \<subseteq> s" |
522 |
using `open s`[unfolded open_contains_ball] and `x \<in> s` by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
523 |
with differential_zero_maxmin_component[where 'b=real, of 1 e x f] mono deriv |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
524 |
have "(\<Sum>j\<in>Basis. frechet_derivative f (at x) j *\<^sub>R j) = (0::'a)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
525 |
by (auto simp: Basis_real_def differentiable_def) |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
526 |
with frechet_derivative_at[OF deriv, symmetric] |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
527 |
have "\<forall>i\<in>Basis. f' i = 0" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
528 |
by (simp add: euclidean_eq_iff[of _ "0::'a"] inner_setsum_left_Basis) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
529 |
with derivative_is_linear[OF deriv, THEN linear_componentwise, of _ 1] |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
530 |
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
|
531 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
532 |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
533 |
lemma rolle: |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
534 |
fixes f::"real\<Rightarrow>real" |
44123 | 535 |
assumes "a < b" and "f a = f b" and "continuous_on {a..b} f" |
536 |
assumes "\<forall>x\<in>{a<..<b}. (f has_derivative f'(x)) (at x)" |
|
537 |
shows "\<exists>x\<in>{a<..<b}. f' x = (\<lambda>v. 0)" |
|
538 |
proof- |
|
539 |
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))" |
|
540 |
proof- |
|
541 |
have "(a + b) / 2 \<in> {a .. b}" using assms(1) by auto |
|
542 |
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
|
543 |
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
|
544 |
guess c using continuous_attains_inf[OF compact_interval * assms(3)] .. note c=this |
44123 | 545 |
show ?thesis |
546 |
proof(cases "d\<in>{a<..<b} \<or> c\<in>{a<..<b}") |
|
547 |
case True thus ?thesis |
|
548 |
apply(erule_tac disjE) apply(rule_tac x=d in bexI) |
|
549 |
apply(rule_tac[3] x=c in bexI) |
|
550 |
using d c by auto |
|
551 |
next |
|
552 |
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
|
553 |
case False hence "f d = f c" using d c assms(2) by auto |
44123 | 554 |
hence "\<And>x. x\<in>{a..b} \<Longrightarrow> f x = f d" |
555 |
using c d apply- apply(erule_tac x=x in ballE)+ by auto |
|
556 |
thus ?thesis |
|
557 |
apply(rule_tac x=e in bexI) unfolding e_def using assms(1) by auto |
|
558 |
qed |
|
559 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
560 |
then guess x .. note x=this |
44123 | 561 |
hence "f' x = (\<lambda>v. 0)" |
562 |
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
|
563 |
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
|
564 |
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
|
565 |
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
|
566 |
thus ?thesis apply(rule_tac x=x in bexI) unfolding o_def apply rule |
44123 | 567 |
apply(drule_tac x=v in fun_cong) using x(1) by auto |
568 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
569 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
570 |
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
|
571 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
572 |
lemma mvt: fixes f::"real \<Rightarrow> real" |
44123 | 573 |
assumes "a < b" and "continuous_on {a .. b} f" |
574 |
assumes "\<forall>x\<in>{a<..<b}. (f has_derivative (f' x)) (at x)" |
|
575 |
shows "\<exists>x\<in>{a<..<b}. (f b - f a = (f' x) (b - a))" |
|
576 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
577 |
have "\<exists>x\<in>{a<..<b}. (\<lambda>xa. f' x xa - (f b - f a) / (b - a) * xa) = (\<lambda>v. 0)" |
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51363
diff
changeset
|
578 |
proof (intro rolle[OF assms(1), of "\<lambda>x. f x - (f b - f a) / (b - a) * x"] ballI) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
579 |
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
|
580 |
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)" |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
581 |
by (intro FDERIV_intros assms(3)[rule_format,OF x] mult_right_has_derivative) |
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51363
diff
changeset
|
582 |
qed (insert assms(1,2), auto intro!: continuous_on_intros simp: field_simps) |
44123 | 583 |
then guess x .. |
584 |
thus ?thesis apply(rule_tac x=x in bexI) |
|
585 |
apply(drule fun_cong[of _ _ "b - a"]) by auto |
|
586 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
587 |
|
44123 | 588 |
lemma mvt_simple: |
589 |
fixes f::"real \<Rightarrow> real" |
|
590 |
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
|
591 |
shows "\<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)" |
44123 | 592 |
apply(rule mvt) |
593 |
apply(rule assms(1), rule differentiable_imp_continuous_on) |
|
594 |
unfolding differentiable_on_def differentiable_def defer |
|
595 |
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
|
596 |
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
|
597 |
unfolding has_derivative_within_open[OF x open_interval,THEN sym] |
44123 | 598 |
apply(rule has_derivative_within_subset) |
599 |
apply(rule assms(2)[rule_format]) |
|
600 |
using x by auto |
|
601 |
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
|
602 |
|
44123 | 603 |
lemma mvt_very_simple: |
604 |
fixes f::"real \<Rightarrow> real" |
|
605 |
assumes "a \<le> b" and "\<forall>x\<in>{a..b}. (f has_derivative f'(x)) (at x within {a..b})" |
|
606 |
shows "\<exists>x\<in>{a..b}. f b - f a = f' x (b - a)" |
|
607 |
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
|
608 |
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
|
609 |
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
|
610 |
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
|
611 |
unfolding True using zero by auto next |
44123 | 612 |
case False thus ?thesis using mvt_simple[OF _ assms(2)] using assms(1) by auto |
613 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
614 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
615 |
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
|
616 |
|
44123 | 617 |
lemma mvt_general: |
618 |
fixes f::"real\<Rightarrow>'a::euclidean_space" |
|
619 |
assumes "a<b" and "continuous_on {a..b} f" |
|
620 |
assumes "\<forall>x\<in>{a<..<b}. (f has_derivative f'(x)) (at x)" |
|
621 |
shows "\<exists>x\<in>{a<..<b}. norm(f b - f a) \<le> norm(f'(x) (b - a))" |
|
622 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
623 |
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 | 624 |
apply(rule mvt) apply(rule assms(1)) |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
625 |
apply(rule continuous_on_inner continuous_on_intros assms(2) ballI)+ |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
626 |
unfolding o_def |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
627 |
apply(rule FDERIV_inner_right) |
44123 | 628 |
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
|
629 |
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
|
630 |
show ?thesis proof(cases "f a = f b") |
36844 | 631 |
case False |
44123 | 632 |
have "norm (f b - f a) * norm (f b - f a) = norm (f b - f a)^2" |
633 |
by (simp add: power2_eq_square) |
|
35542 | 634 |
also have "\<dots> = (f b - f a) \<bullet> (f b - f a)" unfolding power2_norm_eq_inner .. |
44123 | 635 |
also have "\<dots> = (f b - f a) \<bullet> f' x (b - a)" |
636 |
using x unfolding inner_simps by (auto simp add: inner_diff_left) |
|
637 |
also have "\<dots> \<le> norm (f b - f a) * norm (f' x (b - a))" |
|
638 |
by (rule norm_cauchy_schwarz) |
|
639 |
finally show ?thesis using False x(1) |
|
640 |
by (auto simp add: real_mult_left_cancel) |
|
641 |
next |
|
642 |
case True thus ?thesis using assms(1) |
|
643 |
apply (rule_tac x="(a + b) /2" in bexI) by auto |
|
644 |
qed |
|
645 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
646 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
647 |
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
|
648 |
|
44123 | 649 |
lemma differentiable_bound: |
650 |
fixes f::"'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
651 |
assumes "convex s" and "\<forall>x\<in>s. (f has_derivative f'(x)) (at x within s)" |
|
652 |
assumes "\<forall>x\<in>s. onorm(f' x) \<le> B" and x:"x\<in>s" and y:"y\<in>s" |
|
653 |
shows "norm(f x - f y) \<le> B * norm(x - y)" |
|
654 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
655 |
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
|
656 |
have *:"\<And>u. u\<in>{0..1} \<Longrightarrow> x + u *\<^sub>R (y - x) \<in> s" |
44123 | 657 |
using assms(1)[unfolded convex_alt,rule_format,OF x y] |
658 |
unfolding scaleR_left_diff_distrib scaleR_right_diff_distrib |
|
659 |
by (auto simp add: algebra_simps) |
|
660 |
hence 1:"continuous_on {0..1} (f \<circ> ?p)" apply- |
|
44531
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44457
diff
changeset
|
661 |
apply(rule continuous_on_intros)+ |
44123 | 662 |
unfolding continuous_on_eq_continuous_within |
663 |
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
|
664 |
unfolding differentiable_def apply(rule_tac x="f' xa" in exI) |
44123 | 665 |
apply(rule has_derivative_within_subset) |
666 |
apply(rule assms(2)[rule_format]) by auto |
|
667 |
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)" |
|
668 |
proof rule |
|
669 |
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
|
670 |
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
|
671 |
have "(f \<circ> ?p has_derivative (f' ?u) \<circ> (\<lambda>u. 0 + u *\<^sub>R (y - x))) (at u within {0<..<1})" |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
672 |
apply(rule diff_chain_within) apply(rule FDERIV_intros)+ |
44123 | 673 |
apply(rule has_derivative_within_subset) |
674 |
apply(rule assms(2)[rule_format]) using goal1 * by auto |
|
675 |
thus ?case |
|
676 |
unfolding has_derivative_within_open[OF goal1 open_interval] by auto |
|
677 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
678 |
guess u using mvt_general[OF zero_less_one 1 2] .. note u = this |
44123 | 679 |
have **:"\<And>x y. x\<in>s \<Longrightarrow> norm (f' x y) \<le> B * norm y" |
680 |
proof- |
|
681 |
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
|
682 |
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
|
683 |
using onorm(1)[OF derivative_is_linear[OF assms(2)[rule_format,OF goal1]]] by assumption |
44123 | 684 |
also have "\<dots> \<le> B * norm y" |
685 |
apply(rule mult_right_mono) |
|
686 |
using assms(3)[rule_format,OF goal1] |
|
687 |
by(auto simp add:field_simps) |
|
688 |
finally show ?case by simp |
|
689 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
690 |
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
|
691 |
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
|
692 |
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
|
693 |
also have "\<dots> \<le> B * norm(y - x)" apply(rule **) using * and u by auto |
44123 | 694 |
finally show ?thesis by(auto simp add:norm_minus_commute) |
695 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
696 |
|
44123 | 697 |
lemma differentiable_bound_real: |
698 |
fixes f::"real \<Rightarrow> real" |
|
699 |
assumes "convex s" and "\<forall>x\<in>s. (f has_derivative f' x) (at x within s)" |
|
700 |
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
|
701 |
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
|
702 |
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
|
703 |
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
|
704 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
705 |
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
|
706 |
|
44123 | 707 |
lemma has_derivative_zero_constant: |
708 |
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
|
709 |
assumes "convex s" "\<forall>x\<in>s. (f has_derivative (\<lambda>h. 0)) (at x within s)" |
44123 | 710 |
shows "\<exists>c. \<forall>x\<in>s. f x = c" |
711 |
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
|
712 |
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
|
713 |
have "\<And>y. y\<in>s \<Longrightarrow> f x = f y" proof- case goal1 |
44123 | 714 |
thus ?case |
715 |
using differentiable_bound_real[OF assms(1-2), of 0 x y] and `x\<in>s` |
|
716 |
unfolding onorm_const by auto qed |
|
717 |
thus ?thesis apply(rule_tac x="f x" in exI) by auto |
|
718 |
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
|
719 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
720 |
lemma has_derivative_zero_unique: fixes f::"real\<Rightarrow>real" |
44123 | 721 |
assumes "convex s" and "a \<in> s" and "f a = c" |
722 |
assumes "\<forall>x\<in>s. (f has_derivative (\<lambda>h. 0)) (at x within s)" and "x\<in>s" |
|
723 |
shows "f x = c" |
|
724 |
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
|
725 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
726 |
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
|
727 |
|
44123 | 728 |
lemma has_derivative_inverse_basic: |
729 |
fixes f::"'b::euclidean_space \<Rightarrow> 'c::euclidean_space" |
|
730 |
assumes "(f has_derivative f') (at (g y))" |
|
731 |
assumes "bounded_linear g'" and "g' \<circ> f' = id" and "continuous (at y) g" |
|
732 |
assumes "open t" and "y \<in> t" and "\<forall>z\<in>t. f(g z) = z" |
|
733 |
shows "(g has_derivative g') (at y)" |
|
734 |
proof- |
|
735 |
interpret f': bounded_linear f' |
|
736 |
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
|
737 |
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
|
738 |
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
|
739 |
(* have fgid:"\<And>x. g' (f' x) = x" using assms(3) unfolding o_def id_def apply()*) |
44123 | 740 |
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)" |
741 |
proof(rule,rule) |
|
742 |
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
|
743 |
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
|
744 |
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
|
745 |
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
|
746 |
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
|
747 |
guess d using real_lbound_gt_zero[OF d1[THEN conjunct1] d2[THEN conjunct1]] .. note d=this |
44123 | 748 |
thus ?case apply(rule_tac x=d in exI) apply rule defer |
749 |
proof(rule,rule) |
|
750 |
fix z assume as:"norm (z - y) < d" hence "z\<in>t" |
|
751 |
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
|
752 |
have "norm (g z - g y - g' (z - y)) \<le> norm (g' (f (g z) - y - f' (g z - g y)))" |
44123 | 753 |
unfolding g'.diff f'.diff |
754 |
unfolding assms(3)[unfolded o_def id_def, THEN fun_cong] |
|
755 |
unfolding assms(7)[rule_format,OF `z\<in>t`] |
|
756 |
apply(subst norm_minus_cancel[THEN sym]) by auto |
|
757 |
also have "\<dots> \<le> norm(f (g z) - y - f' (g z - g y)) * C" |
|
758 |
by (rule C [THEN conjunct2, rule_format]) |
|
759 |
also have "\<dots> \<le> (e / C) * norm (g z - g y) * C" |
|
760 |
apply(rule mult_right_mono) |
|
761 |
apply(rule d0[THEN conjunct2,rule_format,unfolded assms(7)[rule_format,OF `y\<in>t`]]) |
|
762 |
apply(cases "z=y") defer |
|
763 |
apply(rule d1[THEN conjunct2, unfolded dist_norm,rule_format]) |
|
764 |
using as d C d0 by auto |
|
765 |
also have "\<dots> \<le> e * norm (g z - g y)" |
|
766 |
using C by (auto simp add: field_simps) |
|
767 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (g z - g y)" |
|
768 |
by simp |
|
769 |
qed auto |
|
770 |
qed |
|
771 |
have *:"(0::real) < 1 / 2" by auto |
|
772 |
guess d using lem1[rule_format,OF *] .. note d=this |
|
773 |
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
|
774 |
have "B>0" unfolding B_def using C by auto |
44123 | 775 |
have lem2:"\<forall>z. norm(z - y) < d \<longrightarrow> norm(g z - g y) \<le> B * norm(z - y)" |
776 |
proof(rule,rule) case goal1 |
|
777 |
have "norm (g z - g y) \<le> norm(g' (z - y)) + norm ((g z - g y) - g'(z - y))" |
|
778 |
by(rule norm_triangle_sub) |
|
779 |
also have "\<dots> \<le> norm(g' (z - y)) + 1 / 2 * norm (g z - g y)" |
|
780 |
apply(rule add_left_mono) using d and goal1 by auto |
|
781 |
also have "\<dots> \<le> norm (z - y) * C + 1 / 2 * norm (g z - g y)" |
|
782 |
apply(rule add_right_mono) using C by auto |
|
783 |
finally show ?case unfolding B_def by(auto simp add:field_simps) |
|
784 |
qed |
|
785 |
show ?thesis unfolding has_derivative_at_alt |
|
786 |
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
|
787 |
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
|
788 |
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
|
789 |
guess k using real_lbound_gt_zero[OF d[THEN conjunct1] d'[THEN conjunct1]] .. note k=this |
44123 | 790 |
show ?case |
791 |
apply(rule_tac x=k in exI,rule) defer |
|
792 |
proof(rule,rule) |
|
793 |
fix z assume as:"norm(z - y) < k" |
|
794 |
hence "norm (g z - g y - g' (z - y)) \<le> e / B * norm(g z - g y)" |
|
795 |
using d' k by auto |
|
796 |
also have "\<dots> \<le> e * norm(z - y)" |
|
797 |
unfolding times_divide_eq_left pos_divide_le_eq[OF `B>0`] |
|
798 |
using lem2[THEN spec[where x=z]] using k as using `e>0` |
|
799 |
by (auto simp add: field_simps) |
|
800 |
finally show "norm (g z - g y - g' (z - y)) \<le> e * norm (z - y)" |
|
801 |
by simp qed(insert k, auto) |
|
802 |
qed |
|
803 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
804 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
805 |
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
|
806 |
|
44123 | 807 |
lemma has_derivative_inverse_basic_x: |
808 |
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
|
809 |
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
|
810 |
"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
|
811 |
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
|
812 |
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
|
813 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
814 |
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
|
815 |
|
44123 | 816 |
lemma has_derivative_inverse_dieudonne: |
817 |
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
|
818 |
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
|
819 |
(**) "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
|
820 |
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
|
821 |
apply(rule has_derivative_inverse_basic_x[OF assms(7-9) _ _ assms(2)]) |
44123 | 822 |
using assms(3-6) unfolding continuous_on_eq_continuous_at[OF assms(1)] |
823 |
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
|
824 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
825 |
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
|
826 |
|
44123 | 827 |
lemma has_derivative_inverse: |
828 |
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
|
829 |
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
|
830 |
"\<forall>y\<in>s. g(f y) = y" "(f has_derivative f') (at x)" "bounded_linear g'" "g' \<circ> f' = id" |
44123 | 831 |
shows "(g has_derivative g') (at (f x))" |
832 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
833 |
{ fix y assume "y\<in>interior (f ` s)" |
44123 | 834 |
then obtain x where "x\<in>s" and *:"y = f x" |
835 |
unfolding image_iff using interior_subset by auto |
|
836 |
have "f (g y) = y" unfolding * and assms(5)[rule_format,OF `x\<in>s`] .. |
|
837 |
} note * = this |
|
838 |
show ?thesis |
|
839 |
apply(rule has_derivative_inverse_basic_x[OF assms(6-8)]) |
|
840 |
apply(rule continuous_on_interior[OF _ assms(3)]) |
|
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44568
diff
changeset
|
841 |
apply(rule continuous_on_inv[OF assms(4,1)]) |
44123 | 842 |
apply(rule assms(2,5) assms(5)[rule_format] open_interior assms(3))+ |
843 |
by(rule, rule *, assumption) |
|
844 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
845 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
846 |
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
|
847 |
|
44123 | 848 |
lemma brouwer_surjective: |
849 |
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
|
850 |
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
|
851 |
"\<forall>x\<in>s. \<forall>y\<in>t. x + (y - f y) \<in> t" "x\<in>s" |
44123 | 852 |
shows "\<exists>y\<in>t. f y = x" |
853 |
proof- |
|
854 |
have *:"\<And>x y. f y = x \<longleftrightarrow> x + (y - f y) = y" |
|
855 |
by(auto simp add:algebra_simps) |
|
856 |
show ?thesis |
|
857 |
unfolding * |
|
858 |
apply(rule brouwer[OF assms(1-3), of "\<lambda>y. x + (y - f y)"]) |
|
859 |
apply(rule continuous_on_intros assms)+ using assms(4-6) by auto |
|
860 |
qed |
|
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 brouwer_surjective_cball: |
863 |
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
|
864 |
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
|
865 |
"\<forall>x\<in>s. \<forall>y\<in>cball a e. x + (y - f y) \<in> cball a e" "x\<in>s" |
44123 | 866 |
shows "\<exists>y\<in>cball a e. f y = x" |
867 |
apply(rule brouwer_surjective) |
|
868 |
apply(rule compact_cball convex_cball)+ |
|
869 |
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
|
870 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
871 |
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
|
872 |
|
44123 | 873 |
lemma sussmann_open_mapping: |
874 |
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
|
875 |
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
|
876 |
"(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
|
877 |
"t \<subseteq> s" "x \<in> interior t" |
44123 | 878 |
shows "f x \<in> interior (f ` t)" |
879 |
proof- |
|
880 |
interpret f':bounded_linear f' |
|
881 |
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
|
882 |
interpret g':bounded_linear g' using assms by auto |
44123 | 883 |
guess B using bounded_linear.pos_bounded[OF assms(5)] .. note B=this |
884 |
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
|
885 |
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
|
886 |
guess e1 using assms(8)[unfolded mem_interior_cball] .. note e1=this |
44123 | 887 |
have *:"0<e0/B" "0<e1/B" |
888 |
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
|
889 |
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
|
890 |
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
|
891 |
apply(rule,rule brouwer_surjective_cball[where s="cball (f x) (e/2)"]) |
44123 | 892 |
prefer 3 apply(rule,rule) |
893 |
proof- |
|
894 |
show "continuous_on (cball (f x) e) (\<lambda>y. f (x + g' (y - f x)))" |
|
895 |
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
|
896 |
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
|
897 |
apply(rule continuous_on_intros linear_continuous_on[OF assms(5)])+ |
44123 | 898 |
apply(rule continuous_on_subset[OF assms(2)]) |
899 |
apply(rule,unfold image_iff,erule bexE) |
|
900 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
901 |
fix y z assume as:"y \<in>cball (f x) e" "z = x + (g' y - g' (f x))" |
44123 | 902 |
have "dist x z = norm (g' (f x) - g' y)" |
903 |
unfolding as(2) and dist_norm by auto |
|
904 |
also have "\<dots> \<le> norm (f x - y) * B" |
|
905 |
unfolding g'.diff[THEN sym] using B by auto |
|
906 |
also have "\<dots> \<le> e * B" |
|
907 |
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
|
908 |
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
|
909 |
finally have "z\<in>cball x e1" unfolding mem_cball by force |
44123 | 910 |
thus "z \<in> s" using e1 assms(7) by auto |
911 |
qed |
|
912 |
next |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
913 |
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
|
914 |
have "norm (g' (z - f x)) \<le> norm (z - f x) * B" using B by auto |
44123 | 915 |
also have "\<dots> \<le> e * B" apply(rule mult_right_mono) |
916 |
using as(2)[unfolded mem_cball dist_norm] and B |
|
917 |
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
|
918 |
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
|
919 |
finally have *:"norm (x + g' (z - f x) - x) < e0" by auto |
44123 | 920 |
have **:"f x + f' (x + g' (z - f x) - x) = z" |
921 |
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
|
922 |
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 | 923 |
using norm_triangle_ineq[of "f (x + g'(z - f x)) - z" "f x - y"] |
924 |
by (auto simp add: algebra_simps) |
|
925 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + norm (f x - y)" |
|
926 |
using e0[THEN conjunct2,rule_format,OF *] |
|
927 |
unfolding algebra_simps ** by auto |
|
928 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + e/2" |
|
929 |
using as(1)[unfolded mem_cball dist_norm] by auto |
|
930 |
also have "\<dots> \<le> 1 / (B * 2) * B * norm (z - f x) + e/2" |
|
931 |
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
|
932 |
also have "\<dots> \<le> 1 / 2 * norm (z - f x) + e/2" by auto |
44123 | 933 |
also have "\<dots> \<le> e/2 + e/2" apply(rule add_right_mono) |
934 |
using as(2)[unfolded mem_cball dist_norm] |
|
935 |
unfolding norm_minus_commute by auto |
|
936 |
finally show "y + (z - f (x + g' (z - f x))) \<in> cball (f x) e" |
|
937 |
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
|
938 |
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
|
939 |
show ?thesis unfolding mem_interior apply(rule_tac x="e/2" in exI) |
44123 | 940 |
apply(rule,rule divide_pos_pos) prefer 3 |
941 |
proof |
|
942 |
fix y assume "y \<in> ball (f x) (e/2)" |
|
943 |
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
|
944 |
guess z using lem[rule_format,OF *] .. note z=this |
44123 | 945 |
hence "norm (g' (z - f x)) \<le> norm (z - f x) * B" |
946 |
using B by (auto simp add: field_simps) |
|
947 |
also have "\<dots> \<le> e * B" |
|
948 |
apply (rule mult_right_mono) using z(1) |
|
949 |
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
|
950 |
also have "\<dots> \<le> e1" using e B unfolding less_divide_eq by auto |
44123 | 951 |
finally have "x + g'(z - f x) \<in> t" apply- |
952 |
apply(rule e1[THEN conjunct2,unfolded subset_eq,rule_format]) |
|
36587 | 953 |
unfolding mem_cball dist_norm by auto |
44123 | 954 |
thus "y \<in> f ` t" using z by auto |
955 |
qed(insert e, auto) |
|
956 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
957 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
958 |
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
|
959 |
(* 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
|
960 |
(* 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
|
961 |
(* 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
|
962 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
963 |
(* 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
|
964 |
|
44123 | 965 |
lemma right_inverse_linear: |
966 |
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
|
967 |
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
|
968 |
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
|
969 |
proof- |
40702 | 970 |
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
|
971 |
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
|
972 |
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
|
973 |
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
|
974 |
have "h = g" apply (rule ext) using gf h(2,3) |
40702 | 975 |
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
|
976 |
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
|
977 |
qed |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
978 |
|
44123 | 979 |
lemma has_derivative_inverse_strong: |
980 |
fixes f::"'n::ordered_euclidean_space \<Rightarrow> 'n" |
|
981 |
assumes "open s" and "x \<in> s" and "continuous_on s f" |
|
982 |
assumes "\<forall>x\<in>s. g(f x) = x" "(f has_derivative f') (at x)" and "f' o g' = id" |
|
983 |
shows "(g has_derivative g') (at (f x))" |
|
984 |
proof- |
|
985 |
have linf:"bounded_linear f'" |
|
986 |
using assms(5) unfolding has_derivative_def by auto |
|
987 |
hence ling:"bounded_linear g'" |
|
988 |
unfolding linear_conv_bounded_linear[THEN sym] |
|
989 |
apply- apply(rule right_inverse_linear) using assms(6) by auto |
|
990 |
moreover have "g' \<circ> f' = id" using assms(6) linf ling |
|
991 |
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
|
992 |
using linear_inverse_left by auto |
44123 | 993 |
moreover have *:"\<forall>t\<subseteq>s. x\<in>interior t \<longrightarrow> f x \<in> interior (f ` t)" |
994 |
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
|
995 |
apply(rule assms ling)+ by auto |
44123 | 996 |
have "continuous (at (f x)) g" unfolding continuous_at Lim_at |
997 |
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
|
998 |
fix e::real assume "e>0" |
44123 | 999 |
hence "f x \<in> interior (f ` (ball x e \<inter> s))" |
1000 |
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
|
1001 |
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
|
1002 |
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
|
1003 |
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 | 1004 |
apply(rule_tac x=d in exI) |
1005 |
apply(rule,rule d[THEN conjunct1]) |
|
1006 |
proof(rule,rule) case goal1 |
|
1007 |
hence "g y \<in> g ` f ` (ball x e \<inter> s)" |
|
1008 |
using d[THEN conjunct2,unfolded subset_eq,THEN bspec[where x=y]] |
|
41958 | 1009 |
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
|
1010 |
hence "g y \<in> ball x e \<inter> s" using assms(4) by auto |
44123 | 1011 |
thus "dist (g y) (g (f x)) < e" |
1012 |
using assms(4)[rule_format,OF `x\<in>s`] |
|
1013 |
by (auto simp add: dist_commute) |
|
1014 |
qed |
|
1015 |
qed |
|
1016 |
moreover have "f x \<in> interior (f ` s)" |
|
1017 |
apply(rule sussmann_open_mapping) |
|
1018 |
apply(rule assms ling)+ |
|
1019 |
using interior_open[OF assms(1)] and `x\<in>s` by auto |
|
1020 |
moreover have "\<And>y. y \<in> interior (f ` s) \<Longrightarrow> f (g y) = y" |
|
1021 |
proof- case goal1 |
|
1022 |
hence "y\<in>f ` s" using interior_subset by auto |
|
1023 |
then guess z unfolding image_iff .. |
|
1024 |
thus ?case using assms(4) by auto |
|
1025 |
qed |
|
1026 |
ultimately show ?thesis |
|
1027 |
apply- apply(rule has_derivative_inverse_basic_x[OF assms(5)]) |
|
1028 |
using assms by auto |
|
1029 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1030 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1031 |
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
|
1032 |
|
44123 | 1033 |
lemma has_derivative_inverse_strong_x: |
1034 |
fixes f::"'a::ordered_euclidean_space \<Rightarrow> 'a" |
|
1035 |
assumes "open s" and "g y \<in> s" and "continuous_on s f" |
|
1036 |
assumes "\<forall>x\<in>s. g(f x) = x" "(f has_derivative f') (at (g y))" |
|
1037 |
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
|
1038 |
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
|
1039 |
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
|
1040 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1041 |
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
|
1042 |
|
44123 | 1043 |
lemma has_derivative_inverse_on: |
1044 |
fixes f::"'n::ordered_euclidean_space \<Rightarrow> 'n" |
|
1045 |
assumes "open s" and "\<forall>x\<in>s. (f has_derivative f'(x)) (at x)" |
|
1046 |
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
|
1047 |
shows "(g has_derivative g'(x)) (at (f x))" |
44123 | 1048 |
apply(rule has_derivative_inverse_strong[where g'="g' x" and f=f]) |
1049 |
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
|
1050 |
unfolding continuous_on_eq_continuous_at[OF assms(1)] |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1051 |
apply(rule,rule differentiable_imp_continuous_within) |
44123 | 1052 |
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
|
1053 |
|
44123 | 1054 |
text {* Invertible derivative continous at a point implies local |
1055 |
injectivity. It's only for this we need continuity of the derivative, |
|
1056 |
except of course if we want the fact that the inverse derivative is |
|
1057 |
also continuous. So if we know for some other reason that the inverse |
|
1058 |
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
|
1059 |
|
44123 | 1060 |
lemma bounded_linear_sub: |
1061 |
"bounded_linear f \<Longrightarrow> bounded_linear g ==> bounded_linear (\<lambda>x. f x - g x)" |
|
1062 |
using bounded_linear_add[of f "\<lambda>x. - g x"] bounded_linear_minus[of g] |
|
1063 |
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
|
1064 |
|
44123 | 1065 |
lemma has_derivative_locally_injective: |
1066 |
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
|
1067 |
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
|
1068 |
"\<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
|
1069 |
"\<forall>e>0. \<exists>d>0. \<forall>x. dist a x < d \<longrightarrow> onorm(\<lambda>v. f' x v - f' a v) < e" |
44123 | 1070 |
obtains t where "a \<in> t" "open t" "\<forall>x\<in>t. \<forall>x'\<in>t. (f x' = f x) \<longrightarrow> (x' = x)" |
1071 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1072 |
interpret 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
|
1073 |
note f'g' = assms(4)[unfolded id_def o_def,THEN cong] |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
1074 |
have "g' (f' a (\<Sum>Basis)) = (\<Sum>Basis)" "(\<Sum>Basis) \<noteq> (0::'n)" defer |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
1075 |
apply(subst euclidean_eq_iff) using f'g' by auto |
44123 | 1076 |
hence *:"0 < onorm g'" |
44890
22f665a2e91c
new fastforce replacing fastsimp - less confusing name
nipkow
parents:
44647
diff
changeset
|
1077 |
unfolding onorm_pos_lt[OF assms(3)[unfolded linear_linear]] by fastforce |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1078 |
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
|
1079 |
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
|
1080 |
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
|
1081 |
obtain d2 where "d2>0" "ball a d2 \<subseteq> s" using assms(2,1) .. |
44123 | 1082 |
guess d2 using assms(2)[unfolded open_contains_ball,rule_format,OF `a\<in>s`] .. |
1083 |
note d2=this |
|
1084 |
guess d using real_lbound_gt_zero[OF d1[THEN conjunct1] d2[THEN conjunct1]] .. |
|
1085 |
note d = this |
|
1086 |
show ?thesis |
|
1087 |
proof |
|
1088 |
show "a\<in>ball a d" using d by auto |
|
1089 |
show "\<forall>x\<in>ball a d. \<forall>x'\<in>ball a d. f x' = f x \<longrightarrow> x' = x" |
|
1090 |
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
|
1091 |
fix x y assume as:"x\<in>ball a d" "y\<in>ball a d" "f x = f y" |
44123 | 1092 |
def ph \<equiv> "\<lambda>w. w - g'(f w - f x)" |
1093 |
have ph':"ph = g' \<circ> (\<lambda>w. f' a w - (f w - f x))" |
|
1094 |
unfolding ph_def o_def unfolding diff using f'g' |
|
1095 |
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
|
1096 |
have "norm (ph x - ph y) \<le> (1/2) * norm (x - y)" |
41958 | 1097 |
apply(rule differentiable_bound[OF convex_ball _ _ as(1-2), where f'="\<lambda>x v. v - g'(f' x v)"]) |
44123 | 1098 |
apply(rule_tac[!] ballI) |
1099 |
proof- |
|
1100 |
fix u assume u:"u \<in> ball a d" |
|
1101 |
hence "u\<in>s" using d d2 by auto |
|
1102 |
have *:"(\<lambda>v. v - g' (f' u v)) = g' \<circ> (\<lambda>w. f' a w - f' u w)" |
|
1103 |
unfolding o_def and diff using f'g' by auto |
|
41958 | 1104 |
show "(ph has_derivative (\<lambda>v. v - g' (f' u v))) (at u within ball a d)" |
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1105 |
unfolding ph' * |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1106 |
apply(simp add: comp_def) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1107 |
apply(rule bounded_linear.FDERIV[OF assms(3)]) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1108 |
apply(rule FDERIV_intros) defer |
44123 | 1109 |
apply(rule has_derivative_sub[where g'="\<lambda>x.0",unfolded diff_0_right]) |
1110 |
apply(rule has_derivative_at_within) |
|
1111 |
using assms(5) and `u\<in>s` `a\<in>s` |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1112 |
apply (auto intro!: FDERIV_intros bounded_linear.FDERIV[of _ "\<lambda>x. x"] derivative_linear) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1113 |
done |
44123 | 1114 |
have **:"bounded_linear (\<lambda>x. f' u x - f' a x)" |
1115 |
"bounded_linear (\<lambda>x. f' a x - f' u x)" |
|
1116 |
apply(rule_tac[!] bounded_linear_sub) |
|
1117 |
apply(rule_tac[!] derivative_linear) |
|
1118 |
using assms(5) `u\<in>s` `a\<in>s` by auto |
|
1119 |
have "onorm (\<lambda>v. v - g' (f' u v)) \<le> onorm g' * onorm (\<lambda>w. f' a w - f' u w)" |
|
1120 |
unfolding * apply(rule onorm_compose) |
|
1121 |
unfolding linear_conv_bounded_linear by(rule assms(3) **)+ |
|
1122 |
also have "\<dots> \<le> onorm g' * k" |
|
1123 |
apply(rule mult_left_mono) |
|
1124 |
using d1[THEN conjunct2,rule_format,of u] |
|
1125 |
using onorm_neg[OF **(1)[unfolded linear_linear]] |
|
1126 |
using d and u and onorm_pos_le[OF assms(3)[unfolded linear_linear]] |
|
1127 |
by (auto simp add: algebra_simps) |
|
41958 | 1128 |
also have "\<dots> \<le> 1/2" unfolding k_def by auto |
44123 | 1129 |
finally show "onorm (\<lambda>v. v - g' (f' u v)) \<le> 1 / 2" by assumption |
1130 |
qed |
|
1131 |
moreover have "norm (ph y - ph x) = norm (y - x)" |
|
1132 |
apply(rule arg_cong[where f=norm]) |
|
41958 | 1133 |
unfolding ph_def using diff unfolding as by auto |
44123 | 1134 |
ultimately show "x = y" unfolding norm_minus_commute by auto |
1135 |
qed |
|
1136 |
qed auto |
|
1137 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1138 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1139 |
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
|
1140 |
|
44123 | 1141 |
lemma has_derivative_sequence_lipschitz_lemma: |
1142 |
fixes f::"nat \<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1143 |
assumes "convex s" |
|
1144 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1145 |
assumes "\<forall>n\<ge>N. \<forall>x\<in>s. \<forall>h. norm(f' n x h - g' x h) \<le> e * norm(h)" |
|
1146 |
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)" |
|
1147 |
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
|
1148 |
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
|
1149 |
show "norm((f m x - f n x) - (f m y - f n y)) \<le> 2 * e * norm(x - y)" |
44123 | 1150 |
apply(rule differentiable_bound[where f'="\<lambda>x h. f' m x h - f' n x h", OF assms(1) _ _ as(3-4)]) |
1151 |
apply(rule_tac[!] ballI) |
|
1152 |
proof- |
|
1153 |
fix x assume "x\<in>s" |
|
1154 |
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)" |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1155 |
by(rule FDERIV_intros assms(2)[rule_format] `x\<in>s`)+ |
44123 | 1156 |
{ fix h |
1157 |
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)" |
|
1158 |
using norm_triangle_ineq[of "f' m x h - g' x h" "- f' n x h + g' x h"] |
|
1159 |
unfolding norm_minus_commute by (auto simp add: algebra_simps) |
|
1160 |
also have "\<dots> \<le> e * norm h+ e * norm h" |
|
1161 |
using assms(3)[rule_format,OF `N\<le>m` `x\<in>s`, of h] |
|
1162 |
using assms(3)[rule_format,OF `N\<le>n` `x\<in>s`, of h] |
|
41958 | 1163 |
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
|
1164 |
finally have "norm (f' m x h - f' n x h) \<le> 2 * e * norm h" by auto } |
44123 | 1165 |
thus "onorm (\<lambda>h. f' m x h - f' n x h) \<le> 2 * e" |
1166 |
apply-apply(rule onorm(2)) apply(rule linear_compose_sub) |
|
1167 |
unfolding linear_conv_bounded_linear |
|
1168 |
using assms(2)[rule_format,OF `x\<in>s`, THEN derivative_linear] |
|
1169 |
by auto |
|
1170 |
qed |
|
1171 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1172 |
|
44123 | 1173 |
lemma has_derivative_sequence_lipschitz: |
1174 |
fixes f::"nat \<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1175 |
assumes "convex s" |
|
1176 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1177 |
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)" |
|
1178 |
assumes "0 < e" |
|
1179 |
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)" |
|
1180 |
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
|
1181 |
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
|
1182 |
guess N using assms(3)[rule_format,OF *(2)] .. |
44123 | 1183 |
thus ?case |
1184 |
apply(rule_tac x=N in exI) |
|
1185 |
apply(rule has_derivative_sequence_lipschitz_lemma[where e="1/2 *e", unfolded *]) |
|
1186 |
using assms by auto |
|
1187 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1188 |
|
44123 | 1189 |
lemma has_derivative_sequence: |
1190 |
fixes f::"nat\<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1191 |
assumes "convex s" |
|
1192 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1193 |
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)" |
|
1194 |
assumes "x0 \<in> s" and "((\<lambda>n. f n x0) ---> l) sequentially" |
|
1195 |
shows "\<exists>g. \<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially \<and> |
|
1196 |
(g has_derivative g'(x)) (at x within s)" |
|
1197 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1198 |
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 | 1199 |
apply(rule has_derivative_sequence_lipschitz[where e="42::nat"]) |
1200 |
apply(rule assms)+ by auto |
|
1201 |
have "\<exists>g. \<forall>x\<in>s. ((\<lambda>n. f n x) ---> g x) sequentially" |
|
1202 |
apply(rule bchoice) unfolding convergent_eq_cauchy |
|
1203 |
proof |
|
1204 |
fix x assume "x\<in>s" show "Cauchy (\<lambda>n. f n x)" |
|
1205 |
proof(cases "x=x0") |
|
50939
ae7cd20ed118
replace convergent_imp_cauchy by LIMSEQ_imp_Cauchy
hoelzl
parents:
50526
diff
changeset
|
1206 |
case True thus ?thesis using LIMSEQ_imp_Cauchy[OF assms(5)] by auto |
44123 | 1207 |
next |
1208 |
case False show ?thesis unfolding Cauchy_def |
|
1209 |
proof(rule,rule) |
|
1210 |
fix e::real assume "e>0" |
|
1211 |
hence *:"e/2>0" "e/2/norm(x-x0)>0" |
|
1212 |
using False by (auto intro!: divide_pos_pos) |
|
50939
ae7cd20ed118
replace convergent_imp_cauchy by LIMSEQ_imp_Cauchy
hoelzl
parents:
50526
diff
changeset
|
1213 |
guess M using LIMSEQ_imp_Cauchy[OF assms(5), unfolded Cauchy_def, rule_format,OF *(1)] .. note M=this |
41958 | 1214 |
guess N using lem1[rule_format,OF *(2)] .. note N = this |
44123 | 1215 |
show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (f m x) (f n x) < e" |
1216 |
apply(rule_tac x="max M N" in exI) |
|
1217 |
proof(default+) |
|
41958 | 1218 |
fix m n assume as:"max M N \<le>m" "max M N\<le>n" |
1219 |
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))" |
|
1220 |
unfolding dist_norm by(rule norm_triangle_sub) |
|
44123 | 1221 |
also have "\<dots> \<le> norm (f m x0 - f n x0) + e / 2" |
1222 |
using N[rule_format,OF _ _ `x\<in>s` `x0\<in>s`, of m n] and as and False |
|
1223 |
by auto |
|
1224 |
also have "\<dots> < e / 2 + e / 2" |
|
1225 |
apply(rule add_strict_right_mono) |
|
1226 |
using as and M[rule_format] unfolding dist_norm by auto |
|
1227 |
finally show "dist (f m x) (f n x) < e" by auto |
|
1228 |
qed |
|
1229 |
qed |
|
1230 |
qed |
|
1231 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1232 |
then guess g .. note g = this |
44123 | 1233 |
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)" |
1234 |
proof(rule,rule) |
|
1235 |
fix e::real assume *:"e>0" |
|
1236 |
guess N using lem1[rule_format,OF *] .. note N=this |
|
1237 |
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)" |
|
1238 |
apply(rule_tac x=N in exI) |
|
1239 |
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
|
1240 |
fix n x y assume as:"N \<le> n" "x \<in> s" "y \<in> s" |
44123 | 1241 |
have "eventually (\<lambda>xa. norm (f n x - f n y - (f xa x - f xa y)) \<le> e * norm (x - y)) sequentially" |
1242 |
unfolding eventually_sequentially |
|
1243 |
apply(rule_tac x=N in exI) |
|
1244 |
proof(rule,rule) |
|
1245 |
fix m assume "N\<le>m" |
|
1246 |
thus "norm (f n x - f n y - (f m x - f m y)) \<le> e * norm (x - y)" |
|
1247 |
using N[rule_format, of n m x y] and as |
|
1248 |
by (auto simp add: algebra_simps) |
|
1249 |
qed |
|
1250 |
thus "norm (f n x - f n y - (g x - g y)) \<le> e * norm (x - y)" |
|
1251 |
apply- |
|
41958 | 1252 |
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 | 1253 |
apply(rule tendsto_intros g[rule_format] as)+ by assumption |
44123 | 1254 |
qed |
1255 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1256 |
show ?thesis unfolding has_derivative_within_alt apply(rule_tac x=g in exI) |
44123 | 1257 |
apply(rule,rule,rule g[rule_format],assumption) |
1258 |
proof fix x assume "x\<in>s" |
|
1259 |
have lem3:"\<forall>u. ((\<lambda>n. f' n x u) ---> g' x u) sequentially" |
|
44907
93943da0a010
remove redundant lemma Lim_sequentially in favor of lemma LIMSEQ_def
huffman
parents:
44890
diff
changeset
|
1260 |
unfolding LIMSEQ_def |
44123 | 1261 |
proof(rule,rule,rule) |
1262 |
fix u and e::real assume "e>0" |
|
1263 |
show "\<exists>N. \<forall>n\<ge>N. dist (f' n x u) (g' x u) < e" |
|
1264 |
proof(cases "u=0") |
|
41958 | 1265 |
case True guess N using assms(3)[rule_format,OF `e>0`] .. note N=this |
1266 |
show ?thesis apply(rule_tac x=N in exI) unfolding True |
|
44123 | 1267 |
using N[rule_format,OF _ `x\<in>s`,of _ 0] and `e>0` by auto |
1268 |
next |
|
1269 |
case False hence *:"e / 2 / norm u > 0" |
|
1270 |
using `e>0` by (auto intro!: divide_pos_pos) |
|
41958 | 1271 |
guess N using assms(3)[rule_format,OF *] .. note N=this |
44123 | 1272 |
show ?thesis apply(rule_tac x=N in exI) |
1273 |
proof(rule,rule) case goal1 |
|
1274 |
show ?case unfolding dist_norm |
|
1275 |
using N[rule_format,OF goal1 `x\<in>s`, of u] False `e>0` |
|
1276 |
by (auto simp add:field_simps) |
|
1277 |
qed |
|
1278 |
qed |
|
1279 |
qed |
|
1280 |
show "bounded_linear (g' x)" |
|
1281 |
unfolding linear_linear linear_def |
|
1282 |
apply(rule,rule,rule) defer |
|
1283 |
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
|
1284 |
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
|
1285 |
note lin = assms(2)[rule_format,OF `x\<in>s`,THEN derivative_linear] |
44123 | 1286 |
show "g' x (c *\<^sub>R x') = c *\<^sub>R g' x x'" |
1287 |
apply(rule tendsto_unique[OF trivial_limit_sequentially]) |
|
41958 | 1288 |
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
|
1289 |
unfolding lin[unfolded bounded_linear_def bounded_linear_axioms_def,THEN conjunct2,THEN conjunct1,rule_format] |
44125 | 1290 |
apply (intro tendsto_intros) by(rule lem3[rule_format]) |
44123 | 1291 |
show "g' x (y + z) = g' x y + g' x z" |
1292 |
apply(rule tendsto_unique[OF trivial_limit_sequentially]) |
|
1293 |
apply(rule lem3[rule_format]) |
|
1294 |
unfolding lin[unfolded bounded_linear_def additive_def,THEN conjunct1,rule_format] |
|
44125 | 1295 |
apply(rule tendsto_add) by(rule lem3[rule_format])+ |
44123 | 1296 |
qed |
1297 |
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)" |
|
1298 |
proof(rule,rule) case goal1 |
|
1299 |
have *:"e/3>0" using goal1 by auto |
|
1300 |
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
|
1301 |
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
|
1302 |
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 | 1303 |
show ?case apply(rule_tac x=d1 in exI) apply(rule,rule d1[THEN conjunct1]) |
1304 |
proof(rule,rule) |
|
1305 |
fix y assume as:"y \<in> s" "norm (y - x) < d1" |
|
1306 |
let ?N ="max N1 N2" |
|
1307 |
have "norm (g y - g x - (f ?N y - f ?N x)) \<le> e /3 * norm (y - x)" |
|
1308 |
apply(subst norm_minus_cancel[THEN sym]) |
|
1309 |
using N2[rule_format, OF _ `y\<in>s` `x\<in>s`, of ?N] by auto |
|
1310 |
moreover |
|
1311 |
have "norm (f ?N y - f ?N x - f' ?N x (y - x)) \<le> e / 3 * norm (y - x)" |
|
1312 |
using d1 and as by auto |
|
1313 |
ultimately |
|
41958 | 1314 |
have "norm (g y - g x - f' ?N x (y - x)) \<le> 2 * e / 3 * norm (y - x)" |
44123 | 1315 |
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)"] |
1316 |
by (auto simp add:algebra_simps) |
|
1317 |
moreover |
|
1318 |
have " norm (f' ?N x (y - x) - g' x (y - x)) \<le> e / 3 * norm (y - x)" |
|
1319 |
using N1 `x\<in>s` by auto |
|
41958 | 1320 |
ultimately show "norm (g y - g x - g' x (y - x)) \<le> e * norm (y - x)" |
44123 | 1321 |
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)"] |
1322 |
by(auto simp add:algebra_simps) |
|
1323 |
qed |
|
1324 |
qed |
|
1325 |
qed |
|
1326 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1327 |
|
44124
4c2a61a897d8
Derivative.thy: more sensible subsection headings
huffman
parents:
44123
diff
changeset
|
1328 |
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
|
1329 |
|
44123 | 1330 |
lemma has_antiderivative_sequence: |
1331 |
fixes f::"nat\<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1332 |
assumes "convex s" |
|
1333 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1334 |
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" |
|
1335 |
shows "\<exists>g. \<forall>x\<in>s. (g has_derivative g'(x)) (at x within s)" |
|
1336 |
proof(cases "s={}") |
|
1337 |
case False then obtain a where "a\<in>s" by auto |
|
1338 |
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 |
|
1339 |
show ?thesis |
|
1340 |
apply(rule *) |
|
1341 |
apply(rule has_derivative_sequence[OF assms(1) _ assms(3), of "\<lambda>n x. f n x + (f 0 a - f n a)"]) |
|
1342 |
apply(rule,rule) |
|
1343 |
apply(rule has_derivative_add_const, rule assms(2)[rule_format], assumption) |
|
44457
d366fa5551ef
declare euclidean_simps [simp] at the point they are proved;
huffman
parents:
44282
diff
changeset
|
1344 |
apply(rule `a\<in>s`) by auto |
44123 | 1345 |
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
|
1346 |
|
44123 | 1347 |
lemma has_antiderivative_limit: |
1348 |
fixes g'::"'m::euclidean_space \<Rightarrow> 'm \<Rightarrow> 'n::euclidean_space" |
|
1349 |
assumes "convex s" |
|
1350 |
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))" |
|
1351 |
shows "\<exists>g. \<forall>x\<in>s. (g has_derivative g'(x)) (at x within s)" |
|
1352 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1353 |
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 | 1354 |
apply(rule) using assms(2) |
1355 |
apply(erule_tac x="inverse (real (Suc n))" in allE) by auto |
|
1356 |
guess f using *[THEN choice] .. note * = this |
|
1357 |
guess f' using *[THEN choice] .. note f=this |
|
1358 |
show ?thesis apply(rule has_antiderivative_sequence[OF assms(1), of f f']) defer |
|
1359 |
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
|
1360 |
fix e::real assume "0<e" guess N using reals_Archimedean[OF `e>0`] .. note N=this |
44123 | 1361 |
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" |
1362 |
apply(rule_tac x=N in exI) |
|
1363 |
proof(default+) |
|
1364 |
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
|
1365 |
have *:"inverse (real (Suc n)) \<le> e" apply(rule order_trans[OF _ N[THEN less_imp_le]]) |
41958 | 1366 |
using goal1(1) by(auto simp add:field_simps) |
44123 | 1367 |
show ?case |
1368 |
using f[rule_format,THEN conjunct2,OF goal1(2), of n, THEN spec[where x=h]] |
|
1369 |
apply(rule order_trans) using N * apply(cases "h=0") by auto |
|
1370 |
qed |
|
1371 |
qed(insert f,auto) |
|
1372 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1373 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1374 |
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
|
1375 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1376 |
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
|
1377 |
(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
|
1378 |
|
44123 | 1379 |
lemma has_derivative_series: |
1380 |
fixes f::"nat \<Rightarrow> 'm::euclidean_space \<Rightarrow> 'n::euclidean_space" |
|
1381 |
assumes "convex s" |
|
1382 |
assumes "\<forall>n. \<forall>x\<in>s. ((f n) has_derivative (f' n x)) (at x within s)" |
|
1383 |
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)" |
|
1384 |
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
|
1385 |
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 | 1386 |
unfolding sums_seq_def |
1387 |
apply(rule has_derivative_sequence[OF assms(1) _ assms(3)]) |
|
51642
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1388 |
apply(rule, rule) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1389 |
apply(rule has_derivative_setsum) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1390 |
apply(rule assms(2)[rule_format]) |
400ec5ae7f8f
move FrechetDeriv from the Library to HOL/Deriv; base DERIV on FDERIV and both derivatives allow a restricted support set; FDERIV is now an abbreviation of has_derivative
hoelzl
parents:
51641
diff
changeset
|
1391 |
apply assumption |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1392 |
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
|
1393 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36844
diff
changeset
|
1394 |
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
|
1395 |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
43338
diff
changeset
|
1396 |
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
|
1397 |
(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
|
1398 |
"(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
|
1399 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1400 |
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
|
1401 |
|
44123 | 1402 |
lemma vector_derivative_works: |
1403 |
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
|
1404 |
shows "f differentiable net \<longleftrightarrow> (f has_vector_derivative (vector_derivative f net)) net" (is "?l = ?r") |
44123 | 1405 |
proof |
1406 |
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
|
1407 |
then interpret bounded_linear f' by auto |
46898
1570b30ee040
tuned proofs -- eliminated pointless chaining of facts after 'interpret';
wenzelm
parents:
45605
diff
changeset
|
1408 |
show ?r unfolding vector_derivative_def 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
|
1409 |
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
|
1410 |
using f' unfolding scaleR[THEN sym] by auto |
44123 | 1411 |
next |
1412 |
assume ?r thus ?l |
|
1413 |
unfolding vector_derivative_def has_vector_derivative_def differentiable_def |
|
1414 |
by auto |
|
1415 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1416 |
|
50418
bd68cf816dd3
fundamental theorem of calculus for the Lebesgue integral
hoelzl
parents:
46898
diff
changeset
|
1417 |
lemma has_vector_derivative_withinI_DERIV: |
bd68cf816dd3
fundamental theorem of calculus for the Lebesgue integral
hoelzl
parents:
46898
diff
changeset
|
1418 |
assumes f: "DERIV f x :> y" shows "(f has_vector_derivative y) (at x within s)" |
bd68cf816dd3
fundamental theorem of calculus for the Lebesgue integral
hoelzl
parents:
46898
diff
changeset
|
1419 |
unfolding has_vector_derivative_def real_scaleR_def |
bd68cf816dd3
fundamental theorem of calculus for the Lebesgue integral
hoelzl
parents:
46898
diff
changeset
|
1420 |
apply (rule has_derivative_at_within) |
bd68cf816dd3
fundamental theorem of calculus for the Lebesgue integral
hoelzl
parents:
46898
diff
changeset
|
1421 |
using DERIV_conv_has_derivative[THEN iffD1, OF f] |
bd68cf816dd3
fundamental theorem of calculus for the Lebesgue integral
hoelzl
parents:
46898
diff
changeset
|
1422 |
apply (subst mult_commute) . |
bd68cf816dd3
fundamental theorem of calculus for the Lebesgue integral
hoelzl
parents:
46898
diff
changeset
|
1423 |
|
37730 | 1424 |
lemma vector_derivative_unique_at: |
1425 |
assumes "(f has_vector_derivative f') (at x)" |
|
1426 |
assumes "(f has_vector_derivative f'') (at x)" |
|
1427 |
shows "f' = f''" |
|
1428 |
proof- |
|
1429 |
have "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
|
1430 |
using assms [unfolded has_vector_derivative_def] |
|
1431 |
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
|
1432 |
thus ?thesis unfolding fun_eq_iff by auto |
37730 | 1433 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1434 |
|
44123 | 1435 |
lemma vector_derivative_unique_within_closed_interval: |
1436 |
assumes "a < b" and "x \<in> {a..b}" |
|
1437 |
assumes "(f has_vector_derivative f') (at x within {a..b})" |
|
1438 |
assumes "(f has_vector_derivative f'') (at x within {a..b})" |
|
1439 |
shows "f' = f''" |
|
1440 |
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
|
1441 |
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
|
1442 |
apply(rule frechet_derivative_unique_within_closed_interval[of "a" "b"]) |
44123 | 1443 |
using assms(3-)[unfolded has_vector_derivative_def] using assms(1-2) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50418
diff
changeset
|
1444 |
by (auto simp: Basis_real_def) |
44123 | 1445 |
show ?thesis |
1446 |
proof(rule ccontr) |
|
1447 |
assume "f' \<noteq> f''" |
|
1448 |
moreover |
|
1449 |
hence "(\<lambda>x. x *\<^sub>R f') 1 = (\<lambda>x. x *\<^sub>R f'') 1" |
|
1450 |
using * by (auto simp: fun_eq_iff) |
|
1451 |
ultimately show False unfolding o_def by auto |
|
1452 |
qed |
|
1453 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1454 |
|
37730 | 1455 |
lemma vector_derivative_at: |
1456 |
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
|
1457 |
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
|
1458 |
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
|
1459 |
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
|
1460 |
|
44123 | 1461 |
lemma vector_derivative_within_closed_interval: |
1462 |
assumes "a < b" and "x \<in> {a..b}" |
|
1463 |
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
|
1464 |
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
|
1465 |
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
|
1466 |
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
|
1467 |
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
|
1468 |
|
34981 | 1469 |
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
|
1470 |
"(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
|
1471 |
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
|
1472 |
|
34981 | 1473 |
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
|
1474 |
"((\<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
|
1475 |
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
|
1476 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1477 |
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
|
1478 |
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
|
1479 |
|
44123 | 1480 |
lemma has_vector_derivative_cmul: |
1481 |
"(f has_vector_derivative f') net \<Longrightarrow> ((\<lambda>x. c *\<^sub>R f x) has_vector_derivative (c *\<^sub>R f')) net" |
|
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44137
diff
changeset
|
1482 |
unfolding has_vector_derivative_def |
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
1483 |
apply (drule scaleR_right_has_derivative) |
44123 | 1484 |
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
|
1485 |
|
44123 | 1486 |
lemma has_vector_derivative_cmul_eq: |
1487 |
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
|
1488 |
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
|
1489 |
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
|
1490 |
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
|
1491 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1492 |
lemma has_vector_derivative_neg: |
44123 | 1493 |
"(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
|
1494 |
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
|
1495 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1496 |
lemma has_vector_derivative_add: |
44123 | 1497 |
assumes "(f has_vector_derivative f') net" |
1498 |
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
|
1499 |
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
|
1500 |
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
|
1501 |
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
|
1502 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1503 |
lemma has_vector_derivative_sub: |
44123 | 1504 |
assumes "(f has_vector_derivative f') net" |
1505 |
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
|
1506 |
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
|
1507 |
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
|
1508 |
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
|
1509 |
|
37650 | 1510 |
lemma has_vector_derivative_bilinear_within: |
44123 | 1511 |
assumes "(f has_vector_derivative f') (at x within s)" |
1512 |
assumes "(g has_vector_derivative g') (at x within s)" |
|
1513 |
assumes "bounded_bilinear h" |
|
1514 |
shows "((\<lambda>x. h (f x) (g x)) has_vector_derivative (h (f x) g' + h f' (g x))) (at x within s)" |
|
1515 |
proof- |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1516 |
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
|
1517 |
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
|
1518 |
unfolding o_def has_vector_derivative_def |
44123 | 1519 |
using assms(3) unfolding scaleR_right scaleR_left scaleR_right_distrib |
1520 |
by auto |
|
1521 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1522 |
|
37650 | 1523 |
lemma has_vector_derivative_bilinear_at: |
44123 | 1524 |
assumes "(f has_vector_derivative f') (at x)" |
1525 |
assumes "(g has_vector_derivative g') (at x)" |
|
1526 |
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
|
1527 |
shows "((\<lambda>x. h (f x) (g x)) has_vector_derivative (h (f x) g' + h f' (g x))) (at x)" |
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51478
diff
changeset
|
1528 |
using has_vector_derivative_bilinear_within[OF assms] . |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1529 |
|
44123 | 1530 |
lemma has_vector_derivative_at_within: |
1531 |
"(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f') (at x within s)" |
|
1532 |
unfolding has_vector_derivative_def |
|
45031 | 1533 |
by (rule has_derivative_at_within) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1534 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1535 |
lemma has_vector_derivative_transform_within: |
44123 | 1536 |
assumes "0 < d" and "x \<in> s" and "\<forall>x'\<in>s. dist x' x < d \<longrightarrow> f x' = g x'" |
1537 |
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
|
1538 |
shows "(g has_vector_derivative f') (at x within s)" |
44123 | 1539 |
using assms unfolding has_vector_derivative_def |
1540 |
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
|
1541 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1542 |
lemma has_vector_derivative_transform_at: |
44123 | 1543 |
assumes "0 < d" and "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'" |
1544 |
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
|
1545 |
shows "(g has_vector_derivative f') (at x)" |
44123 | 1546 |
using assms unfolding has_vector_derivative_def |
1547 |
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
|
1548 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1549 |
lemma has_vector_derivative_transform_within_open: |
44123 | 1550 |
assumes "open s" and "x \<in> s" and "\<forall>y\<in>s. f y = g y" |
1551 |
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
|
1552 |
shows "(g has_vector_derivative f') (at x)" |
44123 | 1553 |
using assms unfolding has_vector_derivative_def |
1554 |
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
|
1555 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1556 |
lemma vector_diff_chain_at: |
44123 | 1557 |
assumes "(f has_vector_derivative f') (at x)" |
1558 |
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
|
1559 |
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x)" |
44123 | 1560 |
using assms(2) unfolding has_vector_derivative_def apply- |
1561 |
apply(drule diff_chain_at[OF assms(1)[unfolded has_vector_derivative_def]]) |
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
1562 |
unfolding o_def real_scaleR_def scaleR_scaleR . |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1563 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1564 |
lemma vector_diff_chain_within: |
44123 | 1565 |
assumes "(f has_vector_derivative f') (at x within s)" |
1566 |
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
|
1567 |
shows "((g o f) has_vector_derivative (f' *\<^sub>R g')) (at x within s)" |
44123 | 1568 |
using assms(2) unfolding has_vector_derivative_def apply- |
1569 |
apply(drule diff_chain_within[OF assms(1)[unfolded has_vector_derivative_def]]) |
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44140
diff
changeset
|
1570 |
unfolding o_def real_scaleR_def scaleR_scaleR . |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1571 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1572 |
end |