src/HOL/Nonstandard_Analysis/HTranscendental.thy
changeset 67443 3abf6a722518
parent 67091 1393c2340eec
child 68611 4bc4b5c0ccfc
equal deleted inserted replaced
67442:f075640b8868 67443:3abf6a722518
    11 imports Complex_Main HSeries HDeriv
    11 imports Complex_Main HSeries HDeriv
    12 begin
    12 begin
    13 
    13 
    14 definition
    14 definition
    15   exphr :: "real => hypreal" where
    15   exphr :: "real => hypreal" where
    16     \<comment>\<open>define exponential function using standard part\<close>
    16     \<comment> \<open>define exponential function using standard part\<close>
    17   "exphr x =  st(sumhr (0, whn, %n. inverse (fact n) * (x ^ n)))"
    17   "exphr x =  st(sumhr (0, whn, %n. inverse (fact n) * (x ^ n)))"
    18 
    18 
    19 definition
    19 definition
    20   sinhr :: "real => hypreal" where
    20   sinhr :: "real => hypreal" where
    21   "sinhr x = st(sumhr (0, whn, %n. sin_coeff n * x ^ n))"
    21   "sinhr x = st(sumhr (0, whn, %n. sin_coeff n * x ^ n))"
   601 apply (auto simp add: Infinitesimal_approx_minus [symmetric] 
   601 apply (auto simp add: Infinitesimal_approx_minus [symmetric] 
   602             add.assoc [symmetric] numeral_2_eq_2)
   602             add.assoc [symmetric] numeral_2_eq_2)
   603 done
   603 done
   604 
   604 
   605 lemma STAR_cos_Infinitesimal_approx2:
   605 lemma STAR_cos_Infinitesimal_approx2:
   606   fixes x :: hypreal  \<comment>\<open>perhaps could be generalised, like many other hypreal results\<close>
   606   fixes x :: hypreal  \<comment> \<open>perhaps could be generalised, like many other hypreal results\<close>
   607   shows "x \<in> Infinitesimal ==> ( *f* cos) x \<approx> 1 - (x\<^sup>2)/2"
   607   shows "x \<in> Infinitesimal ==> ( *f* cos) x \<approx> 1 - (x\<^sup>2)/2"
   608 apply (rule STAR_cos_Infinitesimal [THEN approx_trans])
   608 apply (rule STAR_cos_Infinitesimal [THEN approx_trans])
   609 apply (auto intro: Infinitesimal_SReal_divide Infinitesimal_mult
   609 apply (auto intro: Infinitesimal_SReal_divide Infinitesimal_mult
   610             simp add: Infinitesimal_approx_minus [symmetric] numeral_2_eq_2)
   610             simp add: Infinitesimal_approx_minus [symmetric] numeral_2_eq_2)
   611 done
   611 done