136 |
136 |
137 lemma FDERIV_diff: |
137 lemma FDERIV_diff: |
138 "\<lbrakk>FDERIV f x :> F; FDERIV g x :> G\<rbrakk> |
138 "\<lbrakk>FDERIV f x :> F; FDERIV g x :> G\<rbrakk> |
139 \<Longrightarrow> FDERIV (\<lambda>x. f x - g x) x :> (\<lambda>h. F h - G h)" |
139 \<Longrightarrow> FDERIV (\<lambda>x. f x - g x) x :> (\<lambda>h. F h - G h)" |
140 by (simp only: diff_minus FDERIV_add FDERIV_minus) |
140 by (simp only: diff_minus FDERIV_add FDERIV_minus) |
|
141 |
|
142 subsection {* Uniqueness *} |
|
143 |
|
144 lemma FDERIV_zero_unique: |
|
145 assumes "FDERIV (\<lambda>x. 0) x :> F" shows "F = (\<lambda>h. 0)" |
|
146 proof - |
|
147 interpret F: bounded_linear F |
|
148 using assms by (rule FDERIV_bounded_linear) |
|
149 let ?r = "\<lambda>h. norm (F h) / norm h" |
|
150 have *: "?r -- 0 --> 0" |
|
151 using assms unfolding fderiv_def by simp |
|
152 show "F = (\<lambda>h. 0)" |
|
153 proof |
|
154 fix h show "F h = 0" |
|
155 proof (rule ccontr) |
|
156 assume "F h \<noteq> 0" |
|
157 moreover from this have h: "h \<noteq> 0" |
|
158 by (clarsimp simp add: F.zero) |
|
159 ultimately have "0 < ?r h" |
|
160 by (simp add: divide_pos_pos) |
|
161 from LIM_D [OF * this] obtain s where s: "0 < s" |
|
162 and r: "\<And>x. x \<noteq> 0 \<Longrightarrow> norm x < s \<Longrightarrow> ?r x < ?r h" by auto |
|
163 from dense [OF s] obtain t where t: "0 < t \<and> t < s" .. |
|
164 let ?x = "scaleR (t / norm h) h" |
|
165 have "?x \<noteq> 0" and "norm ?x < s" using t h by simp_all |
|
166 hence "?r ?x < ?r h" by (rule r) |
|
167 thus "False" using t h by (simp add: F.scaleR) |
|
168 qed |
|
169 qed |
|
170 qed |
|
171 |
|
172 lemma FDERIV_unique: |
|
173 assumes "FDERIV f x :> F" and "FDERIV f x :> F'" shows "F = F'" |
|
174 proof - |
|
175 have "FDERIV (\<lambda>x. 0) x :> (\<lambda>h. F h - F' h)" |
|
176 using FDERIV_diff [OF assms] by simp |
|
177 hence "(\<lambda>h. F h - F' h) = (\<lambda>h. 0)" |
|
178 by (rule FDERIV_zero_unique) |
|
179 thus "F = F'" |
|
180 unfolding expand_fun_eq right_minus_eq . |
|
181 qed |
141 |
182 |
142 subsection {* Continuity *} |
183 subsection {* Continuity *} |
143 |
184 |
144 lemma FDERIV_isCont: |
185 lemma FDERIV_isCont: |
145 assumes f: "FDERIV f x :> F" |
186 assumes f: "FDERIV f x :> F" |
468 apply (rule norm_mult_ineq) |
509 apply (rule norm_mult_ineq) |
469 done |
510 done |
470 also have "\<dots> = norm (?inv (x + h) - ?inv x) * norm (?inv x)" |
511 also have "\<dots> = norm (?inv (x + h) - ?inv x) * norm (?inv x)" |
471 by simp |
512 by simp |
472 finally show "norm ((?inv (x + h) - ?inv x) * h * ?inv x) / norm h |
513 finally show "norm ((?inv (x + h) - ?inv x) * h * ?inv x) / norm h |
473 \<le> norm (?inv (x + h) - ?inv x) * norm (?inv x)" . |
514 \<le> norm (?inv (x + h) - ?inv x) * norm (?inv x)" . |
474 qed |
515 qed |
475 qed |
516 qed |
476 qed |
517 qed |
477 |
518 |
478 subsection {* Alternate definition *} |
519 subsection {* Alternate definition *} |