src/HOL/Decision_Procs/Approximation.thy
changeset 61586 5197a2ecb658
parent 60680 589ed01b94fe
child 61610 4f54d2759a0b
equal deleted inserted replaced
61585:a9599d3d7610 61586:5197a2ecb658
    16 declare powr_neg_one [simp]
    16 declare powr_neg_one [simp]
    17 declare powr_neg_numeral [simp]
    17 declare powr_neg_numeral [simp]
    18 
    18 
    19 section "Horner Scheme"
    19 section "Horner Scheme"
    20 
    20 
    21 subsection \<open>Define auxiliary helper @{text horner} function\<close>
    21 subsection \<open>Define auxiliary helper \<open>horner\<close> function\<close>
    22 
    22 
    23 primrec horner :: "(nat \<Rightarrow> nat) \<Rightarrow> (nat \<Rightarrow> nat \<Rightarrow> nat) \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> real \<Rightarrow> real" where
    23 primrec horner :: "(nat \<Rightarrow> nat) \<Rightarrow> (nat \<Rightarrow> nat \<Rightarrow> nat) \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> real \<Rightarrow> real" where
    24 "horner F G 0 i k x       = 0" |
    24 "horner F G 0 i k x       = 0" |
    25 "horner F G (Suc n) i k x = 1 / k - x * horner F G n (F i) (G i k) x"
    25 "horner F G (Suc n) i k x = 1 / k - x * horner F G n (F i) (G i k) x"
    26 
    26