equal
deleted
inserted
replaced
64 (\<forall>e>0. \<exists>d>0. \<forall>x'. 0 < norm (x' - x) \<and> norm (x' - x) < d \<longrightarrow> |
64 (\<forall>e>0. \<exists>d>0. \<forall>x'. 0 < norm (x' - x) \<and> norm (x' - x) < d \<longrightarrow> |
65 norm (f x' - f x - f'(x' - x)) / norm (x' - x) < e)" |
65 norm (f x' - f x - f'(x' - x)) / norm (x' - x) < e)" |
66 using has_derivative_within' [of f f' x UNIV] |
66 using has_derivative_within' [of f f' x UNIV] |
67 by simp |
67 by simp |
68 |
68 |
69 lemma has_derivative_at_within: |
69 lemma has_derivative_at_withinI: |
70 "(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f') (at x within s)" |
70 "(f has_derivative f') (at x) \<Longrightarrow> (f has_derivative f') (at x within s)" |
71 unfolding has_derivative_within' has_derivative_at' |
71 unfolding has_derivative_within' has_derivative_at' |
72 by blast |
72 by blast |
73 |
73 |
74 lemma has_derivative_within_open: |
74 lemma has_derivative_within_open: |
133 lemma differentiable_onD: "\<lbrakk>f differentiable_on S; x \<in> S\<rbrakk> \<Longrightarrow> f differentiable (at x within S)" |
133 lemma differentiable_onD: "\<lbrakk>f differentiable_on S; x \<in> S\<rbrakk> \<Longrightarrow> f differentiable (at x within S)" |
134 using differentiable_on_def by blast |
134 using differentiable_on_def by blast |
135 |
135 |
136 lemma differentiable_at_withinI: "f differentiable (at x) \<Longrightarrow> f differentiable (at x within s)" |
136 lemma differentiable_at_withinI: "f differentiable (at x) \<Longrightarrow> f differentiable (at x within s)" |
137 unfolding differentiable_def |
137 unfolding differentiable_def |
138 using has_derivative_at_within |
138 using has_derivative_at_withinI |
139 by blast |
139 by blast |
140 |
140 |
141 lemma differentiable_at_imp_differentiable_on: |
141 lemma differentiable_at_imp_differentiable_on: |
142 "(\<And>x. x \<in> s \<Longrightarrow> f differentiable at x) \<Longrightarrow> f differentiable_on s" |
142 "(\<And>x. x \<in> s \<Longrightarrow> f differentiable at x) \<Longrightarrow> f differentiable_on s" |
143 by (metis differentiable_at_withinI differentiable_on_def) |
143 by (metis differentiable_at_withinI differentiable_on_def) |
1817 apply (simp add: comp_def) |
1817 apply (simp add: comp_def) |
1818 apply (rule bounded_linear.has_derivative[OF assms(3)]) |
1818 apply (rule bounded_linear.has_derivative[OF assms(3)]) |
1819 apply (rule derivative_intros) |
1819 apply (rule derivative_intros) |
1820 defer |
1820 defer |
1821 apply (rule has_derivative_sub[where g'="\<lambda>x.0",unfolded diff_0_right]) |
1821 apply (rule has_derivative_sub[where g'="\<lambda>x.0",unfolded diff_0_right]) |
1822 apply (rule has_derivative_at_within) |
1822 apply (rule has_derivative_at_withinI) |
1823 using assms(5) and \<open>u \<in> s\<close> \<open>a \<in> s\<close> |
1823 using assms(5) and \<open>u \<in> s\<close> \<open>a \<in> s\<close> |
1824 apply (auto intro!: derivative_intros bounded_linear.has_derivative[of _ "\<lambda>x. x"] has_derivative_bounded_linear) |
1824 apply (auto intro!: derivative_intros bounded_linear.has_derivative[of _ "\<lambda>x. x"] has_derivative_bounded_linear) |
1825 done |
1825 done |
1826 have **: "bounded_linear (\<lambda>x. f' u x - f' a x)" "bounded_linear (\<lambda>x. f' a x - f' u x)" |
1826 have **: "bounded_linear (\<lambda>x. f' u x - f' a x)" "bounded_linear (\<lambda>x. f' a x - f' u x)" |
1827 apply (rule_tac[!] bounded_linear_sub) |
1827 apply (rule_tac[!] bounded_linear_sub) |
2524 by (auto simp: has_vector_derivative_def intro: has_derivative_within_subset) |
2524 by (auto simp: has_vector_derivative_def intro: has_derivative_within_subset) |
2525 |
2525 |
2526 lemma has_vector_derivative_at_within: |
2526 lemma has_vector_derivative_at_within: |
2527 "(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f') (at x within s)" |
2527 "(f has_vector_derivative f') (at x) \<Longrightarrow> (f has_vector_derivative f') (at x within s)" |
2528 unfolding has_vector_derivative_def |
2528 unfolding has_vector_derivative_def |
2529 by (rule has_derivative_at_within) |
2529 by (rule has_derivative_at_withinI) |
2530 |
2530 |
2531 lemma has_vector_derivative_weaken: |
2531 lemma has_vector_derivative_weaken: |
2532 fixes x D and f g s t |
2532 fixes x D and f g s t |
2533 assumes f: "(f has_vector_derivative D) (at x within t)" |
2533 assumes f: "(f has_vector_derivative D) (at x within t)" |
2534 and "x \<in> s" "s \<subseteq> t" |
2534 and "x \<in> s" "s \<subseteq> t" |