Implicit simpsets and clasets for FOL and ZF
authorpaulson
Fri, 03 Jan 1997 15:01:55 +0100
changeset 2469 b50b8c0eec01
parent 2468 428efffe8599
child 2470 273580d5c040
Implicit simpsets and clasets for FOL and ZF
src/FOL/FOL.ML
src/FOL/Makefile
src/FOL/ROOT.ML
src/FOL/cladata.ML
src/FOL/ex/If.ML
src/FOL/ex/List.ML
src/FOL/ex/Nat.ML
src/FOL/ex/Nat2.ML
src/FOL/ex/NatClass.ML
src/FOL/ex/cla.ML
src/FOL/ex/intro.ML
src/FOL/simpdata.ML
src/FOL/thy_data.ML
src/ZF/AC.ML
src/ZF/AC.thy
src/ZF/AC/AC0_AC1.ML
src/ZF/AC/AC10_AC15.ML
src/ZF/AC/AC15_WO6.ML
src/ZF/AC/AC16_WO4.ML
src/ZF/AC/AC16_lemmas.ML
src/ZF/AC/AC16_lemmas.thy
src/ZF/AC/AC17_AC1.ML
src/ZF/AC/AC18_AC19.ML
src/ZF/AC/AC1_AC17.ML
src/ZF/AC/AC1_WO2.ML
src/ZF/AC/AC2_AC6.ML
src/ZF/AC/AC7_AC9.ML
src/ZF/AC/AC_Equiv.ML
src/ZF/AC/AC_Equiv.thy
src/ZF/AC/Cardinal_aux.ML
src/ZF/AC/Cardinal_aux.thy
src/ZF/AC/DC.ML
src/ZF/AC/DC.thy
src/ZF/AC/DC_lemmas.ML
src/ZF/AC/DC_lemmas.thy
src/ZF/AC/HH.ML
src/ZF/AC/Hartog.ML
src/ZF/AC/OrdQuant.ML
src/ZF/AC/OrdQuant.thy
src/ZF/AC/Transrec2.ML
src/ZF/AC/Transrec2.thy
src/ZF/AC/WO1_AC.ML
src/ZF/AC/WO1_WO6.ML
src/ZF/AC/WO1_WO7.ML
src/ZF/AC/WO1_WO8.ML
src/ZF/AC/WO2_AC16.ML
src/ZF/AC/WO6_WO1.ML
src/ZF/AC/WO_AC.ML
src/ZF/AC/WO_AC.thy
src/ZF/AC/first.ML
src/ZF/AC/first.thy
src/ZF/AC/recfunAC16.ML
src/ZF/AC/recfunAC16.thy
src/ZF/AC/rel_is_fun.ML
src/ZF/AC/rel_is_fun.thy
src/ZF/Arith.ML
src/ZF/Arith.thy
src/ZF/Bool.ML
src/ZF/Bool.thy
src/ZF/Cardinal.ML
src/ZF/CardinalArith.ML
src/ZF/Cardinal_AC.ML
src/ZF/Coind/ECR.ML
src/ZF/Coind/Language.ML
src/ZF/Coind/MT.ML
src/ZF/Coind/Map.ML
src/ZF/Coind/Static.ML
src/ZF/Coind/Types.ML
src/ZF/Coind/Values.ML
src/ZF/Epsilon.ML
src/ZF/Epsilon.thy
src/ZF/EquivClass.ML
src/ZF/Finite.ML
src/ZF/Fixedpt.ML
src/ZF/Fixedpt.thy
src/ZF/IMP/Com.ML
src/ZF/IMP/Denotation.ML
src/ZF/IMP/Equiv.ML
src/ZF/InfDatatype.ML
src/ZF/List.ML
src/ZF/Makefile
src/ZF/Nat.ML
src/ZF/Nat.thy
src/ZF/OrdQuant.ML
src/ZF/OrdQuant.thy
src/ZF/Order.ML
src/ZF/Order.thy
src/ZF/OrderArith.ML
src/ZF/OrderType.ML
src/ZF/OrderType.thy
src/ZF/Ordinal.ML
src/ZF/Ordinal.thy
src/ZF/Perm.ML
src/ZF/Perm.thy
src/ZF/QPair.ML
src/ZF/QPair.thy
src/ZF/QUniv.ML
src/ZF/QUniv.thy
src/ZF/ROOT.ML
src/ZF/Rel.ML
src/ZF/Rel.thy
src/ZF/Resid/Confluence.ML
src/ZF/Resid/Conversion.ML
src/ZF/Resid/Cube.ML
src/ZF/Resid/Redex.ML
src/ZF/Resid/Reduction.ML
src/ZF/Resid/Residuals.ML
src/ZF/Resid/SubUnion.ML
src/ZF/Resid/Substitution.ML
src/ZF/Resid/Terms.ML
src/ZF/Sum.ML
src/ZF/Sum.thy
src/ZF/Trancl.ML
src/ZF/Trancl.thy
src/ZF/Univ.ML
src/ZF/Univ.thy
src/ZF/WF.ML
src/ZF/WF.thy
src/ZF/ZF.ML
src/ZF/ZF.thy
src/ZF/Zorn.ML
src/ZF/domrange.ML
src/ZF/domrange.thy
src/ZF/equalities.ML
src/ZF/equalities.thy
src/ZF/ex/Acc.ML
src/ZF/ex/BT.ML
src/ZF/ex/Bin.ML
src/ZF/ex/Brouwer.ML
src/ZF/ex/CoUnit.ML
src/ZF/ex/Comb.ML
src/ZF/ex/Data.ML
src/ZF/ex/Enum.ML
src/ZF/ex/Integ.ML
src/ZF/ex/LList.ML
src/ZF/ex/Limit.ML
src/ZF/ex/Limit.thy
src/ZF/ex/ListN.ML
src/ZF/ex/Mutil.ML
src/ZF/ex/Ntree.ML
src/ZF/ex/Primes.ML
src/ZF/ex/Primrec.ML
src/ZF/ex/PropLog.ML
src/ZF/ex/Ramsey.ML
src/ZF/ex/Rmap.ML
src/ZF/ex/TF.ML
src/ZF/ex/Term.ML
src/ZF/ex/misc.ML
src/ZF/func.ML
src/ZF/func.thy
src/ZF/mono.ML
src/ZF/mono.thy
src/ZF/pair.ML
src/ZF/pair.thy
src/ZF/simpdata.ML
src/ZF/subset.ML
src/ZF/subset.thy
src/ZF/thy_data.ML
src/ZF/typechk.ML
src/ZF/upair.ML
src/ZF/upair.thy
--- a/src/FOL/FOL.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/FOL.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -67,3 +67,9 @@
   [ (rtac conjE 1),
     (REPEAT (DEPTH_SOLVE_1 
         (etac impCE 1  ORELSE  mp_tac 1  ORELSE  ares_tac prems 1))) ]);
+
+
+(*Thus, assignments to the references claset and simpset are recorded
+  with theory "FOL".  These files cannot be loaded directly in ROOT.ML.*)
+use "cladata.ML";
+use "simpdata.ML";
--- a/src/FOL/Makefile	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/Makefile	Fri Jan 03 15:01:55 1997 +0100
@@ -22,6 +22,7 @@
 BIN = $(ISABELLEBIN)
 COMP = $(ISABELLECOMP)
 FILES =	 ROOT.ML IFOL.thy IFOL.ML FOL.thy FOL.ML intprover.ML simpdata.ML \
+	 thy_data.ML cladata.ML \
 	 ../Provers/hypsubst.ML ../Provers/classical.ML \
 	 ../Provers/simplifier.ML ../Provers/splitter.ML ../Provers/ind.ML
 
--- a/src/FOL/ROOT.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/ROOT.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -14,14 +14,13 @@
 init_thy_reader();
 
 print_depth 1;  
-use_thy "FOL";
 
 use "../Provers/splitter.ML";
 use "../Provers/ind.ML";
 use "../Provers/hypsubst.ML";
 use "../Provers/classical.ML";
 
-(*** Applying HypsubstFun to generate hyp_subst_tac ***)
+use_thy "IFOL";
 
 structure Hypsubst_Data =
   struct
@@ -38,36 +37,15 @@
 structure Hypsubst = HypsubstFun(Hypsubst_Data);
 open Hypsubst;
 
+
 use "intprover.ML";
 
-(*** Applying ClassicalFun to create a classical prover ***)
-structure Classical_Data = 
-  struct
-  val sizef     = size_of_thm
-  val mp        = mp
-  val not_elim  = notE
-  val classical = classical
-  val hyp_subst_tacs=[hyp_subst_tac]
-  end;
-
-structure Cla = ClassicalFun(Classical_Data);
-open Cla;
-
-(*Propositional rules 
-  -- iffCE might seem better, but in the examples in ex/cla
-     run about 7% slower than with iffE*)
-val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
-                       addSEs [conjE,disjE,impCE,FalseE,iffE];
-
-(*Quantifier rules*)
-val FOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I] 
-                     addSEs [exE,ex1E] addEs [allE];
+use_thy "FOL";
 
 qed_goal "ex1_functional" FOL.thy
     "!!a b c. [| EX! z. P(a,z);  P(a,b);  P(a,c) |] ==> b = c"
  (fn _ => [ (deepen_tac FOL_cs 0 1) ]);
 
-use "simpdata.ML";
 
 init_pps ();
 print_depth 8;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FOL/cladata.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -0,0 +1,51 @@
+(*  Title:      FOL/cladata.ML
+    ID:         $Id$
+    Author:     Tobias Nipkow
+    Copyright   1996  University of Cambridge
+
+Setting up the classical reasoner 
+*)
+
+
+(** Applying HypsubstFun to generate hyp_subst_tac **)
+section "Classical Reasoner";
+
+(*** Applying ClassicalFun to create a classical prover ***)
+structure Classical_Data = 
+  struct
+  val sizef     = size_of_thm
+  val mp        = mp
+  val not_elim  = notE
+  val classical = classical
+  val hyp_subst_tacs=[hyp_subst_tac]
+  end;
+
+structure Cla = ClassicalFun(Classical_Data);
+open Cla;
+
+(*Propositional rules 
+  -- iffCE might seem better, but in the examples in ex/cla
+     run about 7% slower than with iffE*)
+val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
+                       addSEs [conjE,disjE,impCE,FalseE,iffE];
+
+(*Quantifier rules*)
+val FOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I] 
+                     addSEs [exE,ex1E] addEs [allE];
+
+
+exception CS_DATA of claset;
+
+let fun merge [] = CS_DATA empty_cs
+      | merge cs = let val cs = map (fn CS_DATA x => x) cs;
+                   in CS_DATA (foldl merge_cs (hd cs, tl cs)) end;
+
+    fun put (CS_DATA cs) = claset := cs;
+
+    fun get () = CS_DATA (!claset);
+in add_thydata "FOL"
+     ("claset", ThyMethods {merge = merge, put = put, get = get})
+end;
+
+claset := FOL_cs;
+
--- a/src/FOL/ex/If.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/ex/If.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -30,13 +30,14 @@
 by (rtac ifI 1);
 
 choplev 0;
-val if_cs = FOL_cs addSIs [ifI] addSEs[ifE];
-by (fast_tac if_cs 1);
+AddSIs [ifI];
+AddSEs [ifE];
+by (Fast_tac 1);
 qed "if_commute";
 
 
 goal If.thy "if(if(P,Q,R), A, B) <-> if(P, if(Q,A,B), if(R,A,B))";
-by (fast_tac if_cs 1);
+by (Fast_tac 1);
 qed "nested_ifs";
 
 choplev 0;
@@ -47,10 +48,10 @@
 
 (*An invalid formula.  High-level rules permit a simpler diagnosis*)
 goal If.thy "if(if(P,Q,R), A, B) <-> if(P, if(Q,A,B), if(R,B,A))";
-by (fast_tac if_cs 1) handle ERROR => writeln"Failed, as expected";
+by (Fast_tac 1) handle ERROR => writeln"Failed, as expected";
 (*Check that subgoals remain: proof failed.*)
 getgoal 1; 
-by (REPEAT (step_tac if_cs 1));
+by (REPEAT (Step_tac 1));
 
 choplev 0;
 by (rewtac if_def);
--- a/src/FOL/ex/List.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/ex/List.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -13,55 +13,53 @@
 by (REPEAT (resolve_tac (prems@[allI,impI]) 1));
 qed "list_exh";
 
-val list_rew_thms = [list_distinct1,list_distinct2,app_nil,app_cons,
-                     hd_eq,tl_eq,forall_nil,forall_cons,list_free,
-                     len_nil,len_cons,at_0,at_succ];
-
-val list_ss = nat_ss addsimps list_rew_thms;
+Addsimps [list_distinct1, list_distinct2, app_nil, app_cons,
+	  hd_eq, tl_eq, forall_nil, forall_cons, list_free,
+	  len_nil, len_cons, at_0, at_succ];
 
 goal List.thy "~l=[] --> hd(l).tl(l) = l";
-by(IND_TAC list_exh (simp_tac list_ss) "l" 1);
+by (IND_TAC list_exh Simp_tac "l" 1);
 result();
 
 goal List.thy "(l1++l2)++l3 = l1++(l2++l3)";
-by(IND_TAC list_ind (simp_tac list_ss) "l1" 1);
+by (IND_TAC list_ind Simp_tac "l1" 1);
 qed "append_assoc";
 
 goal List.thy "l++[] = l";
-by(IND_TAC list_ind (simp_tac list_ss) "l" 1);
+by (IND_TAC list_ind Simp_tac "l" 1);
 qed "app_nil_right";
 
 goal List.thy "l1++l2=[] <-> l1=[] & l2=[]";
-by(IND_TAC list_exh (simp_tac list_ss) "l1" 1);
+by (IND_TAC list_exh Simp_tac "l1" 1);
 qed "app_eq_nil_iff";
 
 goal List.thy "forall(l++l',P) <-> forall(l,P) & forall(l',P)";
-by(IND_TAC list_ind (simp_tac list_ss) "l" 1);
+by (IND_TAC list_ind Simp_tac "l" 1);
 qed "forall_app";
 
 goal List.thy "forall(l,%x.P(x)&Q(x)) <-> forall(l,P) & forall(l,Q)";
-by(IND_TAC list_ind (simp_tac list_ss) "l" 1);
-by(fast_tac FOL_cs 1);
+by (IND_TAC list_ind Simp_tac "l" 1);
+by (Fast_tac 1);
 qed "forall_conj";
 
 goal List.thy "~l=[] --> forall(l,P) <-> P(hd(l)) & forall(tl(l),P)";
-by(IND_TAC list_ind (simp_tac list_ss) "l" 1);
+by (IND_TAC list_ind Simp_tac "l" 1);
 qed "forall_ne";
 
 (*** Lists with natural numbers ***)
 
 goal List.thy "len(l1++l2) = len(l1)+len(l2)";
-by (IND_TAC list_ind (simp_tac list_ss) "l1" 1);
+by (IND_TAC list_ind Simp_tac "l1" 1);
 qed "len_app";
 
 goal List.thy "i<len(l1) --> at(l1++l2,i) = at(l1,i)";
-by (IND_TAC list_ind (simp_tac list_ss) "l1" 1);
+by (IND_TAC list_ind Simp_tac "l1" 1);
 by (REPEAT (rtac allI 1));
 by (rtac impI 1);
-by (ALL_IND_TAC nat_exh (asm_simp_tac list_ss) 1);
+by (ALL_IND_TAC nat_exh Asm_simp_tac 1);
 qed "at_app1";
 
 goal List.thy "at(l1++(x.l2), len(l1)) = x";
-by (IND_TAC list_ind (simp_tac list_ss) "l1" 1);
+by (IND_TAC list_ind Simp_tac "l1" 1);
 qed "at_app_hd2";
 
--- a/src/FOL/ex/Nat.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/ex/Nat.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -43,27 +43,27 @@
 by (rtac rec_Suc 1);
 qed "add_Suc";
 
-val add_ss = FOL_ss addsimps [add_0, add_Suc];
+Addsimps [add_0, add_Suc];
 
 goal Nat.thy "(k+m)+n = k+(m+n)";
 by (res_inst_tac [("n","k")] induct 1);
-by (simp_tac add_ss 1);
-by (asm_simp_tac add_ss 1);
+by (Simp_tac 1);
+by (Asm_simp_tac 1);
 qed "add_assoc";
 
 goal Nat.thy "m+0 = m";
 by (res_inst_tac [("n","m")] induct 1);
-by (simp_tac add_ss 1);
-by (asm_simp_tac add_ss 1);
+by (Simp_tac 1);
+by (Asm_simp_tac 1);
 qed "add_0_right";
 
 goal Nat.thy "m+Suc(n) = Suc(m+n)";
 by (res_inst_tac [("n","m")] induct 1);
-by (ALLGOALS (asm_simp_tac add_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "add_Suc_right";
 
-val [prem] = goal Nat.thy "(!!n. f(Suc(n)) = Suc(f(n))) ==> f(i+j) = i+f(j)";
+val prems = goal Nat.thy "(!!n. f(Suc(n)) = Suc(f(n))) ==> f(i+j) = i+f(j)";
 by (res_inst_tac [("n","i")] induct 1);
-by (simp_tac add_ss 1);
-by (asm_simp_tac (add_ss addsimps [prem]) 1);
+by (Simp_tac 1);
+by (asm_simp_tac (!simpset addsimps prems) 1);
 result();
--- a/src/FOL/ex/Nat2.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/ex/Nat2.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -9,12 +9,11 @@
 
 open Nat2;
 
-val nat_rews = [pred_0, pred_succ, plus_0, plus_succ, 
-                    nat_distinct1, nat_distinct2, succ_inject,
-                    leq_0,leq_succ_succ,leq_succ_0, 
-                    lt_0_succ,lt_succ_succ,lt_0];
+Addsimps [pred_0, pred_succ, plus_0, plus_succ, 
+	  nat_distinct1, nat_distinct2, succ_inject,
+	  leq_0, leq_succ_succ, leq_succ_0, 
+	  lt_0_succ, lt_succ_succ, lt_0];
 
-val nat_ss = FOL_ss addsimps nat_rews;
 
 val prems = goal Nat2.thy 
     "[| P(0);  !!x. P(succ(x)) |] ==> All(P)";
@@ -23,143 +22,144 @@
 qed "nat_exh";
 
 goal Nat2.thy "~ n=succ(n)";
-by (IND_TAC nat_ind (simp_tac nat_ss) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 result();
 
 goal Nat2.thy "~ succ(n)=n";
-by (IND_TAC nat_ind (simp_tac nat_ss) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 result();
 
 goal Nat2.thy "~ succ(succ(n))=n";
-by (IND_TAC nat_ind (simp_tac nat_ss) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 result();
 
 goal Nat2.thy "~ n=succ(succ(n))";
-by (IND_TAC nat_ind (simp_tac nat_ss) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 result();
 
 goal Nat2.thy "m+0 = m";
-by (IND_TAC nat_ind (simp_tac nat_ss) "m" 1);
+by (IND_TAC nat_ind Simp_tac "m" 1);
 qed "plus_0_right";
 
 goal Nat2.thy "m+succ(n) = succ(m+n)";
-by (IND_TAC nat_ind (simp_tac nat_ss) "m" 1);
+by (IND_TAC nat_ind Simp_tac "m" 1);
 qed "plus_succ_right";
 
+Addsimps [plus_0_right, plus_succ_right];
+
 goal Nat2.thy "~n=0 --> m+pred(n) = pred(m+n)";
-by (IND_TAC nat_ind (simp_tac (nat_ss addsimps [plus_succ_right])) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 result();
 
 goal Nat2.thy "~n=0 --> succ(pred(n))=n";
-by (IND_TAC nat_ind (simp_tac nat_ss) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 result();
 
 goal Nat2.thy "m+n=0 <-> m=0 & n=0";
-by (IND_TAC nat_ind (simp_tac nat_ss) "m" 1);
+by (IND_TAC nat_ind Simp_tac "m" 1);
 result();
 
 goal Nat2.thy "m <= n --> m <= succ(n)";
-by (IND_TAC nat_ind (simp_tac nat_ss) "m" 1);
+by (IND_TAC nat_ind Simp_tac "m" 1);
 by (rtac (impI RS allI) 1);
-by (ALL_IND_TAC nat_ind (simp_tac nat_ss) 1);
-by (fast_tac FOL_cs 1);
-val le_imp_le_succ = store_thm("le_imp_le_succ", result() RS mp);
+by (ALL_IND_TAC nat_ind Simp_tac 1);
+by (Fast_tac 1);
+bind_thm("le_imp_le_succ", result() RS mp);
 
 goal Nat2.thy "n<succ(n)";
-by (IND_TAC nat_ind (simp_tac nat_ss) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 result();
 
 goal Nat2.thy "~ n<n";
-by (IND_TAC nat_ind (simp_tac nat_ss) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 result();
 
 goal Nat2.thy "m < n --> m < succ(n)";
-by (IND_TAC nat_ind (simp_tac nat_ss) "m" 1);
+by (IND_TAC nat_ind Simp_tac "m" 1);
 by (rtac (impI RS allI) 1);
-by (ALL_IND_TAC nat_ind (simp_tac nat_ss) 1);
-by (fast_tac FOL_cs 1);
+by (ALL_IND_TAC nat_ind Simp_tac 1);
+by (Fast_tac 1);
 result();
 
 goal Nat2.thy "m <= n --> m <= n+k";
-by (IND_TAC nat_ind 
-    (simp_tac (nat_ss addsimps [plus_0_right, plus_succ_right, le_imp_le_succ]))
+by (IND_TAC nat_ind (simp_tac (!simpset addsimps [le_imp_le_succ]))
      "k" 1);
 qed "le_plus";
 
 goal Nat2.thy "succ(m) <= n --> m <= n";
 by (res_inst_tac [("x","n")]spec 1);
-by (ALL_IND_TAC nat_exh (simp_tac (nat_ss addsimps [le_imp_le_succ])) 1);
+by (ALL_IND_TAC nat_exh (simp_tac (!simpset addsimps [le_imp_le_succ])) 1);
 qed "succ_le";
 
 goal Nat2.thy "~m<n <-> n<=m";
-by (IND_TAC nat_ind (simp_tac nat_ss) "n" 1);
+by (IND_TAC nat_ind Simp_tac "n" 1);
 by (rtac (impI RS allI) 1);
-by (ALL_IND_TAC nat_ind (asm_simp_tac nat_ss) 1);
+by (ALL_IND_TAC nat_ind Asm_simp_tac 1);
 qed "not_less";
 
 goal Nat2.thy "n<=m --> ~m<n";
-by (simp_tac (nat_ss addsimps [not_less]) 1);
+by (simp_tac (!simpset addsimps [not_less]) 1);
 qed "le_imp_not_less";
 
 goal Nat2.thy "m<n --> ~n<=m";
-by (cut_facts_tac [not_less] 1 THEN fast_tac FOL_cs 1);
+by (cut_facts_tac [not_less] 1 THEN Fast_tac 1);
 qed "not_le";
 
 goal Nat2.thy "m+k<=n --> m<=n";
 by (IND_TAC nat_ind (K all_tac) "k" 1);
-by (simp_tac (nat_ss addsimps [plus_0_right]) 1);
+by (Simp_tac 1);
 by (rtac (impI RS allI) 1);
-by (simp_tac (nat_ss addsimps [plus_succ_right]) 1);
+by (Simp_tac 1);
 by (REPEAT (resolve_tac [allI,impI] 1));
 by (cut_facts_tac [succ_le] 1);
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 qed "plus_le";
 
 val prems = goal Nat2.thy "[| ~m=0;  m <= n |] ==> ~n=0";
 by (cut_facts_tac prems 1);
 by (REPEAT (etac rev_mp 1));
-by (IND_TAC nat_exh (simp_tac nat_ss) "m" 1);
-by (ALL_IND_TAC nat_exh (simp_tac nat_ss) 1);
+by (IND_TAC nat_exh Simp_tac "m" 1);
+by (ALL_IND_TAC nat_exh Simp_tac 1);
 qed "not0";
 
 goal Nat2.thy "a<=a' & b<=b' --> a+b<=a'+b'";
-by (IND_TAC nat_ind (simp_tac (nat_ss addsimps [plus_0_right,le_plus])) "b" 1);
+by (IND_TAC nat_ind (simp_tac (!simpset addsimps [le_plus])) "b" 1);
 by (resolve_tac [impI RS allI] 1);
 by (resolve_tac [allI RS allI] 1);
-by (ALL_IND_TAC nat_exh (asm_simp_tac (nat_ss addsimps [plus_succ_right])) 1);
+by (ALL_IND_TAC nat_exh Asm_simp_tac 1);
 qed "plus_le_plus";
 
 goal Nat2.thy "i<=j --> j<=k --> i<=k";
 by (IND_TAC nat_ind (K all_tac) "i" 1);
-by (simp_tac nat_ss 1);
+by (Simp_tac 1);
 by (resolve_tac [impI RS allI] 1);
-by (ALL_IND_TAC nat_exh (simp_tac nat_ss) 1);
+by (ALL_IND_TAC nat_exh Simp_tac 1);
 by (resolve_tac [impI] 1);
-by (ALL_IND_TAC nat_exh (simp_tac nat_ss) 1);
-by (fast_tac FOL_cs 1);
+by (ALL_IND_TAC nat_exh Simp_tac 1);
+by (Fast_tac 1);
 qed "le_trans";
 
 goal Nat2.thy "i < j --> j <=k --> i < k";
 by (IND_TAC nat_ind (K all_tac) "j" 1);
-by (simp_tac nat_ss 1);
+by (Simp_tac 1);
 by (resolve_tac [impI RS allI] 1);
-by (ALL_IND_TAC nat_exh (simp_tac nat_ss) 1);
-by (ALL_IND_TAC nat_exh (simp_tac nat_ss) 1);
-by (ALL_IND_TAC nat_exh (simp_tac nat_ss) 1);
-by (fast_tac FOL_cs 1);
+by (ALL_IND_TAC nat_exh Simp_tac 1);
+by (ALL_IND_TAC nat_exh Simp_tac 1);
+by (ALL_IND_TAC nat_exh Simp_tac 1);
+by (Fast_tac 1);
 qed "less_le_trans";
 
 goal Nat2.thy "succ(i) <= j <-> i < j";
-by (IND_TAC nat_ind (simp_tac nat_ss) "j" 1);
+by (IND_TAC nat_ind Simp_tac "j" 1);
 by (resolve_tac [impI RS allI] 1);
-by (ALL_IND_TAC nat_exh (asm_simp_tac nat_ss) 1);
+by (ALL_IND_TAC nat_exh Asm_simp_tac 1);
 qed "succ_le2";
 
 goal Nat2.thy "i<succ(j) <-> i=j | i<j";
-by (IND_TAC nat_ind (simp_tac nat_ss) "j" 1);
-by (ALL_IND_TAC nat_exh (simp_tac nat_ss) 1);
+by (IND_TAC nat_ind Simp_tac "j" 1);
+by (ALL_IND_TAC nat_exh Simp_tac 1);
 by (resolve_tac [impI RS allI] 1);
-by (ALL_IND_TAC nat_exh (simp_tac nat_ss) 1);
-by (asm_simp_tac nat_ss 1);
+by (ALL_IND_TAC nat_exh Simp_tac 1);
+by (Asm_simp_tac 1);
 qed "less_succ";
 
--- a/src/FOL/ex/NatClass.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/ex/NatClass.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -1,7 +1,6 @@
 (*  Title:      FOL/ex/NatClass.ML
     ID:         $Id$
-    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
-    Copyright   1992  University of Cambridge
+    Author:     Markus Wenzel, TU Muenchen
 
 This is Nat.ML trivially modified to make it work with NatClass.thy.
 *)
@@ -36,27 +35,27 @@
 by (rtac rec_Suc 1);
 qed "add_Suc";
 
-val add_ss = FOL_ss addsimps [add_0, add_Suc];
+Addsimps [add_0, add_Suc];
 
 goal NatClass.thy "(k+m)+n = k+(m+n)";
 by (res_inst_tac [("n","k")] induct 1);
-by (simp_tac add_ss 1);
-by (asm_simp_tac add_ss 1);
+by (Simp_tac 1);
+by (Asm_simp_tac 1);
 qed "add_assoc";
 
 goal NatClass.thy "m+0 = m";
 by (res_inst_tac [("n","m")] induct 1);
-by (simp_tac add_ss 1);
-by (asm_simp_tac add_ss 1);
+by (Simp_tac 1);
+by (Asm_simp_tac 1);
 qed "add_0_right";
 
 goal NatClass.thy "m+Suc(n) = Suc(m+n)";
 by (res_inst_tac [("n","m")] induct 1);
-by (ALLGOALS (asm_simp_tac add_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "add_Suc_right";
 
 val [prem] = goal NatClass.thy "(!!n. f(Suc(n)) = Suc(f(n))) ==> f(i+j) = i+f(j)";
 by (res_inst_tac [("n","i")] induct 1);
-by (simp_tac add_ss 1);
-by (asm_simp_tac (add_ss addsimps [prem]) 1);
+by (Simp_tac 1);
+by (asm_simp_tac (!simpset addsimps [prem]) 1);
 result();
--- a/src/FOL/ex/cla.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/ex/cla.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -11,17 +11,17 @@
 open Cla;    (*in case structure Int is open!*)
 
 goal FOL.thy "(P --> Q | R) --> (P-->Q) | (P-->R)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*If and only if*)
 
 goal FOL.thy "(P<->Q) <-> (Q<->P)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 goal FOL.thy "~ (P <-> ~P)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 
@@ -38,132 +38,132 @@
 writeln"Pelletier's examples";
 (*1*)
 goal FOL.thy "(P-->Q)  <->  (~Q --> ~P)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*2*)
 goal FOL.thy "~ ~ P  <->  P";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*3*)
 goal FOL.thy "~(P-->Q) --> (Q-->P)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*4*)
 goal FOL.thy "(~P-->Q)  <->  (~Q --> P)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*5*)
 goal FOL.thy "((P|Q)-->(P|R)) --> (P|(Q-->R))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*6*)
 goal FOL.thy "P | ~ P";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*7*)
 goal FOL.thy "P | ~ ~ ~ P";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*8.  Peirce's law*)
 goal FOL.thy "((P-->Q) --> P)  -->  P";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*9*)
 goal FOL.thy "((P|Q) & (~P|Q) & (P| ~Q)) --> ~ (~P | ~Q)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*10*)
 goal FOL.thy "(Q-->R) & (R-->P&Q) & (P-->Q|R) --> (P<->Q)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*11.  Proved in each direction (incorrectly, says Pelletier!!)  *)
 goal FOL.thy "P<->P";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*12.  "Dijkstra's law"*)
 goal FOL.thy "((P <-> Q) <-> R)  <->  (P <-> (Q <-> R))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*13.  Distributive law*)
 goal FOL.thy "P | (Q & R)  <-> (P | Q) & (P | R)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*14*)
 goal FOL.thy "(P <-> Q) <-> ((Q | ~P) & (~Q|P))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*15*)
 goal FOL.thy "(P --> Q) <-> (~P | Q)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*16*)
 goal FOL.thy "(P-->Q) | (Q-->P)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*17*)
 goal FOL.thy "((P & (Q-->R))-->S) <-> ((~P | Q | S) & (~P | ~R | S))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Classical Logic: examples with quantifiers";
 
 goal FOL.thy "(ALL x. P(x) & Q(x)) <-> (ALL x. P(x))  &  (ALL x. Q(x))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result(); 
 
 goal FOL.thy "(EX x. P-->Q(x))  <->  (P --> (EX x.Q(x)))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result(); 
 
 goal FOL.thy "(EX x.P(x)-->Q)  <->  (ALL x.P(x)) --> Q";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result(); 
 
 goal FOL.thy "(ALL x.P(x)) | Q  <->  (ALL x. P(x) | Q)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result(); 
 
 (*Discussed in Avron, Gentzen-Type Systems, Resolution and Tableaux,
   JAR 10 (265-281), 1993.  Proof is trivial!*)
 goal FOL.thy
     "~ ((EX x.~P(x)) & ((EX x.P(x)) | (EX x.P(x) & Q(x))) & ~ (EX x.P(x)))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problems requiring quantifier duplication";
 
 (*Needs multiple instantiation of ALL.*)
 goal FOL.thy "(ALL x. P(x)-->P(f(x)))  &  P(d)-->P(f(f(f(d))))";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 (*Needs double instantiation of the quantifier*)
 goal FOL.thy "EX x. P(x) --> P(a) & P(b)";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 goal FOL.thy "EX z. P(z) --> (ALL x. P(x))";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 goal FOL.thy "EX x. (EX y. P(y)) --> P(x)";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 (*V. Lifschitz, What Is the Inverse Method?, JAR 5 (1989), 1--23.  NOT PROVED*)
@@ -176,40 +176,40 @@
 
 writeln"Problem 18";
 goal FOL.thy "EX y. ALL x. P(y)-->P(x)";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result(); 
 
 writeln"Problem 19";
 goal FOL.thy "EX x. ALL y z. (P(y)-->Q(z)) --> (P(x)-->Q(x))";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 writeln"Problem 20";
 goal FOL.thy "(ALL x y. EX z. ALL w. (P(x)&Q(y)-->R(z)&S(w)))     \
 \   --> (EX x y. P(x) & Q(y)) --> (EX z. R(z))";
-by (fast_tac FOL_cs 1); 
+by (Fast_tac 1); 
 result();
 
 writeln"Problem 21";
 goal FOL.thy "(EX x. P-->Q(x)) & (EX x. Q(x)-->P) --> (EX x. P<->Q(x))";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 writeln"Problem 22";
 goal FOL.thy "(ALL x. P <-> Q(x))  -->  (P <-> (ALL x. Q(x)))";
-by (fast_tac FOL_cs 1); 
+by (Fast_tac 1); 
 result();
 
 writeln"Problem 23";
 goal FOL.thy "(ALL x. P | Q(x))  <->  (P | (ALL x. Q(x)))";
-by (best_tac FOL_cs 1);  
+by (Best_tac 1);  
 result();
 
 writeln"Problem 24";
 goal FOL.thy "~(EX x. S(x)&Q(x)) & (ALL x. P(x) --> Q(x)|R(x)) &  \
 \    ~(EX x.P(x)) --> (EX x.Q(x)) & (ALL x. Q(x)|R(x) --> S(x))  \
 \   --> (EX x. P(x)&R(x))";
-by (fast_tac FOL_cs 1); 
+by (Fast_tac 1); 
 result();
 
 writeln"Problem 25";
@@ -218,14 +218,14 @@
 \       (ALL x. P(x) --> (M(x) & L(x))) &   \
 \       ((ALL x. P(x)-->Q(x)) | (EX x. P(x)&R(x)))  \
 \   --> (EX x. Q(x)&P(x))";
-by (best_tac FOL_cs 1); 
+by (Best_tac 1); 
 result();
 
 writeln"Problem 26";
 goal FOL.thy "((EX x. p(x)) <-> (EX x. q(x))) & \
 \     (ALL x. ALL y. p(x) & q(y) --> (r(x) <-> s(y)))   \
 \ --> ((ALL x. p(x)-->r(x)) <-> (ALL x. q(x)-->s(x)))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 27";
@@ -234,7 +234,7 @@
 \             (ALL x. M(x) & L(x) --> P(x)) &   \
 \             ((EX x. R(x) & ~ Q(x)) --> (ALL x. L(x) --> ~ R(x)))  \
 \         --> (ALL x. M(x) --> ~L(x))";
-by (fast_tac FOL_cs 1); 
+by (Fast_tac 1); 
 result();
 
 writeln"Problem 28.  AMENDED";
@@ -242,21 +242,21 @@
 \       ((ALL x. Q(x)|R(x)) --> (EX x. Q(x)&S(x))) &  \
 \       ((EX x.S(x)) --> (ALL x. L(x) --> M(x)))  \
 \   --> (ALL x. P(x) & L(x) --> M(x))";
-by (fast_tac FOL_cs 1);  
+by (Fast_tac 1);  
 result();
 
 writeln"Problem 29.  Essentially the same as Principia Mathematica *11.71";
 goal FOL.thy "(EX x. P(x)) & (EX y. Q(y))  \
 \   --> ((ALL x. P(x)-->R(x)) & (ALL y. Q(y)-->S(y))   <->     \
 \        (ALL x y. P(x) & Q(y) --> R(x) & S(y)))";
-by (fast_tac FOL_cs 1); 
+by (Fast_tac 1); 
 result();
 
 writeln"Problem 30";
 goal FOL.thy "(ALL x. P(x) | Q(x) --> ~ R(x)) & \
 \       (ALL x. (Q(x) --> ~ S(x)) --> P(x) & R(x))  \
 \   --> (ALL x. S(x))";
-by (fast_tac FOL_cs 1);  
+by (Fast_tac 1);  
 result();
 
 writeln"Problem 31";
@@ -264,7 +264,7 @@
 \       (EX x. L(x) & P(x)) & \
 \       (ALL x. ~ R(x) --> M(x))  \
 \   --> (EX x. L(x) & M(x))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 32";
@@ -272,13 +272,13 @@
 \       (ALL x. S(x) & R(x) --> L(x)) & \
 \       (ALL x. M(x) --> R(x))  \
 \   --> (ALL x. P(x) & M(x) --> L(x))";
-by (best_tac FOL_cs 1);
+by (Best_tac 1);
 result();
 
 writeln"Problem 33";
 goal FOL.thy "(ALL x. P(a) & (P(x)-->P(b))-->P(c))  <->    \
 \    (ALL x. (~P(a) | P(x) | P(c)) & (~P(a) | ~P(b) | P(c)))";
-by (best_tac FOL_cs 1);
+by (Best_tac 1);
 result();
 
 writeln"Problem 34  AMENDED (TWICE!!)";
@@ -287,13 +287,13 @@
 \              ((EX x. q(x)) <-> (ALL y. p(y))))     <->        \
 \             ((EX x. ALL y. q(x) <-> q(y))  <->                \
 \              ((EX x. p(x)) <-> (ALL y. q(y))))";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 writeln"Problem 35";
 goal FOL.thy "EX x y. P(x,y) -->  (ALL u v. P(u,v))";
 by (mini_tac 1);
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 (*Without miniscope, would have to use deepen_tac; would be slower*)
 result();
 
@@ -303,7 +303,7 @@
 \     (ALL x. EX y. G(x,y)) & \
 \     (ALL x y. J(x,y) | G(x,y) --> (ALL z. J(y,z) | G(y,z) --> H(x,z)))   \
 \ --> (ALL x. EX y. H(x,y))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 37";
@@ -312,7 +312,7 @@
 \       (ALL x z. ~P(x,z) --> (EX y. Q(y,z))) & \
 \       ((EX x y. Q(x,y)) --> (ALL x. R(x,x)))  \
 \   --> (ALL x. EX y. R(x,y))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 38";
@@ -322,40 +322,39 @@
 \    (ALL x. (~p(a) | p(x) | (EX z. EX w. p(z) & r(x,w) & r(w,z))) &    \
 \            (~p(a) | ~(EX y. p(y) & r(x,y)) |                          \
 \             (EX z. EX w. p(z) & r(x,w) & r(w,z))))";
-by (deepen_tac FOL_cs 0 1);  (*beats fast_tac!*)
+by (Deepen_tac 0 1);  (*beats fast_tac!*)
 result();
 
 writeln"Problem 39";
 goal FOL.thy "~ (EX x. ALL y. F(y,x) <-> ~F(y,y))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 40.  AMENDED";
 goal FOL.thy "(EX y. ALL x. F(x,y) <-> F(x,x)) -->  \
 \             ~(ALL x. EX y. ALL z. F(z,y) <-> ~ F(z,x))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 41";
 goal FOL.thy "(ALL z. EX y. ALL x. f(x,y) <-> f(x,z) & ~ f(x,x))        \
 \         --> ~ (EX z. ALL x. f(x,z))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 42";
 goal FOL.thy "~ (EX y. ALL x. p(x,y) <-> ~ (EX z. p(x,z) & p(z,x)))";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 writeln"Problem 43";
 goal FOL.thy "(ALL x. ALL y. q(x,y) <-> (ALL z. p(z,x) <-> p(z,y)))     \
 \         --> (ALL x. ALL y. q(x,y) <-> q(y,x))";
-by (mini_tac 1);
-by (deepen_tac FOL_cs 5 1);
-(*Faster alternative proof!
-        by (asm_simp_tac FOL_ss 1); by (fast_tac FOL_cs 1);     
+by (Auto_tac());
+(*The proof above cheats by using rewriting!  A purely logical proof is
+  by (mini_tac 1 THEN Deepen_tac 5 1);
 Can use just deepen_tac but it requires 253 secs?!?
-	by (deepen_tac FOL_cs 0 1);     
+  by (Deepen_tac 0 1);     
 *)
 result();
 
@@ -364,7 +363,7 @@
 \             (EX y. g(y) & h(x,y) & (EX y. g(y) & ~ h(x,y))))  &       \
 \             (EX x. j(x) & (ALL y. g(y) --> h(x,y)))                   \
 \             --> (EX x. j(x) & ~f(x))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 45";
@@ -374,7 +373,7 @@
 \     (EX x. f(x) & (ALL y. h(x,y) --> l(y))                    \
 \                 & (ALL y. g(y) & h(x,y) --> j(x,y)))          \
 \     --> (EX x. f(x) & ~ (EX y. g(y) & h(x,y)))";
-by (best_tac FOL_cs 1); 
+by (Best_tac 1); 
 result();
 
 
@@ -382,7 +381,7 @@
 
 writeln"Problem 48";
 goal FOL.thy "(a=b | c=d) & (a=c | b=d) --> a=d | b=c";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 49  NOT PROVED AUTOMATICALLY";
@@ -390,26 +389,26 @@
   the type constraint ensures that x,y,z have the same type as a,b,u. *)
 goal FOL.thy "(EX x y::'a. ALL z. z=x | z=y) & P(a) & P(b) & a~=b \
 \               --> (ALL u::'a.P(u))";
-by (safe_tac FOL_cs);
+by (Step_tac 1);
 by (res_inst_tac [("x","a")] allE 1);
 by (assume_tac 1);
 by (res_inst_tac [("x","b")] allE 1);
 by (assume_tac 1);
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 50";  
 (*What has this to do with equality?*)
 goal FOL.thy "(ALL x. P(a,x) | (ALL y.P(x,y))) --> (EX x. ALL y.P(x,y))";
 by (mini_tac 1);
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 writeln"Problem 51";
 goal FOL.thy
     "(EX z w. ALL x y. P(x,y) <->  (x=z & y=w)) -->  \
 \    (EX z. ALL x. EX w. (ALL y. P(x,y) <-> y=w) <-> x=z)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 52";
@@ -417,7 +416,7 @@
 goal FOL.thy
     "(EX z w. ALL x y. P(x,y) <->  (x=z & y=w)) -->  \
 \    (EX w. ALL y. EX z. (ALL x. P(x,y) <-> x=z) <-> y=w)";
-by (best_tac FOL_cs 1);
+by (Best_tac 1);
 result();
 
 writeln"Problem 55";
@@ -436,12 +435,12 @@
 \  (ALL x. EX y. ~hates(x,y)) & \
 \  ~ agatha=butler --> \
 \  killed(?who,agatha)";
-by (safe_tac FOL_cs);
+by (Step_tac 1);
 by (dres_inst_tac [("x1","x")] (spec RS mp) 1);
 by (assume_tac 1);
 by (etac (spec RS exE) 1);
 by (REPEAT (etac allE 1));
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 ****)
 
@@ -456,37 +455,37 @@
 \  (ALL x. hates(agatha,x) --> hates(butler,x)) & \
 \  (ALL x. ~hates(x,agatha) | ~hates(x,butler) | ~hates(x,charles)) --> \
 \   killed(?who,agatha)";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 
 writeln"Problem 56";
 goal FOL.thy
     "(ALL x. (EX y. P(y) & x=f(y)) --> P(x)) <-> (ALL x. P(x) --> P(f(x)))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 57";
 goal FOL.thy
     "P(f(a,b), f(b,c)) & P(f(b,c), f(a,c)) & \
 \    (ALL x y z. P(x,y) & P(y,z) --> P(x,z))    -->   P(f(a,b), f(a,c))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 58  NOT PROVED AUTOMATICALLY";
 goal FOL.thy "(ALL x y. f(x)=g(y)) --> (ALL x y. f(f(x))=f(g(y)))";
-by (slow_tac (FOL_cs addEs [subst_context]) 1);
+by (slow_tac (!claset addEs [subst_context]) 1);
 result();
 
 writeln"Problem 59";
 goal FOL.thy "(ALL x. P(x) <-> ~P(f(x))) --> (EX x. P(x) & ~P(f(x)))";
-by (deepen_tac FOL_cs 0 1);
+by (Deepen_tac 0 1);
 result();
 
 writeln"Problem 60";
 goal FOL.thy
     "ALL x. P(x,f(x)) <-> (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 writeln"Problem 62 as corrected in AAR newletter #31";
@@ -494,7 +493,7 @@
     "(ALL x. p(a) & (p(x) --> p(f(x))) --> p(f(f(x))))  <->     \
 \    (ALL x. (~p(a) | p(x) | p(f(f(x)))) &                      \
 \            (~p(a) | ~p(f(x)) | p(f(f(x)))))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 (*Halting problem: Formulation of Li Dafa (AAR Newsletter 27, Oct 1994.)
--- a/src/FOL/ex/intro.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/ex/intro.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -42,16 +42,16 @@
 result();
 
 
-(**** Demonstration of fast_tac ****)
+(**** Demonstration of Fast_tac ****)
 
 goal FOL.thy "(EX y. ALL x. J(y,x) <-> ~J(x,x))  \
 \       -->  ~ (ALL x. EX y. ALL z. J(z,y) <-> ~ J(z,x))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 goal FOL.thy "ALL x. P(x,f(x)) <-> \
 \       (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))";
-by (fast_tac FOL_cs 1);
+by (Fast_tac 1);
 result();
 
 
--- a/src/FOL/simpdata.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/FOL/simpdata.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -187,10 +187,33 @@
 
 open Simplifier Induction;
 
+(*** Integration of simplifier with classical reasoner ***)
+
+(*Add a simpset to a classical set!*)
+infix 4 addss;
+fun cs addss ss = cs addbefore asm_full_simp_tac ss 1;
+
+fun Addss ss = (claset := !claset addbefore asm_full_simp_tac ss 1);
+
+(*Designed to be idempotent, except if best_tac instantiates variables
+  in some of the subgoals*)
+fun auto_tac (cs,ss) = 
+    ALLGOALS (asm_full_simp_tac ss) THEN
+    REPEAT (safe_tac cs THEN ALLGOALS (asm_full_simp_tac ss)) THEN
+    REPEAT (FIRSTGOAL (best_tac (cs addss ss))) THEN
+    prune_params_tac;
+
+fun Auto_tac() = auto_tac (!claset, !simpset);
+
+fun auto() = by (Auto_tac());
+
+
 (*Add congruence rules for = or <-> (instead of ==) *)
 infix 4 addcongs;
 fun ss addcongs congs =
-    ss addeqcongs (congs RL [eq_reflection,iff_reflection]);
+        ss addeqcongs (congs RL [eq_reflection,iff_reflection]);
+
+fun Addcongs congs = (simpset := !simpset addcongs congs);
 
 (*Add a simpset to a classical set!*)
 infix 4 addss;
@@ -223,3 +246,24 @@
 
 val FOL_ss = IFOL_ss addsimps (cla_simps @ ex_simps @ all_simps);
 
+
+
+(*** Install simpsets and datatypes in theory structure ***)
+
+simpset := FOL_ss;
+
+exception SS_DATA of simpset;
+
+let fun merge [] = SS_DATA empty_ss
+      | merge ss = let val ss = map (fn SS_DATA x => x) ss;
+                   in SS_DATA (foldl merge_ss (hd ss, tl ss)) end;
+
+    fun put (SS_DATA ss) = simpset := ss;
+
+    fun get () = SS_DATA (!simpset);
+in add_thydata "FOL"
+     ("simpset", ThyMethods {merge = merge, put = put, get = get})
+end;
+
+
+add_thy_reader_file "thy_data.ML";
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FOL/thy_data.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -0,0 +1,19 @@
+(*  Title:      FOL/thy_data.ML
+    ID:         $Id$
+    Author:     Carsten Clasohm
+    Copyright   1995 TU Muenchen
+
+Definitions that have to be reread after init_thy_reader has been invoked
+*)
+
+fun simpset_of tname =
+  case get_thydata tname "simpset" of
+      None => empty_ss
+    | Some (SS_DATA ss) => ss;
+
+fun claset_of tname =
+  case get_thydata tname "claset" of
+      None => empty_cs
+    | Some (CS_DATA cs) => cs;
+
+
--- a/src/ZF/AC.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -12,7 +12,7 @@
 val [nonempty] = goal AC.thy
      "[| !!x. x:A ==> (EX y. y:B(x)) |] ==> EX z. z : Pi(A,B)";
 by (excluded_middle_tac "A=0" 1);
-by (asm_simp_tac (ZF_ss addsimps [Pi_empty1]) 2 THEN fast_tac ZF_cs 2);
+by (asm_simp_tac (!simpset addsimps [Pi_empty1]) 2 THEN Fast_tac 2);
 (*The non-trivial case*)
 by (fast_tac (eq_cs addIs [AC, nonempty]) 1);
 qed "AC_Pi";
@@ -35,7 +35,7 @@
 \     |] ==> EX f: A->Union(A). ALL x:A. f`x : x";
 by (res_inst_tac [("B1", "%x.x")] (AC_Pi RS exE) 1);
 by (etac nonempty 1);
-by (fast_tac (ZF_cs addDs [apply_type] addIs [Pi_type]) 1);
+by (fast_tac (!claset addDs [apply_type] addIs [Pi_type]) 1);
 qed "AC_func";
 
 goal ZF.thy "!!x A. [| 0 ~: A;  x: A |] ==> EX y. y:x";
@@ -53,7 +53,7 @@
 by (rtac bexI 2);
 by (assume_tac 2);
 by (etac fun_weaken_type 2);
-by (ALLGOALS (fast_tac ZF_cs));
+by (ALLGOALS (Fast_tac));
 qed "AC_func_Pow";
 
 goal AC.thy "!!A. 0 ~: A ==> EX f. f: (PROD x:A. x)";
--- a/src/ZF/AC.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -8,7 +8,7 @@
 This definition comes from Halmos (1960), page 59.
 *)
 
-AC = ZF + "func" +
+AC = func +
 rules
   AC    "[| a: A;  !!x. x:A ==> (EX y. y:B(x)) |] ==> EX z. z : Pi(A,B)"
 end
--- a/src/ZF/AC/AC0_AC1.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC0_AC1.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -7,11 +7,11 @@
 *)
 
 goal thy "!!A. 0~:A ==> A <= Pow(Union(A))-{0}";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val subset_Pow_Union = result();
 
 goal thy "!!f. [| f:(PROD X:A. X); D<=A |] ==> EX g. g:(PROD X:D. X)";
-by (fast_tac (AC_cs addSIs [restrict_type, apply_type]) 1);
+by (fast_tac (!claset addSIs [restrict_type, apply_type]) 1);
 val lemma1 = result();
 
 goalw thy AC_defs "!!Z. AC0 ==> AC1"; 
@@ -19,8 +19,8 @@
 qed "AC0_AC1";
 
 goalw thy AC_defs "!!Z. AC1 ==> AC0";
-by (deepen_tac ZF_cs 0 1);
+by (Deepen_tac 0 1);
 (*Large search space.  Faster proof by
-  by (fast_tac (FOL_cs addSIs [notI, singletonI] addSEs [notE, DiffE]) 1);
+  by (fast_tac (!claset addSIs [notI, singletonI] addSEs [notE, DiffE]) 1);
 *)
 qed "AC1_AC0";
--- a/src/ZF/AC/AC10_AC15.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC10_AC15.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -30,7 +30,7 @@
 goalw thy [lepoll_def] "!!A. A~=0 ==> B lepoll A*B";
 by (etac not_emptyE 1);
 by (res_inst_tac [("x","lam z:B. <x,z>")] exI 1);
-by (fast_tac (AC_cs addSIs [snd_conv, lam_injective]) 1);
+by (fast_tac (!claset addSIs [snd_conv, lam_injective]) 1);
 val lepoll_Sigma = result();
 
 goal thy "!!A. 0~:A ==> ALL B:{cons(0,x*nat). x:A}. ~Finite(B)";
@@ -41,18 +41,18 @@
 by (dresolve_tac [subset_consI RS subset_imp_lepoll RS lepoll_Finite] 1);
 by (resolve_tac [lepoll_Sigma RS lepoll_Finite RS (nat_not_Finite RS notE)] 1
         THEN (assume_tac 2));
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val cons_times_nat_not_Finite = result();
 
 goal thy "!!A. [| Union(C)=A; a:A |] ==> EX B:C. a:B & B <= A";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val lemma1 = result();
 
 goalw thy [pairwise_disjoint_def]
         "!!A. [| pairwise_disjoint(A); B:A; C:A; a:B; a:C |] ==> B=C";
 by (dtac IntI 1 THEN (assume_tac 1));
 by (dres_inst_tac [("A","B Int C")] not_emptyI 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val lemma2 = result();
 
 goalw thy [sets_of_size_between_def]
@@ -62,12 +62,12 @@
 \               0:u & 2 lepoll u & u lepoll n";
 by (rtac ballI 1);
 by (etac ballE 1);
-by (fast_tac ZF_cs 2);
+by (Fast_tac 2);
 by (REPEAT (etac conjE 1));
 by (dresolve_tac [consI1 RSN (2, lemma1)] 1);
 by (etac bexE 1);
 by (rtac ex1I 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 by (REPEAT (etac conjE 1));
 by (rtac lemma2 1 THEN (REPEAT (assume_tac 1)));
 val lemma3 = result();
@@ -79,13 +79,13 @@
 by (res_inst_tac [("d", "%y. P(converse(f)`y)")] lam_injective 1);
 by (etac RepFunE 1);
 by (forward_tac [inj_is_fun RS apply_type] 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addIs [LeastI2]
+by (fast_tac (!claset addIs [LeastI2]
                 addSEs [Ord_in_Ord, inj_is_fun RS apply_type]) 1);
 by (etac RepFunE 1);
 by (rtac LeastI2 1);
-by (fast_tac AC_cs 1);
-by (fast_tac (AC_cs addSEs [Ord_in_Ord, inj_is_fun RS apply_type]) 1);
-by (fast_tac (AC_cs addEs [sym, left_inverse RS ssubst]) 1);
+by (Fast_tac 1);
+by (fast_tac (!claset addSEs [Ord_in_Ord, inj_is_fun RS apply_type]) 1);
+by (fast_tac (!claset addEs [sym, left_inverse RS ssubst]) 1);
 val lemma4 = result();
 
 goal thy "!!A. [| n:nat; B:A; u(B) <= cons(0, B*nat); 0:u(B); 2 lepoll u(B);  \
@@ -93,15 +93,15 @@
 \       ==> (lam x:A. {fst(x). x:u(x)-{0}})`B ~= 0 &  \
 \               (lam x:A. {fst(x). x:u(x)-{0}})`B <= B &  \
 \               (lam x:A. {fst(x). x:u(x)-{0}})`B lepoll n";
-by (asm_simp_tac AC_ss 1);
+by (Asm_simp_tac 1);
 by (rtac conjI 1);
 by (fast_tac (empty_cs addSDs [RepFun_eq_0_iff RS iffD1]
                 addDs [lepoll_Diff_sing]
                 addEs [lepoll_trans RS succ_lepoll_natE, ssubst]
                 addSIs [notI, lepoll_refl, nat_0I]) 1);
 by (rtac conjI 1);
-by (fast_tac (ZF_cs addSIs [fst_type] addSEs [consE]) 1);
-by (fast_tac (ZF_cs addSEs [equalityE,
+by (fast_tac (!claset addSIs [fst_type] addSEs [consE]) 1);
+by (fast_tac (!claset addSEs [equalityE,
                 Diff_lepoll RS (nat_into_Ord RSN (2, lemma4))]) 1);
 val lemma5 = result();
 
@@ -125,7 +125,7 @@
 
 goalw thy AC_defs "!!Z. [| n:nat; 1 le n; AC10(n) |] ==> AC11";
 by (rtac bexI 1 THEN (assume_tac 2));
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "AC10_AC11";
 
 (* ********************************************************************** *)
@@ -141,11 +141,11 @@
 (* ********************************************************************** *)
 
 goalw thy AC_defs "!!Z. AC12 ==> AC15";
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (etac allE 1);
 by (etac impE 1);
 by (etac cons_times_nat_not_Finite 1);
-by (fast_tac (ZF_cs addSIs [ex_fun_AC13_AC15]) 1);
+by (fast_tac (!claset addSIs [ex_fun_AC13_AC15]) 1);
 qed "AC12_AC15";
 
 (* ********************************************************************** *)
@@ -167,7 +167,7 @@
 (* ********************************************************************** *)
 
 goalw thy AC_defs "!!n. [| n:nat; 1 le n; AC10(n) |] ==> AC13(n)";
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (fast_tac (empty_cs addSEs [allE, cons_times_nat_not_Finite RSN (2, impE),
                                 ex_fun_AC13_AC15]) 1);
 qed "AC10_AC13";
@@ -187,10 +187,10 @@
 by (mp_tac 1);
 by (etac exE 1);
 by (res_inst_tac [("x","lam x:A. {f`x}")] exI 1);
-by (asm_full_simp_tac (AC_ss addsimps
+by (asm_full_simp_tac (!simpset addsimps
                 [singleton_eqpoll_1 RS eqpoll_imp_lepoll,
                 singletonI RS not_emptyI]) 1);
-by (fast_tac (AC_cs addSEs [apply_type]) 1);
+by (fast_tac (!claset addSEs [apply_type]) 1);
 qed "AC1_AC13";
 
 (* ********************************************************************** *)
@@ -199,7 +199,7 @@
 
 goalw thy AC_defs "!!m n. [| m:nat; n:nat; m le n; AC13(m) |] ==> AC13(n)";
 by (dtac nat_le_imp_lepoll 1 THEN REPEAT (assume_tac 1));
-by (fast_tac (ZF_cs addSEs [lepoll_trans]) 1);
+by (fast_tac (!claset addSEs [lepoll_trans]) 1);
 qed "AC13_mono";
 
 (* ********************************************************************** *)
@@ -219,7 +219,7 @@
 (* ********************************************************************** *)
 
 goalw thy AC_defs "!!Z. AC14 ==> AC15";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "AC14_AC15";
 
 (* ********************************************************************** *)
@@ -231,7 +231,7 @@
 (* ********************************************************************** *)
 
 goal thy "!!A. [| A~=0; A lepoll 1 |] ==> EX a. A={a}";
-by (fast_tac (AC_cs addSEs [not_emptyE, lepoll_1_is_sing]) 1);
+by (fast_tac (!claset addSEs [not_emptyE, lepoll_1_is_sing]) 1);
 val lemma_aux = result();
 
 goal thy "!!f. ALL B:A. f(B)~=0 & f(B)<=B & f(B) lepoll 1  \
@@ -240,12 +240,12 @@
 by (dtac bspec 1 THEN (assume_tac 1));
 by (REPEAT (etac conjE 1));
 by (eresolve_tac [lemma_aux RS exE] 1 THEN (assume_tac 1));
-by (asm_full_simp_tac (AC_ss addsimps [the_element]) 1);
-by (fast_tac (AC_cs addEs [ssubst]) 1);
+by (asm_full_simp_tac (!simpset addsimps [the_element]) 1);
+by (fast_tac (!claset addEs [ssubst]) 1);
 val lemma = result();
 
 goalw thy AC_defs "!!Z. AC13(1) ==> AC1";
-by (fast_tac (AC_cs addSEs [lemma]) 1);
+by (fast_tac (!claset addSEs [lemma]) 1);
 qed "AC13_AC1";
 
 (* ********************************************************************** *)
@@ -253,5 +253,5 @@
 (* ********************************************************************** *)
 
 goalw thy [AC11_def, AC14_def] "!!Z. AC11 ==> AC14";
-by (fast_tac (ZF_cs addSIs [AC10_AC13]) 1);
+by (fast_tac (!claset addSIs [AC10_AC13]) 1);
 qed "AC11_AC14";
--- a/src/ZF/AC/AC15_WO6.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC15_WO6.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -8,15 +8,15 @@
 open AC15_WO6;
 
 goal thy "!!x. Ord(x) ==> (UN a<x. F(a)) = (UN a:x. F(a))";
-by (fast_tac (AC_cs addSIs [equalityI, ltI] addSDs [ltD]) 1);
+by (fast_tac (!claset addSIs [equalityI, ltI] addSDs [ltD]) 1);
 val OUN_eq_UN = result();
 
 val [prem] = goal thy "ALL x:Pow(A)-{0}. f`x~=0 & f`x<=x & f`x lepoll m ==>  \
 \       (UN i<LEAST x. HH(f,A,x)={A}. HH(f,A,i)) = A";
-by (simp_tac (AC_ss addsimps [Ord_Least RS OUN_eq_UN]) 1);
+by (simp_tac (!simpset addsimps [Ord_Least RS OUN_eq_UN]) 1);
 by (rtac equalityI 1);
-by (fast_tac (AC_cs addSDs [less_Least_subset_x]) 1);
-by (fast_tac (AC_cs addSDs [prem RS bspec]
+by (fast_tac (!claset addSDs [less_Least_subset_x]) 1);
+by (fast_tac (!claset addSDs [prem RS bspec]
                 addSIs [f_subsets_imp_UN_HH_eq_x RS (Diff_eq_0_iff RS iffD1)]) 1);
 val lemma1 = result();
 
@@ -26,7 +26,7 @@
 by (dresolve_tac [ltD RS less_Least_subset_x] 1);
 by (forward_tac [HH_subset_imp_eq] 1);
 by (etac ssubst 1);
-by (fast_tac (AC_cs addIs [prem RS ballE]
+by (fast_tac (!claset addIs [prem RS ballE]
                 addSDs [HH_subset_x_imp_subset_Diff_UN RS not_emptyI2]) 1);
 val lemma2 = result();
 
@@ -34,13 +34,13 @@
 by (rtac allI 1);
 by (eres_inst_tac [("x","Pow(A)-{0}")] allE 1);
 by (etac impE 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 by (REPEAT (eresolve_tac [bexE,conjE,exE] 1));
 by (rtac bexI 1 THEN (assume_tac 2));
 by (rtac conjI 1 THEN (assume_tac 1));
 by (res_inst_tac [("x","LEAST i. HH(f,A,i)={A}")] exI 1);
 by (res_inst_tac [("x","lam j: (LEAST i. HH(f,A,i)={A}). HH(f,A,j)")] exI 1);
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs addSIs [Ord_Least, lam_type RS domain_of_fun]
+by (Asm_full_simp_tac 1);
+by (fast_tac (!claset addSIs [Ord_Least, lam_type RS domain_of_fun]
                 addSEs [less_Least_subset_x, lemma1, lemma2]) 1);
 qed "AC15_WO6";
--- a/src/ZF/AC/AC16_WO4.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC16_WO4.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -19,9 +19,9 @@
 by (etac exE 1);
 by (res_inst_tac [("x","n")] exI 1);
 by (res_inst_tac [("x","lam i:n. {f`i}")] exI 1);
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 by (rewrite_goals_tac [bij_def, surj_def]);
-by (fast_tac (AC_cs addSIs [ltI, nat_into_Ord, lam_funtype RS domain_of_fun,
+by (fast_tac (!claset addSIs [ltI, nat_into_Ord, lam_funtype RS domain_of_fun,
         equalityI, singleton_eqpoll_1 RS eqpoll_imp_lepoll RS lepoll_trans,
         nat_1_lepoll_iff RS iffD2]
         addSEs [apply_type, ltE]) 1);
@@ -35,12 +35,12 @@
 val well_ord_paired = standard (paired_bij RS bij_is_inj RS well_ord_rvimage);
 
 goal thy "!!A. [| A lepoll B; ~ A lepoll C |] ==> ~ B lepoll C";
-by (fast_tac (FOL_cs addEs [notE, lepoll_trans]) 1);
+by (fast_tac (!claset addEs [notE, lepoll_trans]) 1);
 val lepoll_trans1 = result();
 
 goalw thy [lepoll_def]
         "!!X.[| Y lepoll X; well_ord(X, R) |] ==> EX S. well_ord(Y, S)";
-by (fast_tac (AC_cs addSEs [well_ord_rvimage]) 1);
+by (fast_tac (!claset addSEs [well_ord_rvimage]) 1);
 val well_ord_lepoll = result();
 
 goal thy "!!X. [| well_ord(X,R); well_ord(Y,S)  \
@@ -57,7 +57,7 @@
 by (res_inst_tac [("x","{{a,x}. a:nat Un  Hartog(z)}")] exI 1);
 by (resolve_tac [Ord_nat RS well_ord_Memrel RS (Ord_Hartog RS
                 well_ord_Memrel RSN (2, well_ord_Un)) RS exE] 1);
-by (fast_tac (AC_cs addSIs [Ord_Hartog, well_ord_Memrel, well_ord_paired,
+by (fast_tac (!claset addSIs [Ord_Hartog, well_ord_Memrel, well_ord_paired,
         equals0I, HartogI RSN (2, lepoll_trans1),
         subset_imp_lepoll RS (paired_eqpoll RS eqpoll_sym RS
         eqpoll_imp_lepoll RSN (2, lepoll_trans))]
@@ -68,7 +68,7 @@
 val lemma2 = result();
 
 val [prem] = goal thy "~Finite(B) ==> ~Finite(A Un B)";
-by (fast_tac (AC_cs
+by (fast_tac (!claset
         addSIs [subset_imp_lepoll RS (prem RSN (2, lepoll_infinite))]) 1);
 val infinite_Un = result();
 
@@ -90,13 +90,13 @@
 by (res_inst_tac [("d","%z. if(z=y, A, converse(f)`z)")] lam_injective 1);
 by (ALLGOALS
     (asm_simp_tac 
-     (ZF_ss addsimps [inj_is_fun RS apply_type, left_inverse] 
-      setloop (split_tac [expand_if] ORELSE' step_tac ZF_cs))));
+     (!simpset addsimps [inj_is_fun RS apply_type, left_inverse] 
+      setloop (split_tac [expand_if] ORELSE' Step_tac))));
 val succ_not_lepoll_lemma = result();
 
 goalw thy [lepoll_def, eqpoll_def, bij_def, surj_def]
         "!!A. [| ~A eqpoll B; A lepoll B |] ==> succ(A) lepoll B";
-by (fast_tac (AC_cs addSEs [succ_not_lepoll_lemma, inj_is_fun]) 1);
+by (fast_tac (!claset addSEs [succ_not_lepoll_lemma, inj_is_fun]) 1);
 val succ_not_lepoll_imp_eqpoll = result();
 
 val [prem] = goalw thy [s_u_def]
@@ -108,7 +108,7 @@
 by (etac CollectE 1);
 by (etac conjE 1);
 by (etac swap 1);
-by (fast_tac (AC_cs addSEs [succ_not_lepoll_imp_eqpoll]) 1);
+by (fast_tac (!claset addSEs [succ_not_lepoll_imp_eqpoll]) 1);
 val suppose_not = result();
 
 (* ********************************************************************** *)
@@ -130,13 +130,13 @@
 by (etac nat_lepoll_imp_ex_eqpoll_n 1);
 by (resolve_tac [ordertype_eqpoll RS eqpoll_sym RS eqpoll_imp_lepoll
         RSN (2, lepoll_trans)] 1 THEN (assume_tac 2));
-by (fast_tac (AC_cs addSIs [nat_le_infinite_Ord RS le_imp_lepoll]
+by (fast_tac (!claset addSIs [nat_le_infinite_Ord RS le_imp_lepoll]
                 addSEs [Ord_ordertype, ordertype_eqpoll RS eqpoll_imp_lepoll
                         RS lepoll_infinite]) 1);
 val ex_subset_eqpoll_n = result();
 
 goalw thy [lesspoll_def] "!!n. n: nat ==> n lesspoll nat";
-by (fast_tac (AC_cs addSEs [Ord_nat RSN (2, ltI) RS leI RS le_imp_lepoll,
+by (fast_tac (!claset addSEs [Ord_nat RSN (2, ltI) RS leI RS le_imp_lepoll,
         eqpoll_sym RS eqpoll_imp_lepoll]
         addIs [Ord_nat RSN (2, nat_succI RS ltI) RS leI
         RS le_imp_lepoll RS lepoll_trans RS succ_lepoll_natE]) 1);
@@ -157,27 +157,27 @@
 val Diff_Finite_eqpoll = result();
 
 goal thy "!!x. [| a<=y; b:y-a; u:x |] ==> cons(b, cons(u, a)) : Pow(x Un y)";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val cons_cons_subset = result();
 
 goal thy "!!x. [| a eqpoll k; a<=y; b:y-a; u:x; x Int y = 0  \
 \       |] ==> cons(b, cons(u, a)) eqpoll succ(succ(k))";
-by (fast_tac (AC_cs addSIs [cons_eqpoll_succ] addEs [equals0D]) 1);
+by (fast_tac (!claset addSIs [cons_eqpoll_succ] addEs [equals0D]) 1);
 val cons_cons_eqpoll = result();
 
 goalw thy [s_u_def] "s_u(u, t_n, k, y) <= t_n";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val s_u_subset = result();
 
 goalw thy [s_u_def, succ_def]
         "!!w. [| w:t_n; cons(b,cons(u,a)) <= w; a <= y; b : y-a; k eqpoll a  \
 \       |] ==> w: s_u(u, t_n, succ(k), y)";
-by (fast_tac (AC_cs addDs [eqpoll_imp_lepoll RS cons_lepoll_cong]
+by (fast_tac (!claset addDs [eqpoll_imp_lepoll RS cons_lepoll_cong]
                 addSEs [subset_imp_lepoll RSN (2, lepoll_trans)]) 1);
 val s_uI = result();
 
 goalw thy [s_u_def] "!!v. v : s_u(u, t_n, k, y) ==> u : v";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val in_s_u_imp_u_in = result();
 
 goal thy
@@ -187,33 +187,33 @@
 \       ==> EX! c. c:{v:s_u(u, t_n, succ(k), y). a <= v} & b:c";
 by (etac ballE 1);
 by (fast_tac (FOL_cs addSIs [CollectI, cons_cons_subset,
-                eqpoll_sym RS cons_cons_eqpoll]) 2);
+			     eqpoll_sym RS cons_cons_eqpoll]) 2);
 by (etac ex1E 1);
 by (res_inst_tac [("a","w")] ex1I 1);
 by (rtac conjI 1);
 by (rtac CollectI 1);
 by (fast_tac (FOL_cs addSEs [s_uI]) 1);
-by (fast_tac AC_cs 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
+by (Fast_tac 1);
 by (etac allE 1);
 by (etac impE 1);
 by (assume_tac 2);
-by (fast_tac (AC_cs addSEs [s_u_subset RS subsetD, in_s_u_imp_u_in]) 1);
+by (fast_tac (!claset addSEs [s_u_subset RS subsetD, in_s_u_imp_u_in]) 1);
 val ex1_superset_a = result();
 
 goal thy
         "!!A. [| succ(k) eqpoll A; k eqpoll B; B <= A; a : A-B; k:nat  \
 \       |] ==> A = cons(a, B)";
 by (rtac equalityI 1);
-by (fast_tac AC_cs 2);
+by (Fast_tac 2);
 by (resolve_tac [Diff_eq_0_iff RS iffD1] 1);
 by (rtac equals0I 1);
 by (dresolve_tac [eqpoll_sym RS eqpoll_imp_lepoll] 1);
 by (dresolve_tac [eqpoll_sym RS cons_eqpoll_succ] 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (dtac cons_eqpoll_succ 1);
-by (fast_tac AC_cs 1);
-by (fast_tac (AC_cs addSIs [nat_succI]
+by (Fast_tac 1);
+by (fast_tac (!claset addSIs [nat_succI]
         addSEs [[eqpoll_sym RS eqpoll_imp_lepoll, subset_imp_lepoll] MRS
         (lepoll_trans RS lepoll_trans) RS succ_lepoll_natE]) 1);
 val set_eq_cons = result();
@@ -227,19 +227,19 @@
 \       Int y = cons(b, a)";
 by (dresolve_tac [ex1_superset_a RS theI] 1 THEN REPEAT (assume_tac 1));
 by (rtac set_eq_cons 1);
-by (REPEAT (fast_tac AC_cs 1));
+by (REPEAT (Fast_tac 1));
 val the_eq_cons = result();
 
 goal thy "!!a. [| cons(x,a) = cons(y,a); x~: a |] ==> x = y ";
-by (fast_tac (AC_cs addSEs [equalityE]) 1);
+by (fast_tac (!claset addSEs [equalityE]) 1);
 val cons_eqE = result();
 
 goal thy "!!A. A = B ==> A Int C = B Int C";
-by (asm_simp_tac AC_ss 1);
+by (Asm_simp_tac 1);
 val eq_imp_Int_eq = result();
 
 goal thy "!!a. [| a=b; a=c; b=d |] ==> c=d";
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 val msubst = result();
 
 (* ********************************************************************** *)
@@ -271,7 +271,7 @@
 by (resolve_tac [beta RS ssubst] 1 THEN (assume_tac 1));
 by (rtac impI 1);
 by (rtac cons_eqE 1);
-by (fast_tac AC_cs 2);
+by (Fast_tac 2);
 by (dres_inst_tac [("A","THE c. ?P(c)"), ("C","y")] eq_imp_Int_eq 1);
 by (eresolve_tac [[asm_rl, the_eq_cons, the_eq_cons] MRS msubst] 1
         THEN REPEAT (assume_tac 1));
@@ -285,19 +285,19 @@
         "!!k. [| k:nat; m:nat |] ==>  \
 \       ALL A B. A eqpoll k #+ m & k lepoll B & B<=A --> A-B lepoll m";
 by (eres_inst_tac [("n","k")] nat_induct 1);
-by (simp_tac (AC_ss addsimps [add_0]) 1);
-by (fast_tac (AC_cs addIs [eqpoll_imp_lepoll RS
+by (simp_tac (!simpset addsimps [add_0]) 1);
+by (fast_tac (!claset addIs [eqpoll_imp_lepoll RS
         (Diff_subset RS subset_imp_lepoll RS lepoll_trans)]) 1);
 by (REPEAT (resolve_tac [allI,impI] 1));
 by (resolve_tac [succ_lepoll_imp_not_empty RS not_emptyE] 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (eres_inst_tac [("x","A - {xa}")] allE 1);
 by (eres_inst_tac [("x","B - {xa}")] allE 1);
 by (etac impE 1);
-by (asm_full_simp_tac (AC_ss addsimps [add_succ]) 1);
-by (fast_tac (AC_cs addSIs [Diff_sing_eqpoll, lepoll_Diff_sing]) 1);
+by (asm_full_simp_tac (!simpset addsimps [add_succ]) 1);
+by (fast_tac (!claset addSIs [Diff_sing_eqpoll, lepoll_Diff_sing]) 1);
 by (res_inst_tac [("P","%z. z lepoll m")] subst 1 THEN (assume_tac 2));
-by (fast_tac (AC_cs addSIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 val eqpoll_sum_imp_Diff_lepoll_lemma = result();
 
 goal thy "!!k. [| A eqpoll succ(k #+ m); B<=A; succ(k) lepoll B;  \
@@ -306,7 +306,7 @@
 by (dresolve_tac [add_succ RS ssubst] 1);
 by (dresolve_tac [nat_succI RS eqpoll_sum_imp_Diff_lepoll_lemma] 1
         THEN (REPEAT (assume_tac 1)));
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val eqpoll_sum_imp_Diff_lepoll = result();
 
 (* ********************************************************************** *)
@@ -317,19 +317,19 @@
         "!!k. [| k:nat; m:nat |] ==>  \
 \       ALL A B. A eqpoll k #+ m & k eqpoll B & B<=A --> A-B eqpoll m";
 by (eres_inst_tac [("n","k")] nat_induct 1);
-by (fast_tac (AC_cs addSDs [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_0_is_0]
-        addss (AC_ss addsimps [add_0])) 1);
+by (fast_tac (!claset addSDs [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_0_is_0]
+        addss (!simpset addsimps [add_0])) 1);
 by (REPEAT (resolve_tac [allI,impI] 1));
 by (resolve_tac [succ_lepoll_imp_not_empty RS not_emptyE] 1);
-by (fast_tac (AC_cs addSEs [eqpoll_imp_lepoll]) 1);
+by (fast_tac (!claset addSEs [eqpoll_imp_lepoll]) 1);
 by (eres_inst_tac [("x","A - {xa}")] allE 1);
 by (eres_inst_tac [("x","B - {xa}")] allE 1);
 by (etac impE 1);
-by (fast_tac (AC_cs addSIs [Diff_sing_eqpoll,
+by (fast_tac (!claset addSIs [Diff_sing_eqpoll,
         eqpoll_sym RSN (2, Diff_sing_eqpoll) RS eqpoll_sym]
-        addss (AC_ss addsimps [add_succ])) 1);
+        addss (!simpset addsimps [add_succ])) 1);
 by (res_inst_tac [("P","%z. z eqpoll m")] subst 1 THEN (assume_tac 2));
-by (fast_tac (AC_cs addSIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 val eqpoll_sum_imp_Diff_eqpoll_lemma = result();
 
 goal thy "!!k. [| A eqpoll succ(k #+ m); B<=A; succ(k) eqpoll B;  \
@@ -338,7 +338,7 @@
 by (dresolve_tac [add_succ RS ssubst] 1);
 by (dresolve_tac [nat_succI RS eqpoll_sum_imp_Diff_eqpoll_lemma] 1
         THEN (REPEAT (assume_tac 1)));
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val eqpoll_sum_imp_Diff_eqpoll = result();
 
 (* ********************************************************************** *)
@@ -347,7 +347,7 @@
 
 goal thy "!!w. [| x Int y = 0; w <= x Un y |]  \
 \        ==> w Int (x - {u}) = w - cons(u, w Int y)";
-by (fast_tac (AC_cs addSIs [equalityI] addEs [equals0D]) 1);
+by (fast_tac (!claset addSIs [equalityI] addEs [equals0D]) 1);
 val w_Int_eq_w_Diff = result();
 
 goal thy "!!w. [| w:{v:s_u(u, t_n, succ(l), y). a <= v};  \
@@ -357,8 +357,8 @@
 \       |] ==> w Int (x - {u}) eqpoll m";
 by (etac CollectE 1);
 by (resolve_tac [w_Int_eq_w_Diff RS ssubst] 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSDs [s_u_subset RS subsetD]) 1);
-by (fast_tac (AC_cs addEs [equals0D] addSDs [bspec]
+by (fast_tac (!claset addSDs [s_u_subset RS subsetD]) 1);
+by (fast_tac (!claset addEs [equals0D] addSDs [bspec]
         addDs [s_u_subset RS subsetD]
         addSEs [eqpoll_sym RS cons_eqpoll_succ RS eqpoll_sym, in_s_u_imp_u_in]
         addSIs [nat_succI, eqpoll_sum_imp_Diff_eqpoll]) 1);
@@ -372,7 +372,7 @@
 goal thy
         "!!z. [| z : xa Int (x - {u}); l eqpoll a; a <= y; x Int y = 0; u:x  \
 \       |] ==> cons(z, cons(u, a)) : {v: Pow(x Un y). v eqpoll succ(succ(l))}";
-by (fast_tac (AC_cs addSIs [cons_eqpoll_succ] addEs [equals0D, eqpoll_sym]) 1);
+by (fast_tac (!claset addSIs [cons_eqpoll_succ] addEs [equals0D, eqpoll_sym]) 1);
 val cons_cons_in = result();
 
 (* ********************************************************************** *)
@@ -396,17 +396,17 @@
 by (rtac CollectI 1);
 by (rtac lam_type 1);
 by (rtac CollectI 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (rtac w_Int_eqpoll_m 1 THEN REPEAT (assume_tac 1));
-by (simp_tac AC_ss 1);
+by (Simp_tac 1);
 by (REPEAT (resolve_tac [ballI, impI] 1));
 by (eresolve_tac [w_Int_eqpoll_m RSN (2, eqpoll_m_not_empty) RS not_emptyE] 1
         THEN REPEAT (assume_tac 1));
 by (dresolve_tac [equalityD1 RS subsetD] 1 THEN (assume_tac 1));
 by (dresolve_tac [cons_cons_in RSN (2, bspec)] 1 THEN REPEAT (assume_tac 1));
 by (etac ex1_two_eq 1);
-by (fast_tac (AC_cs addSEs [s_u_subset RS subsetD, in_s_u_imp_u_in]) 1);
-by (fast_tac (AC_cs addSEs [s_u_subset RS subsetD, in_s_u_imp_u_in]) 1);
+by (fast_tac (!claset addSEs [s_u_subset RS subsetD, in_s_u_imp_u_in]) 1);
+by (fast_tac (!claset addSEs [s_u_subset RS subsetD, in_s_u_imp_u_in]) 1);
 val subset_s_u_lepoll_w = result();
 
 goal thy "!!k. [| 0<k; k:nat |] ==> EX l:nat. k = succ(l)";
@@ -438,7 +438,7 @@
 (* ********************************************************************** *)
 
 goal thy "{x:Pow(X). x lepoll 0} = {0}";
-by (fast_tac (AC_cs addSDs [lepoll_0_is_0]
+by (fast_tac (!claset addSDs [lepoll_0_is_0]
                     addSIs [lepoll_refl, equalityI]) 1);
 val subsets_lepoll_0_eq_unit = result();
 
@@ -447,12 +447,12 @@
 by (resolve_tac [well_ord_infinite_subsets_eqpoll_X
         RS (eqpoll_def RS def_imp_iff RS iffD1) RS exE] 1
     THEN (REPEAT (assume_tac 1)));
-by (fast_tac (ZF_cs addSEs [bij_is_inj RS well_ord_rvimage]) 1);
+by (fast_tac (!claset addSEs [bij_is_inj RS well_ord_rvimage]) 1);
 val well_ord_subsets_eqpoll_n = result();
 
 goal thy "!!n. n:nat ==> {z:Pow(y). z lepoll succ(n)} =  \
 \       {z:Pow(y). z lepoll n} Un {z:Pow(y). z eqpoll succ(n)}";
-by (fast_tac (ZF_cs addIs [le_refl, leI,
+by (fast_tac (!claset addIs [le_refl, leI,
                 le_imp_lepoll, equalityI]
                 addSDs [lepoll_succ_disj]
                 addSEs [nat_into_Ord, lepoll_trans, eqpoll_imp_lepoll]) 1);
@@ -460,7 +460,7 @@
 
 goal thy "!!n. n:nat ==>  \
 \       {z:Pow(y). z lepoll n} Int {z:Pow(y). z eqpoll succ(n)} = 0";
-by (fast_tac (ZF_cs addSEs [eqpoll_sym RS eqpoll_imp_lepoll 
+by (fast_tac (!claset addSEs [eqpoll_sym RS eqpoll_imp_lepoll 
                 RS lepoll_trans RS succ_lepoll_natE]
                 addSIs [equals0I]) 1);
 val Int_empty = result();
@@ -471,15 +471,15 @@
 
 goalw thy [irrefl_def, trans_on_def, part_ord_def, linear_def, tot_ord_def]
         "tot_ord({a},0)";
-by (simp_tac ZF_ss 1);
+by (Simp_tac 1);
 val tot_ord_unit = result();
 
 goalw thy [wf_on_def, wf_def] "wf[{a}](0)";
-by (fast_tac (ZF_cs addSIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 val wf_on_unit = result();
 
 goalw thy [well_ord_def] "well_ord({a},0)";
-by (simp_tac (ZF_ss addsimps [tot_ord_unit, wf_on_unit]) 1);
+by (simp_tac (!simpset addsimps [tot_ord_unit, wf_on_unit]) 1);
 val well_ord_unit = result();
 
 (* ********************************************************************** *)
@@ -489,22 +489,22 @@
 goal thy "!!y r. [| well_ord(y,r); ~Finite(y); n:nat |] ==>  \
 \       EX R. well_ord({z:Pow(y). z lepoll n}, R)";
 by (etac nat_induct 1);
-by (fast_tac (ZF_cs addSIs [well_ord_unit]
-        addss (ZF_ss addsimps [subsets_lepoll_0_eq_unit])) 1);
+by (fast_tac (!claset addSIs [well_ord_unit]
+        addss (!simpset addsimps [subsets_lepoll_0_eq_unit])) 1);
 by (etac exE 1);
 by (eresolve_tac [well_ord_subsets_eqpoll_n RS exE] 1 
         THEN REPEAT (assume_tac 1));
-by (asm_simp_tac (ZF_ss addsimps [subsets_lepoll_succ]) 1);
+by (asm_simp_tac (!simpset addsimps [subsets_lepoll_succ]) 1);
 by (dtac well_ord_radd 1 THEN (assume_tac 1));
 by (eresolve_tac [Int_empty RS disj_Un_eqpoll_sum RS 
                 (eqpoll_def RS def_imp_iff RS iffD1) RS exE] 1);
-by (fast_tac (ZF_cs addSEs [bij_is_inj RS well_ord_rvimage]) 1);
+by (fast_tac (!claset addSEs [bij_is_inj RS well_ord_rvimage]) 1);
 val well_ord_subsets_lepoll_n = result();
 
 goalw thy [LL_def, MM_def]
         "!!x. t_n <= {v:Pow(x Un y). v eqpoll n}  \
 \               ==> LL(t_n, k, y) <= {z:Pow(y). z lepoll n}";
-by (fast_tac (AC_cs addSEs [RepFunE]
+by (fast_tac (!claset addSEs [RepFunE]
         addIs [subset_imp_lepoll RS (eqpoll_imp_lepoll
                 RSN (2, lepoll_trans))]) 1);
 val LL_subset = result();
@@ -526,16 +526,16 @@
 \       t_n <= {v:Pow(x Un y). v eqpoll n}; \
 \       v:LL(t_n, k, y)  \
 \       |] ==> EX! w. w:MM(t_n, k, y) & v<=w";
-by (step_tac (AC_cs addSEs [RepFunE]) 1);
+by (step_tac (!claset addSEs [RepFunE]) 1);
 by (resolve_tac [lepoll_imp_eqpoll_subset RS exE] 1 THEN (assume_tac 1));
 by (eres_inst_tac [("x","xa")] ballE 1);
-by (fast_tac (AC_cs addSEs [eqpoll_sym]) 2);
+by (fast_tac (!claset addSEs [eqpoll_sym]) 2);
 by (res_inst_tac [("a","v")] ex1I 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (etac ex1E 1);
 by (res_inst_tac [("x","v")] allE 1 THEN (assume_tac 1));
 by (eres_inst_tac [("x","xb")] allE 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val unique_superset_in_MM = result();
 
 (* ********************************************************************** *)
@@ -556,15 +556,15 @@
 by (eresolve_tac [exists_proper_in_s_u RS bexE] 1
         THEN REPEAT (assume_tac 1));
 by (rewrite_goals_tac [MM_def, s_u_def]);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val exists_in_MM = result();
 
 goalw thy [LL_def] "!!w. w : MM(t_n, k, y) ==> w Int y : LL(t_n, k, y)";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val Int_in_LL = result();
 
 goalw thy [MM_def] "MM(t_n, k, y) <= t_n";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val MM_subset = result();
 
 goal thy 
@@ -579,10 +579,10 @@
 by (res_inst_tac [("x","w Int y")] bexI 1);
 by (etac Int_in_LL 2);
 by (rewtac GG_def);
-by (asm_full_simp_tac (AC_ss addsimps [Int_in_LL]) 1);
+by (asm_full_simp_tac (!simpset addsimps [Int_in_LL]) 1);
 by (eresolve_tac [unique_superset_in_MM RS the_equality2 RS ssubst] 1
         THEN (assume_tac 1));
-by (REPEAT (fast_tac (AC_cs addEs [equals0D] addSEs [Int_in_LL]) 1));
+by (REPEAT (fast_tac (!claset addEs [equals0D] addSEs [Int_in_LL]) 1));
 val exists_in_LL = result();
 
 goalw thy [LL_def] 
@@ -590,7 +590,7 @@
 \       t_n <= {v:Pow(x Un y). v eqpoll n};  \
 \       v : LL(t_n, k, y) |]  \
 \       ==> v = (THE x. x : MM(t_n, k, y) & v <= x) Int y";
-by (fast_tac (AC_cs addSEs [Int_in_LL,
+by (fast_tac (!claset addSEs [Int_in_LL,
                 unique_superset_in_MM RS the_equality2 RS ssubst]) 1);
 val in_LL_eq_Int = result();
 
@@ -599,7 +599,7 @@
 \       t_n <= {v:Pow(x Un y). v eqpoll n};  \
 \       v : LL(t_n, k, y) |]  \
 \       ==> (THE x. x : MM(t_n, k, y) & v <= x) <= x Un y";
-by (fast_tac (AC_cs addSDs [unique_superset_in_MM RS theI RS conjunct1 RS 
+by (fast_tac (!claset addSDs [unique_superset_in_MM RS theI RS conjunct1 RS 
         (MM_subset RS subsetD)]) 1);
 val the_in_MM_subset = result();
 
@@ -608,13 +608,13 @@
 \       t_n <= {v:Pow(x Un y). v eqpoll n};  \
 \       v : LL(t_n, k, y) |]  \
 \       ==> GG(t_n, k, y) ` v <= x";
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 by (forward_tac [the_in_MM_subset] 1 THEN REPEAT (assume_tac 1));
 by (dtac in_LL_eq_Int 1 THEN REPEAT (assume_tac 1));
 by (rtac subsetI 1);
 by (etac DiffE 1);
 by (etac swap 1);
-by (fast_tac (AC_cs addEs [ssubst]) 1);
+by (fast_tac (!claset addEs [ssubst]) 1);
 val GG_subset = result();
 
 goal thy  
@@ -649,12 +649,12 @@
 goalw thy [MM_def]
         "!!w. [| w : MM(t_n, k, y); t_n <= {v:Pow(x Un y). v eqpoll n}  \
 \       |] ==> w eqpoll n";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val in_MM_eqpoll_n = result();
 
 goalw thy [LL_def, MM_def]
         "!!w. w : LL(t_n, k, y) ==> k lepoll w";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val in_LL_eqpoll_n = result();
 
 goalw thy [GG_def] 
@@ -666,13 +666,14 @@
 \       (GG(t_n, succ(k), y)) `  \
 \       (converse(ordermap(LL(t_n, succ(k), y), S)) ` b) lepoll m";
 by (rtac oallI 1);
-by (asm_full_simp_tac (AC_ss addsimps [ltD,
+by (asm_full_simp_tac (!simpset addsimps [ltD,
         ordermap_bij RS bij_converse_bij RS bij_is_fun RS apply_type]) 1);
 by (rtac eqpoll_sum_imp_Diff_lepoll 1);
-by (REPEAT (fast_tac (FOL_cs addSDs [ltD]
+by (REPEAT (fast_tac 
+	    (FOL_cs addSDs [ltD]
         addSIs [eqpoll_sum_imp_Diff_lepoll, in_LL_eqpoll_n]
         addEs [unique_superset_in_MM RS theI RS conjunct1 RS in_MM_eqpoll_n,
-        in_LL_eq_Int RS equalityD1 RS (Int_lower1 RSN (2, subset_trans)),
+          in_LL_eq_Int RS equalityD1 RS (Int_lower1 RSN (2, subset_trans)),
         ordermap_bij RS bij_converse_bij RS bij_is_fun RS apply_type]) 1));
 val all_in_lepoll_m = result();
 
@@ -691,12 +692,12 @@
 by (forward_tac [infinite_Un] 1 THEN (mp_tac 1));
 by (REPEAT (eresolve_tac [exE, conjE] 1));
 by (resolve_tac [well_ord_LL RS exE] 1 THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSIs [nat_succI, add_type]) 1);
+by (fast_tac (!claset addSIs [nat_succI, add_type]) 1);
 by (res_inst_tac [("x","ordertype(LL(T, succ(k), y), x)")] exI 1);
 by (res_inst_tac [("x","lam b:ordertype(LL(T, succ(k), y), x).  \
 \       (GG(T, succ(k), y)) `  \
 \       (converse(ordermap(LL(T, succ(k), y), x)) ` b)")] exI 1);
-by (simp_tac AC_ss 1);
+by (Simp_tac 1);
 by (fast_tac (empty_cs addSIs [conjI, lam_funtype RS domain_of_fun]
         addSEs [Ord_ordertype, all_in_lepoll_m, OUN_eq_x]) 1);
 qed "AC16_WO4";
--- a/src/ZF/AC/AC16_lemmas.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC16_lemmas.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -8,28 +8,28 @@
 open AC16_lemmas;
 
 goal thy "!!a. a~:A ==> cons(a,A)-{a}=A";
-by (fast_tac (ZF_cs addSIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 val cons_Diff_eq = result();
 
 goalw thy [lepoll_def] "1 lepoll X <-> (EX x. x:X)";
 by (rtac iffI 1);
-by (fast_tac (ZF_cs addIs [inj_is_fun RS apply_type]) 1);
+by (fast_tac (!claset addIs [inj_is_fun RS apply_type]) 1);
 by (etac exE 1);
 by (res_inst_tac [("x","lam a:1. x")] exI 1);
-by (fast_tac (ZF_cs addSIs [lam_injective]) 1);
+by (fast_tac (!claset addSIs [lam_injective]) 1);
 val nat_1_lepoll_iff = result();
 
 goal thy "X eqpoll 1 <-> (EX x. X={x})";
 by (rtac iffI 1);
 by (etac eqpollE 1);
 by (dresolve_tac [nat_1_lepoll_iff RS iffD1] 1);
-by (fast_tac (ZF_cs addSIs [lepoll_1_is_sing]) 1);
-by (fast_tac (ZF_cs addSIs [singleton_eqpoll_1]) 1);
+by (fast_tac (!claset addSIs [lepoll_1_is_sing]) 1);
+by (fast_tac (!claset addSIs [singleton_eqpoll_1]) 1);
 val eqpoll_1_iff_singleton = result();
 
 goalw thy [succ_def] 
       "!!x. [| x eqpoll n; y~:x |] ==> cons(y,x) eqpoll succ(n)";
-by (fast_tac (ZF_cs addSEs [cons_eqpoll_cong, mem_irrefl]) 1);
+by (fast_tac (!claset addSEs [cons_eqpoll_cong, mem_irrefl]) 1);
 val cons_eqpoll_succ = result();
 
 goal thy "{Y:Pow(X). Y eqpoll 1} = {{x}. x:X}";
@@ -37,23 +37,23 @@
 by (rtac subsetI 1);
 by (etac CollectE 1);
 by (dresolve_tac [eqpoll_1_iff_singleton RS iffD1] 1);
-by (fast_tac (AC_cs addSIs [RepFunI]) 1);
+by (fast_tac (!claset addSIs [RepFunI]) 1);
 by (rtac subsetI 1);
 by (etac RepFunE 1);
 by (rtac CollectI 1);
-by (fast_tac AC_cs 1);
-by (fast_tac (AC_cs addSIs [singleton_eqpoll_1]) 1);
+by (Fast_tac 1);
+by (fast_tac (!claset addSIs [singleton_eqpoll_1]) 1);
 val subsets_eqpoll_1_eq = result();
 
 goalw thy [eqpoll_def, bij_def] "X eqpoll {{x}. x:X}";
 by (res_inst_tac [("x","lam x:X. {x}")] exI 1);
 by (rtac IntI 1);
 by (rewrite_goals_tac [inj_def, surj_def]);
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs addSIs [lam_type, RepFunI] 
+by (Asm_full_simp_tac 1);
+by (fast_tac (!claset addSIs [lam_type, RepFunI] 
                 addIs [singleton_eq_iff RS iffD1]) 1);
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs addSIs [lam_type]) 1);
+by (Asm_full_simp_tac 1);
+by (fast_tac (!claset addSIs [lam_type]) 1);
 val eqpoll_RepFun_sing = result();
 
 goal thy "{Y:Pow(X). Y eqpoll 1} eqpoll X";
@@ -65,7 +65,7 @@
 \               ==> (LEAST i. i:y) : y";
 by (eresolve_tac [eqpoll_sym RS eqpoll_imp_lepoll RS 
                 succ_lepoll_imp_not_empty RS not_emptyE] 1);
-by (fast_tac (AC_cs addIs [LeastI]
+by (fast_tac (!claset addIs [LeastI]
         addSDs [InfCard_is_Card RS Card_is_Ord, PowD RS subsetD]
         addEs [Ord_in_Ord]) 1);
 val InfCard_Least_in = result();
@@ -78,34 +78,34 @@
 by (res_inst_tac [("d","%z. cons(fst(z),snd(z))")] lam_injective 1);
 by (rtac SigmaI 1);
 by (etac CollectE 1);
-by (asm_full_simp_tac AC_ss 3);
+by (Asm_full_simp_tac 3);
 by (rtac equalityI 3);
-by (fast_tac AC_cs 4);
+by (Fast_tac 4);
 by (rtac subsetI 3);
 by (etac consE 3);
-by (fast_tac AC_cs 4);
+by (Fast_tac 4);
 by (rtac CollectI 2);
-by (fast_tac AC_cs 2);
+by (Fast_tac 2);
 by (resolve_tac [PowD RS subsetD] 1 THEN (assume_tac 1));
-by (REPEAT (fast_tac (AC_cs addSIs [Diff_sing_eqpoll]
+by (REPEAT (fast_tac (!claset addSIs [Diff_sing_eqpoll]
                 addIs [InfCard_Least_in]) 1));
 val subsets_lepoll_lemma1 = result();
 
 val prems = goal thy "(!!y. y:z ==> Ord(y)) ==> z <= succ(Union(z))";
 by (rtac subsetI 1);
 by (res_inst_tac [("Q","ALL y:z. y<=x")] (excluded_middle RS disjE) 1);
-by (fast_tac (AC_cs addSIs [equalityI]) 2);
+by (fast_tac (!claset addSIs [equalityI]) 2);
 by (etac swap 1);
 by (rtac ballI 1);
 by (rtac Ord_linear_le 1);
 by (dtac le_imp_subset 3 THEN (assume_tac 3));
-by (fast_tac (AC_cs addDs prems) 1);
-by (fast_tac (AC_cs addDs prems) 1);
-by (fast_tac (AC_cs addSEs [leE,ltE]) 1);
+by (fast_tac (!claset addDs prems) 1);
+by (fast_tac (!claset addDs prems) 1);
+by (fast_tac (!claset addSEs [leE,ltE]) 1);
 val set_of_Ord_succ_Union = result();
 
 goal thy "!!i. j<=i ==> i ~: j";
-by (fast_tac (ZF_cs addSEs [mem_irrefl]) 1);
+by (fast_tac (!claset addSEs [mem_irrefl]) 1);
 val subset_not_mem = result();
 
 val prems = goal thy "(!!y. y:z ==> Ord(y)) ==> succ(Union(z)) ~: z";
@@ -114,31 +114,31 @@
 val succ_Union_not_mem = result();
 
 goal thy "Union(cons(succ(Union(z)),z)) = succ(Union(z))";
-by (fast_tac (AC_cs addIs [equalityI]) 1);
+by (fast_tac (!claset addIs [equalityI]) 1);
 val Union_cons_eq_succ_Union = result();
 
 goal thy "!!i. [| Ord(i); Ord(j) |] ==> i Un j = i | i Un j = j";
-by (fast_tac (AC_cs addSDs [le_imp_subset] addIs [equalityI]
+by (fast_tac (!claset addSDs [le_imp_subset] addIs [equalityI]
                 addEs [Ord_linear_le]) 1);
 val Un_Ord_disj = result();
 
 goal thy "!!X. x:X ==> Union(X) = x Un Union(X-{x})";
-by (fast_tac (AC_cs addIs [equalityI]) 1);
+by (fast_tac (!claset addIs [equalityI]) 1);
 val Union_eq_Un = result();
 
 goal thy "!!n. n:nat ==>  \
 \       ALL z. (ALL y:z. Ord(y)) & z eqpoll n & z~=0 --> Union(z) : z";
 by (etac nat_induct 1);
-by (fast_tac (AC_cs addSDs [eqpoll_imp_lepoll RS lepoll_0_is_0]) 1);
+by (fast_tac (!claset addSDs [eqpoll_imp_lepoll RS lepoll_0_is_0]) 1);
 by (REPEAT (resolve_tac [allI, impI] 1));
 by (etac natE 1);
-by (fast_tac (AC_cs addSDs [eqpoll_1_iff_singleton RS iffD1]
+by (fast_tac (!claset addSDs [eqpoll_1_iff_singleton RS iffD1]
         addSIs [Union_singleton]) 1);
 by (hyp_subst_tac 1);
 by (REPEAT (eresolve_tac [conjE, not_emptyE] 1));
 by (eres_inst_tac [("x","z-{xb}")] allE 1);
 by (etac impE 1);
-by (fast_tac (AC_cs addSEs [Diff_sing_eqpoll,
+by (fast_tac (!claset addSEs [Diff_sing_eqpoll,
                 Diff_sing_eqpoll RS eqpoll_succ_imp_not_empty]) 1);
 by (resolve_tac [Union_eq_Un RSN (2, subst_elem)] 1 THEN (assume_tac 2));
 by (forward_tac [bspec] 1 THEN (assume_tac 1));
@@ -161,14 +161,14 @@
 by (resolve_tac [Limit_has_succ RS ltE] 1 THEN (assume_tac 3));
 by (etac InfCard_is_Limit 1);
 by (excluded_middle_tac "z=0" 1);
-by (fast_tac (AC_cs addSIs [InfCard_is_Limit RS Limit_has_0]
-        addIs [Union_0 RS ssubst]) 2);
+by (fast_tac (!claset addSIs [InfCard_is_Limit RS Limit_has_0]
+                      addss (!simpset)) 2);
 by (resolve_tac
         [PowD RS subsetD RS (InfCard_is_Card RS Card_is_Ord RSN (2, ltI))] 1
         THEN (TRYALL assume_tac));
-by (fast_tac (AC_cs addSIs [Union_in]
-                addSEs [PowD RS subsetD RSN (2,
-                InfCard_is_Card RS Card_is_Ord RS Ord_in_Ord)]) 1);
+by (fast_tac (!claset addSIs [Union_in]
+                      addSEs [PowD RS subsetD RSN 
+		 (2, InfCard_is_Card RS Card_is_Ord RS Ord_in_Ord)]) 1);
 val succ_Union_in_x = result();
 
 goalw thy [lepoll_def] "!!X. [| InfCard(x); n:nat |] ==>  \
@@ -179,14 +179,14 @@
 by (res_inst_tac [("d","%z. z-{Union(z)}")] lam_injective 1);
 by (resolve_tac [Union_cons_eq_succ_Union RS ssubst] 2);
 by (rtac cons_Diff_eq 2);
-by (fast_tac (AC_cs addSDs [InfCard_is_Card RS Card_is_Ord]
+by (fast_tac (!claset addSDs [InfCard_is_Card RS Card_is_Ord]
         addEs [Ord_in_Ord] addSIs [succ_Union_not_mem]) 2);
 by (rtac CollectI 1);
-by (fast_tac (AC_cs addSEs [cons_eqpoll_succ] 
+by (fast_tac (!claset addSEs [cons_eqpoll_succ] 
                     addSIs [succ_Union_not_mem] 
                     addSDs [InfCard_is_Card RS Card_is_Ord] 
                     addEs  [Ord_in_Ord]) 2);
-by (fast_tac (AC_cs addSIs [succ_Union_in_x, nat_succI]) 1);
+by (fast_tac (!claset addSIs [succ_Union_in_x, nat_succI]) 1);
 val succ_lepoll_succ_succ = result();
 
 goal thy "!!X. [| InfCard(X); n:nat |]  \
@@ -202,18 +202,18 @@
 by (resolve_tac [InfCard_is_Card RS Card_cardinal_eq RS ssubst] 2 
         THEN (REPEAT (assume_tac 2)));
 by (eresolve_tac [eqpoll_refl RS prod_eqpoll_cong RS eqpoll_imp_lepoll] 1);
-by (fast_tac (AC_cs addEs [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_trans]
+by (fast_tac (!claset addEs [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_trans]
         addSIs [succ_lepoll_succ_succ]) 1);
 val subsets_eqpoll_X = result();
 
 goalw thy [surj_def] "!!f. [| f:surj(A,B); y<=B |]  \
 \       ==> f``(converse(f)``y) = y";
-by (fast_tac (AC_cs addSIs [equalityI] addDs [apply_equality2]
+by (fast_tac (!claset addSIs [equalityI] addDs [apply_equality2]
         addEs [apply_iff RS iffD2]) 1);
 val image_vimage_eq = result();
 
 goal thy "!!f. [| f:inj(A,B); y<=A |] ==> converse(f)``(f``y) = y";
-by (fast_tac (AC_cs addSIs [equalityI] addSEs [inj_is_fun RS apply_Pair]
+by (fast_tac (!claset addSIs [equalityI] addSEs [inj_is_fun RS apply_Pair]
                 addDs [inj_equality]) 1);
 val vimage_image_eq = result();
 
@@ -222,20 +222,20 @@
 by (etac exE 1);
 by (res_inst_tac [("x","lam X:{Y:Pow(A). EX f. f : bij(Y, n)}. f``X")] exI 1);
 by (res_inst_tac [("d","%Z. converse(f)``Z")] lam_bijective 1);
-by (fast_tac (AC_cs
+by (fast_tac (!claset
         addSIs [bij_is_inj RS restrict_bij RS bij_converse_bij RS comp_bij] 
         addSEs [bij_is_fun RS fun_is_rel RS image_subset RS PowI]) 1);
-by (fast_tac (AC_cs addSIs [bij_converse_bij RS bij_is_inj RS restrict_bij
+by (fast_tac (!claset addSIs [bij_converse_bij RS bij_is_inj RS restrict_bij
                         RS bij_converse_bij RS comp_bij] 
                     addSEs [bij_converse_bij RS bij_is_fun RS fun_is_rel
                         RS image_subset RS PowI]) 1);
-by (fast_tac (AC_cs addSEs [bij_is_inj RS vimage_image_eq]) 1);
-by (fast_tac (AC_cs addSEs [bij_is_surj RS image_vimage_eq]) 1);
+by (fast_tac (!claset addSEs [bij_is_inj RS vimage_image_eq]) 1);
+by (fast_tac (!claset addSEs [bij_is_surj RS image_vimage_eq]) 1);
 val subsets_eqpoll = result();
 
 goalw thy [WO2_def] "!!X. WO2 ==> EX a. Card(a) & X eqpoll a";
 by (REPEAT (eresolve_tac [allE,exE,conjE] 1));
-by (fast_tac (AC_cs addSEs [well_ord_Memrel RS well_ord_cardinal_eqpoll RS
+by (fast_tac (!claset addSEs [well_ord_Memrel RS well_ord_cardinal_eqpoll RS
                 (eqpoll_sym RSN (2, eqpoll_trans)) RS eqpoll_sym]
                 addSIs [Card_cardinal]) 1);
 val WO2_imp_ex_Card = result();
@@ -245,7 +245,7 @@
 val lepoll_infinite = result();
 
 goalw thy [InfCard_def] "!!X. [| ~Finite(X); Card(X) |] ==> InfCard(X)";
-by (fast_tac (AC_cs addSEs [Card_is_Ord RS nat_le_infinite_Ord]) 1);
+by (fast_tac (!claset addSEs [Card_is_Ord RS nat_le_infinite_Ord]) 1);
 val infinite_Card_is_InfCard = result();
 
 goal thy "!!X n. [| WO2; n:nat; ~Finite(X) |]  \
@@ -261,7 +261,7 @@
 val WO2_infinite_subsets_eqpoll_X = result();
 
 goal thy "!!X. well_ord(X,R) ==> EX a. Card(a) & X eqpoll a";
-by (fast_tac (AC_cs addSEs [well_ord_cardinal_eqpoll RS eqpoll_sym]
+by (fast_tac (!claset addSEs [well_ord_cardinal_eqpoll RS eqpoll_sym]
                 addSIs [Card_cardinal]) 1);
 val well_ord_imp_ex_Card = result();
 
--- a/src/ZF/AC/AC16_lemmas.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC16_lemmas.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -1,3 +1,3 @@
 (*Dummy theory to document dependencies *)
 
-AC16_lemmas = AC_Equiv + Hartog + first
+AC16_lemmas = AC_Equiv + Hartog
--- a/src/ZF/AC/AC17_AC1.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC17_AC1.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -34,7 +34,7 @@
 by (rtac ballI 1);
 by (etac swap 1);
 by (rtac impI 1);
-by (fast_tac (AC_cs addSIs [restrict_type]) 1);
+by (fast_tac (!claset addSIs [restrict_type]) 1);
 val not_AC1_imp_ex = result();
 
 goal thy "!!x. [| ALL f:Pow(x) - {0} -> x. EX u: Pow(x) - {0}. f`u~:u;  \
@@ -50,25 +50,25 @@
 by (etac notE 1);
 by (rtac Pi_type 1 THEN (assume_tac 1));
 by (resolve_tac [apply_type RSN (2, subsetD)] 1 THEN TRYALL assume_tac);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val lemma1 = result();
 
 goal thy "!!x. ~ (EX f: Pow(x)-{0}->x. x - F(f) = 0)  \
 \       ==> (lam f: Pow(x)-{0}->x. x - F(f))  \
 \               : (Pow(x) -{0} -> x) -> Pow(x) - {0}";
-by (fast_tac (AC_cs addSIs [lam_type] addIs [equalityI]
+by (fast_tac (!claset addSIs [lam_type] addIs [equalityI]
                 addSDs [Diff_eq_0_iff RS iffD1]) 1);
 val lemma2 = result();
 
 goal thy "!!f. [| f`Z : Z; Z:Pow(x)-{0} |] ==>  \
 \       (lam X:Pow(x)-{0}. {f`X})`Z : Pow(Z)-{0}";
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs addSDs [equals0D]) 1);
+by (Asm_full_simp_tac 1);
+by (fast_tac (!claset addSDs [equals0D]) 1);
 val lemma3 = result();
 
 goal thy "!!z. EX f:F. f`((lam f:F. Q(f))`f) : (lam f:F. Q(f))`f  \
 \       ==> EX f:F. f`Q(f) : Q(f)";
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 val lemma4 = result();
 
 goalw thy [AC17_def] "!!Z. AC17 ==> AC1";
@@ -88,6 +88,6 @@
 by (dresolve_tac [beta RS sym RSN (2, subst_elem)] 1);
 by (assume_tac 1);
 by (dtac lemma3 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSDs [HH_Least_eq_x RS sym RSN (2, subst_elem),
+by (fast_tac (!claset addSDs [HH_Least_eq_x RS sym RSN (2, subst_elem),
                 f_subset_imp_HH_subset] addSEs [mem_irrefl]) 1);
 qed "AC17_AC1";
--- a/src/ZF/AC/AC18_AC19.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC18_AC19.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -25,19 +25,19 @@
 by (rtac subsetI 1);
 by (eres_inst_tac [("x","{{b:B(a). x:X(a,b)}. a:A}")] allE 1);
 by (etac impE 1);
-by (fast_tac (AC_cs addSEs [RepFunE] addSDs [INT_E]
+by (fast_tac (!claset addSEs [RepFunE] addSDs [INT_E]
                 addEs [UN_E, sym RS equals0D]) 1);
 by (etac exE 1);
 by (rtac UN_I 1);
-by (fast_tac (AC_cs addSEs [PROD_subsets]) 1);
-by (simp_tac AC_ss 1);
-by (fast_tac (FOL_cs addSEs [not_emptyE] addDs [RepFunI RSN (2, apply_type)]
+by (fast_tac (!claset addSEs [PROD_subsets]) 1);
+by (Simp_tac 1);
+by (fast_tac (!claset addSEs [not_emptyE] addDs [RepFunI RSN (2, apply_type)]
                 addEs [CollectD2] addSIs [INT_I]) 1);
 val lemma_AC18 = result();
 
 val [prem] = goalw thy (AC18_def::AC_defs) "AC1 ==> AC18";
 by (resolve_tac [prem RS revcut_rl] 1);
-by (fast_tac (AC_cs addSEs [lemma_AC18, UN_E, not_emptyE, apply_type]
+by (fast_tac (!claset addSEs [lemma_AC18, UN_E, not_emptyE, apply_type]
                 addSIs [equalityI, INT_I, UN_I]) 1);
 qed "AC1_AC18";
 
@@ -48,7 +48,7 @@
 val [prem] = goalw thy [AC18_def, AC19_def] "AC18 ==> AC19";
 by (rtac allI 1);
 by (res_inst_tac [("B1","%x.x")] (forall_elim_vars 0 prem RS revcut_rl) 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 qed "AC18_AC19";
 
 (* ********************************************************************** *)
@@ -57,7 +57,7 @@
 
 goalw thy [u_def]
         "!!A. [| A ~= 0; 0 ~: A |] ==> {u_(a). a:A} ~= 0 & 0 ~: {u_(a). a:A}";
-by (fast_tac (AC_cs addSIs [not_emptyI, RepFunI]
+by (fast_tac (!claset addSIs [not_emptyI, RepFunI]
                 addSEs [not_emptyE, RepFunE]
                 addSDs [sym RS (RepFun_eq_0_iff RS iffD1)]) 1);
 val RepRep_conj = result();
@@ -66,17 +66,17 @@
 by (hyp_subst_tac 1);
 by (rtac subst_elem 1 THEN (assume_tac 1));
 by (rtac equalityI 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (rtac subsetI 1);
 by (excluded_middle_tac "x=0" 1);
-by (fast_tac AC_cs 1);
-by (fast_tac (AC_cs addEs [notE, subst_elem] addSIs [equalityI])  1);
+by (Fast_tac 1);
+by (fast_tac (!claset addEs [notE, subst_elem] addSIs [equalityI])  1);
 val lemma1_1 = result();
 
 goalw thy [u_def]
         "!!a. [| f`(u_(a)) ~: a; f: (PROD B:{u_(a). a:A}. B); a:A |]  \
 \               ==> f`(u_(a))-{0} : a";
-by (fast_tac (AC_cs addSEs [RepFunI, RepFunE, lemma1_1]
+by (fast_tac (!claset addSEs [RepFunI, RepFunE, lemma1_1]
                 addSDs [apply_type]) 1);
 val lemma1_2 = result();
 
@@ -87,35 +87,35 @@
 by (rtac lam_type 1);
 by (split_tac [expand_if] 1);
 by (rtac conjI 1);
-by (fast_tac AC_cs 1);
-by (fast_tac (AC_cs addSEs [lemma1_2]) 1);
+by (Fast_tac 1);
+by (fast_tac (!claset addSEs [lemma1_2]) 1);
 val lemma1 = result();
 
 goalw thy [u_def] "!!a. a~=0 ==> 0: (UN b:u_(a). b)";
-by (fast_tac (AC_cs addSEs [not_emptyE] addSIs [UN_I, RepFunI]) 1);
+by (fast_tac (!claset addSEs [not_emptyE] addSIs [UN_I, RepFunI]) 1);
 val lemma2_1 = result();
 
 goal thy "!!A C. [| A~=0; 0~:A |] ==> (INT x:{u_(a). a:A}. UN b:x. b) ~= 0";
 by (etac not_emptyE 1);
 by (res_inst_tac [("a","0")] not_emptyI 1);
-by (fast_tac (AC_cs addSIs [INT_I, RepFunI, lemma2_1] addSEs [RepFunE]) 1);
+by (fast_tac (!claset addSIs [INT_I, RepFunI, lemma2_1] addSEs [RepFunE]) 1);
 val lemma2 = result();
 
 goal thy "!!F. (UN f:F. P(f)) ~= 0 ==> F ~= 0";
-by (fast_tac (AC_cs addSEs [not_emptyE]) 1);
+by (fast_tac (!claset addSEs [not_emptyE]) 1);
 val lemma3 = result();
 
 goalw thy AC_defs "!!Z. AC19 ==> AC1";
 by (REPEAT (resolve_tac [allI,impI] 1));
 by (excluded_middle_tac "A=0" 1);
-by (fast_tac (AC_cs addSIs [empty_fun]) 2);
+by (fast_tac (!claset addSIs [empty_fun]) 2);
 by (eres_inst_tac [("x","{u_(a). a:A}")] allE 1);
 by (etac impE 1);
 by (etac RepRep_conj 1 THEN (assume_tac 1));
 by (rtac lemma1 1);
 by (dtac lemma2 1 THEN (assume_tac 1));
 by (dres_inst_tac [("P","%x. x~=0")] subst 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [lemma3 RS not_emptyE]) 1);
+by (fast_tac (!claset addSEs [lemma3 RS not_emptyE]) 1);
 qed "AC19_AC1";
 
 
--- a/src/ZF/AC/AC1_AC17.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC1_AC17.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -8,7 +8,7 @@
 goal thy "!!f. f : (PROD X:Pow(A) - {0}. X) ==> f : (Pow(A) - {0} -> A)";
 by (rtac Pi_type 1 THEN (assume_tac 1));
 by (dtac apply_type 1 THEN (assume_tac 1));
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val lemma1 = result();
 
 goalw thy AC_defs "!!Z. AC1 ==> AC17";
@@ -16,10 +16,10 @@
 by (rtac ballI 1);
 by (eres_inst_tac [("x","Pow(A)-{0}")] allE 1);
 by (etac impE 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (etac exE 1);
 by (rtac bexI 1);
 by (etac lemma1 2);
 by (rtac apply_type 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSDs [lemma1] addSEs [apply_type]) 1);
+by (fast_tac (!claset addSDs [lemma1] addSEs [apply_type]) 1);
 qed "AC1_AC17";
--- a/src/ZF/AC/AC1_WO2.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC1_WO2.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -13,12 +13,12 @@
 by (resolve_tac [bij_Least_HH_x RS bij_converse_bij] 1);
 by (rtac f_subsets_imp_UN_HH_eq_x 1);
 by (resolve_tac [lam_type RS apply_type] 1 THEN (assume_tac 2));
-by (fast_tac (AC_cs addSDs [equals0D, prem RS apply_type]) 1);
-by (fast_tac (AC_cs addSIs [prem RS Pi_weaken_type]) 1);
+by (fast_tac (!claset addSDs [equals0D, prem RS apply_type]) 1);
+by (fast_tac (!claset addSIs [prem RS Pi_weaken_type]) 1);
 val lemma1 = uresult() |> standard;
 
 goalw thy [AC1_def, WO2_def, eqpoll_def] "!!Z. AC1 ==> WO2";
 by (rtac allI 1);
 by (eres_inst_tac [("x","Pow(A)-{0}")] allE 1);
-by (fast_tac (AC_cs addSDs [lemma1] addSIs [Ord_Least]) 1);
+by (fast_tac (!claset addSDs [lemma1] addSIs [Ord_Least]) 1);
 qed "AC1_WO2";
--- a/src/ZF/AC/AC2_AC6.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC2_AC6.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -16,12 +16,12 @@
 
 goal thy "!!B. [| B:A; f:(PROD X:A. X); 0~:A |]  \
 \               ==> {f`B} <= B Int {f`C. C:A}";
-by (fast_tac (ZF_cs addSEs [apply_type]) 1);
+by (fast_tac (!claset addSEs [apply_type]) 1);
 val lemma1 = result();
 
 goalw thy [pairwise_disjoint_def]
         "!!A. [| pairwise_disjoint(A); B:A; C:A; D:B; D:C |] ==> f`B = f`C";
-by (fast_tac (ZF_cs addSEs [equals0D]) 1);
+by (fast_tac (!claset addSEs [equals0D]) 1);
 val lemma2 = result();
 
 goalw thy AC_defs "!!Z. AC1 ==> AC2"; 
@@ -30,7 +30,7 @@
 by (REPEAT (eresolve_tac [asm_rl,conjE,allE,exE,impE] 1));
 by (REPEAT (resolve_tac [exI,ballI,equalityI] 1));
 by (rtac lemma1 2 THEN (REPEAT (assume_tac 2)));
-by (fast_tac (AC_cs addSEs [RepFunE, lemma2] addEs [apply_type]) 1);
+by (fast_tac (!claset addSEs [RepFunE, lemma2] addEs [apply_type]) 1);
 qed "AC1_AC2";
 
 
@@ -39,22 +39,22 @@
 (* ********************************************************************** *)
 
 goal thy "!!A. 0~:A ==> 0 ~: {B*{B}. B:A}";
-by (fast_tac (AC_cs addSDs [sym RS (Sigma_empty_iff RS iffD1)]
+by (fast_tac (!claset addSDs [sym RS (Sigma_empty_iff RS iffD1)]
         addSEs [RepFunE, equals0D]) 1);
 val lemma1 = result();
 
 goal thy "!!A. [| X*{X} Int C = {y}; X:A |]  \
 \               ==> (THE y. X*{X} Int C = {y}): X*A";
 by (rtac subst_elem 1);
-by (fast_tac (ZF_cs addSIs [the_equality]
+by (fast_tac (!claset addSIs [the_equality]
                 addSEs [sym RS trans RS (singleton_eq_iff RS iffD1)]) 2);
-by (fast_tac (AC_cs addSEs [equalityE, make_elim singleton_subsetD]) 1);
+by (fast_tac (!claset addSEs [equalityE, make_elim singleton_subsetD]) 1);
 val lemma2 = result();
 
 goal thy "!!A. ALL D:{E*{E}. E:A}. EX y. D Int C = {y}  \
 \       ==> (lam x:A. fst(THE z. (x*{x} Int C = {z}))) :  \
 \               (PROD X:A. X) ";
-by (fast_tac (FOL_cs addSEs [lemma2]
+by (fast_tac (!claset addSEs [lemma2]
                 addSIs [lam_type, RepFunI, fst_type]
                 addSDs [bspec]) 1);
 val lemma3 = result();
@@ -62,8 +62,8 @@
 goalw thy (AC_defs@AC_aux_defs) "!!Z. AC2 ==> AC1";
 by (REPEAT (resolve_tac [allI, impI] 1));
 by (REPEAT (eresolve_tac [allE, impE] 1));
-by (fast_tac (AC_cs addSEs [lemma3]) 2);
-by (fast_tac (AC_cs addSIs [lemma1, equals0I]) 1);
+by (fast_tac (!claset addSEs [lemma3]) 2);
+by (fast_tac (!claset addSIs [lemma1, equals0I]) 1);
 qed "AC2_AC1";
 
 
@@ -72,13 +72,13 @@
 (* ********************************************************************** *)
 
 goal thy "!!R. 0 ~: {R``{x}. x:domain(R)}";
-by (fast_tac (AC_cs addEs [sym RS equals0D]) 1);
+by (fast_tac (!claset addEs [sym RS equals0D]) 1);
 val lemma = result();
 
 goalw thy AC_defs "!!Z. AC1 ==> AC4";
 by (REPEAT (resolve_tac [allI, impI] 1));
 by (REPEAT (eresolve_tac [allE, lemma RSN (2, impE), exE] 1));
-by (fast_tac (AC_cs addSIs [lam_type] addSEs [apply_type]) 1);
+by (fast_tac (!claset addSIs [lam_type] addSEs [apply_type]) 1);
 qed "AC1_AC4";
 
 
@@ -87,25 +87,25 @@
 (* ********************************************************************** *)
 
 goal thy "!!f. f:A->B ==> (UN z:A. {z}*f`z) <= A*Union(B)";
-by (fast_tac (ZF_cs addSDs [apply_type]) 1);
+by (fast_tac (!claset addSDs [apply_type]) 1);
 val lemma1 = result();
 
 goal thy "!!f. domain(UN z:A. {z}*f(z)) = {a:A. f(a)~=0}";
-by (fast_tac (ZF_cs addIs [equalityI]
+by (fast_tac (!claset addIs [equalityI]
                 addSEs [not_emptyE]
                 addSIs [not_emptyI]
                 addDs [range_type]) 1);
 val lemma2 = result();
 
 goal thy "!!f. x:A ==> (UN z:A. {z}*f(z))``{x} = f(x)";
-by (fast_tac (ZF_cs addIs [equalityI]) 1);
+by (fast_tac (!claset addIs [equalityI]) 1);
 val lemma3 = result();
 
 goalw thy AC_defs "!!Z. AC4 ==> AC3";
 by (REPEAT (resolve_tac [allI,ballI] 1));
 by (REPEAT (eresolve_tac [allE,impE] 1));
 by (etac lemma1 1);
-by (asm_full_simp_tac (AC_ss addsimps [lemma2, lemma3]
+by (asm_full_simp_tac (!simpset addsimps [lemma2, lemma3]
                         addcongs [Pi_cong]) 1);
 qed "AC4_AC3";
 
@@ -114,16 +114,16 @@
 (* ********************************************************************** *)
 
 goal thy "!!A. b~:A ==> (PROD x:{a:A. id(A)`a~=b}. id(A)`x) = (PROD x:A. x)";
-by (asm_full_simp_tac (AC_ss addsimps [id_def] addcongs [Pi_cong]) 1);
+by (asm_full_simp_tac (!simpset addsimps [id_def] addcongs [Pi_cong]) 1);
 by (res_inst_tac [("b","A")] subst_context 1);
-by (fast_tac (AC_cs addSIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 val lemma = result();
 
 goalw thy AC_defs "!!Z. AC3 ==> AC1";
 by (REPEAT (resolve_tac [allI, impI] 1));
 by (REPEAT (eresolve_tac [allE, ballE] 1));
-by (fast_tac (AC_cs addSIs [id_type]) 2);
-by (fast_tac (AC_cs addEs [lemma RS subst]) 1);
+by (fast_tac (!claset addSIs [id_type]) 2);
+by (fast_tac (!claset addEs [lemma RS subst]) 1);
 qed "AC3_AC1";
 
 (* ********************************************************************** *)
@@ -137,13 +137,13 @@
 by (etac exE 1);
 by (rtac bexI 1);
 by (rtac Pi_type 2 THEN (assume_tac 2));
-by (fast_tac (ZF_cs addSDs [apply_type]
+by (fast_tac (!claset addSDs [apply_type]
         addSEs [fun_is_rel RS converse_type RS subsetD RS SigmaD2]) 2);
 by (rtac ballI 1);
 by (rtac apply_equality 1 THEN (assume_tac 2));
 by (etac domainE 1);
 by (forward_tac [range_type] 1 THEN (assume_tac 1));
-by (fast_tac (ZF_cs addDs [apply_equality]) 1);
+by (fast_tac (!claset addDs [apply_equality]) 1);
 qed "AC4_AC5";
 
 
@@ -152,24 +152,24 @@
 (* ********************************************************************** *)
 
 goal thy "!!A. R <= A*B ==> (lam x:R. fst(x)) : R -> A";
-by (fast_tac (ZF_cs addSIs [lam_type, fst_type]) 1);
+by (fast_tac (!claset addSIs [lam_type, fst_type]) 1);
 val lemma1 = result();
 
 goalw thy [range_def] "!!A. R <= A*B ==> range(lam x:R. fst(x)) = domain(R)";
 by (rtac equalityI 1);
-by (fast_tac (AC_cs addSEs [lamE]
+by (fast_tac (!claset addSEs [lamE]
                 addEs [subst_elem]
                 addSDs [Pair_fst_snd_eq]) 1);
 by (rtac subsetI 1);
 by (etac domainE 1);
 by (rtac domainI 1);
-by (fast_tac (AC_cs addSEs [lamI RS subst_elem] addIs [fst_conv RS ssubst]) 1);
+by (fast_tac (!claset addSEs [lamI RS subst_elem] addIs [fst_conv RS ssubst]) 1);
 val lemma2 = result();
 
 goal thy "!!A. [| EX f: A->C. P(f,domain(f)); A=B |] ==>  EX f: B->C. P(f,B)";
 by (etac bexE 1);
 by (forward_tac [domain_of_fun] 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val lemma3 = result();
 
 goal thy "!!g. [| R <= A*B; g: C->R; ALL x:C. (lam z:R. fst(z))` (g`x) = x |] \
@@ -180,7 +180,7 @@
 by (rtac imageI 1);
 by (resolve_tac [subsetD RS Pair_fst_snd_eq RSN (2, subst_elem)] 1
         THEN (REPEAT (assume_tac 1)));
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 val lemma4 = result();
 
 goalw thy AC_defs "!!Z. AC5 ==> AC4";
@@ -188,7 +188,7 @@
 by (REPEAT (eresolve_tac [allE,ballE] 1));
 by (eresolve_tac [lemma1 RSN (2, notE)] 2 THEN (assume_tac 2));
 by (dresolve_tac [lemma2 RSN (2, lemma3)] 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [lemma4]) 1);
+by (fast_tac (!claset addSEs [lemma4]) 1);
 qed "AC5_AC4";
 
 
@@ -197,6 +197,6 @@
 (* ********************************************************************** *)
 
 goalw thy AC_defs "AC1 <-> AC6";
-by (fast_tac (ZF_cs addDs [equals0D] addSEs [not_emptyE]) 1);
+by (fast_tac (!claset addDs [equals0D] addSEs [not_emptyE]) 1);
 qed "AC1_iff_AC6";
 
--- a/src/ZF/AC/AC7_AC9.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC7_AC9.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -13,12 +13,12 @@
 (*  - Sigma_fun_space_eqpoll                                              *)
 (* ********************************************************************** *)
 
-goal ZF.thy "!!A. [| C~:A; B:A |] ==> B~=C";
-by (fast_tac ZF_cs 1);
+goal upair.thy "!!A. [| C~:A; B:A |] ==> B~=C";
+by (Fast_tac 1);
 val mem_not_eq_not_mem = result();
 
 goal thy "!!A. [| 0~:A; B:A |] ==> (nat->Union(A))*B ~= 0";
-by (fast_tac (ZF_cs addSDs [Sigma_empty_iff RS iffD1]
+by (fast_tac (!claset addSDs [Sigma_empty_iff RS iffD1]
                 addDs [fun_space_emptyD, mem_not_eq_not_mem]
                 addEs [equals0D]
                 addSIs [equals0I,UnionI]) 1);
@@ -33,7 +33,7 @@
 goal thy "!!A. [| ALL a:A. if(a=b, P(a), Q(a)) = if(a=b, R(a), S(a)); b:A   \
 \       |] ==> P(b)=R(b)";
 by (dtac bspec 1 THEN (assume_tac 1));
-by (asm_full_simp_tac ZF_ss 1);
+by (Asm_full_simp_tac 1);
 val if_eqE1 = result();
 
 goal thy "!!A. ALL a:A. if(a=b, P(a), Q(a)) = if(a=b, R(a), S(a))  \
@@ -41,11 +41,11 @@
 by (rtac ballI 1);
 by (rtac impI 1);
 by (dtac bspec 1 THEN (assume_tac 1));
-by (asm_full_simp_tac ZF_ss 1);
+by (Asm_full_simp_tac 1);
 val if_eqE2 = result();
 
 goal thy "!!A. [| (lam x:A. f(x))=(lam x:A. g(x)); a:A |] ==> f(a)=g(a)";
-by (fast_tac (ZF_cs addDs [subsetD]
+by (fast_tac (!claset addDs [subsetD]
                 addSIs [lamI]
                 addEs [equalityE, lamE]) 1);
 val lam_eqE = result();
@@ -55,29 +55,27 @@
 \               (lam n:nat. if(n=0, snd(g), fst(g)`(n #- 1))))  \
 \               : inj((nat->Union(A))*C, (nat->Union(A)) ) ";
 by (rtac CollectI 1);
-by (fast_tac (ZF_cs addSIs [lam_type,RepFunI,if_type,snd_type,apply_type,
+by (fast_tac (!claset addSIs [lam_type,RepFunI,if_type,snd_type,apply_type,
                                 fst_type,diff_type,nat_succI,nat_0I]) 1);
 by (REPEAT (resolve_tac [ballI, impI] 1));
-by (asm_full_simp_tac ZF_ss 1);
+by (Asm_full_simp_tac 1);
 by (REPEAT (etac SigmaE 1));
 by (REPEAT (hyp_subst_tac 1));
-by (asm_full_simp_tac ZF_ss 1);
+by (Asm_full_simp_tac 1);
 by (rtac conjI 1);
 by (dresolve_tac [nat_0I RSN (2, lam_eqE)] 2);
-by (asm_full_simp_tac AC_ss 2);
+by (Asm_full_simp_tac 2);
 by (rtac fun_extension 1 THEN  REPEAT (assume_tac 1));
 by (dresolve_tac [nat_succI RSN (2, lam_eqE)] 1 THEN (assume_tac 1));
-by (asm_full_simp_tac (AC_ss addsimps [succ_not_0 RS if_not_P]) 1);
-by (fast_tac (AC_cs addSEs [diff_succ_succ RS (diff_0 RSN (2, trans)) RS subst]
-                addSIs [nat_0I]) 1);
+by (asm_full_simp_tac (!simpset addsimps [succ_not_0 RS if_not_P]) 1);
 val lemma = result();
 
 goal thy "!!A. [| C:A; 0~:A |] ==> (nat->Union(A)) * C eqpoll (nat->Union(A))";
 by (rtac eqpollI 1);
-by (fast_tac (ZF_cs addSEs [prod_lepoll_self, not_sym RS not_emptyE,
+by (fast_tac (!claset addSEs [prod_lepoll_self, not_sym RS not_emptyE,
                 subst_elem] addEs [swap]) 2);
 by (rewtac lepoll_def);
-by (fast_tac (ZF_cs addSIs [lemma]) 1);
+by (fast_tac (!claset addSIs [lemma]) 1);
 val Sigma_fun_space_eqpoll = result();
 
 
@@ -86,7 +84,7 @@
 (* ********************************************************************** *)
 
 goalw thy AC_defs "!!Z. AC6 ==> AC7";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "AC6_AC7";
 
 (* ********************************************************************** *)
@@ -96,22 +94,22 @@
 (* ********************************************************************** *)
 
 goal thy "!!y. y: (PROD B:A. Y*B) ==> (lam B:A. snd(y`B)): (PROD B:A. B)";
-by (fast_tac (ZF_cs addSIs [lam_type, snd_type, apply_type]) 1);
+by (fast_tac (!claset addSIs [lam_type, snd_type, apply_type]) 1);
 val lemma1_1 = result();
 
 goal thy "!!A. y: (PROD B:{Y*C. C:A}. B)  \
 \               ==> (lam B:A. y`(Y*B)): (PROD B:A. Y*B)";
-by (fast_tac (ZF_cs addSIs [lam_type, apply_type]) 1);
+by (fast_tac (!claset addSIs [lam_type, apply_type]) 1);
 val lemma1_2 = result();
 
 goal thy "!!A. (PROD B:{(nat->Union(A))*C. C:A}. B) ~= 0  \
 \               ==> (PROD B:A. B) ~= 0";
-by (fast_tac (ZF_cs addSIs [equals0I,lemma1_1, lemma1_2]
+by (fast_tac (!claset addSIs [equals0I,lemma1_1, lemma1_2]
                 addSEs [equals0D]) 1);
 val lemma1 = result();
 
 goal thy "!!A. 0 ~: A ==> 0 ~: {(nat -> Union(A)) * C. C:A}";
-by (fast_tac (ZF_cs addEs [RepFunE,
+by (fast_tac (!claset addEs [RepFunE,
                 Sigma_fun_space_not0 RS not_sym RS notE]) 1);
 val lemma2 = result();
 
@@ -119,11 +117,11 @@
 by (rtac allI 1);
 by (rtac impI 1);
 by (excluded_middle_tac "A=0" 1);
-by (fast_tac (ZF_cs addSIs [not_emptyI, empty_fun]) 2);
+by (fast_tac (!claset addSIs [not_emptyI, empty_fun]) 2);
 by (rtac lemma1 1);
 by (etac allE 1);
 by (etac impE 1 THEN (assume_tac 2));
-by (fast_tac (AC_cs addSEs [RepFunE]
+by (fast_tac (!claset addSEs [RepFunE]
         addSIs [lemma2, all_eqpoll_imp_pair_eqpoll,
                 Sigma_fun_space_eqpoll]) 1);
 qed "AC7_AC6";
@@ -141,14 +139,14 @@
 by (dtac bspec 1 THEN (assume_tac 1));
 by (REPEAT (eresolve_tac [exE,conjE] 1));
 by (hyp_subst_tac 1);
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs addSEs [sym RS equals0D]) 1);
+by (Asm_full_simp_tac 1);
+by (fast_tac (!claset addSEs [sym RS equals0D]) 1);
 val lemma1 = result();
 
 goal thy "!!A. [| f: (PROD X:RepFun(A,p). X); D:A |]  \
 \               ==> (lam x:A. f`p(x))`D : p(D)";
 by (resolve_tac [beta RS ssubst] 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [apply_type]) 1);
+by (fast_tac (!claset addSEs [apply_type]) 1);
 val lemma2 = result();
 
 goalw thy AC_defs "!!Z. AC1 ==> AC8";
@@ -157,7 +155,7 @@
 by (rtac impI 1);
 by (etac impE 1);
 by (etac lemma1 1);
-by (fast_tac (AC_cs addSEs [lemma2]) 1);
+by (fast_tac (!claset addSEs [lemma2]) 1);
 qed "AC1_AC8";
 
 
@@ -169,11 +167,11 @@
 
 goal thy "!!A. ALL B1:A. ALL B2:A. B1 eqpoll B2 ==>  \
 \               ALL B:A*A. EX B1 B2. B=<B1,B2> & B1 eqpoll B2";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val lemma1 = result();
 
 goal thy "!!f. f:bij(fst(<a,b>),snd(<a,b>)) ==> f:bij(a,b)";
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 val lemma2 = result();
 
 goalw thy AC_defs "!!Z. AC8 ==> AC9";
@@ -182,7 +180,7 @@
 by (etac allE 1);
 by (etac impE 1);
 by (etac lemma1 1);
-by (fast_tac (AC_cs addSEs [lemma2]) 1);
+by (fast_tac (!claset addSEs [lemma2]) 1);
 qed "AC8_AC9";
 
 
@@ -197,12 +195,7 @@
 (* Rules nedded to prove lemma1 *)
 val snd_lepoll_SigmaI = prod_lepoll_self RS 
         ((prod_commute_eqpoll RS eqpoll_imp_lepoll) RSN (2,lepoll_trans));
-val lemma1_cs = FOL_cs addSEs [UnE, RepFunE]
-                addSIs [all_eqpoll_imp_pair_eqpoll, ballI,
-                        nat_cons_eqpoll RS eqpoll_trans]
-                addEs [Sigma_fun_space_not0 RS not_emptyE]
-                addIs [snd_lepoll_SigmaI, eqpoll_refl RSN 
-                        (2, prod_eqpoll_cong), Sigma_fun_space_eqpoll];
+
 
 goal thy "!!A. [| 0~:A; A~=0 |]  \
 \       ==> ALL B1: ({((nat->Union(A))*B)*nat. B:A}  \
@@ -210,7 +203,11 @@
 \       ALL B2: ({((nat->Union(A))*B)*nat. B:A}  \
 \               Un {cons(0,((nat->Union(A))*B)*nat). B:A}).  \
 \       B1 eqpoll B2";
-by (fast_tac lemma1_cs 1);
+by (fast_tac (!claset addSIs [all_eqpoll_imp_pair_eqpoll, ballI,
+                        nat_cons_eqpoll RS eqpoll_trans]
+                addEs [Sigma_fun_space_not0 RS not_emptyE]
+                addIs [snd_lepoll_SigmaI, eqpoll_refl RSN 
+                        (2, prod_eqpoll_cong), Sigma_fun_space_eqpoll]) 1);
 val lemma1 = result();
 
 goal thy "!!A. ALL B1:{(F*B)*N. B:A} Un {cons(0,(F*B)*N). B:A}.  \
@@ -222,7 +219,7 @@
 by (rtac snd_type 1);
 by (rtac fst_type 1);
 by (resolve_tac [consI1 RSN (2, apply_type)] 1);
-by (fast_tac (ZF_cs addSIs [fun_weaken_type, bij_is_fun]) 1);
+by (fast_tac (!claset addSIs [fun_weaken_type, bij_is_fun]) 1);
 val lemma2 = result();
 
 goalw thy AC_defs "!!Z. AC9 ==> AC1";
@@ -230,8 +227,8 @@
 by (rtac impI 1);
 by (etac allE 1);
 by (excluded_middle_tac "A=0" 1);
-by (fast_tac (FOL_cs addSIs [empty_fun]) 2);
 by (etac impE 1);
 by (rtac lemma1 1 THEN (REPEAT (assume_tac 1)));
-by (fast_tac (AC_cs addSEs [lemma2]) 1);
+by (fast_tac (!claset addSEs [lemma2]) 1);
+by (fast_tac (!claset addSIs [empty_fun]) 1);
 qed "AC9_AC1";
--- a/src/ZF/AC/AC_Equiv.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC_Equiv.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -16,9 +16,6 @@
  
 val AC_aux_defs = [pairwise_disjoint_def, sets_of_size_between_def];
  
-val AC_cs = OrdQuant_cs;
-val AC_ss = OrdQuant_ss;
- 
 (* ******************************************** *)
 
 (* Theorems analogous to ones presented in "ZF/Ordinal.ML" *)
@@ -27,12 +24,11 @@
 val [prem] = goalw Cardinal.thy [lepoll_def]
              "m:nat ==> ALL n: nat. m le n --> m lepoll n";
 by (nat_ind_tac "m" [prem] 1);
-by (fast_tac (ZF_cs addSIs [le_imp_subset RS id_subset_inj]) 1);
+by (fast_tac (!claset addSIs [le_imp_subset RS id_subset_inj]) 1);
 by (rtac ballI 1);
 by (eres_inst_tac [("n","n")] natE 1);
-by (asm_simp_tac (ZF_ss addsimps [inj_def, succI1 RS Pi_empty2]) 1);
-by (fast_tac (ZF_cs addSDs [le0D]) 1);
-by (fast_tac (ZF_cs addSIs [le_imp_subset RS id_subset_inj]) 1);
+by (asm_simp_tac (!simpset addsimps [inj_def, succI1 RS Pi_empty2]) 1);
+by (fast_tac (!claset addSIs [le_imp_subset RS id_subset_inj]) 1);
 val nat_le_imp_lepoll_lemma = result();
 
 (* used in : AC10-AC15.ML WO1-WO6.ML WO6WO1.ML*)
@@ -43,14 +39,14 @@
 (* ********************************************************************** *)
 
 goal thy "!!X. (A->X)=0 ==> X=0";
-by (fast_tac (ZF_cs addSIs [equals0I] addEs [lam_type RSN (2, equals0D)]) 1);
+by (fast_tac (!claset addSIs [equals0I] addEs [lam_type RSN (2, equals0D)]) 1);
 val fun_space_emptyD = result();
 
 (* used only in WO1_DC.ML *)
 (*Note simpler proof*)
-goal ZF.thy "!!A f g. [| ALL x:A. f`x=g`x; f:Df->Cf; g:Dg->Cg;  \
+goal upair.thy "!!A f g. [| ALL x:A. f`x=g`x; f:Df->Cf; g:Dg->Cg;  \
 \         A<=Df; A<=Dg |] ==> f``A=g``A";
-by (asm_simp_tac (ZF_ss addsimps [image_fun]) 1);
+by (asm_simp_tac (!simpset addsimps [image_fun]) 1);
 val images_eq = result();
 
 (* used in : AC10-AC15.ML AC16WO4.ML WO6WO1.ML *)
@@ -63,7 +59,7 @@
 by (res_inst_tac [("A2","A")] 
      (Diff_sing_lepoll RSN (2, subset_imp_lepoll RS lepoll_trans)) 1 
     THEN (REPEAT (assume_tac 2)));
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val Diff_lepoll = result();
 
 (* ********************************************************************** *)
@@ -77,12 +73,12 @@
 (* lemma for ordertype_Int *)
 goalw Cardinal.thy [rvimage_def] "rvimage(A,id(A),r) = r Int A*A";
 by (rtac equalityI 1);
-by (step_tac ZF_cs 1);
+by (Step_tac 1);
 by (dres_inst_tac [("P","%a. <id(A)`xb,a>:r")] (id_conv RS subst) 1
     THEN (assume_tac 1));
 by (dres_inst_tac [("P","%a. <a,ya>:r")] (id_conv RS subst) 1
     THEN (REPEAT (assume_tac 1)));
-by (fast_tac (ZF_cs addIs [id_conv RS ssubst]) 1);
+by (fast_tac (!claset addIs [id_conv RS ssubst]) 1);
 val rvimage_id = result();
 
 (* used only in Hartog.ML *)
@@ -96,42 +92,42 @@
 (* used only in AC16_lemmas.ML *)
 goalw CardinalArith.thy [InfCard_def]
         "!!i. [| ~Finite(i); Card(i) |] ==> InfCard(i)";
-by (asm_simp_tac (ZF_ss addsimps [Card_is_Ord RS nat_le_infinite_Ord]) 1);
+by (asm_simp_tac (!simpset addsimps [Card_is_Ord RS nat_le_infinite_Ord]) 1);
 val Inf_Card_is_InfCard = result();
 
 goal thy "(THE z. {x}={z}) = x";
-by (fast_tac (AC_cs addSIs [the_equality]
+by (fast_tac (!claset addSIs [the_equality]
                 addSEs [singleton_eq_iff RS iffD1 RS sym]) 1);
 val the_element = result();
 
 goal thy "(lam x:A. {x}) : bij(A, {{x}. x:A})";
 by (res_inst_tac [("d","%z. THE x. z={x}")] lam_bijective 1);
 by (TRYALL (eresolve_tac [RepFunI, RepFunE]));
-by (REPEAT (asm_full_simp_tac (AC_ss addsimps [the_element]) 1));
+by (REPEAT (asm_full_simp_tac (!simpset addsimps [the_element]) 1));
 val lam_sing_bij = result();
 
 val [major,minor] = goal thy 
         "[| f : Pi(A,B); (!!x. x:A ==> B(x)<=C(x)) |] ==> f : Pi(A,C)";
-by (fast_tac (AC_cs addSIs [major RS Pi_type, minor RS subsetD,
+by (fast_tac (!claset addSIs [major RS Pi_type, minor RS subsetD,
                 major RS apply_type]) 1);
 val Pi_weaken_type = result();
 
 val [major, minor] = goalw thy [inj_def]
         "[| f:inj(A, B); (!!a. a:A ==> f`a : C) |] ==> f:inj(A,C)";
-by (fast_tac (AC_cs addSEs [minor]
+by (fast_tac (!claset addSEs [minor]
         addSIs [major RS CollectD1 RS Pi_type, major RS CollectD2]) 1);
 val inj_strengthen_type = result();
 
 goal thy "A*B=0 <-> A=0 | B=0";
-by (fast_tac (ZF_cs addSIs [equals0I] addEs [equals0D]) 1);
+by (fast_tac (!claset addSIs [equals0I] addEs [equals0D]) 1);
 val Sigma_empty_iff = result();
 
 goalw thy [Finite_def] "!!n. n:nat ==> Finite(n)";
-by (fast_tac (AC_cs addSIs [eqpoll_refl]) 1);
+by (fast_tac (!claset addSIs [eqpoll_refl]) 1);
 val nat_into_Finite = result();
 
 goalw thy [Finite_def] "~Finite(nat)";
-by (fast_tac (AC_cs addSDs [eqpoll_imp_lepoll]
+by (fast_tac (!claset addSDs [eqpoll_imp_lepoll]
                 addIs [Ord_nat RSN (2, ltI) RS lt_not_lepoll RS notE]) 1);
 val nat_not_Finite = result();
 
@@ -144,8 +140,8 @@
 goal thy "!!x. [| EX! x. P(x); P(x); P(y) |] ==> x=y";
 by (etac ex1E 1);
 by (res_inst_tac [("b","xa")] (sym RSN (2, trans)) 1);
-by (fast_tac AC_cs 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
+by (Fast_tac 1);
 val ex1_two_eq = result();
 
 (* ********************************************************************** *)
@@ -155,16 +151,16 @@
 goalw thy [surj_def] "!!f. f : surj(A, B) ==> f``A = B";
 by (etac CollectE 1);
 by (resolve_tac [subset_refl RSN (2, image_fun) RS ssubst] 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [RepFunE, apply_type]
+by (fast_tac (!claset addSEs [RepFunE, apply_type]
                 addSIs [RepFunI] addIs [equalityI]) 1);
 val surj_image_eq = result();
 
 
 goal thy "!!y. succ(x) lepoll y ==> y ~= 0";
-by (fast_tac (ZF_cs addSDs [lepoll_0_is_0]) 1);
+by (fast_tac (!claset addSDs [lepoll_0_is_0]) 1);
 val succ_lepoll_imp_not_empty = result();
 
 goal thy "!!x. x eqpoll succ(n) ==> x ~= 0";
-by (fast_tac (AC_cs addSEs [eqpoll_sym RS eqpoll_0_is_0 RS succ_neq_0]) 1);
+by (fast_tac (!claset addSEs [eqpoll_sym RS eqpoll_0_is_0 RS succ_neq_0]) 1);
 val eqpoll_succ_imp_not_empty = result();
 
--- a/src/ZF/AC/AC_Equiv.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/AC_Equiv.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -12,7 +12,7 @@
 but slightly changed.
 *)
 
-AC_Equiv = CardinalArith + Univ + OrdQuant +
+AC_Equiv = CardinalArith + Univ + 
 
 consts
   
--- a/src/ZF/AC/Cardinal_aux.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/Cardinal_aux.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -15,15 +15,15 @@
 (* j=|A| *)
 goal Cardinal.thy
     "!!A. [| A lepoll i; Ord(i) |] ==> EX j. j le i & A eqpoll j";
-by (fast_tac (ZF_cs addIs [lepoll_cardinal_le, well_ord_Memrel,
-			    well_ord_cardinal_eqpoll RS eqpoll_sym]
-		    addDs [lepoll_well_ord]) 1);
+by (fast_tac (!claset addIs [lepoll_cardinal_le, well_ord_Memrel,
+                            well_ord_cardinal_eqpoll RS eqpoll_sym]
+                    addDs [lepoll_well_ord]) 1);
 qed "lepoll_imp_ex_le_eqpoll";
 
 (* j=|A| *)
 goalw Cardinal.thy [lesspoll_def]
     "!!A a. [| A lesspoll i; Ord(i) |] ==> EX j. j<i & A eqpoll j";
-by (fast_tac (ZF_cs addSDs [lepoll_imp_ex_le_eqpoll] addSEs [leE]) 1);
+by (fast_tac (!claset addSDs [lepoll_imp_ex_le_eqpoll] addSEs [leE]) 1);
 qed "lesspoll_imp_ex_lt_eqpoll";
 
 goalw thy [InfCard_def] "!!i. [| ~Finite(i); Ord(i) |] ==> InfCard(|i|)";
@@ -49,7 +49,7 @@
 by (rtac eqpollI 1);
 by (eresolve_tac [subset_imp_lepoll RSN (2, eqpoll_sym RS eqpoll_imp_lepoll
         RS  lepoll_trans)] 2);
-by (fast_tac AC_cs 2);
+by (Fast_tac 2);
 by (resolve_tac [Un_lepoll_sum RS lepoll_trans] 1);
 by (resolve_tac [lepoll_imp_sum_lepoll_prod RS lepoll_trans] 1);
 by (eresolve_tac [eqpoll_sym RSN (2, eqpoll_trans) RS eqpoll_imp_lepoll] 1
@@ -65,33 +65,33 @@
     THEN REPEAT (assume_tac 1));
 val Un_eqpoll_Inf_Ord = result();
 
-val ss = ZF_ss addsimps [inj_is_fun RS apply_type, left_inverse] 
+val ss = (!simpset) addsimps [inj_is_fun RS apply_type, left_inverse] 
                setloop (split_tac [expand_if] ORELSE' etac UnE);
 
-goal ZF.thy "{x, y} - {y} = {x} - {y}";
+goal upair.thy "{x, y} - {y} = {x} - {y}";
 by (fast_tac eq_cs 1);
 val double_Diff_sing = result();
 
-goal ZF.thy "if({y,z}-{z}=0, z, THE w. {y,z}-{z}={w}) = y";
+goal upair.thy "if({y,z}-{z}=0, z, THE w. {y,z}-{z}={w}) = y";
 by (split_tac [expand_if] 1);
-by (asm_full_simp_tac (ZF_ss addsimps [double_Diff_sing, Diff_eq_0_iff]) 1);
-by (fast_tac (ZF_cs addSIs [the_equality, equalityI, equals0I]
+by (asm_full_simp_tac (!simpset addsimps [double_Diff_sing, Diff_eq_0_iff]) 1);
+by (fast_tac (!claset addSIs [the_equality, equalityI, equals0I]
                 addEs [equalityE]) 1);
 val paired_bij_lemma = result();
 
 goal thy "(lam y:{{y,z}. y:x}. if(y-{z}=0, z, THE w. y-{z}={w}))  \
 \               : bij({{y,z}. y:x}, x)";
 by (res_inst_tac [("d","%a. {a,z}")] lam_bijective 1);
-by (TRYALL (fast_tac (AC_cs addSEs [RepFunE] addSIs [RepFunI] 
-                addss (AC_ss addsimps [paired_bij_lemma]))));
+by (TRYALL (fast_tac (!claset addSEs [RepFunE] addSIs [RepFunI] 
+                addss (!simpset addsimps [paired_bij_lemma]))));
 val paired_bij = result();
 
 goalw thy [eqpoll_def] "{{y,z}. y:x} eqpoll x";
-by (fast_tac (AC_cs addSIs [paired_bij]) 1);
+by (fast_tac (!claset addSIs [paired_bij]) 1);
 val paired_eqpoll = result();
 
 goal thy "!!A. EX B. B eqpoll A & B Int C = 0";
-by (fast_tac (AC_cs addSIs [paired_eqpoll, equals0I] addEs [mem_asym]) 1);
+by (fast_tac (!claset addSIs [paired_eqpoll, equals0I] addEs [mem_asym]) 1);
 val ex_eqpoll_disjoint = result();
 
 goal thy "!!A. [| A lepoll i; B lepoll i; ~Finite(i); Ord(i) |]  \
@@ -110,28 +110,28 @@
 by (eresolve_tac [Least_le RS leE] 1);
 by (etac Ord_in_Ord 1 THEN (assume_tac 1));
 by (etac ltE 1);
-by (fast_tac (AC_cs addDs [OrdmemD]) 1);
+by (fast_tac (!claset addDs [OrdmemD]) 1);
 by (etac subst_elem 1 THEN (assume_tac 1));
 val Least_in_Ord = result();
 
 goal thy "!!x. [| well_ord(x,r); y<=x; y lepoll succ(n); n:nat |]  \
 \       ==> y-{THE b. first(b,y,r)} lepoll n";
 by (res_inst_tac [("Q","y=0")] (excluded_middle RS disjE) 1);
-by (fast_tac (AC_cs addSIs [Diff_sing_lepoll, the_first_in]) 1);
+by (fast_tac (!claset addSIs [Diff_sing_lepoll, the_first_in]) 1);
 by (res_inst_tac [("b","y-{THE b. first(b, y, r)}")] subst 1);
 by (rtac empty_lepollI 2);
-by (fast_tac (AC_cs addSIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 val Diff_first_lepoll = result();
 
 goal thy "(UN x:X. P(x)) <= (UN x:X. P(x)-Q(x)) Un (UN x:X. Q(x))";
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val UN_subset_split = result();
 
 goalw thy [lepoll_def] "!!a. Ord(a) ==> (UN x:a. {P(x)}) lepoll a";
 by (res_inst_tac [("x","lam z:(UN x:a. {P(x)}). (LEAST i. P(i)=z)")] exI 1);
 by (res_inst_tac [("d","%z. P(z)")] lam_injective 1);
-by (fast_tac (AC_cs addSIs [Least_in_Ord]) 1);
-by (fast_tac (AC_cs addIs [LeastI] addSEs [Ord_in_Ord]) 1);
+by (fast_tac (!claset addSIs [Least_in_Ord]) 1);
+by (fast_tac (!claset addIs [LeastI] addSEs [Ord_in_Ord]) 1);
 val UN_sing_lepoll = result();
 
 goal thy "!!a T. [| well_ord(T, R); ~Finite(a); Ord(a); n:nat |] ==>  \
@@ -143,14 +143,14 @@
 by (rtac empty_lepollI 2);
 by (resolve_tac [equals0I RS sym] 1);
 by (REPEAT (eresolve_tac [UN_E, allE] 1));
-by (fast_tac (AC_cs addDs [lepoll_0_is_0 RS subst]) 1);
+by (fast_tac (!claset addDs [lepoll_0_is_0 RS subst]) 1);
 by (rtac allI 1);
 by (rtac impI 1);
 by (eres_inst_tac [("x","lam x:a. f`x - {THE b. first(b,f`x,R)}")] allE 1);
 by (etac impE 1);
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs addSIs [Diff_first_lepoll]) 1);
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
+by (fast_tac (!claset addSIs [Diff_first_lepoll]) 1);
+by (Asm_full_simp_tac 1);
 by (resolve_tac [UN_subset_split RS subset_imp_lepoll RS lepoll_trans] 1);
 by (rtac Un_lepoll_Inf_Ord 1 THEN (REPEAT_FIRST assume_tac));
 by (etac UN_sing_lepoll 1);
@@ -159,7 +159,7 @@
 goal thy "!!a f. [| ALL b:a. f`b lepoll n & f`b <= T; well_ord(T, R);  \
 \       ~Finite(a); Ord(a); n:nat |] ==> (UN b:a. f`b) lepoll a";
 by (eresolve_tac [UN_fun_lepoll_lemma RS allE] 1 THEN (REPEAT (assume_tac 1)));
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val UN_fun_lepoll = result();
 
 goal thy "!!a f. [| ALL b:a. F(b) lepoll n & F(b) <= T; well_ord(T, R);  \
@@ -167,13 +167,13 @@
 by (rtac impE 1 THEN (assume_tac 3));
 by (res_inst_tac [("f","lam b:a. F(b)")] (UN_fun_lepoll) 2 
         THEN (TRYALL assume_tac));
-by (simp_tac AC_ss 2);
-by (asm_full_simp_tac AC_ss 1);
+by (Simp_tac 2);
+by (Asm_full_simp_tac 1);
 val UN_lepoll = result();
 
 goal thy "!!a. Ord(a) ==> (UN b:a. F(b)) = (UN b:a. F(b) - (UN c:b. F(c)))";
 by (rtac equalityI 1);
-by (fast_tac AC_cs 2);
+by (Fast_tac 2);
 by (rtac subsetI 1);
 by (etac UN_E 1);
 by (rtac UN_I 1);
@@ -189,11 +189,11 @@
 goalw thy [eqpoll_def] "!!A B. A Int B = 0 ==> A Un B eqpoll A + B";
 by (res_inst_tac [("x","lam a:A Un B. if(a:A,Inl(a),Inr(a))")] exI 1);
 by (res_inst_tac [("d","%z. case(%x.x, %x.x, z)")] lam_bijective 1);
-by (fast_tac (AC_cs addSIs [if_type, InlI, InrI]) 1);
+by (fast_tac (!claset addSIs [if_type, InlI, InrI]) 1);
 by (TRYALL (etac sumE ));
 by (TRYALL (split_tac [expand_if]));
-by (TRYALL (asm_simp_tac sum_ss));
-by (fast_tac (AC_cs addDs [equals0D]) 1);
+by (TRYALL Asm_simp_tac);
+by (fast_tac (!claset addDs [equals0D]) 1);
 val disj_Un_eqpoll_sum = result();
 
 goalw thy [lepoll_def, eqpoll_def]
@@ -201,7 +201,7 @@
 by (etac exE 1);
 by (forward_tac [subset_refl RSN (2, restrict_bij)] 1);
 by (res_inst_tac [("x","f``a")] exI 1);
-by (fast_tac (AC_cs addSEs [inj_is_fun RS fun_is_rel RS image_subset]) 1);
+by (fast_tac (!claset addSEs [inj_is_fun RS fun_is_rel RS image_subset]) 1);
 val lepoll_imp_eqpoll_subset = result();
 
 (* ********************************************************************** *)
@@ -227,22 +227,22 @@
 by (dresolve_tac [[lepoll_Finite, lepoll_Finite] MRS Finite_Un] 2
         THEN (REPEAT (assume_tac 2)));
 by (dresolve_tac [subset_Un_Diff RS subset_imp_lepoll RS lepoll_Finite] 2);
-by (fast_tac (AC_cs
+by (fast_tac (!claset
         addDs [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_Finite]) 2);
 by (dresolve_tac [ Un_lepoll_Inf_Ord] 1
         THEN (REPEAT (assume_tac 1)));
-by (fast_tac (AC_cs addSEs [ltE, Ord_in_Ord]) 1);
+by (fast_tac (!claset addSEs [ltE, Ord_in_Ord]) 1);
 by (dresolve_tac [subset_Un_Diff RS subset_imp_lepoll RS lepoll_trans RSN
         (3, lt_Card_imp_lesspoll RS lepoll_lesspoll_lesspoll)] 1
         THEN (TRYALL assume_tac));
-by (fast_tac (AC_cs addSDs [lesspoll_def RS def_imp_iff RS iffD1]) 1);
+by (fast_tac (!claset addSDs [lesspoll_def RS def_imp_iff RS iffD1]) 1);
 val Diff_lesspoll_eqpoll_Card_lemma = result();
 
 goal thy "!!A. [| A eqpoll a; ~Finite(a); Card(a); B lesspoll a |]  \
 \       ==> A - B eqpoll a";
-by (rtac swap 1 THEN (fast_tac AC_cs 1));
+by (rtac swap 1 THEN (Fast_tac 1));
 by (rtac Diff_lesspoll_eqpoll_Card_lemma 1 THEN (REPEAT (assume_tac 1)));
-by (fast_tac (AC_cs addSIs [lesspoll_def RS def_imp_iff RS iffD2,
+by (fast_tac (!claset addSIs [lesspoll_def RS def_imp_iff RS iffD2,
         subset_imp_lepoll RS (eqpoll_imp_lepoll RSN (2, lepoll_trans))]) 1);
 val Diff_lesspoll_eqpoll_Card = result();
 
--- a/src/ZF/AC/Cardinal_aux.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/Cardinal_aux.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -1,3 +1,3 @@
 (*Dummy theory to document dependencies *)
 
-Cardinal_aux = AC_Equiv + first 
+Cardinal_aux = AC_Equiv
--- a/src/ZF/AC/DC.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/DC.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -33,16 +33,16 @@
 (*                                                                        *)
 (* ********************************************************************** *)
 
-goal thy "{z:XX*XX. domain(snd(z))=succ(domain(fst(z)))  \
-\       & restrict(snd(z), domain(fst(z))) = fst(z)} <= XX*XX";
-by (fast_tac AC_cs 1);
+goal thy "{<z1,z2>:XX*XX. domain(z2)=succ(domain(z1))  \
+\       & restrict(z2, domain(z1)) = z1} <= XX*XX";
+by (Fast_tac 1);
 val lemma1_1 = result();
 
 goal thy "!!X. ALL Y:Pow(X). Y lesspoll nat --> (EX x:X. <Y, x> : R)  \
-\       ==> {z: (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}) *  \
+\       ==> {<z1,z2>: (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}) *  \
 \               (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}).  \
-\               domain(snd(z))=succ(domain(fst(z)))  \
-\               & restrict(snd(z), domain(fst(z))) = fst(z)} ~= 0";
+\               domain(z2)=succ(domain(z1))  \
+\               & restrict(z2, domain(z1)) = z1} ~= 0";
 by (etac ballE 1);
 by (eresolve_tac [empty_subsetI RS PowI RSN (2, notE)] 2);
 by (eresolve_tac [nat_0I RS n_lesspoll_nat RSN (2, impE)] 1);
@@ -50,23 +50,23 @@
 by (res_inst_tac [("a","<0, {<0, x>}>")] not_emptyI 1);
 by (rtac CollectI 1);
 by (rtac SigmaI 1);
-by (fast_tac (AC_cs addSIs [nat_0I RS UN_I, empty_fun]) 1);
-by (fast_tac (AC_cs addSIs [nat_1I RS UN_I, singleton_fun RS Pi_type]
-        addss (AC_ss addsimps [[lepoll_refl, succI1] MRS lepoll_1_is_sing,
-        apply_singleton_eq, image_0])) 1);
-by (asm_full_simp_tac (AC_ss addsimps [domain_0, restrict_0, domain_cons,
-                [lepoll_refl, succI1] MRS lepoll_1_is_sing]) 1);
+by (fast_tac (!claset addSIs [nat_0I RS UN_I, empty_fun]) 1);
+br (nat_1I RS UN_I) 1;
+by (fast_tac (!claset addSIs [singleton_fun RS Pi_type]
+        addss (!simpset addsimps [singleton_0 RS sym])) 1);
+by (asm_full_simp_tac (!simpset addsimps [domain_0, domain_cons,
+                singleton_0]) 1);
 val lemma1_2 = result();
 
 goal thy "!!X. ALL Y:Pow(X). Y lesspoll nat --> (EX x:X. <Y, x> : R)  \
-\       ==> range({z: (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}) *  \
+\       ==> range({<z1,z2>: (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}) *  \
 \               (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}).  \
-\               domain(snd(z))=succ(domain(fst(z)))  \
-\               & restrict(snd(z), domain(fst(z))) = fst(z)})  \
-\       <=  domain({z: (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}) *  \
+\               domain(z2)=succ(domain(z1))  \
+\               & restrict(z2, domain(z1)) = z1})  \
+\       <=  domain({<z1,z2>: (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}) *  \
 \               (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}).  \
-\               domain(snd(z))=succ(domain(fst(z)))  \
-\               & restrict(snd(z), domain(fst(z))) = fst(z)})";
+\               domain(z2)=succ(domain(z1))  \
+\               & restrict(z2, domain(z1)) = z1})";
 by (rtac range_subset_domain 1);
 by (rtac subsetI 2);
 by (etac CollectD1 2);
@@ -81,92 +81,82 @@
 by (res_inst_tac [("x","cons(<n,x>, g)")] exI 1);
 by (rtac CollectI 1);
 by (rtac SigmaI 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (rtac UN_I 1);
 by (etac nat_succI 1);
 by (rtac CollectI 1);
 by (etac cons_fun_type2 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [succE] addss (AC_ss
+by (fast_tac (!claset addSEs [succE] addss (!simpset
         addsimps [cons_image_n, cons_val_n, cons_image_k, cons_val_k])) 1);
-by (asm_full_simp_tac (AC_ss
+by (asm_full_simp_tac (!simpset
         addsimps [domain_cons, domain_of_fun, succ_def, restrict_cons_eq]) 1);
 val lemma1_3 = result();
 
 goal thy "!!X. [| XX = (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R});  \
-\       RR = {z:XX*XX. domain(snd(z))=succ(domain(fst(z)))  \
-\       & restrict(snd(z), domain(fst(z))) = fst(z)};  \
+\       RR = {<z1,z2>:XX*XX. domain(z2)=succ(domain(z1))  \
+\       & restrict(z2, domain(z1)) = z1};  \
 \       ALL Y:Pow(X). Y lesspoll nat --> (EX x:X. <Y, x> : R)  \
 \       |] ==> RR <= XX*XX & RR ~= 0 & range(RR) <= domain(RR)";
-by (fast_tac (AC_cs addSIs [lemma1_1] addSEs [lemma1_2, lemma1_3]) 1);
+by (fast_tac (!claset addSIs [lemma1_1] addSEs [lemma1_2, lemma1_3]) 1);
 val lemma1 = result();
 
-goal thy "!!f. [| <f,g> : {z:XX*XX.  \
-\               domain(snd(z))=succ(domain(fst(z))) & Q(z)};  \
-\               XX = (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R}); f:k->X  \
-\               |] ==> g:succ(k)->X";
-by (etac CollectE 1);
-by (dtac SigmaD2 1);
-by (hyp_subst_tac 1);
-by (etac UN_E 1);
-by (etac CollectE 1);
-by (asm_full_simp_tac AC_ss 1);
-by (dtac domain_of_fun 1);
-by (etac conjE 1);
-by (forward_tac [domain_of_fun RS sym RS trans] 1 THEN (assume_tac 1));
-by (fast_tac AC_cs 1);
-val lemma2_1 = result();
-
-goal thy "!!X. [| XX = (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R});  \
+goal thy
+"!!X.[| XX = (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R});  \
 \       ALL n:nat. <f`n, f`succ(n)> :  \
-\       {z:XX*XX. domain(snd(z))=succ(domain(fst(z)))  \
-\       & restrict(snd(z), domain(fst(z))) = fst(z)};  \
+\       {<z1,z2>:XX*XX. domain(z2)=succ(domain(z1))  \
+\                       & restrict(z2, domain(z1)) = z1};  \
 \       f: nat -> XX; n:nat  \
-\       |] ==> EX k:nat. f`succ(n) : k -> X & n:k  \
-\       & <f`succ(n)``n, f`succ(n)`n> : R";
+\    |] ==> EX k:nat. f`succ(n) : k -> X & n:k  \
+\              & <f`succ(n)``n, f`succ(n)`n> : R";
 by (etac nat_induct 1);
 by (dresolve_tac [nat_1I RSN (2, apply_type)] 1);
 by (dresolve_tac [nat_0I RSN (2, bspec)] 1);
-by (asm_full_simp_tac AC_ss 1);
-by (etac UN_E 1);
-by (etac CollectE 1);
+by (Asm_full_simp_tac 1);
+by (Step_tac 1);
 by (rtac bexI 1 THEN (assume_tac 2));
-by (fast_tac (AC_cs addSEs [nat_0_le RS leE, ltD, ltD RSN (2, bspec)]
-        addEs [sym RS trans RS succ_neq_0, domain_of_fun]) 1);
-by (etac bexE 1);
+by (best_tac (!claset addIs [ltD]
+		      addSEs [nat_0_le RS leE]
+        addEs [sym RS trans RS succ_neq_0, domain_of_fun]
+	addss (!simpset)) 1);
+(** LEVEL 7 **)
 by (dresolve_tac [nat_succI RSN (2, bspec)] 1 THEN (assume_tac 1));
-by (etac conjE 1);
-by (dtac lemma2_1 1 THEN REPEAT (assume_tac 1));
-by (hyp_subst_tac 1);
+by (subgoal_tac "f ` succ(succ(x)) : succ(k)->X" 1);
 by (dresolve_tac [nat_succI RS nat_succI RSN (2, apply_type)] 1
         THEN (assume_tac 1));
-by (etac UN_E 1);
-by (etac CollectE 1);
-by (dresolve_tac [[domain_of_fun RS sym, domain_of_fun] MRS trans] 1
-        THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [nat_succI, nat_into_Ord RS succ_in_succ]
+by (Full_simp_tac 1);
+by (Step_tac 1);
+by (forw_inst_tac [("a","succ(k)")] (domain_of_fun RS sym RS trans) 1 THEN
+    (assume_tac 1));
+by (forw_inst_tac [("a","xa")] (domain_of_fun RS sym RS trans) 1 THEN
+    (assume_tac 1));
+by (fast_tac (!claset addSEs [nat_succI, nat_into_Ord RS succ_in_succ]
         addSDs [nat_into_Ord RS succ_in_succ RSN (2, bspec)]) 1);
+by (dtac domain_of_fun 1);
+by (Full_simp_tac 1);
+by (deepen_tac (!claset addDs [domain_of_fun RS sym RS trans]) 0 1);
 val lemma2 = result();
 
-goal thy "!!X. [| XX = (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R});  \
+goal thy 
+"!!X.[| XX = (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R});  \
 \       ALL n:nat. <f`n, f`succ(n)> :  \
-\       {z:XX*XX. domain(snd(z))=succ(domain(fst(z)))  \
-\       & restrict(snd(z), domain(fst(z))) = fst(z)};  \
+\       {<z1,z2>:XX*XX. domain(z2)=succ(domain(z1))  \
+\       & restrict(z2, domain(z1)) = z1};  \
 \       f: nat -> XX; n:nat \
-\       |] ==>  ALL x:n. f`succ(n)`x = f`succ(x)`x";
+\    |] ==>  ALL x:n. f`succ(n)`x = f`succ(x)`x";
 by (etac nat_induct 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (rtac ballI 1);
 by (etac succE 1);
 by (rtac restrict_eq_imp_val_eq 1);
 by (dresolve_tac [nat_succI RSN (2, bspec)] 1 THEN (assume_tac 1));
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 by (dtac lemma2 1 THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSDs [domain_of_fun]) 1);
+by (fast_tac (!claset addSDs [domain_of_fun]) 1);
 by (dres_inst_tac [("x","xa")] bspec 1 THEN (assume_tac 1));
 by (eresolve_tac [sym RS trans RS sym] 1);
 by (resolve_tac [restrict_eq_imp_val_eq RS sym] 1);
 by (dresolve_tac [nat_succI RSN (2, bspec)] 1 THEN (assume_tac 1));
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 by (dtac lemma2 1 THEN REPEAT (assume_tac 1));
 by (fast_tac (FOL_cs addSDs [domain_of_fun]
         addSEs [bexE, nat_into_Ord RSN (2, OrdmemD) RS subsetD]) 1);
@@ -174,31 +164,31 @@
 
 goal thy "!!n. ALL x:n. f`succ(n)`x = f`succ(x)`x   \
 \       ==> {f`succ(x)`x. x:n} = {f`succ(n)`x. x:n}";
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 val lemma3_2 = result();
 
 goal thy "!!X. [| XX = (UN n:nat. {f:n->X. ALL k:n. <f``k, f`k> : R});  \
 \       ALL n:nat. <f`n, f`succ(n)> :  \
-\       {z:XX*XX. domain(snd(z))=succ(domain(fst(z)))  \
-\       & restrict(snd(z), domain(fst(z))) = fst(z)};  \
+\       {<z1,z2>:XX*XX. domain(z2)=succ(domain(z1))  \
+\       & restrict(z2, domain(z1)) = z1};  \
 \       f: nat -> XX; n:nat  \
 \       |] ==> (lam x:nat. f`succ(x)`x) `` n = f`succ(n)``n";
 by (etac natE 1);
-by (asm_full_simp_tac (AC_ss addsimps [image_0]) 1);
+by (asm_full_simp_tac (!simpset addsimps [image_0]) 1);
 by (resolve_tac [image_lam RS ssubst] 1);
-by (fast_tac (AC_cs addSEs [[nat_succI, Ord_nat] MRS OrdmemD]) 1);
+by (fast_tac (!claset addSEs [[nat_succI, Ord_nat] MRS OrdmemD]) 1);
 by (resolve_tac [lemma3_1 RS lemma3_2 RS ssubst] 1
         THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSEs [nat_succI]) 1);
+by (fast_tac (!claset addSEs [nat_succI]) 1);
 by (dresolve_tac [nat_succI RSN (4, lemma2)] 1
         THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSEs [nat_into_Ord RSN (2, OrdmemD) RSN 
-			    (2, image_fun RS sym)]) 1);
+by (fast_tac (!claset addSEs [nat_into_Ord RSN (2, OrdmemD) RSN 
+                            (2, image_fun RS sym)]) 1);
 val lemma3 = result();
 
 goal thy "!!f. [| f:A->B; B<=C |] ==> f:A->C";
 by (rtac Pi_type 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [apply_type]) 1);
+by (fast_tac (!claset addSEs [apply_type]) 1);
 val fun_type_gen = result();
 
 goalw thy [DC_def, DC0_def] "!!Z. DC0 ==> DC(nat)";
@@ -208,16 +198,16 @@
         THEN (assume_tac 1));
 by (etac bexE 1);
 by (res_inst_tac [("x","lam n:nat. f`succ(n)`n")] bexI 1);
-by (fast_tac (AC_cs addSIs [lam_type] addSDs [refl RS lemma2]
+by (fast_tac (!claset addSIs [lam_type] addSDs [refl RS lemma2]
                 addSEs [fun_type_gen, apply_type]) 2);
 by (rtac oallI 1);
 by (forward_tac [ltD RSN (3, refl RS lemma2)] 1
         THEN assume_tac 2);
-by (fast_tac (AC_cs addSEs [fun_type_gen]) 1);
+by (fast_tac (!claset addSEs [fun_type_gen]) 1);
 by (eresolve_tac [ltD RSN (3, refl RS lemma3) RS ssubst] 1
         THEN assume_tac 2);
-by (fast_tac (AC_cs addSEs [fun_type_gen]) 1);
-by (fast_tac (AC_cs addss AC_ss) 1);
+by (fast_tac (!claset addSEs [fun_type_gen]) 1);
+by (fast_tac (!claset addss (!simpset)) 1);
 qed "DC0_DC_nat";
 
 (* ********************************************************************** *)
@@ -231,11 +221,11 @@
 (*                                                                        *)
 (*      XX = (UN n:nat.                                                   *)
 (*      {f:succ(n)->domain(R). ALL k:n. <f`k, f`succ(k)> : R})            *)
-(*      RR = {z:Fin(XX)*XX. (domain(snd(z))=succ(UN f:fst(z). domain(f))  *)
-(*              & (ALL f:fst(z). restrict(snd(z), domain(f)) = f)) |      *)
-(*              (~ (EX g:XX. domain(g)=succ(UN f:fst(z). domain(f))       *)
-(*              & (ALL f:fst(z). restrict(g, domain(f)) = f)) &           *)
-(*              snd(z)={<0,x>})}                                          *)
+(*      RR = {<z1,z2>:Fin(XX)*XX. (domain(z2)=succ(UN f:z1. domain(f))  *)
+(*              & (ALL f:z1. restrict(z2, domain(f)) = f)) |      *)
+(*              (~ (EX g:XX. domain(g)=succ(UN f:z1. domain(f))       *)
+(*              & (ALL f:z1. restrict(g, domain(f)) = f)) &           *)
+(*              z2={<0,x>})}                                          *)
 (*                                                                        *)
 (* Then XX and RR satisfy the hypotheses of DC(omega).                    *)
 (* So applying DC:                                                        *)
@@ -252,14 +242,14 @@
 
 goalw thy [lesspoll_def, Finite_def]
         "!!A. A lesspoll nat ==> Finite(A)";
-by (fast_tac (AC_cs addSDs [ltD, lepoll_imp_ex_le_eqpoll]
+by (fast_tac (!claset addSDs [ltD, lepoll_imp_ex_le_eqpoll]
         addSIs [Ord_nat]) 1);
 val lesspoll_nat_is_Finite = result();
 
 goal thy "!!n. n:nat ==> ALL A. (A eqpoll n & A <= X) --> A : Fin(X)";
 by (etac nat_induct 1);
 by (rtac allI 1);
-by (fast_tac (AC_cs addSIs [Fin.emptyI]
+by (fast_tac (!claset addSIs [Fin.emptyI]
         addSDs [eqpoll_imp_lepoll RS lepoll_0_is_0]) 1);
 by (rtac allI 1);
 by (rtac impI 1);
@@ -269,10 +259,10 @@
 by (forward_tac [Diff_sing_eqpoll] 1 THEN (assume_tac 1));
 by (etac allE 1);
 by (etac impE 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (dtac subsetD 1 THEN (assume_tac 1));
 by (dresolve_tac [Fin.consI] 1 THEN (assume_tac 1));
-by (asm_full_simp_tac (AC_ss addsimps [cons_Diff]) 1);
+by (asm_full_simp_tac (!simpset addsimps [cons_Diff]) 1);
 val Finite_Fin_lemma = result();
 
 goalw thy [Finite_def] "!!A. [| Finite(A); A <= X |] ==> A : Fin(X)";
@@ -281,60 +271,62 @@
 by (etac allE 1);
 by (etac impE 1);
 by (assume_tac 2);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val Finite_Fin = result();
 
-goal thy "!!x. x: X ==> {<0,x>}: (UN n:nat.  \
-\               {f:succ(n)->X. ALL k:n. <f`k, f`succ(k)> : R})";
-by (fast_tac (AC_cs addSIs [nat_0I RS UN_I, singleton_fun RS Pi_type]
-        addss (AC_ss addsimps [[lepoll_refl, succI1] MRS lepoll_1_is_sing,
-        apply_singleton_eq])) 1);
+goal thy "!!x. x: X  \
+\ ==> {<0,x>}: (UN n:nat. {f:succ(n)->X. ALL k:n. <f`k, f`succ(k)> : R})";
+br (nat_0I RS UN_I) 1;
+by (fast_tac (!claset addSIs [singleton_fun RS Pi_type]
+        addss (!simpset addsimps [singleton_0 RS sym])) 1);
 val singleton_in_funs = result();
 
 goal thy
         "!!X. [| XX = (UN n:nat.  \
 \               {f:succ(n)->domain(R). ALL k:n. <f`k, f`succ(k)> : R});  \
-\       RR = {z:Fin(XX)*XX. (domain(snd(z))=succ(UN f:fst(z). domain(f))  \
-\       & (ALL f:fst(z). restrict(snd(z), domain(f)) = f)) |  \
-\       (~ (EX g:XX. domain(g)=succ(UN f:fst(z). domain(f))  \
-\       & (ALL f:fst(z). restrict(g, domain(f)) = f)) & snd(z)={<0,x>})};  \
+\       RR = {<z1,z2>:Fin(XX)*XX. (domain(z2)=succ(UN f:z1. domain(f))  \
+\       & (ALL f:z1. restrict(z2, domain(f)) = f)) |  \
+\       (~ (EX g:XX. domain(g)=succ(UN f:z1. domain(f))  \
+\       & (ALL f:z1. restrict(g, domain(f)) = f)) & z2={<0,x>})};  \
 \       range(R) <= domain(R); x:domain(R)  \
 \       |] ==> RR <= Pow(XX)*XX &  \
 \       (ALL Y:Pow(XX). Y lesspoll nat --> (EX x:XX. <Y,x>:RR))";
 by (rtac conjI 1);
-by (deepen_tac (ZF_cs addSEs [FinD RS PowI]) 0 1);
+by (deepen_tac (!claset addSEs [FinD RS PowI]) 0 1);
 by (rtac ballI 1);
 by (rtac impI 1);
 by (dresolve_tac [[lesspoll_nat_is_Finite, PowD] MRS Finite_Fin] 1
         THEN (assume_tac 1));
 by (excluded_middle_tac "EX g:XX. domain(g)=succ(UN f:Y. domain(f))  \
 \       & (ALL f:Y. restrict(g, domain(f)) = f)" 1);
-by (fast_tac (AC_cs addss AC_ss) 2);
-by (fast_tac (FOL_cs addSEs [CollectE, singleton_in_funs]
-                addSIs [SigmaI] addIs [bexI] addss AC_ss) 1);
+by (fast_tac (!claset addss (!simpset)) 2);
+by (step_tac (!claset delrules [domainE]) 1);
+by(swap_res_tac [bexI] 1 THEN etac singleton_in_funs 2);
+by (asm_simp_tac (!simpset addsimps [nat_0I  RSN (2, bexI), 
+				     cons_fun_type2, empty_fun]) 1);
 val lemma1 = result();
 
 goal thy "!!f. [| f:nat->X; n:nat |] ==>  \
 \       (UN x:f``succ(n). P(x)) =  P(f`n) Un (UN x:f``n. P(x))";
-by (asm_full_simp_tac (AC_ss
+by (asm_full_simp_tac (!simpset
         addsimps [Ord_nat RSN (2, OrdmemD) RSN (2, image_fun),
         [nat_succI, Ord_nat] MRS OrdmemD RSN (2, image_fun)]) 1);
 val UN_image_succ_eq = result();
 
 goal thy "!!f. [| (UN x:f``n. P(x)) = y; P(f`n) = succ(y);  \
 \       f:nat -> X; n:nat |] ==> (UN x:f``succ(n). P(x)) = succ(y)";
-by (asm_full_simp_tac (AC_ss addsimps [UN_image_succ_eq]) 1);
-by (fast_tac (AC_cs addSIs [equalityI]) 1);
+by (asm_full_simp_tac (!simpset addsimps [UN_image_succ_eq]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 val UN_image_succ_eq_succ = result();
 
-goal thy "!!f. [| f: (UN n:nat. {g:succ(n) -> D. P(g, n)});  \
+goal thy "!!f. [| f:succ(n) -> D;  n:nat;  \
 \       domain(f)=succ(x); x=y |] ==> f`y : D";
-by (fast_tac (AC_cs addEs [apply_type]
+by (fast_tac (!claset addEs [apply_type]
         addSDs [[sym, domain_of_fun] MRS trans]) 1);
-val apply_UN_type = result();
+val apply_domain_type = result();
 
 goal thy "!!f. [| f : nat -> X; n:nat |] ==> f``succ(n) = cons(f`n, f``n)";
-by (asm_full_simp_tac (AC_ss
+by (asm_full_simp_tac (!simpset
         addsimps [nat_succI, Ord_nat RSN (2, OrdmemD), image_fun]) 1);
 val image_fun_succ = result();
 
@@ -343,7 +335,7 @@
 \       u=k; n:nat  \
 \       |] ==> f`n : succ(k) -> domain(R)";
 by (dtac apply_type 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addEs [UN_E, domain_eq_imp_fun_type]) 1);
+by (fast_tac (!claset addEs [UN_E, domain_eq_imp_fun_type]) 1);
 val f_n_type = result();
 
 goal thy "!!f. [| f : nat -> (UN n:nat.  \
@@ -354,8 +346,7 @@
 by (etac UN_E 1);
 by (etac CollectE 1);
 by (dresolve_tac [domain_of_fun RS sym RS trans] 1 THEN (assume_tac 1));
-by (dtac succ_eqD 1);
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 val f_n_pairs_in_R = result();
 
 goalw thy [restrict_def]
@@ -363,9 +354,9 @@
 \       |] ==> restrict(cons(<n, y>, f), domain(x)) = x";
 by (eresolve_tac [sym RS trans RS sym] 1);
 by (rtac fun_extension 1);
-by (fast_tac (AC_cs addSIs [lam_type]) 1);
-by (fast_tac (AC_cs addSIs [lam_type]) 1);
-by (asm_full_simp_tac (AC_ss addsimps [subsetD RS cons_val_k]) 1);
+by (fast_tac (!claset addSIs [lam_type]) 1);
+by (fast_tac (!claset addSIs [lam_type]) 1);
+by (asm_full_simp_tac (!simpset addsimps [subsetD RS cons_val_k]) 1);
 val restrict_cons_eq_restrict = result();
 
 goal thy "!!f. [| ALL x:f``n. restrict(f`n, domain(x))=x;  \
@@ -375,45 +366,50 @@
 \       (UN x:f``n. domain(x)) <= n |] \
 \       ==> ALL x:f``succ(n). restrict(cons(<succ(n),y>, f`n), domain(x))=x";
 by (rtac ballI 1);
-by (asm_full_simp_tac (AC_ss addsimps [image_fun_succ]) 1);
+by (asm_full_simp_tac (!simpset addsimps [image_fun_succ]) 1);
 by (dtac f_n_type 1 THEN REPEAT (ares_tac [refl] 1));
-by (etac consE 1);
-by (asm_full_simp_tac (AC_ss addsimps [domain_of_fun, restrict_cons_eq]) 1);
+by (etac disjE 1);
+by (asm_full_simp_tac (!simpset addsimps [domain_of_fun, restrict_cons_eq]) 1);
 by (dtac bspec 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [restrict_cons_eq_restrict]) 1);
+by (fast_tac (!claset addSEs [restrict_cons_eq_restrict]) 1);
 val all_in_image_restrict_eq = result();
 
-goal thy "!!X. [| ALL b<nat. <f``b, f`b> :  \
-\       {z:Fin(XX)*XX. (domain(snd(z))=succ(UN f:fst(z). domain(f))  \
-\       & (ALL f:fst(z). restrict(snd(z), domain(f)) = f)) |  \
-\       (~ (EX g:XX. domain(g)=succ(UN f:fst(z). domain(f))  \
-\       & (ALL f:fst(z). restrict(g, domain(f)) = f)) & snd(z)={<0,x>})};  \
+goal thy
+"!!X.[| ALL b<nat. <f``b, f`b> :  \
+\       {<z1,z2>:Fin(XX)*XX. (domain(z2)=succ(UN f:z1. domain(f))  \
+\                & (ALL f:z1. restrict(z2, domain(f)) = f)) |  \
+\                  (~ (EX g:XX. domain(g)=succ(UN f:z1. domain(f))  \
+\                & (ALL f:z1. restrict(g, domain(f)) = f)) & z2={<0,x>})};  \
 \       XX = (UN n:nat.  \
 \       {f:succ(n)->domain(R). ALL k:n. <f`k, f`succ(k)> : R});  \
 \       f: nat -> XX; range(R) <= domain(R); x:domain(R)  \
-\       |] ==> ALL b<nat. <f``b, f`b> :  \
-\       {z:Fin(XX)*XX. (domain(snd(z))=succ(UN f:fst(z). domain(f))  \
-\       & (UN f:fst(z). domain(f)) = b  \
-\       & (ALL f:fst(z). restrict(snd(z), domain(f)) = f))}";
+\    |] ==> ALL b<nat. <f``b, f`b> :  \
+\           {<z1,z2>:Fin(XX)*XX. (domain(z2)=succ(UN f:z1. domain(f))  \
+\           & (UN f:z1. domain(f)) = b  \
+\           & (ALL f:z1. restrict(z2, domain(f)) = f))}";
 by (rtac oallI 1);
 by (dtac ltD 1);
 by (etac nat_induct 1);
 by (dresolve_tac [[nat_0I, Ord_nat] MRS ltI RSN (2, ospec)] 1);
 by (fast_tac (FOL_cs addss
-        (ZF_ss addsimps [image_0, singleton_fun RS domain_of_fun,
-        [lepoll_refl, succI1] MRS lepoll_1_is_sing, singleton_in_funs])) 1);
+	      (!simpset addsimps [image_0, singleton_fun RS domain_of_fun,
+				  singleton_0, singleton_in_funs])) 1);
+(*induction step*) (** LEVEL 5 **)
+by (Full_simp_tac 1);
 by (dresolve_tac [[nat_succI, Ord_nat] MRS ltI RSN (2, ospec)] 1
         THEN (assume_tac 1));
-by (REPEAT (eresolve_tac [conjE, CollectE, disjE] 1));
+by (REPEAT (eresolve_tac [conjE, disjE] 1));
 by (fast_tac (FOL_cs addSEs [trans, subst_context]
-        addSIs [UN_image_succ_eq_succ] addss AC_ss) 1);
+                     addSIs [UN_image_succ_eq_succ] addss (!simpset)) 1);
 by (etac conjE 1);
 by (etac notE 1);
-by (asm_full_simp_tac (AC_ss addsimps [UN_image_succ_eq_succ]) 1);
-by (etac conjE 1);
-by (dtac apply_UN_type 1 THEN REPEAT (assume_tac 1));
+by (asm_full_simp_tac (!simpset addsimps [UN_image_succ_eq_succ]) 1);
+(** LEVEL 12 **)
+by (REPEAT (eresolve_tac [conjE, bexE] 1));
+by (dtac apply_domain_type 1 THEN REPEAT (assume_tac 1));
 by (etac domainE 1);
 by (etac domainE 1);
+
 by (forward_tac [f_n_type] 1 THEN REPEAT (assume_tac 1));
 by (res_inst_tac [("x","cons(<succ(xa), ya>, f`xa)")] bexI 1);
 by (fast_tac (FOL_cs
@@ -426,52 +422,53 @@
         THEN REPEAT (assume_tac 1));
 by (rtac ballI 1);
 by (etac succE 1);
-by (asm_full_simp_tac (AC_ss addsimps [cons_val_n, cons_val_k]) 1);
-by (dresolve_tac [domain_of_fun RSN (2, f_n_pairs_in_R)] 1
-        THEN REPEAT (assume_tac 1));
-by (dtac bspec 1 THEN (assume_tac 1));
-by (asm_full_simp_tac (AC_ss
-        addsimps [nat_into_Ord RS succ_in_succ, succI2, cons_val_k]) 1);
+(** LEVEL 25 **)
+by (dresolve_tac [domain_of_fun RSN (2, f_n_pairs_in_R)] 2
+        THEN REPEAT (assume_tac 2));
+by (dtac bspec 2 THEN (assume_tac 2));
+by (asm_full_simp_tac (!simpset
+        addsimps [nat_into_Ord RS succ_in_succ, succI2, cons_val_k]) 2);
+by (asm_full_simp_tac (!simpset addsimps [cons_val_n, cons_val_k]) 1);
 val simplify_recursion = result();
 
+ 
 goal thy "!!X. [| XX = (UN n:nat.  \
 \               {f:succ(n)->domain(R). ALL k:n. <f`k, f`succ(k)> : R});  \
 \       ALL b<nat. <f``b, f`b> :  \
-\       {z:Fin(XX)*XX. (domain(snd(z))=succ(UN f:fst(z). domain(f))  \
-\       & (UN f:fst(z). domain(f)) = b  \
-\       & (ALL f:fst(z). restrict(snd(z), domain(f)) = f))};  \
+\       {<z1,z2>:Fin(XX)*XX. (domain(z2)=succ(UN f:z1. domain(f))  \
+\       & (UN f:z1. domain(f)) = b  \
+\       & (ALL f:z1. restrict(z2, domain(f)) = f))};  \
 \       f: nat -> XX; range(R) <= domain(R); x:domain(R); n:nat  \
 \       |] ==> f`n : succ(n) -> domain(R)  \
 \       & (ALL i:n. <f`n`i, f`n`succ(i)>:R)";
 by (dtac ospec 1);
 by (eresolve_tac [Ord_nat RSN (2, ltI)] 1);
 by (etac CollectE 1);
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 by (rtac conjI 1);
-by (fast_tac (AC_cs
+by (fast_tac (!claset
         addSEs [trans RS domain_eq_imp_fun_type, subst_context]) 1);
-by (fast_tac (FOL_cs
-        addSEs [conjE, f_n_pairs_in_R, trans, subst_context]) 1);
+by (fast_tac (FOL_cs addSEs [conjE, f_n_pairs_in_R, trans, subst_context]) 1);
 val lemma2 = result();
 
 goal thy "!!n. [| XX = (UN n:nat.  \
 \       {f:succ(n)->domain(R). ALL k:n. <f`k, f`succ(k)> : R});  \
 \       ALL b<nat. <f``b, f`b> :  \
-\       {z:Fin(XX)*XX. (domain(snd(z))=succ(UN f:fst(z). domain(f))  \
-\       & (UN f:fst(z). domain(f)) = b  \
-\       & (ALL f:fst(z). restrict(snd(z), domain(f)) = f))};  \
+\       {<z1,z2>:Fin(XX)*XX. (domain(z2)=succ(UN f:z1. domain(f))  \
+\       & (UN f:z1. domain(f)) = b  \
+\       & (ALL f:z1. restrict(z2, domain(f)) = f))};  \
 \       f : nat -> XX; n:nat; range(R) <= domain(R); x:domain(R)  \
 \       |] ==> f`n`n = f`succ(n)`n";
 by (forward_tac [lemma2 RS conjunct1 RS domain_of_fun] 1
         THEN REPEAT (assume_tac 1));
 by (dresolve_tac [[nat_succI, Ord_nat] MRS ltI RSN (2, ospec)] 1
         THEN (assume_tac 1));
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 by (REPEAT (etac conjE 1));
 by (etac ballE 1);
 by (eresolve_tac [restrict_eq_imp_val_eq RS sym] 1);
-by (fast_tac (AC_cs addSEs [ssubst]) 1);
-by (asm_full_simp_tac (AC_ss
+by (fast_tac (!claset addSEs [ssubst]) 1);
+by (asm_full_simp_tac (!simpset
         addsimps [[nat_succI, Ord_nat] MRS OrdmemD RSN (2, image_fun)]) 1);
 val lemma3 = result();
 
@@ -491,7 +488,7 @@
 by (forward_tac [refl RS (nat_succI RSN (6, lemma2)) RS conjunct2] 1
         THEN REPEAT (assume_tac 1));
 by (dresolve_tac [refl RS lemma3] 1 THEN REPEAT (assume_tac 1));
-by (asm_full_simp_tac (AC_ss addsimps [nat_succI]) 1);
+by (asm_full_simp_tac (!simpset addsimps [nat_succI]) 1);
 qed "DC_nat_DC0";
 
 (* ********************************************************************** *)
@@ -500,7 +497,7 @@
 
 goalw thy [lesspoll_def]
         "!!A. [| ~ A lesspoll B; C lesspoll B |] ==> A - C ~= 0";
-by (fast_tac (AC_cs addSDs [Diff_eq_0_iff RS iffD1 RS subset_imp_lepoll]
+by (fast_tac (!claset addSDs [Diff_eq_0_iff RS iffD1 RS subset_imp_lepoll]
         addSIs [eqpollI] addEs [notE] addSEs [eqpollE, lepoll_trans]) 1);
 val lemma1 = result();
 
@@ -512,27 +509,27 @@
 by (resolve_tac [Ord_a RS Ord_in_Ord RS Ord_linear_lt] 1
         THEN (assume_tac 1));
 by (eres_inst_tac [("j","x")] (Ord_a RS Ord_in_Ord) 1);
-by (REPEAT (fast_tac (AC_cs addDs [not_eq, not_eq RS not_sym]) 1));
+by (REPEAT (fast_tac (!claset addDs [not_eq, not_eq RS not_sym]) 1));
 val fun_Ord_inj = result();
 
 goal thy "!!a. [| f:X->Y; A<=X; a:A |] ==> f`a : f``A";
-by (fast_tac (AC_cs addSEs [image_fun RS ssubst]) 1);
+by (fast_tac (!claset addSEs [image_fun RS ssubst]) 1);
 val value_in_image = result();
 
 goalw thy [DC_def, WO3_def]
         "!!Z. ALL K. Card(K) --> DC(K) ==> WO3";
 by (rtac allI 1);
 by (excluded_middle_tac "A lesspoll Hartog(A)" 1);
-by (fast_tac (AC_cs addSDs [lesspoll_imp_ex_lt_eqpoll]
+by (fast_tac (!claset addSDs [lesspoll_imp_ex_lt_eqpoll]
         addSIs [Ord_Hartog, leI RS le_imp_subset]) 2);
 by (REPEAT (eresolve_tac [allE, impE] 1));
 by (rtac Card_Hartog 1);
 by (eres_inst_tac [("x","A")] allE 1);
-by (eres_inst_tac [("x","{z:Pow(A)*A . fst(z)  \
-\               lesspoll Hartog(A) & snd(z) ~: fst(z)}")] allE 1);
-by (asm_full_simp_tac AC_ss 1);
+by (eres_inst_tac [("x","{<z1,z2>:Pow(A)*A . z1  \
+\               lesspoll Hartog(A) & z2 ~: z1}")] allE 1);
+by (Asm_full_simp_tac 1);
 by (etac impE 1);
-by (fast_tac (AC_cs addEs [lemma1 RS not_emptyE]) 1);
+by (fast_tac (!claset addEs [lemma1 RS not_emptyE]) 1);
 by (etac bexE 1);
 by (resolve_tac [exI RS (lepoll_def RS (def_imp_iff RS iffD2))
         RS (HartogI RS notE)] 1);
@@ -540,7 +537,7 @@
 by (dresolve_tac [Ord_Hartog RSN (2, OrdmemD) RSN (2,
         ltD RSN (3, value_in_image))] 1 
         THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSDs [Ord_Hartog RSN (2, ltI) RSN (2, ospec)]
+by (fast_tac (!claset addSDs [Ord_Hartog RSN (2, ltI) RSN (2, ospec)]
         addEs [subst]) 1);
 qed "DC_WO3";
 
@@ -551,21 +548,21 @@
 goal thy
         "!!a. [| Ord(a); b:a |] ==> (lam x:a. P(x))``b = (lam x:b. P(x))``b";
 by (rtac images_eq 1);
-by (REPEAT (fast_tac (AC_cs addSEs [RepFunI, OrdmemD]
+by (REPEAT (fast_tac (!claset addSEs [RepFunI, OrdmemD]
         addSIs [lam_type]) 2));
 by (rtac ballI 1);
 by (dresolve_tac [OrdmemD RS subsetD] 1
         THEN REPEAT (assume_tac 1));
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 val lam_images_eq = result();
 
 goalw thy [lesspoll_def] "!!K. [| Card(K); b:K |] ==> b lesspoll K";
-by (asm_full_simp_tac (AC_ss addsimps [Card_iff_initial]) 1);
-by (fast_tac (AC_cs addSIs [le_imp_lepoll, ltI, leI]) 1);
+by (asm_full_simp_tac (!simpset addsimps [Card_iff_initial]) 1);
+by (fast_tac (!claset addSIs [le_imp_lepoll, ltI, leI]) 1);
 val in_Card_imp_lesspoll = result();
 
 goal thy "(lam b:a. P(b)) : a -> {P(b). b:a}";
-by (fast_tac (AC_cs addSIs [lam_type, RepFunI]) 1);
+by (fast_tac (!claset addSIs [lam_type, RepFunI]) 1);
 val lam_type_RepFun = result();
 
 goal thy "!!Z. [| ALL Y:Pow(X). Y lesspoll a --> (EX x:X. <Y, x> : R);  \
@@ -584,13 +581,13 @@
 by (rtac impI 1);
 by (resolve_tac [ff_def RS def_transrec RS ssubst] 1);
 by (etac the_first_in 1);
-by (fast_tac AC_cs 1);
-by (asm_full_simp_tac (AC_ss
+by (Fast_tac 1);
+by (asm_full_simp_tac (!simpset
         addsimps [[lam_type_RepFun, subset_refl] MRS image_fun]) 1);
 by (etac lemma_ 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [RepFunE, impE, notE]
+by (fast_tac (!claset addSEs [RepFunE, impE, notE]
                 addEs [Card_is_Ord RSN (2, OrdmemD) RS subsetD]) 1);
-by (fast_tac (AC_cs addSEs [[in_Card_imp_lesspoll, RepFun_lepoll]
+by (fast_tac (!claset addSEs [[in_Card_imp_lesspoll, RepFun_lepoll]
                 MRS lepoll_lesspoll_lesspoll]) 1);
 val lemma = result();
 
@@ -601,8 +598,8 @@
 by (res_inst_tac [("x","lam b:K. ff(b, X, Ra, R)")] bexI 1);
 by (rtac lam_type 2);
 by (resolve_tac [lemma RS CollectD1] 2 THEN REPEAT (assume_tac 2));
-by (asm_full_simp_tac (AC_ss
+by (asm_full_simp_tac (!simpset
         addsimps [[Card_is_Ord, ltD] MRS lam_images_eq]) 1);
-by (fast_tac (AC_cs addSEs [ltE, lemma RS CollectD2]) 1);
+by (fast_tac (!claset addSEs [ltE, lemma RS CollectD2]) 1);
 qed" WO1_DC_Card";
 
--- a/src/ZF/AC/DC.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/DC.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -5,7 +5,7 @@
 Theory file for the proofs concernind the Axiom of Dependent Choice
 *)
 
-DC  =  AC_Equiv + Hartog + first + Cardinal_aux + "DC_lemmas" + 
+DC  =  AC_Equiv + Hartog + Cardinal_aux + "DC_lemmas" + 
 
 consts
 
--- a/src/ZF/AC/DC_lemmas.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/DC_lemmas.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -10,7 +10,7 @@
         "Ord(a) ==> {P(b). b:a} lepoll a";
 by (res_inst_tac [("x","lam z:RepFun(a,P). LEAST i. z=P(i)")] exI 1);
 by (res_inst_tac [("d","%z. P(z)")] (sym RSN (2, lam_injective)) 1);
-by (fast_tac (AC_cs addSEs [RepFunE] addSIs [Least_in_Ord, prem]) 1);
+by (fast_tac (!claset addSEs [RepFunE] addSIs [Least_in_Ord, prem]) 1);
 by (REPEAT (eresolve_tac [RepFunE, LeastI, prem RS Ord_in_Ord] 1));
 val RepFun_lepoll = result();
 
@@ -29,73 +29,49 @@
         "!!f. [| f:X->Y; Ord(X) |] ==> f``X lepoll X";
 by (res_inst_tac [("x","lam x:f``X. LEAST y. f`y = x")] exI 1);
 by (res_inst_tac [("d","%z. f`z")] lam_injective 1);
-by (fast_tac (AC_cs addSIs [Least_in_Ord, apply_equality]) 1);
-by (fast_tac (AC_cs addSEs [Ord_in_Ord] addSIs [LeastI, apply_equality]) 1);
+by (fast_tac (!claset addSIs [Least_in_Ord, apply_equality]) 1);
+by (fast_tac (!claset addSEs [Ord_in_Ord] addSIs [LeastI, apply_equality]) 1);
 val image_Ord_lepoll = result();
 
-val apply_singleton_eq = [singletonI, singleton_fun] MRS apply_equality;
-
-goal thy "restrict(f, 0) = 0";
-by (resolve_tac [singleton_iff RS iffD1] 1);
-by (resolve_tac [Pi_empty1 RS subst] 1);
-by (fast_tac (AC_cs addSIs [restrict_type]) 1);
-val restrict_0 = result();
-
 val [major, minor] = goal thy
         "[| (!!g. g:X ==> EX u. <g,u>:R); R<=X*X  \
 \       |] ==> range(R) <= domain(R)";
 by (rtac subsetI 1);
 by (etac rangeE 1);
 by (dresolve_tac [minor RS subsetD RS SigmaD2 RS major] 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val range_subset_domain = result();
 
 val prems = goal thy "!!k. k:n ==> k~=n";
-by (fast_tac (AC_cs addSEs [mem_irrefl]) 1);
+by (fast_tac (!claset addSEs [mem_irrefl]) 1);
 val mem_not_eq = result();
 
-goal thy "!!a. [| a:B; A<=B |] ==> cons(a, A) <= B";
-by (fast_tac AC_cs 1);
-val cons_subset = result();
-
-goal thy "!!g. g:n->X ==> cons(<n,x>, g) : succ(n) -> cons(x, X)";
-by (resolve_tac [Pi_iff_old RS iffD2] 1);
-by (rtac conjI 1);
-by (fast_tac (AC_cs addSIs [cons_subset, succI1]
-        addEs [fun_is_rel RS subset_trans RS subsetD, succI2]) 1);
-by (rtac ballI 1);
-by (etac succE 1);
-by (fast_tac (AC_cs addDs [domain_of_fun, domainI] addSEs [mem_irrefl]) 1);
-by (fast_tac (AC_cs addDs [fun_unique_Pair] addSEs [mem_irrefl]) 1);
+goalw thy [succ_def] "!!g. g:n->X ==> cons(<n,x>, g) : succ(n) -> cons(x, X)";
+by (fast_tac (!claset addSIs [fun_extend] addSEs [mem_irrefl]) 1);
 val cons_fun_type = result();
 
-goal thy "!!x. x:X ==> cons(x, X) = X";
-by (fast_tac (AC_cs addSIs [equalityI]) 1);
-val cons_eq_self = result();
-
-val [g_type, x_in] = goal thy "[| g:n->X; x:X |] ==> cons(<n,x>, g) : succ(n) -> X";
-by (resolve_tac [x_in RS cons_eq_self RS subst] 1);
-by (resolve_tac [g_type RS cons_fun_type] 1);
+goal thy "!!g. [| g:n->X; x:X |] ==> cons(<n,x>, g) : succ(n) -> X";
+by (etac (cons_absorb RS subst) 1 THEN etac cons_fun_type 1);
 val cons_fun_type2 = result();
 
 goal thy "!!n. n: nat ==> cons(<n,x>, g)``n = g``n";
-by (fast_tac (AC_cs addSIs [equalityI] addSEs [mem_irrefl]) 1);
+by (fast_tac (!claset addSIs [equalityI] addSEs [mem_irrefl]) 1);
 val cons_image_n = result();
 
 goal thy "!!n. g:n->X ==> cons(<n,x>, g)`n = x";
-by (fast_tac (AC_cs addSIs [apply_equality] addSEs [cons_fun_type]) 1);
+by (fast_tac (!claset addSIs [apply_equality] addSEs [cons_fun_type]) 1);
 val cons_val_n = result();
 
 goal thy "!!k. k : n ==> cons(<n,x>, g)``k = g``k";
-by (fast_tac (AC_cs addSIs [equalityI] addEs [mem_asym]) 1);
+by (fast_tac (!claset addSIs [equalityI] addEs [mem_asym]) 1);
 val cons_image_k = result();
 
 goal thy "!!k. [| k:n; g:n->X |] ==> cons(<n,x>, g)`k = g`k";
-by (fast_tac (AC_cs addSIs [apply_equality, consI2] addSEs [cons_fun_type, apply_Pair]) 1);
+by (fast_tac (!claset addSIs [apply_equality, consI2] addSEs [cons_fun_type, apply_Pair]) 1);
 val cons_val_k = result();
 
 goal thy "!!f. domain(f)=x ==> domain(cons(<x,y>, f)) = succ(x)";
-by (asm_full_simp_tac (AC_ss addsimps [domain_cons, succ_def]) 1);
+by (asm_full_simp_tac (!simpset addsimps [domain_cons, succ_def]) 1);
 val domain_cons_eq_succ = result();
 
 goalw thy [restrict_def] "!!g. g:n->X ==> restrict(cons(<n,x>, g), n)=g";
@@ -104,12 +80,12 @@
 by (eresolve_tac [cons_fun_type RS apply_type] 1);
 by (etac succI2 1);
 by (assume_tac 1);
-by (asm_full_simp_tac (AC_ss addsimps [cons_val_k]) 1);
+by (asm_full_simp_tac (!simpset addsimps [cons_val_k]) 1);
 val restrict_cons_eq = result();
 
 goal thy "!!k. [| Ord(k); i:k |] ==> succ(i) : succ(k)";
 by (resolve_tac [Ord_linear RS disjE] 1 THEN (assume_tac 3));
-by (REPEAT (fast_tac (AC_cs addSIs [Ord_succ]
+by (REPEAT (fast_tac (!claset addSIs [Ord_succ]
         addEs [Ord_in_Ord, mem_irrefl, mem_asym]
         addSDs [succ_inject]) 1));
 val succ_in_succ = result();
@@ -117,26 +93,15 @@
 goalw thy [restrict_def]
         "!!f. [| restrict(f, domain(g)) = g; x: domain(g) |] ==> f`x = g`x";
 by (etac subst 1);
-by (asm_full_simp_tac AC_ss 1);
+by (Asm_full_simp_tac 1);
 val restrict_eq_imp_val_eq = result();
 
-goal thy "!!a. succ(a) = succ(b) ==> a = b";
-by (etac equalityE 1);
-by (rtac equalityI 1);
-by (fast_tac (AC_cs addSEs [mem_irrefl] addEs [mem_asym]) 1);
-by (fast_tac (AC_cs addSEs [mem_irrefl] addEs [mem_asym]) 1);
-val succ_eqD = result();
-
-goal thy "!!n. n:nat ==> 0:succ(n)";
-by (fast_tac (AC_cs addSDs [[Ord_0, nat_into_Ord] MRS Ord_linear]) 1);
-val nat_0_in_succ = result();
-
 goal thy "!!f. [| domain(f)=A; f:B->C |] ==> f:A->C";
 by (forward_tac [domain_of_fun] 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val domain_eq_imp_fun_type = result();
 
 goal thy "!!R. [| R <= A * B; R ~= 0 |] ==> EX x. x:domain(R)";
-by (fast_tac (AC_cs addSEs [not_emptyE]) 1);
+by (fast_tac (!claset addSEs [not_emptyE]) 1);
 val ex_in_domain = result();
 
--- a/src/ZF/AC/DC_lemmas.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/DC_lemmas.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -1,4 +1,4 @@
 (*Dummy theory to document dependencies *)
 
-DC_lemmas = AC_Equiv + first
+DC_lemmas = AC_Equiv
 
--- a/src/ZF/AC/HH.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/HH.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -18,30 +18,30 @@
 \       (let z = x - (UN b:a. HH(f,x,b))  \
 \       in  if(f`z:Pow(z)-{0}, f`z, {x}))";
 by (resolve_tac [HH_def RS def_transrec RS trans] 1);
-by (simp_tac ZF_ss 1);
+by (Simp_tac 1);
 val HH_def_satisfies_eq = result();
 
 goal thy "HH(f,x,a) : Pow(x)-{0} | HH(f,x,a)={x}";
 by (resolve_tac [HH_def_satisfies_eq RS ssubst] 1);
-by (simp_tac (ZF_ss addsimps [Let_def, Diff_subset RS PowI] 
+by (simp_tac (!simpset addsimps [Let_def, Diff_subset RS PowI] 
                     setloop split_tac [expand_if]) 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val HH_values = result();
 
 goal thy "!!A. B<=A ==> X-(UN a:A. P(a)) = X-(UN a:A-B. P(a))-(UN b:B. P(b))";
-by (fast_tac (AC_cs addSIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 val subset_imp_Diff_eq = result();
 
 goal thy "!!c. [| c:a-b; b<a |] ==> c=b | b<c & c<a";
 by (etac ltE 1);
 by (dres_inst_tac [("x","c")] Ord_linear 1);
-by (fast_tac (AC_cs addEs [Ord_in_Ord]) 1);
-by (fast_tac (AC_cs addSIs [ltI] addIs [Ord_in_Ord]) 1);
+by (fast_tac (!claset addEs [Ord_in_Ord]) 1);
+by (fast_tac (!claset addSIs [ltI] addIs [Ord_in_Ord]) 1);
 val Ord_DiffE = result();
 
 val prems = goal thy "(!!y. y:A ==> P(y) = {x}) ==> x - (UN y:A. P(y)) = x";
-by (asm_full_simp_tac (AC_ss addsimps prems) 1);
-by (fast_tac (AC_cs addSIs [equalityI] addSDs [prem]
+by (asm_full_simp_tac (!simpset addsimps prems) 1);
+by (fast_tac (!claset addSIs [equalityI] addSDs [prem]
                 addSEs [RepFunE, mem_irrefl]) 1);
 val Diff_UN_eq_self = result();
 
@@ -62,23 +62,23 @@
 by (res_inst_tac [("t","%z. z-?X")] subst_context 1);
 by (rtac Diff_UN_eq_self 1);
 by (dtac Ord_DiffE 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addEs [ltE]) 1);
+by (fast_tac (!claset addEs [ltE]) 1);
 val HH_is_x_gt_too = result();
 
 goal thy "!!a. [| HH(f,x,a) : Pow(x)-{0}; b<a |] ==> HH(f,x,b) : Pow(x)-{0}";
 by (resolve_tac [HH_values RS disjE] 1 THEN (assume_tac 1));
 by (dtac HH_is_x_gt_too 1 THEN (assume_tac 1));
 by (dtac subst 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [mem_irrefl]) 1);
+by (fast_tac (!claset addSEs [mem_irrefl]) 1);
 val HH_subset_x_lt_too = result();
 
 goal thy "!!a. HH(f,x,a) : Pow(x)-{0}   \
 \               ==> HH(f,x,a) : Pow(x - (UN b:a. HH(f,x,b)))-{0}";
 by (dresolve_tac [HH_def_satisfies_eq RS subst] 1);
 by (resolve_tac [HH_def_satisfies_eq RS ssubst] 1);
-by (asm_full_simp_tac (AC_ss addsimps [Let_def, Diff_subset RS PowI]) 1);
+by (asm_full_simp_tac (!simpset addsimps [Let_def, Diff_subset RS PowI]) 1);
 by (dresolve_tac [expand_if RS iffD1] 1);
-by (simp_tac (ZF_ss setloop split_tac [expand_if] ) 1);
+by (simp_tac (!simpset setloop split_tac [expand_if] ) 1);
 by (fast_tac (subset_cs addSEs [mem_irrefl]) 1);
 val HH_subset_x_imp_subset_Diff_UN = result();
 
@@ -86,7 +86,7 @@
 by (forw_inst_tac [("P","%y. y: Pow(x)-{0}")] subst 1 THEN (assume_tac 1));
 by (dres_inst_tac [("a","w")] HH_subset_x_imp_subset_Diff_UN 1);
 by (dtac subst_elem 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSIs [singleton_iff RS iffD2, equals0I]) 1);
+by (fast_tac (!claset addSIs [singleton_iff RS iffD2, equals0I]) 1);
 val HH_eq_arg_lt = result();
 
 goal thy "!!x. [| HH(f,x,v)=HH(f,x,w); HH(f,x,w): Pow(x)-{0};  \
@@ -101,7 +101,7 @@
 goalw thy [lepoll_def, inj_def]
         "!!i. [| HH(f, x, i) : Pow(x)-{0}; Ord(i) |] ==> i lepoll Pow(x)-{0}";
 by (res_inst_tac [("x","lam j:i. HH(f, x, j)")] exI 1);
-by (asm_simp_tac AC_ss 1);
+by (Asm_simp_tac 1);
 by (fast_tac (FOL_cs addSEs [HH_eq_imp_arg_eq, Ord_in_Ord, HH_subset_x_lt_too]
                 addSIs [lam_type, ballI, ltI] addIs [bexI]) 1);
 val HH_subset_x_imp_lepoll = result();
@@ -113,7 +113,7 @@
 val HH_Hartog_is_x = result();
 
 goal thy "HH(f, x, LEAST i. HH(f, x, i) = {x}) = {x}";
-by (fast_tac (AC_cs addSIs [Ord_Hartog, HH_Hartog_is_x, LeastI]) 1);
+by (fast_tac (!claset addSIs [Ord_Hartog, HH_Hartog_is_x, LeastI]) 1);
 val HH_Least_eq_x = result();
 
 goal thy "!!a. a:(LEAST i. HH(f,x,i)={x}) ==> HH(f,x,a) : Pow(x)-{0}";
@@ -130,8 +130,8 @@
 goalw thy [inj_def]
         "(lam a:(LEAST i. HH(f,x,i)={x}). HH(f,x,a)) :  \
 \               inj(LEAST i. HH(f,x,i)={x}, Pow(x)-{0})";
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs  addSIs [lam_type] addDs [less_Least_subset_x]
+by (Asm_full_simp_tac 1);
+by (fast_tac (!claset  addSIs [lam_type] addDs [less_Least_subset_x]
                 addSEs [HH_eq_imp_arg_eq, Ord_Least RS Ord_in_Ord]) 1);
 val lam_Least_HH_inj_Pow = result();
 
@@ -139,65 +139,52 @@
 \               ==> (lam a:(LEAST i. HH(f,x,i)={x}). HH(f,x,a))  \
 \                       : inj(LEAST i. HH(f,x,i)={x}, {{y}. y:x})";
 by (resolve_tac [lam_Least_HH_inj_Pow RS inj_strengthen_type] 1);
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs addSEs [RepFun_eqI]) 1);
+by (Asm_full_simp_tac 1);
 val lam_Least_HH_inj = result();
 
-goal thy "!!A. [| A={a}; b:A |] ==> b=a";
-by (fast_tac AC_cs 1);
-val elem_of_sing_eq = result();
-
 goalw thy [surj_def]
         "!!x. [| x - (UN a:A. F(a)) = 0;  \
 \               ALL a:A. EX z:x. F(a) = {z} |]  \
 \               ==> (lam a:A. F(a)) : surj(A, {{y}. y:x})";
-by (asm_full_simp_tac (AC_ss addsimps [Diff_eq_0_iff]) 1);
-by (rtac conjI 1);
-by (fast_tac (AC_cs addSIs [lam_type] addSEs [RepFun_eqI]) 1);
-by (rtac ballI 1);
-by (etac RepFunE 1);
-by (dtac subsetD 1 THEN (assume_tac 1));
-by (etac UN_E 1);
-by (dtac bspec 1 THEN (assume_tac 1));
-by (etac bexE 1);
-by (rtac bexI 1 THEN (assume_tac 2));
-by (forward_tac [elem_of_sing_eq] 1 THEN (assume_tac 1));
-by (fast_tac AC_cs 1);
+by (asm_full_simp_tac (!simpset addsimps [lam_type, Diff_eq_0_iff]) 1);
+by (Step_tac 1);
+by (set_mp_tac 1);
+by (deepen_tac (eq_cs addSIs [bexI] addSEs [equalityE]) 4 1);
 val lam_surj_sing = result();
 
 goal thy "!!x. y:Pow(x)-{0} ==> x ~= 0";
-by (fast_tac (AC_cs addSIs [equals0I, singletonI RS subst_elem]
+by (fast_tac (!claset addSIs [equals0I, singletonI RS subst_elem]
                 addSDs [equals0D]) 1);
 val not_emptyI2 = result();
 
 goal thy "!!f. f`(x - (UN j:i. HH(f,x,j))): Pow(x - (UN j:i. HH(f,x,j)))-{0}  \
 \       ==> HH(f, x, i) : Pow(x) - {0}";
 by (resolve_tac [HH_def_satisfies_eq RS ssubst] 1);
-by (asm_full_simp_tac (AC_ss addsimps [Let_def, Diff_subset RS PowI,
+by (asm_full_simp_tac (!simpset addsimps [Let_def, Diff_subset RS PowI,
                 not_emptyI2 RS if_P]) 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val f_subset_imp_HH_subset = result();
 
 val [prem] = goal thy "(!!z. z:Pow(x)-{0} ==> f`z : Pow(z)-{0}) ==>  \
 \       x - (UN j: (LEAST i. HH(f,x,i)={x}). HH(f,x,j)) = 0";
 by (excluded_middle_tac "?P : {0}" 1);
-by (fast_tac AC_cs 2);
+by (Fast_tac 2);
 by (dresolve_tac [Diff_subset RS PowI RS DiffI RS prem RS
                 f_subset_imp_HH_subset] 1);
-by (fast_tac (AC_cs addSDs [HH_Least_eq_x RS sym RSN (2, subst_elem)]
+by (fast_tac (!claset addSDs [HH_Least_eq_x RS sym RSN (2, subst_elem)]
                 addSEs [mem_irrefl]) 1);
 val f_subsets_imp_UN_HH_eq_x = result();
 
 goal thy "HH(f,x,i)=f`(x - (UN j:i. HH(f,x,j))) | HH(f,x,i)={x}";
 by (resolve_tac [HH_def_satisfies_eq RS ssubst] 1);
-by (simp_tac (ZF_ss addsimps [Let_def, Diff_subset RS PowI]
+by (simp_tac (!simpset addsimps [Let_def, Diff_subset RS PowI]
               setloop split_tac [expand_if]) 1);
 val HH_values2 = result();
 
 goal thy
      "!!f. HH(f,x,i): Pow(x)-{0} ==> HH(f,x,i)=f`(x - (UN j:i. HH(f,x,j)))";
 by (resolve_tac [HH_values2 RS disjE] 1 THEN (assume_tac 1));
-by (fast_tac (AC_cs addSEs [equalityE, mem_irrefl]
+by (fast_tac (!claset addSEs [equalityE, mem_irrefl]
         addSDs [singleton_subsetD]) 1);
 val HH_subset_imp_eq = result();
 
@@ -207,8 +194,8 @@
 by (forward_tac [HH_subset_imp_eq] 1);
 by (dtac apply_type 1);
 by (resolve_tac [Diff_subset RS PowI RS DiffI] 1);
-by (fast_tac (AC_cs addSDs [HH_subset_x_imp_subset_Diff_UN RS not_emptyI2]) 1);
-by (fast_tac (AC_cs addSEs [RepFunE] addEs [ssubst]) 1);
+by (fast_tac (!claset addSDs [HH_subset_x_imp_subset_Diff_UN RS not_emptyI2]) 1);
+by (fast_tac (!claset addSEs [RepFunE] addEs [ssubst]) 1);
 val f_sing_imp_HH_sing = result();
 
 goalw thy [bij_def] 
@@ -216,7 +203,7 @@
 \       f : (PROD X:Pow(x)-{0}. {{z}. z:x}) |]  \
 \       ==> (lam a:(LEAST i. HH(f,x,i)={x}). HH(f,x,a))  \
 \                       : bij(LEAST i. HH(f,x,i)={x}, {{y}. y:x})";
-by (fast_tac (AC_cs addSIs [lam_Least_HH_inj, lam_surj_sing,
+by (fast_tac (!claset addSIs [lam_Least_HH_inj, lam_surj_sing,
                 f_sing_imp_HH_sing]) 1);
 val f_sing_lam_bij = result();
 
--- a/src/ZF/AC/Hartog.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/Hartog.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -9,7 +9,7 @@
 
 goal thy "!!X. ALL a. Ord(a) --> a:X ==> P";
 by (res_inst_tac [("X1","{y:X. Ord(y)}")] (ON_class RS revcut_rl) 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "Ords_in_set";
 
 goalw thy [lepoll_def] "!!X. [| Ord(a); a lepoll X |] ==>  \
@@ -31,10 +31,10 @@
 goal thy "!!X. [| Ord(a); a lepoll X |] ==>  \
 \               EX Y. Y<=X & (EX R. R<=X*X & ordertype(Y,R)=a)";
 by (dtac Ord_lepoll_imp_ex_well_ord 1 THEN (assume_tac 1));
-by (step_tac ZF_cs 1);
+by (Step_tac 1);
 by (REPEAT (ares_tac [exI, conjI] 1));
 by (etac ordertype_Int 2);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "Ord_lepoll_imp_eq_ordertype";
 
 goal thy "!!X. ALL a. Ord(a) --> a lepoll X ==>  \
@@ -44,7 +44,7 @@
 by (REPEAT (eresolve_tac [allE, impE] 1));
 by (assume_tac 1);
 by (dtac Ord_lepoll_imp_eq_ordertype 1 THEN (assume_tac 1));
-by (fast_tac (ZF_cs addSIs [ReplaceI] addEs [sym]) 1);
+by (fast_tac (!claset addSIs [ReplaceI] addEs [sym]) 1);
 qed "Ords_lepoll_set_lemma";
 
 goal thy "!!X. ALL a. Ord(a) --> a lepoll X ==> P";
@@ -53,15 +53,15 @@
 
 goal thy "EX a. Ord(a) & ~a lepoll X";
 by (rtac swap 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 by (rtac Ords_lepoll_set 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "ex_Ord_not_lepoll";
 
 goalw thy [Hartog_def] "~ Hartog(A) lepoll A";
 by (resolve_tac [ex_Ord_not_lepoll RS exE] 1);
 by (rtac LeastI 1);
-by (REPEAT (fast_tac ZF_cs 1));
+by (REPEAT (Fast_tac 1));
 qed "HartogI";
 
 val HartogE = HartogI RS notE;
@@ -71,14 +71,14 @@
 qed "Ord_Hartog";
 
 goalw thy [Hartog_def] "!!i. [| i < Hartog(A); ~ i lepoll A |] ==> P";
-by (fast_tac (ZF_cs addEs [less_LeastE]) 1);
+by (fast_tac (!claset addEs [less_LeastE]) 1);
 qed "less_HartogE1";
 
 goal thy "!!i. [| i < Hartog(A); i eqpoll Hartog(A) |] ==> P";
-by (fast_tac (ZF_cs addEs [less_HartogE1, eqpoll_sym RS eqpoll_imp_lepoll
+by (fast_tac (!claset addEs [less_HartogE1, eqpoll_sym RS eqpoll_imp_lepoll
                 RS lepoll_trans RS HartogE]) 1);
 qed "less_HartogE";
 
 goal thy "Card(Hartog(A))";
-by (fast_tac (ZF_cs addSIs [CardI, Ord_Hartog] addEs [less_HartogE]) 1);
+by (fast_tac (!claset addSIs [CardI, Ord_Hartog] addEs [less_HartogE]) 1);
 qed "Card_Hartog";
--- a/src/ZF/AC/OrdQuant.ML	Fri Jan 03 10:48:28 1997 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-(*  Title:      ZF/AC/OrdQuant.thy
-    ID:         $Id$
-    Authors:    Krzysztof Grabczewski and L C Paulson
-
-Quantifiers and union operator for ordinals. 
-*)
-
-open OrdQuant;
-
-(*** universal quantifier for ordinals ***)
-
-qed_goalw "oallI" thy [oall_def]
-    "[| !!x. x<A ==> P(x) |] ==> ALL x<A. P(x)"
- (fn prems=> [ (REPEAT (ares_tac (prems @ [allI,impI]) 1)) ]);
-
-qed_goalw "ospec" thy [oall_def]
-    "[| ALL x<A. P(x);  x<A |] ==> P(x)"
- (fn major::prems=>
-  [ (rtac (major RS spec RS mp) 1),
-    (resolve_tac prems 1) ]);
-
-qed_goalw "oallE" thy [oall_def]
-    "[| ALL x<A. P(x);  P(x) ==> Q;  ~x<A ==> Q |] ==> Q"
- (fn major::prems=>
-  [ (rtac (major RS allE) 1),
-    (REPEAT (eresolve_tac (prems@[asm_rl,impCE]) 1)) ]);
-
-qed_goal "rev_oallE" thy
-    "[| ALL x<A. P(x);  ~x<A ==> Q;  P(x) ==> Q |] ==> Q"
- (fn major::prems=>
-  [ (rtac (major RS oallE) 1),
-    (REPEAT (eresolve_tac prems 1)) ]);
-
-(*Trival rewrite rule;   (ALL x<a.P)<->P holds only if a is not 0!*)
-qed_goal "oall_simp" thy "(ALL x<a. True) <-> True"
- (fn _=> [ (REPEAT (ares_tac [TrueI,oallI,iffI] 1)) ]);
-
-(*Congruence rule for rewriting*)
-qed_goalw "oall_cong" thy [oall_def]
-    "[| a=a';  !!x. x<a' ==> P(x) <-> P'(x) |] ==> oall(a,P) <-> oall(a',P')"
- (fn prems=> [ (simp_tac (FOL_ss addsimps prems) 1) ]);
-
-
-(*** existential quantifier for ordinals ***)
-
-qed_goalw "oexI" thy [oex_def]
-    "[| P(x);  x<A |] ==> EX x<A. P(x)"
- (fn prems=> [ (REPEAT (ares_tac (prems @ [exI,conjI]) 1)) ]);
-
-(*Not of the general form for such rules; ~EX has become ALL~ *)
-qed_goal "oexCI" thy 
-   "[| ALL x<A. ~P(x) ==> P(a);  a<A |] ==> EX x<A.P(x)"
- (fn prems=>
-  [ (rtac classical 1),
-    (REPEAT (ares_tac (prems@[oexI,oallI,notI,notE]) 1)) ]);
-
-qed_goalw "oexE" thy [oex_def]
-    "[| EX x<A. P(x);  !!x. [| x<A; P(x) |] ==> Q \
-\    |] ==> Q"
- (fn major::prems=>
-  [ (rtac (major RS exE) 1),
-    (REPEAT (eresolve_tac (prems @ [asm_rl,conjE]) 1)) ]);
-
-qed_goalw "oex_cong" thy [oex_def]
-    "[| a=a';  !!x. x<a' ==> P(x) <-> P'(x) \
-\    |] ==> oex(a,P) <-> oex(a',P')"
- (fn prems=> [ (simp_tac (FOL_ss addsimps prems addcongs [conj_cong]) 1) ]);
-
-
-(*** Rules for Ordinal-Indexed Unions ***)
-
-qed_goalw "OUN_I" thy [OUnion_def]
-        "!!i. [| a<i;  b: B(a) |] ==> b: (UN z<i. B(z))"
- (fn _=> [ fast_tac (ZF_cs addSEs [ltE]) 1 ]);
-
-qed_goalw "OUN_E" thy [OUnion_def]
-    "[| b : (UN z<i. B(z));  !!a.[| b: B(a);  a<i |] ==> R |] ==> R"
- (fn major::prems=>
-  [ (rtac (major RS CollectE) 1),
-    (rtac UN_E 1),
-    (REPEAT (ares_tac (ltI::prems) 1)) ]);
-
-qed_goalw "OUN_iff" thy [oex_def]
-    "b : (UN x<i. B(x)) <-> (EX x<i. b : B(x))"
- (fn _=> [ (fast_tac (FOL_cs addIs [OUN_I] addSEs [OUN_E]) 1) ]);
-
-qed_goal "OUN_cong" thy
-    "[| i=j;  !!x. x<j ==> C(x)=D(x) |] ==> (UN x<i.C(x)) = (UN x<j.D(x))"
- (fn prems=>
-      [ rtac equality_iffI 1,
-        simp_tac (ZF_ss addcongs [oex_cong] addsimps (OUN_iff::prems)) 1 ]);
-
-val OrdQuant_cs = ZF_cs
-                  addSIs [oallI]
-                  addIs  [oexI, OUN_I]
-                  addSEs [oexE, OUN_E]
-                  addEs  [rev_oallE];
-
-val Ord_atomize = atomize (("oall", [ospec])::ZF_conn_pairs, 
-                           ZF_mem_pairs);
-
-val OrdQuant_ss = ZF_ss setmksimps (map mk_meta_eq o Ord_atomize o gen_all)
-                        addsimps [oall_simp, ltD RS beta]
-                        addcongs [oall_cong, oex_cong, OUN_cong];
--- a/src/ZF/AC/OrdQuant.thy	Fri Jan 03 10:48:28 1997 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-(*  Title:      ZF/AC/OrdQuant.thy
-    ID:         $Id$
-    Authors:    Krzysztof Grabczewski and L C Paulson
-
-Quantifiers and union operator for ordinals. 
-*)
-
-OrdQuant = Ordinal +
-
-consts
-  
-  (* Ordinal Quantifiers *)
-  oall, oex   :: [i, i => o] => o
-
-  (* Ordinal Union *)
-  OUnion      :: [i, i => i] => i
-  
-syntax
-  
-  "@oall"     :: [idt, i, o] => o        ("(3ALL _<_./ _)" 10)
-  "@oex"      :: [idt, i, o] => o        ("(3EX _<_./ _)" 10)
-  "@OUNION"   :: [idt, i, i] => i        ("(3UN _<_./ _)" 10)
-
-translations
-  
-  "ALL x<a. P"  == "oall(a, %x. P)"
-  "EX x<a. P"   == "oex(a, %x. P)"
-  "UN x<a. B"   == "OUnion(a, %x. B)"
-
-defs
-  
-  (* Ordinal Quantifiers *)
-  oall_def      "oall(A, P) == ALL x. x<A --> P(x)"
-  oex_def       "oex(A, P) == EX x. x<A & P(x)"
-
-  OUnion_def     "OUnion(i,B) == {z: UN x:i. B(x). Ord(i)}"
-  
-end
--- a/src/ZF/AC/Transrec2.ML	Fri Jan 03 10:48:28 1997 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-(*  Title:      ZF/AC/Transrec2.ML
-    ID:         $Id$
-    Author:     Krzysztof Grabczewski
-
-Transfinite recursion introduced to handle definitions based on the three
-cases of ordinals.
-*)
-
-open Transrec2;
-
-goal thy "transrec2(0,a,b) = a";
-by (rtac (transrec2_def RS def_transrec RS trans) 1);
-by (simp_tac ZF_ss 1);
-val transrec2_0 = result();
-
-goal thy "(THE j. i=j) = i";
-by (fast_tac (ZF_cs addSIs [the_equality]) 1);
-val THE_eq = result();
-
-goal thy "transrec2(succ(i),a,b) = b(i, transrec2(i,a,b))";
-by (rtac (transrec2_def RS def_transrec RS trans) 1);
-by (simp_tac (ZF_ss addsimps [succ_not_0, THE_eq, if_P]
-                    setsolver K (fast_tac FOL_cs)) 1);
-val transrec2_succ = result();
-
-goal thy "!!i. Limit(i) ==> transrec2(i,a,b) = (UN j<i. transrec2(j,a,b))";
-by (rtac (transrec2_def RS def_transrec RS trans) 1);
-by (resolve_tac [if_not_P RS trans] 1 THEN
-    fast_tac (OrdQuant_cs addSDs [Limit_has_0] addSEs [ltE]) 1);
-by (resolve_tac [if_not_P RS trans] 1 THEN
-    fast_tac (OrdQuant_cs addSEs [succ_LimitE]) 1);
-by (simp_tac OrdQuant_ss 1);
-val transrec2_Limit = result();
--- a/src/ZF/AC/Transrec2.thy	Fri Jan 03 10:48:28 1997 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-(*  Title:      ZF/AC/Transrec2.thy
-    ID:         $Id$
-    Author:     Krzysztof Grabczewski
-
-Transfinite recursion introduced to handle definitions based on the three
-cases of ordinals.
-*)
-
-Transrec2 = OrdQuant + Epsilon +
-
-consts
-  
-  transrec2               :: [i, i, [i,i]=>i] =>i
-
-defs
-
-  transrec2_def  "transrec2(alpha, a, b) ==                     
-                         transrec(alpha, %i r. if(i=0,          
-                                  a, if(EX j. i=succ(j),        
-                                  b(THE j. i=succ(j), r`(THE j. i=succ(j))),   
-                                  UN j<i. r`j)))"
-
-end
--- a/src/ZF/AC/WO1_AC.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/WO1_AC.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -32,7 +32,7 @@
 (* ********************************************************************** *)
 
 goalw thy [AC1_def, WO1_def] "!!Z. WO1 ==> AC1";
-by (fast_tac (AC_cs addSEs [ex_choice_fun]) 1);
+by (fast_tac (!claset addSEs [ex_choice_fun]) 1);
 qed "WO1_AC1";
 
 (* ********************************************************************** *)
@@ -44,19 +44,19 @@
 by (eres_inst_tac [("x","Union({{C:D(B). P(C,B)}. B:A})")] allE 1);
 by (etac exE 1);
 by (dtac ex_choice_fun 1);
-by (fast_tac (AC_cs addEs [RepFunE, sym RS equals0D]) 1);
+by (fast_tac (!claset addEs [RepFunE, sym RS equals0D]) 1);
 by (etac exE 1);
 by (res_inst_tac [("x","lam x:A. f`{C:D(x). P(C,x)}")] exI 1);
-by (asm_full_simp_tac AC_ss 1);
-by (fast_tac (AC_cs addSDs [RepFunI RSN (2, apply_type)]
+by (Asm_full_simp_tac 1);
+by (fast_tac (!claset addSDs [RepFunI RSN (2, apply_type)]
                 addSEs [CollectD2]) 1);
 val lemma1 = result();
 
 goalw thy [WO1_def] "!!A. [| ~Finite(B); WO1 |] ==> |B| + |B| eqpoll  B";
 by (rtac eqpoll_trans 1);
-by (fast_tac (AC_cs addSEs [well_ord_cardinal_eqpoll]) 2);
+by (fast_tac (!claset addSEs [well_ord_cardinal_eqpoll]) 2);
 by (resolve_tac [eqpoll_sym RS eqpoll_trans] 1);
-by (fast_tac (AC_cs addSEs [well_ord_cardinal_eqpoll]) 1);
+by (fast_tac (!claset addSEs [well_ord_cardinal_eqpoll]) 1);
 by (resolve_tac [cadd_def RS def_imp_eq RS subst] 1);
 by (resolve_tac [Card_cardinal RSN (2, Inf_Card_is_InfCard) RS 
                         InfCard_cdouble_eq RS ssubst] 1);
@@ -65,23 +65,23 @@
 by (etac notE 1);
 by (resolve_tac [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_Finite] 1
         THEN (assume_tac 2));
-by (fast_tac (AC_cs addSEs [well_ord_cardinal_eqpoll]) 1);
+by (fast_tac (!claset addSEs [well_ord_cardinal_eqpoll]) 1);
 val lemma2_1 = result();
 
 goal thy "!!f. f : bij(D+D, B) ==> {{f`Inl(i), f`Inr(i)}. i:D} : Pow(Pow(B))";
-by (fast_tac (AC_cs addSIs [InlI, InrI]
+by (fast_tac (!claset addSIs [InlI, InrI]
                 addSEs [RepFunE, bij_is_fun RS apply_type]) 1);
 val lemma2_2 = result();
 
 goal thy "!!f. [| f:inj(A,B); f`a = f`b; a:A; b:A |] ==> a=b";
 by (rtac inj_equality 1);
-by (TRYALL (fast_tac (AC_cs addSEs [inj_is_fun RS apply_Pair] addEs [subst])));
+by (TRYALL (fast_tac (!claset addSEs [inj_is_fun RS apply_Pair] addEs [subst])));
 val lemma = result();
 
 goalw thy AC_aux_defs
         "!!f. f : bij(D+D, B) ==>  \
 \               pairwise_disjoint({{f`Inl(i), f`Inr(i)}. i:D})";
-by (fast_tac (AC_cs addSEs [RepFunE, not_emptyE] 
+by (fast_tac (!claset addSEs [RepFunE, not_emptyE] 
         addDs [bij_is_inj RS lemma, Inl_iff RS iffD1,
                 Inr_iff RS iffD1, Inl_Inr_iff RS iffD1 RS FalseE,
                 Inr_Inl_iff RS iffD1 RS FalseE]
@@ -92,7 +92,7 @@
         "[| f : bij(D+D, B); 1 le n |] ==>  \
 \       sets_of_size_between({{f`Inl(i), f`Inr(i)}. i:D}, 2, succ(n))";
 by (rewtac succ_def);
-by (fast_tac (AC_cs addSIs [cons_lepoll_cong, minor, lepoll_refl, InlI, InrI] 
+by (fast_tac (!claset addSIs [cons_lepoll_cong, minor, lepoll_refl, InlI, InrI] 
         addIs [singleton_eqpoll_1 RS eqpoll_imp_lepoll RS lepoll_trans,
                 le_imp_subset RS subset_imp_lepoll]
         addDs [major RS bij_is_inj RS lemma, Inl_Inr_iff RS iffD1 RS FalseE]
@@ -101,7 +101,7 @@
 
 goalw thy [bij_def, surj_def]
         "!!f. f : bij(D+D, B) ==> Union({{f`Inl(i), f`Inr(i)}. i:D})=B";
-by (fast_tac (AC_cs addSEs [inj_is_fun RS apply_type, CollectE, sumE]
+by (fast_tac (!claset addSEs [inj_is_fun RS apply_type, CollectE, sumE]
         addSIs [InlI, InrI, equalityI]) 1);
 val lemma2_5 = result();
 
@@ -116,5 +116,5 @@
 val lemma2 = result();
 
 goalw thy AC_defs "!!n. [| WO1; 1 le n |] ==> AC10(n)";
-by (fast_tac (AC_cs addSIs [lemma1] addSEs [lemma2]) 1);
+by (fast_tac (!claset addSIs [lemma1] addSEs [lemma2]) 1);
 qed "WO1_AC10";
--- a/src/ZF/AC/WO1_WO6.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/WO1_WO6.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -5,43 +5,43 @@
   Proofs needed to state that formulations WO1,...,WO6 are all equivalent.
   All but one WO6 ==> WO1 (placed in separate file WO6_WO1.ML)
 
-  Every proofs (exept one) presented in this file are referred as clear
+  Every proof (exept one) presented in this file are referred as "clear"
   by Rubin & Rubin (page 2). 
-  They refer reader to a book by G"odel to see the proof WO1 ==> WO2.
+  They refer reader to a book by Gödel to see the proof WO1 ==> WO2.
   Fortunately order types made this proof also very easy.
 *)
 
 (* ********************************************************************** *)
 
 goalw thy WO_defs "!!Z. WO2 ==> WO3";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "WO2_WO3";
 
 (* ********************************************************************** *)
 
 goalw thy (eqpoll_def::WO_defs) "!!Z. WO3 ==> WO1";
-by (fast_tac (ZF_cs addSEs [bij_is_inj RS well_ord_rvimage, 
-                        well_ord_Memrel RS well_ord_subset]) 1);
+by (fast_tac (!claset addSEs [bij_is_inj RS well_ord_rvimage, 
+			      well_ord_Memrel RS well_ord_subset]) 1);
 qed "WO3_WO1";
 
 (* ********************************************************************** *)
 
 goalw thy (eqpoll_def::WO_defs) "!!Z. WO1 ==> WO2";
-by (fast_tac (ZF_cs addSIs [Ord_ordertype, ordermap_bij]) 1);
+by (fast_tac (!claset addSIs [Ord_ordertype, ordermap_bij]) 1);
 qed "WO1_WO2";
 
 (* ********************************************************************** *)
 
 goal thy "!!f. f: A->B ==> (lam x:A. {f`x}): A -> {{b}. b:B}";
-by (fast_tac (ZF_cs addSIs [lam_type, apply_type]) 1);
+by (fast_tac (!claset addSIs [lam_type, apply_type]) 1);
 val lam_sets = result();
 
 goalw thy [surj_def] "!!f. f:surj(A,B) ==> (UN a:A. {f`a}) = B";
-by (fast_tac (ZF_cs addSIs [equalityI] addSEs [apply_type]) 1);
+by (fast_tac (!claset addSIs [equalityI] addSEs [apply_type]) 1);
 val surj_imp_eq_ = result();
 
 goal thy "!!f. [| f:surj(A,B); Ord(A) |] ==> (UN a<A. {f`a}) = B";
-by (fast_tac (AC_cs addSDs [surj_imp_eq_]
+by (fast_tac (!claset addSDs [surj_imp_eq_]
                 addSIs [equalityI, ltI] addSEs [ltE]) 1);
 val surj_imp_eq = result();
 
@@ -54,7 +54,7 @@
 by (rtac conjI 1);
 by (eresolve_tac [ordermap_bij RS bij_converse_bij RS bij_is_fun RS
                 lam_sets RS domain_of_fun] 1);
-by (asm_simp_tac (AC_ss addsimps [singleton_eqpoll_1 RS eqpoll_imp_lepoll,
+by (asm_simp_tac (!simpset addsimps [singleton_eqpoll_1 RS eqpoll_imp_lepoll,
                   Ord_ordertype RSN (2, ordermap_bij RS bij_converse_bij RS
                         bij_is_surj RS surj_imp_eq)]) 1);
 qed "WO1_WO4";
@@ -62,18 +62,20 @@
 (* ********************************************************************** *)
 
 goalw thy WO_defs "!!Z. [| m:nat; n:nat; m le n; WO4(m) |] ==> WO4(n)";
-by (fast_tac (AC_cs addIs [nat_le_imp_lepoll RSN (2, lepoll_trans)]) 1);
+by (fast_tac (!claset addIs [nat_le_imp_lepoll RSN (2, lepoll_trans)]) 1);
 qed "WO4_mono";
 
 (* ********************************************************************** *)
 
 goalw thy WO_defs "!!Z. [| m:nat; 1 le m; WO4(m) |] ==> WO5";
+    (*ZF_cs is essential: default claset's too slow*)
 by (fast_tac ZF_cs 1);
 qed "WO4_WO5";
 
 (* ********************************************************************** *)
 
 goalw thy WO_defs "!!Z. WO5 ==> WO6";
+    (*ZF_cs is essential: default claset's too slow*)
 by (fast_tac ZF_cs 1);
 qed "WO5_WO6";
 
--- a/src/ZF/AC/WO1_WO7.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/WO1_WO7.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -12,7 +12,7 @@
 
 goalw thy [WO7_def] "WO7 <-> (ALL X. ~Finite(X) -->  \
 \                       (EX R. well_ord(X,R) & ~well_ord(X,converse(R))))";
-by (fast_tac (ZF_cs addSEs [Finite_well_ord_converse]) 1);
+by (fast_tac (!claset addSEs [Finite_well_ord_converse]) 1);
 val WO7_iff_LEMMA = result();
 
 (* ********************************************************************** *)
@@ -24,9 +24,9 @@
 by (rtac allI 1);
 by (etac allE 1);
 by (excluded_middle_tac "Finite(A)" 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (rewrite_goals_tac [Finite_def, eqpoll_def]);
-by (fast_tac (ZF_cs addSIs [[bij_is_inj, nat_implies_well_ord] MRS
+by (fast_tac (!claset addSIs [[bij_is_inj, nat_implies_well_ord] MRS
                                  well_ord_rvimage]) 1);
 val LEMMA_imp_WO1 = result();
 
@@ -50,16 +50,16 @@
 by (rtac notI 1);
 by (eres_inst_tac [("x","nat")] allE 1);
 by (etac disjE 1);
-by (fast_tac (ZF_cs addSDs [nat_0I RSN (2,equals0D)]) 1);
+by (fast_tac (!claset addSDs [nat_0I RSN (2,equals0D)]) 1);
 by (etac bexE 1);
 by (eres_inst_tac [("x","succ(x)")] allE 1);
-by (fast_tac (ZF_cs addSIs [nat_succI, converseI, MemrelI, 
+by (fast_tac (!claset addSIs [nat_succI, converseI, MemrelI, 
                             nat_succI RSN (2, subsetD)]) 1);
 val converse_Memrel_not_wf_on = result();
 
 goalw thy [well_ord_def] 
     "!!a. [| Ord(a); ~Finite(a) |] ==> ~well_ord(a,converse(Memrel(a)))";
-by (fast_tac (ZF_cs addSDs [converse_Memrel_not_wf_on]) 1);
+by (fast_tac (!claset addSDs [converse_Memrel_not_wf_on]) 1);
 val converse_Memrel_not_well_ord = result();
 
 goal thy "!!A. [| well_ord(A,r); well_ord(A,converse(r)) |]  \
--- a/src/ZF/AC/WO1_WO8.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/WO1_WO8.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -10,7 +10,7 @@
 (* ********************************************************************** *)
 
 goalw thy WO_defs "!!Z. WO1 ==> WO8";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "WO1_WO8";
 
 (* ********************************************************************** *)
@@ -21,10 +21,10 @@
 by (rtac allI 1);
 by (eres_inst_tac [("x","{{x}. x:A}")] allE 1);
 by (etac impE 1);
-by (fast_tac (AC_cs addSEs [lam_sing_bij RS bij_is_inj RS
+by (fast_tac (!claset addSEs [lam_sing_bij RS bij_is_inj RS
                         well_ord_rvimage]) 2);
 by (res_inst_tac [("x","lam a:{{x}. x:A}. THE x. a={x}")] exI 1);
-by (fast_tac (ZF_cs addSEs [singleton_eq_iff RS iffD1 RS sym]
+by (fast_tac (!claset addSEs [singleton_eq_iff RS iffD1 RS sym]
                 addSIs [lam_type]
                 addIs [the_equality RS ssubst]) 1);
 qed "WO8_WO1";
--- a/src/ZF/AC/WO2_AC16.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/WO2_AC16.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -42,18 +42,17 @@
 by (etac lemma3_1 1 THEN (REPEAT (assume_tac 1)));
 val lemma3 = result();
 
-goal thy "!!a. [| ALL y:x. y < a --> F(y) <= X &  \
+goal thy "!!a. [| ALL y<x. F(y) <= X &  \
 \               (ALL x<a. x < y | (EX Y:F(y). fa(x) <= Y) -->  \
 \                       (EX! Y. Y : F(y) & fa(x) <= Y)); x < a |]  \
 \               ==> ALL y<x. ALL z<a. z < y | (EX Y:F(y). fa(z) <= Y) -->  \
 \                       (EX! Y. Y : F(y) & fa(z) <= Y)";
 by (REPEAT (resolve_tac [oallI, impI] 1));
-by (dresolve_tac [ltD RSN (2, bspec)] 1 THEN (assume_tac 1));
-by (eresolve_tac [lt_trans RSN (2, impE)] 1 THEN (REPEAT (assume_tac 1)));
+by (dresolve_tac [ospec] 1 THEN (assume_tac 1));
 by (fast_tac (FOL_cs addSEs [oallE]) 1);
 val lemma4 = result();
 
-goal thy "!!a. [| ALL y:x. y < a --> F(y) <= X &  \
+goal thy "!!a. [| ALL y<x. F(y) <= X &  \
 \               (ALL x<a. x < y | (EX Y:F(y). fa(x) <= Y) -->  \
 \                       (EX! Y. Y : F(y) & fa(x) <= Y)); \
 \               x < a; Limit(x); ALL i j. i le j --> F(i) <= F(j) |]  \
@@ -63,9 +62,8 @@
 by (rtac conjI 1);
 by (rtac subsetI 1);
 by (etac OUN_E 1);
-by (dresolve_tac [ltD RSN (2, bspec)] 1 THEN (assume_tac 1));
-by (eresolve_tac [lt_trans RSN (2, impE)] 1 THEN (REPEAT (assume_tac 1)));
-by (fast_tac AC_cs 1);
+by (dresolve_tac [ospec] 1 THEN (assume_tac 1));
+by (Fast_tac 1);
 by (dtac lemma4 1 THEN (assume_tac 1));
 by (rtac oallI 1);
 by (rtac impI 1);
@@ -119,9 +117,9 @@
 by (dresolve_tac [nat_le_infinite_Ord RS le_imp_lepoll] 1
         THEN (assume_tac 1));
 by (rewtac Finite_def);
-by (fast_tac (AC_cs addSEs [eqpoll_sym RS eqpoll_trans]) 2);
+by (fast_tac (!claset addSEs [eqpoll_sym RS eqpoll_trans]) 2);
 by (rtac lepoll_trans 1 THEN (assume_tac 2));
-by (fast_tac (AC_cs addSEs [Ord_nat RSN (2, ltI) RS leI RS le_imp_subset RS 
+by (fast_tac (!claset addSEs [Ord_nat RSN (2, ltI) RS leI RS le_imp_subset RS 
         subset_imp_lepoll RSN (2, eqpoll_imp_lepoll RS lepoll_trans)]) 1);
 val Finite_lesspoll_infinite_Ord = result();
 
@@ -132,25 +130,25 @@
 goal thy "!!n. n:nat ==> ALL X. X eqpoll n --> (ALL x:X. Finite(x))  \
 \       --> Finite(Union(X))";
 by (etac nat_induct 1);
-by (fast_tac (AC_cs addSDs [eqpoll_imp_lepoll RS lepoll_0_is_0]
-        addSIs [nat_0I RS nat_into_Finite] addIs [Union_0 RS ssubst]) 1);
+by (fast_tac (!claset addSDs [eqpoll_imp_lepoll RS lepoll_0_is_0]
+        addSIs [nat_0I RS nat_into_Finite] addss (!simpset)) 1);
 by (REPEAT (resolve_tac [allI, impI] 1));
 by (resolve_tac [eqpoll_succ_imp_not_empty RS not_emptyE] 1 THEN (assume_tac 1));
 by (res_inst_tac [("P","%z. Finite(z)")] (Union_eq_Un_Diff RS ssubst) 1
         THEN (assume_tac 1));
 by (rtac Finite_Un 1);
-by (fast_tac AC_cs 2);
-by (fast_tac (AC_cs addSIs [Diff_sing_eqpoll]) 1);
+by (Fast_tac 2);
+by (fast_tac (!claset addSIs [Diff_sing_eqpoll]) 1);
 val Finite_Union_lemma = result();
 
 goal thy "!!X. [| ALL x:X. Finite(x); Finite(X) |] ==> Finite(Union(X))";
 by (eresolve_tac [Finite_def RS def_imp_iff RS iffD1 RS bexE] 1);
 by (dtac Finite_Union_lemma 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 val Finite_Union = result();
 
 goalw thy [Finite_def] "!!x. [| x lepoll n; n:nat |] ==> Finite(x)";
-by (fast_tac (AC_cs
+by (fast_tac (!claset
         addEs [nat_into_Ord RSN (2, lepoll_imp_ex_le_eqpoll) RS exE,
         Ord_nat RSN (2, ltI) RSN (2, lt_trans1) RS ltD]) 1);
 val lepoll_nat_num_imp_Finite = result();
@@ -161,7 +159,7 @@
 by (excluded_middle_tac "Finite(X)" 1);
 by (resolve_tac [Card_is_Ord RSN (3, Finite_lesspoll_infinite_Ord)] 2
         THEN (REPEAT (assume_tac 3)));
-by (fast_tac (AC_cs addSEs [lepoll_nat_num_imp_Finite]
+by (fast_tac (!claset addSEs [lepoll_nat_num_imp_Finite]
                 addSIs [Finite_Union]) 2);
 by (dresolve_tac [lt_Ord RSN (2, lepoll_imp_ex_le_eqpoll)] 1 THEN (assume_tac 1));
 by (REPEAT (eresolve_tac [exE, conjE] 1));
@@ -176,7 +174,7 @@
 by (eresolve_tac [lt_trans1 RSN (2, lt_Card_imp_lesspoll)] 1
         THEN REPEAT (assume_tac 1));
 by (rtac UN_lepoll 1
-        THEN (TRYALL (fast_tac (AC_cs addSEs [lt_Ord]))));
+        THEN (TRYALL (fast_tac (!claset addSEs [lt_Ord]))));
 val Union_lesspoll = result();
 
 (* ********************************************************************** *)
@@ -188,36 +186,36 @@
 val Un_sing_eq_cons = result();
 
 goal thy "!!A. A lepoll B ==> A Un {a} lepoll succ(B)";
-by (asm_simp_tac (AC_ss addsimps [Un_sing_eq_cons, succ_def]) 1);
+by (asm_simp_tac (!simpset addsimps [Un_sing_eq_cons, succ_def]) 1);
 by (eresolve_tac [mem_not_refl RSN (2, cons_lepoll_cong)] 1);
 val Un_lepoll_succ = result();
 
 goal thy "!!a. Ord(a) ==> F(a) - (UN b<succ(a). F(b)) = 0";
-by (fast_tac (AC_cs addSIs [OUN_I, le_refl] addIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [OUN_I, le_refl] addIs [equalityI]) 1);
 val Diff_UN_succ_empty = result();
 
 goal thy "!!a. Ord(a) ==> F(a) Un X - (UN b<succ(a). F(b)) <= X";
-by (fast_tac (AC_cs addSIs [OUN_I, le_refl]) 1);
+by (fast_tac (!claset addSIs [OUN_I, le_refl]) 1);
 val Diff_UN_succ_subset = result();
 
 goal thy "!!x. Ord(x) ==>  \
 \       recfunAC16(f, g, x, a) - (UN i<x. recfunAC16(f, g, i, a)) lepoll 1";
 by (etac Ord_cases 1);
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_0,
+by (asm_simp_tac (!simpset addsimps [recfunAC16_0,
                 empty_subsetI RS subset_imp_lepoll]) 1);
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_Limit,
+by (asm_simp_tac (!simpset addsimps [recfunAC16_Limit,
                 Diff_cancel, empty_subsetI RS subset_imp_lepoll]) 2);
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_succ]) 1);
+by (asm_simp_tac (!simpset addsimps [recfunAC16_succ]) 1);
 by (resolve_tac [conjI RS (expand_if RS iffD2)] 1);
-by (fast_tac (AC_cs addSIs [empty_subsetI RS subset_imp_lepoll]
+by (fast_tac (!claset addSIs [empty_subsetI RS subset_imp_lepoll]
                 addSEs [Diff_UN_succ_empty RS ssubst]) 1);
-by (fast_tac (AC_cs addSEs [Diff_UN_succ_subset RS subset_imp_lepoll RS
+by (fast_tac (!claset addSEs [Diff_UN_succ_subset RS subset_imp_lepoll RS
         (singleton_eqpoll_1 RS eqpoll_imp_lepoll RSN (2, lepoll_trans))]) 1);
 val recfunAC16_Diff_lepoll_1 = result();
 
 goal thy "!!z. [| z : F(x); Ord(x) |]  \
 \       ==> z:F(LEAST i. z:F(i)) - (UN j<(LEAST i. z:F(i)). F(j))";
-by (fast_tac (AC_cs addEs [less_LeastE] addSEs [OUN_E, LeastI]) 1);
+by (fast_tac (!claset addEs [less_LeastE] addSEs [OUN_E, LeastI]) 1);
 val in_Least_Diff = result();
 
 goal thy "!!w. [| (LEAST i. w:F(i)) = (LEAST i. z:F(i));  \
@@ -234,7 +232,7 @@
 val Least_eq_imp_ex = result();
 
 goal thy "!!A. [| A lepoll 1; a:A; b:A |] ==> a=b";
-by (fast_tac (AC_cs addSDs [lepoll_1_is_sing]) 1);
+by (fast_tac (!claset addSDs [lepoll_1_is_sing]) 1);
 val two_in_lepoll_1 = result();
 
 goal thy "!!a. [| ALL i<a. F(i)-(UN j<i. F(j)) lepoll 1; Limit(a) |]  \
@@ -250,23 +248,23 @@
 by (etac lt_Ord2 1);
 by (rtac ballI 1);
 by (rtac ballI 1);
-by (asm_simp_tac AC_ss 1);
+by (Asm_simp_tac 1);
 by (rtac impI 1);
 by (dtac Least_eq_imp_ex 1 THEN (REPEAT (assume_tac 1)));
-by (fast_tac (AC_cs addSEs [two_in_lepoll_1]) 1);
+by (fast_tac (!claset addSEs [two_in_lepoll_1]) 1);
 val UN_lepoll_index = result();
 
 goal thy "!!y. Ord(y) ==> recfunAC16(f, fa, y, a) lepoll y";
 by (etac trans_induct 1);
 by (etac Ord_cases 1);
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_0, lepoll_refl]) 1);
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_succ]) 1);
-by (fast_tac (AC_cs addIs [conjI RS (expand_if RS iffD2)]
+by (asm_simp_tac (!simpset addsimps [recfunAC16_0, lepoll_refl]) 1);
+by (asm_simp_tac (!simpset addsimps [recfunAC16_succ]) 1);
+by (fast_tac (!claset addIs [conjI RS (expand_if RS iffD2)]
         addSDs [succI1 RSN (2, bspec)]
         addSEs [subset_succI RS subset_imp_lepoll RSN (2, lepoll_trans),
                 Un_lepoll_succ]) 1);
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_Limit]) 1);
-by (fast_tac (AC_cs addSEs [lt_Ord RS recfunAC16_Diff_lepoll_1]
+by (asm_simp_tac (!simpset addsimps [recfunAC16_Limit]) 1);
+by (fast_tac (!claset addSEs [lt_Ord RS recfunAC16_Diff_lepoll_1]
         addSIs [UN_lepoll_index]) 1);
 val recfunAC16_lepoll_index = result();
 
@@ -278,7 +276,7 @@
 by (eresolve_tac [lt_Ord RS recfunAC16_lepoll_index] 3);
 by (eresolve_tac [[bij_is_inj, Card_is_Ord RS well_ord_Memrel] MRS
         well_ord_rvimage] 2 THEN (assume_tac 2));
-by (fast_tac (AC_cs addSEs [eqpoll_imp_lepoll]) 1);
+by (fast_tac (!claset addSEs [eqpoll_imp_lepoll]) 1);
 val Union_recfunAC16_lesspoll = result();
 
 goal thy
@@ -308,11 +306,11 @@
 \       fa : bij(a, {x: Pow(A) . x eqpoll k}); i<a; k:nat; m:nat |]  \
 \       ==> fa ` i Un x : {x: Pow(A) . x eqpoll k #+ m}";
 by (rtac CollectI 1);
-by (fast_tac (AC_cs addSIs [PowD RS (PowD RSN (2, Un_least RS PowI))] 
+by (fast_tac (!claset addSIs [PowD RS (PowD RSN (2, Un_least RS PowI))] 
         addSEs [ltD RSN (2, bij_is_fun RS apply_type RS CollectE)]) 1);
 by (rtac disj_Un_eqpoll_nat_sum 1
         THEN (TRYALL assume_tac));
-by (fast_tac (AC_cs addSIs [equals0I]) 1);
+by (fast_tac (!claset addSIs [equals0I]) 1);
 by (eresolve_tac [ltD RSN (2, bij_is_fun RS apply_type RS CollectE)] 1
         THEN (REPEAT (assume_tac 1)));
 val Un_in_Collect = result();
@@ -321,18 +319,17 @@
 (* Lemmas simplifying assumptions                                         *)
 (* ********************************************************************** *)
 
-goal thy "!!j. [| ALL y:succ(j). y<a --> F(y)<=X & (ALL x<a. x<y | P(x,y)  \
+goal thy "!!j. [| ALL y<succ(j). F(y)<=X & (ALL x<a. x<y | P(x,y)  \
 \       --> Q(x,y)); succ(j)<a |]  \
 \       ==> F(j)<=X & (ALL x<a. x<j | P(x,j) --> Q(x,j))";
-by (dresolve_tac [succI1 RSN (2, bspec)] 1);
-by (etac impE 1);
-by (resolve_tac [lt_Ord RS (succI1 RS ltI RS lt_Ord RS le_refl) RS lt_trans] 1
+by (dresolve_tac [ospec] 1);
+by (resolve_tac [lt_Ord RS (succI1 RS ltI RS lt_Ord RS le_refl)] 1
         THEN (REPEAT (assume_tac 1)));
 val lemma6 = result();
 
 goal thy "!!j. [| F(j)<=X; (ALL x<a. x<j | P(x,j) --> Q(x,j)); succ(j)<a |]  \
 \       ==> P(j,j) --> F(j) <= X & (ALL x<a. x le j | P(x,j) --> Q(x,j))";
-by (fast_tac (AC_cs addSEs [leE]) 1);
+by (fast_tac (!claset addSEs [leE]) 1);
 val lemma7 = result();
 
 (* ********************************************************************** *)
@@ -348,15 +345,15 @@
                 ((eqpoll_sym RS eqpoll_imp_lepoll) RSN (2, lepoll_trans)) RS 
                 lepoll_imp_eqpoll_subset RS exE] 1 
         THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSEs [eqpoll_sym]) 1);
+by (fast_tac (!claset addSEs [eqpoll_sym]) 1);
 val ex_subset_eqpoll = result();
 
 goal thy "!!A. [| A <= B Un C; A Int C = 0 |] ==> A <= B";
-by (fast_tac (AC_cs addDs [equals0D]) 1);
+by (fast_tac (!claset addDs [equals0D]) 1);
 val subset_Un_disjoint = result();
 
 goal thy "!!F. [| X:Pow(A - Union(B) -C); T:B; F<=T |] ==> F Int X = 0";
-by (fast_tac (AC_cs addSIs [equals0I]) 1);
+by (fast_tac (!claset addSIs [equals0I]) 1);
 val Int_empty = result();
 
 (* ********************************************************************** *)
@@ -369,7 +366,7 @@
 
 goal thy "!!A. m:nat ==> ALL A B. A <= B & m lepoll A & B lepoll m --> A=B";
 by (etac nat_induct 1);
-by (fast_tac (AC_cs addSDs [lepoll_0_is_0] addSIs [equalityI]) 1);
+by (fast_tac (!claset addSDs [lepoll_0_is_0] addSIs [equalityI]) 1);
 by (REPEAT (resolve_tac [allI, impI] 1));
 by (REPEAT (etac conjE 1));
 by (resolve_tac [succ_lepoll_imp_not_empty RS not_emptyE] 1
@@ -379,8 +376,8 @@
 by (forward_tac [lepoll_Diff_sing] 1);
 by (REPEAT (eresolve_tac [allE, impE] 1));
 by (rtac conjI 1);
-by (fast_tac AC_cs 2);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 2);
+by (Fast_tac 1);
 by (etac Diffs_eq_imp_eq 1
         THEN REPEAT (assume_tac 1));
 val subset_imp_eq_lemma = result();
@@ -393,12 +390,12 @@
 \       y<a |] ==> b=y";
 by (dtac subset_imp_eq 1);
 by (etac nat_succI 3);
-by (fast_tac (AC_cs addSEs [bij_is_fun RS (ltD RSN (2, apply_type)) RS
+by (fast_tac (!claset addSEs [bij_is_fun RS (ltD RSN (2, apply_type)) RS
                 CollectE, eqpoll_sym RS eqpoll_imp_lepoll]) 1);
-by (fast_tac (AC_cs addSEs [bij_is_fun RS (ltD RSN (2, apply_type)) RS
+by (fast_tac (!claset addSEs [bij_is_fun RS (ltD RSN (2, apply_type)) RS
         CollectE, eqpoll_imp_lepoll]) 1);
 by (rewrite_goals_tac [bij_def, inj_def]);
-by (fast_tac (AC_cs addSDs [ltD]) 1);
+by (fast_tac (!claset addSDs [ltD]) 1);
 val bij_imp_arg_eq = result();
 
 goal thy
@@ -423,7 +420,7 @@
 by (etac nat_succI 1);
 by (assume_tac 1);
 by (rtac conjI 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (REPEAT (resolve_tac [ballI, impI, oallI, notI] 1));
 by (dresolve_tac [Int_empty RSN (2, subset_Un_disjoint)] 1
         THEN REPEAT (assume_tac 1));
@@ -456,7 +453,7 @@
 val ex_next_Ord = result();
 
 goal thy "!!Z. [| EX! Y. Y:Z & P(Y); ~P(W) |] ==> EX! Y. Y:Z Un {W} & P(Y)";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val ex1_in_Un_sing = result();
 
 (* ********************************************************************** *)
@@ -470,7 +467,7 @@
 \       (ALL x<a. x le j | (EX xa:F(j) Un {L}. P(x, xa)) -->  \
 \               (EX! Y. Y:F(j) Un {L} & P(x, Y)))";
 by (rtac conjI 1);
-by (fast_tac (AC_cs addSIs [singleton_subsetI]) 1);
+by (fast_tac (!claset addSIs [singleton_subsetI]) 1);
 by (rtac oallI 1);
 by (etac oallE 1 THEN (contr_tac 2));
 by (rtac impI 1);
@@ -479,12 +476,12 @@
 by (eresolve_tac [disjI1 RSN (2, impE)] 1 THEN (assume_tac 1));
 by (rtac ex1E 1 THEN (assume_tac 1));
 by (etac ex1_in_Un_sing 1);
-by (fast_tac AC_cs 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
+by (Fast_tac 1);
 by (etac bexE 1);
 by (etac UnE 1);
-by (fast_tac (AC_cs addSEs [ex1_in_Un_sing]) 1);
-by (fast_tac AC_cs 1);
+by (fast_tac (!claset addSEs [ex1_in_Un_sing]) 1);
+by (Fast_tac 1);
 val lemma8 = result();
 
 (* ********************************************************************** *)
@@ -499,21 +496,19 @@
 \       ==> recfunAC16(f, fa, b, a) <= {X: Pow(A) . X eqpoll succ(k #+ m)} &  \
 \       (ALL x<a. x < b | (EX Y:recfunAC16(f, fa, b, a). fa ` x <= Y) -->  \
 \       (EX! Y. Y:recfunAC16(f, fa, b, a) & fa ` x <= Y))";
-by (rtac impE 1 THEN (REPEAT (assume_tac 2)));
-by (eresolve_tac [lt_Ord RS trans_induct] 1);
-by (rtac impI 1);
+by (etac lt_induct 1);
+by (forward_tac [lt_Ord] 1);
 by (etac Ord_cases 1);
 (* case 0 *)
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_0]) 1);
-by (fast_tac (AC_cs addSEs [ltE]) 1);
+by (asm_simp_tac (!simpset addsimps [recfunAC16_0]) 1);
 (* case Limit *)
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_Limit]) 2);
-by (etac lemma5 2 THEN (REPEAT (assume_tac 2)));
+by (asm_simp_tac (!simpset addsimps [recfunAC16_Limit]) 2);
+by (rtac lemma5 2 THEN (REPEAT (assume_tac 2)));
 by (fast_tac (FOL_cs addSEs [recfunAC16_mono]) 2);
 (* case succ *)
 by (hyp_subst_tac 1);
 by (eresolve_tac [lemma6 RS conjE] 1 THEN (assume_tac 1));
-by (asm_simp_tac (AC_ss addsimps [recfunAC16_succ]) 1);
+by (asm_simp_tac (!simpset addsimps [recfunAC16_succ]) 1);
 by (resolve_tac [conjI RS (expand_if RS iffD2)] 1);
 by (etac lemma7 1 THEN (REPEAT (assume_tac 1)));
 by (rtac impI 1);
@@ -523,6 +518,7 @@
 by (resolve_tac [bij_is_fun RS apply_type] 1 THEN (assume_tac 1));
 by (eresolve_tac [Least_le RS lt_trans2 RS ltD] 1 
         THEN REPEAT (ares_tac [lt_Ord, succ_leI] 1));
+(*VERY SLOW!  24 secs??*)
 by (eresolve_tac [lt_Ord RSN (2, LeastI)] 1 THEN (assume_tac 1));
 val main_induct = result();
 
@@ -541,7 +537,7 @@
 by (rtac subsetI 1);
 by (etac OUN_E 1);
 by (dtac prem1 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (rtac ballI 1);
 by (etac imageE 1);
 by (dresolve_tac [prem3 RS Limit_is_Ord RSN (2, ltI) RS
@@ -550,15 +546,15 @@
 by (etac conjE 1);
 by (dresolve_tac [leI RS succ_leE RSN (2, ospec)] 1 THEN (assume_tac 1));
 by (etac impE 1);
-by (fast_tac (AC_cs addSEs [leI RS succ_leE RS lt_Ord RS le_refl]) 1);
+by (fast_tac (!claset addSEs [leI RS succ_leE RS lt_Ord RS le_refl]) 1);
 by (dresolve_tac [prem2 RSN (2, apply_equality)] 1);
 by (REPEAT (eresolve_tac [conjE, ex1E] 1));
 by (rtac ex1I 1);
-by (fast_tac (AC_cs addSIs [OUN_I]) 1);
+by (fast_tac (!claset addSIs [OUN_I]) 1);
 by (REPEAT (eresolve_tac [conjE, OUN_E] 1));
 by (eresolve_tac [lt_Ord RSN (2, lt_Ord RS Ord_linear_le)] 1 THEN (assume_tac 1));
 by (dresolve_tac [prem4 RS subsetD] 2 THEN (assume_tac 2));
-by (fast_tac FOL_cs 2);
+by (Fast_tac 2);
 by (forward_tac [prem1] 1);
 by (forward_tac [succ_leE] 1);
 by (dresolve_tac [prem4 RS subsetD] 1 THEN (assume_tac 1));
@@ -566,7 +562,7 @@
 by (dresolve_tac [lt_trans RSN (2, ospec)] 1 THEN (TRYALL assume_tac));
 by (dresolve_tac [disjI1 RSN (2, mp)] 1 THEN (assume_tac 1));
 by (etac ex1_two_eq 1);
-by (REPEAT (fast_tac FOL_cs 1));
+by (REPEAT (Fast_tac 1));
 val lemma_simp_induct = result();
 
 (* ********************************************************************** *)
--- a/src/ZF/AC/WO6_WO1.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/WO6_WO1.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -16,12 +16,12 @@
 by (res_inst_tac [("i","k"),("j","i")] Ord_linear2 1);
 by (dtac odiff_lt_mono2 4 THEN assume_tac 4);
 by (asm_full_simp_tac
-    (ZF_ss addsimps [oadd_odiff_inverse, odiff_oadd_inverse]) 4);
-by (safe_tac (ZF_cs addSEs [lt_Ord]));
+    (!simpset addsimps [oadd_odiff_inverse, odiff_oadd_inverse]) 4);
+by (safe_tac (!claset addSEs [lt_Ord]));
 val lt_oadd_odiff_disj = result();
 
 (*The corresponding elimination rule*)
-val lt_oadd_odiff_cases = rule_by_tactic (safe_tac ZF_cs)
+val lt_oadd_odiff_cases = rule_by_tactic (safe_tac (!claset))
                                          (lt_oadd_odiff_disj RS disjE);
 
 (* ********************************************************************** *)
@@ -33,25 +33,25 @@
 (* ********************************************************************** *)
 
 goalw thy [uu_def] "domain(uu(f,b,g,d)) <= f`b";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val domain_uu_subset = result();
 
 goal thy "!! a. ALL b<a. f`b lepoll m ==> \
 \               ALL b<a. ALL g<a. ALL d<a. domain(uu(f,b,g,d)) lepoll m";
-by (fast_tac (AC_cs addSEs
+by (fast_tac (!claset addSEs
         [domain_uu_subset RS subset_imp_lepoll RS lepoll_trans]) 1);
 val quant_domain_uu_lepoll_m = result();
 
 goalw thy [uu_def] "uu(f,b,g,d) <= f`b * f`g";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val uu_subset1 = result();
 
 goalw thy [uu_def] "uu(f,b,g,d) <= f`d";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 val uu_subset2 = result();
 
 goal thy "!! a. [| ALL b<a. f`b lepoll m;  d<a |] ==> uu(f,b,g,d) lepoll m";
-by (fast_tac (AC_cs
+by (fast_tac (!claset
         addSEs [uu_subset2 RS subset_imp_lepoll RS lepoll_trans]) 1);
 val uu_lepoll_m = result();
 
@@ -64,15 +64,15 @@
 \                                       u(f,b,g,d) lesspoll m)) |  \
 \            (EX b<a. f`b ~= 0 & (ALL g<a. ALL d<a. u(f,b,g,d) ~= 0 -->  \
 \                                       u(f,b,g,d) eqpoll m))";
-by (asm_simp_tac OrdQuant_ss 1);
-by (fast_tac AC_cs 1);
+by (Asm_simp_tac 1);
+by (Fast_tac 1);
 val cases = result();
 
 (* ********************************************************************** *)
 (* Lemmas used in both cases                                              *)
 (* ********************************************************************** *)
 goal thy "!!a C. Ord(a) ==> (UN b<a++a. C(b)) = (UN b<a. C(b) Un C(a++b))";
-by (fast_tac (AC_cs addSIs [equalityI] addIs [ltI] 
+by (fast_tac (!claset addSIs [equalityI] addIs [ltI] 
                     addSDs [lt_oadd_disj]
                     addSEs [lt_oadd1, oadd_lt_mono2]) 1);
 val UN_oadd = result();
@@ -85,7 +85,7 @@
 goalw thy [vv1_def] "vv1(f,m,b) <= f`b";
 by (rtac (LetI RS LetI) 1);
 by (split_tac [expand_if] 1);
-by (simp_tac (ZF_ss addsimps [domain_uu_subset]) 1);
+by (simp_tac (!simpset addsimps [domain_uu_subset]) 1);
 val vv1_subset = result();
 
 (* ********************************************************************** *)
@@ -95,14 +95,14 @@
   "!! a f y. [| Ord(a);  m:nat |] ==>   \
 \            (UN b<a++a. gg1(f,a,m)`b) = (UN b<a. f`b)";
 by (asm_simp_tac
-    (OrdQuant_ss addsimps [UN_oadd, lt_oadd1,
+    (!simpset addsimps [UN_oadd, lt_oadd1,
                            oadd_le_self RS le_imp_not_lt, lt_Ord,
                            odiff_oadd_inverse, ltD,
                            vv1_subset RS Diff_partition, ww1_def]) 1);
 val UN_gg1_eq = result();
 
 goal thy "domain(gg1(f,a,m)) = a++a";
-by (simp_tac (ZF_ss addsimps [lam_funtype RS domain_of_fun, gg1_def]) 1);
+by (simp_tac (!simpset addsimps [lam_funtype RS domain_of_fun, gg1_def]) 1);
 val domain_gg1 = result();
 
 (* ********************************************************************** *)
@@ -113,7 +113,7 @@
 \               ==> P(Least_a, LEAST b. P(Least_a, b))";
 by (etac ssubst 1);
 by (res_inst_tac [("Q","%z. P(z, LEAST b. P(z, b))")] LeastI2 1);
-by (REPEAT (fast_tac (ZF_cs addSEs [LeastI]) 1));
+by (REPEAT (fast_tac (!claset addSEs [LeastI]) 1));
 val nested_LeastI = result();
 
 val nested_Least_instance = 
@@ -129,24 +129,24 @@
 \                             domain(uu(f,b,g,d)) lepoll m);            \
 \            ALL b<a. f`b lepoll succ(m);  b<a++a                       \
 \         |] ==> gg1(f,a,m)`b lepoll m";
-by (asm_simp_tac OrdQuant_ss 1);
-by (safe_tac (OrdQuant_cs addSEs [lt_oadd_odiff_cases]));
+by (Asm_simp_tac 1);
+by (safe_tac (!claset addSEs [lt_oadd_odiff_cases]));
 (*Case b<a   : show vv1(f,m,b) lepoll m *)
-by (asm_simp_tac (ZF_ss addsimps [vv1_def, Let_def] 
+by (asm_simp_tac (!simpset addsimps [vv1_def, Let_def] 
                         setloop split_tac [expand_if]) 1);
-by (fast_tac (AC_cs addIs [nested_Least_instance RS conjunct2]
+by (fast_tac (!claset addIs [nested_Least_instance RS conjunct2]
                 addSEs [lt_Ord]
                 addSIs [empty_lepollI]) 1);
 (*Case a le b: show ww1(f,m,b--a) lepoll m *)
-by (asm_simp_tac (ZF_ss addsimps [ww1_def]) 1);
+by (asm_simp_tac (!simpset addsimps [ww1_def]) 1);
 by (excluded_middle_tac "f`(b--a) = 0" 1);
-by (asm_simp_tac (OrdQuant_ss addsimps [empty_lepollI]) 2);
+by (asm_simp_tac (!simpset addsimps [empty_lepollI]) 2);
 by (rtac Diff_lepoll 1);
-by (fast_tac AC_cs 1);
+by (Fast_tac 1);
 by (rtac vv1_subset 1);
 by (dtac (ospec RS mp) 1);
 by (REPEAT (eresolve_tac [asm_rl, oexE] 1));
-by (asm_simp_tac (ZF_ss
+by (asm_simp_tac (!simpset
         addsimps [vv1_def, Let_def, lt_Ord, 
                   nested_Least_instance RS conjunct1]) 1);
 val gg1_lepoll_m = result();
@@ -162,7 +162,7 @@
 goalw thy [uu_def] "!!f. [| b<a;  g<a;  f`b~=0;  f`g~=0;        \
 \                           y*y <= y;  (UN b<a. f`b)=y          \
 \                        |] ==> EX d<a. uu(f,b,g,d) ~= 0";
-by (fast_tac (AC_cs addSIs [not_emptyI] 
+by (fast_tac (!claset addSIs [not_emptyI] 
                     addSDs [SigmaI RSN (2, subsetD)]
                     addSEs [not_emptyE]) 1);
 val ex_d_uu_not_empty = result();
@@ -171,10 +171,10 @@
 \                       y*y<=y; (UN b<a. f`b)=y |]  \
 \               ==> uu(f,b,g,LEAST d. (uu(f,b,g,d) ~= 0)) ~= 0";
 by (dtac ex_d_uu_not_empty 1 THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSEs [LeastI, lt_Ord]) 1);
+by (fast_tac (!claset addSEs [LeastI, lt_Ord]) 1);
 val uu_not_empty = result();
 
-goal ZF.thy "!!r. [| r<=A*B; r~=0 |] ==> domain(r)~=0";
+goal upair.thy "!!r. [| r<=A*B; r~=0 |] ==> domain(r)~=0";
 by (REPEAT (eresolve_tac [asm_rl, not_emptyE, subsetD RS SigmaE, 
                 sym RSN (2, subst_elem) RS domainI RS not_emptyI] 1));
 val not_empty_rel_imp_domain = result();
@@ -188,14 +188,14 @@
         THEN (REPEAT (ares_tac [lt_Ord] 1)));
 val Least_uu_not_empty_lt_a = result();
 
-goal ZF.thy "!!B. [| B<=A; a~:B |] ==> B <= A-{a}";
-by (fast_tac ZF_cs 1);
+goal upair.thy "!!B. [| B<=A; a~:B |] ==> B <= A-{a}";
+by (Fast_tac 1);
 val subset_Diff_sing = result();
 
 (*Could this be proved more directly?*)
 goal thy "!!A B. [| A lepoll m; m lepoll B; B <= A; m:nat |] ==> A=B";
 by (etac natE 1);
-by (fast_tac (AC_cs addSDs [lepoll_0_is_0] addSIs [equalityI]) 1);
+by (fast_tac (!claset addSDs [lepoll_0_is_0] addSIs [equalityI]) 1);
 by (hyp_subst_tac 1);
 by (rtac equalityI 1);
 by (assume_tac 2);
@@ -222,7 +222,7 @@
         uu_subset1 RSN (4, rel_is_fun)))] 1
         THEN TRYALL assume_tac);
 by (rtac (eqpoll_sym RS eqpoll_imp_lepoll RSN (2, supset_lepoll_imp_eq)) 1);
-by (REPEAT (fast_tac (AC_cs addSIs [domain_uu_subset, nat_succI]) 1));
+by (REPEAT (fast_tac (!claset addSIs [domain_uu_subset, nat_succI]) 1));
 val uu_Least_is_fun = result();
 
 goalw thy [vv2_def]
@@ -232,9 +232,9 @@
 \            (UN b<a. f`b)=y;  b<a;  g<a;  m:nat;  s:f`b                \
 \          |] ==> vv2(f,b,g,s) <= f`g";
 by (split_tac [expand_if] 1);
-by (fast_tac (FOL_cs addSEs [uu_Least_is_fun]
-                     addSIs [empty_subsetI, not_emptyI, 
-                             singleton_subsetI, apply_type]) 1);
+by (Step_tac 1);
+be (uu_Least_is_fun RS apply_type) 1;
+by (REPEAT_SOME (fast_tac (!claset addSIs [not_emptyI, singleton_subsetI])));
 val vv2_subset = result();
 
 (* ********************************************************************** *)
@@ -248,14 +248,14 @@
 \         |] ==> (UN g<a++a. gg2(f,a,b,s) ` g) = y";
 by (dtac sym 1);
 by (asm_simp_tac
-    (OrdQuant_ss addsimps [UN_oadd, lt_oadd1,
+    (!simpset addsimps [UN_oadd, lt_oadd1,
                            oadd_le_self RS le_imp_not_lt, lt_Ord,
                            odiff_oadd_inverse, ww2_def,
                            vv2_subset RS Diff_partition]) 1);
 val UN_gg2_eq = result();
 
 goal thy "domain(gg2(f,a,b,s)) = a++a";
-by (simp_tac (ZF_ss addsimps [lam_funtype RS domain_of_fun, gg2_def]) 1);
+by (simp_tac (!simpset addsimps [lam_funtype RS domain_of_fun, gg2_def]) 1);
 val domain_gg2 = result();
 
 (* ********************************************************************** *)
@@ -264,9 +264,9 @@
 
 goalw thy [vv2_def]
     "!!m. [| m:nat; m~=0 |] ==> vv2(f,b,g,s) lepoll m";
-by (asm_simp_tac (OrdQuant_ss addsimps [empty_lepollI]
+by (asm_simp_tac (!simpset addsimps [empty_lepollI]
                               setloop split_tac [expand_if]) 1);
-by (fast_tac (AC_cs
+by (fast_tac (!claset
         addSDs [le_imp_subset RS subset_imp_lepoll RS lepoll_0_is_0]
         addSIs [singleton_eqpoll_1 RS eqpoll_imp_lepoll RS lepoll_trans,
                 not_lt_imp_le RS le_imp_subset RS subset_imp_lepoll,
@@ -277,11 +277,11 @@
     "!!m. [| ALL b<a. f`b lepoll succ(m);  g<a;  m:nat;  vv2(f,b,g,d) <= f`g  \
 \         |] ==> ww2(f,b,g,d) lepoll m";
 by (excluded_middle_tac "f`g = 0" 1);
-by (asm_simp_tac (OrdQuant_ss addsimps [empty_lepollI]) 2);
+by (asm_simp_tac (!simpset addsimps [empty_lepollI]) 2);
 by (dtac ospec 1 THEN (assume_tac 1));
 by (rtac Diff_lepoll 1
         THEN (TRYALL assume_tac));
-by (asm_simp_tac (OrdQuant_ss addsimps [vv2_def, expand_if, not_emptyI]) 1);
+by (asm_simp_tac (!simpset addsimps [vv2_def, expand_if, not_emptyI]) 1);
 val ww2_lepoll = result();
 
 goalw thy [gg2_def]
@@ -290,10 +290,10 @@
 \            ALL b<a. f`b lepoll succ(m);  y*y <= y;                    \
 \            (UN b<a. f`b)=y;  b<a;  s:f`b;  m:nat;  m~= 0;  g<a++a     \
 \         |] ==> gg2(f,a,b,s) ` g lepoll m";
-by (asm_simp_tac OrdQuant_ss 1);
-by (safe_tac (OrdQuant_cs addSEs [lt_oadd_odiff_cases, lt_Ord2]));
-by (asm_simp_tac (OrdQuant_ss addsimps [vv2_lepoll]) 1);
-by (asm_simp_tac (ZF_ss addsimps [ww2_lepoll, vv2_subset]) 1);
+by (Asm_simp_tac 1);
+by (safe_tac (!claset addSEs [lt_oadd_odiff_cases, lt_Ord2]));
+by (asm_simp_tac (!simpset addsimps [vv2_lepoll]) 1);
+by (asm_simp_tac (!simpset addsimps [ww2_lepoll, vv2_subset]) 1);
 val gg2_lepoll_m = result();
 
 (* ********************************************************************** *)
@@ -305,9 +305,9 @@
 by (resolve_tac [quant_domain_uu_lepoll_m RS cases RS disjE] 1
     THEN (assume_tac 1));
 (* case 1 *)
-by (asm_full_simp_tac (ZF_ss addsimps [lesspoll_succ_iff]) 1);
+by (asm_full_simp_tac (!simpset addsimps [lesspoll_succ_iff]) 1);
 by (res_inst_tac [("x","a++a")] exI 1);
-by (fast_tac (OrdQuant_cs addSIs [Ord_oadd, domain_gg1, UN_gg1_eq, 
+by (fast_tac (!claset addSIs [Ord_oadd, domain_gg1, UN_gg1_eq, 
                                   gg1_lepoll_m]) 1);
 (* case 2 *)
 by (REPEAT (eresolve_tac [oexE, conjE] 1));
@@ -318,7 +318,7 @@
 by (res_inst_tac [("x","gg2(f,a,b,x)")] exI 1);
 (*Calling fast_tac might get rid of the res_inst_tac calls, but it
   is just too slow.*)
-by (asm_simp_tac (OrdQuant_ss addsimps 
+by (asm_simp_tac (!simpset addsimps 
                   [Ord_oadd, domain_gg2, UN_gg2_eq, gg2_lepoll_m]) 1);
 val lemma_ii = result();
 
@@ -333,14 +333,14 @@
 
 goal thy "ALL n:nat. rec(n, x, %k r. r Un r*r) <=  \
 \                    rec(succ(n), x, %k r. r Un r*r)";
-by (fast_tac (ZF_cs addIs [rec_succ RS ssubst]) 1);
+by (fast_tac (!claset addIs [rec_succ RS ssubst]) 1);
 val z_n_subset_z_succ_n = result();
 
 goal thy "!!n. [| ALL n:nat. f(n)<=f(succ(n)); n le m; n : nat; m: nat |]  \
 \              ==> f(n)<=f(m)";
-by (res_inst_tac [("P","n le m")] impE 1 THEN (REPEAT (assume_tac 2)));
+by (eres_inst_tac [("P","n le m")] rev_mp 1);
 by (res_inst_tac [("P","%z. n le z --> f(n) <= f(z)")] nat_induct 1);
-by (REPEAT (fast_tac lt_cs 1));
+by (REPEAT (fast_tac le_cs 1));
 val le_subsets = result();
 
 goal thy "!!n m. [| n le m; m:nat |] ==>  \
@@ -353,13 +353,14 @@
 
 goal thy "EX y. x Un y*y <= y";
 by (res_inst_tac [("x","UN n:nat. rec(n, x, %k r. r Un r*r)")] exI 1);
-by (safe_tac ZF_cs);
-by (fast_tac (ZF_cs addSIs [nat_0I] addss nat_ss) 1);
+by (safe_tac (!claset));
+br (nat_0I RS UN_I) 1;
+by (Asm_simp_tac 1);
 by (res_inst_tac [("a","succ(n Un na)")] UN_I 1);
 by (eresolve_tac [Un_nat_type RS nat_succI] 1 THEN (assume_tac 1));
 by (fast_tac (ZF_cs addIs [le_imp_rec_subset RS subsetD]
                 addSIs [Un_upper1_le, Un_upper2_le, Un_nat_type]
-                addSEs [nat_into_Ord] addss nat_ss) 1);
+                addSEs [nat_into_Ord] addss (!simpset)) 1);
 val lemma_iv = result();
 
 (* ********************************************************************** *)
@@ -387,13 +388,13 @@
 
 goal thy "!!f. [| (UN b<a. f`b)=y; x:y; ALL b<a. f`b lepoll 1; Ord(a) |]  \
 \               ==> EX c<a. f`c = {x}";
-by (fast_tac (AC_cs addSEs [lepoll_1_is_sing]) 1);
+by (fast_tac (!claset addSEs [lepoll_1_is_sing]) 1);
 val lemma1 = result();
 
 goal thy "!!f. [| (UN b<a. f`b)=y; x:y; ALL b<a. f`b lepoll 1; Ord(a) |]  \
 \               ==> f` (LEAST i. f`i = {x}) = {x}";
 by (dtac lemma1 1 THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSEs [lt_Ord] addIs [LeastI]) 1);
+by (fast_tac (!claset addSEs [lt_Ord] addIs [LeastI]) 1);
 val lemma2 = result();
 
 goalw thy [NN_def] "!!y. 1 : NN(y) ==> EX a f. Ord(a) & f:inj(y, a)";
@@ -404,14 +405,14 @@
 by (rtac conjI 1 THEN (assume_tac 1));
 by (res_inst_tac [("d","%i. THE x. x:f`i")] lam_injective 1);
 by (dtac lemma1 1 THEN REPEAT (assume_tac 1));
-by (fast_tac (AC_cs addSEs [Least_le RS lt_trans1 RS ltD, lt_Ord]) 1);
+by (fast_tac (!claset addSEs [Least_le RS lt_trans1 RS ltD, lt_Ord]) 1);
 by (resolve_tac [lemma2 RS ssubst] 1 THEN REPEAT (assume_tac 1));
-by (fast_tac (ZF_cs addSIs [the_equality]) 1);
+by (fast_tac (!claset addSIs [the_equality]) 1);
 val NN_imp_ex_inj = result();
 
 goal thy "!!y. [| y*y <= y; 1 : NN(y) |] ==> EX r. well_ord(y, r)";
 by (dtac NN_imp_ex_inj 1);
-by (fast_tac (ZF_cs addSEs [well_ord_Memrel RSN (2,  well_ord_rvimage)]) 1);
+by (fast_tac (!claset addSEs [well_ord_Memrel RSN (2,  well_ord_rvimage)]) 1);
 val y_well_ord = result();
 
 (* ********************************************************************** *)
@@ -423,10 +424,10 @@
 \       ==> n~=0 --> P(n) --> P(1)";
 by (res_inst_tac [("n","n")] nat_induct 1);
 by (rtac prem1 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 by (excluded_middle_tac "x=0" 1);
-by (fast_tac ZF_cs 2);
-by (fast_tac (ZF_cs addSIs [prem2]) 1);
+by (Fast_tac 2);
+by (fast_tac (!claset addSIs [prem2]) 1);
 val rev_induct_lemma = result();
 
 val prems = goal thy
@@ -453,21 +454,21 @@
 
 (* another helpful lemma *)
 goalw thy [NN_def] "!!y. 0:NN(y) ==> y=0";
-by (fast_tac (AC_cs addSIs [equalityI] 
+by (fast_tac (!claset addSIs [equalityI] 
                     addSDs [lepoll_0_is_0] addEs [subst]) 1);
 val NN_y_0 = result();
 
 goalw thy [WO1_def] "!!Z. WO6 ==> WO1";
 by (rtac allI 1);
 by (excluded_middle_tac "A=0" 1);
-by (fast_tac (ZF_cs addSIs [well_ord_Memrel, nat_0I RS nat_into_Ord]) 2);
+by (fast_tac (!claset addSIs [well_ord_Memrel, nat_0I RS nat_into_Ord]) 2);
 by (res_inst_tac [("x1","A")] (lemma_iv RS revcut_rl) 1);
 by (etac exE 1);
 by (dtac WO6_imp_NN_not_empty 1);
 by (eresolve_tac [Un_subset_iff RS iffD1 RS conjE] 1);
 by (eres_inst_tac [("A","NN(y)")] not_emptyE 1);
 by (forward_tac [y_well_ord] 1);
-by (fast_tac (ZF_cs addEs [well_ord_subset]) 2);
-by (fast_tac (ZF_cs addSIs [lemma3] addSDs [NN_y_0] addSEs [not_emptyE]) 1);
+by (fast_tac (!claset addEs [well_ord_subset]) 2);
+by (fast_tac (!claset addSIs [lemma3] addSDs [NN_y_0] addSEs [not_emptyE]) 1);
 qed "WO6_imp_WO1";
 
--- a/src/ZF/AC/WO_AC.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/WO_AC.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -9,14 +9,14 @@
 
 goal thy "!!A. [| well_ord(Union(A),r); 0~:A; B:A |]  \
 \               ==> (THE b. first(b,B,r)) : B";
-by (fast_tac (AC_cs addSEs [well_ord_imp_ex1_first RS theI RS
+by (fast_tac (!claset addSEs [well_ord_imp_ex1_first RS theI RS
                 (first_def RS def_imp_iff RS iffD1 RS conjunct1)]) 1);
 val first_in_B = result();
 
 goal thy "!!A. [| well_ord(Union(A), R); 0~:A |] ==> EX f. f:(PROD X:A. X)";
-by (fast_tac (AC_cs addSEs [first_in_B] addSIs [lam_type]) 1);
+by (fast_tac (!claset addSEs [first_in_B] addSIs [lam_type]) 1);
 val ex_choice_fun = result();
 
 goal thy "!!A. well_ord(A, R) ==> EX f. f:(PROD X: Pow(A)-{0}. X)";
-by (fast_tac (AC_cs addSEs [well_ord_subset RS ex_choice_fun]) 1);
+by (fast_tac (!claset addSEs [well_ord_subset RS ex_choice_fun]) 1);
 val ex_choice_fun_Pow = result();
--- a/src/ZF/AC/WO_AC.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/WO_AC.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -1,3 +1,3 @@
 (*Dummy theory to document dependencies *)
 
-WO_AC = Order + first
+WO_AC = Order
--- a/src/ZF/AC/first.ML	Fri Jan 03 10:48:28 1997 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-(*  Title:      ZF/AC/first.ML
-    ID:         $Id$
-    Author:     Krzysztof Grabczewski
-
-Lemmas involving the first element of a well ordered set
-*)
-
-open first;
-
-goalw thy [first_def] "!!b. first(b,B,r) ==> b:B";
-by (fast_tac AC_cs 1);
-val first_is_elem = result();
-
-goalw thy [well_ord_def, wf_on_def, wf_def,     first_def] 
-        "!!r. [| well_ord(A,r); B<=A; B~=0 |] ==> (EX! b. first(b,B,r))";
-by (REPEAT (eresolve_tac [conjE,allE,disjE] 1));
-by (contr_tac 1);
-by (etac bexE 1);
-by (res_inst_tac [("a","x")] ex1I 1);
-by (fast_tac ZF_cs 2);
-by (rewrite_goals_tac [tot_ord_def, linear_def]);
-by (fast_tac ZF_cs 1);
-val well_ord_imp_ex1_first = result();
-
-goal thy "!!r. [| well_ord(A,r); B<=A; B~=0 |] ==> (THE b. first(b,B,r)) : B";
-by (dtac well_ord_imp_ex1_first 1 THEN REPEAT (assume_tac 1));
-by (rtac first_is_elem 1);
-by (etac theI 1);
-val the_first_in = result();
--- a/src/ZF/AC/first.thy	Fri Jan 03 10:48:28 1997 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-(*  Title:      ZF/AC/first.thy
-    ID:         $Id$
-    Author:     Krzysztof Grabczewski
-
-Theory helpful in proofs using first element of a well ordered set
-*)
-
-first = Order +
-
-consts
-
-  first                   :: [i, i, i] => o
-
-defs
-
-  first_def                "first(u, X, R) 
-                            == u:X & (ALL v:X. v~=u --> <u,v> : R)"
-end
--- a/src/ZF/AC/recfunAC16.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/recfunAC16.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -33,15 +33,15 @@
 (* ********************************************************************** *)
 
 val [prem1, prem2] = goal thy 
-    "[| !!g r. r <= B(g,r); Ord(i) |]  \
+    "[| !!g r. r <= B(g,r);  Ord(i) |]  \
 \       ==> j<i --> transrec2(j, 0, B) <= transrec2(i, 0, B)";
 by (resolve_tac [prem2 RS trans_induct] 1);
 by (rtac Ord_cases 1 THEN (REPEAT (assume_tac 1)));
-by (fast_tac lt_cs 1);
-by (asm_simp_tac (AC_ss addsimps [transrec2_succ]) 1);
+by (Fast_tac 1);
+by (Asm_simp_tac 1);
 by (fast_tac (FOL_cs addSIs [succI1, prem1]
         addSEs [ballE, leE, prem1 RSN (2, subset_trans)]) 1);
-by (fast_tac (AC_cs addIs [OUN_I, ltI]
+by (fast_tac (!claset addIs [OUN_I, ltI]
         addSEs [Limit_has_succ RS ltE, succI1 RSN (2, Ord_in_Ord) RS le_refl,
                 transrec2_Limit RS ssubst]) 1);
 val transrec2_mono_lemma = result();
@@ -50,7 +50,7 @@
 \       ==> transrec2(j, 0, B) <= transrec2(i, 0, B)";
 by (resolve_tac [prem2 RS leE] 1);
 by (resolve_tac [transrec2_mono_lemma RS impE] 1);
-by (TRYALL (fast_tac (AC_cs addSIs [prem1, prem2, lt_Ord2])));
+by (TRYALL (fast_tac (!claset addSIs [prem1, prem2, lt_Ord2])));
 val transrec2_mono = result();
 
 (* ********************************************************************** *)
@@ -60,6 +60,6 @@
 goalw thy [recfunAC16_def]
         "!!i. i le j ==> recfunAC16(f, g, i, a) <= recfunAC16(f, g, j, a)";
 by (rtac transrec2_mono 1);
-by (REPEAT (fast_tac (AC_cs addIs [expand_if RS iffD2]) 1));
+by (REPEAT (fast_tac (!claset addIs [expand_if RS iffD2]) 1));
 val recfunAC16_mono = result();
 
--- a/src/ZF/AC/recfunAC16.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/recfunAC16.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -5,15 +5,11 @@
 A recursive definition used in the proof of WO2 ==> AC16
 *)
 
-recfunAC16 = Transrec2 + Cardinal +
-
-consts
+recfunAC16 = Cardinal + Epsilon +
 
-  recfunAC16              :: [i, i, i, i] => i
+constdefs
+  recfunAC16 :: [i, i, i, i] => i
 
-defs
-
-  recfunAC16_def
     "recfunAC16(f,fa,i,a) == 
          transrec2(i, 0, 
               %g r. if(EX y:r. fa`g <= y, r, 
--- a/src/ZF/AC/rel_is_fun.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/rel_is_fun.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -15,36 +15,28 @@
 by (res_inst_tac [("x",
         "lam x:domain(u). LEAST i. EX y. <x,y> : u & f`<x,y> = i")] exI 1);
 by (res_inst_tac [("d","%y. fst(converse(f)`y)")] lam_injective 1);
-by (fast_tac (ZF_cs addIs [LeastI2, nat_into_Ord RS Ord_in_Ord,
+by (fast_tac (!claset addIs [LeastI2, nat_into_Ord RS Ord_in_Ord,
                         inj_is_fun RS apply_type]) 1);
 by (etac domainE 1);
 by (forward_tac [inj_is_fun RS apply_type] 1 THEN (atac 1));
 by (rtac LeastI2 1);
-by (REPEAT (fast_tac (ZF_cs addIs [fst_conv, left_inverse RS ssubst]
+by (REPEAT (fast_tac (!claset addIs [fst_conv, left_inverse RS ssubst]
                         addSEs [nat_into_Ord RS Ord_in_Ord]) 1));
 val lepoll_m_imp_domain_lepoll_m = result();
 
-goal ZF.thy "!!r. [| <a,c> : r; c~=b |] ==> domain(r-{<a,b>}) = domain(r)";
-by (rtac equalityI 1);
-by (fast_tac (ZF_cs addSIs [domain_mono]) 1);
-by (rtac subsetI 1);
-by (excluded_middle_tac "x = a" 1);
-by (REPEAT (fast_tac ZF_cs 1));
-val domain_Diff_eq_domain = result();
-
 goalw Cardinal.thy [function_def]
     "!!r. [| succ(m) lepoll domain(r); r lepoll succ(m); m:nat |] ==> \
 \         function(r)";
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (resolve_tac [excluded_middle RS disjE] 1 THEN (atac 2));
-by (fast_tac (ZF_cs addSEs [lepoll_trans RS succ_lepoll_natE, 
+by (fast_tac (!claset addSEs [lepoll_trans RS succ_lepoll_natE, 
                         Diff_sing_lepoll RSN (2, lepoll_m_imp_domain_lepoll_m)]
-                addEs [not_sym RSN (2, domain_Diff_eq_domain) RS subst]) 1);
+                addEs [not_sym RSN (2, domain_Diff_eq) RS subst]) 1);
 val rel_domain_ex1 = result();
 
 goal Cardinal.thy
     "!!r. [| succ(m) lepoll domain(r);  r lepoll succ(m);  m:nat;  \
 \            r<=A*B; A=domain(r) |] ==> r: A->B";
 by (hyp_subst_tac 1);
-by (asm_simp_tac (ZF_ss addsimps [Pi_iff, rel_domain_ex1]) 1);
+by (asm_simp_tac (!simpset addsimps [Pi_iff, rel_domain_ex1]) 1);
 val rel_is_fun = result();
--- a/src/ZF/AC/rel_is_fun.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/AC/rel_is_fun.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -1,3 +1,1 @@
-(*Dummy theory to document dependencies *)
-
-rel_is_fun = "Cardinal"
+rel_is_fun = Cardinal
--- a/src/ZF/Arith.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Arith.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -29,9 +29,11 @@
 
 goal Arith.thy "rec(succ(m),a,b) = b(m, rec(m,a,b))";
 by (rtac rec_trans 1);
-by (simp_tac (ZF_ss addsimps [nat_case_succ, nat_succI]) 1);
+by (Simp_tac 1);
 qed "rec_succ";
 
+Addsimps [rec_0, rec_succ];
+
 val major::prems = goal Arith.thy
     "[| n: nat;  \
 \       a: C(0);  \
@@ -39,22 +41,17 @@
 \    |] ==> rec(n,a,b) : C(n)";
 by (rtac (major RS nat_induct) 1);
 by (ALLGOALS
-    (asm_simp_tac (ZF_ss addsimps (prems@[rec_0,rec_succ]))));
+    (asm_simp_tac (!simpset addsimps prems)));
 qed "rec_type";
 
+Addsimps [rec_type, nat_0_le, nat_le_refl];
 val nat_typechecks = [rec_type, nat_0I, nat_1I, nat_succI, Ord_nat];
 
-val nat_simps = [rec_0, rec_succ, not_lt0, nat_0_le, le0_iff, succ_le_iff,
-                 nat_le_refl];
-
-val nat_ss = ZF_ss addsimps (nat_simps @ nat_typechecks);
-
-
 goal Arith.thy "!!k. [| 0<k; k: nat |] ==> EX j: nat. k = succ(j)";
 by (etac rev_mp 1);
 by (etac nat_induct 1);
-by (simp_tac nat_ss 1);
-by (fast_tac ZF_cs 1);
+by (Simp_tac 1);
+by (Fast_tac 1);
 val lemma = result();
 
 (* [| 0 < k; k: nat; !!j. [| j: nat; k = succ(j) |] ==> Q |] ==> Q *)
@@ -75,6 +72,8 @@
     "succ(m) #+ n = succ(m #+ n)"
  (fn _=> [ (rtac rec_succ 1) ]); 
 
+Addsimps [add_0, add_succ];
+
 (** Multiplication **)
 
 qed_goalw "mult_type" Arith.thy [mult_def]
@@ -90,6 +89,8 @@
     "succ(m) #* n = n #+ (m #* n)"
  (fn _ => [ (rtac rec_succ 1) ]); 
 
+Addsimps [mult_0, mult_succ];
+
 (** Difference **)
 
 qed_goalw "diff_type" Arith.thy [diff_def]
@@ -104,35 +105,32 @@
     "n:nat ==> 0 #- n = 0"
  (fn [prem]=>
   [ (rtac (prem RS nat_induct) 1),
-    (ALLGOALS (asm_simp_tac nat_ss)) ]);
+    (ALLGOALS (Asm_simp_tac)) ]);
 
 (*Must simplify BEFORE the induction!!  (Else we get a critical pair)
   succ(m) #- succ(n)   rewrites to   pred(succ(m) #- n)  *)
 qed_goalw "diff_succ_succ" Arith.thy [diff_def]
     "[| m:nat;  n:nat |] ==> succ(m) #- succ(n) = m #- n"
  (fn prems=>
-  [ (asm_simp_tac (nat_ss addsimps prems) 1),
+  [ (asm_simp_tac (!simpset addsimps prems) 1),
     (nat_ind_tac "n" prems 1),
-    (ALLGOALS (asm_simp_tac (nat_ss addsimps prems))) ]);
+    (ALLGOALS (asm_simp_tac (!simpset addsimps prems))) ]);
+
+Addsimps [diff_0, diff_0_eq_0, diff_succ_succ];
 
 val prems = goal Arith.thy 
     "[| m:nat;  n:nat |] ==> m #- n le m";
 by (rtac (prems MRS diff_induct) 1);
 by (etac leE 3);
 by (ALLGOALS
-    (asm_simp_tac
-     (nat_ss addsimps (prems @ [le_iff, diff_0, diff_0_eq_0, 
-                                diff_succ_succ, nat_into_Ord]))));
+    (asm_simp_tac (!simpset addsimps (prems @ [le_iff, nat_into_Ord]))));
 qed "diff_le_self";
 
 (*** Simplification over add, mult, diff ***)
 
 val arith_typechecks = [add_type, mult_type, diff_type];
-val arith_simps = [add_0, add_succ,
-                   mult_0, mult_succ,
-                   diff_0, diff_0_eq_0, diff_succ_succ];
+Addsimps arith_typechecks;
 
-val arith_ss = nat_ss addsimps (arith_simps@arith_typechecks);
 
 (*** Addition ***)
 
@@ -141,7 +139,7 @@
     "m:nat ==> (m #+ n) #+ k = m #+ (n #+ k)"
  (fn prems=>
   [ (nat_ind_tac "m" prems 1),
-    (ALLGOALS (asm_simp_tac (arith_ss addsimps prems))) ]);
+    (ALLGOALS (asm_simp_tac (!simpset addsimps prems))) ]);
 
 (*The following two lemmas are used for add_commute and sometimes
   elsewhere, since they are safe for rewriting.*)
@@ -149,26 +147,27 @@
     "m:nat ==> m #+ 0 = m"
  (fn prems=>
   [ (nat_ind_tac "m" prems 1),
-    (ALLGOALS (asm_simp_tac (arith_ss addsimps prems))) ]); 
+    (ALLGOALS (asm_simp_tac (!simpset addsimps prems))) ]); 
 
 qed_goal "add_succ_right" Arith.thy
     "m:nat ==> m #+ succ(n) = succ(m #+ n)"
  (fn prems=>
   [ (nat_ind_tac "m" prems 1),
-    (ALLGOALS (asm_simp_tac (arith_ss addsimps prems))) ]); 
+    (ALLGOALS (asm_simp_tac (!simpset addsimps prems))) ]); 
+
+Addsimps [add_0_right, add_succ_right];
 
 (*Commutative law for addition*)  
 qed_goal "add_commute" Arith.thy 
     "!!m n. [| m:nat;  n:nat |] ==> m #+ n = n #+ m"
  (fn _ =>
   [ (nat_ind_tac "n" [] 1),
-    (ALLGOALS
-     (asm_simp_tac (arith_ss addsimps [add_0_right, add_succ_right]))) ]);
+    (ALLGOALS Asm_simp_tac) ]);
 
 (*for a/c rewriting*)
 qed_goal "add_left_commute" Arith.thy
     "!!m n k. [| m:nat;  n:nat |] ==> m#+(n#+k)=n#+(m#+k)"
- (fn _ => [asm_simp_tac (ZF_ss addsimps [add_assoc RS sym, add_commute]) 1]);
+ (fn _ => [asm_simp_tac(!simpset addsimps [add_assoc RS sym, add_commute]) 1]);
 
 (*Addition is an AC-operator*)
 val add_ac = [add_assoc, add_commute, add_left_commute];
@@ -178,7 +177,7 @@
     "[| k #+ m = k #+ n;  k:nat |] ==> m=n";
 by (rtac (eqn RS rev_mp) 1);
 by (nat_ind_tac "k" [knat] 1);
-by (ALLGOALS (simp_tac arith_ss));
+by (ALLGOALS (Simp_tac));
 qed "add_left_cancel";
 
 (*** Multiplication ***)
@@ -188,53 +187,53 @@
     "!!m. m:nat ==> m #* 0 = 0"
  (fn _=>
   [ (nat_ind_tac "m" [] 1),
-    (ALLGOALS (asm_simp_tac arith_ss))  ]);
+    (ALLGOALS (Asm_simp_tac))  ]);
 
 (*right successor law for multiplication*)
 qed_goal "mult_succ_right" Arith.thy 
     "!!m n. [| m:nat;  n:nat |] ==> m #* succ(n) = m #+ (m #* n)"
  (fn _ =>
   [ (nat_ind_tac "m" [] 1),
-    (ALLGOALS (asm_simp_tac (arith_ss addsimps add_ac))) ]);
+    (ALLGOALS (asm_simp_tac (!simpset addsimps add_ac))) ]);
+
+Addsimps [mult_0_right, mult_succ_right];
 
 goal Arith.thy "!!n. n:nat ==> 1 #* n = n";
-by (asm_simp_tac (arith_ss addsimps [add_0_right]) 1);
+by (Asm_simp_tac 1);
 qed "mult_1";
 
 goal Arith.thy "!!n. n:nat ==> n #* 1 = n";
-by (asm_simp_tac (arith_ss addsimps [mult_0_right, add_0_right, 
-                                     mult_succ_right]) 1);
+by (Asm_simp_tac 1);
 qed "mult_1_right";
 
 (*Commutative law for multiplication*)
 qed_goal "mult_commute" Arith.thy 
-    "[| m:nat;  n:nat |] ==> m #* n = n #* m"
- (fn prems=>
-  [ (nat_ind_tac "m" prems 1),
-    (ALLGOALS (asm_simp_tac
-             (arith_ss addsimps (prems@[mult_0_right, mult_succ_right])))) ]);
+    "!!m n. [| m:nat;  n:nat |] ==> m #* n = n #* m"
+ (fn _=>
+  [ (nat_ind_tac "m" [] 1),
+    (ALLGOALS Asm_simp_tac) ]);
 
 (*addition distributes over multiplication*)
 qed_goal "add_mult_distrib" Arith.thy 
     "!!m n. [| m:nat;  k:nat |] ==> (m #+ n) #* k = (m #* k) #+ (n #* k)"
  (fn _=>
   [ (etac nat_induct 1),
-    (ALLGOALS (asm_simp_tac (arith_ss addsimps [add_assoc RS sym]))) ]);
+    (ALLGOALS (asm_simp_tac (!simpset addsimps [add_assoc RS sym]))) ]);
 
 (*Distributive law on the left; requires an extra typing premise*)
 qed_goal "add_mult_distrib_left" Arith.thy 
     "!!m. [| m:nat;  n:nat;  k:nat |] ==> k #* (m #+ n) = (k #* m) #+ (k #* n)"
  (fn prems=>
   [ (nat_ind_tac "m" [] 1),
-    (asm_simp_tac (arith_ss addsimps [mult_0_right]) 1),
-    (asm_simp_tac (arith_ss addsimps ([mult_succ_right] @ add_ac)) 1) ]);
+    (Asm_simp_tac 1),
+    (asm_simp_tac (!simpset addsimps add_ac) 1) ]);
 
 (*Associative law for multiplication*)
 qed_goal "mult_assoc" Arith.thy 
     "!!m n k. [| m:nat;  n:nat;  k:nat |] ==> (m #* n) #* k = m #* (n #* k)"
  (fn _=>
   [ (etac nat_induct 1),
-    (ALLGOALS (asm_simp_tac (arith_ss addsimps [add_mult_distrib]))) ]);
+    (ALLGOALS (asm_simp_tac (!simpset addsimps [add_mult_distrib]))) ]);
 
 (*for a/c rewriting*)
 qed_goal "mult_left_commute" Arith.thy 
@@ -253,7 +252,7 @@
     "m:nat ==> m #- m = 0"
  (fn prems=>
   [ (nat_ind_tac "m" prems 1),
-    (ALLGOALS (asm_simp_tac (arith_ss addsimps prems))) ]);
+    (ALLGOALS (asm_simp_tac (!simpset addsimps prems))) ]);
 
 (*Addition is the inverse of subtraction*)
 goal Arith.thy "!!m n. [| n le m;  m:nat |] ==> n #+ (m#-n) = m";
@@ -261,7 +260,7 @@
 by (etac nat_succI 1);
 by (etac rev_mp 1);
 by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
-by (ALLGOALS (asm_simp_tac arith_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "add_diff_inverse";
 
 (*Proof is IDENTICAL to that above*)
@@ -270,7 +269,7 @@
 by (etac nat_succI 1);
 by (etac rev_mp 1);
 by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
-by (ALLGOALS (asm_simp_tac arith_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "diff_succ";
 
 (** Subtraction is the inverse of addition. **)
@@ -278,7 +277,7 @@
 val [mnat,nnat] = goal Arith.thy
     "[| m:nat;  n:nat |] ==> (n#+m) #- n = m";
 by (rtac (nnat RS nat_induct) 1);
-by (ALLGOALS (asm_simp_tac (arith_ss addsimps [mnat])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [mnat])));
 qed "diff_add_inverse";
 
 goal Arith.thy
@@ -290,19 +289,19 @@
 goal Arith.thy
     "!!k. [| k:nat; m: nat; n: nat |] ==> (k#+m) #- (k#+n) = m #- n";
 by (nat_ind_tac "k" [] 1);
-by (ALLGOALS (asm_simp_tac arith_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "diff_cancel";
 
 goal Arith.thy
     "!!n. [| k:nat; m: nat; n: nat |] ==> (m#+k) #- (n#+k) = m #- n";
 val add_commute_k = read_instantiate [("n","k")] add_commute;
-by (asm_simp_tac (arith_ss addsimps [add_commute_k, diff_cancel]) 1);
+by (asm_simp_tac (!simpset addsimps [add_commute_k, diff_cancel]) 1);
 qed "diff_cancel2";
 
 val [mnat,nnat] = goal Arith.thy
     "[| m:nat;  n:nat |] ==> n #- (n#+m) = 0";
 by (rtac (nnat RS nat_induct) 1);
-by (ALLGOALS (asm_simp_tac (arith_ss addsimps [mnat])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [mnat])));
 qed "diff_add_0";
 
 (** Difference distributes over multiplication **)
@@ -310,13 +309,13 @@
 goal Arith.thy 
   "!!m n. [| m:nat; n: nat; k:nat |] ==> (m #- n) #* k = (m #* k) #- (n #* k)";
 by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
-by (ALLGOALS (asm_simp_tac (arith_ss addsimps [diff_cancel])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [diff_cancel])));
 qed "diff_mult_distrib" ;
 
 goal Arith.thy 
   "!!m. [| m:nat; n: nat; k:nat |] ==> k #* (m #- n) = (k #* m) #- (k #* n)";
 val mult_commute_k = read_instantiate [("m","k")] mult_commute;
-by (asm_simp_tac (arith_ss addsimps 
+by (asm_simp_tac (!simpset addsimps 
                   [mult_commute_k, diff_mult_distrib]) 1);
 qed "diff_mult_distrib2" ;
 
@@ -327,7 +326,7 @@
 by (etac rev_mp 1);
 by (etac rev_mp 1);
 by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
-by (ALLGOALS (asm_simp_tac (nat_ss addsimps [diff_le_self,diff_succ_succ])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [diff_le_self,diff_succ_succ])));
 qed "div_termination";
 
 val div_rls =   (*for mod and div*)
@@ -335,8 +334,8 @@
     [Ord_transrec_type, apply_type, div_termination RS ltD, if_type,
      nat_into_Ord, not_lt_iff_le RS iffD1];
 
-val div_ss = ZF_ss addsimps [nat_into_Ord, div_termination RS ltD,
-                             not_lt_iff_le RS iffD2];
+val div_ss = (!simpset) addsimps [nat_into_Ord, div_termination RS ltD,
+				  not_lt_iff_le RS iffD2];
 
 (*Type checking depends upon termination!*)
 goalw Arith.thy [mod_def] "!!m n. [| 0<n;  m:nat;  n:nat |] ==> m mod n : nat";
@@ -354,6 +353,8 @@
 by (asm_simp_tac div_ss 1);
 qed "mod_geq";
 
+Addsimps [mod_type, mod_less, mod_geq];
+
 (*** Quotient ***)
 
 (*Type checking depends upon termination!*)
@@ -374,17 +375,18 @@
 by (asm_simp_tac div_ss 1);
 qed "div_geq";
 
+Addsimps [div_type, div_less, div_geq];
+
 (*A key result*)
 goal Arith.thy
     "!!m n. [| 0<n;  m:nat;  n:nat |] ==> (m div n)#*n #+ m mod n = m";
 by (etac complete_induct 1);
 by (excluded_middle_tac "x<n" 1);
 (*case x<n*)
-by (asm_simp_tac (arith_ss addsimps [mod_less, div_less]) 2);
+by (Asm_simp_tac 2);
 (*case n le x*)
 by (asm_full_simp_tac
-     (arith_ss addsimps [not_lt_iff_le, nat_into_Ord,
-                         mod_geq, div_geq, add_assoc,
+     (!simpset addsimps [not_lt_iff_le, nat_into_Ord, add_assoc,
                          div_termination RS ltD, add_diff_inverse]) 1);
 qed "mod_div_equality";
 
@@ -396,26 +398,26 @@
 by (etac complete_induct 1);
 by (excluded_middle_tac "succ(x)<n" 1);
 (* case succ(x) < n *)
-by (asm_simp_tac (arith_ss addsimps [mod_less, nat_le_refl RS lt_trans,
+by (asm_simp_tac (!simpset addsimps [mod_less, nat_le_refl RS lt_trans,
                                      succ_neq_self]) 2);
-by (asm_simp_tac (arith_ss addsimps [ltD RS mem_imp_not_eq]) 2);
+by (asm_simp_tac (!simpset addsimps [ltD RS mem_imp_not_eq]) 2);
 (* case n le succ(x) *)
 by (asm_full_simp_tac
-     (arith_ss addsimps [not_lt_iff_le, nat_into_Ord, mod_geq]) 1);
+     (!simpset addsimps [not_lt_iff_le, nat_into_Ord, mod_geq]) 1);
 by (etac leE 1);
-by (asm_simp_tac (arith_ss addsimps [div_termination RS ltD, diff_succ, 
+by (asm_simp_tac (!simpset addsimps [div_termination RS ltD, diff_succ, 
                                      mod_geq]) 1);
-by (asm_simp_tac (arith_ss addsimps [mod_less, diff_self_eq_0]) 1);
+by (asm_simp_tac (!simpset addsimps [mod_less, diff_self_eq_0]) 1);
 qed "mod_succ";
 
 goal Arith.thy "!!m n. [| 0<n;  m:nat;  n:nat |] ==> m mod n < n";
 by (etac complete_induct 1);
 by (excluded_middle_tac "x<n" 1);
 (*case x<n*)
-by (asm_simp_tac (arith_ss addsimps [mod_less]) 2);
+by (asm_simp_tac (!simpset addsimps [mod_less]) 2);
 (*case n le x*)
 by (asm_full_simp_tac
-     (arith_ss addsimps [not_lt_iff_le, nat_into_Ord,
+     (!simpset addsimps [not_lt_iff_le, nat_into_Ord,
                          mod_geq, div_termination RS ltD]) 1);
 qed "mod_less_divisor";
 
@@ -423,22 +425,22 @@
 goal Arith.thy
     "!!k b. [| k: nat; b<2 |] ==> k mod 2 = b | k mod 2 = if(b=1,0,1)";
 by (subgoal_tac "k mod 2: 2" 1);
-by (asm_simp_tac (arith_ss addsimps [mod_less_divisor RS ltD]) 2);
+by (asm_simp_tac (!simpset addsimps [mod_less_divisor RS ltD]) 2);
 by (dtac ltD 1);
-by (asm_simp_tac (ZF_ss setloop split_tac [expand_if]) 1);
-by (fast_tac ZF_cs 1);
+by (asm_simp_tac (!simpset setloop split_tac [expand_if]) 1);
+by (Fast_tac 1);
 qed "mod2_cases";
 
 goal Arith.thy "!!m. m:nat ==> succ(succ(m)) mod 2 = m mod 2";
 by (subgoal_tac "m mod 2: 2" 1);
-by (asm_simp_tac (arith_ss addsimps [mod_less_divisor RS ltD]) 2);
-by (asm_simp_tac (arith_ss addsimps [mod_succ] setloop step_tac ZF_cs) 1);
+by (asm_simp_tac (!simpset addsimps [mod_less_divisor RS ltD]) 2);
+by (asm_simp_tac (!simpset addsimps [mod_succ] setloop step_tac (!claset)) 1);
 qed "mod2_succ_succ";
 
 goal Arith.thy "!!m. m:nat ==> (m#+m) mod 2 = 0";
 by (etac nat_induct 1);
-by (simp_tac (arith_ss addsimps [mod_less]) 1);
-by (asm_simp_tac (arith_ss addsimps [mod2_succ_succ, add_succ_right]) 1);
+by (simp_tac (!simpset addsimps [mod_less]) 1);
+by (asm_simp_tac (!simpset addsimps [mod2_succ_succ, add_succ_right]) 1);
 qed "mod2_add_self";
 
 
@@ -446,7 +448,7 @@
 
 goal Arith.thy "!!m n. [| m:nat;  n:nat |] ==> m le m #+ n";
 by (etac nat_induct 1);
-by (ALLGOALS (asm_simp_tac arith_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "add_le_self";
 
 goal Arith.thy "!!m n. [| m:nat;  n:nat |] ==> m le n #+ m";
@@ -461,7 +463,7 @@
 by (forward_tac [lt_nat_in_nat] 1);
 by (assume_tac 1);
 by (etac succ_lt_induct 1);
-by (ALLGOALS (asm_simp_tac (arith_ss addsimps [leI])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [leI])));
 qed "add_lt_mono1";
 
 (*strict, in both arguments*)
@@ -481,7 +483,7 @@
 \        i le j;  j:k                           \
 \     |] ==> f(i) le f(j)";
 by (cut_facts_tac prems 1);
-by (fast_tac (lt_cs addSIs [lt_mono,ford] addSEs [leE]) 1);
+by (fast_tac (le_cs addSIs [lt_mono,ford] addSEs [leE]) 1);
 qed "Ord_lt_mono_imp_le_mono";
 
 (*le monotonicity, 1st argument*)
@@ -507,8 +509,7 @@
 goal Arith.thy "!!i j k. [| i le j; j:nat; k:nat |] ==> i#*k le j#*k";
 by (forward_tac [lt_nat_in_nat] 1);
 by (nat_ind_tac "k" [] 2);
-by (ALLGOALS (asm_simp_tac (arith_ss addsimps [mult_0_right, mult_succ_right,
-                                               add_le_mono])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [add_le_mono])));
 qed "mult_le_mono1";
 
 (* le monotonicity, BOTH arguments*)
@@ -526,17 +527,17 @@
 goal Arith.thy "!!i j k. [| i<j; 0<k; j:nat; k:nat |] ==> k#*i < k#*j";
 by (etac zero_lt_natE 1);
 by (forward_tac [lt_nat_in_nat] 2);
-by (ALLGOALS (asm_simp_tac arith_ss));
+by (ALLGOALS Asm_simp_tac);
 by (nat_ind_tac "x" [] 1);
-by (ALLGOALS (asm_simp_tac (arith_ss addsimps [add_0_right, add_lt_mono])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [add_lt_mono])));
 qed "mult_lt_mono2";
 
 goal Arith.thy "!!k. [| m: nat; n: nat |] ==> 0 < m#*n <-> 0<m & 0<n";
-by (best_tac (ZF_cs addEs [natE] addss (arith_ss addsimps [mult_0_right])) 1);
+by (best_tac (!claset addEs [natE] addss (!simpset)) 1);
 qed "zero_lt_mult_iff";
 
 goal Arith.thy "!!k. [| m: nat; n: nat |] ==> m#*n = 1 <-> m=1 & n=1";
-by (best_tac (ZF_cs addEs [natE] addss (arith_ss addsimps [mult_0_right])) 1);
+by (best_tac (!claset addEs [natE] addss (!simpset)) 1);
 qed "mult_eq_1_iff";
 
 (*Cancellation law for division*)
@@ -544,10 +545,10 @@
    "!!k. [| 0<n; 0<k; k:nat; m:nat; n:nat |] ==> (k#*m) div (k#*n) = m div n";
 by (eres_inst_tac [("i","m")] complete_induct 1);
 by (excluded_middle_tac "x<n" 1);
-by (asm_simp_tac (arith_ss addsimps [div_less, zero_lt_mult_iff, 
+by (asm_simp_tac (!simpset addsimps [div_less, zero_lt_mult_iff, 
                                      mult_lt_mono2]) 2);
 by (asm_full_simp_tac
-     (arith_ss addsimps [not_lt_iff_le, nat_into_Ord,
+     (!simpset addsimps [not_lt_iff_le, nat_into_Ord,
                          zero_lt_mult_iff, le_refl RS mult_le_mono, div_geq,
                          diff_mult_distrib2 RS sym,
                          div_termination RS ltD]) 1);
@@ -558,10 +559,10 @@
 \        (k#*m) mod (k#*n) = k #* (m mod n)";
 by (eres_inst_tac [("i","m")] complete_induct 1);
 by (excluded_middle_tac "x<n" 1);
-by (asm_simp_tac (arith_ss addsimps [mod_less, zero_lt_mult_iff, 
+by (asm_simp_tac (!simpset addsimps [mod_less, zero_lt_mult_iff, 
                                      mult_lt_mono2]) 2);
 by (asm_full_simp_tac
-     (arith_ss addsimps [not_lt_iff_le, nat_into_Ord,
+     (!simpset addsimps [not_lt_iff_le, nat_into_Ord,
                          zero_lt_mult_iff, le_refl RS mult_le_mono, mod_geq,
                          diff_mult_distrib2 RS sym,
                          div_termination RS ltD]) 1);
@@ -575,13 +576,24 @@
 by (rtac disjCI 1);
 by (dtac sym 1);
 by (rtac Ord_linear_lt 1 THEN REPEAT_SOME (ares_tac [nat_into_Ord,nat_1I]));
-by (fast_tac (lt_cs addss (arith_ss addsimps [mult_0_right])) 1);
-by (fast_tac (lt_cs addDs [mono_lemma] 
-                    addss (arith_ss addsimps [mult_1_right])) 1);
+by (fast_tac (!claset addss (!simpset)) 1);
+by (fast_tac (le_cs addDs [mono_lemma] 
+                    addss (!simpset addsimps [mult_1_right])) 1);
 qed "mult_eq_self_implies_10";
 
-val arith_ss0 = arith_ss
-and arith_ss = arith_ss addsimps [add_0_right, add_succ_right,
-                                  mult_0_right, mult_succ_right,
-                                  mod_type, div_type,
-                                  mod_less, mod_geq, div_less, div_geq];
+
+(*Thanks to Sten Agerholm*)
+goal Arith.thy  (* add_le_elim1 *)
+    "!!m n k. [|m#+n le m#+k; m:nat; n:nat; k:nat|] ==> n le k";
+be rev_mp 1;
+by (eres_inst_tac[("n","n")]nat_induct 1);
+by (Asm_simp_tac 1);
+by (Step_tac 1);
+by (asm_full_simp_tac (!simpset addsimps [not_le_iff_lt,nat_into_Ord]) 1);
+by (etac lt_asym 1);
+by (assume_tac 1);
+by (Asm_full_simp_tac 1);
+by (asm_full_simp_tac (!simpset addsimps [le_iff, nat_into_Ord]) 1);
+by (Fast_tac 1);
+qed "add_le_elim1";
+
--- a/src/ZF/Arith.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Arith.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -6,7 +6,7 @@
 Arithmetic operators and their definitions
 *)
 
-Arith = Epsilon + "simpdata" +
+Arith = Epsilon + 
 consts
     rec  :: [i, i, [i,i]=>i]=>i
     "#*" :: [i,i]=>i                    (infixl 70)
--- a/src/ZF/Bool.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Bool.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -10,6 +10,10 @@
 
 val bool_defs = [bool_def,cond_def];
 
+goalw Bool.thy [succ_def] "{0} = 1";
+br refl 1;
+qed "singleton_0";
+
 (* Introduction rules *)
 
 goalw Bool.thy bool_defs "1 : bool";
@@ -45,11 +49,14 @@
 by (rtac (succ_not_0 RS not_sym RS if_not_P) 1);
 qed "cond_0";
 
-val major::prems = goal Bool.thy 
-    "[|  b: bool;  c: A(1);  d: A(0) |] ==> cond(b,c,d): A(b)";
-by (rtac (major RS boolE) 1);
-by (asm_simp_tac (ZF_ss addsimps (cond_1::prems)) 1);
-by (asm_simp_tac (ZF_ss addsimps (cond_0::prems)) 1);
+Addsimps [cond_1, cond_0];
+
+fun bool_tac i = fast_tac (!claset addSEs [boolE] addss (!simpset)) i;
+
+
+goal Bool.thy 
+    "!!b. [|  b: bool;  c: A(1);  d: A(0) |] ==> cond(b,c,d): A(b)";
+by (bool_tac 1);
 qed "cond_type";
 
 val [rew] = goal Bool.thy "[| !!b. j(b)==cond(b,c,d) |] ==> j(1) = c";
@@ -65,12 +72,11 @@
 fun conds def = [standard (def RS def_cond_1), standard (def RS def_cond_0)];
 
 val [not_1,not_0] = conds not_def;
-
 val [and_1,and_0] = conds and_def;
+val [or_1,or_0]   = conds or_def;
+val [xor_1,xor_0] = conds xor_def;
 
-val [or_1,or_0] = conds or_def;
-
-val [xor_1,xor_0] = conds xor_def;
+Addsimps [not_1,not_0,and_1,and_0,or_1,or_0,xor_1,xor_0];
 
 qed_goalw "not_type" Bool.thy [not_def]
     "a:bool ==> not(a) : bool"
@@ -89,71 +95,65 @@
  (fn prems=> [ (typechk_tac(prems@[bool_1I, bool_0I, cond_type, not_type])) ]);
 
 val bool_typechecks = [bool_1I, bool_0I, cond_type, not_type, and_type, 
-                       or_type, xor_type]
-
-val bool_simps = [cond_1,cond_0,not_1,not_0,and_1,and_0,or_1,or_0,xor_1,xor_0];
-
-val bool_ss0 = ZF_ss addsimps bool_simps;
-
-fun bool0_tac i =
-    EVERY [etac boolE i, asm_simp_tac bool_ss0 (i+1), asm_simp_tac bool_ss0 i];
+                       or_type, xor_type];
 
 (*** Laws for 'not' ***)
 
 goal Bool.thy "!!a. a:bool ==> not(not(a)) = a";
-by (bool0_tac 1);
+by (bool_tac 1);
 qed "not_not";
 
 goal Bool.thy "!!a b. a:bool ==> not(a and b) = not(a) or not(b)";
-by (bool0_tac 1);
+by (bool_tac 1);
 qed "not_and";
 
 goal Bool.thy "!!a b. a:bool ==> not(a or b) = not(a) and not(b)";
-by (bool0_tac 1);
+by (bool_tac 1);
 qed "not_or";
 
+Addsimps [not_not, not_and, not_or];
+
 (*** Laws about 'and' ***)
 
 goal Bool.thy "!!a. a: bool ==> a and a = a";
-by (bool0_tac 1);
+by (bool_tac 1);
 qed "and_absorb";
 
+Addsimps [and_absorb];
+
 goal Bool.thy "!!a b. [| a: bool; b:bool |] ==> a and b = b and a";
-by (etac boolE 1);
-by (bool0_tac 1);
-by (bool0_tac 1);
+by (bool_tac 1);
 qed "and_commute";
 
-goal Bool.thy
- "!!a. a: bool ==> (a and b) and c  =  a and (b and c)";
-by (bool0_tac 1);
+goal Bool.thy "!!a. a: bool ==> (a and b) and c  =  a and (b and c)";
+by (bool_tac 1);
 qed "and_assoc";
 
 goal Bool.thy
  "!!a. [| a: bool; b:bool; c:bool |] ==> \
 \      (a or b) and c  =  (a and c) or (b and c)";
-by (REPEAT (bool0_tac 1));
+by (bool_tac 1);
 qed "and_or_distrib";
 
 (** binary orion **)
 
 goal Bool.thy "!!a. a: bool ==> a or a = a";
-by (bool0_tac 1);
+by (bool_tac 1);
 qed "or_absorb";
 
+Addsimps [or_absorb];
+
 goal Bool.thy "!!a b. [| a: bool; b:bool |] ==> a or b = b or a";
-by (etac boolE 1);
-by (bool0_tac 1);
-by (bool0_tac 1);
+by (bool_tac 1);
 qed "or_commute";
 
 goal Bool.thy "!!a. a: bool ==> (a or b) or c  =  a or (b or c)";
-by (bool0_tac 1);
+by (bool_tac 1);
 qed "or_assoc";
 
 goal Bool.thy
  "!!a b c. [| a: bool; b: bool; c: bool |] ==> \
 \          (a and b) or c  =  (a or c) and (b or c)";
-by (REPEAT (bool0_tac 1));
+by (bool_tac 1);
 qed "or_and_distrib";
 
--- a/src/ZF/Bool.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Bool.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -8,7 +8,7 @@
 2 is equal to bool, but serves a different purpose
 *)
 
-Bool = ZF + "simpdata" +
+Bool = upair + 
 consts
     "1"         :: i             ("1")
     "2"         :: i             ("2")
--- a/src/ZF/Cardinal.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Cardinal.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -25,7 +25,7 @@
 \    X - lfp(X, %W. X - g``(Y - f``W)) ";
 by (res_inst_tac [("P", "%u. ?v = X-u")] 
      (decomp_bnd_mono RS lfp_Tarski RS ssubst) 1);
-by (simp_tac (ZF_ss addsimps [subset_refl, double_complement,
+by (simp_tac (!simpset addsimps [subset_refl, double_complement,
                              gfun RS fun_is_rel RS image_subset]) 1);
 qed "Banach_last_equation";
 
@@ -45,7 +45,7 @@
     "[| f: inj(X,Y);  g: inj(Y,X) |] ==> EX h. h: bij(X,Y)";
 by (cut_facts_tac prems 1);
 by (cut_facts_tac [(prems RL [inj_is_fun]) MRS decomposition] 1);
-by (fast_tac (ZF_cs addSIs [restrict_bij,bij_disjoint_Un]
+by (fast_tac (!claset addSIs [restrict_bij,bij_disjoint_Un]
                     addIs [bij_converse_bij]) 1);
 (* The instantiation of exI to "restrict(f,XA) Un converse(restrict(g,YB))"
    is forced by the context!! *)
@@ -62,12 +62,12 @@
 bind_thm ("eqpoll_refl", id_bij RS bij_imp_eqpoll);
 
 goalw Cardinal.thy [eqpoll_def] "!!X Y. X eqpoll Y ==> Y eqpoll X";
-by (fast_tac (ZF_cs addIs [bij_converse_bij]) 1);
+by (fast_tac (!claset addIs [bij_converse_bij]) 1);
 qed "eqpoll_sym";
 
 goalw Cardinal.thy [eqpoll_def]
     "!!X Y. [| X eqpoll Y;  Y eqpoll Z |] ==> X eqpoll Z";
-by (fast_tac (ZF_cs addIs [comp_bij]) 1);
+by (fast_tac (!claset addIs [comp_bij]) 1);
 qed "eqpoll_trans";
 
 (** Le-pollence is a partial ordering **)
@@ -83,12 +83,12 @@
 
 goalw Cardinal.thy [eqpoll_def, bij_def, lepoll_def]
     "!!X Y. X eqpoll Y ==> X lepoll Y";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "eqpoll_imp_lepoll";
 
 goalw Cardinal.thy [lepoll_def]
     "!!X Y. [| X lepoll Y;  Y lepoll Z |] ==> X lepoll Z";
-by (fast_tac (ZF_cs addIs [comp_inj]) 1);
+by (fast_tac (!claset addIs [comp_inj]) 1);
 qed "lepoll_trans";
 
 (*Asymmetry law*)
@@ -106,7 +106,7 @@
 qed "eqpollE";
 
 goal Cardinal.thy "X eqpoll Y <-> X lepoll Y & Y lepoll X";
-by (fast_tac (ZF_cs addIs [eqpollI] addSEs [eqpollE]) 1);
+by (fast_tac (!claset addIs [eqpollI] addSEs [eqpollE]) 1);
 qed "eqpoll_iff";
 
 goalw Cardinal.thy [lepoll_def, inj_def] "!!A. A lepoll 0 ==> A = 0";
@@ -117,70 +117,70 @@
 bind_thm ("empty_lepollI", empty_subsetI RS subset_imp_lepoll);
 
 goal Cardinal.thy "A lepoll 0 <-> A=0";
-by (fast_tac (ZF_cs addIs [lepoll_0_is_0, lepoll_refl]) 1);
+by (fast_tac (!claset addIs [lepoll_0_is_0, lepoll_refl]) 1);
 qed "lepoll_0_iff";
 
 goalw Cardinal.thy [lepoll_def] 
     "!!A. [| A lepoll B; C lepoll D; B Int D = 0 |] ==> A Un C lepoll B Un D";
-by (fast_tac (ZF_cs addIs [inj_disjoint_Un]) 1);
+by (fast_tac (!claset addIs [inj_disjoint_Un]) 1);
 qed "Un_lepoll_Un";
 
 (*A eqpoll 0 ==> A=0*)
 bind_thm ("eqpoll_0_is_0",  eqpoll_imp_lepoll RS lepoll_0_is_0);
 
 goal Cardinal.thy "A eqpoll 0 <-> A=0";
-by (fast_tac (ZF_cs addIs [eqpoll_0_is_0, eqpoll_refl]) 1);
+by (fast_tac (!claset addIs [eqpoll_0_is_0, eqpoll_refl]) 1);
 qed "eqpoll_0_iff";
 
 goalw Cardinal.thy [eqpoll_def] 
     "!!A. [| A eqpoll B;  C eqpoll D;  A Int C = 0;  B Int D = 0 |] ==> \
 \         A Un C eqpoll B Un D";
-by (fast_tac (ZF_cs addIs [bij_disjoint_Un]) 1);
+by (fast_tac (!claset addIs [bij_disjoint_Un]) 1);
 qed "eqpoll_disjoint_Un";
 
 
 (*** lesspoll: contributions by Krzysztof Grabczewski ***)
 
 goalw Cardinal.thy [lesspoll_def] "!!A. A lesspoll B ==> A lepoll B";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "lesspoll_imp_lepoll";
 
 goalw Cardinal.thy [lepoll_def]
         "!!A. [| A lepoll B; well_ord(B,r) |] ==> EX s. well_ord(A,s)";
-by (fast_tac (ZF_cs addSEs [well_ord_rvimage]) 1);
+by (fast_tac (!claset addSEs [well_ord_rvimage]) 1);
 qed "lepoll_well_ord";
 
 goalw Cardinal.thy [lesspoll_def] "A lepoll B <-> A lesspoll B | A eqpoll B";
-by (fast_tac (ZF_cs addSIs [eqpollI] addSEs [eqpollE]) 1);
+by (fast_tac (!claset addSIs [eqpollI] addSEs [eqpollE]) 1);
 qed "lepoll_iff_leqpoll";
 
 goalw Cardinal.thy [inj_def, surj_def] 
   "!!f. [| f : inj(A, succ(m)); f ~: surj(A, succ(m)) |] ==> EX f. f:inj(A,m)";
-by (safe_tac lemmas_cs);
+by (safe_tac (claset_of"ZF"));
 by (swap_res_tac [exI] 1);
 by (res_inst_tac [("a", "lam z:A. if(f`z=m, y, f`z)")] CollectI 1);
-by (fast_tac (ZF_cs addSIs [if_type RS lam_type]
-                    addEs [apply_funtype RS succE]) 1);
+by (fast_tac (!claset addSIs [if_type RS lam_type]
+                      addEs [apply_funtype RS succE]) 1);
 (*Proving it's injective*)
-by (asm_simp_tac (ZF_ss setloop split_tac [expand_if]) 1);
-by (fast_tac ZF_cs 1);
+by (asm_simp_tac (!simpset setloop split_tac [expand_if]) 1);
+by (Fast_tac 1);
 qed "inj_not_surj_succ";
 
 (** Variations on transitivity **)
 
 goalw Cardinal.thy [lesspoll_def]
       "!!X. [| X lesspoll Y; Y lesspoll Z |] ==> X lesspoll Z";
-by (fast_tac (ZF_cs addSIs [eqpollI] addSEs [eqpollE] addIs [lepoll_trans]) 1);
+by (fast_tac (!claset addSIs [eqpollI] addSEs [eqpollE] addIs [lepoll_trans]) 1);
 qed "lesspoll_trans";
 
 goalw Cardinal.thy [lesspoll_def]
       "!!X. [| X lesspoll Y; Y lepoll Z |] ==> X lesspoll Z";
-by (fast_tac (ZF_cs addSIs [eqpollI] addSEs [eqpollE] addIs [lepoll_trans]) 1);
+by (fast_tac (!claset addSIs [eqpollI] addSEs [eqpollE] addIs [lepoll_trans]) 1);
 qed "lesspoll_lepoll_lesspoll";
 
 goalw Cardinal.thy [lesspoll_def] 
       "!!X. [| X lesspoll Y; Z lepoll X |] ==> Z lesspoll Y";
-by (fast_tac (ZF_cs addSIs [eqpollI] addSEs [eqpollE] addIs [lepoll_trans]) 1);
+by (fast_tac (!claset addSIs [eqpollI] addSEs [eqpollE] addIs [lepoll_trans]) 1);
 qed "lepoll_lesspoll_lesspoll";
 
 
@@ -189,10 +189,10 @@
 val [premP,premOrd,premNot] = goalw Cardinal.thy [Least_def]
     "[| P(i);  Ord(i);  !!x. x<i ==> ~P(x) |] ==> (LEAST x.P(x)) = i";
 by (rtac the_equality 1);
-by (fast_tac (ZF_cs addSIs [premP,premOrd,premNot]) 1);
+by (fast_tac (!claset addSIs [premP,premOrd,premNot]) 1);
 by (REPEAT (etac conjE 1));
 by (etac (premOrd RS Ord_linear_lt) 1);
-by (ALLGOALS (fast_tac (ZF_cs addSIs [premP] addSDs [premNot])));
+by (ALLGOALS (fast_tac (!claset addSIs [premP] addSDs [premNot])));
 qed "Least_equality";
 
 goal Cardinal.thy "!!i. [| P(i);  Ord(i) |] ==> P(LEAST x.P(x))";
@@ -202,7 +202,7 @@
 by (rtac classical 1);
 by (EVERY1 [stac Least_equality, assume_tac, assume_tac]);
 by (assume_tac 2);
-by (fast_tac (ZF_cs addSEs [ltE]) 1);
+by (fast_tac (!claset addSEs [ltE]) 1);
 qed "LeastI";
 
 (*Proof is almost identical to the one above!*)
@@ -213,7 +213,7 @@
 by (rtac classical 1);
 by (EVERY1 [stac Least_equality, assume_tac, assume_tac]);
 by (etac le_refl 2);
-by (fast_tac (ZF_cs addEs [ltE, lt_trans1] addIs [leI, ltI]) 1);
+by (fast_tac (!claset addEs [ltE, lt_trans1] addIs [leI, ltI]) 1);
 qed "Least_le";
 
 (*LEAST really is the smallest*)
@@ -234,12 +234,12 @@
 goalw Cardinal.thy [Least_def]
     "!!P. [| ~ (EX i. Ord(i) & P(i)) |] ==> (LEAST x.P(x)) = 0";
 by (rtac the_0 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "Least_0";
 
 goal Cardinal.thy "Ord(LEAST x.P(x))";
 by (excluded_middle_tac "EX i. Ord(i) & P(i)" 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (rtac (Least_le RS ltE) 2);
 by (REPEAT_SOME assume_tac);
 by (etac (Least_0 RS ssubst) 1);
@@ -252,14 +252,14 @@
 (*Not needed for simplification, but helpful below*)
 val prems = goal Cardinal.thy
     "[| !!y. P(y) <-> Q(y) |] ==> (LEAST x.P(x)) = (LEAST x.Q(x))";
-by (simp_tac (FOL_ss addsimps prems) 1);
+by (simp_tac (!simpset addsimps prems) 1);
 qed "Least_cong";
 
 (*Need AC to get X lepoll Y ==> |X| le |Y|;  see well_ord_lepoll_imp_Card_le
   Converse also requires AC, but see well_ord_cardinal_eqE*)
 goalw Cardinal.thy [eqpoll_def,cardinal_def] "!!X Y. X eqpoll Y ==> |X| = |Y|";
 by (rtac Least_cong 1);
-by (fast_tac (ZF_cs addEs [comp_bij,bij_converse_bij]) 1);
+by (fast_tac (!claset addEs [comp_bij,bij_converse_bij]) 1);
 qed "cardinal_cong";
 
 (*Under AC, the premise becomes trivial; one consequence is ||A|| = |A|*)
@@ -277,12 +277,12 @@
     "!!X Y. [| well_ord(X,r);  well_ord(Y,s);  |X| = |Y| |] ==> X eqpoll Y";
 by (rtac (eqpoll_sym RS eqpoll_trans) 1);
 by (etac well_ord_cardinal_eqpoll 1);
-by (asm_simp_tac (ZF_ss addsimps [well_ord_cardinal_eqpoll]) 1);
+by (asm_simp_tac (!simpset addsimps [well_ord_cardinal_eqpoll]) 1);
 qed "well_ord_cardinal_eqE";
 
 goal Cardinal.thy
     "!!X Y. [| well_ord(X,r);  well_ord(Y,s) |] ==> |X| = |Y| <-> X eqpoll Y";
-by (fast_tac (ZF_cs addSEs [cardinal_cong, well_ord_cardinal_eqE]) 1);
+by (fast_tac (!claset addSEs [cardinal_cong, well_ord_cardinal_eqE]) 1);
 qed "well_ord_cardinal_eqpoll_iff";
 
 
@@ -309,7 +309,7 @@
 qed "Card_is_Ord";
 
 goal Cardinal.thy "!!K. Card(K) ==> K le |K|";
-by (asm_simp_tac (ZF_ss addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1);
+by (asm_simp_tac (!simpset addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1);
 qed "Card_cardinal_le";
 
 goalw Cardinal.thy [cardinal_def] "Ord(|A|)";
@@ -318,8 +318,8 @@
 
 (*The cardinals are the initial ordinals*)
 goal Cardinal.thy "Card(K) <-> Ord(K) & (ALL j. j<K --> ~ j eqpoll K)";
-by (safe_tac (ZF_cs addSIs [CardI, Card_is_Ord]));
-by (fast_tac ZF_cs 2);
+by (safe_tac (!claset addSIs [CardI, Card_is_Ord]));
+by (Fast_tac 2);
 by (rewrite_goals_tac [Card_def, cardinal_def]);
 by (rtac less_LeastE 1);
 by (etac subst 2);
@@ -328,21 +328,21 @@
 
 goalw Cardinal.thy [lesspoll_def] "!!a. [| Card(a); i<a |] ==> i lesspoll a";
 by (dresolve_tac [Card_iff_initial RS iffD1] 1);
-by (fast_tac (ZF_cs addSEs [leI RS le_imp_lepoll]) 1);
+by (fast_tac (!claset addSEs [leI RS le_imp_lepoll]) 1);
 qed "lt_Card_imp_lesspoll";
 
 goal Cardinal.thy "Card(0)";
 by (rtac (Ord_0 RS CardI) 1);
-by (fast_tac (ZF_cs addSEs [ltE]) 1);
+by (fast_tac (!claset addSEs [ltE]) 1);
 qed "Card_0";
 
 val [premK,premL] = goal Cardinal.thy
     "[| Card(K);  Card(L) |] ==> Card(K Un L)";
 by (rtac ([premK RS Card_is_Ord, premL RS Card_is_Ord] MRS Ord_linear_le) 1);
 by (asm_simp_tac 
-    (ZF_ss addsimps [premL, le_imp_subset, subset_Un_iff RS iffD1]) 1);
+    (!simpset addsimps [premL, le_imp_subset, subset_Un_iff RS iffD1]) 1);
 by (asm_simp_tac
-    (ZF_ss addsimps [premK, le_imp_subset, subset_Un_iff2 RS iffD1]) 1);
+    (!simpset addsimps [premK, le_imp_subset, subset_Un_iff2 RS iffD1]) 1);
 qed "Card_Un";
 
 (*Infinite unions of cardinals?  See Devlin, Lemma 6.7, page 98*)
@@ -351,7 +351,7 @@
 by (excluded_middle_tac "EX i. Ord(i) & i eqpoll A" 1);
 by (etac (Least_0 RS ssubst) 1 THEN rtac Card_0 1);
 by (rtac (Ord_Least RS CardI) 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (rtac less_LeastE 1);
 by (assume_tac 2);
 by (etac eqpoll_trans 1);
@@ -388,16 +388,16 @@
 qed "cardinal_lt_imp_lt";
 
 goal Cardinal.thy "!!i j. [| |i| < K;  Ord(i);  Card(K) |] ==> i < K";
-by (asm_simp_tac (ZF_ss addsimps 
+by (asm_simp_tac (!simpset addsimps 
                   [cardinal_lt_imp_lt, Card_is_Ord, Card_cardinal_eq]) 1);
 qed "Card_lt_imp_lt";
 
 goal Cardinal.thy "!!i j. [| Ord(i);  Card(K) |] ==> (|i| < K) <-> (i < K)";
-by (fast_tac (ZF_cs addEs [Card_lt_imp_lt, Ord_cardinal_le RS lt_trans1]) 1);
+by (fast_tac (!claset addEs [Card_lt_imp_lt, Ord_cardinal_le RS lt_trans1]) 1);
 qed "Card_lt_iff";
 
 goal Cardinal.thy "!!i j. [| Ord(i);  Card(K) |] ==> (K le |i|) <-> (K le i)";
-by (asm_simp_tac (ZF_ss addsimps 
+by (asm_simp_tac (!simpset addsimps 
                   [Card_lt_iff, Card_is_Ord, Ord_cardinal, 
                    not_lt_iff_le RS iff_sym]) 1);
 qed "Card_le_iff";
@@ -433,22 +433,22 @@
 
 goalw Cardinal.thy [lepoll_def, inj_def]
  "!!A B. [| cons(u,A) lepoll cons(v,B);  u~:A;  v~:B |] ==> A lepoll B";
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (res_inst_tac [("x", "lam x:A. if(f`x=v, f`u, f`x)")] exI 1);
 by (rtac CollectI 1);
 (*Proving it's in the function space A->B*)
 by (rtac (if_type RS lam_type) 1);
-by (fast_tac (ZF_cs addEs [apply_funtype RS consE]) 1);
-by (fast_tac (ZF_cs addSEs [mem_irrefl] addEs [apply_funtype RS consE]) 1);
+by (fast_tac (!claset addEs [apply_funtype RS consE]) 1);
+by (fast_tac (!claset addSEs [mem_irrefl] addEs [apply_funtype RS consE]) 1);
 (*Proving it's injective*)
-by (asm_simp_tac (ZF_ss setloop split_tac [expand_if]) 1);
-by (fast_tac ZF_cs 1);
+by (asm_simp_tac (!simpset setloop split_tac [expand_if]) 1);
+by (Fast_tac 1);
 qed "cons_lepoll_consD";
 
 goal Cardinal.thy
  "!!A B. [| cons(u,A) eqpoll cons(v,B);  u~:A;  v~:B |] ==> A eqpoll B";
-by (asm_full_simp_tac (ZF_ss addsimps [eqpoll_iff]) 1);
-by (fast_tac (ZF_cs addIs [cons_lepoll_consD]) 1);
+by (asm_full_simp_tac (!simpset addsimps [eqpoll_iff]) 1);
+by (fast_tac (!claset addIs [cons_lepoll_consD]) 1);
 qed "cons_eqpoll_consD";
 
 (*Lemma suggested by Mike Fourman*)
@@ -460,12 +460,12 @@
 val [prem] = goal Cardinal.thy
     "m:nat ==> ALL n: nat. m lepoll n --> m le n";
 by (nat_ind_tac "m" [prem] 1);
-by (fast_tac (ZF_cs addSIs [nat_0_le]) 1);
+by (fast_tac (!claset addSIs [nat_0_le]) 1);
 by (rtac ballI 1);
 by (eres_inst_tac [("n","n")] natE 1);
-by (asm_simp_tac (ZF_ss addsimps [lepoll_def, inj_def, 
+by (asm_simp_tac (!simpset addsimps [lepoll_def, inj_def, 
                                   succI1 RS Pi_empty2]) 1);
-by (fast_tac (ZF_cs addSIs [succ_leI] addSDs [succ_lepoll_succD]) 1);
+by (fast_tac (!claset addSIs [succ_leI] addSDs [succ_lepoll_succD]) 1);
 qed "nat_lepoll_imp_le_lemma";
 
 bind_thm ("nat_lepoll_imp_le", nat_lepoll_imp_le_lemma RS bspec RS mp);
@@ -473,8 +473,8 @@
 goal Cardinal.thy
     "!!m n. [| m:nat; n: nat |] ==> m eqpoll n <-> m = n";
 by (rtac iffI 1);
-by (asm_simp_tac (ZF_ss addsimps [eqpoll_refl]) 2);
-by (fast_tac (ZF_cs addIs [nat_lepoll_imp_le, le_anti_sym] 
+by (asm_simp_tac (!simpset addsimps [eqpoll_refl]) 2);
+by (fast_tac (!claset addIs [nat_lepoll_imp_le, le_anti_sym] 
                     addSEs [eqpollE]) 1);
 qed "nat_eqpoll_iff";
 
@@ -483,8 +483,8 @@
     "!!n. n: nat ==> Card(n)";
 by (stac Least_equality 1);
 by (REPEAT_FIRST (ares_tac [eqpoll_refl, nat_into_Ord, refl]));
-by (asm_simp_tac (ZF_ss addsimps [lt_nat_in_nat RS nat_eqpoll_iff]) 1);
-by (fast_tac (ZF_cs addSEs [lt_irrefl]) 1);
+by (asm_simp_tac (!simpset addsimps [lt_nat_in_nat RS nat_eqpoll_iff]) 1);
+by (fast_tac (!claset addSEs [lt_irrefl]) 1);
 qed "nat_into_Card";
 
 (*Part of Kunen's Lemma 10.6*)
@@ -499,7 +499,7 @@
 goalw Cardinal.thy [lesspoll_def]
       "!!m. [| A lepoll m; m:nat |] ==> A lesspoll succ(m)";
 by (rtac conjI 1);
-by (fast_tac (ZF_cs addIs [subset_imp_lepoll RSN (2,lepoll_trans)]) 1);
+by (fast_tac (!claset addIs [subset_imp_lepoll RSN (2,lepoll_trans)]) 1);
 by (rtac notI 1);
 by (dresolve_tac [eqpoll_sym RS eqpoll_imp_lepoll] 1);
 by (dtac lepoll_trans 1 THEN assume_tac 1);
@@ -508,12 +508,12 @@
 
 goalw Cardinal.thy [lesspoll_def, lepoll_def, eqpoll_def, bij_def]
       "!!m. [| A lesspoll succ(m); m:nat |] ==> A lepoll m";
-by (step_tac ZF_cs 1);
-by (fast_tac (ZF_cs addSIs [inj_not_surj_succ]) 1);
+by (step_tac (!claset) 1);
+by (fast_tac (!claset addSIs [inj_not_surj_succ]) 1);
 qed "lesspoll_succ_imp_lepoll";
 
 goal Cardinal.thy "!!m. m:nat ==> A lesspoll succ(m) <-> A lepoll m";
-by (fast_tac (ZF_cs addSIs [lepoll_imp_lesspoll_succ, 
+by (fast_tac (!claset addSIs [lepoll_imp_lesspoll_succ, 
                             lesspoll_succ_imp_lepoll]) 1);
 qed "lesspoll_succ_iff";
 
@@ -522,7 +522,7 @@
 by (rtac disjCI 1);
 by (rtac lesspoll_succ_imp_lepoll 1);
 by (assume_tac 2);
-by (asm_simp_tac (ZF_ss addsimps [lesspoll_def]) 1);
+by (asm_simp_tac (!simpset addsimps [lesspoll_def]) 1);
 qed "lepoll_succ_disj";
 
 
@@ -539,7 +539,7 @@
 
 goal Cardinal.thy "!!i n. [| Ord(i);  n:nat |] ==> i eqpoll n <-> i=n";
 by (rtac iffI 1);
-by (asm_simp_tac (ZF_ss addsimps [eqpoll_refl]) 2);
+by (asm_simp_tac (!simpset addsimps [eqpoll_refl]) 2);
 by (rtac Ord_linear_lt 1);
 by (REPEAT_SOME (eresolve_tac [asm_rl, nat_into_Ord]));
 by (etac (lt_nat_in_nat RS nat_eqpoll_iff RS iffD1) 1 THEN
@@ -552,7 +552,7 @@
 by (stac Least_equality 1);
 by (REPEAT_FIRST (ares_tac [eqpoll_refl, Ord_nat, refl]));
 by (etac ltE 1);
-by (asm_simp_tac (ZF_ss addsimps [eqpoll_iff, lt_not_lepoll, ltI]) 1);
+by (asm_simp_tac (!simpset addsimps [eqpoll_iff, lt_not_lepoll, ltI]) 1);
 qed "Card_nat";
 
 (*Allows showing that |i| is a limit cardinal*)
@@ -568,40 +568,40 @@
 (*Congruence law for  cons  under equipollence*)
 goalw Cardinal.thy [lepoll_def]
     "!!A B. [| A lepoll B;  b ~: B |] ==> cons(a,A) lepoll cons(b,B)";
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (res_inst_tac [("x", "lam y: cons(a,A).if(y=a, b, f`y)")] exI 1);
 by (res_inst_tac [("d","%z.if(z:B, converse(f)`z, a)")] 
     lam_injective 1);
-by (asm_simp_tac (ZF_ss addsimps [inj_is_fun RS apply_type, cons_iff]
+by (asm_simp_tac (!simpset addsimps [inj_is_fun RS apply_type, cons_iff]
                         setloop etac consE') 1);
-by (asm_simp_tac (ZF_ss addsimps [inj_is_fun RS apply_type, left_inverse]
+by (asm_simp_tac (!simpset addsimps [inj_is_fun RS apply_type, left_inverse]
                         setloop etac consE') 1);
 qed "cons_lepoll_cong";
 
 goal Cardinal.thy
     "!!A B. [| A eqpoll B;  a ~: A;  b ~: B |] ==> cons(a,A) eqpoll cons(b,B)";
-by (asm_full_simp_tac (ZF_ss addsimps [eqpoll_iff, cons_lepoll_cong]) 1);
+by (asm_full_simp_tac (!simpset addsimps [eqpoll_iff, cons_lepoll_cong]) 1);
 qed "cons_eqpoll_cong";
 
 goal Cardinal.thy
     "!!A B. [| a ~: A;  b ~: B |] ==> \
 \           cons(a,A) lepoll cons(b,B)  <->  A lepoll B";
-by (fast_tac (ZF_cs addIs [cons_lepoll_cong, cons_lepoll_consD]) 1);
+by (fast_tac (!claset addIs [cons_lepoll_cong, cons_lepoll_consD]) 1);
 qed "cons_lepoll_cons_iff";
 
 goal Cardinal.thy
     "!!A B. [| a ~: A;  b ~: B |] ==> \
 \           cons(a,A) eqpoll cons(b,B)  <->  A eqpoll B";
-by (fast_tac (ZF_cs addIs [cons_eqpoll_cong, cons_eqpoll_consD]) 1);
+by (fast_tac (!claset addIs [cons_eqpoll_cong, cons_eqpoll_consD]) 1);
 qed "cons_eqpoll_cons_iff";
 
 goalw Cardinal.thy [succ_def] "{a} eqpoll 1";
-by (fast_tac (ZF_cs addSIs [eqpoll_refl RS cons_eqpoll_cong]) 1);
+by (fast_tac (!claset addSIs [eqpoll_refl RS cons_eqpoll_cong]) 1);
 qed "singleton_eqpoll_1";
 
 goal Cardinal.thy "|{a}| = 1";
 by (resolve_tac [singleton_eqpoll_1 RS cardinal_cong RS trans] 1);
-by (simp_tac (arith_ss addsimps [nat_into_Card RS Card_cardinal_eq]) 1);
+by (simp_tac (!simpset addsimps [nat_into_Card RS Card_cardinal_eq]) 1);
 qed "cardinal_singleton";
 
 (*Congruence law for  succ  under equipollence*)
@@ -613,13 +613,13 @@
 (*Congruence law for + under equipollence*)
 goalw Cardinal.thy [eqpoll_def]
     "!!A B C D. [| A eqpoll C;  B eqpoll D |] ==> A+B eqpoll C+D";
-by (fast_tac (ZF_cs addSIs [sum_bij]) 1);
+by (fast_tac (!claset addSIs [sum_bij]) 1);
 qed "sum_eqpoll_cong";
 
 (*Congruence law for * under equipollence*)
 goalw Cardinal.thy [eqpoll_def]
     "!!A B C D. [| A eqpoll C;  B eqpoll D |] ==> A*B eqpoll C*D";
-by (fast_tac (ZF_cs addSIs [prod_bij]) 1);
+by (fast_tac (!claset addSIs [prod_bij]) 1);
 qed "prod_eqpoll_cong";
 
 goalw Cardinal.thy [eqpoll_def]
@@ -628,16 +628,16 @@
 by (res_inst_tac [("c", "%x. if(x:A, f`x, x)"),
                   ("d", "%y. if(y: range(f), converse(f)`y, y)")] 
     lam_bijective 1);
-by (fast_tac (ZF_cs addSIs [if_type, apply_type] addIs [inj_is_fun]) 1);
+by (fast_tac (!claset addSIs [if_type, apply_type] addIs [inj_is_fun]) 1);
 by (asm_simp_tac 
-    (ZF_ss addsimps [inj_converse_fun RS apply_funtype]
+    (!simpset addsimps [inj_converse_fun RS apply_funtype]
            setloop split_tac [expand_if]) 1);
-by (asm_simp_tac (ZF_ss addsimps [inj_is_fun RS apply_rangeI, left_inverse]
+by (asm_simp_tac (!simpset addsimps [inj_is_fun RS apply_rangeI, left_inverse]
                         setloop etac UnE') 1);
 by (asm_simp_tac 
-    (ZF_ss addsimps [inj_converse_fun RS apply_funtype, right_inverse]
+    (!simpset addsimps [inj_converse_fun RS apply_funtype, right_inverse]
            setloop split_tac [expand_if]) 1);
-by (fast_tac (ZF_cs addEs [equals0D]) 1);
+by (fast_tac (!claset addEs [equals0D]) 1);
 qed "inj_disjoint_eqpoll";
 
 
@@ -650,7 +650,7 @@
 by (rtac cons_lepoll_consD 1);
 by (rtac mem_not_refl 3);
 by (eresolve_tac [cons_Diff RS ssubst] 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 qed "Diff_sing_lepoll";
 
 (*If A has at least n+1 elements then A-{a} has at least n.*)
@@ -658,12 +658,12 @@
       "!!A a n. [| succ(n) lepoll A |] ==> n lepoll A - {a}";
 by (rtac cons_lepoll_consD 1);
 by (rtac mem_not_refl 2);
-by (fast_tac ZF_cs 2);
-by (fast_tac (ZF_cs addSEs [subset_imp_lepoll RSN (2, lepoll_trans)]) 1);
+by (Fast_tac 2);
+by (fast_tac (!claset addSEs [subset_imp_lepoll RSN (2, lepoll_trans)]) 1);
 qed "lepoll_Diff_sing";
 
 goal Cardinal.thy "!!A a n. [| a:A; A eqpoll succ(n) |] ==> A - {a} eqpoll n";
-by (fast_tac (ZF_cs addSIs [eqpollI] addSEs [eqpollE] 
+by (fast_tac (!claset addSIs [eqpollI] addSEs [eqpollE] 
                     addIs [Diff_sing_lepoll,lepoll_Diff_sing]) 1);
 qed "Diff_sing_eqpoll";
 
@@ -678,8 +678,8 @@
 by (res_inst_tac [("x","lam x: A Un B. if (x:A,Inl(x),Inr(x))")] exI 1);
 by (res_inst_tac [("d","%z. snd(z)")] lam_injective 1);
 by (split_tac [expand_if] 1);
-by (fast_tac (ZF_cs addSIs [InlI, InrI]) 1);
-by (asm_full_simp_tac (ZF_ss addsimps [Inl_def, Inr_def]
+by (fast_tac (!claset addSIs [InlI, InrI]) 1);
+by (asm_full_simp_tac (!simpset addsimps [Inl_def, Inr_def]
                        setloop split_tac [expand_if]) 1);
 qed "Un_lepoll_sum";
 
@@ -687,20 +687,20 @@
 (*** Finite and infinite sets ***)
 
 goalw Cardinal.thy [Finite_def] "Finite(0)";
-by (fast_tac (ZF_cs addSIs [eqpoll_refl, nat_0I]) 1);
+by (fast_tac (!claset addSIs [eqpoll_refl, nat_0I]) 1);
 qed "Finite_0";
 
 goalw Cardinal.thy [Finite_def]
     "!!A. [| A lepoll n;  n:nat |] ==> Finite(A)";
 by (etac rev_mp 1);
 by (etac nat_induct 1);
-by (fast_tac (ZF_cs addSDs [lepoll_0_is_0] addSIs [eqpoll_refl,nat_0I]) 1);
-by (fast_tac (ZF_cs addSDs [lepoll_succ_disj] addSIs [nat_succI]) 1);
+by (fast_tac (!claset addSDs [lepoll_0_is_0] addSIs [eqpoll_refl,nat_0I]) 1);
+by (fast_tac (!claset addSDs [lepoll_succ_disj] addSIs [nat_succI]) 1);
 qed "lepoll_nat_imp_Finite";
 
 goalw Cardinal.thy [Finite_def]
      "!!X. [| Y lepoll X;  Finite(X) |] ==> Finite(Y)";
-by (fast_tac (ZF_cs addSEs [eqpollE] 
+by (fast_tac (!claset addSEs [eqpollE] 
                     addEs [lepoll_trans RS 
                      rewrite_rule [Finite_def] lepoll_nat_imp_Finite]) 1);
 qed "lepoll_Finite";
@@ -711,12 +711,12 @@
 
 goalw Cardinal.thy [Finite_def] "!!x. Finite(x) ==> Finite(cons(y,x))";
 by (excluded_middle_tac "y:x" 1);
-by (asm_simp_tac (ZF_ss addsimps [cons_absorb]) 2);
+by (asm_simp_tac (!simpset addsimps [cons_absorb]) 2);
 by (etac bexE 1);
 by (rtac bexI 1);
 by (etac nat_succI 2);
 by (asm_simp_tac 
-    (ZF_ss addsimps [succ_def, cons_eqpoll_cong, mem_not_refl]) 1);
+    (!simpset addsimps [succ_def, cons_eqpoll_cong, mem_not_refl]) 1);
 qed "Finite_cons";
 
 goalw Cardinal.thy [succ_def] "!!x. Finite(x) ==> Finite(succ(x))";
@@ -727,12 +727,12 @@
       "!!i. [| Ord(i);  ~ Finite(i) |] ==> nat le i";
 by (eresolve_tac [Ord_nat RSN (2,Ord_linear2)] 1);
 by (assume_tac 2);
-by (fast_tac (ZF_cs addSIs [eqpoll_refl] addSEs [ltE]) 1);
+by (fast_tac (!claset addSIs [eqpoll_refl] addSEs [ltE]) 1);
 qed "nat_le_infinite_Ord";
 
 goalw Cardinal.thy [Finite_def, eqpoll_def]
     "!!A. Finite(A) ==> EX r. well_ord(A,r)";
-by (fast_tac (ZF_cs addIs [well_ord_rvimage, bij_is_inj, well_ord_Memrel, 
+by (fast_tac (!claset addIs [well_ord_rvimage, bij_is_inj, well_ord_Memrel, 
                            nat_into_Ord]) 1);
 qed "Finite_imp_well_ord";
 
@@ -742,22 +742,22 @@
 
 goal Nat.thy "!!n. n:nat ==> wf[n](converse(Memrel(n)))";
 by (etac nat_induct 1);
-by (fast_tac (ZF_cs addIs [wf_onI]) 1);
+by (fast_tac (!claset addIs [wf_onI]) 1);
 by (rtac wf_onI 1);
-by (asm_full_simp_tac (ZF_ss addsimps [wf_on_def, wf_def, Memrel_iff]) 1);
+by (asm_full_simp_tac (!simpset addsimps [wf_on_def, wf_def, Memrel_iff]) 1);
 by (excluded_middle_tac "x:Z" 1);
 by (dres_inst_tac [("x", "x")] bspec 2 THEN assume_tac 2);
-by (fast_tac (ZF_cs addSEs [mem_irrefl] addEs [mem_asym]) 2);
+by (fast_tac (!claset addSEs [mem_irrefl] addEs [mem_asym]) 2);
 by (dres_inst_tac [("x", "Z")] spec 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (dres_inst_tac [("x", "xa")] bspec 1 THEN assume_tac 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "nat_wf_on_converse_Memrel";
 
 goal Cardinal.thy "!!n. n:nat ==> well_ord(n,converse(Memrel(n)))";
 by (forward_tac [Ord_nat RS Ord_in_Ord RS well_ord_Memrel] 1);
 by (rewtac well_ord_def);
-by (fast_tac (ZF_cs addSIs [tot_ord_converse, nat_wf_on_converse_Memrel]) 1);
+by (fast_tac (!claset addSIs [tot_ord_converse, nat_wf_on_converse_Memrel]) 1);
 qed "nat_well_ord_converse_Memrel";
 
 goal Cardinal.thy
@@ -768,7 +768,7 @@
 by (forward_tac [ordermap_bij RS bij_is_inj RS well_ord_rvimage] 1);
 by (assume_tac 1);
 by (asm_full_simp_tac
-    (ZF_ss addsimps [rvimage_converse, converse_Int, converse_prod, 
+    (!simpset addsimps [rvimage_converse, converse_Int, converse_prod, 
                      ordertype_ord_iso RS ord_iso_rvimage_eq]) 1);
 qed "well_ord_converse";
 
@@ -778,12 +778,12 @@
     REPEAT (assume_tac 1));
 by (rtac eqpoll_trans 1 THEN assume_tac 2);
 by (rewtac eqpoll_def);
-by (fast_tac (ZF_cs addSIs [ordermap_bij RS bij_converse_bij]) 1);
+by (fast_tac (!claset addSIs [ordermap_bij RS bij_converse_bij]) 1);
 qed "ordertype_eq_n";
 
 goalw Cardinal.thy [Finite_def]
     "!!A. [| Finite(A);  well_ord(A,r) |] ==> well_ord(A,converse(r))";
 by (rtac well_ord_converse 1 THEN assume_tac 1);
-by (fast_tac (ZF_cs addDs [ordertype_eq_n] 
+by (fast_tac (!claset addDs [ordertype_eq_n] 
                     addSIs [nat_well_ord_converse_Memrel]) 1);
 qed "Finite_well_ord_converse";
--- a/src/ZF/CardinalArith.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/CardinalArith.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -21,8 +21,8 @@
 by (rtac exI 1);
 by (res_inst_tac [("c", "case(Inr, Inl)"), ("d", "case(Inr, Inl)")] 
     lam_bijective 1);
-by (safe_tac (ZF_cs addSEs [sumE]));
-by (ALLGOALS (asm_simp_tac case_ss));
+by (safe_tac (!claset addSEs [sumE]));
+by (ALLGOALS (Asm_simp_tac));
 qed "sum_commute_eqpoll";
 
 goalw CardinalArith.thy [cadd_def] "i |+| j = j |+| i";
@@ -57,7 +57,7 @@
 qed "sum_0_eqpoll";
 
 goalw CardinalArith.thy [cadd_def] "!!K. Card(K) ==> 0 |+| K = K";
-by (asm_simp_tac (ZF_ss addsimps [sum_0_eqpoll RS cardinal_cong, 
+by (asm_simp_tac (!simpset addsimps [sum_0_eqpoll RS cardinal_cong, 
                                   Card_cardinal_eq]) 1);
 qed "cadd_0";
 
@@ -65,7 +65,7 @@
 
 goalw CardinalArith.thy [lepoll_def, inj_def] "A lepoll A+B";
 by (res_inst_tac [("x", "lam x:A. Inl(x)")] exI 1);
-by (asm_simp_tac (sum_ss addsimps [lam_type]) 1);
+by (asm_simp_tac (!simpset addsimps [lam_type]) 1);
 qed "sum_lepoll_self";
 
 (*Could probably weaken the premises to well_ord(K,r), or removing using AC*)
@@ -88,12 +88,12 @@
       lam_injective 1);
 by (typechk_tac ([inj_is_fun, case_type, InlI, InrI] @ ZF_typechecks));
 by (etac sumE 1);
-by (ALLGOALS (asm_simp_tac (sum_ss addsimps [left_inverse])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [left_inverse])));
 qed "sum_lepoll_mono";
 
 goalw CardinalArith.thy [cadd_def]
     "!!K. [| K' le K;  L' le L |] ==> (K' |+| L') le (K |+| L)";
-by (safe_tac (ZF_cs addSDs [le_subset_iff RS iffD1]));
+by (safe_tac (!claset addSDs [le_subset_iff RS iffD1]));
 by (rtac well_ord_lepoll_imp_Card_le 1);
 by (REPEAT (ares_tac [sum_lepoll_mono, subset_imp_lepoll] 2));
 by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel] 1));
@@ -107,7 +107,7 @@
                   ("d", "%z.if(z=A+B,Inl(A),z)")] 
     lam_bijective 1);
 by (ALLGOALS
-    (asm_simp_tac (case_ss addsimps [succI2, mem_imp_not_eq]
+    (asm_simp_tac (!simpset addsimps [succI2, mem_imp_not_eq]
                            setloop eresolve_tac [sumE,succE])));
 qed "sum_succ_eqpoll";
 
@@ -125,8 +125,8 @@
     "[| m: nat;  n: nat |] ==> m |+| n = m#+n";
 by (cut_facts_tac [nnat] 1);
 by (nat_ind_tac "m" [mnat] 1);
-by (asm_simp_tac (arith_ss addsimps [nat_into_Card RS cadd_0]) 1);
-by (asm_simp_tac (arith_ss addsimps [nat_into_Ord, cadd_succ_lemma,
+by (asm_simp_tac (!simpset addsimps [nat_into_Card RS cadd_0]) 1);
+by (asm_simp_tac (!simpset addsimps [nat_into_Ord, cadd_succ_lemma,
                                      nat_into_Card RS Card_cardinal_eq]) 1);
 qed "nat_cadd_eq_add";
 
@@ -140,8 +140,8 @@
 by (rtac exI 1);
 by (res_inst_tac [("c", "%<x,y>.<y,x>"), ("d", "%<x,y>.<y,x>")] 
     lam_bijective 1);
-by (safe_tac ZF_cs);
-by (ALLGOALS (asm_simp_tac ZF_ss));
+by (safe_tac (!claset));
+by (ALLGOALS (Asm_simp_tac));
 qed "prod_commute_eqpoll";
 
 goalw CardinalArith.thy [cmult_def] "i |*| j = j |*| i";
@@ -192,11 +192,11 @@
 goalw CardinalArith.thy [eqpoll_def] "0*A eqpoll 0";
 by (rtac exI 1);
 by (rtac lam_bijective 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 qed "prod_0_eqpoll";
 
 goalw CardinalArith.thy [cmult_def] "0 |*| i = 0";
-by (asm_simp_tac (ZF_ss addsimps [prod_0_eqpoll RS cardinal_cong, 
+by (asm_simp_tac (!simpset addsimps [prod_0_eqpoll RS cardinal_cong, 
                                   Card_0 RS Card_cardinal_eq]) 1);
 qed "cmult_0";
 
@@ -208,7 +208,7 @@
 qed "prod_singleton_eqpoll";
 
 goalw CardinalArith.thy [cmult_def, succ_def] "!!K. Card(K) ==> 1 |*| K = K";
-by (asm_simp_tac (ZF_ss addsimps [prod_singleton_eqpoll RS cardinal_cong, 
+by (asm_simp_tac (!simpset addsimps [prod_singleton_eqpoll RS cardinal_cong, 
                                   Card_cardinal_eq]) 1);
 qed "cmult_1";
 
@@ -216,7 +216,7 @@
 
 goalw CardinalArith.thy [lepoll_def, inj_def] "A lepoll A*A";
 by (res_inst_tac [("x", "lam x:A. <x,x>")] exI 1);
-by (simp_tac (ZF_ss addsimps [lam_type]) 1);
+by (simp_tac (!simpset addsimps [lam_type]) 1);
 qed "prod_square_lepoll";
 
 (*Could probably weaken the premise to well_ord(K,r), or remove using AC*)
@@ -225,14 +225,14 @@
 by (rtac well_ord_lepoll_imp_Card_le 2);
 by (rtac prod_square_lepoll 3);
 by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel, Card_is_Ord] 2));
-by (asm_simp_tac (ZF_ss addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1);
+by (asm_simp_tac (!simpset addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1);
 qed "cmult_square_le";
 
 (** Multiplication by a non-zero cardinal **)
 
 goalw CardinalArith.thy [lepoll_def, inj_def] "!!b. b: B ==> A lepoll A*B";
 by (res_inst_tac [("x", "lam x:A. <x,b>")] exI 1);
-by (asm_simp_tac (ZF_ss addsimps [lam_type]) 1);
+by (asm_simp_tac (!simpset addsimps [lam_type]) 1);
 qed "prod_lepoll_self";
 
 (*Could probably weaken the premises to well_ord(K,r), or removing using AC*)
@@ -253,12 +253,12 @@
                   lam_injective 1);
 by (typechk_tac (inj_is_fun::ZF_typechecks));
 by (etac SigmaE 1);
-by (asm_simp_tac (ZF_ss addsimps [left_inverse]) 1);
+by (asm_simp_tac (!simpset addsimps [left_inverse]) 1);
 qed "prod_lepoll_mono";
 
 goalw CardinalArith.thy [cmult_def]
     "!!K. [| K' le K;  L' le L |] ==> (K' |*| L') le (K |*| L)";
-by (safe_tac (ZF_cs addSDs [le_subset_iff RS iffD1]));
+by (safe_tac (!claset addSDs [le_subset_iff RS iffD1]));
 by (rtac well_ord_lepoll_imp_Card_le 1);
 by (REPEAT (ares_tac [prod_lepoll_mono, subset_imp_lepoll] 2));
 by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1));
@@ -271,9 +271,9 @@
 by (res_inst_tac [("c", "%<x,y>. if(x=A, Inl(y), Inr(<x,y>))"), 
                   ("d", "case(%y. <A,y>, %z.z)")] 
     lam_bijective 1);
-by (safe_tac (ZF_cs addSEs [sumE]));
+by (safe_tac (!claset addSEs [sumE]));
 by (ALLGOALS
-    (asm_simp_tac (case_ss addsimps [succI2, if_type, mem_imp_not_eq])));
+    (asm_simp_tac (!simpset addsimps [succI2, if_type, mem_imp_not_eq])));
 qed "prod_succ_eqpoll";
 
 (*Unconditional version requires AC*)
@@ -289,14 +289,14 @@
     "[| m: nat;  n: nat |] ==> m |*| n = m#*n";
 by (cut_facts_tac [nnat] 1);
 by (nat_ind_tac "m" [mnat] 1);
-by (asm_simp_tac (arith_ss addsimps [cmult_0]) 1);
-by (asm_simp_tac (arith_ss addsimps [nat_into_Ord, cmult_succ_lemma,
+by (asm_simp_tac (!simpset addsimps [cmult_0]) 1);
+by (asm_simp_tac (!simpset addsimps [nat_into_Ord, cmult_succ_lemma,
                                      nat_cadd_eq_add]) 1);
 qed "nat_cmult_eq_mult";
 
 goal CardinalArith.thy "!!m n. Card(n) ==> 2 |*| n = n |+| n";
 by (asm_simp_tac 
-    (ZF_ss addsimps [Ord_0, Ord_succ, cmult_0, cmult_succ_lemma, Card_is_Ord,
+    (!simpset addsimps [Ord_0, Ord_succ, cmult_0, cmult_succ_lemma, Card_is_Ord,
                      read_instantiate [("j","0")] cadd_commute, cadd_0]) 1);
 qed "cmult_2";
 
@@ -316,10 +316,10 @@
 by (res_inst_tac [("d", "%y. if(y: range(f),    \
 \                               nat_case(u, %z.f`z, converse(f)`y), y)")] 
     lam_injective 1);
-by (fast_tac (ZF_cs addSIs [if_type, nat_0I, nat_succI, apply_type]
+by (fast_tac (!claset addSIs [if_type, nat_0I, nat_succI, apply_type]
                     addIs  [inj_is_fun, inj_converse_fun]) 1);
 by (asm_simp_tac 
-    (ZF_ss addsimps [inj_is_fun RS apply_rangeI,
+    (!simpset addsimps [inj_is_fun RS apply_rangeI,
                      inj_converse_fun RS apply_rangeI,
                      inj_converse_fun RS apply_funtype,
                      left_inverse, right_inverse, nat_0I, nat_succI, 
@@ -338,7 +338,7 @@
 qed "nat_succ_eqpoll";
 
 goalw CardinalArith.thy [InfCard_def] "InfCard(nat)";
-by (fast_tac (ZF_cs addIs [Card_nat, le_refl, Card_is_Ord]) 1);
+by (fast_tac (!claset addIs [Card_nat, le_refl, Card_is_Ord]) 1);
 qed "InfCard_nat";
 
 goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Card(K)";
@@ -347,7 +347,7 @@
 
 goalw CardinalArith.thy [InfCard_def]
     "!!K L. [| InfCard(K);  Card(L) |] ==> InfCard(K Un L)";
-by (asm_simp_tac (ZF_ss addsimps [Card_Un, Un_upper1_le RSN (2,le_trans), 
+by (asm_simp_tac (!simpset addsimps [Card_Un, Un_upper1_le RSN (2,le_trans), 
                                   Card_is_Ord]) 1);
 qed "InfCard_Un";
 
@@ -357,7 +357,7 @@
 by (forward_tac [Card_is_Ord] 1);
 by (rtac (ltI RS non_succ_LimitI) 1);
 by (etac ([asm_rl, nat_0I] MRS (le_imp_subset RS subsetD)) 1);
-by (safe_tac (ZF_cs addSDs [Limit_nat RS Limit_le_succD]));
+by (safe_tac (!claset addSDs [Limit_nat RS Limit_le_succD]));
 by (rewtac Card_def);
 by (dtac trans 1);
 by (etac (le_imp_subset RS nat_succ_eqpoll RS cardinal_cong) 1);
@@ -372,7 +372,7 @@
 goalw Cardinal.thy [eqpoll_def]
     "!!A. [| well_ord(A,r);  x:A |] ==> ordermap(A,r)`x eqpoll pred(A,x,r)";
 by (rtac exI 1);
-by (asm_simp_tac (ZF_ss addsimps [ordermap_eq_image, well_ord_is_wf]) 1);
+by (asm_simp_tac (!simpset addsimps [ordermap_eq_image, well_ord_is_wf]) 1);
 by (etac (ordermap_bij RS bij_is_inj RS restrict_bij RS bij_converse_bij) 1);
 by (rtac pred_subset 1);
 qed "ordermap_eqpoll_pred";
@@ -381,7 +381,7 @@
 
 goalw CardinalArith.thy [inj_def]
  "!!K. Ord(K) ==> (lam <x,y>:K*K. <x Un y, x, y>) : inj(K*K, K*K*K)";
-by (fast_tac (ZF_cs addss ZF_ss
+by (fast_tac (!claset addss (!simpset)
                     addIs [lam_type, Un_least_lt RS ltD, ltI]) 1);
 qed "csquare_lam_inj";
 
@@ -397,22 +397,22 @@
  "!!K. [| x<K;  y<K;  z<K |] ==> \
 \      <<x,y>, <z,z>> : csquare_rel(K) --> x le z & y le z";
 by (REPEAT (etac ltE 1));
-by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff,
+by (asm_simp_tac (!simpset addsimps [rvimage_iff, rmult_iff, Memrel_iff,
                                   Un_absorb, Un_least_mem_iff, ltD]) 1);
-by (safe_tac (ZF_cs addSEs [mem_irrefl] 
+by (safe_tac (!claset addSEs [mem_irrefl] 
                     addSIs [Un_upper1_le, Un_upper2_le]));
-by (ALLGOALS (asm_simp_tac (ZF_ss addsimps [lt_def, succI2, Ord_succ])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [lt_def, succI2, Ord_succ])));
 val csquareD_lemma = result();
 
 bind_thm ("csquareD", csquareD_lemma RS mp);
 
 goalw CardinalArith.thy [pred_def]
  "!!K. z<K ==> pred(K*K, <z,z>, csquare_rel(K)) <= succ(z)*succ(z)";
-by (safe_tac (lemmas_cs addSEs [SigmaE]));      (*avoids using succCI*)
+by (safe_tac (claset_of"ZF" addSEs [SigmaE]));  (*avoids using succCI,...*)
 by (rtac (csquareD RS conjE) 1);
 by (rewtac lt_def);
 by (assume_tac 4);
-by (ALLGOALS (fast_tac ZF_cs));
+by (ALLGOALS Fast_tac);
 qed "pred_csquare_subset";
 
 goalw CardinalArith.thy [csquare_rel_def]
@@ -420,8 +420,8 @@
 by (subgoals_tac ["x<K", "y<K"] 1);
 by (REPEAT (eresolve_tac [asm_rl, lt_trans] 2));
 by (REPEAT (etac ltE 1));
-by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff,
-                                  Un_absorb, Un_least_mem_iff, ltD]) 1);
+by (asm_simp_tac (!simpset addsimps [rvimage_iff, rmult_iff, Memrel_iff,
+				     Un_absorb, Un_least_mem_iff, ltD]) 1);
 qed "csquare_ltI";
 
 (*Part of the traditional proof.  UNUSED since it's harder to prove & apply *)
@@ -431,11 +431,11 @@
 by (subgoals_tac ["x<K", "y<K"] 1);
 by (REPEAT (eresolve_tac [asm_rl, lt_trans1] 2));
 by (REPEAT (etac ltE 1));
-by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff,
+by (asm_simp_tac (!simpset addsimps [rvimage_iff, rmult_iff, Memrel_iff,
                                   Un_absorb, Un_least_mem_iff, ltD]) 1);
 by (REPEAT_FIRST (etac succE));
 by (ALLGOALS
-    (asm_simp_tac (ZF_ss addsimps [subset_Un_iff RS iff_sym, 
+    (asm_simp_tac (!simpset addsimps [subset_Un_iff RS iff_sym, 
                                    subset_Un_iff2 RS iff_sym, OrdmemD])));
 qed "csquare_or_eqI";
 
@@ -447,11 +447,11 @@
 \         ordermap(K*K, csquare_rel(K)) ` <z,z>";
 by (subgoals_tac ["z<K", "well_ord(K*K, csquare_rel(K))"] 1);
 by (etac (Limit_is_Ord RS well_ord_csquare) 2);
-by (fast_tac (ZF_cs addSIs [Un_least_lt, Limit_has_succ]) 2);
+by (fast_tac (!claset addSIs [Un_least_lt, Limit_has_succ]) 2);
 by (rtac (csquare_ltI RS ordermap_mono RS ltI) 1);
 by (etac well_ord_is_wf 4);
 by (ALLGOALS 
-    (fast_tac (ZF_cs addSIs [Un_upper1_le, Un_upper2_le, Ord_ordermap] 
+    (fast_tac (!claset addSIs [Un_upper1_le, Un_upper2_le, Ord_ordermap] 
                      addSEs [ltE])));
 qed "ordermap_z_lt";
 
@@ -462,12 +462,12 @@
 by (rtac (well_ord_rmult RS well_ord_lepoll_imp_Card_le) 1);
 by (REPEAT (ares_tac [Ord_cardinal, well_ord_Memrel] 1));
 by (subgoals_tac ["z<K"] 1);
-by (fast_tac (ZF_cs addSIs [Un_least_lt, Limit_has_succ]) 2);
+by (fast_tac (!claset addSIs [Un_least_lt, Limit_has_succ]) 2);
 by (rtac (ordermap_z_lt RS leI RS le_imp_lepoll RS lepoll_trans) 1);
 by (REPEAT_SOME assume_tac);
 by (rtac (ordermap_eqpoll_pred RS eqpoll_imp_lepoll RS lepoll_trans) 1);
 by (etac (Limit_is_Ord RS well_ord_csquare) 1);
-by (fast_tac (ZF_cs addIs [ltD]) 1);
+by (fast_tac (!claset addIs [ltD]) 1);
 by (rtac (pred_csquare_subset RS subset_imp_lepoll RS lepoll_trans) 1 THEN
     assume_tac 1);
 by (REPEAT_FIRST (etac ltE));
@@ -486,8 +486,8 @@
 by (rtac Card_lt_imp_lt 1);
 by (etac InfCard_is_Card 3);
 by (etac ltE 2 THEN assume_tac 2);
-by (asm_full_simp_tac (ZF_ss addsimps [ordertype_unfold]) 1);
-by (safe_tac (ZF_cs addSEs [ltE]));
+by (asm_full_simp_tac (!simpset addsimps [ordertype_unfold]) 1);
+by (safe_tac (!claset addSEs [ltE]));
 by (subgoals_tac ["Ord(xb)", "Ord(y)"] 1);
 by (REPEAT (eresolve_tac [asm_rl, Ord_in_Ord] 2));
 by (rtac (InfCard_is_Limit RS ordermap_csquare_le RS lt_trans1) 1  THEN
@@ -496,13 +496,13 @@
     REPEAT (ares_tac [Ord_Un, Ord_nat] 1));
 (*the finite case: xb Un y < nat *)
 by (res_inst_tac [("j", "nat")] lt_trans2 1);
-by (asm_full_simp_tac (FOL_ss addsimps [InfCard_def]) 2);
+by (asm_full_simp_tac (!simpset addsimps [InfCard_def]) 2);
 by (asm_full_simp_tac
-    (ZF_ss addsimps [lt_def, nat_cmult_eq_mult, nat_succI, mult_type,
+    (!simpset addsimps [lt_def, nat_cmult_eq_mult, nat_succI, mult_type,
                      nat_into_Card RS Card_cardinal_eq, Ord_nat]) 1);
 (*case nat le (xb Un y) *)
 by (asm_full_simp_tac
-    (ZF_ss addsimps [le_imp_subset RS nat_succ_eqpoll RS cardinal_cong,
+    (!simpset addsimps [le_imp_subset RS nat_succ_eqpoll RS cardinal_cong,
                      le_succ_iff, InfCard_def, Card_cardinal, Un_least_lt, 
                      Ord_Un, ltI, nat_le_cardinal,
                      Ord_cardinal_le RS lt_trans1 RS ltD]) 1);
@@ -520,7 +520,7 @@
 by (assume_tac 2);
 by (assume_tac 2);
 by (asm_simp_tac 
-    (ZF_ss addsimps [cmult_def, Ord_cardinal_le,
+    (!simpset addsimps [cmult_def, Ord_cardinal_le,
                      well_ord_csquare RS ordermap_bij RS 
                           bij_imp_eqpoll RS cardinal_cong,
                      well_ord_csquare RS Ord_ordertype]) 1);
@@ -533,7 +533,7 @@
 by (REPEAT (etac (well_ord_cardinal_eqpoll RS eqpoll_sym) 1));
 by (rtac well_ord_cardinal_eqE 1);
 by (REPEAT (ares_tac [Ord_cardinal, well_ord_rmult, well_ord_Memrel] 1));
-by (asm_simp_tac (ZF_ss addsimps [symmetric cmult_def, InfCard_csquare_eq]) 1);
+by (asm_simp_tac (!simpset addsimps [symmetric cmult_def, InfCard_csquare_eq]) 1);
 qed "well_ord_InfCard_square_eq";
 
 (** Toward's Kunen's Corollary 10.13 (1) **)
@@ -544,7 +544,7 @@
     REPEAT (ares_tac [cmult_le_self, InfCard_is_Card] 2));
 by (forward_tac [InfCard_is_Card RS Card_is_Ord RS le_refl] 1);
 by (resolve_tac [cmult_le_mono RS le_trans] 1 THEN REPEAT (assume_tac 1));
-by (asm_simp_tac (ZF_ss addsimps [InfCard_csquare_eq]) 1);
+by (asm_simp_tac (!simpset addsimps [InfCard_csquare_eq]) 1);
 qed "InfCard_le_cmult_eq";
 
 (*Corollary 10.13 (1), for cardinal multiplication*)
@@ -556,14 +556,14 @@
 by (resolve_tac [Un_commute RS ssubst] 1);
 by (ALLGOALS
     (asm_simp_tac 
-     (ZF_ss addsimps [InfCard_is_Limit RS Limit_has_0, InfCard_le_cmult_eq,
+     (!simpset addsimps [InfCard_is_Limit RS Limit_has_0, InfCard_le_cmult_eq,
                       subset_Un_iff2 RS iffD1, le_imp_subset])));
 qed "InfCard_cmult_eq";
 
 (*This proof appear to be the simplest!*)
 goal CardinalArith.thy "!!K. InfCard(K) ==> K |+| K = K";
 by (asm_simp_tac
-    (ZF_ss addsimps [cmult_2 RS sym, InfCard_is_Card, cmult_commute]) 1);
+    (!simpset addsimps [cmult_2 RS sym, InfCard_is_Card, cmult_commute]) 1);
 by (rtac InfCard_le_cmult_eq 1);
 by (typechk_tac [Ord_0, le_refl, leI]);
 by (typechk_tac [InfCard_is_Limit, Limit_has_0, Limit_has_succ]);
@@ -576,7 +576,7 @@
     REPEAT (ares_tac [cadd_le_self, InfCard_is_Card] 2));
 by (forward_tac [InfCard_is_Card RS Card_is_Ord RS le_refl] 1);
 by (resolve_tac [cadd_le_mono RS le_trans] 1 THEN REPEAT (assume_tac 1));
-by (asm_simp_tac (ZF_ss addsimps [InfCard_cdouble_eq]) 1);
+by (asm_simp_tac (!simpset addsimps [InfCard_cdouble_eq]) 1);
 qed "InfCard_le_cadd_eq";
 
 goal CardinalArith.thy
@@ -587,7 +587,7 @@
 by (resolve_tac [Un_commute RS ssubst] 1);
 by (ALLGOALS
     (asm_simp_tac 
-     (ZF_ss addsimps [InfCard_le_cadd_eq,
+     (!simpset addsimps [InfCard_le_cadd_eq,
                       subset_Un_iff2 RS iffD1, le_imp_subset])));
 qed "InfCard_cadd_eq";
 
@@ -601,14 +601,14 @@
 
 goalw CardinalArith.thy [jump_cardinal_def] "Ord(jump_cardinal(K))";
 by (rtac (Ord_is_Transset RSN (2,OrdI)) 1);
-by (fast_tac (ZF_cs addSIs [Ord_ordertype]) 2);
+by (fast_tac (!claset addSIs [Ord_ordertype]) 2);
 by (rewtac Transset_def);
 by (safe_tac subset_cs);
-by (asm_full_simp_tac (ZF_ss addsimps [ordertype_pred_unfold]) 1);
-by (safe_tac ZF_cs);
+by (asm_full_simp_tac (!simpset addsimps [ordertype_pred_unfold]) 1);
+by (safe_tac (!claset));
 by (rtac UN_I 1);
 by (rtac ReplaceI 2);
-by (ALLGOALS (fast_tac (ZF_cs addSEs [well_ord_subset, predE])));
+by (ALLGOALS (fast_tac (!claset addSEs [well_ord_subset, predE])));
 qed "Ord_jump_cardinal";
 
 (*Allows selective unfolding.  Less work than deriving intro/elim rules*)
@@ -624,8 +624,8 @@
 by (resolve_tac [jump_cardinal_iff RS iffD2] 1);
 by (REPEAT_FIRST (ares_tac [exI, conjI, well_ord_Memrel]));
 by (rtac subset_refl 2);
-by (asm_simp_tac (ZF_ss addsimps [Memrel_def, subset_iff]) 1);
-by (asm_simp_tac (ZF_ss addsimps [ordertype_Memrel]) 1);
+by (asm_simp_tac (!simpset addsimps [Memrel_def, subset_iff]) 1);
+by (asm_simp_tac (!simpset addsimps [ordertype_Memrel]) 1);
 qed "K_lt_jump_cardinal";
 
 (*The proof by contradiction: the bijection f yields a wellordering of X
@@ -643,7 +643,7 @@
 by (etac (bij_is_inj RS well_ord_rvimage) 1);
 by (rtac (Ord_jump_cardinal RS well_ord_Memrel) 1);
 by (asm_simp_tac
-    (ZF_ss addsimps [well_ord_Memrel RSN (2, bij_ordertype_vimage), 
+    (!simpset addsimps [well_ord_Memrel RSN (2, bij_ordertype_vimage), 
                      ordertype_Memrel, Ord_jump_cardinal]) 1);
 qed "Card_jump_cardinal_lemma";
 
@@ -651,7 +651,7 @@
 goal CardinalArith.thy "Card(jump_cardinal(K))";
 by (rtac (Ord_jump_cardinal RS CardI) 1);
 by (rewtac eqpoll_def);
-by (safe_tac (ZF_cs addSDs [ltD, jump_cardinal_iff RS iffD1]));
+by (safe_tac (!claset addSDs [ltD, jump_cardinal_iff RS iffD1]));
 by (REPEAT (ares_tac [Card_jump_cardinal_lemma RS mem_irrefl] 1));
 qed "Card_jump_cardinal";
 
@@ -696,12 +696,12 @@
 goal CardinalArith.thy
     "!!K' K. [| Card(K'); Card(K) |] ==> K' < csucc(K) <-> K' le K";
 by (asm_simp_tac 
-    (ZF_ss addsimps [lt_csucc_iff, Card_cardinal_eq, Card_is_Ord]) 1);
+    (!simpset addsimps [lt_csucc_iff, Card_cardinal_eq, Card_is_Ord]) 1);
 qed "Card_lt_csucc_iff";
 
 goalw CardinalArith.thy [InfCard_def]
     "!!K. InfCard(K) ==> InfCard(csucc(K))";
-by (asm_simp_tac (ZF_ss addsimps [Card_csucc, Card_is_Ord, 
+by (asm_simp_tac (!simpset addsimps [Card_csucc, Card_is_Ord, 
                                   lt_csucc RS leI RSN (2,le_trans)]) 1);
 qed "InfCard_csucc";
 
@@ -711,8 +711,8 @@
 goal CardinalArith.thy
     "!!n. n: nat ==> ALL A. A eqpoll n --> A : Fin(A)";
 by (etac nat_induct 1);
-by (simp_tac (ZF_ss addsimps (eqpoll_0_iff::Fin.intrs)) 1);
-by (step_tac ZF_cs 1);
+by (simp_tac (!simpset addsimps (eqpoll_0_iff::Fin.intrs)) 1);
+by (step_tac (!claset) 1);
 by (subgoal_tac "EX u. u:A" 1);
 by (etac exE 1);
 by (resolve_tac [Diff_sing_eqpoll RS revcut_rl] 1);
@@ -721,28 +721,28 @@
 by (res_inst_tac [("b", "A")] (cons_Diff RS subst) 1);
 by (assume_tac 1);
 by (resolve_tac [Fin.consI] 1);
-by (fast_tac ZF_cs 1);
-by (deepen_tac (ZF_cs addIs [Fin_mono RS subsetD]) 0 1);  (*SLOW*)
+by (Fast_tac 1);
+by (fast_tac (!claset addIs [subset_consI  RS Fin_mono RS subsetD]) 1); 
 (*Now for the lemma assumed above*)
 by (rewtac eqpoll_def);
-by (fast_tac (ZF_cs addSEs [bij_converse_bij RS bij_is_fun RS apply_type]) 1);
+by (best_tac (!claset addSEs [bij_converse_bij RS bij_is_fun RS apply_type]) 1);
 val lemma = result();
 
 goalw CardinalArith.thy [Finite_def] "!!A. Finite(A) ==> A : Fin(A)";
-by (fast_tac (ZF_cs addIs [lemma RS spec RS mp]) 1);
+by (fast_tac (!claset addIs [lemma RS spec RS mp]) 1);
 qed "Finite_into_Fin";
 
 goal CardinalArith.thy "!!A. A : Fin(U) ==> Finite(A)";
-by (fast_tac (ZF_cs addSIs [Finite_0, Finite_cons] addEs [Fin.induct]) 1);
+by (fast_tac (!claset addSIs [Finite_0, Finite_cons] addEs [Fin.induct]) 1);
 qed "Fin_into_Finite";
 
 goal CardinalArith.thy "Finite(A) <-> A : Fin(A)";
-by (fast_tac (ZF_cs addIs [Finite_into_Fin] addEs [Fin_into_Finite]) 1);
+by (fast_tac (!claset addIs [Finite_into_Fin] addEs [Fin_into_Finite]) 1);
 qed "Finite_Fin_iff";
 
 goal CardinalArith.thy
     "!!A. [| Finite(A); Finite(B) |] ==> Finite(A Un B)";
-by (fast_tac (ZF_cs addSIs [Fin_into_Finite, Fin_UnI] 
+by (fast_tac (!claset addSIs [Fin_into_Finite, Fin_UnI] 
                     addSDs [Finite_into_Fin]
                     addSEs [Un_upper1 RS Fin_mono RS subsetD,
                             Un_upper2 RS Fin_mono RS subsetD]) 1);
@@ -754,10 +754,10 @@
 goal CardinalArith.thy
     "!!A. A: Fin(U) ==> x~:A --> ~ cons(x,A) lepoll A";
 by (etac Fin_induct 1);
-by (simp_tac (ZF_ss addsimps [lepoll_0_iff]) 1);
+by (simp_tac (!simpset addsimps [lepoll_0_iff]) 1);
 by (subgoal_tac "cons(x,cons(xa,y)) = cons(xa,cons(x,y))" 1);
-by (asm_simp_tac ZF_ss 1);
-by (fast_tac (ZF_cs addSDs [cons_lepoll_consD]) 1);
+by (Asm_simp_tac 1);
+by (fast_tac (!claset addSDs [cons_lepoll_consD]) 1);
 by (fast_tac eq_cs 1);
 qed "Fin_imp_not_cons_lepoll";
 
@@ -766,18 +766,18 @@
 by (rewtac cardinal_def);
 by (rtac Least_equality 1);
 by (fold_tac [cardinal_def]);
-by (simp_tac (ZF_ss addsimps [succ_def]) 1);
-by (fast_tac (ZF_cs addIs [cons_eqpoll_cong, well_ord_cardinal_eqpoll] 
+by (simp_tac (!simpset addsimps [succ_def]) 1);
+by (fast_tac (!claset addIs [cons_eqpoll_cong, well_ord_cardinal_eqpoll] 
                     addSEs [mem_irrefl]
                     addSDs [Finite_imp_well_ord]) 1);
-by (fast_tac (ZF_cs addIs [Ord_succ, Card_cardinal, Card_is_Ord]) 1);
+by (fast_tac (!claset addIs [Ord_succ, Card_cardinal, Card_is_Ord]) 1);
 by (rtac notI 1);
 by (resolve_tac [Finite_into_Fin RS Fin_imp_not_cons_lepoll RS mp RS notE] 1);
 by (assume_tac 1);
 by (assume_tac 1);
 by (eresolve_tac [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_trans] 1);
 by (eresolve_tac [le_imp_lepoll RS lepoll_trans] 1);
-by (fast_tac (ZF_cs addIs [well_ord_cardinal_eqpoll RS eqpoll_imp_lepoll] 
+by (fast_tac (!claset addIs [well_ord_cardinal_eqpoll RS eqpoll_imp_lepoll] 
                     addSDs [Finite_imp_well_ord]) 1);
 qed "Finite_imp_cardinal_cons";
 
@@ -785,14 +785,14 @@
 goal CardinalArith.thy "!!a A. [| Finite(A);  a:A |] ==> succ(|A-{a}|) = |A|";
 by (res_inst_tac [("b", "A")] (cons_Diff RS subst) 1);
 by (assume_tac 1);
-by (asm_simp_tac (ZF_ss addsimps [Finite_imp_cardinal_cons,
+by (asm_simp_tac (!simpset addsimps [Finite_imp_cardinal_cons,
                                   Diff_subset RS subset_Finite]) 1);
-by (asm_simp_tac (ZF_ss addsimps [cons_Diff]) 1);
+by (asm_simp_tac (!simpset addsimps [cons_Diff]) 1);
 qed "Finite_imp_succ_cardinal_Diff";
 
 goal CardinalArith.thy "!!a A. [| Finite(A);  a:A |] ==> |A-{a}| < |A|";
 by (rtac succ_leE 1);
-by (asm_simp_tac (ZF_ss addsimps [Finite_imp_succ_cardinal_Diff, 
+by (asm_simp_tac (!simpset addsimps [Finite_imp_succ_cardinal_Diff, 
                                   Ord_cardinal RS le_refl]) 1);
 qed "Finite_imp_cardinal_Diff";
 
@@ -808,11 +808,11 @@
                   well_ord_radd RS well_ord_cardinal_eqpoll)) RS eqpoll_sym] 1 
     THEN (assume_tac 1));
 by (eresolve_tac [nat_cadd_eq_add RS subst] 1 THEN (assume_tac 1));
-by (asm_full_simp_tac (ZF_ss addsimps [cadd_def, eqpoll_refl]) 1);
+by (asm_full_simp_tac (!simpset addsimps [cadd_def, eqpoll_refl]) 1);
 qed "nat_sum_eqpoll_sum";
 
 goal Nat.thy "!!m. [| m le n; n:nat |] ==> m:nat";
-by (fast_tac (ZF_cs addSDs [nat_succI RS (Ord_nat RSN (2, OrdmemD))]
+by (fast_tac (!claset addSDs [nat_succI RS (Ord_nat RSN (2, OrdmemD))]
         addSEs [ltE]) 1);
 qed "le_in_nat";
 
--- a/src/ZF/Cardinal_AC.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Cardinal_AC.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -27,13 +27,13 @@
 qed "cardinal_eqE";
 
 goal Cardinal_AC.thy "|X| = |Y| <-> X eqpoll Y";
-by (fast_tac (ZF_cs addSEs [cardinal_cong, cardinal_eqE]) 1);
+by (fast_tac (!claset addSEs [cardinal_cong, cardinal_eqE]) 1);
 qed "cardinal_eqpoll_iff";
 
 goal Cardinal_AC.thy
     "!!A. [| |A|=|B|;  |C|=|D|;  A Int C = 0;  B Int D = 0 |] ==> \
 \         |A Un C| = |B Un D|";
-by (asm_full_simp_tac (ZF_ss addsimps [cardinal_eqpoll_iff, 
+by (asm_full_simp_tac (!simpset addsimps [cardinal_eqpoll_iff, 
                                        eqpoll_disjoint_Un]) 1);
 qed "cardinal_disjoint_Un";
 
@@ -92,12 +92,12 @@
 goalw Cardinal_AC.thy [surj_def] "!!f. f: surj(X,Y) ==> EX g. g: inj(Y,X)";
 by (etac CollectE 1);
 by (res_inst_tac [("A1", "Y"), ("B1", "%y. f-``{y}")] (AC_Pi RS exE) 1);
-by (fast_tac (ZF_cs addSEs [apply_Pair]) 1);
+by (fast_tac (!claset addSEs [apply_Pair]) 1);
 by (rtac exI 1);
 by (rtac f_imp_injective 1);
 by (rtac Pi_type 1 THEN assume_tac 1);
-by (fast_tac (ZF_cs addDs [apply_type] addDs [Pi_memberD]) 1);
-by (fast_tac (ZF_cs addDs [apply_type] addEs [apply_equality]) 1);
+by (fast_tac (!claset addDs [apply_type] addDs [Pi_memberD]) 1);
+by (fast_tac (!claset addDs [apply_type] addEs [apply_equality]) 1);
 qed "surj_implies_inj";
 
 (*Kunen's Lemma 10.20*)
@@ -111,10 +111,10 @@
 (*Kunen's Lemma 10.21*)
 goal Cardinal_AC.thy
     "!!K. [| InfCard(K);  ALL i:K. |X(i)| le K |] ==> |UN i:K. X(i)| le K";
-by (asm_full_simp_tac (ZF_ss addsimps [InfCard_is_Card, le_Card_iff]) 1);
+by (asm_full_simp_tac (!simpset addsimps [InfCard_is_Card, le_Card_iff]) 1);
 by (rtac lepoll_trans 1);
 by (resolve_tac [InfCard_square_eq RS eqpoll_imp_lepoll] 2);
-by (asm_simp_tac (ZF_ss addsimps [InfCard_is_Card, Card_cardinal_eq]) 2);
+by (asm_simp_tac (!simpset addsimps [InfCard_is_Card, Card_cardinal_eq]) 2);
 by (rewtac lepoll_def);
 by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1);
 by (etac (AC_ball_Pi RS exE) 1);
@@ -122,18 +122,18 @@
 (*Lemma needed in both subgoals, for a fixed z*)
 by (subgoal_tac
     "ALL z: (UN i:K. X(i)). z: X(LEAST i. z:X(i)) & (LEAST i. z:X(i)) : K" 1);
-by (fast_tac (ZF_cs addSIs [Least_le RS lt_trans1 RS ltD, ltI]
+by (fast_tac (!claset addSIs [Least_le RS lt_trans1 RS ltD, ltI]
                     addSEs [LeastI, Ord_in_Ord]) 2);
 by (res_inst_tac [("c", "%z. <LEAST i. z:X(i), f ` (LEAST i. z:X(i)) ` z>"),
                   ("d", "%<i,j>. converse(f`i) ` j")] 
         lam_injective 1);
 (*Instantiate the lemma proved above*)
 by (ALLGOALS ball_tac);
-by (fast_tac (ZF_cs addEs [inj_is_fun RS apply_type]
+by (fast_tac (!claset addEs [inj_is_fun RS apply_type]
                     addDs [apply_type]) 1);
 by (dtac apply_type 1);
 by (etac conjunct2 1);
-by (asm_simp_tac (ZF_ss addsimps [left_inverse]) 1);
+by (asm_simp_tac (!simpset addsimps [left_inverse]) 1);
 qed "cardinal_UN_le";
 
 (*The same again, using csucc*)
@@ -141,7 +141,7 @@
     "!!K. [| InfCard(K);  ALL i:K. |X(i)| < csucc(K) |] ==> \
 \         |UN i:K. X(i)| < csucc(K)";
 by (asm_full_simp_tac 
-    (ZF_ss addsimps [Card_lt_csucc_iff, cardinal_UN_le, 
+    (!simpset addsimps [Card_lt_csucc_iff, cardinal_UN_le, 
                      InfCard_is_Card, Card_cardinal]) 1);
 qed "cardinal_UN_lt_csucc";
 
@@ -152,8 +152,8 @@
 \         (UN i:K. j(i)) < csucc(K)";
 by (resolve_tac [cardinal_UN_lt_csucc RS Card_lt_imp_lt] 1);
 by (assume_tac 1);
-by (fast_tac (ZF_cs addIs [Ord_cardinal_le RS lt_trans1] addEs [ltE]) 1);
-by (fast_tac (ZF_cs addSIs [Ord_UN] addEs [ltE]) 1);
+by (fast_tac (!claset addIs [Ord_cardinal_le RS lt_trans1] addEs [ltE]) 1);
+by (fast_tac (!claset addSIs [Ord_UN] addEs [ltE]) 1);
 by (eresolve_tac [InfCard_is_Card RS Card_is_Ord RS Card_csucc] 1);
 qed "cardinal_UN_Ord_lt_csucc";
 
@@ -176,7 +176,7 @@
 by (res_inst_tac [("x1", "f`x")] (UN_upper RSN (2,subset_trans)) 1);
 by (eresolve_tac [inj_is_fun RS apply_type] 2 THEN assume_tac 2);
 by (asm_simp_tac 
-    (ZF_ss addsimps [inj_is_fun RS apply_rangeI, left_inverse]) 1);
+    (!simpset addsimps [inj_is_fun RS apply_rangeI, left_inverse]) 1);
 val inj_UN_subset = result();
 
 (*Simpler to require |W|=K; we'd have a bijection; but the theorem would
@@ -186,16 +186,16 @@
 \         (UN w:W. j(w)) < csucc(K)";
 by (excluded_middle_tac "W=0" 1);
 by (asm_simp_tac        (*solve the easy 0 case*)
-    (ZF_ss addsimps [UN_0, InfCard_is_Card, Card_is_Ord RS Card_csucc, 
+    (!simpset addsimps [UN_0, InfCard_is_Card, Card_is_Ord RS Card_csucc, 
                      Card_is_Ord, Ord_0_lt_csucc]) 2);
 by (asm_full_simp_tac
-    (ZF_ss addsimps [InfCard_is_Card, le_Card_iff, lepoll_def]) 1);
+    (!simpset addsimps [InfCard_is_Card, le_Card_iff, lepoll_def]) 1);
 by (safe_tac eq_cs);
 by (swap_res_tac [[inj_UN_subset, cardinal_UN_Ord_lt_csucc] 
                   MRS lt_subset_trans] 1);
 by (REPEAT (assume_tac 1));
-by (fast_tac (ZF_cs addSIs [Ord_UN] addEs [ltE]) 2);
-by (asm_simp_tac (ZF_ss addsimps [inj_converse_fun RS apply_type]
+by (fast_tac (!claset addSIs [Ord_UN] addEs [ltE]) 2);
+by (asm_simp_tac (!simpset addsimps [inj_converse_fun RS apply_type]
                         setloop split_tac [expand_if]) 1);
 qed "le_UN_Ord_lt_csucc";
 
--- a/src/ZF/Coind/ECR.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Coind/ECR.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -16,7 +16,7 @@
 \ <v_clos(x, e, ve),t>:HasTyRel";
 by (rtac HasTyRel.coinduct 1);
 by (rtac singletonI 1);
-by (fast_tac (ZF_cs addIs Val_ValEnv.intrs) 1);
+by (fast_tac (!claset addIs Val_ValEnv.intrs) 1);
 by (rtac disjI2 1);
 by (etac singletonE 1); 
 by (REPEAT_FIRST (resolve_tac [conjI,exI]));
@@ -42,19 +42,19 @@
       addEs [htr_closE])
   end;
 
-val htr_cs = mk_htr_cs(static_cs);
+claset := mk_htr_cs (!claset);
 
 (* Properties of the pointwise extension to environments *)
 
 goalw ECR.thy [hastyenv_def]
   "!!ve.[| ve:ValEnv; te:TyEnv; hastyenv(ve,te); <v,t>:HasTyRel |] ==> \
 \   hastyenv(ve_owr(ve,x,v),te_owr(te,x,t))";
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (stac ve_dom_owr 1);
 by (assume_tac 1);
 by (etac (HasTyRel.dom_subset RS subsetD RS SigmaD1 RS ValNEE) 1);
 by (stac te_dom_owr 1);
-by (asm_simp_tac ZF_ss 1);
+by (Asm_simp_tac 1);
 by (rtac (excluded_middle RS disjE) 1);
 by (stac ve_app_owr2 1);
 by (assume_tac 1);
@@ -63,21 +63,21 @@
 by (assume_tac 1);
 by (dtac (ve_dom_owr RS subst) 1);
 by (etac (HasTyRel.dom_subset RS subsetD RS SigmaD1 RS ValNEE) 1);
-by ((fast_tac ZF_cs 1) THEN (fast_tac ZF_cs 1));
-by (asm_simp_tac (ZF_ss addsimps [ve_app_owr1,te_app_owr1]) 1);
+by ((Fast_tac 1) THEN (Fast_tac 1));
+by (asm_simp_tac (!simpset addsimps [ve_app_owr1,te_app_owr1]) 1);
 qed "hastyenv_owr";
 
 goalw ECR.thy  [isofenv_def,hastyenv_def]
   "!!ve.[| ve:ValEnv; te:TyEnv; isofenv(ve,te) |] ==> hastyenv(ve,te)";
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (dtac bspec 1);
 by (assume_tac 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (dtac HasTyRel.htr_constI 1);
 by (assume_tac 2);
 by (etac te_appI 1);
 by (etac ve_domI 1);
-by (ALLGOALS (asm_full_simp_tac ZF_ss));
+by (ALLGOALS Asm_full_simp_tac);
 qed "basic_consistency_lem";
 
 
--- a/src/ZF/Coind/Language.ML	Fri Jan 03 10:48:28 1997 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-(*  Title:      ZF/Coind/Language.ML
-    ID:         $Id$
-    Author:     Jacob Frost, Cambridge University Computer Laboratory
-    Copyright   1995  University of Cambridge
-*)
-
-(* ############################################################ *)
-(* General lemmas                                               *)
-(* ############################################################ *)
-
-goal ZF.thy "!!a.~a=b ==> ~a:{b}";
-by (fast_tac ZF_cs 1);    
-qed "notsingletonI";
-
-goal ZF.thy "!!a.~a:{b} ==> ~a=b";
-by (fast_tac ZF_cs 1);    
-qed "notsingletonD";
-
-val prems = goal ZF.thy "[| a~:{b}; a~=b ==> P |] ==> P";
-by (cut_facts_tac prems 1);
-by (resolve_tac prems 1);
-by (fast_tac ZF_cs 1);    
-qed "notsingletonE";
-
-goal ZF.thy "!!x. x : A Un B ==> x: B Un A";
-by (fast_tac ZF_cs 1);
-qed "lem_fix";
-
-goal ZF.thy "!!A.[| x~:A; x=y |] ==> y~:A";
-by (fast_tac ZF_cs 1);
-qed "map_lem1";
-
-
-open Language;
-
--- a/src/ZF/Coind/MT.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Coind/MT.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -11,38 +11,32 @@
 (* The Consistency theorem                                      *)
 (* ############################################################ *)
 
-val prems = goal MT.thy 
-  "[| c:Const; hastyenv(ve,te);<te,e_const(c),t>:ElabRel |] ==>         \
-\  <v_const(c), t> : HasTyRel";
-by (cut_facts_tac prems 1);
-by (fast_tac htr_cs 1);
+goal MT.thy 
+  "!!t. [| c:Const; hastyenv(ve,te);<te,e_const(c),t>:ElabRel |] ==>         \
+\       <v_const(c), t> : HasTyRel";
+by (Fast_tac 1);
 qed "consistency_const";
 
 
-val prems = goalw  MT.thy [hastyenv_def]
-  "[| x:ve_dom(ve); hastyenv(ve,te); <te,e_var(x),t>:ElabRel |] ==>     \
+goalw  MT.thy [hastyenv_def]
+  "!!t. [| x:ve_dom(ve); hastyenv(ve,te); <te,e_var(x),t>:ElabRel |] ==>     \
 \  <ve_app(ve,x),t>:HasTyRel";
-by (cut_facts_tac prems 1);
-by (fast_tac static_cs 1);
+by (Fast_tac 1);
 qed "consistency_var";
 
 
-val prems = goalw MT.thy [hastyenv_def]
-  "[| ve:ValEnv; x:ExVar; e:Exp; hastyenv(ve,te);       \
-\     <te,e_fn(x,e),t>:ElabRel  \
-\  |] ==>       \
-\  <v_clos(x, e, ve), t> : HasTyRel";
-by (cut_facts_tac prems 1);
-by (best_tac htr_cs 1);
+goalw MT.thy [hastyenv_def]
+  "!!t. [| ve:ValEnv; x:ExVar; e:Exp; hastyenv(ve,te);       \
+\          <te,e_fn(x,e),t>:ElabRel  \
+\       |] ==> <v_clos(x, e, ve), t> : HasTyRel";
+by (Best_tac 1);
 qed "consistency_fn";
 
-val MT_cs = ZF_cs 
-  addIs (Ty.intrs@TyEnv.intrs@Val_ValEnv.intrs)
-  addDs [te_owrE,(ElabRel.dom_subset RS subsetD)];
+AddIs (Ty.intrs@TyEnv.intrs@Val_ValEnv.intrs);
+AddDs [te_owrE,(ElabRel.dom_subset RS subsetD)];
 
-val MT_ss = 
-  ZF_ss addsimps 
-  [ve_dom_owr,te_dom_owr,ve_app_owr1,ve_app_owr2,te_app_owr1,te_app_owr2];
+Addsimps [ve_dom_owr, te_dom_owr, ve_app_owr1, ve_app_owr2, 
+	  te_app_owr1, te_app_owr2];
 
 val clean_tac = 
   REPEAT_FIRST (fn i => 
@@ -57,7 +51,7 @@
 \  <cl,t>:HasTyRel";
 by (cut_facts_tac prems 1);
 by (etac elab_fixE 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (EVERY [forward_tac [subst] 1,atac 2,rtac htr_closCI 1]);
 by clean_tac;
 by (rtac ve_owrI 1);
@@ -70,12 +64,12 @@
 by (assume_tac 1);
 by (rtac ElabRel.elab_fnI 1);
 by clean_tac;
-by (asm_simp_tac MT_ss 1);
+by (Asm_simp_tac 1);
 by (stac ve_dom_owr 1);
 by (assume_tac 1);
 by (etac subst 1);
 by (rtac v_closNE 1);
-by (asm_simp_tac ZF_ss 1);
+by (Asm_simp_tac 1);
 
 by (rtac PowI 1);
 by (stac ve_dom_owr 1);
@@ -84,15 +78,8 @@
 by (rtac v_closNE 1);
 by (rtac subsetI 1);
 by (etac RepFunE 1);
-by (dtac lem_fix 1);
-by (etac UnE' 1);
-by (rtac UnI1 1);
-by (etac singletonE 1);
-by (asm_full_simp_tac MT_ss 1);
-by (rtac UnI2 1);
-by (etac notsingletonE 1);
-by (dtac not_sym 1);
-by (asm_full_simp_tac MT_ss 1);
+by (excluded_middle_tac "f=y" 1);
+by (Auto_tac());
 qed "consistency_fix";
 
 
@@ -151,7 +138,7 @@
 by (assume_tac 1);
 by (assume_tac 2);
 by (rewrite_tac [hastyenv_def]);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "consistency_app2";
 
 fun mt_cases_tac t = ((rtac t 1) THEN (TRYALL assume_tac)); 
@@ -180,7 +167,7 @@
 by (cut_facts_tac prems 1);
 by (rtac (htr_constE) 1);
 by (dtac consistency 1);
-by (fast_tac (ZF_cs addSIs [basic_consistency_lem]) 1);
+by (fast_tac (!claset addSIs [basic_consistency_lem]) 1);
 by (assume_tac 1);
 qed "basic_consistency";
 
--- a/src/ZF/Coind/Map.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Coind/Map.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -38,7 +38,7 @@
 by (rtac ([Sigma_mono, product_univ] MRS subset_trans) 1);
 by (etac subset_trans 1);
 by (rtac (arg_subset_eclose RS univ_mono) 1);
-by (simp_tac (ZF_ss addsimps [Union_Pow_eq]) 1);
+by (simp_tac (!simpset addsimps [Union_Pow_eq]) 1);
 qed "MapQU_lemma";
 
 (* Theorems *)
@@ -49,7 +49,7 @@
 by (rtac (MapQU_lemma RS subsetD) 1);
 by (rtac subsetI 1);
 by (eresolve_tac prems 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "mapQU";
 
 (* ############################################################ *)
@@ -57,7 +57,7 @@
 (* ############################################################ *)
 
 goalw Map.thy [PMap_def,TMap_def] "!!A.B<=C ==> PMap(A,B)<=PMap(A,C)";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "map_mono";
 
 (* Rename to pmap_mono *)
@@ -69,7 +69,7 @@
 (** map_emp **)
 
 goalw Map.thy [map_emp_def,PMap_def,TMap_def] "map_emp:PMap(A,B)";
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (rtac image_02 1);
 qed "pmap_empI";
 
@@ -78,21 +78,21 @@
 
 goalw Map.thy [map_owr_def,PMap_def,TMap_def] 
   "!! A.[| m:PMap(A,B); a:A; b:B |]  ==> map_owr(m,a,b):PMap(A,B)";
-by (safe_tac ZF_cs);
-by (ALLGOALS (asm_full_simp_tac (ZF_ss addsimps [if_iff])));
-by (fast_tac ZF_cs 1);
-by (fast_tac ZF_cs 1);
-by (fast_tac ZF_cs 1);
-
+by (Step_tac 1);
+by (ALLGOALS (asm_full_simp_tac (!simpset addsimps [if_iff])));
+by (Fast_tac 1);
+by (Fast_tac 1);
+by (Deepen_tac 2 1);
+(*Remaining subgoal*)
 by (rtac (excluded_middle RS disjE) 1);
 by (etac image_Sigma1 1);
 by (dres_inst_tac [("psi", "?uu ~: B")] asm_rl 1);
 by (asm_full_simp_tac
- (ZF_ss addsimps [qbeta] setloop split_tac [expand_if]) 1);
-by (safe_tac FOL_cs);
+    (!simpset addsimps [qbeta] setloop split_tac [expand_if]) 1);
+by (safe_tac (!claset));
 by (dres_inst_tac [("psi", "?uu ~: B")] asm_rl 3);
-by (ALLGOALS (asm_full_simp_tac ZF_ss));
-by (fast_tac ZF_cs 1);
+by (ALLGOALS Asm_full_simp_tac);
+by (Fast_tac 1);
 qed "pmap_owrI";
 
 (** map_app **)
@@ -101,7 +101,7 @@
   "!!m.[| m:TMap(A,B); a:domain(m) |] ==> map_app(m,a) ~=0";
 by (etac domainE 1);
 by (dtac imageI 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 by (etac not_emptyI 1);
 qed "tmap_app_notempty";
 
@@ -116,7 +116,7 @@
 by (assume_tac 1);
 by (dtac tmap_appI 1); 
 by (assume_tac 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "pmap_appI";
 
 (** domain **)
@@ -144,7 +144,7 @@
 qed "domain_UN";
 
 goal Map.thy  "domain(Sigma(A,B)) = {x:A.EX y.y:B(x)}";
-by (simp_tac (ZF_ss addsimps [domain_UN,domain_0,domain_cons]) 1);
+by (simp_tac (!simpset addsimps [domain_UN,domain_0,domain_cons]) 1);
 by (fast_tac eq_cs 1);
 qed "domain_Sigma";
 
@@ -156,7 +156,7 @@
 
 goalw Map.thy [map_owr_def] 
   "!!a.b ~= 0 ==> domain(map_owr(f,a,b)) = {a} Un domain(f)";
-by (simp_tac (if_ss addsimps [domain_Sigma]) 1);
+by (simp_tac (!simpset addsimps [domain_Sigma]) 1);
 by (rtac equalityI 1);
 by (fast_tac eq_cs 1);
 by (rtac subsetI 1);
@@ -164,11 +164,9 @@
 by (assume_tac 1);
 by (etac UnE' 1);
 by (etac singletonE 1);
-by (asm_simp_tac if_ss 1);
+by (Asm_simp_tac 1);
 by (fast_tac eq_cs 1);
-by (etac notsingletonE 1);
-by (asm_simp_tac if_ss 1);
-by (fast_tac eq_cs 1);
+by (fast_tac (eq_cs addss (!simpset)) 1);
 qed "map_domain_owr";
 
 (** Application **)
@@ -176,8 +174,8 @@
 goalw Map.thy [map_app_def,map_owr_def] 
   "map_app(map_owr(f,a,b),a) = b";
 by (stac qbeta 1);
-by (fast_tac ZF_cs 1);
-by (simp_tac if_ss 1);
+by (Fast_tac 1);
+by (Simp_tac 1);
 qed "map_app_owr1";
 
 goalw Map.thy [map_app_def,map_owr_def] 
@@ -187,7 +185,7 @@
 by (assume_tac 1);
 by (fast_tac eq_cs 1);
 by (etac (qbeta RS ssubst) 1);
-by (asm_simp_tac if_ss 1);
+by (Asm_simp_tac 1);
 qed "map_app_owr2";
 
 
--- a/src/ZF/Coind/Static.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Coind/Static.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -21,20 +21,10 @@
 val elab_appE = 
   ElabRel.mk_cases Exp.con_defs "<te,e_app(e1,e2),t>:ElabRel";
 
-fun mk_static_cs cs=
-  let open ElabRel in 
-  ( cs 
-    addSIs [elab_constI,elab_varI,elab_fnI,elab_fixI]
-    addSEs [elab_constE,elab_varE,elab_fixE]
-    addIs [elab_appI]
-    addEs [elab_appE,elab_fnE]
-    addDs [ElabRel.dom_subset RS subsetD]
-  ) end ;
-
-val static_cs = mk_static_cs ZF_cs;
-
-
-
-
-
-
+let open ElabRel in 
+claset := !claset addSIs [elab_constI,elab_varI,elab_fnI,elab_fixI]
+                  addSEs [elab_constE,elab_varE,elab_fixE]
+		  addIs [elab_appI]
+		  addEs [elab_appE,elab_fnE]
+		  addDs [ElabRel.dom_subset RS subsetD]
+end;
--- a/src/ZF/Coind/Types.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Coind/Types.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -15,7 +15,7 @@
 
 goal Types.thy "te_rec(te_emp,c_te_emp,f_te_owr) = c_te_emp";
 by (rtac (te_rec_def RS def_Vrec RS trans) 1);
-by (simp_tac (ZF_ss addsimps TyEnv.case_eqns) 1);
+by (simp_tac (!simpset addsimps (rank_te_owr1::TyEnv.case_eqns)) 1);
 qed "te_rec_emp";
 
 goal Types.thy 
@@ -26,38 +26,36 @@
 qed "te_rec_owr";
 
 goalw Types.thy [te_dom_def] "te_dom(te_emp) = 0";
-by (simp_tac (ZF_ss addsimps [te_rec_emp]) 1);
+by (simp_tac (!simpset addsimps [te_rec_emp]) 1);
 qed "te_dom_emp";
 
 goalw Types.thy [te_dom_def] "te_dom(te_owr(te,x,v)) = te_dom(te) Un {x}";
-by (simp_tac (ZF_ss addsimps [te_rec_owr]) 1);
+by (simp_tac (!simpset addsimps [te_rec_owr]) 1);
 qed "te_dom_owr";
 
 goalw Types.thy [te_app_def] "te_app(te_owr(te,x,t),x) = t";
-by (simp_tac (ZF_ss addsimps [te_rec_owr]) 1);
+by (simp_tac (!simpset addsimps [te_rec_owr]) 1);
 qed "te_app_owr1";
 
-val prems = goalw Types.thy [te_app_def]
-  "x ~= y ==> te_app(te_owr(te,x,t),y) = te_app(te,y)";
-by (cut_facts_tac prems 1);
-by (asm_simp_tac (ZF_ss addsimps [te_rec_owr,(not_sym RS if_not_P)]) 1);
+goalw Types.thy [te_app_def]
+  "!!x y. x ~= y ==> te_app(te_owr(te,x,t),y) = te_app(te,y)";
+by (asm_simp_tac (!simpset addsimps [te_rec_owr,(not_sym RS if_not_P)]) 1);
 qed "te_app_owr2";
 
-val prems = goal Types.thy
-  "[| te:TyEnv; x:ExVar; x:te_dom(te) |] ==> te_app(te,x):Ty";
-by (cut_facts_tac prems 1);
+goal Types.thy
+    "!!te. [| te:TyEnv; x:ExVar; x:te_dom(te) |] ==> te_app(te,x):Ty";
 by (res_inst_tac [("P","x:te_dom(te)")] impE 1);
 by (assume_tac 2);
 by (assume_tac 2);
 by (etac TyEnv.induct 1);
-by (simp_tac (ZF_ss addsimps [te_dom_emp]) 1);
+by (simp_tac (!simpset addsimps [te_dom_emp]) 1);
 by (rtac impI 1);
 by (rtac (excluded_middle RS disjE) 1);
 by (stac te_app_owr2 1);
 by (assume_tac 1);
-by (asm_full_simp_tac (ZF_ss addsimps [te_dom_owr]) 1);
-by (fast_tac ZF_cs 1);
-by (asm_simp_tac (ZF_ss addsimps [te_app_owr1]) 1);
+by (asm_full_simp_tac (!simpset addsimps [te_dom_owr]) 1);
+by (Fast_tac 1);
+by (asm_simp_tac (!simpset addsimps [te_app_owr1]) 1);
 qed "te_appI";
 
 
--- a/src/ZF/Coind/Values.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Coind/Values.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -16,7 +16,7 @@
 by (etac Val_ValEnv.elim 1);
 by (eresolve_tac prems 3);
 by (rewrite_tac Val_ValEnv.con_defs);
-by (ALLGOALS (fast_tac qsum_cs));
+by (ALLGOALS Fast_tac);
 qed "ValEnvE";
 
 val prems = goalw Values.thy (Part_def::[hd (tl Val_ValEnv.defs)])
@@ -37,7 +37,7 @@
 by (assume_tac 1);
 by (assume_tac 1);
 by (rewrite_tac Val_ValEnv.con_defs);
-by (fast_tac qsum_cs 1);
+by (Fast_tac 1);
 qed "ValE";
 
 (* Nonempty sets *)
@@ -45,8 +45,8 @@
 val prems = goal Values.thy "A ~= 0 ==> EX a.a:A";
 by (cut_facts_tac prems 1);
 by (rtac (foundation RS disjE) 1);
-by (fast_tac ZF_cs 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
+by (Fast_tac 1);
 qed "set_notemptyE";
 
 goalw Values.thy (sum_def::QPair_def::QInl_def::QInr_def::Val_ValEnv.con_defs)
@@ -56,7 +56,7 @@
 by (rtac SigmaI 1);
 by (rtac singletonI 1);
 by (rtac UnI1 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "v_closNE";
 
 goalw Values.thy (sum_def::QPair_def::QInl_def::QInr_def::Val_ValEnv.con_defs)
@@ -88,7 +88,7 @@
   "[| ve:ValEnv; v ~=0 |] ==> ve_dom(ve_owr(ve,x,v)) = ve_dom(ve) Un {x}";
 by (cut_facts_tac prems 1);
 by (etac ValEnvE 1);
-by (asm_full_simp_tac (ZF_ss addsimps Val_ValEnv.case_eqns) 1);
+by (asm_full_simp_tac (!simpset addsimps Val_ValEnv.case_eqns) 1);
 by (stac map_domain_owr 1);
 by (assume_tac 1);
 by (rtac Un_commute 1);
@@ -97,16 +97,16 @@
 goalw Values.thy [ve_app_def,ve_owr_def]
 "!!ve. ve:ValEnv ==> ve_app(ve_owr(ve,x,v),x) = v"; 
 by (etac ValEnvE 1);
-by (asm_full_simp_tac (ZF_ss addsimps Val_ValEnv.case_eqns) 1);
+by (asm_full_simp_tac (!simpset addsimps Val_ValEnv.case_eqns) 1);
 by (rtac map_app_owr1 1);
 qed "ve_app_owr1";
 
 goalw Values.thy [ve_app_def,ve_owr_def]
  "!!ve.ve:ValEnv ==> x ~= y ==> ve_app(ve_owr(ve,x,v),y) = ve_app(ve,y)";
 by (etac ValEnvE 1);
-by (asm_full_simp_tac (ZF_ss addsimps Val_ValEnv.case_eqns) 1);
+by (asm_full_simp_tac (!simpset addsimps Val_ValEnv.case_eqns) 1);
 by (rtac map_app_owr2 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "ve_app_owr2";
 
 (* Introduction rules for operators on value environments *)
@@ -115,7 +115,7 @@
   "!!ve.[| ve:ValEnv; x:ve_dom(ve) |] ==> ve_app(ve,x):Val";
 by (etac ValEnvE 1);
 by (hyp_subst_tac 1);
-by (asm_full_simp_tac (ZF_ss addsimps Val_ValEnv.case_eqns) 1);
+by (asm_full_simp_tac (!simpset addsimps Val_ValEnv.case_eqns) 1);
 by (rtac pmap_appI 1);
 by (assume_tac 1);
 by (assume_tac 1);
@@ -125,7 +125,7 @@
   "!!ve.[| ve:ValEnv; x:ve_dom(ve) |] ==> x:ExVar";
 by (etac ValEnvE 1);
 by (hyp_subst_tac 1);
-by (asm_full_simp_tac (ZF_ss addsimps Val_ValEnv.case_eqns) 1);
+by (asm_full_simp_tac (!simpset addsimps Val_ValEnv.case_eqns) 1);
 by (rtac pmap_domainD 1);
 by (assume_tac 1);
 by (assume_tac 1);
@@ -140,7 +140,7 @@
   "!!ve.[|ve:ValEnv; x:ExVar; v:Val |] ==> ve_owr(ve,x,v):ValEnv";
 by (etac ValEnvE 1);
 by (hyp_subst_tac 1);
-by (asm_full_simp_tac (ZF_ss addsimps Val_ValEnv.case_eqns) 1);
+by (asm_full_simp_tac (!simpset addsimps Val_ValEnv.case_eqns) 1);
 by (rtac Val_ValEnv.ve_mk_I 1);
 by (etac pmap_owrI 1);
 by (assume_tac 1);
--- a/src/ZF/Epsilon.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Epsilon.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -64,9 +64,9 @@
     "!!X A n. [| Transset(X);  A<=X;  n: nat |] ==> \
 \             nat_rec(n, A, %m r. Union(r)) <= X";
 by (etac nat_induct 1);
-by (asm_simp_tac (ZF_ss addsimps [nat_rec_0]) 1);
-by (asm_simp_tac (ZF_ss addsimps [nat_rec_succ]) 1);
-by (fast_tac ZF_cs 1);
+by (asm_simp_tac (!simpset addsimps [nat_rec_0]) 1);
+by (asm_simp_tac (!simpset addsimps [nat_rec_succ]) 1);
+by (Fast_tac 1);
 qed "eclose_least_lemma";
 
 goalw Epsilon.thy [eclose_def]
@@ -86,7 +86,7 @@
 by (etac (arg_subset_eclose RS subsetD) 2);
 by (etac base 2);
 by (rewtac Transset_def);
-by (fast_tac (ZF_cs addEs [step,ecloseD]) 1);
+by (fast_tac (!claset addEs [step,ecloseD]) 1);
 qed "eclose_induct_down";
 
 goal Epsilon.thy "!!X. Transset(X) ==> eclose(X) = X";
@@ -118,7 +118,7 @@
 (* j : eclose(A) ==> Memrel(eclose(A)) -`` j = j *)
 val under_Memrel_eclose = Transset_eclose RS under_Memrel;
 
-bind_thm ("wfrec_ssubst", wf_Memrel RS wfrec RS ssubst);
+val wfrec_ssubst = standard (wf_Memrel RS wfrec RS ssubst);
 
 val [kmemj,jmemi] = goal Epsilon.thy
     "[| k:eclose({j});  j:eclose({i}) |] ==> \
@@ -126,7 +126,7 @@
 by (rtac (kmemj RS eclose_induct) 1);
 by (rtac wfrec_ssubst 1);
 by (rtac wfrec_ssubst 1);
-by (asm_simp_tac (ZF_ss addsimps [under_Memrel_eclose,
+by (asm_simp_tac (!simpset addsimps [under_Memrel_eclose,
                                   jmemi RSN (2,mem_eclose_sing_trans)]) 1);
 qed "wfrec_eclose_eq";
 
@@ -139,7 +139,7 @@
 goalw Epsilon.thy [transrec_def]
     "transrec(a,H) = H(a, lam x:a. transrec(x,H))";
 by (rtac wfrec_ssubst 1);
-by (simp_tac (ZF_ss addsimps [wfrec_eclose_eq2, arg_in_eclose_sing,
+by (simp_tac (!simpset addsimps [wfrec_eclose_eq2, arg_in_eclose_sing,
                               under_Memrel_eclose]) 1);
 qed "transrec";
 
@@ -178,7 +178,7 @@
 (*NOT SUITABLE FOR REWRITING -- RECURSIVE!*)
 goal Epsilon.thy "rank(a) = (UN y:a. succ(rank(y)))";
 by (stac (rank_def RS def_transrec) 1);
-by (simp_tac ZF_ss 1);
+by (Simp_tac 1);
 qed "rank";
 
 goal Epsilon.thy "Ord(rank(a))";
@@ -192,7 +192,7 @@
 val [major] = goal Epsilon.thy "Ord(i) ==> rank(i) = i";
 by (rtac (major RS trans_induct) 1);
 by (stac rank 1);
-by (asm_simp_tac (ZF_ss addsimps [Ord_equality]) 1);
+by (asm_simp_tac (!simpset addsimps [Ord_equality]) 1);
 qed "rank_of_Ord";
 
 goal Epsilon.thy "!!a b. a:b ==> rank(a) < rank(b)";
@@ -228,14 +228,14 @@
 
 goal Epsilon.thy "rank(0) = 0";
 by (rtac (rank RS trans) 1);
-by (fast_tac (ZF_cs addSIs [equalityI]) 1);
+by (fast_tac (!claset addSIs [equalityI]) 1);
 qed "rank_0";
 
 goal Epsilon.thy "rank(succ(x)) = succ(rank(x))";
 by (rtac (rank RS trans) 1);
 by (rtac ([UN_least, succI1 RS UN_upper] MRS equalityI) 1);
 by (etac succE 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 by (etac (rank_lt RS leI RS succ_leI RS le_imp_subset) 1);
 qed "rank_succ";
 
@@ -297,3 +297,32 @@
 by (rtac ([Transset_eclose, subset_refl] MRS eclose_least) 1);
 by (rtac arg_subset_eclose 1);
 qed "eclose_idem";
+
+(*Transfinite recursion for definitions based on the three cases of ordinals.
+*)
+
+goal thy "transrec2(0,a,b) = a";
+by (rtac (transrec2_def RS def_transrec RS trans) 1);
+by (Simp_tac 1);
+qed "transrec2_0";
+
+goal thy "(THE j. i=j) = i";
+by (fast_tac (!claset addSIs [the_equality]) 1);
+qed "THE_eq";
+
+goal thy "transrec2(succ(i),a,b) = b(i, transrec2(i,a,b))";
+by (rtac (transrec2_def RS def_transrec RS trans) 1);
+by (simp_tac (!simpset addsimps [succ_not_0, THE_eq, if_P]
+                    setsolver K Fast_tac) 1);
+qed "transrec2_succ";
+
+goal thy "!!i. Limit(i) ==> transrec2(i,a,b) = (UN j<i. transrec2(j,a,b))";
+by (rtac (transrec2_def RS def_transrec RS trans) 1);
+by (resolve_tac [if_not_P RS trans] 1 THEN
+    fast_tac (!claset addSDs [Limit_has_0] addSEs [ltE]) 1);
+by (resolve_tac [if_not_P RS trans] 1 THEN
+    fast_tac (!claset addSEs [succ_LimitE]) 1);
+by (Simp_tac 1);
+qed "transrec2_Limit";
+
+Addsimps [transrec2_0, transrec2_succ];
--- a/src/ZF/Epsilon.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Epsilon.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -6,13 +6,23 @@
 Epsilon induction and recursion
 *)
 
-Epsilon = Nat + "mono" +
-consts
-    eclose,rank ::      i=>i
-    transrec    ::      [i, [i,i]=>i] =>i
+Epsilon = Nat + mono +
+constdefs
+  eclose    :: i=>i
+    "eclose(A) == UN n:nat. nat_rec(n, A, %m r. Union(r))"
 
-defs
-  eclose_def    "eclose(A) == UN n:nat. nat_rec(n, A, %m r. Union(r))"
-  transrec_def  "transrec(a,H) == wfrec(Memrel(eclose({a})), a, H)"
-  rank_def      "rank(a) == transrec(a, %x f. UN y:x. succ(f`y))"
+  transrec  :: [i, [i,i]=>i] =>i
+    "transrec(a,H) == wfrec(Memrel(eclose({a})), a, H)"
+ 
+  rank      :: i=>i
+    "rank(a) == transrec(a, %x f. UN y:x. succ(f`y))"
+
+  transrec2 :: [i, i, [i,i]=>i] =>i
+    "transrec2(k, a, b) ==                     
+       transrec(k, 
+                %i r. if(i=0, a, 
+                        if(EX j. i=succ(j),        
+                           b(THE j. i=succ(j), r`(THE j. i=succ(j))),   
+                           UN j<i. r`j)))"
+
 end
--- a/src/ZF/EquivClass.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/EquivClass.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -16,12 +16,12 @@
 
 goalw EquivClass.thy [trans_def,sym_def]
     "!!r. [| sym(r); trans(r) |] ==> converse(r) O r <= r";
-by (fast_tac (ZF_cs addSEs [converseD,compE]) 1);
+by (fast_tac (!claset) 1);
 qed "sym_trans_comp_subset";
 
 goalw EquivClass.thy [refl_def]
     "!!A r. [| refl(A,r); r <= A*A |] ==> r <= converse(r) O r";
-by (fast_tac (ZF_cs addSIs [converseI] addIs [compI]) 1);
+by (fast_tac (!claset) 1);
 qed "refl_comp_subset";
 
 goalw EquivClass.thy [equiv_def]
@@ -35,10 +35,7 @@
     "!!A r. [| converse(r) O r = r;  domain(r) = A |] ==> equiv(A,r)";
 by (etac equalityE 1);
 by (subgoal_tac "ALL x y. <x,y> : r --> <y,x> : r" 1);
-by (safe_tac ZF_cs);
-by (fast_tac (ZF_cs addSIs [converseI] addIs [compI]) 3);
-by (ALLGOALS (fast_tac 
-              (ZF_cs addSIs [converseI] addIs [compI] addSEs [compE])));
+by (ALLGOALS (fast_tac (!claset)));
 qed "comp_equivI";
 
 (** Equivalence classes **)
@@ -46,25 +43,25 @@
 (*Lemma for the next result*)
 goalw EquivClass.thy [trans_def,sym_def]
     "!!A r. [| sym(r);  trans(r);  <a,b>: r |] ==> r``{a} <= r``{b}";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "equiv_class_subset";
 
 goalw EquivClass.thy [equiv_def]
     "!!A r. [| equiv(A,r);  <a,b>: r |] ==> r``{a} = r``{b}";
 by (safe_tac (subset_cs addSIs [equalityI, equiv_class_subset]));
 by (rewtac sym_def);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "equiv_class_eq";
 
 goalw EquivClass.thy [equiv_def,refl_def]
     "!!A r. [| equiv(A,r);  a: A |] ==> a: r``{a}";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "equiv_class_self";
 
 (*Lemma for the next result*)
 goalw EquivClass.thy [equiv_def,refl_def]
     "!!A r. [| equiv(A,r);  r``{b} <= r``{a};  b: A |] ==> <a,b>: r";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "subset_equiv_class";
 
 val prems = goal EquivClass.thy
@@ -75,7 +72,7 @@
 (*thus r``{a} = r``{b} as well*)
 goalw EquivClass.thy [equiv_def,trans_def,sym_def]
     "!!A r. [| equiv(A,r);  x: (r``{a} Int r``{b}) |] ==> <a,b>: r";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "equiv_class_nondisjoint";
 
 goalw EquivClass.thy [equiv_def] "!!A r. equiv(A,r) ==> r <= A*A";
@@ -84,14 +81,14 @@
 
 goal EquivClass.thy
     "!!A r. equiv(A,r) ==> <x,y>: r <-> r``{x} = r``{y} & x:A & y:A";
-by (fast_tac (ZF_cs addIs [eq_equiv_class, equiv_class_eq]
-                    addDs [equiv_type]) 1);
+by (fast_tac (!claset addIs [eq_equiv_class, equiv_class_eq]
+                      addDs [equiv_type]) 1);
 qed "equiv_class_eq_iff";
 
 goal EquivClass.thy
     "!!A r. [| equiv(A,r);  x: A;  y: A |] ==> r``{x} = r``{y} <-> <x,y>: r";
-by (fast_tac (ZF_cs addIs [eq_equiv_class, equiv_class_eq]
-                    addDs [equiv_type]) 1);
+by (fast_tac (!claset addIs [eq_equiv_class, equiv_class_eq]
+                      addDs [equiv_type]) 1);
 qed "eq_equiv_class_iff";
 
 (*** Quotients ***)
@@ -118,10 +115,10 @@
 
 goalw EquivClass.thy [quotient_def]
     "!!A r. [| equiv(A,r);  X: A/r;  Y: A/r |] ==> X=Y | (X Int Y <= 0)";
-by (safe_tac (ZF_cs addSIs [equiv_class_eq]));
+by (safe_tac (!claset addSIs [equiv_class_eq]));
 by (assume_tac 1);
 by (rewrite_goals_tac [equiv_def,trans_def,sym_def]);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "quotient_disj";
 
 (**** Defining unary operations upon equivalence classes ****)
@@ -138,7 +135,7 @@
 by (etac equiv_class_self 2);
 by (assume_tac 2);
 by (rewrite_goals_tac [equiv_def,sym_def,congruent_def]);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "UN_equiv_class";
 
 (*type checking of  UN x:r``{a}. b(x) *)
@@ -147,8 +144,8 @@
 \       !!x.  x : A ==> b(x) : B |]     \
 \    ==> (UN x:X. b(x)) : B";
 by (cut_facts_tac prems 1);
-by (safe_tac ZF_cs);
-by (asm_simp_tac (ZF_ss addsimps (UN_equiv_class::prems)) 1);
+by (safe_tac (!claset));
+by (asm_simp_tac (!simpset addsimps (UN_equiv_class::prems)) 1);
 qed "UN_equiv_class_type";
 
 (*Sufficient conditions for injectiveness.  Could weaken premises!
@@ -160,7 +157,7 @@
 \       !!x y. [| x:A; y:A; b(x)=b(y) |] ==> <x,y>:r |]         \
 \    ==> X=Y";
 by (cut_facts_tac prems 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (rtac equiv_class_eq 1);
 by (REPEAT (ares_tac prems 1));
 by (etac box_equals 1);
@@ -173,29 +170,29 @@
 
 goalw EquivClass.thy [congruent_def,congruent2_def,equiv_def,refl_def]
     "!!A r. [| equiv(A,r);  congruent2(r,b);  a: A |] ==> congruent(r,b(a))";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "congruent2_implies_congruent";
 
 val equivA::prems = goalw EquivClass.thy [congruent_def]
     "[| equiv(A,r);  congruent2(r,b);  a: A |] ==> \
 \    congruent(r, %x1. UN x2:r``{a}. b(x1,x2))";
 by (cut_facts_tac (equivA::prems) 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (rtac (equivA RS equiv_type RS subsetD RS SigmaE2) 1);
 by (assume_tac 1);
-by (asm_simp_tac (ZF_ss addsimps [equivA RS UN_equiv_class,
-                                 congruent2_implies_congruent]) 1);
+by (asm_simp_tac (!simpset addsimps [equivA RS UN_equiv_class,
+				     congruent2_implies_congruent]) 1);
 by (rewrite_goals_tac [congruent2_def,equiv_def,refl_def]);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "congruent2_implies_congruent_UN";
 
 val prems as equivA::_ = goal EquivClass.thy
     "[| equiv(A,r);  congruent2(r,b);  a1: A;  a2: A |]  \
 \    ==> (UN x1:r``{a1}. UN x2:r``{a2}. b(x1,x2)) = b(a1,a2)";
 by (cut_facts_tac prems 1);
-by (asm_simp_tac (ZF_ss addsimps [equivA RS UN_equiv_class,
-                                 congruent2_implies_congruent,
-                                 congruent2_implies_congruent_UN]) 1);
+by (asm_simp_tac (!simpset addsimps [equivA RS UN_equiv_class,
+				     congruent2_implies_congruent,
+				     congruent2_implies_congruent_UN]) 1);
 qed "UN_equiv_class2";
 
 (*type checking*)
@@ -205,7 +202,7 @@
 \       !!x1 x2.  [| x1: A; x2: A |] ==> b(x1,x2) : B   \
 \    |] ==> (UN x1:X1. UN x2:X2. b(x1,x2)) : B";
 by (cut_facts_tac prems 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (REPEAT (ares_tac (prems@[UN_equiv_class_type,
                              congruent2_implies_congruent_UN,
                              congruent2_implies_congruent, quotientI]) 1));
@@ -220,7 +217,7 @@
 \       !! y z w. [| w: A;  <y,z> : r |] ==> b(w,y) = b(w,z)       \
 \    |] ==> congruent2(r,b)";
 by (cut_facts_tac prems 1);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (rtac trans 1);
 by (REPEAT (ares_tac prems 1
      ORELSE etac (subsetD RS SigmaE2) 1 THEN assume_tac 2 THEN assume_tac 1));
@@ -248,10 +245,10 @@
 val congt' = rewrite_rule [congruent_def] congt;
 by (cut_facts_tac [ZinA] 1);
 by (rewtac congruent_def);
-by (safe_tac ZF_cs);
+by (safe_tac (!claset));
 by (rtac (equivA RS equiv_type RS subsetD RS SigmaE2) 1);
 by (assume_tac 1);
-by (asm_simp_tac (ZF_ss addsimps [commute,
-                                  [equivA, congt] MRS UN_equiv_class]) 1);
+by (asm_simp_tac (!simpset addsimps [commute,
+				     [equivA, congt] MRS UN_equiv_class]) 1);
 by (REPEAT (ares_tac [congt' RS spec RS spec RS mp] 1));
 qed "congruent_commuteI";
--- a/src/ZF/Finite.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Finite.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -38,29 +38,31 @@
 qed "Fin_induct";
 
 (** Simplification for Fin **)
-val Fin_ss = arith_ss addsimps Fin.intrs;
+Addsimps Fin.intrs;
 
 (*The union of two finite sets is finite.*)
-val major::prems = goal Finite.thy
-    "[| b: Fin(A);  c: Fin(A) |] ==> b Un c : Fin(A)";
-by (rtac (major RS Fin_induct) 1);
-by (ALLGOALS (asm_simp_tac (Fin_ss addsimps (prems@[Un_0, Un_cons]))));
+goal Finite.thy
+    "!!b c. [| b: Fin(A);  c: Fin(A) |] ==> b Un c : Fin(A)";
+by (etac Fin_induct 1);
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [Un_cons])));
 qed "Fin_UnI";
 
+Addsimps [Fin_UnI];
+
 (*The union of a set of finite sets is finite.*)
 val [major] = goal Finite.thy "C : Fin(Fin(A)) ==> Union(C) : Fin(A)";
 by (rtac (major RS Fin_induct) 1);
-by (ALLGOALS (asm_simp_tac (Fin_ss addsimps [Union_0, Union_cons, Fin_UnI])));
+by (ALLGOALS Asm_simp_tac);
 qed "Fin_UnionI";
 
 (*Every subset of a finite set is finite.*)
 goal Finite.thy "!!b A. b: Fin(A) ==> ALL z. z<=b --> z: Fin(A)";
 by (etac Fin_induct 1);
-by (simp_tac (Fin_ss addsimps [subset_empty_iff]) 1);
-by (asm_simp_tac (ZF_ss addsimps subset_cons_iff::distrib_simps) 1);
-by (safe_tac ZF_cs);
+by (simp_tac (!simpset addsimps [subset_empty_iff]) 1);
+by (asm_simp_tac (!simpset addsimps subset_cons_iff::distrib_simps) 1);
+by (safe_tac (!claset));
 by (eres_inst_tac [("b","z")] (cons_Diff RS subst) 1);
-by (asm_simp_tac Fin_ss 1);
+by (Asm_simp_tac 1);
 qed "Fin_subset_lemma";
 
 goal Finite.thy "!!c b A. [| c<=b;  b: Fin(A) |] ==> c: Fin(A)";
@@ -74,7 +76,7 @@
 \    |] ==> c<=b --> P(b-c)";
 by (rtac (major RS Fin_induct) 1);
 by (stac Diff_cons 2);
-by (ALLGOALS (asm_simp_tac (Fin_ss addsimps (prems@[Diff_0, cons_subset_iff, 
+by (ALLGOALS (asm_simp_tac (!simpset addsimps (prems@[cons_subset_iff, 
                                 Diff_subset RS Fin_subset]))));
 qed "Fin_0_induct_lemma";
 
@@ -91,9 +93,9 @@
 (*Functions from a finite ordinal*)
 val prems = goal Finite.thy "n: nat ==> n->A <= Fin(nat*A)";
 by (nat_ind_tac "n" prems 1);
-by (simp_tac (ZF_ss addsimps [Pi_empty1, Fin.emptyI, subset_iff, cons_iff]) 1);
-by (asm_simp_tac (ZF_ss addsimps [succ_def, mem_not_refl RS cons_fun_eq]) 1);
-by (fast_tac (ZF_cs addSIs [Fin.consI]) 1);
+by (simp_tac (!simpset addsimps [Pi_empty1, subset_iff, cons_iff]) 1);
+by (asm_simp_tac (!simpset addsimps [succ_def, mem_not_refl RS cons_fun_eq]) 1);
+by (fast_tac (!claset addSIs [Fin.consI]) 1);
 qed "nat_fun_subset_Fin";
 
 
@@ -112,14 +114,14 @@
 
 goal Finite.thy "!!h. h: A -||>B ==> h: domain(h) -> B";
 by (etac FiniteFun.induct 1);
-by (simp_tac (ZF_ss addsimps [empty_fun, domain_0]) 1);
-by (asm_simp_tac (ZF_ss addsimps [fun_extend3, domain_cons]) 1);
+by (simp_tac (!simpset addsimps [empty_fun, domain_0]) 1);
+by (asm_simp_tac (!simpset addsimps [fun_extend3, domain_cons]) 1);
 qed "FiniteFun_is_fun";
 
 goal Finite.thy "!!h. h: A -||>B ==> domain(h) : Fin(A)";
 by (etac FiniteFun.induct 1);
-by (simp_tac (Fin_ss addsimps [domain_0]) 1);
-by (asm_simp_tac (Fin_ss addsimps [domain_cons]) 1);
+by (simp_tac (!simpset addsimps [domain_0]) 1);
+by (asm_simp_tac (!simpset addsimps [domain_cons]) 1);
 qed "FiniteFun_domain_Fin";
 
 bind_thm ("FiniteFun_apply_type", FiniteFun_is_fun RS apply_type);
@@ -127,12 +129,12 @@
 (*Every subset of a finite function is a finite function.*)
 goal Finite.thy "!!b A. b: A-||>B ==> ALL z. z<=b --> z: A-||>B";
 by (etac FiniteFun.induct 1);
-by (simp_tac (ZF_ss addsimps subset_empty_iff::FiniteFun.intrs) 1);
-by (asm_simp_tac (ZF_ss addsimps subset_cons_iff::distrib_simps) 1);
-by (safe_tac ZF_cs);
+by (simp_tac (!simpset addsimps subset_empty_iff::FiniteFun.intrs) 1);
+by (asm_simp_tac (!simpset addsimps subset_cons_iff::distrib_simps) 1);
+by (safe_tac (!claset));
 by (eres_inst_tac [("b","z")] (cons_Diff RS subst) 1);
 by (dtac (spec RS mp) 1 THEN assume_tac 1);
-by (fast_tac (ZF_cs addSIs FiniteFun.intrs) 1);
+by (fast_tac (!claset addSIs FiniteFun.intrs) 1);
 qed "FiniteFun_subset_lemma";
 
 goal Finite.thy "!!c b A. [| c<=b;  b: A-||>B |] ==> c: A-||>B";
--- a/src/ZF/Fixedpt.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Fixedpt.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -56,13 +56,13 @@
 (*lfp is contained in each pre-fixedpoint*)
 goalw Fixedpt.thy [lfp_def]
     "!!A. [| h(A) <= A;  A<=D |] ==> lfp(D,h) <= A";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 (*or  by (rtac (PowI RS CollectI RS Inter_lower) 1); *)
 qed "lfp_lowerbound";
 
 (*Unfolding the defn of Inter dispenses with the premise bnd_mono(D,h)!*)
 goalw Fixedpt.thy [lfp_def,Inter_def] "lfp(D,h) <= D";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "lfp_subset";
 
 (*Used in datatype package*)
@@ -190,7 +190,7 @@
 qed "gfp_upperbound";
 
 goalw Fixedpt.thy [gfp_def] "gfp(D,h) <= D";
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "gfp_subset";
 
 (*Used in datatype package*)
--- a/src/ZF/Fixedpt.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Fixedpt.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -6,7 +6,7 @@
 Least and greatest fixed points
 *)
 
-Fixedpt = ZF + "domrange" +
+Fixedpt = domrange +
 consts
   bnd_mono    :: [i,i=>i]=>o
   lfp, gfp    :: [i,i=>i]=>i
--- a/src/ZF/IMP/Com.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/IMP/Com.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -8,11 +8,11 @@
 
 val assign_type = prove_goalw Com.thy [assign_def]
         "!!n. [| sigma:loc -> nat; n:nat |] ==> sigma[n/x] : loc -> nat"
-    (fn _ => [ fast_tac (ZF_cs addIs [apply_type,lam_type,if_type]) 1 ]);
+    (fn _ => [ fast_tac (!claset addIs [apply_type,lam_type,if_type]) 1 ]);
 
-val type_cs = ZF_cs addSDs [evala.dom_subset RS subsetD,
-                            evalb.dom_subset RS subsetD,
-                            evalc.dom_subset RS subsetD];
+val type_cs = !claset addSDs [evala.dom_subset RS subsetD,
+			      evalb.dom_subset RS subsetD,
+			      evalc.dom_subset RS subsetD];
 
 (**********     type_intrs for evala     **********)
 
--- a/src/ZF/IMP/Denotation.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/IMP/Denotation.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -23,7 +23,7 @@
         "!!a.[|a:aexp; sigma:loc->nat|] ==> A(a,sigma):nat"
    (fn _ => [(etac aexp.induct 1),
              (rewrite_goals_tac A_rewrite_rules),
-             (ALLGOALS (fast_tac (ZF_cs addSIs [apply_type])))]);
+             (ALLGOALS (fast_tac (!claset addSIs [apply_type])))]);
 
 (**** Type_intr for B ****)
 
@@ -31,7 +31,7 @@
         "!!b. [|b:bexp; sigma:loc->nat|] ==> B(b,sigma):bool"
    (fn _ => [(etac bexp.induct 1),
              (rewrite_goals_tac B_rewrite_rules),
-             (ALLGOALS (fast_tac (ZF_cs 
+             (ALLGOALS (fast_tac (!claset 
                           addSIs [apply_type,A_type]@bool_typechecks)))]);
 
 (**** C_subset ****)
@@ -40,7 +40,7 @@
         "!!c. c:com ==> C(c) <= (loc->nat)*(loc->nat)"
    (fn _ => [(etac com.induct 1),
              (rewrite_tac C_rewrite_rules),
-             (ALLGOALS (fast_tac (comp_cs addDs [lfp_subset RS subsetD])))]);
+             (ALLGOALS (fast_tac (!claset addDs [lfp_subset RS subsetD])))]);
 
 (**** Type_elims for C ****)
 
@@ -49,7 +49,7 @@
 \            !!c. [| x:loc->nat; y:loc->nat |]  ==> R |]        \
 \         ==> R"
      (fn prems => [(cut_facts_tac prems 1),
-                   (fast_tac (ZF_cs addSIs prems 
+                   (fast_tac (!claset addSIs prems 
                                     addDs  [(C_subset RS subsetD)]) 1)]);
 
 val C_type_fst = prove_goal Denotation.thy
@@ -61,13 +61,13 @@
                    (dtac (C_subset RS subsetD) 1),
                    (atac 1),
                    (etac SigmaE 1),
-                   (asm_simp_tac ZF_ss 1)]);
+                   (Asm_simp_tac 1)]);
 
 
 (**** bnd_mono (nat->nat*nat->nat,Gamma(b,c) ****)
 
 val Gamma_bnd_mono = prove_goalw Denotation.thy [bnd_mono_def,Gamma_def]
         "!!c. c:com ==> bnd_mono ((loc->nat)*(loc->nat),Gamma(b,c))"
-     (fn prems => [(best_tac (comp_cs addEs [C_type]) 1)]);
+     (fn prems => [(best_tac (!claset addEs [C_type]) 1)]);
 
 (**** End ***)
--- a/src/ZF/IMP/Equiv.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/IMP/Equiv.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -10,15 +10,15 @@
 by (res_inst_tac [("x","a")] aexp.induct 1);                (* struct. ind. *)
 by (resolve_tac prems 1);                                   (* type prem. *)
 by (rewrite_goals_tac A_rewrite_rules);                     (* rewr. Den.   *)
-by (TRYALL (fast_tac (ZF_cs addSIs (evala.intrs@prems)
-                            addSEs aexp_elim_cases)));
+by (TRYALL (fast_tac (!claset addSIs (evala.intrs@prems)
+                              addSEs aexp_elim_cases)));
 qed "aexp_iff";
 
 
 val aexp1 = prove_goal Equiv.thy
         "[| <a,sigma> -a-> n; a: aexp; sigma: loc -> nat |] \
         \ ==> A(a,sigma) = n"       (* destruction rule *)
-     (fn prems => [(fast_tac (ZF_cs addSIs ((aexp_iff RS iffD1)::prems)) 1)]);
+     (fn prems => [(fast_tac (!claset addSIs ((aexp_iff RS iffD1)::prems)) 1)]);
 val aexp2 = aexp_iff RS iffD2;
 
 
@@ -39,14 +39,14 @@
 by (res_inst_tac [("x","b")] bexp.induct 1);            (* struct. ind. *)
 by (resolve_tac prems 1);                               (* type prem. *)
 by (rewrite_goals_tac B_rewrite_rules);                 (* rewr. Den.   *)
-by (TRYALL (fast_tac (ZF_cs addSIs (evalb.intrs@prems@[aexp2])
+by (TRYALL (fast_tac (!claset addSIs (evalb.intrs@prems@[aexp2])
                             addSDs [aexp1] addSEs bexp_elim_cases)));
 qed "bexp_iff";
 
 val bexp1 = prove_goal Equiv.thy
         "[| <b,sigma> -b-> w; b: bexp; sigma: loc -> nat |]\
         \ ==> B(b,sigma) = w"
-     (fn prems => [(fast_tac (ZF_cs addSIs ((bexp_iff RS iffD1)::prems)) 1)]);
+     (fn prems => [(fast_tac (!claset addSIs ((bexp_iff RS iffD1)::prems)) 1)]);
 val bexp2 = bexp_iff RS iffD2;
 
 goal Equiv.thy "!!c. <c,sigma> -c-> sigma' ==> <sigma,sigma'> : C(c)";
@@ -56,80 +56,72 @@
 
 by (rewrite_tac (Gamma_def::C_rewrite_rules));
 (* skip *)
-by (fast_tac comp_cs 1);
+by (Fast_tac 1);
 
 (* assign *)
-by (asm_full_simp_tac (ZF_ss addsimps [aexp1,assign_type] @ op_type_intrs) 1);
+by (asm_full_simp_tac (!simpset addsimps [aexp1,assign_type] @ op_type_intrs) 1);
 
 (* comp *)
-by (fast_tac comp_cs 1);
+by (Fast_tac 1);
 
 (* if *)
-by (asm_simp_tac (ZF_ss addsimps [bexp1]) 1);
-by (asm_simp_tac (ZF_ss addsimps [bexp1]) 1);
+by (asm_simp_tac (!simpset addsimps [bexp1]) 1);
+by (asm_simp_tac (!simpset addsimps [bexp1]) 1);
 
 (* while *)
 by (etac (rewrite_rule [Gamma_def]
           (Gamma_bnd_mono RS lfp_Tarski RS ssubst)) 1);
-by (asm_simp_tac (ZF_ss addsimps [bexp1]) 1);
-by (fast_tac (comp_cs addSIs [bexp1,idI]@evalb_type_intrs) 1);
+by (asm_simp_tac (!simpset addsimps [bexp1]) 1);
+by (fast_tac (!claset addSIs [bexp1,idI]@evalb_type_intrs) 1);
 
 by (etac (rewrite_rule [Gamma_def]
           (Gamma_bnd_mono RS lfp_Tarski RS ssubst)) 1);
-by (asm_simp_tac (ZF_ss addsimps [bexp1]) 1);
-by (fast_tac (comp_cs addSIs [bexp1,compI]@evalb_type_intrs) 1);
+by (asm_simp_tac (!simpset addsimps [bexp1]) 1);
+by (fast_tac (!claset addSIs [bexp1,compI]@evalb_type_intrs) 1);
 
 val com1 = result();
 
 
-val com_cs = ZF_cs addSIs [aexp2,bexp2,B_type,A_type]
-                   addIs evalc.intrs
-                   addSEs [idE,compE]
-                   addEs [C_type,C_type_fst];
+AddSIs [aexp2,bexp2,B_type,A_type];
+AddIs evalc.intrs;
+AddEs [C_type,C_type_fst];
 
 val [prem] = goal Equiv.thy
     "c : com ==> ALL x:C(c). <c,fst(x)> -c-> snd(x)";
 by (rtac (prem RS com.induct) 1);
 by (rewrite_tac C_rewrite_rules);
-by (safe_tac com_cs);
-by (ALLGOALS (asm_full_simp_tac ZF_ss));
+by (safe_tac (!claset));
+by (ALLGOALS Asm_full_simp_tac);
 
 (* skip *)
-by (fast_tac com_cs 1);
+by (Fast_tac 1);
 
 (* assign *)
-by (fast_tac com_cs 1);
+by (Fast_tac 1);
 
 (* comp *)
 by (REPEAT (EVERY [(dtac bspec 1),(atac 1)]));
-by (asm_full_simp_tac ZF_ss 1);
-by (fast_tac com_cs 1);
+by (Asm_full_simp_tac 1);
+by (Fast_tac 1);
 
 (* while *)
 by (EVERY1 [forward_tac [Gamma_bnd_mono], etac induct, atac]);
 by (rewtac Gamma_def);  
-by (safe_tac com_cs);
+by (safe_tac (!claset));
 by (EVERY1 [dtac bspec, atac]);
-by (ALLGOALS (asm_full_simp_tac ZF_ss));
+by (ALLGOALS Asm_full_simp_tac);
 
 (* while, if *)
-by (ALLGOALS (fast_tac com_cs));
+by (ALLGOALS Fast_tac);
 val com2 = result();
 
 
 (**** Proof of Equivalence ****)
 
-val com_iff_cs = ZF_cs addIs [C_subset RS subsetD]
-                       addEs [com2 RS bspec]
-                       addDs [com1];
-
 goal Equiv.thy
     "ALL c:com. C(c) = {io:(loc->nat)*(loc->nat). <c,fst(io)> -c-> snd(io)}";
-by (rtac ballI 1);
-by (rtac equalityI 1);
-(* => *)
-by (fast_tac com_iff_cs 1);
-(* <= *)
-by (REPEAT (step_tac com_iff_cs 1));
-by (asm_full_simp_tac ZF_ss 1);
+by (fast_tac (!claset addIs [equalityI, C_subset RS subsetD]
+	              addEs [com2 RS bspec]
+		      addDs [com1]
+		      addss (!simpset)) 1);
 val com_equivalence = result();
--- a/src/ZF/InfDatatype.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/InfDatatype.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -18,12 +18,12 @@
 by (rtac le_UN_Ord_lt_csucc 2);
 by (rtac ballI 4  THEN
     etac fun_Limit_VfromE 4 THEN REPEAT_SOME assume_tac);
-by (fast_tac (ZF_cs addEs [Least_le RS lt_trans1, ltE]) 2);
+by (fast_tac (!claset addEs [Least_le RS lt_trans1, ltE]) 2);
 by (rtac Pi_type 1);
 by (rename_tac "w" 2);
 by (etac fun_Limit_VfromE 2 THEN REPEAT_SOME assume_tac);
 by (subgoal_tac "f`w : Vfrom(A, LEAST i. f`w : Vfrom(A,i))" 1);
-by (fast_tac (ZF_cs addEs [LeastI, ltE]) 2);
+by (fast_tac (!claset addEs [LeastI, ltE]) 2);
 by (eresolve_tac [[subset_refl, UN_upper] MRS Vfrom_mono RS subsetD] 1);
 by (assume_tac 1);
 qed "fun_Vcsucc_lemma";
@@ -31,20 +31,20 @@
 goal InfDatatype.thy
     "!!K. [| W <= Vfrom(A,csucc(K));  |W| le K;  InfCard(K)     \
 \         |] ==> EX j. W <= Vfrom(A,j) & j < csucc(K)";
-by (asm_full_simp_tac (ZF_ss addsimps [subset_iff_id, fun_Vcsucc_lemma]) 1);
+by (asm_full_simp_tac (!simpset addsimps [subset_iff_id, fun_Vcsucc_lemma]) 1);
 qed "subset_Vcsucc";
 
 (*Version for arbitrary index sets*)
 goal InfDatatype.thy
     "!!K. [| |W| le K;  InfCard(K);  W <= Vfrom(A,csucc(K)) |] ==> \
 \         W -> Vfrom(A,csucc(K)) <= Vfrom(A,csucc(K))";
-by (safe_tac (ZF_cs addSDs [fun_Vcsucc_lemma, subset_Vcsucc]));
+by (safe_tac (!claset addSDs [fun_Vcsucc_lemma, subset_Vcsucc]));
 by (resolve_tac [Vfrom RS ssubst] 1);
 by (dtac fun_is_rel 1);
 (*This level includes the function, and is below csucc(K)*)
 by (res_inst_tac [("a1", "succ(succ(j Un ja))")] (UN_I RS UnI2) 1);
 by (eresolve_tac [subset_trans RS PowI] 2);
-by (fast_tac (ZF_cs addIs [Pair_in_Vfrom, Vfrom_UnI1, Vfrom_UnI2]) 2);
+by (fast_tac (!claset addIs [Pair_in_Vfrom, Vfrom_UnI1, Vfrom_UnI2]) 2);
 by (REPEAT (ares_tac [ltD, InfCard_csucc, InfCard_is_Limit, 
                       Limit_has_succ, Un_least_lt] 1));
 qed "fun_Vcsucc";
--- a/src/ZF/List.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/List.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -10,6 +10,9 @@
 
 (*** Aspects of the datatype definition ***)
 
+Addsimps list.case_eqns;
+
+
 (*An elimination rule, for type-checking*)
 val ConsE = list.mk_cases list.con_defs "Cons(a,l) : list(A)";
 
@@ -42,7 +45,7 @@
 goalw List.thy (list.defs@list.con_defs) "list(univ(A)) <= univ(A)";
 by (rtac lfp_lowerbound 1);
 by (rtac (A_subset_univ RS univ_mono) 2);
-by (fast_tac (ZF_cs addSIs [zero_in_univ, Inl_in_univ, Inr_in_univ,
+by (fast_tac (!claset addSIs [zero_in_univ, Inl_in_univ, Inr_in_univ,
                             Pair_in_univ]) 1);
 qed "list_univ";
 
@@ -59,7 +62,7 @@
 \       !!x y. [| x: A;  y: list(A) |] ==> h(x,y): C(Cons(x,y))  \
 \    |] ==> list_case(c,h,l) : C(l)";
 by (rtac (major RS list.induct) 1);
-by (ALLGOALS (asm_simp_tac (ZF_ss addsimps (list.case_eqns @ prems))));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps (list.case_eqns @ prems))));
 qed "list_case_type";
 
 
@@ -90,9 +93,11 @@
 by (resolve_tac list.case_eqns 1);
 qed "tl_Cons";
 
+Addsimps [hd_Cons, tl_Nil, tl_Cons];
+
 goal List.thy "!!l. l: list(A) ==> tl(l) : list(A)";
 by (etac list.elim 1);
-by (ALLGOALS (asm_simp_tac (ZF_ss addsimps (list.intrs @ [tl_Nil,tl_Cons]))));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps list.intrs)));
 qed "tl_type";
 
 (** drop **)
@@ -103,29 +108,30 @@
 
 goalw List.thy [drop_def] "!!i. i:nat ==> drop(i, Nil) = Nil";
 by (etac nat_induct 1);
-by (ALLGOALS (asm_simp_tac (nat_ss addsimps [tl_Nil])));
+by (ALLGOALS Asm_simp_tac);
 qed "drop_Nil";
 
 goalw List.thy [drop_def]
     "!!i. i:nat ==> drop(succ(i), Cons(a,l)) = drop(i,l)";
+br sym 1;
 by (etac nat_induct 1);
-by (simp_tac (nat_ss addsimps [tl_Cons]) 1);
-by (stac rec_succ 1);
-by (stac rec_succ 1);
-by (asm_simp_tac ZF_ss 1);
+by (Simp_tac 1);
+by (Asm_simp_tac 1);
 qed "drop_succ_Cons";
 
+Addsimps [drop_0, drop_Nil, drop_succ_Cons];
+
 goalw List.thy [drop_def] 
     "!!i l. [| i:nat; l: list(A) |] ==> drop(i,l) : list(A)";
 by (etac nat_induct 1);
-by (ALLGOALS (asm_simp_tac (nat_ss addsimps [tl_type])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [tl_type])));
 qed "drop_type";
 
 (** list_rec -- by Vset recursion **)
 
 goal List.thy "list_rec(Nil,c,h) = c";
 by (rtac (list_rec_def RS def_Vrec RS trans) 1);
-by (simp_tac (ZF_ss addsimps list.case_eqns) 1);
+by (simp_tac (!simpset addsimps list.case_eqns) 1);
 qed "list_rec_Nil";
 
 goal List.thy "list_rec(Cons(a,l), c, h) = h(a, l, list_rec(l,c,h))";
@@ -133,6 +139,9 @@
 by (simp_tac (rank_ss addsimps (rank_Cons2::list.case_eqns)) 1);
 qed "list_rec_Cons";
 
+Addsimps [list_rec_Nil, list_rec_Cons];
+
+
 (*Type checking -- proved by induction, as usual*)
 val prems = goal List.thy
     "[| l: list(A);    \
@@ -140,8 +149,7 @@
 \       !!x y r. [| x:A;  y: list(A);  r: C(y) |] ==> h(x,y,r): C(Cons(x,y))  \
 \    |] ==> list_rec(l,c,h) : C(l)";
 by (list_ind_tac "l" prems 1);
-by (ALLGOALS (asm_simp_tac
-              (ZF_ss addsimps (prems@[list_rec_Nil,list_rec_Cons]))));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps prems)));
 qed "list_rec_type";
 
 (** Versions for use with definitions **)
@@ -164,6 +172,7 @@
 (** map **)
 
 val [map_Nil,map_Cons] = list_recs map_def;
+Addsimps [map_Nil, map_Cons];
 
 val prems = goalw List.thy [map_def] 
     "[| l: list(A);  !!x. x: A ==> h(x): B |] ==> map(h,l) : list(B)";
@@ -178,6 +187,7 @@
 (** length **)
 
 val [length_Nil,length_Cons] = list_recs length_def;
+Addsimps [length_Nil,length_Cons];
 
 goalw List.thy [length_def] 
     "!!l. l: list(A) ==> length(l) : nat";
@@ -187,6 +197,7 @@
 (** app **)
 
 val [app_Nil,app_Cons] = list_recs app_def;
+Addsimps [app_Nil, app_Cons];
 
 goalw List.thy [app_def] 
     "!!xs ys. [| xs: list(A);  ys: list(A) |] ==> xs@ys : list(A)";
@@ -196,6 +207,7 @@
 (** rev **)
 
 val [rev_Nil,rev_Cons] = list_recs rev_def;
+Addsimps [rev_Nil,rev_Cons] ;
 
 goalw List.thy [rev_def] 
     "!!xs. xs: list(A) ==> rev(xs) : list(A)";
@@ -206,6 +218,7 @@
 (** flat **)
 
 val [flat_Nil,flat_Cons] = list_recs flat_def;
+Addsimps [flat_Nil,flat_Cons];
 
 goalw List.thy [flat_def] 
     "!!ls. ls: list(list(A)) ==> flat(ls) : list(A)";
@@ -216,45 +229,38 @@
 (** set_of_list **)
 
 val [set_of_list_Nil,set_of_list_Cons] = list_recs set_of_list_def;
+Addsimps [set_of_list_Nil,set_of_list_Cons];
 
 goalw List.thy [set_of_list_def] 
     "!!l. l: list(A) ==> set_of_list(l) : Pow(A)";
 by (etac list_rec_type 1);
-by (ALLGOALS (fast_tac ZF_cs));
+by (ALLGOALS (Fast_tac));
 qed "set_of_list_type";
 
 goal List.thy
     "!!l. xs: list(A) ==> \
 \         set_of_list (xs@ys) = set_of_list(xs) Un set_of_list(ys)";
 by (etac list.induct 1);
-by (ALLGOALS (asm_simp_tac (ZF_ss addsimps [set_of_list_Nil,set_of_list_Cons,
-                                            app_Nil,app_Cons,Un_cons])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [Un_cons])));
 qed "set_of_list_append";
 
 
 (** list_add **)
 
 val [list_add_Nil,list_add_Cons] = list_recs list_add_def;
+Addsimps [list_add_Nil,list_add_Cons];
 
 goalw List.thy [list_add_def] 
     "!!xs. xs: list(nat) ==> list_add(xs) : nat";
 by (REPEAT (ares_tac [list_rec_type, nat_0I, add_type] 1));
 qed "list_add_type";
 
-(** List simplification **)
-
 val list_typechecks =
     list.intrs @
     [list_rec_type, map_type, map_type2, app_type, length_type, 
      rev_type, flat_type, list_add_type];
 
-val list_ss = arith_ss 
-    addsimps list.case_eqns
-    addsimps [list_rec_Nil, list_rec_Cons, 
-              map_Nil, map_Cons, app_Nil, app_Cons,
-              length_Nil, length_Cons, rev_Nil, rev_Cons,
-              flat_Nil, flat_Cons, list_add_Nil, list_add_Cons]
-    setsolver (type_auto_tac list_typechecks);
+simpset := !simpset setsolver (type_auto_tac list_typechecks);
 
 
 (*** theorems about map ***)
@@ -262,25 +268,25 @@
 val prems = goal List.thy
     "l: list(A) ==> map(%u.u, l) = l";
 by (list_ind_tac "l" prems 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "map_ident";
 
 val prems = goal List.thy
     "l: list(A) ==> map(h, map(j,l)) = map(%u.h(j(u)), l)";
 by (list_ind_tac "l" prems 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "map_compose";
 
 val prems = goal List.thy
     "xs: list(A) ==> map(h, xs@ys) = map(h,xs) @ map(h,ys)";
 by (list_ind_tac "xs" prems 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "map_app_distrib";
 
 val prems = goal List.thy
     "ls: list(list(A)) ==> map(h, flat(ls)) = flat(map(map(h),ls))";
 by (list_ind_tac "ls" prems 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [map_app_distrib])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [map_app_distrib])));
 qed "map_flat";
 
 val prems = goal List.thy
@@ -288,7 +294,7 @@
 \    list_rec(map(h,l), c, d) = \
 \    list_rec(l, c, %x xs r. d(h(x), map(h,xs), r))";
 by (list_ind_tac "l" prems 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "list_rec_map";
 
 (** theorems about list(Collect(A,P)) -- used in ex/term.ML **)
@@ -299,7 +305,7 @@
 val prems = goal List.thy
     "l: list({x:A. h(x)=j(x)}) ==> map(h,l) = map(j,l)";
 by (list_ind_tac "l" prems 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "map_list_Collect";
 
 (*** theorems about length ***)
@@ -307,13 +313,13 @@
 val prems = goal List.thy
     "xs: list(A) ==> length(map(h,xs)) = length(xs)";
 by (list_ind_tac "xs" prems 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "length_map";
 
 val prems = goal List.thy
     "xs: list(A) ==> length(xs@ys) = length(xs) #+ length(ys)";
 by (list_ind_tac "xs" prems 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "length_app";
 
 (* [| m: nat; n: nat |] ==> m #+ succ(n) = succ(n) #+ m 
@@ -323,13 +329,13 @@
 val prems = goal List.thy
     "xs: list(A) ==> length(rev(xs)) = length(xs)";
 by (list_ind_tac "xs" prems 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [length_app, add_commute_succ])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [length_app, add_commute_succ])));
 qed "length_rev";
 
 val prems = goal List.thy
     "ls: list(list(A)) ==> length(flat(ls)) = list_add(map(length,ls))";
 by (list_ind_tac "ls" prems 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [length_app])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [length_app])));
 qed "length_flat";
 
 (** Length and drop **)
@@ -339,27 +345,27 @@
     "!!xs. xs: list(A) ==> \
 \          ALL x.  EX z zs. drop(length(xs), Cons(x,xs)) = Cons(z,zs)";
 by (etac list.induct 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [drop_0,drop_succ_Cons])));
-by (fast_tac ZF_cs 1);
+by (ALLGOALS Asm_simp_tac);
+by (Fast_tac 1);
 qed "drop_length_Cons_lemma";
 bind_thm ("drop_length_Cons", (drop_length_Cons_lemma RS spec));
 
 goal List.thy
     "!!l. l: list(A) ==> ALL i: length(l).  EX z zs. drop(i,l) = Cons(z,zs)";
 by (etac list.induct 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps bquant_simps)));
+by (ALLGOALS Asm_simp_tac);
 by (rtac conjI 1);
 by (etac drop_length_Cons 1);
 by (rtac ballI 1);
 by (rtac natE 1);
 by (etac ([asm_rl, length_type, Ord_nat] MRS Ord_trans) 1);
 by (assume_tac 1);
-by (asm_simp_tac (list_ss addsimps [drop_0]) 1);
-by (fast_tac ZF_cs 1);
-by (asm_simp_tac (list_ss addsimps [drop_succ_Cons]) 1);
+by (Asm_simp_tac 1);
+by (Fast_tac 1);
+by (Asm_simp_tac 1);
 by (dtac bspec 1);
-by (fast_tac ZF_cs 2);
-by (fast_tac (ZF_cs addEs [succ_in_naturalD,length_type]) 1);
+by (Fast_tac 2);
+by (fast_tac (!claset addEs [succ_in_naturalD,length_type]) 1);
 qed "drop_length_lemma";
 bind_thm ("drop_length", (drop_length_lemma RS bspec));
 
@@ -368,25 +374,25 @@
 
 val [major] = goal List.thy "xs: list(A) ==> xs@Nil=xs";
 by (rtac (major RS list.induct) 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "app_right_Nil";
 
 val prems = goal List.thy "xs: list(A) ==> (xs@ys)@zs = xs@(ys@zs)";
 by (list_ind_tac "xs" prems 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS (Asm_simp_tac));
 qed "app_assoc";
 
 val prems = goal List.thy
     "ls: list(list(A)) ==> flat(ls@ms) = flat(ls)@flat(ms)";
 by (list_ind_tac "ls" prems 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [app_assoc])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [app_assoc])));
 qed "flat_app_distrib";
 
 (*** theorems about rev ***)
 
 val prems = goal List.thy "l: list(A) ==> rev(map(h,l)) = map(h,rev(l))";
 by (list_ind_tac "l" prems 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [map_app_distrib])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [map_app_distrib])));
 qed "rev_map_distrib";
 
 (*Simplifier needs the premises as assumptions because rewriting will not
@@ -396,18 +402,18 @@
 goal List.thy
     "!!xs. [| xs: list(A);  ys: list(A) |] ==> rev(xs@ys) = rev(ys)@rev(xs)";
 by (etac list.induct 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [app_right_Nil,app_assoc])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [app_right_Nil,app_assoc])));
 qed "rev_app_distrib";
 
 val prems = goal List.thy "l: list(A) ==> rev(rev(l))=l";
 by (list_ind_tac "l" prems 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [rev_app_distrib])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [rev_app_distrib])));
 qed "rev_rev_ident";
 
 val prems = goal List.thy
     "ls: list(list(A)) ==> rev(flat(ls)) = flat(map(rev,rev(ls)))";
 by (list_ind_tac "ls" prems 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps 
+by (ALLGOALS (asm_simp_tac (!simpset addsimps 
        [map_app_distrib, flat_app_distrib, rev_app_distrib, app_right_Nil])));
 qed "rev_flat";
 
@@ -420,7 +426,7 @@
 by (cut_facts_tac prems 1);
 by (list_ind_tac "xs" prems 1);
 by (ALLGOALS 
-    (asm_simp_tac (list_ss addsimps [add_0_right, add_assoc RS sym])));
+    (asm_simp_tac (!simpset addsimps [add_0_right, add_assoc RS sym])));
 by (rtac (add_commute RS subst_context) 1);
 by (REPEAT (ares_tac [refl, list_add_type] 1));
 qed "list_add_app";
@@ -429,13 +435,13 @@
     "l: list(nat) ==> list_add(rev(l)) = list_add(l)";
 by (list_ind_tac "l" prems 1);
 by (ALLGOALS
-    (asm_simp_tac (list_ss addsimps [list_add_app, add_0_right])));
+    (asm_simp_tac (!simpset addsimps [list_add_app, add_0_right])));
 qed "list_add_rev";
 
 val prems = goal List.thy
     "ls: list(list(nat)) ==> list_add(flat(ls)) = list_add(map(list_add,ls))";
 by (list_ind_tac "ls" prems 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [list_add_app])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [list_add_app])));
 by (REPEAT (ares_tac [refl, list_add_type, map_type, add_commute] 1));
 qed "list_add_flat";
 
@@ -448,6 +454,6 @@
 \    |] ==> P(l)";
 by (rtac (major RS rev_rev_ident RS subst) 1);
 by (rtac (major RS rev_type RS list.induct) 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps prems)));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps prems)));
 qed "list_append_induct";
 
--- a/src/ZF/Makefile	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Makefile	Fri Jan 03 15:01:55 1997 +0100
@@ -22,7 +22,7 @@
 BIN = $(ISABELLEBIN)
 COMP = $(ISABELLECOMP)
 NAMES = ZF upair subset pair domrange \
-	func AC simpdata equalities Bool \
+	func AC equalities Bool \
 	Sum QPair mono Fixedpt ind_syntax cartprod add_ind_def \
 	constructor intr_elim indrule Inductive Perm Rel EquivClass Trancl \
 	WF Order Ordinal Epsilon Arith Univ \
@@ -30,7 +30,7 @@
 	Cardinal CardinalArith Cardinal_AC InfDatatype \
 	Zorn Nat Finite List 
 
-FILES = ROOT.ML thy_syntax.ML ../Pure/section_utils.ML \
+FILES = ROOT.ML thy_syntax.ML ../Pure/section_utils.ML simpdata.ML typechk.ML\
 	$(NAMES:%=%.thy) $(NAMES:%=%.ML)
 
 #Uses cp rather than make_database because Poly/ML allows only 3 levels
@@ -83,9 +83,9 @@
 	fi
 
 ##Coinduction example
-COIND_NAMES = ECR Language MT Map Static Types Values 
+COIND_NAMES = ECR MT Map Static Types Values 
 
-COIND_FILES = Coind/ROOT.ML Coind/BCR.thy  Coind/Dynamic.thy \
+COIND_FILES = Coind/ROOT.ML Coind/Language.thy Coind/BCR.thy Coind/Dynamic.thy\
 	      $(COIND_NAMES:%=Coind/%.thy) $(COIND_NAMES:%=Coind/%.ML)
 
 Coind:	$(BIN)/ZF  $(COIND_FILES)
@@ -95,10 +95,10 @@
 	fi
 
 ##AC examples
-AC_NAMES = AC_Equiv OrdQuant Transrec2 Cardinal_aux \
+AC_NAMES = AC_Equiv Cardinal_aux \
 	   AC15_WO6 AC16_WO4 AC16_lemmas AC17_AC1 AC18_AC19 AC1_WO2 \
 	   DC DC_lemmas HH Hartog WO1_AC \
-	   WO2_AC16 WO6_WO1 WO_AC first recfunAC16 rel_is_fun
+	   WO2_AC16 WO6_WO1 WO_AC recfunAC16 rel_is_fun
 
 AC_FILES = AC/ROOT.ML AC/AC0_AC1.ML AC/AC10_AC15.ML AC/AC1_AC17.ML \
 	   AC/AC2_AC6.ML AC/AC7_AC9.ML \
--- a/src/ZF/Nat.ML	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Nat.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -12,7 +12,7 @@
 by (rtac bnd_monoI 1);
 by (REPEAT (ares_tac [subset_refl, RepFun_mono, Un_mono] 2)); 
 by (cut_facts_tac [infinity] 1);
-by (fast_tac ZF_cs 1);
+by (Fast_tac 1);
 qed "nat_bnd_mono";
 
 (* nat = {0} Un {succ(x). x:nat} *)
@@ -39,6 +39,9 @@
 by (rtac (nat_1I RS nat_succI) 1);
 qed "nat_2I";
 
+Addsimps [nat_0I, nat_1I, nat_2I, nat_succI];
+AddSIs   [nat_0I, nat_1I, nat_2I];
+
 goal Nat.thy "bool <= nat";
 by (REPEAT (ares_tac [subsetI,nat_0I,nat_1I] 1
             ORELSE eresolve_tac [boolE,ssubst] 1));
@@ -53,7 +56,7 @@
 val major::prems = goal Nat.thy
     "[| n: nat;  P(0);  !!x. [| x: nat;  P(x) |] ==> P(succ(x)) |] ==> P(n)";
 by (rtac ([nat_def, nat_bnd_mono, major] MRS def_induct) 1);
-by (fast_tac (ZF_cs addIs prems) 1);
+by (fast_tac (!claset addIs prems) 1);
 qed "nat_induct";
 
 (*Perform induction on n, then prove the n:nat subgoal using prems. *)
@@ -90,15 +93,18 @@
 qed "Ord_nat";
 
 goalw Nat.thy [Limit_def] "Limit(nat)";
-by (safe_tac (ZF_cs addSIs [ltI, nat_0I, nat_1I, nat_succI, Ord_nat]));
+by (safe_tac (!claset addSIs [ltI, nat_succI, Ord_nat]));
 by (etac ltD 1);
 qed "Limit_nat";
 
+Addsimps [Ord_nat, Limit_nat];
+AddSIs   [Ord_nat, Limit_nat];
+
 goal Nat.thy "!!i. Limit(i) ==> nat le i";
 by (rtac subset_imp_le 1);
 by (rtac subsetI 1);
 by (etac nat_induct 1);
-by (fast_tac (ZF_cs addIs [Limit_has_succ RS ltD, ltI, Limit_is_Ord]) 2);
+by (fast_tac (!claset addIs [Limit_has_succ RS ltD, ltI, Limit_is_Ord]) 2);
 by (REPEAT (ares_tac [Limit_has_0 RS ltD,
                       Ord_nat, Limit_is_Ord] 1));
 qed "nat_le_Limit";
@@ -128,7 +134,7 @@
 by (nat_ind_tac "n" prems 1);
 by (ALLGOALS
     (asm_simp_tac
-     (ZF_ss addsimps (prems@distrib_simps@[le0_iff, le_succ_iff]))));
+     (!simpset addsimps (prems@distrib_simps@[le0_iff, le_succ_iff]))));
 qed "nat_induct_from_lemma";
 
 (*Induction starting from m rather than 0*)
@@ -164,7 +170,7 @@
 by (etac nat_induct 1);
 by (ALLGOALS
     (EVERY' [rtac (impI RS impI), rtac (nat_induct RS ballI), assume_tac,
-             fast_tac lt_cs, fast_tac lt_cs]));
+             fast_tac le_cs, fast_tac le_cs]));
 qed "succ_lt_induct_lemma";
 
 val prems = goal Nat.thy
@@ -180,19 +186,20 @@
 (** nat_case **)
 
 goalw Nat.thy [nat_case_def] "nat_case(a,b,0) = a";
-by (fast_tac (ZF_cs addIs [the_equality]) 1);
+by (fast_tac (!claset addIs [the_equality]) 1);
 qed "nat_case_0";
 
 goalw Nat.thy [nat_case_def] "nat_case(a,b,succ(m)) = b(m)";
-by (fast_tac (ZF_cs addIs [the_equality]) 1);
+by (fast_tac (!claset addIs [the_equality]) 1);
 qed "nat_case_succ";
 
+Addsimps [nat_case_0, nat_case_succ];
+
 val major::prems = goal Nat.thy
     "[| n: nat;  a: C(0);  !!m. m: nat ==> b(m): C(succ(m))  \
 \    |] ==> nat_case(a,b,n) : C(n)";
 by (rtac (major RS nat_induct) 1);
-by (ALLGOALS 
-    (asm_simp_tac (ZF_ss addsimps (prems @ [nat_case_0, nat_case_succ]))));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps prems)));
 qed "nat_case_type";
 
 
@@ -209,8 +216,7 @@
 val [prem] = goal Nat.thy 
     "m: nat ==> nat_rec(succ(m),a,b) = b(m, nat_rec(m,a,b))";
 by (rtac nat_rec_trans 1);
-by (simp_tac (ZF_ss addsimps [prem, nat_case_succ, nat_succI, Memrel_iff, 
-                              vimage_singleton_iff]) 1);
+by (simp_tac (!simpset addsimps [prem, Memrel_iff, vimage_singleton_iff]) 1);
 qed "nat_rec_succ";
 
 (** The union of two natural numbers is a natural number -- their maximum **)
--- a/src/ZF/Nat.thy	Fri Jan 03 10:48:28 1997 +0100
+++ b/src/ZF/Nat.thy	Fri Jan 03 15:01:55 1997 +0100
@@ -6,7 +6,7 @@
 Natural numbers in Zermelo-Fraenkel Set Theory 
 *)
 
-Nat = Ordinal + Bool + "mono" +
+Nat = OrdQuant + Bool + mono +
 consts
     nat         ::      i
     nat_case    ::      [i, i=>i, i]=>i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ZF/OrdQuant.ML	Fri Jan 03 15:01:55 1997 +0100
@@ -0,0 +1,112 @@
+(*  Title:      ZF/AC/OrdQuant.thy
+    ID:         $Id$
+    Authors:    Krzysztof Grabczewski and L C Paulson
+
+Quantifiers and union operator for ordinals. 
+*)
+
+open OrdQuant;
+
+(*** universal quantifier for ordinals ***)
+
+qed_goalw "oallI" thy [oall_def]
+    "[| !!x. x<A ==> P(x) |] ==> ALL x<A. P(x)"
+ (fn prems=> [ (REPEAT (ares_tac (prems @ [allI,impI]) 1)) ]);
+
+qed_goalw "ospec" thy [oall_def]
+    "[| ALL x<A. P(x);  x<A |] ==> P(x)"
+ (fn major::prems=>
+  [ (rtac (major RS spec RS mp) 1),
+    (resolve_tac prems 1) ]);
+
+qed_goalw "oallE" thy [oall_def]
+    "[| ALL x<A. P(x);  P(x) ==> Q;  ~x<A ==> Q |] ==> Q"
+ (fn major::prems=>
+  [ (rtac (major RS allE) 1),
+    (REPEAT (eresolve_tac (prems@[asm_rl,impCE]) 1)) ]);
+
+qed_goal "rev_oallE" thy
+    "[| ALL x<A. P(x);  ~x<A ==> Q;  P(x) ==> Q |] ==> Q"
+ (fn major::prems=>
+  [ (rtac (major RS oallE) 1),
+    (REPEAT (eresolve_tac prems 1)) ]);
+
+(*Trival rewrite rule;   (ALL x<a.P)<->P holds only if a is not 0!*)
+qed_goal "oall_simp" thy "(ALL x<a. True) <-> True"
+ (fn _=> [ (REPEAT (ares_tac [TrueI,oallI,iffI] 1)) ]);
+
+(*Congruence rule for rewriting*)
+qed_goalw "oall_cong" thy [oall_def]
+    "[| a=a';  !!x. x<a' ==> P(x) <-> P'(x) |] ==> oall(a,P) <-> oall(a',P')"
+ (fn prems=> [ (simp_tac (!simpset addsimps prems) 1) ]);
+
+
+(*** existential quantifier for ordinals ***)
+
+qed_goalw "oexI" thy [oex_def]
+    "[| P(x);  x<A |] ==> EX x<A. P(x)"
+ (fn prems=> [ (REPEAT (ares_tac (prems @ [exI,conjI]) 1)) ]);
+
+(*Not of the general form for such rules; ~EX has become ALL~ *)
+qed_goal "oexCI" thy 
+   "[| ALL x<A. ~P(x) ==> P(a);  a<A |] ==> EX x<A.P(x)"
+ (fn prems=>
+  [ (rtac classical 1),
+    (REPEAT (ares_tac (prems@[oexI,oallI,notI,notE]) 1)) ]);
+
+qed_goalw "oexE" thy [oex_def]
+    "[| EX x<A. P(x);  !!x. [| x<A; P(x) |] ==> Q \
+\    |] ==> Q"
+ (fn major::prems=>
+  [ (rtac (major RS exE) 1),
+    (REPEAT (eresolve_tac (prems @ [asm_rl,conjE]) 1)) ]);
+
+qed_goalw "oex_cong" thy [oex_def]
+    "[| a=a';  !!x. x<a' ==> P(x) <-> P'(x) \
+\    |] ==> oex(a,P) <-> oex(a',P')"
+ (fn prems=> [ (simp_tac (!simpset addsimps prems addcongs [conj_cong]) 1) ]);
+