src/HOL/ex/NatSum.thy
author wenzelm
Thu, 18 Jun 1998 10:52:34 +0200
changeset 5047 585fa380df1a
parent 3269 eca2a3634acd
child 5184 9b8547a9496a
permissions -rw-r--r--
new toplevel commands `Goal' and `Goalw'; isatool fixgoal;

(*  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