src/HOL/ex/NatSum.thy
author nipkow
Mon, 03 Nov 1997 08:08:14 +0100
changeset 4069 d6d06a03a2e9
parent 3269 eca2a3634acd
child 5184 9b8547a9496a
permissions -rw-r--r--
expand_list_case -> split_list_case

(*  Title:      HOL/ex/natsum.thy
    ID:         $Id$
    Author:     Tobias Nipkow
    Copyright   1994 TU Muenchen

A summation operator. sum(f,n+1) is the sum of all f(i), i=0...n.
*)

NatSum = Arith +
consts sum     :: [nat=>nat, nat] => nat
primrec "sum" nat 
  "sum f 0 = 0"
  "sum f (Suc n) = f(n) + sum f n"

end