src/HOL/NatArith.thy
changeset 15048 11b4dce71d73
parent 15041 a6b1f0cef7b3
child 15131 c69542757a4d
equal deleted inserted replaced
15047:fa62de5862b9 15048:11b4dce71d73
    34 fun add_arith cs = cs addafter ("arith_tac", arith_tac);
    34 fun add_arith cs = cs addafter ("arith_tac", arith_tac);
    35 TODO: use arith_tac for force_tac in Provers/clasimp.ML *)
    35 TODO: use arith_tac for force_tac in Provers/clasimp.ML *)
    36 
    36 
    37 lemmas [arith_split] = nat_diff_split split_min split_max
    37 lemmas [arith_split] = nat_diff_split split_min split_max
    38 
    38 
    39 (*
       
    40 subsection {* Generic summation indexed over natural numbers *}
       
    41 
       
    42 consts
       
    43   Summation :: "(nat => 'a::{zero, plus}) => nat => 'a"
       
    44 primrec
       
    45   "Summation f 0 = 0"
       
    46   "Summation f (Suc n) = Summation f n + f n"
       
    47 
       
    48 syntax
       
    49   "_Summation" :: "idt => nat => 'a => nat"    ("\<Sum>_<_. _" [0, 51, 10] 10)
       
    50 translations
       
    51   "\<Sum>i < n. b" == "Summation (\<lambda>i. b) n"
       
    52 
       
    53 theorem Summation_step:
       
    54     "0 < n ==> (\<Sum>i < n. f i) = (\<Sum>i < n - 1. f i) + f (n - 1)"
       
    55   by (induct n) simp_all
       
    56 *)
       
    57 end
    39 end