476 then show "\<exists>K. \<forall>x. norm (f x, g x) \<le> norm x * K" .. |
476 then show "\<exists>K. \<forall>x. norm (f x, g x) \<le> norm x * K" .. |
477 qed |
477 qed |
478 |
478 |
479 subsubsection {* Frechet derivatives involving pairs *} |
479 subsubsection {* Frechet derivatives involving pairs *} |
480 |
480 |
481 lemma FDERIV_Pair [FDERIV_intros]: |
481 lemma has_derivative_Pair [has_derivative_intros]: |
482 assumes f: "FDERIV f x : s :> f'" and g: "FDERIV g x : s :> g'" |
482 assumes f: "(f has_derivative f') (at x within s)" and g: "(g has_derivative g') (at x within s)" |
483 shows "FDERIV (\<lambda>x. (f x, g x)) x : s :> (\<lambda>h. (f' h, g' h))" |
483 shows "((\<lambda>x. (f x, g x)) has_derivative (\<lambda>h. (f' h, g' h))) (at x within s)" |
484 proof (rule FDERIV_I_sandwich[of 1]) |
484 proof (rule has_derivativeI_sandwich[of 1]) |
485 show "bounded_linear (\<lambda>h. (f' h, g' h))" |
485 show "bounded_linear (\<lambda>h. (f' h, g' h))" |
486 using f g by (intro bounded_linear_Pair FDERIV_bounded_linear) |
486 using f g by (intro bounded_linear_Pair has_derivative_bounded_linear) |
487 let ?Rf = "\<lambda>y. f y - f x - f' (y - x)" |
487 let ?Rf = "\<lambda>y. f y - f x - f' (y - x)" |
488 let ?Rg = "\<lambda>y. g y - g x - g' (y - x)" |
488 let ?Rg = "\<lambda>y. g y - g x - g' (y - x)" |
489 let ?R = "\<lambda>y. ((f y, g y) - (f x, g x) - (f' (y - x), g' (y - x)))" |
489 let ?R = "\<lambda>y. ((f y, g y) - (f x, g x) - (f' (y - x), g' (y - x)))" |
490 |
490 |
491 show "((\<lambda>y. norm (?Rf y) / norm (y - x) + norm (?Rg y) / norm (y - x)) ---> 0) (at x within s)" |
491 show "((\<lambda>y. norm (?Rf y) / norm (y - x) + norm (?Rg y) / norm (y - x)) ---> 0) (at x within s)" |
492 using f g by (intro tendsto_add_zero) (auto simp: FDERIV_iff_norm) |
492 using f g by (intro tendsto_add_zero) (auto simp: has_derivative_iff_norm) |
493 |
493 |
494 fix y :: 'a assume "y \<noteq> x" |
494 fix y :: 'a assume "y \<noteq> x" |
495 show "norm (?R y) / norm (y - x) \<le> norm (?Rf y) / norm (y - x) + norm (?Rg y) / norm (y - x)" |
495 show "norm (?R y) / norm (y - x) \<le> norm (?Rf y) / norm (y - x) + norm (?Rg y) / norm (y - x)" |
496 unfolding add_divide_distrib [symmetric] |
496 unfolding add_divide_distrib [symmetric] |
497 by (simp add: norm_Pair divide_right_mono order_trans [OF sqrt_add_le_add_sqrt]) |
497 by (simp add: norm_Pair divide_right_mono order_trans [OF sqrt_add_le_add_sqrt]) |
498 qed simp |
498 qed simp |
499 |
499 |
500 lemmas FDERIV_fst [FDERIV_intros] = bounded_linear.FDERIV [OF bounded_linear_fst] |
500 lemmas has_derivative_fst [has_derivative_intros] = bounded_linear.has_derivative [OF bounded_linear_fst] |
501 lemmas FDERIV_snd [FDERIV_intros] = bounded_linear.FDERIV [OF bounded_linear_snd] |
501 lemmas has_derivative_snd [has_derivative_intros] = bounded_linear.has_derivative [OF bounded_linear_snd] |
502 |
502 |
503 lemma FDERIV_split [FDERIV_intros]: |
503 lemma has_derivative_split [has_derivative_intros]: |
504 "((\<lambda>p. f (fst p) (snd p)) has_derivative f') F \<Longrightarrow> ((\<lambda>(a, b). f a b) has_derivative f') F" |
504 "((\<lambda>p. f (fst p) (snd p)) has_derivative f') F \<Longrightarrow> ((\<lambda>(a, b). f a b) has_derivative f') F" |
505 unfolding split_beta' . |
505 unfolding split_beta' . |
506 |
506 |
507 subsection {* Product is an inner product space *} |
507 subsection {* Product is an inner product space *} |
508 |
508 |