src/HOL/ex/NatSum.thy
changeset 969 b051e2fc2e34
child 1376 92f83b9d17e1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/HOL/ex/NatSum.thy	Wed Mar 22 12:42:34 1995 +0100
@@ -0,0 +1,13 @@
+(*  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