--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/HOL/UNITY/AllocBase.ML Tue May 23 12:31:38 2000 +0200
@@ -0,0 +1,24 @@
+(* Title: HOL/UNITY/AllocBase
+ ID: $Id$
+ Author: Lawrence C Paulson, Cambridge University Computer Laboratory
+ Copyright 1998 University of Cambridge
+
+Basis declarations for Chandy and Charpentier's Allocator
+*)
+
+Goal "(ALL i. i<n --> f i <= (g i :: nat)) --> sum_below f n <= sum_below g n";
+by (induct_tac "n" 1);
+by Auto_tac;
+by (dres_inst_tac [("x","n")] spec 1);
+by Auto_tac;
+by (arith_tac 1);
+qed_spec_mp "sum_mono";
+
+Goal "ALL xs. xs <= ys --> tokens xs <= tokens ys";
+by (induct_tac "ys" 1);
+by (auto_tac (claset(), simpset() addsimps [prefix_Cons]));
+qed_spec_mp "tokens_mono_prefix";
+
+Goalw [mono_def] "mono tokens";
+by (blast_tac (claset() addIs [tokens_mono_prefix]) 1);
+qed "mono_tokens";
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/HOL/UNITY/AllocBase.thy Tue May 23 12:31:38 2000 +0200
@@ -0,0 +1,24 @@
+(* Title: HOL/UNITY/AllocBase
+ ID: $Id$
+ Author: Lawrence C Paulson, Cambridge University Computer Laboratory
+ Copyright 1998 University of Cambridge
+
+Common declarations for Chandy and Charpentier's Allocator
+*)
+
+AllocBase = Rename + Follows +
+
+consts
+ NbT :: nat (*Number of tokens in system*)
+ Nclients :: nat (*Number of clients*)
+
+rules
+ NbT_pos "0 < NbT"
+
+(*This function merely sums the elements of a list*)
+consts tokens :: nat list => nat
+primrec
+ "tokens [] = 0"
+ "tokens (x#xs) = x + tokens xs"
+
+end