ex/NatSum.thy
author lcp
Thu, 21 Jul 1994 10:52:00 +0200
changeset 97 3f4976d8c97f
parent 68 acad709cad5d
permissions -rw-r--r--
HOL/Makefile: now test depends upon SUBST_FILES HOL/Makefile/SUBST_FILES: changed some filenames to upper case HOL/Makefile: now executes ex/ROOT.ML after Subst/ROOT.ML

(*  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"
rules  sum_0      "sum(f,0) = 0"
       sum_Suc    "sum(f,Suc(n)) = f(n) + sum(f,n)"
end