src/HOL/NSA/HDeriv.thy
changeset 31017 2c227493ea56
parent 30273 ecd6f0ca62ea
child 36310 e3d3b14b13cd
equal deleted inserted replaced
31016:e1309df633c6 31017:2c227493ea56
     1 (*  Title       : Deriv.thy
     1 (*  Title       : Deriv.thy
     2     ID          : $Id$
       
     3     Author      : Jacques D. Fleuriot
     2     Author      : Jacques D. Fleuriot
     4     Copyright   : 1998  University of Cambridge
     3     Copyright   : 1998  University of Cambridge
     5     Conversion to Isar and new proofs by Lawrence C Paulson, 2004
     4     Conversion to Isar and new proofs by Lawrence C Paulson, 2004
     6 *)
     5 *)
     7 
     6 
   343 lemma NSDERIV_cmult_Id [simp]: "NSDERIV (op * c) x :> c"
   342 lemma NSDERIV_cmult_Id [simp]: "NSDERIV (op * c) x :> c"
   344 by (cut_tac c = c and x = x in NSDERIV_Id [THEN NSDERIV_cmult], simp)
   343 by (cut_tac c = c and x = x in NSDERIV_Id [THEN NSDERIV_cmult], simp)
   345 
   344 
   346 (*Can't get rid of x \<noteq> 0 because it isn't continuous at zero*)
   345 (*Can't get rid of x \<noteq> 0 because it isn't continuous at zero*)
   347 lemma NSDERIV_inverse:
   346 lemma NSDERIV_inverse:
   348   fixes x :: "'a::{real_normed_field,recpower}"
   347   fixes x :: "'a::{real_normed_field}"
   349   shows "x \<noteq> 0 ==> NSDERIV (%x. inverse(x)) x :> (- (inverse x ^ Suc (Suc 0)))"
   348   shows "x \<noteq> 0 ==> NSDERIV (%x. inverse(x)) x :> (- (inverse x ^ Suc (Suc 0)))"
   350 apply (simp add: nsderiv_def)
   349 apply (simp add: nsderiv_def)
   351 apply (rule ballI, simp, clarify)
   350 apply (rule ballI, simp, clarify)
   352 apply (frule (1) Infinitesimal_add_not_zero)
   351 apply (frule (1) Infinitesimal_add_not_zero)
   353 apply (simp add: add_commute)
   352 apply (simp add: add_commute)
   381 by (simp add: NSDERIV_DERIV_iff DERIV_pow)
   380 by (simp add: NSDERIV_DERIV_iff DERIV_pow)
   382 
   381 
   383 text{*Derivative of inverse*}
   382 text{*Derivative of inverse*}
   384 
   383 
   385 lemma NSDERIV_inverse_fun:
   384 lemma NSDERIV_inverse_fun:
   386   fixes x :: "'a::{real_normed_field,recpower}"
   385   fixes x :: "'a::{real_normed_field}"
   387   shows "[| NSDERIV f x :> d; f(x) \<noteq> 0 |]
   386   shows "[| NSDERIV f x :> d; f(x) \<noteq> 0 |]
   388       ==> NSDERIV (%x. inverse(f x)) x :> (- (d * inverse(f(x) ^ Suc (Suc 0))))"
   387       ==> NSDERIV (%x. inverse(f x)) x :> (- (d * inverse(f(x) ^ Suc (Suc 0))))"
   389 by (simp add: NSDERIV_DERIV_iff DERIV_inverse_fun del: power_Suc)
   388 by (simp add: NSDERIV_DERIV_iff DERIV_inverse_fun del: power_Suc)
   390 
   389 
   391 text{*Derivative of quotient*}
   390 text{*Derivative of quotient*}
   392 
   391 
   393 lemma NSDERIV_quotient:
   392 lemma NSDERIV_quotient:
   394   fixes x :: "'a::{real_normed_field,recpower}"
   393   fixes x :: "'a::{real_normed_field}"
   395   shows "[| NSDERIV f x :> d; NSDERIV g x :> e; g(x) \<noteq> 0 |]
   394   shows "[| NSDERIV f x :> d; NSDERIV g x :> e; g(x) \<noteq> 0 |]
   396        ==> NSDERIV (%y. f(y) / (g y)) x :> (d*g(x)
   395        ==> NSDERIV (%y. f(y) / (g y)) x :> (d*g(x)
   397                             - (e*f(x))) / (g(x) ^ Suc (Suc 0))"
   396                             - (e*f(x))) / (g(x) ^ Suc (Suc 0))"
   398 by (simp add: NSDERIV_DERIV_iff DERIV_quotient del: power_Suc)
   397 by (simp add: NSDERIV_DERIV_iff DERIV_quotient del: power_Suc)
   399 
   398