src/HOL/Deriv.thy
changeset 61609 77b453bd616f
parent 61552 980dd46a03fb
child 61799 4cf66f21b764
equal deleted inserted replaced
61553:933eb9e6a1cc 61609:77b453bd616f
   839   ((\<lambda>x. f x ^ n) has_field_derivative of_nat n * (D * f x ^ (n - Suc 0))) (at x within s)"
   839   ((\<lambda>x. f x ^ n) has_field_derivative of_nat n * (D * f x ^ (n - Suc 0))) (at x within s)"
   840   by (rule has_derivative_imp_has_field_derivative[OF has_derivative_power])
   840   by (rule has_derivative_imp_has_field_derivative[OF has_derivative_power])
   841      (auto simp: has_field_derivative_def)
   841      (auto simp: has_field_derivative_def)
   842 
   842 
   843 lemma DERIV_pow: "((\<lambda>x. x ^ n) has_field_derivative real n * (x ^ (n - Suc 0))) (at x within s)"
   843 lemma DERIV_pow: "((\<lambda>x. x ^ n) has_field_derivative real n * (x ^ (n - Suc 0))) (at x within s)"
   844   apply (cut_tac DERIV_power [OF DERIV_ident])
   844   using DERIV_power [OF DERIV_ident] by simp
   845   apply (simp add: real_of_nat_def)
       
   846   done
       
   847 
   845 
   848 lemma DERIV_chain': "(f has_field_derivative D) (at x within s) \<Longrightarrow> DERIV g (f x) :> E \<Longrightarrow> 
   846 lemma DERIV_chain': "(f has_field_derivative D) (at x within s) \<Longrightarrow> DERIV g (f x) :> E \<Longrightarrow> 
   849   ((\<lambda>x. g (f x)) has_field_derivative E * D) (at x within s)"
   847   ((\<lambda>x. g (f x)) has_field_derivative E * D) (at x within s)"
   850   using has_derivative_compose[of f "op * D" x s g "op * E"]
   848   using has_derivative_compose[of f "op * D" x s g "op * E"]
   851   unfolding has_field_derivative_def mult_commute_abs ac_simps .
   849   unfolding has_field_derivative_def mult_commute_abs ac_simps .
   878 lemma DERIV_chain3: (*HAS_COMPLEX_DERIVATIVE_CHAIN_UNIV*)
   876 lemma DERIV_chain3: (*HAS_COMPLEX_DERIVATIVE_CHAIN_UNIV*)
   879   assumes "(\<And>x. DERIV g x :> g'(x))"
   877   assumes "(\<And>x. DERIV g x :> g'(x))"
   880       and "DERIV f x :> f'" 
   878       and "DERIV f x :> f'" 
   881     shows "DERIV (\<lambda>x. g(f x)) x :> f' * g'(f x)"
   879     shows "DERIV (\<lambda>x. g(f x)) x :> f' * g'(f x)"
   882   by (metis UNIV_I DERIV_chain_s [of UNIV] assms)
   880   by (metis UNIV_I DERIV_chain_s [of UNIV] assms)
   883 
       
   884 declare
       
   885   DERIV_power[where 'a=real, unfolded real_of_nat_def[symmetric], derivative_intros]
       
   886 
   881 
   887 text\<open>Alternative definition for differentiability\<close>
   882 text\<open>Alternative definition for differentiability\<close>
   888 
   883 
   889 lemma DERIV_LIM_iff:
   884 lemma DERIV_LIM_iff:
   890   fixes f :: "'a::{real_normed_vector,inverse} \<Rightarrow> 'a" shows
   885   fixes f :: "'a::{real_normed_vector,inverse} \<Rightarrow> 'a" shows