isatool fixclasimp;
authorwenzelm
Mon, 03 Nov 1997 12:13:18 +0100
changeset 4089 96fba19bcbe2
parent 4088 9be9e39fd862
child 4090 9f1eaab75e8c
isatool fixclasimp;
src/HOL/Arith.ML
src/HOL/Divides.ML
src/HOL/Finite.ML
src/HOL/Fun.ML
src/HOL/Hoare/Arith2.ML
src/HOL/Hoare/Examples.ML
src/HOL/Hoare/Hoare.ML
src/HOL/Hoare/List_Examples.ML
src/HOL/IMP/Denotation.ML
src/HOL/IMP/Expr.ML
src/HOL/IMP/Hoare.ML
src/HOL/IMP/Natural.ML
src/HOL/IMP/Transition.ML
src/HOL/IMP/VC.ML
src/HOL/IOA/Asig.ML
src/HOL/IOA/IOA.ML
src/HOL/IOA/Solve.ML
src/HOL/Induct/Acc.ML
src/HOL/Induct/Com.ML
src/HOL/Induct/Comb.ML
src/HOL/Induct/Exp.ML
src/HOL/Induct/LList.ML
src/HOL/Induct/Mutil.ML
src/HOL/Induct/Perm.ML
src/HOL/Induct/PropLog.ML
src/HOL/Induct/SList.ML
src/HOL/Induct/Simult.ML
src/HOL/Induct/Term.ML
src/HOL/Integ/Bin.ML
src/HOL/Integ/Equiv.ML
src/HOL/Integ/Group.ML
src/HOL/Integ/Integ.ML
src/HOL/Integ/Ring.ML
src/HOL/Lambda/Commutation.ML
src/HOL/Lambda/Eta.ML
src/HOL/Lambda/Lambda.ML
src/HOL/Lambda/ParRed.ML
src/HOL/Lex/Auto.ML
src/HOL/Lex/AutoChopper.ML
src/HOL/Lex/Prefix.ML
src/HOL/List.ML
src/HOL/Map.ML
src/HOL/MiniML/Generalize.ML
src/HOL/MiniML/Instance.ML
src/HOL/MiniML/Maybe.ML
src/HOL/MiniML/MiniML.ML
src/HOL/MiniML/Type.ML
src/HOL/MiniML/W.ML
src/HOL/Modelcheck/MCSyn.ML
src/HOL/NatDef.ML
src/HOL/Ord.ML
src/HOL/Power.ML
src/HOL/Prod.ML
src/HOL/Quot/FRACT.ML
src/HOL/Quot/PER0.ML
src/HOL/RelPow.ML
src/HOL/Relation.ML
src/HOL/Set.ML
src/HOL/Sexp.ML
src/HOL/Subst/Subst.ML
src/HOL/Subst/Unifier.ML
src/HOL/Subst/Unify.ML
src/HOL/Sum.ML
src/HOL/TLA/Action.ML
src/HOL/TLA/Buffer/Buffer.ML
src/HOL/TLA/Buffer/DBuffer.ML
src/HOL/TLA/Inc/Inc.ML
src/HOL/TLA/Intensional.ML
src/HOL/TLA/Memory/MIlive.ML
src/HOL/TLA/Memory/MIsafe.ML
src/HOL/TLA/Memory/MemClerk.ML
src/HOL/TLA/Memory/Memory.ML
src/HOL/TLA/Memory/MemoryImplementation.ML
src/HOL/TLA/Memory/ProcedureInterface.ML
src/HOL/TLA/Memory/RPC.ML
src/HOL/TLA/Stfun.ML
src/HOL/TLA/TLA.ML
src/HOL/TLA/cladata.ML
src/HOL/Trancl.ML
src/HOL/Univ.ML
src/HOL/W0/I.ML
src/HOL/W0/Maybe.ML
src/HOL/W0/MiniML.ML
src/HOL/W0/Type.ML
src/HOL/W0/W.ML
src/HOL/WF.ML
src/HOL/WF_Rel.ML
src/HOL/equalities.ML
src/HOL/ex/BT.ML
src/HOL/ex/Fib.ML
src/HOL/ex/InSort.ML
src/HOL/ex/MT.ML
src/HOL/ex/Primes.ML
src/HOL/ex/Primrec.ML
src/HOL/ex/Puzzle.ML
src/HOL/ex/Qsort.ML
src/HOL/ex/Recdef.ML
src/HOL/ex/Sorting.ML
src/HOL/ex/cla.ML
src/HOL/ex/meson.ML
src/HOL/ex/rel.ML
src/HOL/ex/set.ML
src/HOL/intr_elim.ML
src/HOL/mono.ML
--- a/src/HOL/Arith.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Arith.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -35,7 +35,7 @@
 AddIffs [pred_le];
 
 goalw Arith.thy [pred_def] "m<=n --> pred(m) <= pred(n)";
-by(simp_tac (!simpset addsplits [expand_nat_case]) 1);
+by(simp_tac (simpset() addsplits [expand_nat_case]) 1);
 qed_spec_mp "pred_le_mono";
 
 goal Arith.thy "!!n. n ~= 0 ==> pred n < n";
@@ -124,7 +124,7 @@
 
 goal Arith.thy "(pred (m+n) = 0) = (m=0 & pred n = 0 | pred m = 0 & n=0)";
 by (induct_tac "m" 1);
-by (ALLGOALS (fast_tac (!claset addss (!simpset))));
+by (ALLGOALS (fast_tac (claset() addss (simpset()))));
 qed "pred_add_is_0";
 Addsimps [pred_add_is_0];
 
@@ -140,7 +140,7 @@
 goal Arith.thy "i<j --> (EX k. j = Suc(i+k))";
 by (induct_tac "j" 1);
 by (Simp_tac 1);
-by (blast_tac (!claset addSEs [less_SucE] 
+by (blast_tac (claset() addSEs [less_SucE] 
                        addSIs [add_0_right RS sym, add_Suc_right RS sym]) 1);
 val lemma = result();
 
@@ -149,8 +149,8 @@
 
 goal Arith.thy "!!m. m<n --> (? k. n=Suc(m+k))";
 by (induct_tac "n" 1);
-by (ALLGOALS (simp_tac (!simpset addsimps [less_Suc_eq])));
-by (blast_tac (!claset addSEs [less_SucE] 
+by (ALLGOALS (simp_tac (simpset() addsimps [less_Suc_eq])));
+by (blast_tac (claset() addSEs [less_SucE] 
                        addSIs [add_0_right RS sym, add_Suc_right RS sym]) 1);
 qed_spec_mp "less_eq_Suc_add";
 
@@ -162,7 +162,7 @@
 qed "le_add2";
 
 goal Arith.thy "n <= ((n + m)::nat)";
-by (simp_tac (!simpset addsimps add_ac) 1);
+by (simp_tac (simpset() addsimps add_ac) 1);
 by (rtac le_add2 1);
 qed "le_add1";
 
@@ -185,7 +185,7 @@
 by (etac rev_mp 1);
 by (induct_tac "j" 1);
 by (ALLGOALS Asm_simp_tac);
-by (blast_tac (!claset addDs [Suc_lessD]) 1);
+by (blast_tac (claset() addDs [Suc_lessD]) 1);
 qed "add_lessD1";
 
 goal Arith.thy "!!i::nat. ~ (i+j < i)";
@@ -194,7 +194,7 @@
 qed "not_add_less1";
 
 goal Arith.thy "!!i::nat. ~ (j+i < i)";
-by (simp_tac (!simpset addsimps [add_commute, not_add_less1]) 1);
+by (simp_tac (simpset() addsimps [add_commute, not_add_less1]) 1);
 qed "not_add_less2";
 AddIffs [not_add_less1, not_add_less2];
 
@@ -211,25 +211,25 @@
 goal Arith.thy "m+k<=n --> m<=(n::nat)";
 by (induct_tac "k" 1);
 by (ALLGOALS Asm_simp_tac);
-by (blast_tac (!claset addDs [Suc_leD]) 1);
+by (blast_tac (claset() addDs [Suc_leD]) 1);
 qed_spec_mp "add_leD1";
 
 goal Arith.thy "!!n::nat. m+k<=n ==> k<=n";
-by (full_simp_tac (!simpset addsimps [add_commute]) 1);
+by (full_simp_tac (simpset() addsimps [add_commute]) 1);
 by (etac add_leD1 1);
 qed_spec_mp "add_leD2";
 
 goal Arith.thy "!!n::nat. m+k<=n ==> m<=n & k<=n";
-by (blast_tac (!claset addDs [add_leD1, add_leD2]) 1);
+by (blast_tac (claset() addDs [add_leD1, add_leD2]) 1);
 bind_thm ("add_leE", result() RS conjE);
 
 goal Arith.thy "!!k l::nat. [| k<l; m+l = k+n |] ==> m<n";
-by (safe_tac (!claset addSDs [less_eq_Suc_add]));
+by (safe_tac (claset() addSDs [less_eq_Suc_add]));
 by (asm_full_simp_tac
-    (!simpset delsimps [add_Suc_right]
+    (simpset() delsimps [add_Suc_right]
                 addsimps ([add_Suc_right RS sym, add_left_cancel] @add_ac)) 1);
 by (etac subst 1);
-by (simp_tac (!simpset addsimps [less_add_Suc1]) 1);
+by (simp_tac (simpset() addsimps [less_add_Suc1]) 1);
 qed "less_add_eq_less";
 
 
@@ -255,8 +255,8 @@
 \        i <= j                                 \
 \     |] ==> f(i) <= (f(j)::nat)";
 by (cut_facts_tac [le] 1);
-by (asm_full_simp_tac (!simpset addsimps [le_eq_less_or_eq]) 1);
-by (blast_tac (!claset addSIs [lt_mono]) 1);
+by (asm_full_simp_tac (simpset() addsimps [le_eq_less_or_eq]) 1);
+by (blast_tac (claset() addSIs [lt_mono]) 1);
 qed "less_mono_imp_le_mono";
 
 (*non-strict, in 1st argument*)
@@ -269,7 +269,7 @@
 (*non-strict, in both arguments*)
 goal Arith.thy "!!k l::nat. [|i<=j;  k<=l |] ==> i + k <= j + l";
 by (etac (add_le_mono1 RS le_trans) 1);
-by (simp_tac (!simpset addsimps [add_commute]) 1);
+by (simp_tac (simpset() addsimps [add_commute]) 1);
 (*j moves to the end because it is free while k, l are bound*)
 by (etac add_le_mono1 1);
 qed "add_le_mono";
@@ -284,7 +284,7 @@
 (*right successor law for multiplication*)
 qed_goal "mult_Suc_right" Arith.thy  "m * Suc(n) = m + (m * n)"
  (fn _ => [induct_tac "m" 1,
-           ALLGOALS(asm_simp_tac (!simpset addsimps add_ac))]);
+           ALLGOALS(asm_simp_tac (simpset() addsimps add_ac))]);
 
 Addsimps [mult_0_right, mult_Suc_right];
 
@@ -303,16 +303,16 @@
 (*addition distributes over multiplication*)
 qed_goal "add_mult_distrib" Arith.thy "(m + n)*k = (m*k) + ((n*k)::nat)"
  (fn _ => [induct_tac "m" 1,
-           ALLGOALS(asm_simp_tac (!simpset addsimps add_ac))]);
+           ALLGOALS(asm_simp_tac (simpset() addsimps add_ac))]);
 
 qed_goal "add_mult_distrib2" Arith.thy "k*(m + n) = (k*m) + ((k*n)::nat)"
  (fn _ => [induct_tac "m" 1,
-           ALLGOALS(asm_simp_tac (!simpset addsimps add_ac))]);
+           ALLGOALS(asm_simp_tac (simpset() addsimps add_ac))]);
 
 (*Associative law for multiplication*)
 qed_goal "mult_assoc" Arith.thy "(m * n) * k = m * ((n * k)::nat)"
   (fn _ => [induct_tac "m" 1, 
-            ALLGOALS (asm_simp_tac (!simpset addsimps [add_mult_distrib]))]);
+            ALLGOALS (asm_simp_tac (simpset() addsimps [add_mult_distrib]))]);
 
 qed_goal "mult_left_commute" Arith.thy "x*(y*z) = y*((x*z)::nat)"
  (fn _ => [rtac trans 1, rtac mult_commute 1, rtac trans 1,
@@ -345,11 +345,11 @@
 qed_spec_mp "add_diff_inverse";
 
 goal Arith.thy "!!m. n<=m ==> n+(m-n) = (m::nat)";
-by (asm_simp_tac (!simpset addsimps [add_diff_inverse, not_less_iff_le]) 1);
+by (asm_simp_tac (simpset() addsimps [add_diff_inverse, not_less_iff_le]) 1);
 qed "le_add_diff_inverse";
 
 goal Arith.thy "!!m. n<=m ==> (m-n)+n = (m::nat)";
-by (asm_simp_tac (!simpset addsimps [le_add_diff_inverse, add_commute]) 1);
+by (asm_simp_tac (simpset() addsimps [le_add_diff_inverse, add_commute]) 1);
 qed "le_add_diff_inverse2";
 
 Addsimps  [le_add_diff_inverse, le_add_diff_inverse2];
@@ -367,7 +367,7 @@
 goal Arith.thy "m - n < Suc(m)";
 by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
 by (etac less_SucE 3);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [less_Suc_eq])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [less_Suc_eq])));
 qed "diff_less_Suc";
 
 goal Arith.thy "!!m::nat. m - n <= m";
@@ -383,14 +383,14 @@
 
 (*This and the next few suggested by Florian Kammueller*)
 goal Arith.thy "!!i::nat. i-j-k = i-k-j";
-by (simp_tac (!simpset addsimps [diff_diff_left, add_commute]) 1);
+by (simp_tac (simpset() addsimps [diff_diff_left, add_commute]) 1);
 qed "diff_commute";
 
 goal Arith.thy "!!i j k:: nat. k<=j --> j<=i --> i - (j - k) = i - j + k";
 by (res_inst_tac [("m","i"),("n","j")] diff_induct 1);
 by (ALLGOALS Asm_simp_tac);
 by (asm_simp_tac
-    (!simpset addsimps [Suc_diff_n, le_imp_less_Suc, le_Suc_eq]) 1);
+    (simpset() addsimps [Suc_diff_n, le_imp_less_Suc, le_Suc_eq]) 1);
 qed_spec_mp "diff_diff_right";
 
 goal Arith.thy "!!i j k:: nat. k<=j --> (i + j) - k = i + (j - k)";
@@ -405,7 +405,7 @@
 Addsimps [diff_add_inverse];
 
 goal Arith.thy "!!n::nat.(m+n) - n = m";
-by (simp_tac (!simpset addsimps [diff_add_assoc]) 1);
+by (simp_tac (simpset() addsimps [diff_add_assoc]) 1);
 qed "diff_add_inverse2";
 Addsimps [diff_add_inverse2];
 
@@ -417,7 +417,7 @@
 val [prem] = goal Arith.thy "m < Suc(n) ==> m-n = 0";
 by (rtac (prem RS rev_mp) 1);
 by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
-by (asm_simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+by (asm_simp_tac (simpset() addsimps [less_Suc_eq]) 1);
 by (ALLGOALS Asm_simp_tac);
 qed "less_imp_diff_is_0";
 
@@ -433,7 +433,7 @@
 qed "less_imp_diff_positive";
 
 goal Arith.thy "Suc(m)-n = (if m<n then 0 else Suc(m-n))";
-by (simp_tac (!simpset addsimps [less_imp_diff_is_0, not_less_eq, Suc_diff_n]
+by (simp_tac (simpset() addsimps [less_imp_diff_is_0, not_less_eq, Suc_diff_n]
                        addsplits [expand_if]) 1);
 qed "if_Suc_diff_n";
 
@@ -456,7 +456,7 @@
 
 goal Arith.thy "!!m::nat. (m+k) - (n+k) = m - n";
 val add_commute_k = read_instantiate [("n","k")] add_commute;
-by (asm_simp_tac (!simpset addsimps ([add_commute_k])) 1);
+by (asm_simp_tac (simpset() addsimps ([add_commute_k])) 1);
 qed "diff_cancel2";
 Addsimps [diff_cancel2];
 
@@ -470,9 +470,9 @@
 by (subgoal_tac "Suc na <= m --> n <= m --> Suc na <= n --> \
 \                Suc (m - Suc na) - Suc (n - Suc na) = m-n" 1);
 by (Asm_full_simp_tac 1);
-by (blast_tac (!claset addIs [le_trans]) 1);
-by (auto_tac (!claset addIs [Suc_leD], !simpset delsimps [diff_Suc_Suc]));
-by (asm_full_simp_tac (!simpset delsimps [Suc_less_eq] 
+by (blast_tac (claset() addIs [le_trans]) 1);
+by (auto_tac (claset() addIs [Suc_leD], simpset() delsimps [diff_Suc_Suc]));
+by (asm_full_simp_tac (simpset() delsimps [Suc_less_eq] 
 		       addsimps [Suc_diff_n RS sym, le_eq_less_Suc]) 1);
 qed "diff_right_cancel";
 
@@ -491,7 +491,7 @@
 
 goal Arith.thy "!!m::nat. k * (m - n) = (k * m) - (k * n)";
 val mult_commute_k = read_instantiate [("m","k")] mult_commute;
-by (simp_tac (!simpset addsimps [diff_mult_distrib, mult_commute_k]) 1);
+by (simp_tac (simpset() addsimps [diff_mult_distrib, mult_commute_k]) 1);
 qed "diff_mult_distrib2" ;
 (*NOT added as rewrites, since sometimes they are used from right-to-left*)
 
@@ -500,7 +500,7 @@
 
 goal Arith.thy "!!i::nat. i<=j ==> i*k<=j*k";
 by (induct_tac "k" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [add_le_mono])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [add_le_mono])));
 qed "mult_le_mono1";
 
 (*<=monotonicity, BOTH arguments*)
@@ -509,7 +509,7 @@
 by (rtac le_trans 1);
 by (stac mult_commute 2);
 by (etac mult_le_mono1 2);
-by (simp_tac (!simpset addsimps [mult_commute]) 1);
+by (simp_tac (simpset() addsimps [mult_commute]) 1);
 qed "mult_le_mono";
 
 (*strict, in 1st argument; proof is by induction on k>0*)
@@ -517,12 +517,12 @@
 by (eres_inst_tac [("i","0")] less_natE 1);
 by (Asm_simp_tac 1);
 by (induct_tac "x" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [add_less_mono])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [add_less_mono])));
 qed "mult_less_mono2";
 
 goal Arith.thy "!!i::nat. [| i<j; 0<k |] ==> i*k < j*k";
 by (dtac mult_less_mono2 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsimps [mult_commute])));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [mult_commute])));
 qed "mult_less_mono1";
 
 goal Arith.thy "(0 < m*n) = (0<m & 0<n)";
@@ -536,18 +536,18 @@
 by (Simp_tac 1);
 by (induct_tac "n" 1);
 by (Simp_tac 1);
-by (fast_tac (!claset addss !simpset) 1);
+by (fast_tac (claset() addss simpset()) 1);
 qed "mult_eq_1_iff";
 
 goal Arith.thy "!!k. 0<k ==> (m*k < n*k) = (m<n)";
-by (safe_tac (!claset addSIs [mult_less_mono1]));
+by (safe_tac (claset() addSIs [mult_less_mono1]));
 by (cut_facts_tac [less_linear] 1);
-by (blast_tac (!claset addDs [mult_less_mono1] addEs [less_asym]) 1);
+by (blast_tac (claset() addDs [mult_less_mono1] addEs [less_asym]) 1);
 qed "mult_less_cancel2";
 
 goal Arith.thy "!!k. 0<k ==> (k*m < k*n) = (m<n)";
 by (dtac mult_less_cancel2 1);
-by (asm_full_simp_tac (!simpset addsimps [mult_commute]) 1);
+by (asm_full_simp_tac (simpset() addsimps [mult_commute]) 1);
 qed "mult_less_cancel1";
 Addsimps [mult_less_cancel1, mult_less_cancel2];
 
@@ -561,7 +561,7 @@
 
 goal Arith.thy "!!k. 0<k ==> (k*m = k*n) = (m=n)";
 by (dtac mult_cancel2 1);
-by (asm_full_simp_tac (!simpset addsimps [mult_commute]) 1);
+by (asm_full_simp_tac (simpset() addsimps [mult_commute]) 1);
 qed "mult_cancel1";
 Addsimps [mult_cancel1, mult_cancel2];
 
@@ -572,9 +572,9 @@
 by (dtac sym 1);
 by (rtac disjCI 1);
 by (rtac nat_less_cases 1 THEN assume_tac 2);
-by (fast_tac (!claset addSEs [less_SucE] addss !simpset) 1);
-by (best_tac (!claset addDs [mult_less_mono2] 
-                      addss (!simpset addsimps [zero_less_eq RS sym])) 1);
+by (fast_tac (claset() addSEs [less_SucE] addss simpset()) 1);
+by (best_tac (claset() addDs [mult_less_mono2] 
+                      addss (simpset() addsimps [zero_less_eq RS sym])) 1);
 qed "mult_eq_self_implies_10";
 
 
@@ -584,7 +584,7 @@
 by (subgoal_tac "c+(a-c) < c+(b-c)" 1);
 by (Full_simp_tac 1);
 by (subgoal_tac "c <= b" 1);
-by (blast_tac (!claset addIs [less_imp_le, le_trans]) 2);
+by (blast_tac (claset() addIs [less_imp_le, le_trans]) 2);
 by (Asm_simp_tac 1);
 qed "diff_less_mono";
 
@@ -596,18 +596,18 @@
 
 goal Arith.thy "!! n. n <= m ==> Suc m - n = Suc (m - n)";
 by (rtac Suc_diff_n 1);
-by (asm_full_simp_tac (!simpset addsimps [le_eq_less_Suc]) 1);
+by (asm_full_simp_tac (simpset() addsimps [le_eq_less_Suc]) 1);
 qed "Suc_diff_le";
 
 goal Arith.thy "!! n. Suc i <= n ==> Suc (n - Suc i) = n - i";
 by (asm_full_simp_tac
-    (!simpset addsimps [Suc_diff_n RS sym, le_eq_less_Suc]) 1);
+    (simpset() addsimps [Suc_diff_n RS sym, le_eq_less_Suc]) 1);
 qed "Suc_diff_Suc";
 
 goal Arith.thy "!! i::nat. i <= n ==> n - (n - i) = i";
 by (etac rev_mp 1);
 by (res_inst_tac [("m","n"),("n","i")] diff_induct 1);
-by (ALLGOALS (asm_simp_tac  (!simpset addsimps [Suc_diff_le])));
+by (ALLGOALS (asm_simp_tac  (simpset() addsimps [Suc_diff_le])));
 qed "diff_diff_cancel";
 Addsimps [diff_diff_cancel];
 
@@ -615,7 +615,7 @@
 by (etac rev_mp 1);
 by (res_inst_tac [("m", "k"), ("n", "n")] diff_induct 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsimps [less_add_Suc2, less_imp_le]) 1);
+by (simp_tac (simpset() addsimps [less_add_Suc2, less_imp_le]) 1);
 by (Simp_tac 1);
 qed "le_add_diff";
 
@@ -626,7 +626,7 @@
 goal Arith.thy "!!n::nat. m<=n --> (m-l) <= (n-l)";
 by (induct_tac "n" 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsimps [le_Suc_eq]) 1);
+by (simp_tac (simpset() addsimps [le_Suc_eq]) 1);
 by (rtac impI 1);
 by (etac impE 1);
 by (atac 1);
@@ -640,8 +640,8 @@
 by (Simp_tac 1);
 by (case_tac "n <= l" 1);
 by (subgoal_tac "m <= l" 1);
-by (asm_simp_tac (!simpset addsimps [Suc_diff_le]) 1);
-by (fast_tac (!claset addEs [le_trans]) 1);
+by (asm_simp_tac (simpset() addsimps [Suc_diff_le]) 1);
+by (fast_tac (claset() addEs [le_trans]) 1);
 by (dtac not_leE 1);
-by (asm_simp_tac (!simpset addsimps [if_Suc_diff_n]) 1);
+by (asm_simp_tac (simpset() addsimps [if_Suc_diff_n]) 1);
 qed_spec_mp "diff_le_mono2";
--- a/src/HOL/Divides.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Divides.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -14,7 +14,7 @@
 by (subgoal_tac "0<n --> ~ m<n --> m - n < m" 1);
 by (Blast_tac 1);
 by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
-by (ALLGOALS(asm_simp_tac(!simpset addsimps [diff_less_Suc])));
+by (ALLGOALS(asm_simp_tac(simpset() addsimps [diff_less_Suc])));
 qed "diff_less";
 
 val wf_less_trans = [eq_reflection, wf_pred_nat RS wf_trancl] MRS 
@@ -24,7 +24,7 @@
 
 goal thy "(%m. m mod n) = wfrec (trancl pred_nat) \
              \                      (%f j. if j<n then j else f (j-n))";
-by (simp_tac (!simpset addsimps [mod_def]) 1);
+by (simp_tac (simpset() addsimps [mod_def]) 1);
 qed "mod_eq";
 
 goal thy "!!m. m<n ==> m mod n = m";
@@ -34,32 +34,32 @@
 
 goal thy "!!m. [| 0<n;  ~m<n |] ==> m mod n = (m-n) mod n";
 by (rtac (mod_eq RS wf_less_trans) 1);
-by (asm_simp_tac (!simpset addsimps [diff_less, cut_apply, less_eq]) 1);
+by (asm_simp_tac (simpset() addsimps [diff_less, cut_apply, less_eq]) 1);
 qed "mod_geq";
 
 goal thy "m mod 1 = 0";
 by (induct_tac "m" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [mod_less, mod_geq])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [mod_less, mod_geq])));
 qed "mod_1";
 Addsimps [mod_1];
 
 goal thy "!!n. 0<n ==> n mod n = 0";
-by (asm_simp_tac (!simpset addsimps [mod_less, mod_geq]) 1);
+by (asm_simp_tac (simpset() addsimps [mod_less, mod_geq]) 1);
 qed "mod_self";
 
 goal thy "!!n. 0<n ==> (m+n) mod n = m mod n";
 by (subgoal_tac "(n + m) mod n = (n+m-n) mod n" 1);
 by (stac (mod_geq RS sym) 2);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsimps [add_commute])));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [add_commute])));
 qed "mod_eq_add";
 
 goal thy "!!k. [| 0<k; 0<n |] ==> (m mod n)*k = (m*k) mod (n*k)";
 by (res_inst_tac [("n","m")] less_induct 1);
 by (case_tac "na<n" 1);
 (*case na<n*)
-by (asm_simp_tac (!simpset addsimps [mod_less]) 1);
+by (asm_simp_tac (simpset() addsimps [mod_less]) 1);
 (*case n<=na*)
-by (asm_simp_tac (!simpset addsimps [mod_geq, diff_less, zero_less_mult_iff, 
+by (asm_simp_tac (simpset() addsimps [mod_geq, diff_less, zero_less_mult_iff, 
 				     diff_mult_distrib]) 1);
 qed "mod_mult_distrib";
 
@@ -67,17 +67,17 @@
 by (res_inst_tac [("n","m")] less_induct 1);
 by (case_tac "na<n" 1);
 (*case na<n*)
-by (asm_simp_tac (!simpset addsimps [mod_less]) 1);
+by (asm_simp_tac (simpset() addsimps [mod_less]) 1);
 (*case n<=na*)
-by (asm_simp_tac (!simpset addsimps [mod_geq, diff_less, zero_less_mult_iff, 
+by (asm_simp_tac (simpset() addsimps [mod_geq, diff_less, zero_less_mult_iff, 
 				     diff_mult_distrib2]) 1);
 qed "mod_mult_distrib2";
 
 goal thy "!!n. 0<n ==> m*n mod n = 0";
 by (induct_tac "m" 1);
-by (asm_simp_tac (!simpset addsimps [mod_less]) 1);
+by (asm_simp_tac (simpset() addsimps [mod_less]) 1);
 by (dres_inst_tac [("m","m*n")] mod_eq_add 1);
-by (asm_full_simp_tac (!simpset addsimps [add_commute]) 1);
+by (asm_full_simp_tac (simpset() addsimps [add_commute]) 1);
 qed "mod_mult_self_is_0";
 Addsimps [mod_mult_self_is_0];
 
@@ -85,7 +85,7 @@
 
 goal thy "(%m. m div n) = wfrec (trancl pred_nat) \
                         \            (%f j. if j<n then 0 else Suc (f (j-n)))";
-by (simp_tac (!simpset addsimps [div_def]) 1);
+by (simp_tac (simpset() addsimps [div_def]) 1);
 qed "div_eq";
 
 goal thy "!!m. m<n ==> m div n = 0";
@@ -95,7 +95,7 @@
 
 goal thy "!!M. [| 0<n;  ~m<n |] ==> m div n = Suc((m-n) div n)";
 by (rtac (div_eq RS wf_less_trans) 1);
-by (asm_simp_tac (!simpset addsimps [diff_less, cut_apply, less_eq]) 1);
+by (asm_simp_tac (simpset() addsimps [diff_less, cut_apply, less_eq]) 1);
 qed "div_geq";
 
 (*Main Result about quotient and remainder.*)
@@ -103,19 +103,19 @@
 by (res_inst_tac [("n","m")] less_induct 1);
 by (rename_tac "k" 1);    (*Variable name used in line below*)
 by (case_tac "k<n" 1);
-by (ALLGOALS (asm_simp_tac(!simpset addsimps ([add_assoc] @
+by (ALLGOALS (asm_simp_tac(simpset() addsimps ([add_assoc] @
                        [mod_less, mod_geq, div_less, div_geq,
                         add_diff_inverse, diff_less]))));
 qed "mod_div_equality";
 
 goal thy "m div 1 = m";
 by (induct_tac "m" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [div_less, div_geq])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [div_less, div_geq])));
 qed "div_1";
 Addsimps [div_1];
 
 goal thy "!!n. 0<n ==> n div n = 1";
-by (asm_simp_tac (!simpset addsimps [div_less, div_geq]) 1);
+by (asm_simp_tac (simpset() addsimps [div_less, div_geq]) 1);
 qed "div_self";
 
 (* Monotonicity of div in first argument *)
@@ -125,14 +125,14 @@
 by (case_tac "na<k" 1);
 (* 1  case n<k *)
 by (subgoal_tac "m<k" 1);
-by (asm_simp_tac (!simpset addsimps [div_less]) 1);
+by (asm_simp_tac (simpset() addsimps [div_less]) 1);
 by (trans_tac 1);
 (* 2  case n >= k *)
 by (case_tac "m<k" 1);
 (* 2.1  case m<k *)
-by (asm_simp_tac (!simpset addsimps [div_less]) 1);
+by (asm_simp_tac (simpset() addsimps [div_less]) 1);
 (* 2.2  case m>=k *)
-by (asm_simp_tac (!simpset addsimps [div_geq, diff_less, diff_le_mono]) 1);
+by (asm_simp_tac (simpset() addsimps [div_geq, diff_less, diff_le_mono]) 1);
 qed_spec_mp "div_le_mono";
 
 
@@ -144,13 +144,13 @@
 by (Simp_tac 1);
 by (rename_tac "k" 1);
 by (case_tac "k<n" 1);
- by (asm_simp_tac (!simpset addsimps [div_less]) 1);
+ by (asm_simp_tac (simpset() addsimps [div_less]) 1);
 by (subgoal_tac "~(k<m)" 1);
  by (trans_tac 2);
-by (asm_simp_tac (!simpset addsimps [div_geq]) 1);
+by (asm_simp_tac (simpset() addsimps [div_geq]) 1);
 by (subgoal_tac "(k-n) div n <= (k-m) div n" 1);
- by (best_tac (!claset addIs [le_trans] 
-                       addss (!simpset addsimps [diff_less])) 1);
+ by (best_tac (claset() addIs [le_trans] 
+                       addss (simpset() addsimps [diff_less])) 1);
 by (REPEAT (eresolve_tac [div_le_mono,diff_le_mono2] 1));
 qed "div_le_mono2";
 
@@ -168,20 +168,20 @@
 by (Simp_tac 1);
 by (rename_tac "m" 1);
 by (case_tac "m<n" 1);
- by (asm_full_simp_tac (!simpset addsimps [div_less]) 1);
+ by (asm_full_simp_tac (simpset() addsimps [div_less]) 1);
 by (subgoal_tac "0<n" 1);
  by (trans_tac 2);
-by (asm_full_simp_tac (!simpset addsimps [div_geq]) 1);
+by (asm_full_simp_tac (simpset() addsimps [div_geq]) 1);
 by (case_tac "n<m" 1);
  by (subgoal_tac "(m-n) div n < (m-n)" 1);
   by (REPEAT (ares_tac [impI,less_trans_Suc] 1));
-  by (asm_full_simp_tac (!simpset addsimps [diff_less]) 1);
+  by (asm_full_simp_tac (simpset() addsimps [diff_less]) 1);
  by (dres_inst_tac [("m","n")] less_imp_diff_positive 1);
- by (asm_full_simp_tac (!simpset addsimps [diff_less]) 1);
+ by (asm_full_simp_tac (simpset() addsimps [diff_less]) 1);
 (* case n=m *)
 by (subgoal_tac "m=n" 1);
  by (trans_tac 2);
-by (asm_simp_tac (!simpset addsimps [div_less]) 1);
+by (asm_simp_tac (simpset() addsimps [div_less]) 1);
 qed_spec_mp "div_less_dividend";
 Addsimps [div_less_dividend];
 
@@ -194,23 +194,23 @@
 by (excluded_middle_tac "Suc(na)<n" 1);
 (* case Suc(na) < n *)
 by (forward_tac [lessI RS less_trans] 2);
-by (asm_simp_tac (!simpset addsimps [mod_less, less_not_refl2 RS not_sym]) 2);
+by (asm_simp_tac (simpset() addsimps [mod_less, less_not_refl2 RS not_sym]) 2);
 (* case n <= Suc(na) *)
-by (asm_full_simp_tac (!simpset addsimps [not_less_iff_le, mod_geq]) 1);
+by (asm_full_simp_tac (simpset() addsimps [not_less_iff_le, mod_geq]) 1);
 by (etac (le_imp_less_or_eq RS disjE) 1);
-by (asm_simp_tac (!simpset addsimps [Suc_diff_n]) 1);
-by (asm_full_simp_tac (!simpset addsimps [not_less_eq RS sym, 
+by (asm_simp_tac (simpset() addsimps [Suc_diff_n]) 1);
+by (asm_full_simp_tac (simpset() addsimps [not_less_eq RS sym, 
                                           diff_less, mod_geq]) 1);
-by (asm_simp_tac (!simpset addsimps [mod_less]) 1);
+by (asm_simp_tac (simpset() addsimps [mod_less]) 1);
 qed "mod_Suc";
 
 goal thy "!!m n. 0<n ==> m mod n < n";
 by (res_inst_tac [("n","m")] less_induct 1);
 by (excluded_middle_tac "na<n" 1);
 (*case na<n*)
-by (asm_simp_tac (!simpset addsimps [mod_less]) 2);
+by (asm_simp_tac (simpset() addsimps [mod_less]) 2);
 (*case n le na*)
-by (asm_full_simp_tac (!simpset addsimps [mod_geq, diff_less]) 1);
+by (asm_full_simp_tac (simpset() addsimps [mod_geq, diff_less]) 1);
 qed "mod_less_divisor";
 
 
@@ -221,29 +221,29 @@
 
 goal thy "!!k b. b<2 ==> k mod 2 = b | k mod 2 = (if b=1 then 0 else 1)";
 by (subgoal_tac "k mod 2 < 2" 1);
-by (asm_simp_tac (!simpset addsimps [mod_less_divisor]) 2);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsimps [mod_less_divisor]) 2);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 by (Blast_tac 1);
 qed "mod2_cases";
 
 goal thy "Suc(Suc(m)) mod 2 = m mod 2";
 by (subgoal_tac "m mod 2 < 2" 1);
-by (asm_simp_tac (!simpset addsimps [mod_less_divisor]) 2);
+by (asm_simp_tac (simpset() addsimps [mod_less_divisor]) 2);
 by Safe_tac;
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [mod_Suc])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [mod_Suc])));
 qed "mod2_Suc_Suc";
 Addsimps [mod2_Suc_Suc];
 
 goal thy "!!m. m mod 2 ~= 0 ==> m mod 2 = 1";
 by (subgoal_tac "m mod 2 < 2" 1);
-by (asm_simp_tac (!simpset addsimps [mod_less_divisor]) 2);
-by (safe_tac (!claset addSEs [lessE]));
-by (ALLGOALS (blast_tac (!claset addIs [sym])));
+by (asm_simp_tac (simpset() addsimps [mod_less_divisor]) 2);
+by (safe_tac (claset() addSEs [lessE]));
+by (ALLGOALS (blast_tac (claset() addIs [sym])));
 qed "mod2_neq_0";
 
 goal thy "(m+m) mod 2 = 0";
 by (induct_tac "m" 1);
-by (simp_tac (!simpset addsimps [mod_less]) 1);
+by (simp_tac (simpset() addsimps [mod_less]) 1);
 by (Asm_simp_tac 1);
 qed "mod2_add_self";
 Addsimps [mod2_add_self];
@@ -256,7 +256,7 @@
 goal thy "!!n. 0<n ==> m*n div n = m";
 by (cut_inst_tac [("m", "m*n")] mod_div_equality 1);
 by (assume_tac 1);
-by (asm_full_simp_tac (!simpset addsimps [mod_mult_self_is_0]) 1);
+by (asm_full_simp_tac (simpset() addsimps [mod_mult_self_is_0]) 1);
 qed "div_mult_self_is_m";
 Addsimps [div_mult_self_is_m];
 
@@ -264,13 +264,13 @@
 goal thy "!!k. [| 0<n; 0<k |] ==> (k*m) div (k*n) = m div n";
 by (res_inst_tac [("n","m")] less_induct 1);
 by (case_tac "na<n" 1);
-by (asm_simp_tac (!simpset addsimps [div_less, zero_less_mult_iff, 
+by (asm_simp_tac (simpset() addsimps [div_less, zero_less_mult_iff, 
                                      mult_less_mono2]) 1);
 by (subgoal_tac "~ k*na < k*n" 1);
 by (asm_simp_tac
-     (!simpset addsimps [zero_less_mult_iff, div_geq,
+     (simpset() addsimps [zero_less_mult_iff, div_geq,
                          diff_mult_distrib2 RS sym, diff_less]) 1);
-by (asm_full_simp_tac (!simpset addsimps [not_less_iff_le, 
+by (asm_full_simp_tac (simpset() addsimps [not_less_iff_le, 
                                           le_refl RS mult_le_mono]) 1);
 qed "div_cancel";
 Addsimps [div_cancel];
@@ -278,13 +278,13 @@
 goal thy "!!k. [| 0<n; 0<k |] ==> (k*m) mod (k*n) = k * (m mod n)";
 by (res_inst_tac [("n","m")] less_induct 1);
 by (case_tac "na<n" 1);
-by (asm_simp_tac (!simpset addsimps [mod_less, zero_less_mult_iff, 
+by (asm_simp_tac (simpset() addsimps [mod_less, zero_less_mult_iff, 
                                      mult_less_mono2]) 1);
 by (subgoal_tac "~ k*na < k*n" 1);
 by (asm_simp_tac
-     (!simpset addsimps [zero_less_mult_iff, mod_geq,
+     (simpset() addsimps [zero_less_mult_iff, mod_geq,
                          diff_mult_distrib2 RS sym, diff_less]) 1);
-by (asm_full_simp_tac (!simpset addsimps [not_less_iff_le, 
+by (asm_full_simp_tac (simpset() addsimps [not_less_iff_le, 
                                           le_refl RS mult_le_mono]) 1);
 qed "mult_mod_distrib";
 
@@ -294,12 +294,12 @@
 (************************************************)
 
 goalw thy [dvd_def] "m dvd 0";
-by (blast_tac (!claset addIs [mult_0_right RS sym]) 1);
+by (blast_tac (claset() addIs [mult_0_right RS sym]) 1);
 qed "dvd_0_right";
 Addsimps [dvd_0_right];
 
 goalw thy [dvd_def] "!!m. 0 dvd m ==> m = 0";
-by (fast_tac (!claset addss !simpset) 1);
+by (fast_tac (claset() addss simpset()) 1);
 qed "dvd_0_left";
 
 goalw thy [dvd_def] "1 dvd k";
@@ -308,34 +308,34 @@
 AddIffs [dvd_1_left];
 
 goalw thy [dvd_def] "m dvd m";
-by (blast_tac (!claset addIs [mult_1_right RS sym]) 1);
+by (blast_tac (claset() addIs [mult_1_right RS sym]) 1);
 qed "dvd_refl";
 Addsimps [dvd_refl];
 
 goalw thy [dvd_def] "!!m n p. [| m dvd n; n dvd p |] ==> m dvd p";
-by (blast_tac (!claset addIs [mult_assoc] ) 1);
+by (blast_tac (claset() addIs [mult_assoc] ) 1);
 qed "dvd_trans";
 
 goalw thy [dvd_def] "!!m n. [| m dvd n; n dvd m |] ==> m=n";
-by (fast_tac (!claset addDs [mult_eq_self_implies_10]
-                     addss (!simpset addsimps [mult_assoc, mult_eq_1_iff])) 1);
+by (fast_tac (claset() addDs [mult_eq_self_implies_10]
+                     addss (simpset() addsimps [mult_assoc, mult_eq_1_iff])) 1);
 qed "dvd_anti_sym";
 
 goalw thy [dvd_def] "!!k. [| k dvd m; k dvd n |] ==> k dvd (m + n)";
-by (blast_tac (!claset addIs [add_mult_distrib2 RS sym]) 1);
+by (blast_tac (claset() addIs [add_mult_distrib2 RS sym]) 1);
 qed "dvd_add";
 
 goalw thy [dvd_def] "!!k. [| k dvd m; k dvd n |] ==> k dvd (m-n)";
-by (blast_tac (!claset addIs [diff_mult_distrib2 RS sym]) 1);
+by (blast_tac (claset() addIs [diff_mult_distrib2 RS sym]) 1);
 qed "dvd_diff";
 
 goal thy "!!k. [| k dvd (m-n); k dvd n; n<=m |] ==> k dvd m";
 by (etac (not_less_iff_le RS iffD2 RS add_diff_inverse RS subst) 1);
-by (blast_tac (!claset addIs [dvd_add]) 1);
+by (blast_tac (claset() addIs [dvd_add]) 1);
 qed "dvd_diffD";
 
 goalw thy [dvd_def] "!!k. k dvd n ==> k dvd (m*n)";
-by (blast_tac (!claset addIs [mult_left_commute]) 1);
+by (blast_tac (claset() addIs [mult_left_commute]) 1);
 qed "dvd_mult";
 
 goal thy "!!k. k dvd m ==> k dvd (m*n)";
@@ -348,40 +348,40 @@
 
 goalw thy [dvd_def] "!!m. [| f dvd m; f dvd n; 0<n |] ==> f dvd (m mod n)";
 by (Clarify_tac 1);
-by (full_simp_tac (!simpset addsimps [zero_less_mult_iff]) 1);
+by (full_simp_tac (simpset() addsimps [zero_less_mult_iff]) 1);
 by (res_inst_tac 
     [("x", "(((k div ka)*ka + k mod ka) - ((f*k) div (f*ka)) * ka)")] 
     exI 1);
-by (asm_simp_tac (!simpset addsimps [diff_mult_distrib2, 
+by (asm_simp_tac (simpset() addsimps [diff_mult_distrib2, 
                                      mult_mod_distrib, add_mult_distrib2]) 1);
 qed "dvd_mod";
 
 goal thy "!!k. [| k dvd (m mod n); k dvd n; n~=0 |] ==> k dvd m";
 by (subgoal_tac "k dvd ((m div n)*n + m mod n)" 1);
-by (asm_simp_tac (!simpset addsimps [dvd_add, dvd_mult]) 2);
-by (asm_full_simp_tac (!simpset addsimps [mod_div_equality, zero_less_eq]) 1);
+by (asm_simp_tac (simpset() addsimps [dvd_add, dvd_mult]) 2);
+by (asm_full_simp_tac (simpset() addsimps [mod_div_equality, zero_less_eq]) 1);
 qed "dvd_mod_imp_dvd";
 
 goalw thy [dvd_def]  "!!k m n. [| (k*m) dvd (k*n); 0<k |] ==> m dvd n";
 by (etac exE 1);
-by (asm_full_simp_tac (!simpset addsimps mult_ac) 1);
+by (asm_full_simp_tac (simpset() addsimps mult_ac) 1);
 by (Blast_tac 1);
 qed "dvd_mult_cancel";
 
 goalw thy [dvd_def] "!!i j. [| i dvd m; j dvd n|] ==> (i*j) dvd (m*n)";
 by (Clarify_tac 1);
 by (res_inst_tac [("x","k*ka")] exI 1);
-by (asm_simp_tac (!simpset addsimps mult_ac) 1);
+by (asm_simp_tac (simpset() addsimps mult_ac) 1);
 qed "mult_dvd_mono";
 
 goalw thy [dvd_def] "!!c. (i*j) dvd k ==> i dvd k";
-by (full_simp_tac (!simpset addsimps [mult_assoc]) 1);
+by (full_simp_tac (simpset() addsimps [mult_assoc]) 1);
 by (Blast_tac 1);
 qed "dvd_mult_left";
 
 goalw thy [dvd_def] "!!n. [| k dvd n; 0 < n |] ==> k <= n";
 by (Clarify_tac 1);
-by (ALLGOALS (full_simp_tac (!simpset addsimps [zero_less_mult_iff])));
+by (ALLGOALS (full_simp_tac (simpset() addsimps [zero_less_mult_iff])));
 by (etac conjE 1);
 by (rtac le_trans 1);
 by (rtac (le_refl RS mult_le_mono) 2);
@@ -394,6 +394,6 @@
 by (stac mult_commute 1);
 by (Asm_simp_tac 1);
 by (eres_inst_tac [("t","n")] (mod_div_equality RS subst) 1);
-by (asm_simp_tac (!simpset addsimps [mult_commute]) 1);
+by (asm_simp_tac (simpset() addsimps [mult_commute]) 1);
 by (Blast_tac 1);
 qed "dvd_eq_mod_eq_0";
--- a/src/HOL/Finite.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Finite.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -17,7 +17,7 @@
 qed "Fin_mono";
 
 goalw Finite.thy Fin.defs "Fin(A) <= Pow(A)";
-by (blast_tac (!claset addSIs [lfp_lowerbound]) 1);
+by (blast_tac (claset() addSIs [lfp_lowerbound]) 1);
 qed "Fin_subset_Pow";
 
 (* A : Fin(B) ==> A <= B *)
@@ -41,7 +41,7 @@
 \       !!F a. [| finite F; a:A; a ~: F;  P(F) |] ==> P(insert a F) \
 \    |] ==> F <= A --> P(F)";
 by (rtac (major RS finite_induct) 1);
-by (ALLGOALS (blast_tac (!claset addIs prems)));
+by (ALLGOALS (blast_tac (claset() addIs prems)));
 val lemma = result();
 
 val prems = goal Finite.thy 
@@ -59,7 +59,7 @@
 val major::prems = goal Finite.thy
     "[| finite F;  finite G |] ==> finite(F Un G)";
 by (rtac (major RS finite_induct) 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps prems)));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps prems)));
 qed "finite_UnI";
 
 (*Every subset of a finite set is finite*)
@@ -68,14 +68,14 @@
             rtac mp, etac spec,
             rtac subs]);
 by (rtac (fin RS finite_induct) 1);
-by (simp_tac (!simpset addsimps [subset_Un_eq]) 1);
-by (safe_tac (!claset addSDs [subset_insert_iff RS iffD1]));
+by (simp_tac (simpset() addsimps [subset_Un_eq]) 1);
+by (safe_tac (claset() addSDs [subset_insert_iff RS iffD1]));
 by (eres_inst_tac [("t","C")] (insert_Diff RS subst) 2);
 by (ALLGOALS Asm_simp_tac);
 qed "finite_subset";
 
 goal Finite.thy "finite(F Un G) = (finite F & finite G)";
-by (blast_tac (!claset addIs [finite_UnI] addDs
+by (blast_tac (claset() addIs [finite_UnI] addDs
                 [Un_upper1 RS finite_subset, Un_upper2 RS finite_subset]) 1);
 qed "finite_Un";
 AddIffs[finite_Un];
@@ -102,7 +102,7 @@
 by (rtac (major RS finite_induct) 1);
 by (stac Diff_insert 2);
 by (ALLGOALS (asm_simp_tac
-                (!simpset addsimps (prems@[Diff_subset RS finite_subset]))));
+                (simpset() addsimps (prems@[Diff_subset RS finite_subset]))));
 val lemma = result();
 
 val prems = goal Finite.thy 
@@ -135,14 +135,14 @@
 by (Clarify_tac 1);
 by (subgoal_tac "EX y:A. f y = x & F = f``(A-{y})" 1);
  by (Clarify_tac 1);
- by (full_simp_tac (!simpset addsimps [inj_onto_def]) 1);
+ by (full_simp_tac (simpset() addsimps [inj_onto_def]) 1);
  by (Blast_tac 1);
 by (thin_tac "ALL A. ?PP(A)" 1);
 by (forward_tac [[equalityD2, insertI1] MRS subsetD] 1);
 by (Clarify_tac 1);
 by (res_inst_tac [("x","xa")] bexI 1);
 by (ALLGOALS 
-    (asm_full_simp_tac (!simpset addsimps [inj_onto_image_set_diff])));
+    (asm_full_simp_tac (simpset() addsimps [inj_onto_image_set_diff])));
 val lemma = result();
 
 goal Finite.thy "!!A. [| finite(f``A);  inj_onto f A |] ==> finite A";
@@ -163,7 +163,7 @@
 
 goalw Finite.thy [Sigma_def]
  "!!A. [| finite A; !a:A. finite(B a) |] ==> finite(SIGMA a:A. B a)";
-by(blast_tac (!claset addSIs [finite_UnionI]) 1);
+by(blast_tac (claset() addSIs [finite_UnionI]) 1);
 bind_thm("finite_SigmaI", ballI RSN (2,result()));
 Addsimps [finite_SigmaI];
 
@@ -174,7 +174,7 @@
 by (rtac finite_subset 2);
 by (assume_tac 3);
 by (ALLGOALS
-    (fast_tac (!claset addSDs [rewrite_rule [inj_onto_def] finite_imageD])));
+    (fast_tac (claset() addSDs [rewrite_rule [inj_onto_def] finite_imageD])));
 val lemma = result();
 
 goal Finite.thy "finite(Pow A) = finite A";
@@ -184,7 +184,7 @@
 by (etac finite_induct 1);
 by (ALLGOALS 
     (asm_simp_tac
-     (!simpset addsimps [finite_UnI, finite_imageI, Pow_insert])));
+     (simpset() addsimps [finite_UnI, finite_imageI, Pow_insert])));
 qed "finite_Pow_iff";
 AddIffs [finite_Pow_iff];
 
@@ -193,9 +193,9 @@
  by (Asm_simp_tac 1);
  by (rtac iffI 1);
   by (etac (rewrite_rule [inj_onto_def] finite_imageD) 1);
-  by (simp_tac (!simpset addsplits [expand_split]) 1);
+  by (simp_tac (simpset() addsplits [expand_split]) 1);
  by (etac finite_imageI 1);
-by (simp_tac (!simpset addsimps [inverse_def,image_def]) 1);
+by (simp_tac (simpset() addsimps [inverse_def,image_def]) 1);
 by (Auto_tac());
  by (rtac bexI 1);
  by (assume_tac 2);
@@ -227,7 +227,7 @@
 by (hyp_subst_tac 1);
 by (res_inst_tac [("x","Suc n")] exI 1);
 by (res_inst_tac [("x","%i. if i<n then f i else x")] exI 1);
-by (asm_simp_tac (!simpset addsimps [Collect_conv_insert, less_Suc_eq]
+by (asm_simp_tac (simpset() addsimps [Collect_conv_insert, less_Suc_eq]
                           addcongs [rev_conj_cong]) 1);
 qed "finite_has_card";
 
@@ -244,41 +244,41 @@
  by (Simp_tac 2);
  by (Blast_tac 2);
 by (etac exE 1);
-by (simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+by (simp_tac (simpset() addsimps [less_Suc_eq]) 1);
 by (rtac exI 1);
 by (rtac (refl RS disjI2 RS conjI) 1);
 by (etac equalityE 1);
 by (asm_full_simp_tac
-     (!simpset addsimps [subset_insert,Collect_conv_insert, less_Suc_eq]) 1);
-by (safe_tac (!claset));
+     (simpset() addsimps [subset_insert,Collect_conv_insert, less_Suc_eq]) 1);
+by (safe_tac (claset()));
   by (Asm_full_simp_tac 1);
   by (res_inst_tac [("x","%i. if f i = f m then a else f i")] exI 1);
-  by (SELECT_GOAL(safe_tac (!claset))1);
+  by (SELECT_GOAL(safe_tac (claset()))1);
    by (subgoal_tac "x ~= f m" 1);
     by (Blast_tac 2);
    by (subgoal_tac "? k. f k = x & k<m" 1);
     by (Blast_tac 2);
-   by (SELECT_GOAL(safe_tac (!claset))1);
+   by (SELECT_GOAL(safe_tac (claset()))1);
    by (res_inst_tac [("x","k")] exI 1);
    by (Asm_simp_tac 1);
-  by (simp_tac (!simpset addsplits [expand_if]) 1);
+  by (simp_tac (simpset() addsplits [expand_if]) 1);
   by (Blast_tac 1);
  by (dtac sym 1);
  by (rotate_tac ~1 1);
  by (Asm_full_simp_tac 1);
  by (res_inst_tac [("x","%i. if f i = f m then a else f i")] exI 1);
- by (SELECT_GOAL(safe_tac (!claset))1);
+ by (SELECT_GOAL(safe_tac (claset()))1);
   by (subgoal_tac "x ~= f m" 1);
    by (Blast_tac 2);
   by (subgoal_tac "? k. f k = x & k<m" 1);
    by (Blast_tac 2);
-  by (SELECT_GOAL(safe_tac (!claset))1);
+  by (SELECT_GOAL(safe_tac (claset()))1);
   by (res_inst_tac [("x","k")] exI 1);
   by (Asm_simp_tac 1);
- by (simp_tac (!simpset addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addsplits [expand_if]) 1);
  by (Blast_tac 1);
 by (res_inst_tac [("x","%j. if f j = f i then f m else f j")] exI 1);
-by (SELECT_GOAL(safe_tac (!claset))1);
+by (SELECT_GOAL(safe_tac (claset()))1);
  by (subgoal_tac "x ~= f i" 1);
   by (Blast_tac 2);
  by (case_tac "x = f m" 1);
@@ -286,10 +286,10 @@
   by (Asm_simp_tac 1);
  by (subgoal_tac "? k. f k = x & k<m" 1);
   by (Blast_tac 2);
- by (SELECT_GOAL(safe_tac (!claset))1);
+ by (SELECT_GOAL(safe_tac (claset()))1);
  by (res_inst_tac [("x","k")] exI 1);
  by (Asm_simp_tac 1);
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Blast_tac 1);
 val lemma = result();
 
@@ -303,7 +303,7 @@
  by (res_inst_tac
    [("x","%i. if i<(LEAST n. ? f. A={f i |i. i < n}) then f i else x")] exI 1);
  by (simp_tac
-    (!simpset addsimps [Collect_conv_insert, less_Suc_eq] 
+    (simpset() addsimps [Collect_conv_insert, less_Suc_eq] 
               addcongs [rev_conj_cong]) 1);
  by (etac subst 1);
  by (rtac refl 1);
@@ -315,7 +315,7 @@
 by (etac conjE 1);
 by (dres_inst_tac [("P","%x. ? g. A = {g i |i. i < x}")] Least_le 1);
 by (dtac le_less_trans 1 THEN atac 1);
-by (asm_full_simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+by (asm_full_simp_tac (simpset() addsimps [less_Suc_eq]) 1);
 by (etac disjE 1);
 by (etac less_asym 1 THEN atac 1);
 by (hyp_subst_tac 1);
@@ -335,18 +335,18 @@
 by (Clarify_tac 1);
 by (case_tac "x:B" 1);
  by (dres_inst_tac [("A","B")] mk_disjoint_insert 1);
- by (SELECT_GOAL(safe_tac (!claset))1);
+ by (SELECT_GOAL(safe_tac (claset()))1);
  by (rotate_tac ~1 1);
- by (asm_full_simp_tac (!simpset addsimps [subset_insert_iff,finite_subset]) 1);
+ by (asm_full_simp_tac (simpset() addsimps [subset_insert_iff,finite_subset]) 1);
 by (rotate_tac ~1 1);
-by (asm_full_simp_tac (!simpset addsimps [subset_insert_iff,finite_subset]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subset_insert_iff,finite_subset]) 1);
 qed_spec_mp "card_mono";
 
 goal Finite.thy "!!A B. [| finite A; finite B |]\
 \                       ==> A Int B = {} --> card(A Un B) = card A + card B";
 by (etac finite_induct 1);
 by (ALLGOALS 
-    (asm_simp_tac (!simpset addsimps [Int_insert_left]
+    (asm_simp_tac (simpset() addsimps [Int_insert_left]
 	                    addsplits [expand_if])));
 qed_spec_mp "card_Un_disjoint";
 
@@ -359,7 +359,7 @@
 by (Blast_tac 3);
 by (ALLGOALS 
     (asm_simp_tac
-     (!simpset addsimps [add_commute, not_less_iff_le, 
+     (simpset() addsimps [add_commute, not_less_iff_le, 
 			 add_diff_inverse, card_mono, finite_subset])));
 qed "card_Diff_subset";
 
@@ -371,7 +371,7 @@
 
 goal Finite.thy "!!A. [| finite A; x: A |] ==> card(A-{x}) < card A";
 by (rtac Suc_less_SucD 1);
-by (asm_simp_tac (!simpset addsimps [card_Suc_Diff]) 1);
+by (asm_simp_tac (simpset() addsimps [card_Suc_Diff]) 1);
 qed "card_Diff";
 
 
@@ -380,7 +380,7 @@
 val [major] = goal Finite.thy
   "finite A ==> card(insert x A) = Suc(card(A-{x}))";
 by (case_tac "x:A" 1);
-by (asm_simp_tac (!simpset addsimps [insert_absorb]) 1);
+by (asm_simp_tac (simpset() addsimps [insert_absorb]) 1);
 by (dtac mk_disjoint_insert 1);
 by (etac exE 1);
 by (Asm_simp_tac 1);
@@ -388,7 +388,7 @@
 by (rtac (major RSN (2,finite_subset)) 1);
 by (Blast_tac 1);
 by (Blast_tac 1);
-by (asm_simp_tac (!simpset addsimps [major RS card_insert_disjoint]) 1);
+by (asm_simp_tac (simpset() addsimps [major RS card_insert_disjoint]) 1);
 qed "card_insert";
 Addsimps [card_insert];
 
@@ -406,13 +406,13 @@
 
 goal thy "!!A. finite A ==> card (Pow A) = 2 ^ card A";
 by (etac finite_induct 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [Pow_insert])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [Pow_insert])));
 by (stac card_Un_disjoint 1);
-by (EVERY (map (blast_tac (!claset addIs [finite_imageI])) [3,2,1]));
+by (EVERY (map (blast_tac (claset() addIs [finite_imageI])) [3,2,1]));
 by (subgoal_tac "inj_onto (insert x) (Pow F)" 1);
-by (asm_simp_tac (!simpset addsimps [card_image, Pow_insert]) 1);
+by (asm_simp_tac (simpset() addsimps [card_image, Pow_insert]) 1);
 by (rewtac inj_onto_def);
-by (blast_tac (!claset addSEs [equalityE]) 1);
+by (blast_tac (claset() addSEs [equalityE]) 1);
 qed "card_Pow";
 Addsimps [card_Pow];
 
@@ -430,12 +430,12 @@
 by (etac conjE 1);
 by (hyp_subst_tac 1);
 by (rotate_tac ~1 1);
-by (asm_full_simp_tac (!simpset addsimps [subset_insert_iff,finite_subset]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subset_insert_iff,finite_subset]) 1);
 by (Blast_tac 1);
 (*2*)
 by (rotate_tac ~1 1);
 by (eres_inst_tac [("P","?a<?b")] notE 1);
-by (asm_full_simp_tac (!simpset addsimps [subset_insert_iff,finite_subset]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subset_insert_iff,finite_subset]) 1);
 by (case_tac "A=F" 1);
 by (ALLGOALS Asm_simp_tac);
 qed_spec_mp "psubset_card" ;
@@ -452,7 +452,7 @@
 by (Clarify_tac 1);
 by (stac card_Un_disjoint 1);
 by (ALLGOALS
-    (asm_full_simp_tac (!simpset
+    (asm_full_simp_tac (simpset()
 			 addsimps [dvd_add, disjoint_eq_subset_Compl])));
 by (thin_tac "!c:F. ?PP(c)" 1);
 by (thin_tac "!c:F. ?PP(c) & ?QQ(c)" 1);
--- a/src/HOL/Fun.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Fun.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -23,7 +23,7 @@
 
 val prems = goalw Fun.thy [inj_def]
     "[| !! x y. f(x) = f(y) ==> x=y |] ==> inj(f)";
-by (blast_tac (!claset addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
 qed "injI";
 
 val [major] = goal Fun.thy "(!!x. g(f(x)) = x) ==> inj(f)";
@@ -69,7 +69,7 @@
 
 val prems = goalw Fun.thy [inj_onto_def]
     "(!! x y. [| f(x) = f(y);  x:A;  y:A |] ==> x=y) ==> inj_onto f A";
-by (blast_tac (!claset addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
 qed "inj_ontoI";
 
 val [major] = goal Fun.thy 
@@ -86,7 +86,7 @@
 qed "inj_ontoD";
 
 goal Fun.thy "!!x y.[| inj_onto f A;  x:A;  y:A |] ==> (f(x)=f(y)) = (x=y)";
-by (blast_tac (!claset addSDs [inj_ontoD]) 1);
+by (blast_tac (claset() addSDs [inj_ontoD]) 1);
 qed "inj_onto_iff";
 
 val major::prems = goal Fun.thy
@@ -106,11 +106,11 @@
 
 goalw Fun.thy [o_def]
     "!!f g. [| inj(f);  inj_onto g (range f) |] ==> inj(g o f)";
-by (fast_tac (!claset addIs [injI] addEs [injD, inj_ontoD]) 1);
+by (fast_tac (claset() addIs [injI] addEs [injD, inj_ontoD]) 1);
 qed "comp_inj";
 
 val [prem] = goal Fun.thy "inj(f) ==> inj_onto f A";
-by (blast_tac (!claset addIs [prem RS injD, inj_ontoI]) 1);
+by (blast_tac (claset() addIs [prem RS injD, inj_ontoI]) 1);
 qed "inj_imp";
 
 val [prem] = goalw Fun.thy [inv_def] "y : range(f) ==> f(inv f y) = y";
@@ -124,7 +124,7 @@
 qed "inv_injective";
 
 goal Fun.thy "!!f. [| inj(f);  A<=range(f) |] ==> inj_onto (inv f) A";
-by (fast_tac (!claset addIs [inj_ontoI] 
+by (fast_tac (claset() addIs [inj_ontoI] 
                       addEs [inv_injective,injD]) 1);
 qed "inj_onto_inv";
 
@@ -147,4 +147,4 @@
 qed "image_set_diff";
 
 
-val set_cs = !claset delrules [equalityI];
+val set_cs = claset() delrules [equalityI];
--- a/src/HOL/Hoare/Arith2.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Hoare/Arith2.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -29,7 +29,7 @@
 
 val prems=goalw thy [cd_def] "[| cd x m n; 0<m; 0<n |] ==> x<=m & x<=n";
 by (cut_facts_tac prems 1);
-by (blast_tac (!claset addIs [dvd_imp_le]) 1);
+by (blast_tac (claset() addIs [dvd_imp_le]) 1);
 qed "cd_le";
 
 val prems=goalw thy [cd_def] "cd x m n = cd x n m";
@@ -38,12 +38,12 @@
 
 val prems=goalw thy [cd_def] "n<=m ==> cd x m n = cd x (m-n) n";
 by (cut_facts_tac prems 1);
-by (blast_tac (!claset addIs [dvd_diff] addDs [dvd_diffD]) 1);
+by (blast_tac (claset() addIs [dvd_diff] addDs [dvd_diffD]) 1);
 qed "cd_diff_l";
 
 val prems=goalw thy [cd_def] "m<=n ==> cd x m n = cd x m (n-m)";
 by (cut_facts_tac prems 1);
-by (blast_tac (!claset addIs [dvd_diff] addDs [dvd_diffD]) 1);
+by (blast_tac (claset() addIs [dvd_diff] addDs [dvd_diffD]) 1);
 qed "cd_diff_r";
 
 
@@ -52,12 +52,12 @@
 goalw thy [gcd_def] "!!n. 0<n ==> n = gcd n n";
 by (forward_tac [cd_nnn] 1);
 by (rtac (select_equality RS sym) 1);
-by (blast_tac (!claset addDs [cd_le]) 1);
-by (blast_tac (!claset addIs [le_anti_sym] addDs [cd_le]) 1);
+by (blast_tac (claset() addDs [cd_le]) 1);
+by (blast_tac (claset() addIs [le_anti_sym] addDs [cd_le]) 1);
 qed "gcd_nnn";
 
 val prems = goalw thy [gcd_def] "gcd m n = gcd n m";
-by (simp_tac (!simpset addsimps [cd_swap]) 1);
+by (simp_tac (simpset() addsimps [cd_swap]) 1);
 qed "gcd_swap";
 
 val prems=goalw thy [gcd_def] "n<=m ==> gcd m n = gcd (m-n) n";
@@ -85,7 +85,7 @@
 
 goalw thy [pow_def] "m pow (n+k) = m pow n * m pow k";
 by (nat_ind_tac "k" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [mult_left_commute])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [mult_left_commute])));
 qed "pow_add_reduce";
 
 goalw thy [pow_def] "m pow n pow k = m pow (n*k)";
--- a/src/HOL/Hoare/Examples.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Hoare/Examples.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -15,7 +15,7 @@
 \ WHILE m ~= a DO {s = m*b} s := s+b; m := Suc(m) END\
 \ {s = a*b}";
 by (hoare_tac 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsimps add_ac)));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps add_ac)));
 qed "multiply_by_add";
 
 
@@ -36,13 +36,13 @@
 
 by (hoare_tac 1);
 (*Now prove the verification conditions*)
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (etac less_imp_diff_positive 1);
-by (asm_simp_tac (!simpset addsimps [less_imp_le, gcd_diff_r]) 1);
-by (asm_full_simp_tac (!simpset addsimps [not_less_iff_le, gcd_diff_l]) 2);
+by (asm_simp_tac (simpset() addsimps [less_imp_le, gcd_diff_r]) 1);
+by (asm_full_simp_tac (simpset() addsimps [not_less_iff_le, gcd_diff_l]) 2);
 by (etac gcd_nnn 2);
-by (full_simp_tac (!simpset addsimps [not_less_iff_le, le_eq_less_or_eq]) 1);
-by (blast_tac (!claset addIs [less_imp_diff_positive]) 1);
+by (full_simp_tac (simpset() addsimps [not_less_iff_le, le_eq_less_or_eq]) 1);
+by (blast_tac (claset() addIs [less_imp_diff_positive]) 1);
 qed "Euclid_GCD";
 
 
@@ -65,9 +65,9 @@
 
 by (hoare_tac 1);
 
-by (simp_tac ((simpset_of "Arith") addsimps [pow_0]) 3);
+by (simp_tac ((simpset_of Arith.thy) addsimps [pow_0]) 3);
 
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 
 by (subgoal_tac "a*a=a pow 2" 1);
 by (Asm_simp_tac 1);
@@ -77,14 +77,14 @@
 by (subgoal_tac "0<2" 2);
 by (dres_inst_tac [("m","b")] mod_div_equality 2);
 
-by (ALLGOALS (asm_full_simp_tac ((simpset_of "Arith") addsimps [pow_0,pow_Suc,mult_assoc])));
+by (ALLGOALS (asm_full_simp_tac ((simpset_of Arith.thy) addsimps [pow_0,pow_Suc,mult_assoc])));
 
 by (subgoal_tac "b~=0" 1);
 by (res_inst_tac [("n","b")] natE 1);
 by (res_inst_tac [("Q","b mod 2 ~= 0")] not_imp_swap 3);
 by (assume_tac 4);
 
-by (ALLGOALS (asm_full_simp_tac ((simpset_of "Arith") addsimps [pow_0,pow_Suc,mult_assoc])));
+by (ALLGOALS (asm_full_simp_tac ((simpset_of Arith.thy) addsimps [pow_0,pow_Suc,mult_assoc])));
 by (rtac mod_less 1);
 by (Simp_tac 1);
 
@@ -103,11 +103,11 @@
 \ {b = fac A}";
 
 by (hoare_tac 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (res_inst_tac [("n","a")] natE 1);
 by (ALLGOALS
     (asm_simp_tac
-     (!simpset addsimps [add_mult_distrib,add_mult_distrib2,mult_assoc])));
+     (simpset() addsimps [add_mult_distrib,add_mult_distrib2,mult_assoc])));
 by (Fast_tac 1);
 
 qed"factorial";
--- a/src/HOL/Hoare/Hoare.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Hoare/Hoare.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -12,11 +12,11 @@
 
 val SkipRule = prove_goalw thy [Spec_def,Skip_def]
   "(!!s. p(s) ==> q(s)) ==> Spec p Skip q"
-  (fn prems => [fast_tac (!claset addIs prems) 1]);
+  (fn prems => [fast_tac (claset() addIs prems) 1]);
 
 val AssignRule = prove_goalw thy [Spec_def,Assign_def]
   "(!!s. p s ==> q(%x. if x=v then e s else s x)) ==> Spec p (Assign v e) q"
-  (fn prems => [fast_tac (!claset addIs prems) 1]);
+  (fn prems => [fast_tac (claset() addIs prems) 1]);
 
 val SeqRule = prove_goalw thy [Spec_def,Seq_def]
   "[| Spec p c (%s. q s); Spec (%s. q s) c' r |] ==> Spec p (Seq c c') r"
@@ -31,12 +31,12 @@
       REPEAT (rtac impI 1),
       dtac prem1 1,
       cut_facts_tac [prem2,prem3] 1,
-      fast_tac (!claset addIs [prem1]) 1]);
+      fast_tac (claset() addIs [prem1]) 1]);
 
 val strenthen_pre = prove_goalw thy [Spec_def]
   "[| !!s. p s ==> p' s; Spec p' c q |] ==> Spec p c q"
   (fn [prem1,prem2] =>[cut_facts_tac [prem2] 1,
-                       fast_tac (!claset addIs [prem1]) 1]);
+                       fast_tac (claset() addIs [prem1]) 1]);
 
 val lemma = prove_goalw thy [Spec_def,While_def]
   "[| Spec (%s. I s & b s) c I; !!s. [| I s; ~b s |] ==> q s |] \
@@ -46,9 +46,9 @@
       etac thin_rl 1, res_inst_tac[("x","s")]spec 1,
       res_inst_tac[("x","s'")]spec 1, nat_ind_tac "n" 1,
       Simp_tac 1,
-      fast_tac (!claset addIs [prem2]) 1,
-      simp_tac (!simpset addsimps [Seq_def]) 1,
-      cut_facts_tac [prem1] 1, fast_tac (!claset addIs [prem2]) 1]);
+      fast_tac (claset() addIs [prem2]) 1,
+      simp_tac (simpset() addsimps [Seq_def]) 1,
+      cut_facts_tac [prem1] 1, fast_tac (claset() addIs [prem2]) 1]);
 
 val WhileRule = lemma RSN (2,strenthen_pre);
 
--- a/src/HOL/Hoare/List_Examples.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Hoare/List_Examples.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -7,8 +7,8 @@
 \ END \
 \{y=rev(X)}";
 by (hoare_tac 1);
-by (asm_full_simp_tac (!simpset addsimps [neq_Nil_conv]) 1);
-by (safe_tac (!claset));
+by (asm_full_simp_tac (simpset() addsimps [neq_Nil_conv]) 1);
+by (safe_tac (claset()));
 by (Asm_full_simp_tac 1);
 by (Asm_full_simp_tac 1);
 qed "imperative_reverse";
@@ -22,8 +22,8 @@
 \ END \
 \{y = X@Y}";
 by (hoare_tac 1);
-by (asm_full_simp_tac (!simpset addsimps [neq_Nil_conv]) 1);
-by (safe_tac (!claset));
+by (asm_full_simp_tac (simpset() addsimps [neq_Nil_conv]) 1);
+by (safe_tac (claset()));
 by (Asm_full_simp_tac 1);
 by (Asm_full_simp_tac 1);
 qed "imperative_append";
--- a/src/HOL/IMP/Denotation.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IMP/Denotation.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -59,5 +59,5 @@
 (**** Proof of Equivalence ****)
 
 goal Denotation.thy "(s,t) : C(c)  =  (<c,s> -c-> t)";
-by (fast_tac (!claset addEs [com2] addDs [com1]) 1);
+by (fast_tac (claset() addEs [com2] addDs [com1]) 1);
 qed "denotational_is_natural";
--- a/src/HOL/IMP/Expr.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IMP/Expr.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -35,12 +35,12 @@
 goal Expr.thy "!n. ((a,s) -a-> n) = (n = A a s)";
 by (aexp.induct_tac "a" 1);                               (* struct. ind. *)
 by (ALLGOALS Simp_tac);                                   (* rewr. Den.   *)
-by (TRYALL (fast_tac (!claset addSIs (evala.intrs@prems)
+by (TRYALL (fast_tac (claset() addSIs (evala.intrs@prems)
                              addSEs evala_elim_cases)));
 qed_spec_mp "aexp_iff";
 
 goal Expr.thy "!w. ((b,s) -b-> w) = (w = B b s)";
 by (bexp.induct_tac "b" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addcongs [conj_cong]
+by (ALLGOALS(asm_simp_tac (simpset() addcongs [conj_cong]
                                     addsimps (aexp_iff::evalb_simps))));
 qed_spec_mp "bexp_iff";
--- a/src/HOL/IMP/Hoare.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IMP/Hoare.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -61,29 +61,29 @@
 (*Not suitable for rewriting: LOOPS!*)
 goal Hoare.thy "wp (WHILE b DO c) Q s = \
 \                 (if b s then wp (c;WHILE b DO c) Q s else Q s)";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 qed "wp_While_if";
 
 goal thy
   "wp (WHILE b DO c) Q s = \
 \  (s : gfp(%S.{s. if b s then wp c (%s. s:S) s else Q s}))";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (rtac iffI 1);
  by (rtac weak_coinduct 1);
   by (etac CollectI 1);
- by (safe_tac (!claset));
+ by (safe_tac (claset()));
   by (rotate_tac ~1 1);
   by (Asm_full_simp_tac 1);
  by (rotate_tac ~1 1);
  by (Asm_full_simp_tac 1);
-by (asm_full_simp_tac (!simpset addsimps [wp_def,Gamma_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [wp_def,Gamma_def]) 1);
 by (strip_tac 1);
 by (rtac mp 1);
  by (assume_tac 2);
 by (etac induct2 1);
-by (fast_tac (!claset addSIs [monoI]) 1);
+by (fast_tac (claset() addSIs [monoI]) 1);
 by (stac gfp_Tarski 1);
- by (fast_tac (!claset addSIs [monoI]) 1);
+ by (fast_tac (claset() addSIs [monoI]) 1);
 by (Fast_tac 1);
 qed "wp_While";
 
@@ -95,7 +95,7 @@
 by (com.induct_tac "c" 1);
 by (ALLGOALS Simp_tac);
 by (REPEAT_FIRST Fast_tac);
-by (deepen_tac (!claset addIs [hoare.conseq]) 0 1);
+by (deepen_tac (claset() addIs [hoare.conseq]) 0 1);
 by Safe_tac;
 by (rtac hoare.conseq 1);
   by (etac thin_rl 1);
--- a/src/HOL/IMP/Natural.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IMP/Natural.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -20,5 +20,5 @@
 goal Natural.thy "!!c s t. <c,s> -c-> t ==> (!u. <c,s> -c-> u --> u=t)";
 by (etac evalc.induct 1);
 by (thin_tac "<?c,s2> -c-> s1" 7);
-by (ALLGOALS (deepen_tac (!claset addEs [evalc_WHILE_case]) 4));
+by (ALLGOALS (deepen_tac (claset() addEs [evalc_WHILE_case]) 4));
 qed_spec_mp "com_det";
--- a/src/HOL/IMP/Transition.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IMP/Transition.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -34,11 +34,11 @@
 \              (c;d, s) -*-> (SKIP, u)";
 by (nat_ind_tac "n" 1);
  (* case n = 0 *)
- by (fast_tac (!claset addIs [rtrancl_into_rtrancl2])1);
+ by (fast_tac (claset() addIs [rtrancl_into_rtrancl2])1);
 (* induction step *)
-by (safe_tac (!claset addSDs [rel_pow_Suc_D2]));
+by (safe_tac (claset() addSDs [rel_pow_Suc_D2]));
 by (split_all_tac 1);
-by (fast_tac (!claset addIs [rtrancl_into_rtrancl2]) 1);
+by (fast_tac (claset() addIs [rtrancl_into_rtrancl2]) 1);
 qed_spec_mp "lemma1";
 
 
@@ -49,18 +49,18 @@
 by (rtac rtrancl_refl 1);
 
 (* ASSIGN *)
-by (fast_tac (!claset addSIs [r_into_rtrancl]) 1);
+by (fast_tac (claset() addSIs [r_into_rtrancl]) 1);
 
 (* SEMI *)
-by (fast_tac (!claset addDs [rtrancl_imp_UN_rel_pow] addIs [lemma1]) 1);
+by (fast_tac (claset() addDs [rtrancl_imp_UN_rel_pow] addIs [lemma1]) 1);
 
 (* IF *)
-by (fast_tac (!claset addIs [rtrancl_into_rtrancl2]) 1);
-by (fast_tac (!claset addIs [rtrancl_into_rtrancl2]) 1);
+by (fast_tac (claset() addIs [rtrancl_into_rtrancl2]) 1);
+by (fast_tac (claset() addIs [rtrancl_into_rtrancl2]) 1);
 
 (* WHILE *)
-by (fast_tac (!claset addSIs [r_into_rtrancl]) 1);
-by (fast_tac (!claset addDs [rtrancl_imp_UN_rel_pow]
+by (fast_tac (claset() addSIs [r_into_rtrancl]) 1);
+by (fast_tac (claset() addDs [rtrancl_imp_UN_rel_pow]
                         addIs [rtrancl_into_rtrancl2,lemma1]) 1);
 
 qed "evalc_impl_evalc1";
@@ -71,31 +71,31 @@
 \            (? t m. (c,s) -*-> (SKIP,t) & (d,t) -m-> (SKIP,u) & m <= n)";
 by (nat_ind_tac "n" 1);
  (* case n = 0 *)
- by (fast_tac (!claset addss !simpset) 1);
+ by (fast_tac (claset() addss simpset()) 1);
 (* induction step *)
-by (fast_tac (!claset addSIs [le_SucI,le_refl]
+by (fast_tac (claset() addSIs [le_SucI,le_refl]
                      addSDs [rel_pow_Suc_D2]
                      addSEs [rel_pow_imp_rtrancl,rtrancl_into_rtrancl2]) 1);
 qed_spec_mp "lemma2";
 
 goal Transition.thy "!s t. (c,s) -*-> (SKIP,t) --> <c,s> -c-> t";
 by (com.induct_tac "c" 1);
-by (safe_tac (!claset addSDs [rtrancl_imp_UN_rel_pow]));
+by (safe_tac (claset() addSDs [rtrancl_imp_UN_rel_pow]));
 
 (* SKIP *)
-by (fast_tac (!claset addSEs [rel_pow_E2]) 1);
+by (fast_tac (claset() addSEs [rel_pow_E2]) 1);
 
 (* ASSIGN *)
-by (fast_tac (!claset addSDs [hlemma]  addSEs [rel_pow_E2]
-                      addss !simpset) 1);
+by (fast_tac (claset() addSDs [hlemma]  addSEs [rel_pow_E2]
+                      addss simpset()) 1);
 
 (* SEMI *)
-by (fast_tac (!claset addSDs [lemma2,rel_pow_imp_rtrancl]) 1);
+by (fast_tac (claset() addSDs [lemma2,rel_pow_imp_rtrancl]) 1);
 
 (* IF *)
 by (etac rel_pow_E2 1);
 by (Asm_full_simp_tac 1);
-by (fast_tac (!claset addSDs [rel_pow_imp_rtrancl]) 1);
+by (fast_tac (claset() addSDs [rel_pow_imp_rtrancl]) 1);
 
 (* WHILE, induction on the length of the computation *)
 by (rotate_tac 1 1);
@@ -108,10 +108,10 @@
 by (eresolve_tac evalc1_Es 1);
 
 (* WhileFalse *)
- by (fast_tac (!claset addSDs [hlemma]) 1);
+ by (fast_tac (claset() addSDs [hlemma]) 1);
 
 (* WhileTrue *)
-by (fast_tac(!claset addSDs[lemma2,le_imp_less_or_eq,less_Suc_eq RS iffD2])1);
+by (fast_tac(claset() addSDs[lemma2,le_imp_less_or_eq,less_Suc_eq RS iffD2])1);
 
 qed_spec_mp "evalc1_impl_evalc";
 
@@ -129,8 +129,8 @@
  "!!c1. (c1,s1) -*-> (SKIP,s2) ==> \
 \ (c2,s2) -*-> cs3 --> (c1;c2,s1) -*-> cs3";
 by (etac inverse_rtrancl_induct2 1);
-by (fast_tac (!claset addIs [rtrancl_into_rtrancl2]) 1);
-by (fast_tac (!claset addIs [rtrancl_into_rtrancl2]) 1);
+by (fast_tac (claset() addIs [rtrancl_into_rtrancl2]) 1);
+by (fast_tac (claset() addIs [rtrancl_into_rtrancl2]) 1);
 qed_spec_mp "my_lemma1";
 
 
@@ -141,18 +141,18 @@
 by (rtac rtrancl_refl 1);
 
 (* ASSIGN *)
-by (fast_tac (!claset addSIs [r_into_rtrancl]) 1);
+by (fast_tac (claset() addSIs [r_into_rtrancl]) 1);
 
 (* SEMI *)
-by (fast_tac (!claset addIs [my_lemma1]) 1);
+by (fast_tac (claset() addIs [my_lemma1]) 1);
 
 (* IF *)
-by (fast_tac (!claset addIs [rtrancl_into_rtrancl2]) 1);
-by (fast_tac (!claset addIs [rtrancl_into_rtrancl2]) 1);
+by (fast_tac (claset() addIs [rtrancl_into_rtrancl2]) 1);
+by (fast_tac (claset() addIs [rtrancl_into_rtrancl2]) 1);
 
 (* WHILE *)
-by (fast_tac (!claset addSIs [r_into_rtrancl]) 1);
-by (fast_tac (!claset addIs [rtrancl_into_rtrancl2,my_lemma1]) 1);
+by (fast_tac (claset() addSIs [r_into_rtrancl]) 1);
+by (fast_tac (claset() addIs [rtrancl_into_rtrancl2,my_lemma1]) 1);
 
 qed "evalc_impl_evalc1";
 
@@ -201,9 +201,9 @@
   "(c,s) -*-> (c',s') ==> <c',s'> -c-> t --> <c,s> -c-> t";
 by (rtac (major RS rtrancl_induct2) 1);
 by (Fast_tac 1);
-by (fast_tac (!claset addIs [FB_lemma3] addbefore split_all_tac) 1);
+by (fast_tac (claset() addIs [FB_lemma3] addbefore split_all_tac) 1);
 qed_spec_mp "FB_lemma2";
 
 goal Transition.thy "!!c. (c,s) -*-> (SKIP,t) ==> <c,s> -c-> t";
-by (fast_tac (!claset addEs [FB_lemma2]) 1);
+by (fast_tac (claset() addEs [FB_lemma2]) 1);
 qed "evalc1_impl_evalc";
--- a/src/HOL/IMP/VC.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IMP/VC.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -71,5 +71,5 @@
 
 goal VC.thy "!Q. vcawp c Q = (vc c Q, awp c Q)";
 by (acom.induct_tac "c" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [Let_def])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [Let_def])));
 qed "vcawp_vc_awp";
--- a/src/HOL/IOA/Asig.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IOA/Asig.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -11,9 +11,9 @@
 val asig_projections = [asig_inputs_def, asig_outputs_def, asig_internals_def];
 
 goal Asig.thy "!!a.[| a~:internals(S) ;a~:externals(S)|] ==> a~:actions(S)";
-by (asm_full_simp_tac (!simpset addsimps [externals_def,actions_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [externals_def,actions_def]) 1);
 qed"int_and_ext_is_act";
 
 goal Asig.thy "!!a.[|a:externals(S)|] ==> a:actions(S)";
-by (asm_full_simp_tac (!simpset addsimps [externals_def,actions_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [externals_def,actions_def]) 1);
 qed"ext_is_act";
--- a/src/HOL/IOA/IOA.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IOA/IOA.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -16,7 +16,7 @@
 
 goal IOA.thy
 "asig_of((x,y,z)) = x & starts_of((x,y,z)) = y & trans_of((x,y,z)) = z";
-  by (simp_tac (!simpset addsimps ioa_projections) 1);
+  by (simp_tac (simpset() addsimps ioa_projections) 1);
   qed "ioa_triple_proj";
 
 goalw IOA.thy [ioa_def,state_trans_def,actions_def, is_asig_def]
@@ -28,11 +28,11 @@
 
 
 goal IOA.thy "filter_oseq p (filter_oseq p s) = filter_oseq p s";
-  by (simp_tac (!simpset addsimps [filter_oseq_def]) 1);
+  by (simp_tac (simpset() addsimps [filter_oseq_def]) 1);
   by (rtac ext 1);
   by (exhaust_tac "s(i)" 1);
   by (Asm_simp_tac 1);
-  by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+  by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 qed "filter_oseq_idemp";
 
 goalw IOA.thy [mk_trace_def,filter_oseq_def]
@@ -42,20 +42,20 @@
 \  (mk_trace A s n = Some(a)) =                                   \
 \   (s(n)=Some(a) & a : externals(asig_of(A)))";
   by (exhaust_tac "s(n)" 1);
-  by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+  by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
   by (Fast_tac 1);
 qed "mk_trace_thm";
 
 goalw IOA.thy [reachable_def] "!!A. s:starts_of(A) ==> reachable A s";
   by (res_inst_tac [("x","(%i. None,%i. s)")] bexI 1);
   by (Simp_tac 1);
-  by (asm_simp_tac (!simpset addsimps exec_rws) 1);
+  by (asm_simp_tac (simpset() addsimps exec_rws) 1);
 qed "reachable_0";
 
 goalw IOA.thy (reachable_def::exec_rws)
 "!!A. [| reachable A s; (s,a,t) : trans_of(A) |] ==> reachable A t";
-  by (asm_full_simp_tac (!simpset delsimps bex_simps) 1);
-  by (safe_tac (!claset));
+  by (asm_full_simp_tac (simpset() delsimps bex_simps) 1);
+  by (safe_tac (claset()));
   by (res_inst_tac [("x","(%i. if i<n then fst ex i                    \
 \                            else (if i=n then Some a else None),    \
 \                         %i. if i<Suc n then snd ex i else t)")] bexI 1);
@@ -65,11 +65,11 @@
   by (REPEAT(rtac allI 1));
   by (res_inst_tac [("m","na"),("n","n")] (make_elim less_linear) 1);
   by (etac disjE 1);
-  by (asm_simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+  by (asm_simp_tac (simpset() addsimps [less_Suc_eq]) 1);
   by (etac disjE 1);
   by (Asm_simp_tac 1);
   by (forward_tac [less_not_sym] 1);
-  by (asm_simp_tac (!simpset addsimps [less_not_refl2,less_Suc_eq]) 1);
+  by (asm_simp_tac (simpset() addsimps [less_not_refl2,less_Suc_eq]) 1);
 qed "reachable_n";
 
 val [p1,p2] = goalw IOA.thy [invariant_def]
@@ -77,22 +77,22 @@
 \     !!s t a. [|reachable A s; P(s)|] ==> (s,a,t): trans_of(A) --> P(t) |] \
 \  ==> invariant A P";
   by (rewrite_goals_tac(reachable_def::Let_def::exec_rws));
-  by (safe_tac (!claset));
+  by (safe_tac (claset()));
   by (res_inst_tac [("Q","reachable A (snd ex n)")] conjunct1 1);
   by (nat_ind_tac "n" 1);
-  by (fast_tac (!claset addIs [p1,reachable_0]) 1);
+  by (fast_tac (claset() addIs [p1,reachable_0]) 1);
   by (eres_inst_tac[("x","n")]allE 1);
   by (exhaust_tac "fst ex n" 1 THEN ALLGOALS Asm_full_simp_tac);
-  by (safe_tac (!claset));
+  by (safe_tac (claset()));
   by (etac (p2 RS mp) 1);
-  by (ALLGOALS(fast_tac(!claset addDs [reachable_n])));
+  by (ALLGOALS(fast_tac(claset() addDs [reachable_n])));
 qed "invariantI";
 
 val [p1,p2] = goal IOA.thy
  "[| !!s. s : starts_of(A) ==> P(s); \
 \   !!s t a. reachable A s ==> P(s) --> (s,a,t):trans_of(A) --> P(t) \
 \ |] ==> invariant A P";
-  by (fast_tac (!claset addSIs [invariantI] addSDs [p1,p2]) 1);
+  by (fast_tac (claset() addSIs [invariantI] addSDs [p1,p2]) 1);
 qed "invariantI1";
 
 val [p1,p2] = goalw IOA.thy [invariant_def]
@@ -102,14 +102,14 @@
 
 goal IOA.thy 
 "actions(asig_comp a b) = actions(a) Un actions(b)";
-  by (simp_tac (!simpset addsimps
+  by (simp_tac (simpset() addsimps
                ([actions_def,asig_comp_def]@asig_projections)) 1);
   by (Fast_tac 1);
 qed "actions_asig_comp";
 
 goal IOA.thy
 "starts_of(A || B) = {p. fst(p):starts_of(A) & snd(p):starts_of(B)}";
-  by (simp_tac (!simpset addsimps (par_def::ioa_projections)) 1);
+  by (simp_tac (simpset() addsimps (par_def::ioa_projections)) 1);
 qed "starts_of_par";
 
 (* Every state in an execution is reachable *)
@@ -133,7 +133,7 @@
 \  (if a:actions(asig_of(D)) then                                            \
 \     (snd(snd(snd(s))),a,snd(snd(snd(t)))):trans_of(D)                      \
 \   else snd(snd(snd(t)))=snd(snd(snd(s)))))";
-  by (simp_tac (!simpset addsimps ([par_def,actions_asig_comp,Pair_fst_snd_eq]@
+  by (simp_tac (simpset() addsimps ([par_def,actions_asig_comp,Pair_fst_snd_eq]@
                             ioa_projections)
                   addsplits [expand_if]) 1);
 qed "trans_of_par4";
@@ -141,18 +141,18 @@
 goal IOA.thy "starts_of(restrict ioa acts) = starts_of(ioa) &     \
 \             trans_of(restrict ioa acts) = trans_of(ioa) &       \
 \             reachable (restrict ioa acts) s = reachable ioa s";
-by (simp_tac (!simpset addsimps ([is_execution_fragment_def,executions_def,
+by (simp_tac (simpset() addsimps ([is_execution_fragment_def,executions_def,
                            reachable_def,restrict_def]@ioa_projections)) 1);
 qed "cancel_restrict";
 
 goal IOA.thy "asig_of(A || B) = asig_comp (asig_of A) (asig_of B)";
-  by (simp_tac (!simpset addsimps (par_def::ioa_projections)) 1);
+  by (simp_tac (simpset() addsimps (par_def::ioa_projections)) 1);
 qed "asig_of_par";
 
 
 goal IOA.thy "externals(asig_of(A1||A2)) =    \
 \  (externals(asig_of(A1)) Un externals(asig_of(A2)))";
-by (asm_full_simp_tac (!simpset addsimps [externals_def,asig_of_par,asig_comp_def,asig_inputs_def,asig_outputs_def,Un_def,set_diff_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [externals_def,asig_of_par,asig_comp_def,asig_inputs_def,asig_outputs_def,Un_def,set_diff_def]) 1);
 by (rtac set_ext 1); 
 by (Fast_tac 1);
 qed"externals_of_par"; 
@@ -160,13 +160,13 @@
 goalw IOA.thy [externals_def,actions_def,compat_ioas_def,compat_asigs_def]
  "!! a. [| compat_ioas A1 A2; a:externals(asig_of(A1))|] ==> a~:internals(asig_of(A2))";
 by (Asm_full_simp_tac 1);
-by (best_tac (!claset addEs [equalityCE]) 1);
+by (best_tac (claset() addEs [equalityCE]) 1);
 qed"ext1_is_not_int2";
 
 goalw IOA.thy [externals_def,actions_def,compat_ioas_def,compat_asigs_def]
  "!! a. [| compat_ioas A2 A1 ; a:externals(asig_of(A1))|] ==> a~:internals(asig_of(A2))";
 by (Asm_full_simp_tac 1);
-by (best_tac (!claset addEs [equalityCE]) 1);
+by (best_tac (claset() addEs [equalityCE]) 1);
 qed"ext2_is_not_int1";
 
 val ext1_ext2_is_not_act2 = ext1_is_not_int2 RS int_and_ext_is_act;
--- a/src/HOL/IOA/Solve.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/IOA/Solve.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -14,8 +14,8 @@
   "!!f. [| IOA(C); IOA(A); externals(asig_of(C)) = externals(asig_of(A)); \
 \          is_weak_pmap f C A |] ==> traces(C) <= traces(A)";
 
-  by (simp_tac(!simpset addsimps [has_trace_def])1);
-  by (safe_tac (!claset));
+  by (simp_tac(simpset() addsimps [has_trace_def])1);
+  by (safe_tac (claset()));
 
   (* choose same trace, therefore same NF *)
   by (res_inst_tac[("x","mk_trace  C (fst ex)")] exI 1);
@@ -25,22 +25,22 @@
   by (res_inst_tac[("x","(mk_trace A (fst ex),%i. f(snd ex i))")] bexI 1);
 
   (* Traces coincide *)
-  by (asm_simp_tac (!simpset addsimps [mk_trace_def,filter_oseq_idemp])1);
+  by (asm_simp_tac (simpset() addsimps [mk_trace_def,filter_oseq_idemp])1);
 
   (* Use lemma *)
   by (forward_tac [states_of_exec_reachable] 1);
 
   (* Now show that it's an execution *)
-  by (asm_full_simp_tac(!simpset addsimps [executions_def]) 1);
-  by (safe_tac (!claset));
+  by (asm_full_simp_tac(simpset() addsimps [executions_def]) 1);
+  by (safe_tac (claset()));
 
   (* Start states map to start states *)
   by (dtac bspec 1);
   by (atac 1);
 
   (* Show that it's an execution fragment *)
-  by (asm_full_simp_tac (!simpset addsimps [is_execution_fragment_def])1);
-  by (safe_tac (!claset));
+  by (asm_full_simp_tac (simpset() addsimps [is_execution_fragment_def])1);
+  by (safe_tac (claset()));
 
   by (eres_inst_tac [("x","snd ex n")] allE 1);
   by (eres_inst_tac [("x","snd ex (Suc n)")] allE 1);
@@ -51,7 +51,7 @@
 (* Lemmata *)
 
 val prems = goal HOL.thy "(P ==> Q-->R) ==> P&Q --> R";
-  by(fast_tac (!claset addDs prems) 1);
+  by(fast_tac (claset() addDs prems) 1);
 val imp_conj_lemma = result();
 
 
@@ -60,12 +60,12 @@
 \  (a:externals(asig_of(A1)) & a:externals(asig_of(A2)) |  \
 \  a:externals(asig_of(A1)) & a~:externals(asig_of(A2)) |  \
 \  a~:externals(asig_of(A1)) & a:externals(asig_of(A2)))";
-by (asm_full_simp_tac (!simpset addsimps [externals_def,asig_of_par,asig_comp_def,asig_inputs_def,asig_outputs_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [externals_def,asig_of_par,asig_comp_def,asig_inputs_def,asig_outputs_def]) 1);
  by (Fast_tac 1);
 val externals_of_par_extra = result(); 
 
 goal Solve.thy "!!s.[| reachable (C1||C2) s |] ==> reachable C1 (fst s)";
-by (asm_full_simp_tac (!simpset addsimps [reachable_def]) 1); 
+by (asm_full_simp_tac (simpset() addsimps [reachable_def]) 1); 
 by (etac bexE 1);
 by (res_inst_tac [("x",
    "(filter_oseq (%a. a:actions(asig_of(C1))) \
@@ -76,7 +76,7 @@
  by (Fast_tac 1);
 (* projected execution is indeed an execution *)
 by (asm_full_simp_tac
-      (!simpset addsimps [executions_def,is_execution_fragment_def,
+      (simpset() addsimps [executions_def,is_execution_fragment_def,
                           par_def,starts_of_def,trans_of_def,filter_oseq_def]
                 addsplits [expand_if,split_option_case]) 1);
 qed"comp1_reachable";
@@ -85,7 +85,7 @@
 (* Exact copy of proof of comp1_reachable for the second 
    component of a parallel composition.     *)
 goal Solve.thy "!!s.[| reachable (C1||C2) s|] ==> reachable C2 (snd s)";
-by (asm_full_simp_tac (!simpset addsimps [reachable_def]) 1); 
+by (asm_full_simp_tac (simpset() addsimps [reachable_def]) 1); 
 by (etac bexE 1);
 by (res_inst_tac [("x",
    "(filter_oseq (%a. a:actions(asig_of(C2)))\
@@ -96,7 +96,7 @@
  by (Fast_tac 1);
 (* projected execution is indeed an execution *)
 by (asm_full_simp_tac
-      (!simpset addsimps [executions_def,is_execution_fragment_def,
+      (simpset() addsimps [executions_def,is_execution_fragment_def,
                           par_def,starts_of_def,trans_of_def,filter_oseq_def]
                 addsplits [expand_if,split_option_case]) 1);
 qed"comp2_reachable";
@@ -112,27 +112,27 @@
 \  ==> is_weak_pmap (%p.(f(fst(p)),g(snd(p)))) (C1||C2) (A1||A2)";
  by (rtac conjI 1);
 (* start_states *)
- by (asm_full_simp_tac (!simpset addsimps [par_def, starts_of_def]) 1);
+ by (asm_full_simp_tac (simpset() addsimps [par_def, starts_of_def]) 1);
 (* transitions *)
 by (REPEAT (rtac allI 1));
 by (rtac imp_conj_lemma 1);
 by (REPEAT(etac conjE 1));
-by (simp_tac (!simpset addsimps [externals_of_par_extra]) 1);
-by (simp_tac (!simpset addsimps [par_def]) 1);
-by (asm_full_simp_tac (!simpset addsimps [trans_of_def]) 1);
+by (simp_tac (simpset() addsimps [externals_of_par_extra]) 1);
+by (simp_tac (simpset() addsimps [par_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [trans_of_def]) 1);
 by (rtac (expand_if RS ssubst) 1);
 by (rtac conjI 1);
 by (rtac impI 1); 
 by (etac disjE 1);
 (* case 1      a:e(A1) | a:e(A2) *)
-by (asm_full_simp_tac (!simpset addsimps [comp1_reachable,comp2_reachable,
+by (asm_full_simp_tac (simpset() addsimps [comp1_reachable,comp2_reachable,
                                     ext_is_act]) 1);
 by (etac disjE 1);
 (* case 2      a:e(A1) | a~:e(A2) *)
-by (asm_full_simp_tac (!simpset addsimps [comp1_reachable,comp2_reachable,
+by (asm_full_simp_tac (simpset() addsimps [comp1_reachable,comp2_reachable,
              ext_is_act,ext1_ext2_is_not_act2]) 1);
 (* case 3      a:~e(A1) | a:e(A2) *)
-by (asm_full_simp_tac (!simpset addsimps [comp1_reachable,comp2_reachable,
+by (asm_full_simp_tac (simpset() addsimps [comp1_reachable,comp2_reachable,
              ext_is_act,ext1_ext2_is_not_act1]) 1);
 (* case 4      a:~e(A1) | a~:e(A2) *)
 by (rtac impI 1);
@@ -140,16 +140,16 @@
 (* delete auxiliary subgoal *)
 by (Asm_full_simp_tac 2);
 by (Fast_tac 2);
-by (simp_tac (!simpset addsimps [conj_disj_distribR] addcongs [conj_cong]
+by (simp_tac (simpset() addsimps [conj_disj_distribR] addcongs [conj_cong]
                  addsplits [expand_if]) 1);
 by(REPEAT((resolve_tac [conjI,impI] 1 ORELSE etac conjE 1) THEN
-        asm_full_simp_tac(!simpset addsimps[comp1_reachable,
+        asm_full_simp_tac(simpset() addsimps[comp1_reachable,
                                       comp2_reachable])1));
 qed"fxg_is_weak_pmap_of_product_IOA";
 
 
 goal Solve.thy "!!s.[| reachable (rename C g) s |] ==> reachable C s";
-by (asm_full_simp_tac (!simpset addsimps [reachable_def]) 1); 
+by (asm_full_simp_tac (simpset() addsimps [reachable_def]) 1); 
 by (etac bexE 1);
 by (res_inst_tac [("x",
    "((%i. case (fst ex i) \
@@ -158,23 +158,23 @@
 by (Simp_tac 1);
 (* execution is indeed an execution of C *)
 by (asm_full_simp_tac
-      (!simpset addsimps [executions_def,is_execution_fragment_def,
+      (simpset() addsimps [executions_def,is_execution_fragment_def,
                           par_def,starts_of_def,trans_of_def,rename_def]
                 addsplits [split_option_case]) 1);
-by (best_tac (!claset addSDs [spec] addDs [sym] addss (!simpset)) 1);
+by (best_tac (claset() addSDs [spec] addDs [sym] addss (simpset())) 1);
 qed"reachable_rename_ioa";
 
 
 goal Solve.thy "!!f.[| is_weak_pmap f C A |]\
 \                      ==> (is_weak_pmap f (rename C g) (rename A g))";
-by (asm_full_simp_tac (!simpset addsimps [is_weak_pmap_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [is_weak_pmap_def]) 1);
 by (rtac conjI 1);
-by (asm_full_simp_tac (!simpset addsimps [rename_def,starts_of_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [rename_def,starts_of_def]) 1);
 by (REPEAT (rtac allI 1));
 by (rtac imp_conj_lemma 1);
-by (simp_tac (!simpset addsimps [rename_def]) 1);
-by (asm_full_simp_tac (!simpset addsimps [externals_def,asig_inputs_def,asig_outputs_def,asig_of_def,trans_of_def]) 1);
-by (safe_tac (!claset));
+by (simp_tac (simpset() addsimps [rename_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [externals_def,asig_inputs_def,asig_outputs_def,asig_of_def,trans_of_def]) 1);
+by (safe_tac (claset()));
 by (rtac (expand_if RS ssubst) 1);
  by (rtac conjI 1);
  by (rtac impI 1);
@@ -200,7 +200,7 @@
 by (assume_tac 1);
 by (Asm_full_simp_tac 1);
 (* x is internal *)
-by (simp_tac (!simpset addsimps [de_Morgan_disj, de_Morgan_conj, not_ex] 
+by (simp_tac (simpset() addsimps [de_Morgan_disj, de_Morgan_conj, not_ex] 
 	               addcongs [conj_cong]) 1);
 by (rtac impI 1);
 by (etac conjE 1);
--- a/src/HOL/Induct/Acc.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/Acc.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -14,7 +14,7 @@
 (*The intended introduction rule*)
 val prems = goal Acc.thy
     "[| !!b. (b,a):r ==> b: acc(r) |] ==> a: acc(r)";
-by (fast_tac (!claset addIs (prems @ 
+by (fast_tac (claset() addIs (prems @ 
                             map (rewrite_rule [pred_def]) acc.intrs)) 1);
 qed "accI";
 
@@ -54,7 +54,7 @@
 val [major] = goal Acc.thy "wf(r) ==> r <= (acc r) Times (acc r)";
 by (rtac subsetI 1);
 by (res_inst_tac [("p", "x")] PairE 1);
-by (fast_tac (!claset addSIs [SigmaI,
+by (fast_tac (claset() addSIs [SigmaI,
                              major RS acc_wfD_lemma RS spec RS mp]) 1);
 qed "acc_wfD";
 
--- a/src/HOL/Induct/Com.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/Com.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -30,7 +30,7 @@
 
 (*Command execution is functional (deterministic) provided evaluation is*)
 goal thy "!!x. Function ev ==> Function(exec ev)";
-by (simp_tac (!simpset addsimps [Function_def, Unique_def]) 1);
+by (simp_tac (simpset() addsimps [Function_def, Unique_def]) 1);
 by (REPEAT (rtac allI 1));
 by (rtac impI 1);
 by (etac exec.induct 1);
@@ -39,7 +39,7 @@
 by (rewrite_goals_tac [Function_def, Unique_def]);
 by (thin_tac "(?c,s1) -[ev]-> s2" 5);
 (*SLOW (23s) due to proof reconstruction; needs 60s if thin_tac is omitted*)
-by (REPEAT (blast_tac (!claset addEs [exec_WHILE_case]) 1));
+by (REPEAT (blast_tac (claset() addEs [exec_WHILE_case]) 1));
 qed "Function_exec";
 
 
@@ -53,7 +53,7 @@
 
 goalw thy [assign_def] "s[s x/x] = s";
 by (rtac ext 1);
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 qed "assign_triv";
 
 Addsimps [assign_same, assign_different, assign_triv];
--- a/src/HOL/Induct/Comb.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/Comb.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -67,12 +67,12 @@
 
 goal Comb.thy "!!x z. x ---> y ==> x#z ---> y#z";
 by (etac rtrancl_induct 1);
-by (ALLGOALS (blast_tac (!claset addIs [r_into_rtrancl, rtrancl_trans])));
+by (ALLGOALS (blast_tac (claset() addIs [r_into_rtrancl, rtrancl_trans])));
 qed "Ap_reduce1";
 
 goal Comb.thy "!!x z. x ---> y ==> z#x ---> z#y";
 by (etac rtrancl_induct 1);
-by (ALLGOALS (blast_tac (!claset addIs [r_into_rtrancl, rtrancl_trans])));
+by (ALLGOALS (blast_tac (claset() addIs [r_into_rtrancl, rtrancl_trans])));
 qed "Ap_reduce2";
 
 (** Counterexample to the diamond property for -1-> **)
@@ -90,7 +90,7 @@
 qed "KIII_contract3";
 
 goalw Comb.thy [diamond_def] "~ diamond(contract)";
-by (blast_tac (!claset addIs [KIII_contract1,KIII_contract2,KIII_contract3]) 1);
+by (blast_tac (claset() addIs [KIII_contract1,KIII_contract2,KIII_contract3]) 1);
 qed "not_diamond_contract";
 
 
@@ -169,7 +169,7 @@
 qed "reduce_eq_parreduce";
 
 goal Comb.thy "diamond(contract^*)";
-by (simp_tac (!simpset addsimps [reduce_eq_parreduce, diamond_rtrancl, 
+by (simp_tac (simpset() addsimps [reduce_eq_parreduce, diamond_rtrancl, 
                                  diamond_parcontract]) 1);
 qed "diamond_reduce";
 
--- a/src/HOL/Induct/Exp.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/Exp.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -53,11 +53,11 @@
 \        ==> P (VALOF c RESULTIS e) s n s1                       \
 \  |] ==> P e s n s'";
 by (rtac (major RS eval.induct) 1);
-by (blast_tac (!claset addIs prems) 1);
-by (blast_tac (!claset addIs prems) 1);
-by (blast_tac (!claset addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
 by (forward_tac [impOfSubs (Int_lower1 RS exec_mono)] 1);
-by (fast_tac (!claset addIs prems addss (!simpset addsimps [split_lemma])) 1);
+by (fast_tac (claset() addIs prems addss (simpset() addsimps [split_lemma])) 1);
 qed "eval_induct";
 
 
@@ -78,7 +78,7 @@
 by (Blast_tac 1);
 by (Blast_tac 1);
 by (Blast_tac 1);
-by (blast_tac (!claset addEs [exec_WHILE_case]) 1);
+by (blast_tac (claset() addEs [exec_WHILE_case]) 1);
 by (thin_tac "(?c,s2) -[?ev]-> s3" 1);
 by (Clarify_tac 1);
 by (etac exec_WHILE_case 1);
@@ -88,12 +88,12 @@
 
 (*Expression evaluation is functional, or deterministic*)
 goal thy "Function eval";
-by (simp_tac (!simpset addsimps [Function_def]) 1);
+by (simp_tac (simpset() addsimps [Function_def]) 1);
 by (REPEAT (rtac allI 1));
 by (rtac impI 1);
 by (etac eval_induct 1);
 by (dtac com_Unique 4);
-by (ALLGOALS (full_simp_tac (!simpset addsimps [Unique_def])));
+by (ALLGOALS (full_simp_tac (simpset() addsimps [Unique_def])));
 by (ALLGOALS Blast_tac);
 qed "Function_eval";
 
@@ -136,7 +136,7 @@
 
 goal thy "((IF e THEN c;;(WHILE e DO c) ELSE SKIP, s) -[eval]-> t)  =  \
 \         ((WHILE e DO c, s) -[eval]-> t)";
-by (blast_tac (!claset addIs [while_if1, while_if2]) 1);
+by (blast_tac (claset() addIs [while_if1, while_if2]) 1);
 qed "while_if";
 
 
@@ -164,7 +164,7 @@
 
 goal thy "(((IF e THEN c1 ELSE c2);;c, s) -[eval]-> t)  =  \
 \         ((IF e THEN (c1;;c) ELSE (c2;;c), s) -[eval]-> t)";
-by (blast_tac (!claset addIs [if_semi1, if_semi2]) 1);
+by (blast_tac (claset() addIs [if_semi1, if_semi2]) 1);
 qed "if_semi";
 
 
@@ -193,7 +193,7 @@
 
 goal thy "((VALOF c1 RESULTIS (VALOF c2 RESULTIS e), s) -|-> (v,s'))  =  \
 \         ((VALOF c1;;c2 RESULTIS e, s) -|-> (v,s'))";
-by (blast_tac (!claset addIs [valof_valof1, valof_valof2]) 1);
+by (blast_tac (claset() addIs [valof_valof1, valof_valof2]) 1);
 qed "valof_valof";
 
 
@@ -212,7 +212,7 @@
 qed "valof_skip2";
 
 goal thy "((VALOF SKIP RESULTIS e, s) -|-> (v,s'))  =  ((e, s) -|-> (v,s'))";
-by (blast_tac (!claset addIs [valof_skip1, valof_skip2]) 1);
+by (blast_tac (claset() addIs [valof_skip1, valof_skip2]) 1);
 qed "valof_skip";
 
 
--- a/src/HOL/Induct/LList.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/LList.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -10,7 +10,7 @@
 
 (** Simplification **)
 
-simpset := !simpset addsplits [expand_split, expand_sum_case];
+simpset_ref() := simpset() addsplits [expand_split, expand_sum_case];
 
 (*For adding _eqI rules to a simpset; we must remove Pair_eq because
   it may turn an instance of reflexivity into a conjunction!*)
@@ -27,7 +27,7 @@
 
 goal LList.thy "llist(A) = {Numb(0)} <+> (A <*> llist(A))";
 let val rew = rewrite_rule [NIL_def, CONS_def] in  
-by (fast_tac (!claset addSIs (map rew llist.intrs)
+by (fast_tac (claset() addSIs (map rew llist.intrs)
                       addEs [rew llist.elim]) 1)
 end;
 qed "llist_unfold";
@@ -63,16 +63,16 @@
 
 (*A continuity result?*)
 goalw LList.thy [CONS_def] "CONS M (UN x. f(x)) = (UN x. CONS M (f x))";
-by (simp_tac (!simpset addsimps [In1_UN1, Scons_UN1_y]) 1);
+by (simp_tac (simpset() addsimps [In1_UN1, Scons_UN1_y]) 1);
 qed "CONS_UN1";
 
 (*UNUSED; obsolete?
 goal Prod.thy "split p (%x y. UN z. f x y z) = (UN z. split p (%x y. f x y z))";
-by (simp_tac (!simpset addsplits [expand_split]) 1);
+by (simp_tac (simpset() addsplits [expand_split]) 1);
 qed "split_UN1";
 
 goal Sum.thy "sum_case s f (%y. UN z. g y z) = (UN z. sum_case s f (%y. g y z))";
-by (simp_tac (!simpset addsplits [expand_sum_case]) 1);
+by (simp_tac (simpset() addsplits [expand_sum_case]) 1);
 qed "sum_case2_UN1";
 *)
 
@@ -98,8 +98,8 @@
 goalw LList.thy [LList_corec_def]
     "sum_case (%u. NIL) (split(%z w. CONS z (LList_corec w f))) (f a) <= \
 \    LList_corec a f";
-by (simp_tac (!simpset addsimps [CONS_UN1]) 1);
-by (safe_tac (!claset));
+by (simp_tac (simpset() addsimps [CONS_UN1]) 1);
+by (safe_tac (claset()));
 by (ALLGOALS (res_inst_tac [("x","Suc(?k)")] UN1_I THEN' Asm_simp_tac));
 qed "LList_corec_subset2";
 
@@ -124,9 +124,9 @@
 goal LList.thy "LList_corec a f : llist({u. True})";
 by (res_inst_tac [("X", "range(%x. LList_corec x ?g)")] llist_coinduct 1);
 by (rtac rangeI 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (stac LList_corec 1);
-by (simp_tac (!simpset addsimps [list_Fun_NIL_I, list_Fun_CONS_I, CollectI]
+by (simp_tac (simpset() addsimps [list_Fun_NIL_I, list_Fun_CONS_I, CollectI]
                        |> add_eqI) 1);
 qed "LList_corec_type";
 
@@ -136,10 +136,10 @@
 \   llist(range Leaf)";
 by (res_inst_tac [("X", "range(%x. LList_corec x ?g)")] llist_coinduct 1);
 by (rtac rangeI 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (stac LList_corec 1);
-by (asm_simp_tac (!simpset addsimps [list_Fun_NIL_I]) 1);
-by (fast_tac (!claset addSIs [list_Fun_CONS_I]) 1);
+by (asm_simp_tac (simpset() addsimps [list_Fun_NIL_I]) 1);
+by (fast_tac (claset() addSIs [list_Fun_CONS_I]) 1);
 qed "LList_corec_type2";
 
 
@@ -148,22 +148,22 @@
 (*This theorem is actually used, unlike the many similar ones in ZF*)
 goal LList.thy "LListD(r) = diag({Numb(0)}) <++> (r <**> LListD(r))";
 let val rew = rewrite_rule [NIL_def, CONS_def] in  
-by (fast_tac (!claset addSIs (map rew LListD.intrs)
+by (fast_tac (claset() addSIs (map rew LListD.intrs)
                       addEs [rew LListD.elim]) 1)
 end;
 qed "LListD_unfold";
 
 goal LList.thy "!M N. (M,N) : LListD(diag(A)) --> ntrunc k M = ntrunc k N";
 by (res_inst_tac [("n", "k")] less_induct 1);
-by (safe_tac ((claset_of "Fun") delrules [equalityI]));
+by (safe_tac ((claset_of Fun.thy) delrules [equalityI]));
 by (etac LListD.elim 1);
-by (safe_tac (claset_of "Prod" delrules [equalityI] addSEs [diagE]));
+by (safe_tac (claset_of Prod.thy delrules [equalityI] addSEs [diagE]));
 by (res_inst_tac [("n", "n")] natE 1);
-by (asm_simp_tac (!simpset addsimps [ntrunc_0]) 1);
+by (asm_simp_tac (simpset() addsimps [ntrunc_0]) 1);
 by (rename_tac "n'" 1);
 by (res_inst_tac [("n", "n'")] natE 1);
-by (asm_simp_tac (!simpset addsimps [CONS_def, ntrunc_one_In1]) 1);
-by (asm_simp_tac (!simpset addsimps [CONS_def, ntrunc_In1, ntrunc_Scons, less_Suc_eq]) 1);
+by (asm_simp_tac (simpset() addsimps [CONS_def, ntrunc_one_In1]) 1);
+by (asm_simp_tac (simpset() addsimps [CONS_def, ntrunc_In1, ntrunc_Scons, less_Suc_eq]) 1);
 qed "LListD_implies_ntrunc_equality";
 
 (*The domain of the LListD relation*)
@@ -180,7 +180,7 @@
 goal LList.thy "LListD(diag(A)) <= diag(llist(A))";
 by (rtac subsetI 1);
 by (res_inst_tac [("p","x")] PairE 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rtac diag_eqI 1);
 by (rtac (LListD_implies_ntrunc_equality RS spec RS spec RS mp RS 
           ntrunc_equality) 1);
@@ -229,7 +229,7 @@
 by (etac ssubst 1);
 by (eresolve_tac [llist.elim] 1);
 by (ALLGOALS
-    (asm_simp_tac (!simpset addsimps [diagI, LListD_Fun_NIL_I,
+    (asm_simp_tac (simpset() addsimps [diagI, LListD_Fun_NIL_I,
                                       LListD_Fun_CONS_I])));
 qed "diag_subset_LListD";
 
@@ -242,7 +242,7 @@
     "!!M N. M: llist(A) ==> (M,M) : LListD_Fun (diag A) (X Un diag(llist(A)))";
 by (rtac (LListD_eq_diag RS subst) 1);
 by (rtac LListD_Fun_LListD_I 1);
-by (asm_simp_tac (!simpset addsimps [LListD_eq_diag, diagI]) 1);
+by (asm_simp_tac (simpset() addsimps [LListD_eq_diag, diagI]) 1);
 qed "LListD_Fun_diag_I";
 
 
@@ -254,8 +254,8 @@
 \         |] ==>  M=N";
 by (rtac (LListD_subset_diag RS subsetD RS diagE) 1);
 by (etac LListD_coinduct 1);
-by (asm_simp_tac (!simpset addsimps [LListD_eq_diag]) 1);
-by (safe_tac (!claset));
+by (asm_simp_tac (simpset() addsimps [LListD_eq_diag]) 1);
+by (safe_tac (claset()));
 qed "LList_equalityI";
 
 
@@ -271,10 +271,10 @@
 by (res_inst_tac [("A", "{u. True}"),
                   ("r", "range(%u. (h1(u),h2(u)))")] LList_equalityI 1);
 by (rtac rangeI 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (stac prem1 1);
 by (stac prem2 1);
-by (simp_tac (!simpset addsimps [LListD_Fun_NIL_I,
+by (simp_tac (simpset() addsimps [LListD_Fun_NIL_I,
                                  CollectI RS LListD_Fun_CONS_I]
                        |> add_eqI) 1);
 qed "LList_corec_unique";
@@ -294,7 +294,7 @@
 
 goalw LList.thy [CONS_def]
     "ntrunc (Suc(Suc(k))) (CONS M N) = CONS (ntrunc k M) (ntrunc k N)";
-by (simp_tac (!simpset addsimps [ntrunc_Scons,ntrunc_In1]) 1);
+by (simp_tac (simpset() addsimps [ntrunc_Scons,ntrunc_In1]) 1);
 qed "ntrunc_CONS";
 
 val [prem1,prem2] = goal LList.thy
@@ -310,12 +310,12 @@
 by (rename_tac "y" 1);
 by (stac prem1 1);
 by (stac prem2 1);
-by (simp_tac (!simpset addsplits [expand_sum_case]) 1);
+by (simp_tac (simpset() addsplits [expand_sum_case]) 1);
 by (strip_tac 1);
 by (res_inst_tac [("n", "n")] natE 1);
 by (rename_tac "m" 2);
 by (res_inst_tac [("n", "m")] natE 2);
-by (ALLGOALS(asm_simp_tac(!simpset addsimps
+by (ALLGOALS(asm_simp_tac(simpset() addsimps
             [ntrunc_0,ntrunc_one_CONS,ntrunc_CONS, less_Suc_eq])));
 result();
 
@@ -333,7 +333,7 @@
   The containing set is simply the singleton {Lconst(M)}. *)
 goal LList.thy "!!M A. M:A ==> Lconst(M): llist(A)";
 by (rtac (singletonI RS llist_coinduct) 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (res_inst_tac [("P", "%u. u: ?A")] (Lconst RS ssubst) 1);
 by (REPEAT (ares_tac [list_Fun_CONS_I, singletonI, UnI1] 1));
 qed "Lconst_type";
@@ -392,7 +392,7 @@
 (** Injectiveness of CONS and LCons **)
 
 goalw LList.thy [CONS_def] "(CONS M N=CONS M' N') = (M=M' & N=N')";
-by (fast_tac (!claset addSEs [Scons_inject]) 1);
+by (fast_tac (claset() addSEs [Scons_inject]) 1);
 qed "CONS_CONS_eq2";
 
 bind_thm ("CONS_inject", (CONS_CONS_eq RS iffD1 RS conjE));
@@ -460,9 +460,9 @@
 val [major,minor] = goal LList.thy
     "[| M: llist(A);  !!x. x:A ==> f(x):B |] ==> Lmap f M: llist(B)";
 by (rtac (major RS imageI RS llist_coinduct) 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (etac llist.elim 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [Lmap_NIL,Lmap_CONS])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [Lmap_NIL,Lmap_CONS])));
 by (REPEAT (ares_tac [list_Fun_NIL_I, list_Fun_CONS_I, 
                       minor, imageI, UnI1] 1));
 qed "Lmap_type";
@@ -478,18 +478,18 @@
 val [prem] = goalw LList.thy [o_def]
     "M: llist(A) ==> Lmap (f o g) M = Lmap f (Lmap g M)";
 by (rtac (prem RS imageI RS LList_equalityI) 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (etac llist.elim 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [Lmap_NIL,Lmap_CONS])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [Lmap_NIL,Lmap_CONS])));
 by (REPEAT (ares_tac [LListD_Fun_NIL_I, imageI, UnI1,
                       rangeI RS LListD_Fun_CONS_I] 1));
 qed "Lmap_compose";
 
 val [prem] = goal LList.thy "M: llist(A) ==> Lmap (%x. x) M = M";
 by (rtac (prem RS imageI RS LList_equalityI) 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (etac llist.elim 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [Lmap_NIL,Lmap_CONS])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [Lmap_NIL,Lmap_CONS])));
 by (REPEAT (ares_tac [LListD_Fun_NIL_I, imageI RS UnI1,
                       rangeI RS LListD_Fun_CONS_I] 1));
 qed "Lmap_ident";
@@ -536,12 +536,12 @@
 by (res_inst_tac
     [("X", "UN u:llist(A). UN v: llist(A). {Lappend u v}")] llist_coinduct 1);
 by (Fast_tac 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (eres_inst_tac [("a", "u")] llist.elim 1);
 by (eres_inst_tac [("a", "v")] llist.elim 1);
 by (ALLGOALS
     (Asm_simp_tac THEN'
-     fast_tac (!claset addSIs [llist.NIL_I, list_Fun_NIL_I, list_Fun_CONS_I])));
+     fast_tac (claset() addSIs [llist.NIL_I, list_Fun_NIL_I, list_Fun_CONS_I])));
 qed "Lappend_type";
 
 (*strong co-induction: bisimulation and case analysis on one variable*)
@@ -552,9 +552,9 @@
 by (rtac subsetI 1);
 by (etac imageE 1);
 by (eres_inst_tac [("a", "u")] llist.elim 1);
-by (asm_simp_tac (!simpset addsimps [Lappend_NIL, list_Fun_llist_I]) 1);
+by (asm_simp_tac (simpset() addsimps [Lappend_NIL, list_Fun_llist_I]) 1);
 by (Asm_simp_tac 1);
-by (fast_tac (!claset addSIs [list_Fun_CONS_I]) 1);
+by (fast_tac (claset() addSIs [list_Fun_CONS_I]) 1);
 qed "Lappend_type";
 
 (**** Lazy lists as the type 'a llist -- strongly typed versions of above ****)
@@ -583,7 +583,7 @@
 by (assume_tac 1);
 by (etac rangeE 1);
 by (rtac (inj_Rep_llist RS injD RS prem2) 1);
-by (asm_simp_tac (!simpset delsimps [CONS_CONS_eq] addsimps [Rep_llist_LCons]) 1);
+by (asm_simp_tac (simpset() delsimps [CONS_CONS_eq] addsimps [Rep_llist_LCons]) 1);
 by (etac (Abs_llist_inverse RS ssubst) 1);
 by (rtac refl 1);
 qed "llistE";
@@ -595,11 +595,11 @@
 \                           (split(%z w. LCons z (llist_corec w f))) (f a)";
 by (stac LList_corec 1);
 by (res_inst_tac [("s","f(a)")] sumE 1);
-by (asm_simp_tac (!simpset addsimps [LList_corec_type2]) 1);
+by (asm_simp_tac (simpset() addsimps [LList_corec_type2]) 1);
 by (res_inst_tac [("p","y")] PairE 1);
-by (asm_simp_tac (!simpset addsimps [LList_corec_type2]) 1);
+by (asm_simp_tac (simpset() addsimps [LList_corec_type2]) 1);
 (*FIXME: correct case splits usd to be found automatically:
-by (ASM_SIMP_TAC(!simpset addsimps [LList_corec_type2]) 1);*)
+by (ASM_SIMP_TAC(simpset() addsimps [LList_corec_type2]) 1);*)
 qed "llist_corec";
 
 (*definitional version of same*)
@@ -618,31 +618,31 @@
     "!!r A. r <= (llist A) Times (llist A) ==> \
 \           LListD_Fun (diag A) r <= (llist A) Times (llist A)";
 by (stac llist_unfold 1);
-by (simp_tac (!simpset addsimps [NIL_def, CONS_def]) 1);
+by (simp_tac (simpset() addsimps [NIL_def, CONS_def]) 1);
 by (Fast_tac 1);
 qed "LListD_Fun_subset_Sigma_llist";
 
 goal LList.thy
     "prod_fun Rep_llist Rep_llist `` r <= \
 \    (llist(range Leaf)) Times (llist(range Leaf))";
-by (fast_tac (!claset addIs [Rep_llist]) 1);
+by (fast_tac (claset() addIs [Rep_llist]) 1);
 qed "subset_Sigma_llist";
 
 val [prem] = goal LList.thy
     "r <= (llist(range Leaf)) Times (llist(range Leaf)) ==> \
 \    prod_fun (Rep_llist o Abs_llist) (Rep_llist o Abs_llist) `` r <= r";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rtac (prem RS subsetD RS SigmaE2) 1);
 by (assume_tac 1);
-by (asm_simp_tac (!simpset addsimps [o_def,prod_fun,Abs_llist_inverse]) 1);
+by (asm_simp_tac (simpset() addsimps [o_def,prod_fun,Abs_llist_inverse]) 1);
 qed "prod_fun_lemma";
 
 goal LList.thy
     "prod_fun Rep_llist  Rep_llist `` range(%x. (x, x)) = \
 \    diag(llist(range Leaf))";
 by (rtac equalityI 1);
-by (fast_tac (!claset addIs [Rep_llist]) 1);
-by (fast_tac (!claset addSEs [Abs_llist_inverse RS subst]) 1);
+by (fast_tac (claset() addIs [Rep_llist]) 1);
+by (fast_tac (claset() addSEs [Abs_llist_inverse RS subst]) 1);
 qed "prod_fun_range_eq_diag";
 
 (*Surprisingly hard to prove.  Used with lfilter*)
@@ -650,8 +650,8 @@
     "!!A B. A<=B ==> llistD_Fun A <= llistD_Fun B";
 by (Auto_tac());
 by (rtac image_eqI 1);
-by (fast_tac (!claset addss (!simpset)) 1);
-by (blast_tac (!claset addIs [impOfSubs LListD_Fun_mono]) 1);
+by (fast_tac (claset() addss (simpset())) 1);
+by (blast_tac (claset() addIs [impOfSubs LListD_Fun_mono]) 1);
 qed "llistD_Fun_mono";
 
 (** To show two llists are equal, exhibit a bisimulation! 
@@ -757,7 +757,7 @@
 by (res_inst_tac [("r", "range(%u.(lmap f (iterates f u),iterates f (f u)))")] 
     llist_equalityI 1);
 by (rtac rangeI 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (res_inst_tac [("x1", "f(u)")] (iterates RS ssubst) 1);
 by (res_inst_tac [("x1", "u")] (iterates RS ssubst) 1);
 by (Simp_tac 1);
@@ -797,7 +797,7 @@
 \                    nat_rec (iterates f u) (%m y. lmap f y) n))")] 
     llist_equalityI 1);
 by (REPEAT (resolve_tac [UN1_I, range_eqI, Pair_cong, nat_rec_0 RS sym] 1));
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (stac iterates 1);
 by (stac prem 1);
 by (stac fun_power_lmap 1);
@@ -849,7 +849,7 @@
 by (res_inst_tac [("r", "range(%u.(lappend (iterates f u) N,iterates f u))")] 
     llist_equalityI 1);
 by (rtac rangeI 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (stac iterates 1);
 by (Simp_tac 1);
 qed "lappend_iterates";
@@ -864,7 +864,7 @@
     llist_equalityI 1);
 by (rtac UN1_I 1);
 by (rtac rangeI 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (res_inst_tac [("l", "l")] llistE 1);
 by (res_inst_tac [("l", "n")] llistE 1);
 by (ALLGOALS Asm_simp_tac);
--- a/src/HOL/Induct/Mutil.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/Mutil.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -16,8 +16,8 @@
 \              u: tiling A --> t <= Compl u --> t Un u : tiling A";
 by (etac tiling.induct 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsimps [Un_assoc]) 1);
-by (blast_tac (!claset addIs tiling.intrs) 1);
+by (simp_tac (simpset() addsimps [Un_assoc]) 1);
+by (blast_tac (claset() addIs tiling.intrs) 1);
 qed_spec_mp "tiling_UnI";
 
 
@@ -35,33 +35,33 @@
 
 goalw thy [below_def]
     "below(Suc n) Times B = ({n} Times B) Un ((below n) Times B)";
-by (simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+by (simp_tac (simpset() addsimps [less_Suc_eq]) 1);
 by (Blast_tac 1);
 qed "Sigma_Suc1";
 
 goalw thy [below_def]
     "A Times below(Suc n) = (A Times {n}) Un (A Times (below n))";
-by (simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+by (simp_tac (simpset() addsimps [less_Suc_eq]) 1);
 by (Blast_tac 1);
 qed "Sigma_Suc2";
 
 goal thy "{i} Times below(n+n) : tiling domino";
 by (nat_ind_tac "n" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [Un_assoc RS sym, Sigma_Suc2])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [Un_assoc RS sym, Sigma_Suc2])));
 by (resolve_tac tiling.intrs 1);
 by (assume_tac 2);
 by (subgoal_tac    (*seems the easiest way of turning one to the other*)
     "({i} Times {Suc(n+n)}) Un ({i} Times {n+n}) = \
 \    {(i, n+n), (i, Suc(n+n))}" 1);
 by (Blast_tac 2);
-by (asm_simp_tac (!simpset addsimps [domino.horiz]) 1);
+by (asm_simp_tac (simpset() addsimps [domino.horiz]) 1);
 by (Auto_tac());
 qed "dominoes_tile_row";
 
 goal thy "(below m) Times below(n+n) : tiling domino";
 by (nat_ind_tac "m" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [Sigma_Suc1])));
-by (blast_tac (!claset addSIs [tiling_UnI, dominoes_tile_row]
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [Sigma_Suc1])));
+by (blast_tac (claset() addSIs [tiling_UnI, dominoes_tile_row]
                        addSEs [below_less_iff RS iffD1 RS less_irrefl]) 1);
 qed "dominoes_tile_matrix";
 
@@ -94,7 +94,7 @@
 goalw thy [evnodd_def]
     "evnodd (insert (i,j) C) b = \
 \      (if (i+j) mod 2 = b then insert (i,j) (evnodd C b) else evnodd C b)";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Blast_tac 1);
 qed "evnodd_insert";
 
@@ -109,13 +109,13 @@
 by (res_inst_tac [("k1", "i+j")] (mod2_cases RS disjE) 1);
 by (REPEAT_FIRST assume_tac);
 (*Four similar cases: case (i+j) mod 2 = b, 2#-b, ...*)
-by (REPEAT (asm_full_simp_tac (!simpset addsimps [less_Suc_eq, mod_Suc] 
+by (REPEAT (asm_full_simp_tac (simpset() addsimps [less_Suc_eq, mod_Suc] 
                           addsplits [expand_if]) 1
            THEN Blast_tac 1));
 qed "domino_singleton";
 
 goal thy "!!d. d:domino ==> finite d";
-by (blast_tac (!claset addSEs [domino.elim]) 1);
+by (blast_tac (claset() addSEs [domino.elim]) 1);
 qed "domino_finite";
 
 
@@ -124,20 +124,20 @@
 goal thy "!!t. t:tiling domino ==> finite t";
 by (eresolve_tac [tiling.induct] 1);
 by (rtac Finites.emptyI 1);
-by (blast_tac (!claset addSIs [finite_UnI] addIs [domino_finite]) 1);
+by (blast_tac (claset() addSIs [finite_UnI] addIs [domino_finite]) 1);
 qed "tiling_domino_finite";
 
 goal thy "!!t. t: tiling domino ==> card(evnodd t 0) = card(evnodd t 1)";
 by (eresolve_tac [tiling.induct] 1);
-by (simp_tac (!simpset addsimps [evnodd_def]) 1);
+by (simp_tac (simpset() addsimps [evnodd_def]) 1);
 by (res_inst_tac [("b1","0")] (domino_singleton RS exE) 1);
 by (Simp_tac 2 THEN assume_tac 1);
 by (res_inst_tac [("b1","1")] (domino_singleton RS exE) 1);
 by (Simp_tac 2 THEN assume_tac 1);
 by (Clarify_tac 1);
 by (subgoal_tac "ALL p b. p : evnodd a b --> p ~: evnodd ta b" 1);
-by (asm_simp_tac (!simpset addsimps [tiling_domino_finite]) 1);
-by (blast_tac (!claset addSDs [evnodd_subset RS subsetD] addEs [equalityE]) 1);
+by (asm_simp_tac (simpset() addsimps [tiling_domino_finite]) 1);
+by (blast_tac (claset() addSDs [evnodd_subset RS subsetD] addEs [equalityE]) 1);
 qed "tiling_domino_0_1";
 
 goal thy "!!m n. [| t = below(Suc m + Suc m) Times below(Suc n + Suc n);   \
@@ -151,12 +151,12 @@
 (*Requires a small simpset that won't move the Suc applications*)
 by (asm_simp_tac (HOL_ss addsimps [dominoes_tile_matrix]) 2);
 by (subgoal_tac "(m+m)+(n+n) = (m+n)+(m+n)" 1);
-by (asm_simp_tac (!simpset addsimps add_ac) 2);
+by (asm_simp_tac (simpset() addsimps add_ac) 2);
 by (asm_full_simp_tac 
-    (!simpset addsimps [mod_less, tiling_domino_0_1 RS sym]) 1);
+    (simpset() addsimps [mod_less, tiling_domino_0_1 RS sym]) 1);
 by (rtac less_trans 1);
 by (REPEAT
     (rtac card_Diff 1 
-     THEN asm_simp_tac (!simpset addsimps [tiling_domino_finite]) 1 
-     THEN asm_simp_tac (!simpset addsimps [mod_less, evnodd_iff]) 1));
+     THEN asm_simp_tac (simpset() addsimps [tiling_domino_finite]) 1 
+     THEN asm_simp_tac (simpset() addsimps [mod_less, evnodd_iff]) 1));
 qed "mutil_not_tiling";
--- a/src/HOL/Induct/Perm.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/Perm.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -41,7 +41,7 @@
 goal Perm.thy "!!xs. [| xs <~~> ys |] ==> x mem xs --> x mem ys";
 by (etac perm.induct 1);
 by (Fast_tac 4);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 val perm_mem_lemma = result();
 
 bind_thm ("perm_mem", perm_mem_lemma RS mp);
@@ -51,7 +51,7 @@
 (*We can insert the head anywhere in the list*)
 goal Perm.thy "a # xs @ ys <~~> xs @ a # ys";
 by (list.induct_tac "xs" 1);
-by (simp_tac (!simpset addsimps [perm_refl]) 1);
+by (simp_tac (simpset() addsimps [perm_refl]) 1);
 by (Simp_tac 1);
 by (etac ([perm.swap, perm.Cons] MRS perm.trans) 1);
 qed "perm_append_Cons";
@@ -64,7 +64,7 @@
 
 goal Perm.thy "xs@ys <~~> ys@xs";
 by (list.induct_tac "xs" 1);
-by (simp_tac (!simpset addsimps [perm_refl]) 1);
+by (simp_tac (simpset() addsimps [perm_refl]) 1);
 by (Simp_tac 1);
 by (etac ([perm.Cons, perm_append_Cons] MRS perm.trans) 1);
 qed "perm_append_swap";
@@ -73,12 +73,12 @@
 goal Perm.thy "a # xs <~~> xs @ [a]";
 by (rtac perm.trans 1);
 by (rtac perm_append_swap 2);
-by (simp_tac (!simpset addsimps [perm_refl]) 1);
+by (simp_tac (simpset() addsimps [perm_refl]) 1);
 qed "perm_append_single";
 
 goal Perm.thy "rev xs <~~> xs";
 by (list.induct_tac "xs" 1);
-by (simp_tac (!simpset addsimps [perm_refl]) 1);
+by (simp_tac (simpset() addsimps [perm_refl]) 1);
 by (Simp_tac 1);
 by (rtac (perm_append_single RS perm_sym RS perm.trans) 1);
 by (etac perm.Cons 1);
@@ -87,7 +87,7 @@
 goal Perm.thy "!!xs. xs <~~> ys ==> l@xs <~~> l@ys";
 by (list.induct_tac "l" 1);
 by (Simp_tac 1);
-by (asm_simp_tac (!simpset addsimps [perm.Cons]) 1);
+by (asm_simp_tac (simpset() addsimps [perm.Cons]) 1);
 qed "perm_append1";
 
 goal Perm.thy "!!xs. xs <~~> ys ==> xs@l <~~> ys@l";
--- a/src/HOL/Induct/PropLog.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/PropLog.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -18,7 +18,7 @@
 
 (*Rule is called I for Identity Combinator, not for Introduction*)
 goal PropLog.thy "H |- p->p";
-by (best_tac (!claset addIs [thms.K,thms.S,thms.MP]) 1);
+by (best_tac (claset() addIs [thms.K,thms.S,thms.MP]) 1);
 qed "thms_I";
 
 (** Weakening, left and right **)
@@ -35,14 +35,14 @@
 val weaken_left_Un2  =    Un_upper2 RS weaken_left;
 
 goal PropLog.thy "!!H. H |- q ==> H |- p->q";
-by (fast_tac (!claset addIs [thms.K,thms.MP]) 1);
+by (fast_tac (claset() addIs [thms.K,thms.MP]) 1);
 qed "weaken_right";
 
 (*The deduction theorem*)
 goal PropLog.thy "!!H. insert p H |- q  ==>  H |- p->q";
 by (etac thms.induct 1);
 by (ALLGOALS 
-    (fast_tac (!claset addIs [thms_I, thms.H, thms.K, thms.S, thms.DN, 
+    (fast_tac (claset() addIs [thms_I, thms.H, thms.K, thms.S, thms.DN, 
                              thms.S RS thms.MP RS thms.MP, weaken_right])));
 qed "deduction";
 
@@ -77,7 +77,7 @@
 (*Soundness of the rules wrt truth-table semantics*)
 goalw PropLog.thy [sat_def] "!!H. H |- p ==> H |= p";
 by (etac thms.induct 1);
-by (fast_tac (!claset addSDs [eval_imp RS iffD1 RS mp]) 5);
+by (fast_tac (claset() addSDs [eval_imp RS iffD1 RS mp]) 5);
 by (ALLGOALS Asm_simp_tac);
 qed "soundness";
 
@@ -103,8 +103,8 @@
 goal PropLog.thy "hyps p tt |- (if tt[p] then p else p->false)";
 by (rtac (expand_if RS iffD2) 1);
 by (PropLog.pl.induct_tac "p" 1);
-by (ALLGOALS (simp_tac (!simpset addsimps [thms_I, thms.H])));
-by (fast_tac (!claset addIs [weaken_left_Un1, weaken_left_Un2, 
+by (ALLGOALS (simp_tac (simpset() addsimps [thms_I, thms.H])));
+by (fast_tac (claset() addIs [weaken_left_Un1, weaken_left_Un2, 
                            weaken_right, imp_false]
                     addSEs [false_imp]) 1);
 qed "hyps_thms_if";
@@ -125,7 +125,7 @@
 goal PropLog.thy "H |- (p->q) -> ((p->false)->q) -> q";
 by (rtac (deduction RS deduction) 1);
 by (rtac (thms.DN RS thms.MP) 1);
-by (ALLGOALS (best_tac (!claset addSIs prems)));
+by (ALLGOALS (best_tac (claset() addSIs prems)));
 qed "thms_excluded_middle";
 
 (*Hard to prove directly because it requires cuts*)
@@ -142,7 +142,7 @@
 goal PropLog.thy "hyps p (t-{v}) <= insert (#v->false) ((hyps p t)-{#v})";
 by (PropLog.pl.induct_tac "p" 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Simp_tac 1);
 by (Fast_tac 1);
 qed "hyps_Diff";
@@ -152,7 +152,7 @@
 goal PropLog.thy "hyps p (insert v t) <= insert (#v) (hyps p t-{#v->false})";
 by (PropLog.pl.induct_tac "p" 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Simp_tac 1);
 by (Fast_tac 1);
 qed "hyps_insert";
@@ -174,7 +174,7 @@
 
 goal PropLog.thy "hyps p t <= (UN v. {#v, #v->false})";
 by (PropLog.pl.induct_tac "p" 1);
-by (ALLGOALS (simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (simp_tac (simpset() addsplits [expand_if])));
 by (Blast_tac 1);
 qed "hyps_subset";
 
@@ -185,7 +185,7 @@
 val [sat] = goal PropLog.thy
     "{} |= p ==> !t. hyps p t - hyps p t0 |- p";
 by (rtac (hyps_subset RS (hyps_finite RS finite_subset_induct)) 1);
-by (simp_tac (!simpset addsimps [sat RS sat_thms_p]) 1);
+by (simp_tac (simpset() addsimps [sat RS sat_thms_p]) 1);
 by Safe_tac;
 (*Case hyps(p,t)-insert(#v,Y) |- p *)
 by (rtac thms_excluded_middle_rule 1);
@@ -217,14 +217,14 @@
 
 goal PropLog.thy "!!H. finite H ==> !p. H |= p --> H |- p";
 by (etac finite_induct 1);
-by (safe_tac ((claset_of "Fun") addSIs [completeness_0]));
+by (safe_tac ((claset_of Fun.thy) addSIs [completeness_0]));
 by (rtac (weaken_left_insert RS thms.MP) 1);
-by (fast_tac ((claset_of "Fun") addSIs [sat_imp]) 1);
+by (fast_tac ((claset_of Fun.thy) addSIs [sat_imp]) 1);
 by (Fast_tac 1);
 qed "completeness_lemma";
 
 val completeness = completeness_lemma RS spec RS mp;
 
 goal PropLog.thy "!!H. finite H ==> (H |- p) = (H |= p)";
-by (fast_tac (!claset addSEs [soundness, completeness]) 1);
+by (fast_tac (claset() addSEs [soundness, completeness]) 1);
 qed "syntax_iff_semantics";
--- a/src/HOL/Induct/SList.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/SList.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -12,7 +12,7 @@
 
 goal SList.thy "list(A) = {Numb(0)} <+> (A <*> list(A))";
 let val rew = rewrite_rule list_con_defs in  
-by (fast_tac (!claset addSIs (equalityI :: map rew list.intrs)
+by (fast_tac (claset() addSIs (equalityI :: map rew list.intrs)
                       addEs [rew list.elim]) 1)
 end;
 qed "list_unfold";
@@ -26,7 +26,7 @@
 (*Type checking -- list creates well-founded sets*)
 goalw SList.thy (list_con_defs @ list.defs) "list(sexp) <= sexp";
 by (rtac lfp_lowerbound 1);
-by (fast_tac (!claset addIs sexp.intrs@[sexp_In0I,sexp_In1I]) 1);
+by (fast_tac (claset() addIs sexp.intrs@[sexp_In0I,sexp_In1I]) 1);
 qed "list_sexp";
 
 (* A <= sexp ==> list(A) <= sexp *)
@@ -79,7 +79,7 @@
 (** Injectiveness of CONS and Cons **)
 
 goalw SList.thy [CONS_def] "(CONS K M=CONS L N) = (K=L & M=N)";
-by (fast_tac (!claset addSEs [Scons_inject, make_elim In1_inject]) 1);
+by (fast_tac (claset() addSEs [Scons_inject, make_elim In1_inject]) 1);
 qed "CONS_CONS_eq";
 
 (*For reasoning about abstract list constructors*)
@@ -104,7 +104,7 @@
 val prems = goalw SList.thy [CONS_def,In1_def]
     "CONS M N: sexp ==> M: sexp & N: sexp";
 by (cut_facts_tac prems 1);
-by (fast_tac (!claset addSDs [Scons_D]) 1);
+by (fast_tac (claset() addSDs [Scons_D]) 1);
 qed "sexp_CONS_D";
 
 
@@ -138,7 +138,7 @@
 qed "List_case_NIL";
 
 goalw SList.thy [List_case_def,CONS_def]  "List_case c h (CONS M N) = h M N";
-by (simp_tac (!simpset addsimps [Split,Case_In1]) 1);
+by (simp_tac (simpset() addsimps [Split,Case_In1]) 1);
 qed "List_case_CONS";
 
 (*** List_rec -- by wf recursion on pred_sexp ***)
@@ -185,13 +185,13 @@
 
 goal SList.thy "List_rec NIL c h = c";
 by (rtac (List_rec_unfold RS trans) 1);
-by (simp_tac (!simpset addsimps [List_case_NIL]) 1);
+by (simp_tac (simpset() addsimps [List_case_NIL]) 1);
 qed "List_rec_NIL";
 
 goal SList.thy "!!M. [| M: sexp;  N: sexp |] ==> \
 \    List_rec (CONS M N) c h = h M N (List_rec N c h)";
 by (rtac (List_rec_unfold RS trans) 1);
-by (asm_simp_tac (!simpset addsimps [List_case_CONS, pred_sexp_CONS_I2]) 1);
+by (asm_simp_tac (simpset() addsimps [List_case_CONS, pred_sexp_CONS_I2]) 1);
 qed "List_rec_CONS";
 
 (*** list_rec -- by List_rec ***)
@@ -207,11 +207,11 @@
 in
   val list_rec_Nil = prove_goalw SList.thy [list_rec_def, Nil_def]
       "list_rec Nil c h = c"
-   (fn _=> [simp_tac (!simpset addsimps list_rec_simps) 1]);
+   (fn _=> [simp_tac (simpset() addsimps list_rec_simps) 1]);
 
   val list_rec_Cons = prove_goalw SList.thy [list_rec_def, Cons_def]
       "list_rec (a#l) c h = h a l (list_rec l c h)"
-   (fn _=> [simp_tac (!simpset addsimps list_rec_simps) 1]);
+   (fn _=> [simp_tac (simpset() addsimps list_rec_simps) 1]);
 end;
 
 Addsimps [List_rec_NIL, List_rec_CONS, list_rec_Nil, list_rec_Cons];
@@ -227,7 +227,7 @@
 val sexp_ListA_I = A_subset_sexp RS list_subset_sexp RS subsetD;
 val sexp_A_I = A_subset_sexp RS subsetD;
 by (rtac (major RS list.induct) 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsimps ([sexp_A_I,sexp_ListA_I]@prems))));
+by (ALLGOALS(asm_simp_tac (simpset() addsimps ([sexp_A_I,sexp_ListA_I]@prems))));
 qed "List_rec_type";
 
 (** Generalized map functionals **)
@@ -312,12 +312,12 @@
 
 goal SList.thy "x mem (xs@ys) = (x mem xs | x mem ys)";
 by (list_ind_tac "xs" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed "mem_append2";
 
 goal SList.thy "x mem [x:xs. P(x)] = (x mem xs & P(x))";
 by (list_ind_tac "xs" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed "mem_filter2";
 
 
@@ -329,7 +329,7 @@
     "[| M: list(A);  A<=sexp;  !!z. z: A ==> f(g(z)) = z |] \
 \    ==> Rep_map f (Abs_map g M) = M";
 by (rtac (major RS list.induct) 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [sexp_A_I,sexp_ListA_I,minor])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [sexp_A_I,sexp_ListA_I,minor])));
 qed "Abs_map_inverse";
 
 (*Rep_map_inverse is obtained via Abs_Rep_map and map_ident*)
@@ -364,7 +364,7 @@
 goal SList.thy "!!f. (!!x. f(x): sexp) ==> \
 \       Abs_map g (Rep_map f xs) = map (%t. g(f(t))) xs";
 by (list_ind_tac "xs" 1);
-by (ALLGOALS(asm_simp_tac(!simpset addsimps
+by (ALLGOALS(asm_simp_tac(simpset() addsimps
        [Rep_map_type,list_sexp RS subsetD])));
 qed "Abs_Rep_map";
 
--- a/src/HOL/Induct/Simult.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/Simult.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -29,7 +29,7 @@
 
 goalw Simult.thy [TF_def] "TF(sexp) <= sexp";
 by (rtac lfp_lowerbound 1);
-by (blast_tac (!claset addIs  sexp.intrs@[sexp_In0I, sexp_In1I]
+by (blast_tac (claset() addIs  sexp.intrs@[sexp_In0I, sexp_In1I]
                       addSEs [PartE]) 1);
 qed "TF_sexp";
 
@@ -50,7 +50,7 @@
 \            |] ==> R(FCONS M N)    \
 \    |] ==> R(i)";
 by (rtac ([TF_def, TF_fun_mono, major] MRS def_induct) 1);
-by (blast_tac (!claset addIs (prems@[PartI])
+by (blast_tac (claset() addIs (prems@[PartI])
                        addEs [usumE, uprodE, PartE]) 1);
 qed "TF_induct";
 
@@ -78,7 +78,7 @@
           right overloading of equality.  The injectiveness properties for
           type 'a item hold only for set types.*)
 val PartE' = read_instantiate [("'a", "?'c set")] PartE;
-by (ALLGOALS (blast_tac (!claset addSEs [PartE'] addIs prems)));
+by (ALLGOALS (blast_tac (claset() addSEs [PartE'] addIs prems)));
 qed "Tree_Forest_induct";
 
 (*Induction for the abstract types 'a tree, 'a forest*)
@@ -91,11 +91,11 @@
                   ("Q1","%z. Q(Abs_Forest(z))")] 
     (Tree_Forest_induct RS conjE) 1);
 (*Instantiates ?A1 to range(Leaf). *)
-by (fast_tac (!claset addSEs [Rep_Tree_inverse RS subst, 
+by (fast_tac (claset() addSEs [Rep_Tree_inverse RS subst, 
 			      Rep_Forest_inverse RS subst] 
                        addSIs [Rep_Tree,Rep_Forest]) 4);
 (*Cannot use simplifier: the rewrites work in the wrong direction!*)
-by (ALLGOALS (fast_tac (!claset addSEs [Abs_Tree_inverse RS subst,
+by (ALLGOALS (fast_tac (claset() addSEs [Abs_Tree_inverse RS subst,
 					Abs_Forest_inverse RS subst] 
                                 addSIs prems)));
 qed "tree_forest_induct";
@@ -247,8 +247,8 @@
     "!!M N. [| M: sexp;  N: sexp |] ==>         \
 \           TF_rec (TCONS M N) b c d = b M N (TF_rec N b c d)";
 by (rtac (TF_rec_unfold RS trans) 1);
-by (simp_tac (!simpset addsimps [Case_In0, Split]) 1);
-by (asm_simp_tac (!simpset addsimps [In0_def]) 1);
+by (simp_tac (simpset() addsimps [Case_In0, Split]) 1);
+by (asm_simp_tac (simpset() addsimps [In0_def]) 1);
 qed "TF_rec_TCONS";
 
 goalw Simult.thy [FNIL_def] "TF_rec FNIL b c d = c";
@@ -261,7 +261,7 @@
 \        TF_rec (FCONS M N) b c d = d M N (TF_rec M b c d) (TF_rec N b c d)";
 by (rtac (TF_rec_unfold RS trans) 1);
 by (simp_tac (HOL_ss addsimps [Case_In1, List_case_CONS]) 1);
-by (asm_simp_tac (!simpset addsimps [CONS_def,In1_def]) 1);
+by (asm_simp_tac (simpset() addsimps [CONS_def,In1_def]) 1);
 qed "TF_rec_FCONS";
 
 
--- a/src/HOL/Induct/Term.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Induct/Term.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -12,7 +12,7 @@
 (*** Monotonicity and unfolding of the function ***)
 
 goal Term.thy "term(A) = A <*> list(term(A))";
-by (fast_tac (!claset addSIs term.intrs
+by (fast_tac (claset() addSIs term.intrs
                       addEs [term.elim]) 1);
 qed "term_unfold";
 
@@ -25,7 +25,7 @@
 
 goalw Term.thy term.defs "term(sexp) <= sexp";
 by (rtac lfp_lowerbound 1);
-by (fast_tac (!claset addIs [sexp.SconsI, list_sexp RS subsetD]) 1);
+by (fast_tac (claset() addIs [sexp.SconsI, list_sexp RS subsetD]) 1);
 qed "term_sexp";
 
 (* A <= sexp ==> term(A) <= sexp *)
@@ -98,7 +98,7 @@
 by (rtac term_induct 1);  (*types force good instantiation*)
 by (etac rev_mp 1);
 by (rtac list_induct2 1);  (*types force good instantiation*)
-by (ALLGOALS (asm_simp_tac (!simpset addsimps prems)));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps prems)));
 qed "term_induct2";
 
 (*Perform induction on xs. *)
@@ -134,7 +134,7 @@
 by (Simp_tac 1);
 by (strip_tac 1);
 by (etac (pred_sexp_CONS_D RS conjE) 1);
-by (asm_simp_tac (!simpset addsimps [trancl_pred_sexpD1]) 1);
+by (asm_simp_tac (simpset() addsimps [trancl_pred_sexpD1]) 1);
 qed "Abs_map_lemma";
 
 val [prem1,prem2,A_subset_sexp] = goal Term.thy
--- a/src/HOL/Integ/Bin.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Integ/Bin.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -71,7 +71,7 @@
 
 qed_goal "bin_add_Bcons_Bcons0" Bin.thy
     "bin_add (Bcons v False) (Bcons w y) = norm_Bcons (bin_add v w) y"
- (fn _ => [(simp_tac (!simpset addsimps [lemma]) 1)]);
+ (fn _ => [(simp_tac (simpset() addsimps [lemma]) 1)]);
 
 qed_goal "bin_add_Bcons_Plus" Bin.thy
     "bin_add (Bcons v x) PlusSign = Bcons v x"
@@ -100,7 +100,7 @@
 
 (**** The carry/borrow functions, bin_succ and bin_pred ****)
 
-val if_ss = !simpset addsplits [expand_if];
+val if_ss = simpset() addsplits [expand_if];
 
 
 (**** integ_of_bin ****)
@@ -228,7 +228,7 @@
   by (ALLGOALS(asm_simp_tac (HOL_ss addsimps [integ_of_bin_add]))); 
   by (ALLGOALS(int_case_tac "integ_of_bin w")); 
   by (ALLGOALS(asm_simp_tac 
-               (!simpset addsimps[zminus_zadd_distrib RS sym, 
+               (simpset() addsimps[zminus_zadd_distrib RS sym, 
                                 znat_add RS sym]))); 
   by (stac eq_False_conv 1); 
   by (rtac notI 1); 
@@ -258,7 +258,7 @@
   by (ALLGOALS(asm_simp_tac (HOL_ss addsimps [integ_of_bin_add]))); 
   by (ALLGOALS(int_case_tac "integ_of_bin w")); 
   by (ALLGOALS(asm_simp_tac 
-               (!simpset addsimps[zminus_zadd_distrib RS sym, 
+               (simpset() addsimps[zminus_zadd_distrib RS sym, 
                                 znat_add RS sym]))); 
   by (stac (zadd_zminus_inverse RS sym) 1); 
   by (rtac zadd_zless_mono1 1); 
--- a/src/HOL/Integ/Equiv.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Integ/Equiv.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -18,7 +18,7 @@
 
 goalw Equiv.thy [trans_def,sym_def,inverse_def]
     "!!r. [| sym(r); trans(r) |] ==> r^-1 O r <= r";
-by (blast_tac (!claset addSEs [inverseD]) 1);
+by (blast_tac (claset() addSEs [inverseD]) 1);
 qed "sym_trans_comp_subset";
 
 goalw Equiv.thy [refl_def]
@@ -84,13 +84,13 @@
 
 goal Equiv.thy
     "!!A r. equiv A r ==> ((x,y): r) = (r^^{x} = r^^{y} & x:A & y:A)";
-by (blast_tac (!claset addSIs [equiv_class_eq]
+by (blast_tac (claset() addSIs [equiv_class_eq]
 	               addDs [eq_equiv_class, equiv_type]) 1);
 qed "equiv_class_eq_iff";
 
 goal Equiv.thy
     "!!A r. [| equiv A r;  x: A;  y: A |] ==> (r^^{x} = r^^{y}) = ((x,y): r)";
-by (blast_tac (!claset addSIs [equiv_class_eq]
+by (blast_tac (claset() addSIs [equiv_class_eq]
 	               addDs [eq_equiv_class, equiv_type]) 1);
 qed "eq_equiv_class_iff";
 
@@ -113,15 +113,15 @@
 
 goalw Equiv.thy [equiv_def,refl_def,quotient_def]
     "!!A r. equiv A r ==> Union(A/r) = A";
-by (blast_tac (!claset addSIs [equalityI]) 1);
+by (blast_tac (claset() addSIs [equalityI]) 1);
 qed "Union_quotient";
 
 goalw Equiv.thy [quotient_def]
     "!!A r. [| equiv A r;  X: A/r;  Y: A/r |] ==> X=Y | (X Int Y = {})";
-by (safe_tac (!claset 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 (blast_tac (!claset addSIs [equalityI]) 1);
+by (blast_tac (claset() addSIs [equalityI]) 1);
 qed "quotient_disj";
 
 
@@ -129,7 +129,7 @@
 
 (* theorem needed to prove UN_equiv_class *)
 goal Set.thy "!!A. [| a:A; ! y:A. b(y)=b(a) |] ==> (UN y:A. b(y))=b(a)";
-by (fast_tac (!claset addSEs [equalityE] addSIs [equalityI]) 1);
+by (fast_tac (claset() addSEs [equalityE] addSIs [equalityI]) 1);
 qed "UN_singleton_lemma";
 val UN_singleton = ballI RSN (2,UN_singleton_lemma);
 
@@ -187,7 +187,7 @@
 \    congruent r (%x1. UN x2:r^^{a}. b x1 x2)";
 by (Clarify_tac 1);
 by (rtac (equiv_type RS subsetD RS SigmaE2) 1 THEN REPEAT (assume_tac 1));
-by (asm_simp_tac (!simpset addsimps [UN_equiv_class,
+by (asm_simp_tac (simpset() addsimps [UN_equiv_class,
                                      congruent2_implies_congruent]) 1);
 by (rewrite_goals_tac [congruent2_def,equiv_def,refl_def]);
 by (Blast_tac 1);
@@ -196,7 +196,7 @@
 goal Equiv.thy
     "!!A r. [| 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 (asm_simp_tac (!simpset addsimps [UN_equiv_class,
+by (asm_simp_tac (simpset() addsimps [UN_equiv_class,
                                      congruent2_implies_congruent,
                                      congruent2_implies_congruent_UN]) 1);
 qed "UN_equiv_class2";
@@ -224,7 +224,7 @@
 \    |] ==> congruent2 r b";
 by (cut_facts_tac prems 1);
 by (Clarify_tac 1);
-by (blast_tac (!claset addIs (trans::prems)) 1);
+by (blast_tac (claset() addIs (trans::prems)) 1);
 qed "congruent2I";
 
 val [equivA,commute,congt] = goal Equiv.thy
@@ -263,8 +263,8 @@
 by (rtac (Union_quotient RS subst) 1);
 by (assume_tac 1);
 by (rtac dvd_partition 1);
-by (blast_tac (!claset delrules [equalityI] addEs [quotient_disj RS disjE]) 4);
+by (blast_tac (claset() delrules [equalityI] addEs [quotient_disj RS disjE]) 4);
 by (ALLGOALS 
-    (asm_simp_tac (!simpset addsimps [Union_quotient, equiv_type, 
+    (asm_simp_tac (simpset() addsimps [Union_quotient, equiv_type, 
 				      finite_quotient])));
 qed "equiv_imp_dvd_card";
--- a/src/HOL/Integ/Group.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Integ/Group.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -70,7 +70,7 @@
  by (rtac plus_assoc 2);
 by (rtac trans 1);
  by (rtac plus_cong 2);
-  by (simp_tac (!simpset addsimps [left_inv,left_inv2,right_inv,right_inv2]) 2);
+  by (simp_tac (simpset() addsimps [left_inv,left_inv2,right_inv,right_inv2]) 2);
  by (rtac refl 2);
 by (rtac (zeroL RS sym) 1);
 qed "inv_plus";
--- a/src/HOL/Integ/Integ.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Integ/Integ.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -35,7 +35,7 @@
 val prems = goalw Integ.thy [intrel_def]
     "[| x1+y2 = x2+y1|] ==> \
 \    ((x1,y1),(x2,y2)): intrel";
-by (fast_tac (!claset addIs prems) 1);
+by (fast_tac (claset() addIs prems) 1);
 qed "intrelI";
 
 (*intrelE is hard to derive because fast_tac tries hyp_subst_tac so soon*)
@@ -66,7 +66,7 @@
 
 goalw Integ.thy [equiv_def, refl_def, sym_def, trans_def]
     "equiv {x::(nat*nat).True} intrel";
-by (fast_tac (!claset addSIs [intrel_refl] 
+by (fast_tac (claset() addSIs [intrel_refl] 
                         addSEs [sym, integ_trans_lemma]) 1);
 qed "equiv_intrel";
 
@@ -105,7 +105,7 @@
 by (dtac eq_equiv_class 1);
 by (rtac equiv_intrel 1);
 by (Fast_tac 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (Asm_full_simp_tac 1);
 qed "inj_znat";
 
@@ -114,8 +114,8 @@
 
 goalw Integ.thy [congruent_def]
   "congruent intrel (%p. split (%x y. intrel^^{(y,x)}) p)";
-by (safe_tac (!claset));
-by (asm_simp_tac (!simpset addsimps add_ac) 1);
+by (safe_tac (claset()));
+by (asm_simp_tac (simpset() addsimps add_ac) 1);
 qed "zminus_congruent";
 
 
@@ -125,7 +125,7 @@
 goalw Integ.thy [zminus_def]
       "$~ Abs_Integ(intrel^^{(x,y)}) = Abs_Integ(intrel ^^ {(y,x)})";
 by (res_inst_tac [("f","Abs_Integ")] arg_cong 1);
-by (simp_tac (!simpset addsimps 
+by (simp_tac (simpset() addsimps 
    [intrel_in_integ RS Abs_Integ_inverse,zminus_ize UN_equiv_class]) 1);
 qed "zminus";
 
@@ -137,22 +137,22 @@
 by (dres_inst_tac [("f","Abs_Integ")] arg_cong 1);
 by (res_inst_tac [("p","x")] PairE 1);
 by (rtac prem 1);
-by (asm_full_simp_tac (!simpset addsimps [Rep_Integ_inverse]) 1);
+by (asm_full_simp_tac (simpset() addsimps [Rep_Integ_inverse]) 1);
 qed "eq_Abs_Integ";
 
 goal Integ.thy "$~ ($~ z) = z";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps [zminus]) 1);
+by (asm_simp_tac (simpset() addsimps [zminus]) 1);
 qed "zminus_zminus";
 
 goal Integ.thy "inj(zminus)";
 by (rtac injI 1);
 by (dres_inst_tac [("f","zminus")] arg_cong 1);
-by (asm_full_simp_tac (!simpset addsimps [zminus_zminus]) 1);
+by (asm_full_simp_tac (simpset() addsimps [zminus_zminus]) 1);
 qed "inj_zminus";
 
 goalw Integ.thy [znat_def] "$~ ($#0) = $#0";
-by (simp_tac (!simpset addsimps [zminus]) 1);
+by (simp_tac (simpset() addsimps [zminus]) 1);
 qed "zminus_0";
 
 
@@ -160,7 +160,7 @@
 
 goal Arith.thy "!!m x n::nat. n+m=x ==> m<=x";
 by (dtac (disjI2 RS less_or_eq_imp_le) 1);
-by (asm_full_simp_tac (!simpset addsimps add_ac) 1);
+by (asm_full_simp_tac (simpset() addsimps add_ac) 1);
 by (dtac add_leD1 1);
 by (assume_tac 1);
 qed "not_znegative_znat_lemma";
@@ -169,16 +169,16 @@
 goalw Integ.thy [znegative_def, znat_def]
     "~ znegative($# n)";
 by (Simp_tac 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rtac ccontr 1);
 by (etac notE 1);
 by (Asm_full_simp_tac 1);
 by (dtac not_znegative_znat_lemma 1);
-by (fast_tac (!claset addDs [leD]) 1);
+by (fast_tac (claset() addDs [leD]) 1);
 qed "not_znegative_znat";
 
 goalw Integ.thy [znegative_def, znat_def] "znegative($~ $# Suc(n))";
-by (simp_tac (!simpset addsimps [zminus]) 1);
+by (simp_tac (simpset() addsimps [zminus]) 1);
 by (REPEAT (ares_tac [exI, conjI] 1));
 by (rtac (intrelI RS ImageI) 2);
 by (rtac singletonI 3);
@@ -201,19 +201,19 @@
 
 goalw Integ.thy [congruent_def]
     "congruent intrel (split (%x y. intrel^^{((y-x) + (x-(y::nat)),0)}))";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (Asm_simp_tac 1);
 by (etac rev_mp 1);
 by (res_inst_tac [("m","x1"),("n","y1")] diff_induct 1);
-by (asm_simp_tac (!simpset addsimps [inj_Suc RS inj_eq]) 3);
-by (asm_simp_tac (!simpset addsimps [diff_add_inverse,diff_add_0]) 2);
+by (asm_simp_tac (simpset() addsimps [inj_Suc RS inj_eq]) 3);
+by (asm_simp_tac (simpset() addsimps [diff_add_inverse,diff_add_0]) 2);
 by (Asm_simp_tac 1);
 by (rtac impI 1);
 by (etac subst 1);
 by (res_inst_tac [("m1","x")] (add_commute RS ssubst) 1);
-by (asm_simp_tac (!simpset addsimps [diff_add_inverse,diff_add_0]) 1);
+by (asm_simp_tac (simpset() addsimps [diff_add_inverse,diff_add_0]) 1);
 by (rtac impI 1);
-by (asm_simp_tac (!simpset addsimps
+by (asm_simp_tac (simpset() addsimps
                   [diff_add_inverse, diff_add_0, diff_Suc_add_0,
                    diff_Suc_add_inverse]) 1);
 qed "zmagnitude_congruent";
@@ -226,15 +226,15 @@
     "zmagnitude (Abs_Integ(intrel^^{(x,y)})) = \
 \    Abs_Integ(intrel^^{((y - x) + (x - y),0)})";
 by (res_inst_tac [("f","Abs_Integ")] arg_cong 1);
-by (asm_simp_tac (!simpset addsimps [zmagnitude_ize UN_equiv_class]) 1);
+by (asm_simp_tac (simpset() addsimps [zmagnitude_ize UN_equiv_class]) 1);
 qed "zmagnitude";
 
 goalw Integ.thy [znat_def] "zmagnitude($# n) = $#n";
-by (asm_simp_tac (!simpset addsimps [zmagnitude]) 1);
+by (asm_simp_tac (simpset() addsimps [zmagnitude]) 1);
 qed "zmagnitude_znat";
 
 goalw Integ.thy [znat_def] "zmagnitude($~ $# n) = $#n";
-by (asm_simp_tac (!simpset addsimps [zmagnitude, zminus]) 1);
+by (asm_simp_tac (simpset() addsimps [zmagnitude, zminus]) 1);
 qed "zmagnitude_zminus_znat";
 
 
@@ -246,12 +246,12 @@
     "congruent2 intrel (%p1 p2.                  \
 \         split (%x1 y1. split (%x2 y2. intrel^^{(x1+x2, y1+y2)}) p2) p1)";
 (*Proof via congruent2_commuteI seems longer*)
-by (safe_tac (!claset));
-by (asm_simp_tac (!simpset addsimps [add_assoc]) 1);
+by (safe_tac (claset()));
+by (asm_simp_tac (simpset() addsimps [add_assoc]) 1);
 (*The rest should be trivial, but rearranging terms is hard*)
 by (res_inst_tac [("x1","x1a")] (add_left_commute RS ssubst) 1);
-by (asm_simp_tac (!simpset addsimps [add_assoc RS sym]) 1);
-by (asm_simp_tac (!simpset addsimps add_ac) 1);
+by (asm_simp_tac (simpset() addsimps [add_assoc RS sym]) 1);
+by (asm_simp_tac (simpset() addsimps add_ac) 1);
 qed "zadd_congruent2";
 
 (*Resolve th against the corresponding facts for zadd*)
@@ -261,31 +261,31 @@
   "Abs_Integ(intrel^^{(x1,y1)}) + Abs_Integ(intrel^^{(x2,y2)}) = \
 \  Abs_Integ(intrel^^{(x1+x2, y1+y2)})";
 by (asm_simp_tac
-    (!simpset addsimps [zadd_ize UN_equiv_class2]) 1);
+    (simpset() addsimps [zadd_ize UN_equiv_class2]) 1);
 qed "zadd";
 
 goalw Integ.thy [znat_def] "$#0 + z = z";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps [zadd]) 1);
+by (asm_simp_tac (simpset() addsimps [zadd]) 1);
 qed "zadd_0";
 
 goal Integ.thy "$~ (z + w) = $~ z + $~ w";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps [zminus,zadd]) 1);
+by (asm_simp_tac (simpset() addsimps [zminus,zadd]) 1);
 qed "zminus_zadd_distrib";
 
 goal Integ.thy "(z::int) + w = w + z";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps (add_ac @ [zadd])) 1);
+by (asm_simp_tac (simpset() addsimps (add_ac @ [zadd])) 1);
 qed "zadd_commute";
 
 goal Integ.thy "((z1::int) + z2) + z3 = z1 + (z2 + z3)";
 by (res_inst_tac [("z","z1")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","z2")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","z3")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps [zadd, add_assoc]) 1);
+by (asm_simp_tac (simpset() addsimps [zadd, add_assoc]) 1);
 qed "zadd_assoc";
 
 (*For AC rewriting*)
@@ -299,12 +299,12 @@
 val zadd_ac = [zadd_assoc,zadd_commute,zadd_left_commute];
 
 goalw Integ.thy [znat_def] "$# (m + n) = ($#m) + ($#n)";
-by (asm_simp_tac (!simpset addsimps [zadd]) 1);
+by (asm_simp_tac (simpset() addsimps [zadd]) 1);
 qed "znat_add";
 
 goalw Integ.thy [znat_def] "z + ($~ z) = $#0";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps [zminus, zadd, add_commute]) 1);
+by (asm_simp_tac (simpset() addsimps [zminus, zadd, add_commute]) 1);
 qed "zadd_zminus_inverse";
 
 goal Integ.thy "($~ z) + z = $#0";
@@ -322,7 +322,7 @@
 
 qed_goal "zadd_assoc_cong" Integ.thy
     "!!z. (z::int) + v = z' + v' ==> z + (v + w) = z' + (v' + w)"
- (fn _ => [(asm_simp_tac (!simpset addsimps [zadd_assoc RS sym]) 1)]);
+ (fn _ => [(asm_simp_tac (simpset() addsimps [zadd_assoc RS sym]) 1)]);
 
 qed_goal "zadd_assoc_swap" Integ.thy "(z::int) + (v + w) = v + (z + w)"
  (fn _ => [(REPEAT (ares_tac [zadd_commute RS zadd_assoc_cong] 1))]);
@@ -335,7 +335,7 @@
 (** Congruence property for multiplication **)
 
 goal Integ.thy "((k::nat) + l) + (m + n) = (k + m) + (n + l)";
-by (simp_tac (!simpset addsimps add_ac) 1);
+by (simp_tac (simpset() addsimps add_ac) 1);
 qed "zmult_congruent_lemma";
 
 goal Integ.thy 
@@ -343,18 +343,18 @@
 \               split (%x1 y1. split (%x2 y2.   \
 \                   intrel^^{(x1*x2 + y1*y2, x1*y2 + y1*x2)}) p2) p1)";
 by (rtac (equiv_intrel RS congruent2_commuteI) 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rewtac split_def);
-by (simp_tac (!simpset addsimps add_ac@mult_ac) 1);
-by (asm_simp_tac (!simpset delsimps [equiv_intrel_iff]
+by (simp_tac (simpset() addsimps add_ac@mult_ac) 1);
+by (asm_simp_tac (simpset() delsimps [equiv_intrel_iff]
                            addsimps add_ac@mult_ac) 1);
 by (rtac (intrelI RS(equiv_intrel RS equiv_class_eq)) 1);
 by (rtac (zmult_congruent_lemma RS trans) 1);
 by (rtac (zmult_congruent_lemma RS trans RS sym) 1);
 by (rtac (zmult_congruent_lemma RS trans RS sym) 1);
 by (rtac (zmult_congruent_lemma RS trans RS sym) 1);
-by (asm_simp_tac (!simpset addsimps [add_mult_distrib RS sym]) 1);
-by (asm_simp_tac (!simpset addsimps add_ac@mult_ac) 1);
+by (asm_simp_tac (simpset() addsimps [add_mult_distrib RS sym]) 1);
+by (asm_simp_tac (simpset() addsimps add_ac@mult_ac) 1);
 qed "zmult_congruent2";
 
 (*Resolve th against the corresponding facts for zmult*)
@@ -363,36 +363,36 @@
 goalw Integ.thy [zmult_def]
    "Abs_Integ((intrel^^{(x1,y1)})) * Abs_Integ((intrel^^{(x2,y2)})) =   \
 \   Abs_Integ(intrel ^^ {(x1*x2 + y1*y2, x1*y2 + y1*x2)})";
-by (simp_tac (!simpset addsimps [zmult_ize UN_equiv_class2]) 1);
+by (simp_tac (simpset() addsimps [zmult_ize UN_equiv_class2]) 1);
 qed "zmult";
 
 goalw Integ.thy [znat_def] "$#0 * z = $#0";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps [zmult]) 1);
+by (asm_simp_tac (simpset() addsimps [zmult]) 1);
 qed "zmult_0";
 
 goalw Integ.thy [znat_def] "$#Suc(0) * z = z";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps [zmult]) 1);
+by (asm_simp_tac (simpset() addsimps [zmult]) 1);
 qed "zmult_1";
 
 goal Integ.thy "($~ z) * w = $~ (z * w)";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps ([zminus, zmult] @ add_ac)) 1);
+by (asm_simp_tac (simpset() addsimps ([zminus, zmult] @ add_ac)) 1);
 qed "zmult_zminus";
 
 
 goal Integ.thy "($~ z) * ($~ w) = (z * w)";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps ([zminus, zmult] @ add_ac)) 1);
+by (asm_simp_tac (simpset() addsimps ([zminus, zmult] @ add_ac)) 1);
 qed "zmult_zminus_zminus";
 
 goal Integ.thy "(z::int) * w = w * z";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps ([zmult] @ add_ac @ mult_ac)) 1);
+by (asm_simp_tac (simpset() addsimps ([zmult] @ add_ac @ mult_ac)) 1);
 qed "zmult_commute";
 
 goal Integ.thy "z * $# 0 = $#0";
@@ -407,7 +407,7 @@
 by (res_inst_tac [("z","z1")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","z2")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","z3")] eq_Abs_Integ 1);
-by (asm_simp_tac (!simpset addsimps ([add_mult_distrib2,zmult] @ 
+by (asm_simp_tac (simpset() addsimps ([add_mult_distrib2,zmult] @ 
                                      add_ac @ mult_ac)) 1);
 qed "zmult_assoc";
 
@@ -425,18 +425,18 @@
 by (res_inst_tac [("z","z2")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
 by (asm_simp_tac 
-    (!simpset addsimps ([add_mult_distrib2, zadd, zmult] @ 
+    (simpset() addsimps ([add_mult_distrib2, zadd, zmult] @ 
                         add_ac @ mult_ac)) 1);
 qed "zadd_zmult_distrib";
 
 val zmult_commute'= read_instantiate [("z","w")] zmult_commute;
 
 goal Integ.thy "w * ($~ z) = $~ (w * z)";
-by (simp_tac (!simpset addsimps [zmult_commute', zmult_zminus]) 1);
+by (simp_tac (simpset() addsimps [zmult_commute', zmult_zminus]) 1);
 qed "zmult_zminus_right";
 
 goal Integ.thy "(w::int) * (z1 + z2) = (w * z1) + (w * z2)";
-by (simp_tac (!simpset addsimps [zmult_commute',zadd_zmult_distrib]) 1);
+by (simp_tac (simpset() addsimps [zmult_commute',zadd_zmult_distrib]) 1);
 qed "zadd_zmult_distrib2";
 
 val zadd_simps = 
@@ -455,7 +455,7 @@
 
 (* Some Theorems about zsuc and zpred *)
 goalw Integ.thy [zsuc_def] "$#(Suc(n)) = zsuc($# n)";
-by (simp_tac (!simpset addsimps [znat_add RS sym]) 1);
+by (simp_tac (simpset() addsimps [znat_add RS sym]) 1);
 qed "znat_Suc";
 
 goalw Integ.thy [zpred_def,zsuc_def,zdiff_def] "$~ zsuc(z) = zpred($~ z)";
@@ -468,85 +468,85 @@
 
 goalw Integ.thy [zsuc_def,zpred_def,zdiff_def]
    "zpred(zsuc(z)) = z";
-by (simp_tac (!simpset addsimps [zadd_assoc]) 1);
+by (simp_tac (simpset() addsimps [zadd_assoc]) 1);
 qed "zpred_zsuc";
 
 goalw Integ.thy [zsuc_def,zpred_def,zdiff_def]
    "zsuc(zpred(z)) = z";
-by (simp_tac (!simpset addsimps [zadd_assoc]) 1);
+by (simp_tac (simpset() addsimps [zadd_assoc]) 1);
 qed "zsuc_zpred";
 
 goal Integ.thy "(zpred(z)=w) = (z=zsuc(w))";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rtac (zsuc_zpred RS sym) 1);
 by (rtac zpred_zsuc 1);
 qed "zpred_to_zsuc";
 
 goal Integ.thy "(zsuc(z)=w)=(z=zpred(w))";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rtac (zpred_zsuc RS sym) 1);
 by (rtac zsuc_zpred 1);
 qed "zsuc_to_zpred";
 
 goal Integ.thy "($~ z = w) = (z = $~ w)";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rtac (zminus_zminus RS sym) 1);
 by (rtac zminus_zminus 1);
 qed "zminus_exchange";
 
 goal Integ.thy"(zsuc(z)=zsuc(w)) = (z=w)";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (dres_inst_tac [("f","zpred")] arg_cong 1);
-by (asm_full_simp_tac (!simpset addsimps [zpred_zsuc]) 1);
+by (asm_full_simp_tac (simpset() addsimps [zpred_zsuc]) 1);
 qed "bijective_zsuc";
 
 goal Integ.thy"(zpred(z)=zpred(w)) = (z=w)";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (dres_inst_tac [("f","zsuc")] arg_cong 1);
-by (asm_full_simp_tac (!simpset addsimps [zsuc_zpred]) 1);
+by (asm_full_simp_tac (simpset() addsimps [zsuc_zpred]) 1);
 qed "bijective_zpred";
 
 (* Additional Theorems about zadd *)
 
 goalw Integ.thy [zsuc_def] "zsuc(z) + w = zsuc(z+w)";
-by (simp_tac (!simpset addsimps zadd_ac) 1);
+by (simp_tac (simpset() addsimps zadd_ac) 1);
 qed "zadd_zsuc";
 
 goalw Integ.thy [zsuc_def] "w + zsuc(z) = zsuc(w+z)";
-by (simp_tac (!simpset addsimps zadd_ac) 1);
+by (simp_tac (simpset() addsimps zadd_ac) 1);
 qed "zadd_zsuc_right";
 
 goalw Integ.thy [zpred_def,zdiff_def] "zpred(z) + w = zpred(z+w)";
-by (simp_tac (!simpset addsimps zadd_ac) 1);
+by (simp_tac (simpset() addsimps zadd_ac) 1);
 qed "zadd_zpred";
 
 goalw Integ.thy [zpred_def,zdiff_def] "w + zpred(z) = zpred(w+z)";
-by (simp_tac (!simpset addsimps zadd_ac) 1);
+by (simp_tac (simpset() addsimps zadd_ac) 1);
 qed "zadd_zpred_right";
 
 
 (* Additional Theorems about zmult *)
 
 goalw Integ.thy [zsuc_def] "zsuc(w) * z = z + w * z";
-by (simp_tac (!simpset addsimps [zadd_zmult_distrib, zadd_commute]) 1);
+by (simp_tac (simpset() addsimps [zadd_zmult_distrib, zadd_commute]) 1);
 qed "zmult_zsuc";
 
 goalw Integ.thy [zsuc_def] "z * zsuc(w) = z + w * z";
 by (simp_tac 
-    (!simpset addsimps [zadd_zmult_distrib2, zadd_commute, zmult_commute]) 1);
+    (simpset() addsimps [zadd_zmult_distrib2, zadd_commute, zmult_commute]) 1);
 qed "zmult_zsuc_right";
 
 goalw Integ.thy [zpred_def, zdiff_def] "zpred(w) * z = w * z - z";
-by (simp_tac (!simpset addsimps [zadd_zmult_distrib]) 1);
+by (simp_tac (simpset() addsimps [zadd_zmult_distrib]) 1);
 qed "zmult_zpred";
 
 goalw Integ.thy [zpred_def, zdiff_def] "z * zpred(w) = w * z - z";
-by (simp_tac (!simpset addsimps [zadd_zmult_distrib2, zmult_commute]) 1);
+by (simp_tac (simpset() addsimps [zadd_zmult_distrib2, zmult_commute]) 1);
 qed "zmult_zpred_right";
 
 (* Further Theorems about zsuc and zpred *)
 goal Integ.thy "$#Suc(m) ~= $#0";
-by (simp_tac (!simpset addsimps [inj_znat RS inj_eq]) 1);
+by (simp_tac (simpset() addsimps [inj_znat RS inj_eq]) 1);
 qed "znat_Suc_not_znat_Zero";
 
 bind_thm ("znat_Zero_not_znat_Suc", (znat_Suc_not_znat_Zero RS not_sym));
@@ -554,15 +554,15 @@
 
 goalw Integ.thy [zsuc_def,znat_def] "w ~= zsuc(w)";
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
-by (asm_full_simp_tac (!simpset addsimps [zadd]) 1);
+by (asm_full_simp_tac (simpset() addsimps [zadd]) 1);
 qed "n_not_zsuc_n";
 
 val zsuc_n_not_n = n_not_zsuc_n RS not_sym;
 
 goal Integ.thy "w ~= zpred(w)";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (dres_inst_tac [("x","w"),("f","zsuc")] arg_cong 1);
-by (asm_full_simp_tac (!simpset addsimps [zsuc_zpred,zsuc_n_not_n]) 1);
+by (asm_full_simp_tac (simpset() addsimps [zsuc_zpred,zsuc_n_not_n]) 1);
 qed "n_not_zpred_n";
 
 val zpred_n_not_n = n_not_zpred_n RS not_sym;
@@ -574,33 +574,33 @@
     "!!w. w<z ==> ? n. z = w + $#(Suc(n))";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
-by (safe_tac (!claset));
-by (asm_full_simp_tac (!simpset addsimps [zadd, zminus]) 1);
-by (safe_tac (!claset addSDs [less_eq_Suc_add]));
+by (safe_tac (claset()));
+by (asm_full_simp_tac (simpset() addsimps [zadd, zminus]) 1);
+by (safe_tac (claset() addSDs [less_eq_Suc_add]));
 by (rename_tac "k" 1);
 by (res_inst_tac [("x","k")] exI 1);
 (*To cancel x2, rename it to be first!*)
 by (rename_tac "a b c" 1);
 by (Asm_full_simp_tac 1);
-by (asm_full_simp_tac (!simpset delsimps [add_Suc_right]
+by (asm_full_simp_tac (simpset() delsimps [add_Suc_right]
                                 addsimps ([add_Suc_right RS sym] @ add_ac)) 1);
 qed "zless_eq_zadd_Suc";
 
 goalw Integ.thy [zless_def, znegative_def, zdiff_def, znat_def] 
     "z < z + $#(Suc(n))";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
-by (safe_tac (!claset));
-by (simp_tac (!simpset addsimps [zadd, zminus]) 1);
+by (safe_tac (claset()));
+by (simp_tac (simpset() addsimps [zadd, zminus]) 1);
 by (REPEAT_SOME (ares_tac [refl, exI, singletonI, ImageI, conjI, intrelI]));
 by (rtac le_less_trans 1);
 by (rtac lessI 2);
-by (asm_simp_tac (!simpset addsimps ([le_add1,add_left_cancel_le]@add_ac)) 1);
+by (asm_simp_tac (simpset() addsimps ([le_add1,add_left_cancel_le]@add_ac)) 1);
 qed "zless_zadd_Suc";
 
 goal Integ.thy "!!z1 z2 z3. [| z1<z2; z2<z3 |] ==> z1 < (z3::int)";
-by (safe_tac (!claset addSDs [zless_eq_zadd_Suc]));
+by (safe_tac (claset() addSDs [zless_eq_zadd_Suc]));
 by (simp_tac 
-    (!simpset addsimps [zadd_assoc, zless_zadd_Suc, znat_add RS sym]) 1);
+    (simpset() addsimps [zadd_assoc, zless_zadd_Suc, znat_add RS sym]) 1);
 qed "zless_trans";
 
 goalw Integ.thy [zsuc_def] "z<zsuc(z)";
@@ -610,12 +610,12 @@
 val zless_zsucI = zlessI RSN (2,zless_trans);
 
 goal Integ.thy "!!z w::int. z<w ==> ~w<z";
-by (safe_tac (!claset addSDs [zless_eq_zadd_Suc]));
+by (safe_tac (claset() addSDs [zless_eq_zadd_Suc]));
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
-by (safe_tac (!claset));
-by (asm_full_simp_tac (!simpset addsimps ([znat_def, zadd])) 1);
+by (safe_tac (claset()));
+by (asm_full_simp_tac (simpset() addsimps ([znat_def, zadd])) 1);
 by (asm_full_simp_tac
- (!simpset delsimps [add_Suc_right] addsimps [add_left_cancel, add_assoc, add_Suc_right RS sym]) 1);
+ (simpset() delsimps [add_Suc_right] addsimps [add_left_cancel, add_assoc, add_Suc_right RS sym]) 1);
 by (resolve_tac [less_not_refl2 RS notE] 1);
 by (etac sym 2);
 by (REPEAT (resolve_tac [lessI, trans_less_add2, less_SucI] 1));
@@ -633,7 +633,7 @@
 bind_thm ("zless_irrefl", (zless_not_refl RS notE));
 
 goal Integ.thy "!!w. z<w ==> w ~= (z::int)";
-by (fast_tac (!claset addEs [zless_irrefl]) 1);
+by (fast_tac (claset() addEs [zless_irrefl]) 1);
 qed "zless_not_refl2";
 
 
@@ -642,11 +642,11 @@
     "z<w | z=w | w<(z::int)";
 by (res_inst_tac [("z","z")] eq_Abs_Integ 1);
 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (asm_full_simp_tac
-    (!simpset addsimps [zadd, zminus, Image_iff, Bex_def]) 1);
+    (simpset() addsimps [zadd, zminus, Image_iff, Bex_def]) 1);
 by (res_inst_tac [("m1", "x+ya"), ("n1", "xa+y")] (less_linear RS disjE) 1);
-by (REPEAT (fast_tac (!claset addss (!simpset addsimps add_ac)) 1));
+by (REPEAT (fast_tac (claset() addss (simpset() addsimps add_ac)) 1));
 qed "zless_linear";
 
 
@@ -655,12 +655,12 @@
 goalw Integ.thy  [zless_def, znegative_def, zdiff_def, znat_def]
     "($#m < $#n) = (m<n)";
 by (simp_tac
-    (!simpset addsimps [zadd, zminus, Image_iff, Bex_def]) 1);
-by (fast_tac (!claset addIs [add_commute] addSEs [less_add_eq_less]) 1);
+    (simpset() addsimps [zadd, zminus, Image_iff, Bex_def]) 1);
+by (fast_tac (claset() addIs [add_commute] addSEs [less_add_eq_less]) 1);
 qed "zless_eq_less";
 
 goalw Integ.thy [zle_def, le_def] "($#m <= $#n) = (m<=n)";
-by (simp_tac (!simpset addsimps [zless_eq_less]) 1);
+by (simp_tac (simpset() addsimps [zless_eq_less]) 1);
 qed "zle_eq_le";
 
 goalw Integ.thy [zle_def] "!!w. ~(w<z) ==> z<=(w::int)";
@@ -678,17 +678,17 @@
 qed "not_zleE";
 
 goalw Integ.thy [zle_def] "!!z. z < w ==> z <= (w::int)";
-by (fast_tac (!claset addEs [zless_asym]) 1);
+by (fast_tac (claset() addEs [zless_asym]) 1);
 qed "zless_imp_zle";
 
 goalw Integ.thy [zle_def] "!!z. z <= w ==> z < w | z=(w::int)";
 by (cut_facts_tac [zless_linear] 1);
-by (fast_tac (!claset addEs [zless_irrefl,zless_asym]) 1);
+by (fast_tac (claset() addEs [zless_irrefl,zless_asym]) 1);
 qed "zle_imp_zless_or_eq";
 
 goalw Integ.thy [zle_def] "!!z. z<w | z=w ==> z <=(w::int)";
 by (cut_facts_tac [zless_linear] 1);
-by (fast_tac (!claset addEs [zless_irrefl,zless_asym]) 1);
+by (fast_tac (claset() addEs [zless_irrefl,zless_asym]) 1);
 qed "zless_or_eq_imp_zle";
 
 goal Integ.thy "(x <= (y::int)) = (x < y | x=y)";
@@ -696,48 +696,48 @@
 qed "zle_eq_zless_or_eq";
 
 goal Integ.thy "w <= (w::int)";
-by (simp_tac (!simpset addsimps [zle_eq_zless_or_eq]) 1);
+by (simp_tac (simpset() addsimps [zle_eq_zless_or_eq]) 1);
 qed "zle_refl";
 
 val prems = goal Integ.thy "!!i. [| i <= j; j < k |] ==> i < (k::int)";
 by (dtac zle_imp_zless_or_eq 1);
-by (fast_tac (!claset addIs [zless_trans]) 1);
+by (fast_tac (claset() addIs [zless_trans]) 1);
 qed "zle_zless_trans";
 
 goal Integ.thy "!!i. [| i <= j; j <= k |] ==> i <= (k::int)";
 by (EVERY1 [dtac zle_imp_zless_or_eq, dtac zle_imp_zless_or_eq,
-            rtac zless_or_eq_imp_zle, fast_tac (!claset addIs [zless_trans])]);
+            rtac zless_or_eq_imp_zle, fast_tac (claset() addIs [zless_trans])]);
 qed "zle_trans";
 
 goal Integ.thy "!!z. [| z <= w; w <= z |] ==> z = (w::int)";
 by (EVERY1 [dtac zle_imp_zless_or_eq, dtac zle_imp_zless_or_eq,
-            fast_tac (!claset addEs [zless_irrefl,zless_asym])]);
+            fast_tac (claset() addEs [zless_irrefl,zless_asym])]);
 qed "zle_anti_sym";
 
 
 goal Integ.thy "!!w w' z::int. z + w' = z + w ==> w' = w";
 by (dres_inst_tac [("f", "%x. x + $~z")] arg_cong 1);
-by (asm_full_simp_tac (!simpset addsimps zadd_ac) 1);
+by (asm_full_simp_tac (simpset() addsimps zadd_ac) 1);
 qed "zadd_left_cancel";
 
 
 (*** Monotonicity results ***)
 
 goal Integ.thy "!!v w z::int. v < w ==> v + z < w + z";
-by (safe_tac (!claset addSDs [zless_eq_zadd_Suc]));
-by (simp_tac (!simpset addsimps zadd_ac) 1);
-by (simp_tac (!simpset addsimps [zadd_assoc RS sym, zless_zadd_Suc]) 1);
+by (safe_tac (claset() addSDs [zless_eq_zadd_Suc]));
+by (simp_tac (simpset() addsimps zadd_ac) 1);
+by (simp_tac (simpset() addsimps [zadd_assoc RS sym, zless_zadd_Suc]) 1);
 qed "zadd_zless_mono1";
 
 goal Integ.thy "!!v w z::int. (v+z < w+z) = (v < w)";
-by (safe_tac (!claset addSEs [zadd_zless_mono1]));
+by (safe_tac (claset() addSEs [zadd_zless_mono1]));
 by (dres_inst_tac [("z", "$~z")] zadd_zless_mono1 1);
-by (asm_full_simp_tac (!simpset addsimps [zadd_assoc]) 1);
+by (asm_full_simp_tac (simpset() addsimps [zadd_assoc]) 1);
 qed "zadd_left_cancel_zless";
 
 goal Integ.thy "!!v w z::int. (v+z <= w+z) = (v <= w)";
 by (asm_full_simp_tac
-    (!simpset addsimps [zle_def, zadd_left_cancel_zless]) 1);
+    (simpset() addsimps [zle_def, zadd_left_cancel_zless]) 1);
 qed "zadd_left_cancel_zle";
 
 (*"v<=w ==> v+z <= w+z"*)
@@ -746,14 +746,14 @@
 
 goal Integ.thy "!!z' z::int. [| w'<=w; z'<=z |] ==> w' + z' <= w + z";
 by (etac (zadd_zle_mono1 RS zle_trans) 1);
-by (simp_tac (!simpset addsimps [zadd_commute]) 1);
+by (simp_tac (simpset() addsimps [zadd_commute]) 1);
 (*w moves to the end because it is free while z', z are bound*)
 by (etac zadd_zle_mono1 1);
 qed "zadd_zle_mono";
 
 goal Integ.thy "!!w z::int. z<=$#0 ==> w+z <= w";
 by (dres_inst_tac [("z", "w")] zadd_zle_mono1 1);
-by (asm_full_simp_tac (!simpset addsimps [zadd_commute]) 1);
+by (asm_full_simp_tac (simpset() addsimps [zadd_commute]) 1);
 qed "zadd_zle_self";
 
 
@@ -776,7 +776,7 @@
 
 goal Integ.thy "($~ x < $~ y) = (y < x)";
   by (rewrite_goals_tac [zless_def,zdiff_def]); 
-  by (simp_tac (!simpset addsimps zadd_ac ) 1); 
+  by (simp_tac (simpset() addsimps zadd_ac ) 1); 
 qed "zminus_zless_zminus"; 
 
 goal Integ.thy "($~ x <= $~ y) = (y <= x)";
@@ -785,12 +785,12 @@
 
 goal Integ.thy "(x < $~ y) = (y < $~ x)";
   by (rewrite_goals_tac [zless_def,zdiff_def]); 
-  by (simp_tac (!simpset addsimps zadd_ac ) 1); 
+  by (simp_tac (simpset() addsimps zadd_ac ) 1); 
 qed "zless_zminus"; 
 
 goal Integ.thy "($~ x < y) = ($~ y < x)";
   by (rewrite_goals_tac [zless_def,zdiff_def]); 
-  by (simp_tac (!simpset addsimps zadd_ac ) 1); 
+  by (simp_tac (simpset() addsimps zadd_ac ) 1); 
 qed "zminus_zless"; 
 
 goal Integ.thy "(x <= $~ y) = (y <=  $~ x)";
@@ -870,7 +870,7 @@
   by (etac exE 1); 
   by (rtac exI 1);
   by (dres_inst_tac [("f","(% z. z + $~ $# Suc n )")] arg_cong 1); 
-  by (auto_tac(!claset, !simpset addsimps [zadd_assoc])); 
+  by (auto_tac(claset(), simpset() addsimps [zadd_assoc])); 
 qed "znegativeD"; 
 
 goal Integ.thy "!! x. ~znegative x ==> ? n. x = $# n"; 
--- a/src/HOL/Integ/Ring.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Integ/Ring.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -141,7 +141,7 @@
 (*** The order [minus_plusL3,minus_plusL2] is important because minus_plusL3
      MUST be tried first ***)
 val cring_simp =
-  let val phase1 = !simpset addsimps
+  let val phase1 = simpset() addsimps
                    [plus_minusL,minus_plusR,minus_minusR,plus_minusR]
       val phase2 = HOL_ss addsimps [minus_plusL3,minus_plusL2,
                                     zeroL,zeroR,mult_zeroL,mult_zeroR]
--- a/src/HOL/Lambda/Commutation.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Lambda/Commutation.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -29,24 +29,24 @@
 by (strip_tac 1);
 by (etac rtrancl_induct 1);
 by (Blast_tac 1);
-by (blast_tac (!claset addIs [rtrancl_into_rtrancl]) 1);
+by (blast_tac (claset() addIs [rtrancl_into_rtrancl]) 1);
 qed "square_rtrancl";
 
 goalw Commutation.thy [commute_def]
  "!!R. square R S (S^*) (R^=) ==> commute (R^*) (S^*)";
-by (fast_tac (!claset addDs [square_reflcl,square_sym RS square_rtrancl]
+by (fast_tac (claset() addDs [square_reflcl,square_sym RS square_rtrancl]
                      addEs [r_into_rtrancl]
-                     addss !simpset) 1);
+                     addss simpset()) 1);
 qed "square_rtrancl_reflcl_commute";
 
 (*** commute ***)
 
 goalw Commutation.thy [commute_def] "!!R. commute R S ==> commute S R";
-by (blast_tac (!claset addIs [square_sym]) 1);
+by (blast_tac (claset() addIs [square_sym]) 1);
 qed "commute_sym";
 
 goalw Commutation.thy [commute_def] "!!R. commute R S ==> commute (R^*) (S^*)";
-by (blast_tac (!claset addIs [square_rtrancl,square_sym]) 1);
+by (blast_tac (claset() addIs [square_rtrancl,square_sym]) 1);
 qed "commute_rtrancl";
 
 goalw Commutation.thy [commute_def,square_def]
@@ -67,7 +67,7 @@
 
 goalw Commutation.thy [diamond_def]
   "!!R. square R R (R^=) (R^=) ==> confluent R";
-by (fast_tac (!claset addIs [square_rtrancl_reflcl_commute, r_into_rtrancl]
+by (fast_tac (claset() addIs [square_rtrancl_reflcl_commute, r_into_rtrancl]
                       addEs [square_subset]) 1);
 qed "square_reflcl_confluent";
 
@@ -75,13 +75,13 @@
  "!!R. [| confluent R; confluent S; commute (R^*) (S^*) |] \
 \      ==> confluent(R Un S)";
 by (rtac (rtrancl_Un_rtrancl RS subst) 1);
-by (blast_tac (!claset addDs [diamond_Un] addIs [diamond_confluent]) 1);
+by (blast_tac (claset() addDs [diamond_Un] addIs [diamond_confluent]) 1);
 qed "confluent_Un";
 
 goal Commutation.thy
   "!!R.[| diamond(R); T <= R; R <= T^* |] ==> confluent(T)";
-by (fast_tac (!claset addIs [diamond_confluent]
-                    addDs [rtrancl_subset RS sym] addss !simpset) 1);
+by (fast_tac (claset() addIs [diamond_confluent]
+                    addDs [rtrancl_subset RS sym] addss simpset()) 1);
 qed "diamond_to_confluence";
 
 (*** Church_Rosser ***)
@@ -94,6 +94,6 @@
        rtrancl_inverseI, inverseI, Un_upper1 RS rtrancl_mono RS subsetD])1);
 by (etac rtrancl_induct 1);
  by (Blast_tac 1);
-by (Blast.depth_tac (!claset delrules [rtrancl_refl] 
+by (Blast.depth_tac (claset() delrules [rtrancl_refl] 
                        addIs [r_into_rtrancl, rtrancl_trans]) 12 1);
 qed "Church_Rosser_confluent";
--- a/src/HOL/Lambda/Eta.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Lambda/Eta.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -26,7 +26,7 @@
 
 goal Eta.thy "!i t u. ~free s i --> s[t/i] = s[u/i]";
 by (dB.induct_tac "s" 1);
-by (ALLGOALS(simp_tac (addsplit (!simpset))));
+by (ALLGOALS(simp_tac (addsplit (simpset()))));
 by (Blast_tac 1);
 by (Blast_tac 1);
 qed_spec_mp "subst_not_free";
@@ -35,9 +35,9 @@
 goal Eta.thy "!i k. free (lift t k) i = \
 \                   (i < k & free t i | k < i & free t (pred i))";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS(asm_full_simp_tac (addsplit (!simpset) addcongs [conj_cong])));
+by (ALLGOALS(asm_full_simp_tac (addsplit (simpset()) addcongs [conj_cong])));
 by (Blast_tac 2);
-by(simp_tac (!simpset addsimps [pred_def] addsplits [expand_nat_case]) 1);
+by(simp_tac (simpset() addsimps [pred_def] addsplits [expand_nat_case]) 1);
 by (safe_tac HOL_cs);
 by (ALLGOALS trans_tac);
 qed "free_lift";
@@ -48,8 +48,8 @@
 by (dB.induct_tac "s" 1);
 by (Asm_simp_tac 2);
 by (Blast_tac 2);
-by (asm_full_simp_tac (addsplit (!simpset)) 2);
-by(simp_tac (!simpset addsimps [pred_def,subst_Var]
+by (asm_full_simp_tac (addsplit (simpset())) 2);
+by(simp_tac (simpset() addsimps [pred_def,subst_Var]
                       addsplits [expand_if,expand_nat_case]) 1);
 by (safe_tac (HOL_cs addSEs [nat_neqE]));
 by (ALLGOALS trans_tac);
@@ -58,16 +58,16 @@
 
 goal Eta.thy "!!s. s -e> t ==> !i. free t i = free s i";
 by (etac eta.induct 1);
-by (ALLGOALS(asm_simp_tac (!simpset addcongs [conj_cong])));
+by (ALLGOALS(asm_simp_tac (simpset() addcongs [conj_cong])));
 qed_spec_mp "free_eta";
 
 goal Eta.thy "!!s. [| s -e> t; ~free s i |] ==> ~free t i";
-by (asm_simp_tac (!simpset addsimps [free_eta]) 1);
+by (asm_simp_tac (simpset() addsimps [free_eta]) 1);
 qed "not_free_eta";
 
 goal Eta.thy "!!s. s -e> t ==> !u i. s[u/i] -e> t[u/i]";
 by (etac eta.induct 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsimps [subst_subst RS sym])));
+by (ALLGOALS(asm_simp_tac (simpset() addsimps [subst_subst RS sym])));
 qed_spec_mp "eta_subst";
 Addsimps [eta_subst];
 
@@ -77,10 +77,10 @@
 by (rtac (impI RS allI RS allI) 1);
 by (Simp_tac 1);
 by (etac eta.induct 1);
-by (slow_tac (!claset addIs [subst_not_free,eta_subst]
-                      addIs [free_eta RS iffD1] addss !simpset) 1);
-by (safe_tac (!claset));
-by (blast_tac (!claset addSIs [eta_subst] addIs [free_eta RS iffD1]) 5);
+by (slow_tac (claset() addIs [subst_not_free,eta_subst]
+                      addIs [free_eta RS iffD1] addss simpset()) 1);
+by (safe_tac (claset()));
+by (blast_tac (claset() addSIs [eta_subst] addIs [free_eta RS iffD1]) 5);
 by (ALLGOALS Blast_tac);
 qed "square_eta";
 
@@ -92,21 +92,21 @@
 
 goal Eta.thy "!!s. s -e>> s' ==> Abs s -e>> Abs s'";
 by (etac rtrancl_induct 1);
-by (ALLGOALS(blast_tac (!claset addIs [rtrancl_refl,rtrancl_into_rtrancl])));
+by (ALLGOALS(blast_tac (claset() addIs [rtrancl_refl,rtrancl_into_rtrancl])));
 qed "rtrancl_eta_Abs";
 
 goal Eta.thy "!!s. s -e>> s' ==> s @ t -e>> s' @ t";
 by (etac rtrancl_induct 1);
-by (ALLGOALS(blast_tac (!claset addIs [rtrancl_refl,rtrancl_into_rtrancl])));
+by (ALLGOALS(blast_tac (claset() addIs [rtrancl_refl,rtrancl_into_rtrancl])));
 qed "rtrancl_eta_AppL";
 
 goal Eta.thy "!!s. t -e>> t' ==> s @ t -e>> s @ t'";
 by (etac rtrancl_induct 1);
-by (ALLGOALS(blast_tac (!claset addIs [rtrancl_refl,rtrancl_into_rtrancl])));
+by (ALLGOALS(blast_tac (claset() addIs [rtrancl_refl,rtrancl_into_rtrancl])));
 qed "rtrancl_eta_AppR";
 
 goal Eta.thy "!!s. [| s -e>> s'; t -e>> t' |] ==> s @ t -e>> s' @ t'";
-by (blast_tac (!claset addSIs [rtrancl_eta_AppL, rtrancl_eta_AppR]
+by (blast_tac (claset() addSIs [rtrancl_eta_AppL, rtrancl_eta_AppR]
                        addIs [rtrancl_trans]) 1);
 qed "rtrancl_eta_App";
 
@@ -119,13 +119,13 @@
 
 goal Eta.thy "!!s t. s -> t ==> !u i. s[u/i] -> t[u/i]";
 by (etac beta.induct 1);
-by (ALLGOALS(asm_full_simp_tac (!simpset addsimps [subst_subst RS sym])));
+by (ALLGOALS(asm_full_simp_tac (simpset() addsimps [subst_subst RS sym])));
 qed_spec_mp "beta_subst";
 AddIs [beta_subst];
 
 goal Eta.thy "!i. t[Var i/i] = t[Var(i)/Suc i]";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS (asm_simp_tac (addsplit (!simpset))));
+by (ALLGOALS (asm_simp_tac (addsplit (simpset()))));
 by(safe_tac (HOL_cs addSEs [nat_neqE]));
 by(ALLGOALS trans_tac);
 qed_spec_mp "subst_Var_Suc";
@@ -133,30 +133,30 @@
 
 goal Eta.thy "!!s t. s -e> t ==> (!i. lift s i -e> lift t i)";
 by (etac eta.induct 1);
-by (ALLGOALS(asm_simp_tac (addsplit (!simpset))));
+by (ALLGOALS(asm_simp_tac (addsplit (simpset()))));
 qed_spec_mp "eta_lift";
 Addsimps [eta_lift];
 
 goal Eta.thy "!s t i. s -e> t --> u[s/i] -e>> u[t/i]";
 by (dB.induct_tac "u" 1);
-by (ALLGOALS(asm_simp_tac (addsplit (!simpset))));
-by (blast_tac (!claset addIs [r_into_rtrancl]) 1);
-by (blast_tac (!claset addSIs [rtrancl_eta_App]) 1);
-by (blast_tac (!claset addSIs [rtrancl_eta_Abs,eta_lift]) 1);
+by (ALLGOALS(asm_simp_tac (addsplit (simpset()))));
+by (blast_tac (claset() addIs [r_into_rtrancl]) 1);
+by (blast_tac (claset() addSIs [rtrancl_eta_App]) 1);
+by (blast_tac (claset() addSIs [rtrancl_eta_Abs,eta_lift]) 1);
 qed_spec_mp "rtrancl_eta_subst";
 
 goalw Eta.thy [square_def] "square beta eta (eta^*) (beta^=)";
 by (rtac (impI RS allI RS allI) 1);
 by (etac beta.induct 1);
-by (slow_tac (!claset addIs [r_into_rtrancl,rtrancl_eta_subst,eta_subst]
-                      addss !simpset) 1);
-by (blast_tac (!claset addIs [r_into_rtrancl,rtrancl_eta_AppL]) 1);
-by (blast_tac (!claset addIs [r_into_rtrancl,rtrancl_eta_AppR]) 1);
+by (slow_tac (claset() addIs [r_into_rtrancl,rtrancl_eta_subst,eta_subst]
+                      addss simpset()) 1);
+by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_eta_AppL]) 1);
+by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_eta_AppR]) 1);
 (*23 seconds?*)
 DelIffs dB.distinct;
 Addsimps dB.distinct;
-by (slow_tac (!claset addIs [r_into_rtrancl,rtrancl_eta_Abs,free_beta]
-                      addss !simpset) 1);
+by (slow_tac (claset() addIs [r_into_rtrancl,rtrancl_eta_Abs,free_beta]
+                      addss simpset()) 1);
 qed "square_beta_eta";
 
 goal Eta.thy "confluent(beta Un eta)";
@@ -168,7 +168,7 @@
 
 goal Eta.thy "!i. (~free s i) = (? t. s = lift t i)";
 by (dB.induct_tac "s" 1);
-  by (simp_tac (!simpset addsplits [expand_if]) 1);
+  by (simp_tac (simpset() addsplits [expand_if]) 1);
   by (SELECT_GOAL(safe_tac HOL_cs)1);
    by(etac nat_neqE 1);
     by (res_inst_tac [("x","Var nat")] exI 1);
@@ -179,7 +179,7 @@
    by (assume_tac 2);
   by (etac thin_rl 1);
   by (res_inst_tac [("dB","t")] dB_case_distinction 1);
-    by (simp_tac (!simpset addsplits [expand_if]) 1);
+    by (simp_tac (simpset() addsplits [expand_if]) 1);
     by (blast_tac (HOL_cs addDs [less_not_refl2]) 1);
    by (Simp_tac 1);
   by (Simp_tac 1);
@@ -195,7 +195,7 @@
  by (etac exE 1);
  by (etac rev_mp 1);
  by (res_inst_tac [("dB","t")] dB_case_distinction 1);
-   by (simp_tac (!simpset addsplits [expand_if]) 1);
+   by (simp_tac (simpset() addsplits [expand_if]) 1);
   by (Simp_tac 1);
   by (Blast_tac 1);
  by (Simp_tac 1);
@@ -209,7 +209,7 @@
 by (etac exE 1);
 by (etac rev_mp 1);
 by (res_inst_tac [("dB","t")] dB_case_distinction 1);
-  by (simp_tac (!simpset addsplits [expand_if]) 1);
+  by (simp_tac (simpset() addsplits [expand_if]) 1);
  by (Simp_tac 1);
 by (Simp_tac 1);
 by (Blast_tac 1);
@@ -217,5 +217,5 @@
 
 goal Eta.thy "(!s u. (~free s 0) --> R(Abs(s @ Var 0))(s[u/0])) = \
 \             (!s. R(Abs(lift s 0 @ Var 0))(s))";
-by (fast_tac (HOL_cs addss (!simpset addsimps [not_free_iff_lifted])) 1);
+by (fast_tac (HOL_cs addss (simpset() addsimps [not_free_iff_lifted])) 1);
 qed "explicit_is_implicit";
--- a/src/HOL/Lambda/Lambda.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Lambda/Lambda.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -23,22 +23,22 @@
 
 goal Lambda.thy "!!s. s ->> s' ==> Abs s ->> Abs s'";
 by (etac rtrancl_induct 1);
-by (ALLGOALS (blast_tac (!claset addIs [rtrancl_into_rtrancl])));
+by (ALLGOALS (blast_tac (claset() addIs [rtrancl_into_rtrancl])));
 qed "rtrancl_beta_Abs";
 AddSIs [rtrancl_beta_Abs];
 
 goal Lambda.thy "!!s. s ->> s' ==> s @ t ->> s' @ t";
 by (etac rtrancl_induct 1);
-by (ALLGOALS (blast_tac (!claset addIs [rtrancl_into_rtrancl])));
+by (ALLGOALS (blast_tac (claset() addIs [rtrancl_into_rtrancl])));
 qed "rtrancl_beta_AppL";
 
 goal Lambda.thy "!!s. t ->> t' ==> s @ t ->> s @ t'";
 by (etac rtrancl_induct 1);
-by (ALLGOALS (blast_tac (!claset addIs [rtrancl_into_rtrancl])));
+by (ALLGOALS (blast_tac (claset() addIs [rtrancl_into_rtrancl])));
 qed "rtrancl_beta_AppR";
 
 goal Lambda.thy "!!s. [| s ->> s'; t ->> t' |] ==> s @ t ->> s' @ t'";
-by (blast_tac (!claset addSIs [rtrancl_beta_AppL, rtrancl_beta_AppR]
+by (blast_tac (claset() addSIs [rtrancl_beta_AppL, rtrancl_beta_AppR]
                        addIs  [rtrancl_trans]) 1);
 qed "rtrancl_beta_App";
 AddIs [rtrancl_beta_App];
@@ -49,15 +49,15 @@
                      setloop (split_inside_tac [expand_if]);
 
 goal Lambda.thy "(Var k)[u/k] = u";
-by (asm_full_simp_tac(addsplit(!simpset)) 1);
+by (asm_full_simp_tac(addsplit(simpset())) 1);
 qed "subst_eq";
 
 goal Lambda.thy "!!s. i<j ==> (Var j)[u/i] = Var(pred j)";
-by (asm_full_simp_tac(addsplit(!simpset)) 1);
+by (asm_full_simp_tac(addsplit(simpset())) 1);
 qed "subst_gt";
 
 goal Lambda.thy "!!s. j<i ==> (Var j)[u/i] = Var(j)";
-by (asm_full_simp_tac (addsplit(!simpset) addsimps
+by (asm_full_simp_tac (addsplit(simpset()) addsimps
                           [less_not_refl2 RS not_sym,less_SucI]) 1);
 qed "subst_lt";
 
@@ -66,7 +66,7 @@
 goal Lambda.thy
   "!i k. i < Suc k --> lift (lift t i) (Suc k) = lift (lift t k) i";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if]
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if]
                                     addSolver cut_trans_tac)));
 by (safe_tac HOL_cs);
 by (ALLGOALS trans_tac);
@@ -75,7 +75,7 @@
 goal Lambda.thy "!i j s. j < Suc i --> \
 \         lift (t[s/j]) i = (lift t (Suc i)) [lift s i / j]";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsimps [pred_def,subst_Var,lift_lift]
+by (ALLGOALS(asm_simp_tac (simpset() addsimps [pred_def,subst_Var,lift_lift]
                                 addsplits [expand_if,expand_nat_case]
                                 addSolver cut_trans_tac)));
 by (safe_tac HOL_cs);
@@ -87,7 +87,7 @@
   "!i j s. i < Suc j -->\
 \         lift (t[s/j]) i = (lift t i) [lift s i / Suc j]";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsimps [subst_Var,lift_lift]
+by (ALLGOALS(asm_simp_tac (simpset() addsimps [subst_Var,lift_lift]
                                 addsplits [expand_if]
                                 addSolver cut_trans_tac)));
 by (safe_tac (HOL_cs addSEs [nat_neqE]));
@@ -96,7 +96,7 @@
 
 goal Lambda.thy "!k s. (lift t k)[s/k] = t";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsplits [expand_if])));
 qed "subst_lift";
 Addsimps [subst_lift];
 
@@ -105,7 +105,7 @@
 \ t[lift v i / Suc j][u[v/j]/i] = t[u/i][v/j]";
 by (dB.induct_tac "t" 1);
 by (ALLGOALS(asm_simp_tac
-      (!simpset addsimps [pred_def,subst_Var,lift_lift RS sym,lift_subst_lt]
+      (simpset() addsimps [pred_def,subst_Var,lift_lift RS sym,lift_subst_lt]
                 addsplits [expand_if,expand_nat_case]
                 addSolver cut_trans_tac)));
 by (safe_tac (HOL_cs addSEs [nat_neqE]));
@@ -117,20 +117,20 @@
 
 goal Lambda.thy "!k. liftn 0 t k = t";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS(asm_simp_tac(addsplit(!simpset))));
+by (ALLGOALS(asm_simp_tac(addsplit(simpset()))));
 qed "liftn_0";
 Addsimps [liftn_0];
 
 goal Lambda.thy "!k. liftn (Suc n) t k = lift (liftn n t k) k";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS(asm_simp_tac(addsplit(!simpset))));
-by (blast_tac (!claset addDs [add_lessD1]) 1);
+by (ALLGOALS(asm_simp_tac(addsplit(simpset()))));
+by (blast_tac (claset() addDs [add_lessD1]) 1);
 qed "liftn_lift";
 Addsimps [liftn_lift];
 
 goal Lambda.thy "!n. substn t s n = t[liftn n s 0 / n]";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS(asm_simp_tac(addsplit(!simpset))));
+by (ALLGOALS(asm_simp_tac(addsplit(simpset()))));
 qed "substn_subst_n";
 Addsimps [substn_subst_n];
 
--- a/src/HOL/Lambda/ParRed.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Lambda/ParRed.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -36,7 +36,7 @@
 by (rtac subsetI 1);
 by (split_all_tac 1);
 by (etac beta.induct 1);
-by (ALLGOALS(blast_tac (!claset addSIs [par_beta_refl])));
+by (ALLGOALS(blast_tac (claset() addSIs [par_beta_refl])));
 qed "beta_subset_par_beta";
 
 goal ParRed.thy "par_beta <= beta^*";
@@ -45,7 +45,7 @@
 by (etac par_beta.induct 1);
 by (Blast_tac 1);
 (* rtrancl_refl complicates the proof by increasing the branching factor*)
-by (ALLGOALS (blast_tac (!claset delrules [rtrancl_refl]
+by (ALLGOALS (blast_tac (claset() delrules [rtrancl_refl]
 				 addIs [rtrancl_into_rtrancl])));
 qed "par_beta_subset_beta";
 
@@ -53,20 +53,20 @@
 
 goal ParRed.thy "!t' n. t => t' --> lift t n => lift t' n";
 by (dB.induct_tac "t" 1);
-by (ALLGOALS(fast_tac (!claset addss (!simpset))));
+by (ALLGOALS(fast_tac (claset() addss (simpset()))));
 qed_spec_mp "par_beta_lift";
 Addsimps [par_beta_lift];
 
 goal ParRed.thy
   "!s s' t' n. s => s' --> t => t' --> t[s/n] => t'[s'/n]";
 by (dB.induct_tac "t" 1);
-  by (asm_simp_tac (addsplit(!simpset)) 1);
+  by (asm_simp_tac (addsplit(simpset())) 1);
  by (strip_tac 1);
  by (eresolve_tac par_beta_cases 1);
   by (Asm_simp_tac 1);
- by (asm_simp_tac (!simpset addsimps [subst_subst RS sym]) 1);
- by (fast_tac (!claset addSIs [par_beta_lift] addss (!simpset)) 1);
-by (fast_tac (!claset addss (!simpset)) 1);
+ by (asm_simp_tac (simpset() addsimps [subst_subst RS sym]) 1);
+ by (fast_tac (claset() addSIs [par_beta_lift] addss (simpset())) 1);
+by (fast_tac (claset() addss (simpset())) 1);
 qed_spec_mp "par_beta_subst";
 
 (*** Confluence (directly) ***)
@@ -74,7 +74,7 @@
 goalw ParRed.thy [diamond_def,commute_def,square_def] "diamond(par_beta)";
 by (rtac (impI RS allI RS allI) 1);
 by (etac par_beta.induct 1);
-by (ALLGOALS(blast_tac (!claset addSIs [par_beta_subst])));
+by (ALLGOALS(blast_tac (claset() addSIs [par_beta_subst])));
 qed "diamond_par_beta";
 
 
@@ -85,14 +85,14 @@
   by (Simp_tac 1);
  by (etac rev_mp 1);
  by (dB.induct_tac "dB1" 1);
- by (ALLGOALS(fast_tac (!claset addSIs [par_beta_subst] 
-                                addss (!simpset))));
+ by (ALLGOALS(fast_tac (claset() addSIs [par_beta_subst] 
+                                addss (simpset()))));
 qed_spec_mp "par_beta_cd";
 
 (*** Confluence (via cd) ***)
 
 goalw ParRed.thy [diamond_def,commute_def,square_def] "diamond(par_beta)";
-by (blast_tac (!claset addIs [par_beta_cd]) 1);
+by (blast_tac (claset() addIs [par_beta_cd]) 1);
 qed "diamond_par_beta2";
 
 goal ParRed.thy "confluent(beta)";
--- a/src/HOL/Lex/Auto.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Lex/Auto.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -23,15 +23,15 @@
 
 goalw Auto.thy [acc_prefix_def]
  "acc_prefix A s (x#xs) = (fin A (next A s x) | acc_prefix A (next A s x) xs)";
-by(simp_tac (!simpset addsimps [prefix_Cons]) 1);
-by(safe_tac (!claset));
+by(simp_tac (simpset() addsimps [prefix_Cons]) 1);
+by(safe_tac (claset()));
   by(Asm_full_simp_tac 1);
   by (case_tac "zs=[]" 1);
    by(hyp_subst_tac 1);
    by(Asm_full_simp_tac 1);
   by(Fast_tac 1);
  by(res_inst_tac [("x","[x]")] exI 1);
- by(asm_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
+ by(asm_simp_tac (simpset() addsimps [eq_sym_conv]) 1);
 by(res_inst_tac [("x","x#us")] exI 1);
 by(Asm_simp_tac 1);
 qed"acc_prefix_Cons";
--- a/src/HOL/Lex/AutoChopper.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Lex/AutoChopper.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -18,7 +18,7 @@
 goal AutoChopper.thy "!st us p y ys. acc xs st (ys@[y]) us p A ~= ([],zs)";
 by (list.induct_tac "xs" 1);
 by (Simp_tac 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 val accept_not_Nil = result() repeat_RS spec;
 Addsimps [accept_not_Nil];
 
@@ -26,12 +26,12 @@
 "!st us. acc xs st [] us ([],ys) A = ([], zs) --> \
 \        zs = ys & (!ys. ys ~= [] & ys<=xs --> ~fin A (nexts A st ys))";
 by (list.induct_tac "xs" 1);
-by (simp_tac (!simpset addcongs [conj_cong]) 1);
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addcongs [conj_cong]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (strip_tac 1);
 by (rtac conjI 1);
 by (Fast_tac 1);
-by (simp_tac (!simpset addsimps [prefix_Cons] addcongs [conj_cong]) 1);
+by (simp_tac (simpset() addsimps [prefix_Cons] addcongs [conj_cong]) 1);
 by (strip_tac 1);
 by (REPEAT(eresolve_tac [conjE,exE] 1));
 by (hyp_subst_tac 1);
@@ -53,17 +53,17 @@
 \    acc xs st erk r (l,rst) A = (ys#yss, zs) --> \
 \    ys@concat(yss)@zs = (if acc_prefix A st xs then r@xs else erk@concat(l)@rst)";
 by (list.induct_tac "xs" 1);
- by (simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 by (res_inst_tac [("p","acc list (start A) [] [] ([],list) A")] PairE 1);
 by (rename_tac "vss lrst" 1);  
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 by (res_inst_tac[("xs","vss")] list_eq_cases 1);
  by (hyp_subst_tac 1);
  by (Simp_tac 1);
- by (fast_tac (!claset addSDs [no_acc]) 1);
+ by (fast_tac (claset() addSDs [no_acc]) 1);
 by (hyp_subst_tac 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 val step2_a = (result() repeat_RS spec) RS mp;
 
 
@@ -73,11 +73,11 @@
 \     (if acc_prefix A st xs \
 \      then ys ~= [] \
 \      else ys ~= [] | (erk=[] & (l,rest) = (ys#yss,zs)))";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (list.induct_tac "xs" 1);
- by (simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
  by (Fast_tac 1);
-by (asm_simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
 by (res_inst_tac [("p","acc list (start A) [] [] ([],list) A")] PairE 1);
 by (rename_tac "vss lrst" 1);  
 by (Asm_simp_tac 1);
@@ -96,11 +96,11 @@
 \     (if acc_prefix A st xs                   \
 \      then ? g. ys=r@g & fin A (nexts A st g)  \
 \      else (erk~=[] & erk=ys) | (erk=[] & (l,rest) = (ys#yss,zs)))";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (list.induct_tac "xs" 1);
- by (simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
  by (Fast_tac 1);
-by (asm_simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
 by (strip_tac 1);
 by (rtac conjI 1);
  by (res_inst_tac [("p","acc list (start A) [] [] ([],list) A")] PairE 1);
@@ -135,11 +135,11 @@
 \     (if acc_prefix A st xs       \
 \      then acc(concat(yss)@zs)(start A) [] [] ([],concat(yss)@zs) A = (yss,zs) \
 \      else (erk~=[] & (l,rest)=(yss,zs)) | (erk=[] & (l, rest)=(ys#yss,zs)))";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (list.induct_tac "xs" 1);
- by (simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
  by (Fast_tac 1);
-by (asm_simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
 by (res_inst_tac [("p","acc list (start A) [] [] ([],list) A")] PairE 1);
 by (rename_tac "vss lrst" 1);  
 by (Asm_simp_tac 1);
@@ -157,14 +157,14 @@
 by (case_tac "yss = []" 1);
  by (Asm_simp_tac 1);
  by (hyp_subst_tac 1);
- by (fast_tac (!claset addSDs [no_acc]) 1);
+ by (fast_tac (claset() addSDs [no_acc]) 1);
 by (etac ((neq_Nil_conv RS iffD1) RS exE) 1);
 by (etac exE 1);
 by (hyp_subst_tac 1);
 by (Simp_tac 1);
 by (rtac trans 1);
  by (etac step2_a 1);
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 val step2_d = (result() repeat_RS spec) RS mp;
 
 Delsimps [split_paired_All];
@@ -174,11 +174,11 @@
 \  (if acc_prefix A st xs  \
 \   then ? g. ys=r@g & (!as. as<=xs & g<=as & g~=as --> ~fin A (nexts A st as))\
 \   else (erk~=[] & ys=erk) | (erk=[] & (ys#yss,zs)=p))";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (list.induct_tac "xs" 1);
- by (simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
  by (Fast_tac 1);
-by (asm_simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
 by (strip_tac 1);
 by (case_tac "acc_prefix A (next A st a) list" 1);
  by (rtac conjI 1);
@@ -192,7 +192,7 @@
   by (Asm_simp_tac 1);
   by (rtac list_cases 1);
    by (Simp_tac 1);
-  by (asm_simp_tac (!simpset addcongs[conj_cong]) 1);
+  by (asm_simp_tac (simpset() addcongs[conj_cong]) 1);
  by (strip_tac 1);
  by (res_inst_tac [("f","%k. a#k")] ex_special 1);
  by (res_inst_tac [("t","%k. ys=r@a#k"),("s","%k. ys=(r@[a])@k")] subst 1);
@@ -203,7 +203,7 @@
  by (Asm_simp_tac 1);
  by (rtac list_cases 1);
   by (Simp_tac 1);
- by (asm_simp_tac (!simpset addcongs[conj_cong]) 1);
+ by (asm_simp_tac (simpset() addcongs[conj_cong]) 1);
 by (Asm_simp_tac 1);
 by (strip_tac 1);
 by (res_inst_tac [("x","[a]")] exI 1);
@@ -213,7 +213,7 @@
  by (Simp_tac 1);
 by (rtac list_cases 1);
  by (Simp_tac 1);
-by (asm_full_simp_tac (!simpset addsimps [acc_prefix_def] addcongs[conj_cong]) 1);
+by (asm_full_simp_tac (simpset() addsimps [acc_prefix_def] addcongs[conj_cong]) 1);
 by (etac thin_rl 1); (* speed up *)
 by (Fast_tac 1);
 val step2_e = (result() repeat_RS spec) RS mp;
@@ -225,18 +225,18 @@
 by (REPEAT(ares_tac [no_acc,allI,impI,conjI] 1));
  by (rtac mp 1);
   by (etac step2_b 2);
- by (simp_tac (!simpset addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (rtac conjI 1);
  by (rtac mp 1);
   by (etac step2_c 2);
- by (simp_tac (!simpset addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (rtac conjI 1);
- by (asm_simp_tac (!simpset addsimps [step2_a] addsplits [expand_if]) 1);
+ by (asm_simp_tac (simpset() addsimps [step2_a] addsplits [expand_if]) 1);
 by (rtac conjI 1);
  by (rtac mp 1);
   by (etac step2_d 2);
- by (simp_tac (!simpset addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (rtac mp 1);
  by (etac step2_e 2);
- by (simp_tac (!simpset addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addsplits [expand_if]) 1);
 qed"auto_chopper_is_auto_chopper";
--- a/src/HOL/Lex/Prefix.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Lex/Prefix.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -14,7 +14,7 @@
 val list_cases = result();
 
 goalw Prefix.thy [prefix_def] "[] <= xs";
-by (simp_tac (!simpset addsimps [eq_sym_conv]) 1);
+by (simp_tac (simpset() addsimps [eq_sym_conv]) 1);
 qed "Nil_prefix";
 Addsimps[Nil_prefix];
 
--- a/src/HOL/List.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/List.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -40,8 +40,8 @@
 
 goal thy "lists (A Int B) = lists A Int lists B";
 br (mono_Int RS equalityI) 1;
-by (simp_tac (!simpset addsimps [mono_def, lists_mono]) 1);
-by (blast_tac (!claset addSIs [lists_IntI]) 1);
+by (simp_tac (simpset() addsimps [mono_def, lists_mono]) 1);
+by (blast_tac (claset() addSIs [lists_IntI]) 1);
 qed "lists_Int_eq";
 Addsimps [lists_Int_eq];
 
@@ -155,11 +155,11 @@
  by(rtac allI 1);
  by(exhaust_tac "ys" 1);
   by(Asm_simp_tac 1);
- by(fast_tac (!claset addIs [less_add_Suc2] addss !simpset
+ by(fast_tac (claset() addIs [less_add_Suc2] addss simpset()
                       addEs [less_not_refl2 RSN (2,rev_notE)]) 1);
 by(rtac allI 1);
 by(exhaust_tac "ys" 1);
- by(fast_tac (!claset addIs [less_add_Suc2] addss !simpset
+ by(fast_tac (claset() addIs [less_add_Suc2] addss simpset()
                       addEs [(less_not_refl2 RS not_sym) RSN (2,rev_notE)]) 1);
 by(Asm_simp_tac 1);
 qed_spec_mp "append_eq_append_conv";
@@ -194,17 +194,17 @@
 qed "hd_append";
 
 goal thy "!!xs. xs ~= [] ==> hd(xs @ ys) = hd xs";
-by (asm_simp_tac (!simpset addsimps [hd_append]
+by (asm_simp_tac (simpset() addsimps [hd_append]
                            addsplits [split_list_case]) 1);
 qed "hd_append2";
 Addsimps [hd_append2];
 
 goal thy "tl(xs@ys) = (case xs of [] => tl(ys) | z#zs => zs@ys)";
-by (simp_tac (!simpset addsplits [split_list_case]) 1);
+by (simp_tac (simpset() addsplits [split_list_case]) 1);
 qed "tl_append";
 
 goal thy "!!xs. xs ~= [] ==> tl(xs @ ys) = (tl xs) @ ys";
-by (asm_simp_tac (!simpset addsimps [tl_append]
+by (asm_simp_tac (simpset() addsimps [tl_append]
                            addsplits [split_list_case]) 1);
 qed "tl_append2";
 Addsimps [tl_append2];
@@ -301,13 +301,13 @@
 
 goal thy "x mem (xs@ys) = (x mem xs | x mem ys)";
 by (induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed "mem_append";
 Addsimps[mem_append];
 
 goal thy "x mem [x:xs. P(x)] = (x mem xs & P(x))";
 by (induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed "mem_filter";
 Addsimps[mem_filter];
 
@@ -323,7 +323,7 @@
 
 goal thy "(x mem xs) = (x: set xs)";
 by (induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 by (Blast_tac 1);
 qed "set_mem_eq";
 
@@ -369,7 +369,7 @@
 
 goal thy "list_all P xs = (!x. x mem xs --> P(x))";
 by (induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 by (Blast_tac 1);
 qed "list_all_mem_conv";
 
@@ -380,13 +380,13 @@
 
 goal thy "filter P (xs@ys) = filter P xs @ filter P ys";
 by (induct_tac "xs" 1);
- by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+ by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed "filter_append";
 Addsimps [filter_append];
 
 goal thy "size (filter P xs) <= size xs";
 by (induct_tac "xs" 1);
- by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+ by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed "filter_size";
 
 
@@ -481,7 +481,7 @@
 (* case 0 *)
 by (Asm_full_simp_tac 1);
 (* case Suc x *)
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 qed_spec_mp "nth_mem";
 Addsimps [nth_mem];
 
@@ -489,35 +489,35 @@
 
 goal thy "last(xs@[x]) = x";
 by(induct_tac "xs" 1);
-by(ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by(ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed "last_snoc";
 Addsimps [last_snoc];
 
 goal thy "butlast(xs@[x]) = xs";
 by(induct_tac "xs" 1);
-by(ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by(ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed "butlast_snoc";
 Addsimps [butlast_snoc];
 
 goal thy
   "!ys. butlast (xs@ys) = (if ys=[] then butlast xs else xs@butlast ys)";
 by(induct_tac "xs" 1);
-by(ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by(ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed_spec_mp "butlast_append";
 
 goal thy "x:set(butlast xs) --> x:set xs";
 by(induct_tac "xs" 1);
-by(ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by(ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed_spec_mp "in_set_butlastD";
 
 goal thy "!!xs. x:set(butlast xs) ==> x:set(butlast(xs@ys))";
-by(asm_simp_tac (!simpset addsimps [butlast_append]
+by(asm_simp_tac (simpset() addsimps [butlast_append]
                           addsplits [expand_if]) 1);
-by(blast_tac (!claset addDs [in_set_butlastD]) 1);
+by(blast_tac (claset() addDs [in_set_butlastD]) 1);
 qed "in_set_butlast_appendI1";
 
 goal thy "!!xs. x:set(butlast ys) ==> x:set(butlast(xs@ys))";
-by(asm_simp_tac (!simpset addsimps [butlast_append]
+by(asm_simp_tac (simpset() addsimps [butlast_append]
                           addsplits [expand_if]) 1);
 by(Clarify_tac 1);
 by(Full_simp_tac 1);
@@ -670,14 +670,14 @@
 goal thy "takeWhile P xs @ dropWhile P xs = xs";
 by (induct_tac "xs" 1);
  by (Simp_tac 1);
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 qed "takeWhile_dropWhile_id";
 Addsimps [takeWhile_dropWhile_id];
 
 goal thy  "x:set xs & ~P(x) --> takeWhile P (xs @ ys) = takeWhile P xs";
 by (induct_tac "xs" 1);
  by (Simp_tac 1);
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 by (Blast_tac 1);
 bind_thm("takeWhile_append1", conjI RS (result() RS mp));
 Addsimps [takeWhile_append1];
@@ -686,7 +686,7 @@
   "(!x:set xs. P(x)) --> takeWhile P (xs @ ys) = xs @ takeWhile P ys";
 by (induct_tac "xs" 1);
  by (Simp_tac 1);
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 bind_thm("takeWhile_append2", ballI RS (result() RS mp));
 Addsimps [takeWhile_append2];
 
@@ -694,7 +694,7 @@
   "x:set xs & ~P(x) --> dropWhile P (xs @ ys) = (dropWhile P xs)@ys";
 by (induct_tac "xs" 1);
  by (Simp_tac 1);
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 by (Blast_tac 1);
 bind_thm("dropWhile_append1", conjI RS (result() RS mp));
 Addsimps [dropWhile_append1];
@@ -703,14 +703,14 @@
   "(!x:set xs. P(x)) --> dropWhile P (xs @ ys) = dropWhile P ys";
 by (induct_tac "xs" 1);
  by (Simp_tac 1);
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 bind_thm("dropWhile_append2", ballI RS (result() RS mp));
 Addsimps [dropWhile_append2];
 
 goal thy "x:set(takeWhile P xs) --> x:set xs & P x";
 by (induct_tac "xs" 1);
  by (Simp_tac 1);
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 qed_spec_mp"set_take_whileD";
 
 (** replicate **)
@@ -722,6 +722,6 @@
 val lemma = result();
 
 goal thy "!!n. n ~= 0 ==> set(replicate n x) = {x}";
-by(fast_tac (!claset addSDs [not0_implies_Suc] addSIs [lemma]) 1);
+by(fast_tac (claset() addSDs [not0_implies_Suc] addSIs [lemma]) 1);
 qed "set_replicate";
 Addsimps [set_replicate];
--- a/src/HOL/Map.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Map.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -33,14 +33,14 @@
 
 goalw thy [override_def]
  "((m ++ n) k = Some x) = (n k = Some x | n k = None & m k = Some x)";
-by(simp_tac (!simpset addsplits [split_option_case]) 1);
+by(simp_tac (simpset() addsplits [split_option_case]) 1);
 qed_spec_mp "override_Some_iff";
 
 bind_thm("override_SomeD", standard(override_Some_iff RS iffD1));
 
 goalw thy [override_def]
  "((m ++ n) k = None) = (n k = None & m k = None)";
-by(simp_tac (!simpset addsplits [split_option_case]) 1);
+by(simp_tac (simpset() addsplits [split_option_case]) 1);
 qed "override_None";
 AddIffs [override_None];
 
@@ -48,7 +48,7 @@
 by(induct_tac "xs" 1);
 by(Simp_tac 1);
 br ext 1;
-by(asm_simp_tac (!simpset addsplits [expand_if,split_option_case]) 1);
+by(asm_simp_tac (simpset() addsplits [expand_if,split_option_case]) 1);
 qed "map_of_append";
 Addsimps [map_of_append];
 
@@ -60,7 +60,7 @@
 Addsimps [dom_empty];
 
 goalw thy [dom_def] "dom(m[a|->b]) = insert a (dom m)";
-by(simp_tac (!simpset addsplits [expand_if]) 1);
+by(simp_tac (simpset() addsplits [expand_if]) 1);
 by(Blast_tac 1);
 qed "dom_update";
 Addsimps [dom_update];
--- a/src/HOL/MiniML/Generalize.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/MiniML/Generalize.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -45,8 +45,8 @@
 by (typ.induct_tac "t1" 1);
 by (Simp_tac 1);
 by (case_tac "nat : free_tv A" 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 by (Fast_tac 1);
 by (Asm_simp_tac 1);
 by (Fast_tac 1);
@@ -65,8 +65,8 @@
 
 goalw thy [gen_ML_def] "!!A. gen A t = gen_ML A t";
 by (typ.induct_tac "t" 1);
-by (simp_tac (!simpset addsimps [free_tv_ML_scheme_list]) 1);
-by (asm_simp_tac (!simpset addsimps [free_tv_ML_scheme_list]) 1);
+by (simp_tac (simpset() addsimps [free_tv_ML_scheme_list]) 1);
+by (asm_simp_tac (simpset() addsimps [free_tv_ML_scheme_list]) 1);
 qed "gen_eq_gen_ML";
 
 goal thy "!!S. (free_tv S) Int ((free_tv t) - (free_tv A)) = {} \
@@ -78,7 +78,7 @@
 by (Asm_full_simp_tac 1);
 by (subgoal_tac "nat ~: free_tv S" 1);
 by (Fast_tac 2);
-by (asm_full_simp_tac (!simpset addsimps [free_tv_subst,dom_def,de_Morgan_disj]) 1);
+by (asm_full_simp_tac (simpset() addsimps [free_tv_subst,dom_def,de_Morgan_disj]) 1);
 by (split_tac [expand_if] 1);
 by (cut_facts_tac [free_tv_app_subst_scheme_list] 1);
 by (Fast_tac 1);
@@ -95,21 +95,21 @@
 
 goalw Generalize.thy [le_type_scheme_def,is_bound_typ_instance]
   "gen ($ S A) ($ S t) <= $ S (gen A t)";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rename_tac "R" 1);
 by (res_inst_tac [("x", "(%a. bound_typ_inst R (gen ($S A) (S a)))")] exI 1);
 by (typ.induct_tac "t" 1);
- by (simp_tac (!simpset addsplits [expand_if]) 1);
+ by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Asm_simp_tac 1);
 qed "gen_bound_typ_instance";
 
 goalw Generalize.thy [le_type_scheme_def,is_bound_typ_instance]
   "!!A B. free_tv B <= free_tv A ==> gen A t <= gen B t";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rename_tac "S" 1);
 by (res_inst_tac [("x","%b. if b:free_tv A then TVar b else S b")] exI 1);
 by (typ.induct_tac "t" 1);
- by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+ by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
  by (Fast_tac 1);
 by (Asm_simp_tac 1);
 qed "free_tv_subset_gen_le";
@@ -123,15 +123,15 @@
 by (typ.induct_tac "t" 1);
 by (Simp_tac 1);
 by (case_tac "nat : free_tv A" 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 by (subgoal_tac "n <= n + nat" 1);
 by (forw_inst_tac [("t","A")] new_tv_le 1);
 by (assume_tac 1);
 by (dtac new_tv_not_free_tv 1);
 by (dtac new_tv_not_free_tv 1);
-by (asm_simp_tac (!simpset addsimps [diff_add_inverse]) 1);
-by (simp_tac (!simpset addsimps [le_add1]) 1);
+by (asm_simp_tac (simpset() addsimps [diff_add_inverse]) 1);
+by (simp_tac (simpset() addsimps [le_add1]) 1);
 by (Asm_simp_tac 1);
 qed_spec_mp "gen_t_le_gen_alpha_t";
 
--- a/src/HOL/MiniML/Instance.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/MiniML/Instance.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -50,7 +50,7 @@
 \         (? S. !x:bound_tv sch. B x = mk_scheme (S x))";
 by (type_scheme.induct_tac "sch" 1);
 by (Simp_tac 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rtac exI 1);
 by (rtac ballI 1);
 by (rtac sym 1);
@@ -62,12 +62,12 @@
 by (dtac sym 1);
 by (dtac sym 1);
 by (REPEAT ((dtac mp 1) THEN (Fast_tac 1)));
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rename_tac "S1 S2" 1);
 by (res_inst_tac [("x","%x. if x:bound_tv type_scheme1 then (S1 x) else (S2 x)")] exI 1);
-by (safe_tac (!claset));
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (safe_tac (claset()));
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 by (strip_tac 1);
 by (dres_inst_tac [("x","x")] bspec 1);
 by (assume_tac 1);
@@ -82,8 +82,8 @@
 goal thy "!!sch. new_tv n sch --> subst_to_scheme (%k. if n <= k then BVar (k - n) else FVar k) \
 \                                                 (bound_typ_inst (%k. TVar (k + n)) sch) = sch";
 by (type_scheme.induct_tac "sch" 1);
-by (simp_tac (!simpset addsimps [leD] addsplits [expand_if]) 1);
-by (simp_tac (!simpset addsimps [le_add2,diff_add_inverse2] addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsimps [leD] addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsimps [le_add2,diff_add_inverse2] addsplits [expand_if]) 1);
 by (Asm_simp_tac 1);
 qed_spec_mp "subst_to_scheme_inverse";
 
@@ -96,9 +96,9 @@
 \        (subst_to_scheme (%k. if n <= k then BVar (k - n) else FVar k) (bound_typ_inst S sch) = \
 \                         bound_scheme_inst ((subst_to_scheme (%k. if n <= k then BVar (k - n) else FVar k)) o S) sch)";
 by (type_scheme.induct_tac "sch" 1);
-by (simp_tac (!simpset addsplits [expand_if] addsimps [leD]) 1);
+by (simp_tac (simpset() addsplits [expand_if] addsimps [leD]) 1);
 by (Asm_simp_tac 1);
-by (asm_full_simp_tac (!simpset addsplits [expand_if] addsimps [leD]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if] addsimps [leD]) 1);
 val aux2 = result () RS mp;
 
 
@@ -120,10 +120,10 @@
 by (etac exE 1);
 by (REPEAT (etac conjE 1));
 by (dres_inst_tac [("n","n")] aux 1);
-by (asm_full_simp_tac (!simpset addsimps [subst_to_scheme_inverse]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subst_to_scheme_inverse]) 1);
 by (res_inst_tac [("x","(subst_to_scheme (%k. if n <= k then BVar (k - n) else FVar k)) o S")] exI 1);
-by (asm_simp_tac (!simpset addsimps [aux2]) 1);
-by (safe_tac (!claset));
+by (asm_simp_tac (simpset() addsimps [aux2]) 1);
+by (safe_tac (claset()));
 by (res_inst_tac [("x","%n. bound_typ_inst S (B n)")] exI 1);
 by (type_scheme.induct_tac "sch" 1);
 by (Simp_tac 1);
@@ -132,7 +132,7 @@
 qed "le_type_scheme_def2";
 
 goalw thy [is_bound_typ_instance] "(mk_scheme t) <= sch = t <| sch";
-by (simp_tac (!simpset addsimps [le_type_scheme_def2]) 1); 
+by (simp_tac (simpset() addsimps [le_type_scheme_def2]) 1); 
 by (rtac iffI 1); 
 by (etac exE 1); 
 by (forward_tac [bound_scheme_inst_type] 1);
@@ -162,7 +162,7 @@
   "(sch # A <= sch' # B) = (sch <= (sch'::type_scheme) & A <= B)";
 by (Simp_tac 1);
 by (rtac iffI 1);
- by (SELECT_GOAL(safe_tac (!claset))1);
+ by (SELECT_GOAL(safe_tac (claset()))1);
   by (eres_inst_tac [("x","0")] allE 1);
   by (Asm_full_simp_tac 1);
  by (eres_inst_tac [("x","Suc i")] allE 1);
@@ -184,15 +184,15 @@
 qed "is_bound_typ_instance_closed_subst";
 
 goal thy "!!(sch::type_scheme) sch'. sch' <= sch ==> $S sch' <= $ S sch";
-by (asm_full_simp_tac (!simpset addsimps [le_type_scheme_def2]) 1);
+by (asm_full_simp_tac (simpset() addsimps [le_type_scheme_def2]) 1);
 by (etac exE 1);
-by (asm_full_simp_tac (!simpset addsimps [substitution_lemma]) 1);
+by (asm_full_simp_tac (simpset() addsimps [substitution_lemma]) 1);
 by (Fast_tac 1);
 qed "S_compatible_le_scheme";
 
 goalw thy [le_env_def,app_subst_list] "!!(A::type_scheme list) A'. A' <= A ==> $S A' <= $ S A";
-by (simp_tac (!simpset addcongs [conj_cong]) 1);
-by (fast_tac (!claset addSIs [S_compatible_le_scheme]) 1);
+by (simp_tac (simpset() addcongs [conj_cong]) 1);
+by (fast_tac (claset() addSIs [S_compatible_le_scheme]) 1);
 qed "S_compatible_le_scheme_lists";
 
 goalw thy [le_type_scheme_def] "!!t.[| t <| sch; sch <= sch' |] ==> t <| sch'";
@@ -220,7 +220,7 @@
 by (type_scheme.induct_tac "sch" 1);
   by (Simp_tac 1);
  by (Simp_tac 1);
- by (SELECT_GOAL(safe_tac(!claset))1);
+ by (SELECT_GOAL(safe_tac(claset()))1);
  by (eres_inst_tac [("x","TVar n -> TVar n")] allE 1);
  by (Asm_full_simp_tac 1);
  by (Fast_tac 1);
@@ -248,7 +248,7 @@
 
 goalw thy [le_type_scheme_def,is_bound_typ_instance]
   "!!sch1. (sch1 =-> sch2 <= sch1' =-> sch2') ==> sch1 <= sch1' & sch2 <= sch2'";
-by (fast_tac (!claset addss !simpset) 1);
+by (fast_tac (claset() addss simpset()) 1);
 qed "Fun_le_FunD";
 
 goal thy "(sch' <= sch1 =-> sch2) --> (? sch'1 sch'2. sch' = sch'1 =-> sch'2)";
@@ -285,7 +285,7 @@
  by (Simp_tac 1);
 by (rtac allI 1);
 by (list.induct_tac "A" 1);
- by (simp_tac (!simpset addsimps [le_env_def]) 1);
+ by (simp_tac (simpset() addsimps [le_env_def]) 1);
 by (Simp_tac 1);
-by (fast_tac (!claset addDs [le_type_scheme_free_tv]) 1);
+by (fast_tac (claset() addDs [le_type_scheme_free_tv]) 1);
 qed_spec_mp "le_env_free_tv";
--- a/src/HOL/MiniML/Maybe.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/MiniML/Maybe.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -23,12 +23,12 @@
 
 goal thy
   "((option_bind m f) = None) = ((m=None) | (? p. m = Some p & f p = None))";
-by(simp_tac (!simpset addsplits [split_option_bind]) 1);
+by(simp_tac (simpset() addsplits [split_option_bind]) 1);
 qed "option_bind_eq_None";
 
 Addsimps [option_bind_eq_None];
 
 (* auxiliary lemma *)
 goal Maybe.thy "(y = Some x) = (Some x = y)";
-by( simp_tac (!simpset addsimps [eq_sym_conv]) 1);
+by( simp_tac (simpset() addsimps [eq_sym_conv]) 1);
 qed "rotate_Some";
--- a/src/HOL/MiniML/MiniML.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/MiniML/MiniML.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -12,14 +12,14 @@
 
 goal thy "!!t::typ. $(%n. if n : (free_tv A) Un (free_tv t) then (S n) else (TVar n)) t = $S t";
 by (rtac typ_substitutions_only_on_free_variables 1);
-by (asm_full_simp_tac (!simpset addsimps [Ball_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [Ball_def]) 1);
 qed "s'_t_equals_s_t";
 
 Addsimps [s'_t_equals_s_t];
 
 goal thy "!!A::type_scheme list. $(%n. if n : (free_tv A) Un (free_tv t) then (S n) else (TVar n)) A = $S A";
 by (rtac scheme_list_substitutions_only_on_free_variables 1);
-by (asm_full_simp_tac (!simpset addsimps [Ball_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [Ball_def]) 1);
 qed "s'_a_equals_s_a";
 
 Addsimps [s'_a_equals_s_a];
@@ -37,7 +37,7 @@
 
 goal thy "!!A::type_scheme list. $ (%x. TVar (if x : free_tv A then x else n + x)) A = $ id_subst A";
 by (rtac scheme_list_substitutions_only_on_free_variables 1);
-by (asm_full_simp_tac (!simpset addsimps [id_subst_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [id_subst_def]) 1);
 qed "alpha_A'";
 
 goal thy "!!A::type_scheme list. $ (%x. TVar (if x : free_tv A then x else n + x)) A = A";
@@ -82,7 +82,7 @@
 goalw thy [free_tv_subst,dom_def]
           "!!A. dom (%n. if n : free_tv A Un free_tv t then S n else TVar n) <= \
 \               free_tv A Un free_tv t";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Fast_tac 1);
 qed "dom_S'";
 
@@ -95,7 +95,7 @@
 by (dtac (dom_S' RS subsetD) 1);
 by (rotate_tac 1 1);
 by (Asm_full_simp_tac 1);
-by (fast_tac (!claset addDs [free_tv_of_substitutions_extend_to_scheme_lists] 
+by (fast_tac (claset() addDs [free_tv_of_substitutions_extend_to_scheme_lists] 
                       addIs [free_tv_of_substitutions_extend_to_types RS subsetD]) 1);
 qed "cod_S'";
 
@@ -103,14 +103,14 @@
           "!!(A::type_scheme list) (t::typ). \
 \               free_tv (%n. if n : free_tv A Un free_tv t then S n else TVar n) <= \
 \               free_tv A Un free_tv ($ S A) Un free_tv t Un free_tv ($ S t)";
-by (fast_tac (!claset addDs [dom_S' RS subsetD,cod_S' RS subsetD]) 1);
+by (fast_tac (claset() addDs [dom_S' RS subsetD,cod_S' RS subsetD]) 1);
 qed "free_tv_S'";
 
 goal thy "!!t1::typ. \
 \         (free_tv ($ (%x. TVar (if x : free_tv A then x else n + x)) t1) - free_tv A) <= \
 \         {x. ? y. x = n + y}";
 by (typ.induct_tac "t1" 1);
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Fast_tac 1);
 by (Simp_tac 1);
 by (Fast_tac 1);
@@ -149,7 +149,7 @@
 by (list.induct_tac "A" 1);
 by (Simp_tac 1);
 by (Simp_tac 1);
-by (fast_tac (!claset addDs [new_tv_Int_free_tv_empty_scheme ]) 1);
+by (fast_tac (claset() addDs [new_tv_Int_free_tv_empty_scheme ]) 1);
 val new_tv_Int_free_tv_empty_scheme_list = result ();
 
 goalw thy [le_type_scheme_def,is_bound_typ_instance] 
@@ -167,7 +167,7 @@
 by (assume_tac 1);
 by (dtac new_tv_not_free_tv 1);
 by (dtac new_tv_not_free_tv 1);
-by (asm_simp_tac (!simpset addsimps [diff_add_inverse ]) 1);
+by (asm_simp_tac (simpset() addsimps [diff_add_inverse ]) 1);
 by (Simp_tac 1);
 by (Asm_simp_tac 1);
 qed_spec_mp "gen_t_le_gen_alpha_t";
@@ -176,11 +176,11 @@
 
 goal thy "!!e. A |- e::t ==> !B. A <= B -->  B |- e::t";
 by (etac has_type.induct 1);
-   by (simp_tac (!simpset addsimps [le_env_def]) 1);
-   by (fast_tac (!claset addEs [bound_typ_instance_trans] addss !simpset) 1);
+   by (simp_tac (simpset() addsimps [le_env_def]) 1);
+   by (fast_tac (claset() addEs [bound_typ_instance_trans] addss simpset()) 1);
   by (Asm_full_simp_tac 1);
  by (Fast_tac 1);
-by (slow_tac (!claset addEs [le_env_free_tv RS free_tv_subset_gen_le]) 1);
+by (slow_tac (claset() addEs [le_env_free_tv RS free_tv_subset_gen_le]) 1);
 qed_spec_mp "has_type_le_env";
 
 (* has_type is closed w.r.t. substitution *)
@@ -189,8 +189,8 @@
 (* case VarI *)
    by (rtac allI 1);
    by (rtac has_type.VarI 1);
-    by (asm_full_simp_tac (!simpset addsimps [app_subst_list]) 1);
-   by (asm_simp_tac (!simpset addsimps [app_subst_list]) 1);
+    by (asm_full_simp_tac (simpset() addsimps [app_subst_list]) 1);
+   by (asm_simp_tac (simpset() addsimps [app_subst_list]) 1);
   (* case AbsI *)
   by (rtac allI 1);
   by (Simp_tac 1);  
--- a/src/HOL/MiniML/Type.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/MiniML/Type.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -62,12 +62,12 @@
 
 goalw thy [new_tv_def]
   "new_tv n (TVar m) = (m<n)";
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed "new_tv_TVar";
 
 goalw thy [new_tv_def]
   "new_tv n (FVar m) = (m<n)";
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed "new_tv_FVar";
 
 goalw thy [new_tv_def]
@@ -77,12 +77,12 @@
 
 goalw thy [new_tv_def]
   "new_tv n (t1 -> t2) = (new_tv n t1 & new_tv n t2)";
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed "new_tv_Fun";
 
 goalw thy [new_tv_def]
   "new_tv n (t1 =-> t2) = (new_tv n t1 & new_tv n t2)";
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed "new_tv_Fun2";
 
 goalw thy [new_tv_def]
@@ -92,12 +92,12 @@
 
 goalw thy [new_tv_def]
   "new_tv n (x#l) = (new_tv n x & new_tv n l)";
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed "new_tv_Cons";
 
 goalw thy [new_tv_def] "!!n. new_tv n TVar";
 by (strip_tac 1);
-by (asm_full_simp_tac (!simpset addsimps [free_tv_subst,dom_def,cod_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [free_tv_subst,dom_def,cod_def]) 1);
 qed "new_tv_TVar_subst";
 
 Addsimps [new_tv_TVar,new_tv_FVar,new_tv_BVar,new_tv_Fun,new_tv_Fun2,new_tv_Nil,new_tv_Cons,new_tv_TVar_subst];
@@ -181,7 +181,7 @@
 goal thy
   "!!t. (!n. n:(free_tv t) --> S1 n = S2 n) ==> $ S1 (t::typ) = $ S2 t";
 by (rtac typ_substitutions_only_on_free_variables 1);
-by (simp_tac (!simpset addsimps [Ball_def]) 1);
+by (simp_tac (simpset() addsimps [Ball_def]) 1);
 qed "eq_free_eq_subst_te";
 
 goal thy "!!S S'. (!x:free_tv sch. (S x) = (S' x)) --> $ S (sch::type_scheme) = $ S' sch";
@@ -194,16 +194,16 @@
 goal thy
   "!!sch. (!n. n:(free_tv sch) --> S1 n = S2 n) ==> $ S1 (sch::type_scheme) = $ S2 sch";
 by (rtac scheme_substitutions_only_on_free_variables 1);
-by (simp_tac (!simpset addsimps [Ball_def]) 1);
+by (simp_tac (simpset() addsimps [Ball_def]) 1);
 qed "eq_free_eq_subst_type_scheme";
 
 goal thy
   "(!n. n:(free_tv A) --> S1 n = S2 n) --> $S1 (A::type_scheme list) = $S2 A";
 by (list.induct_tac "A" 1); 
 (* case [] *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 (* case x#xl *)
-by (fast_tac (HOL_cs addIs [eq_free_eq_subst_type_scheme] addss (!simpset)) 1);
+by (fast_tac (HOL_cs addIs [eq_free_eq_subst_type_scheme] addss (simpset())) 1);
 qed_spec_mp "eq_free_eq_subst_scheme_list";
 
 goal thy "!!P Q. ((!x:A. (P x)) --> Q) ==> ((!x:A Un B. (P x)) --> Q)";
@@ -223,9 +223,9 @@
   "$ S1 (t::typ) = $ S2 t --> n:(free_tv t) --> S1 n = S2 n";
 by (typ.induct_tac "t" 1);
 (* case TVar n *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 (* case Fun t1 t2 *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed_spec_mp "eq_subst_te_eq_free";
 
 goal thy
@@ -245,9 +245,9 @@
   "$S1 (A::type_scheme list) = $S2 A --> n:(free_tv A) --> S1 n = S2 n";
 by (list.induct_tac "A" 1);
 (* case [] *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 (* case x#xl *)
-by (fast_tac (HOL_cs addIs [eq_subst_type_scheme_eq_free] addss (!simpset)) 1);
+by (fast_tac (HOL_cs addIs [eq_subst_type_scheme_eq_free] addss (simpset())) 1);
 qed_spec_mp "eq_subst_scheme_list_eq_free";
 
 goalw thy [free_tv_subst] 
@@ -278,28 +278,28 @@
 goal thy 
      "free_tv (S (v::nat)) <= insert v (cod S)";
 by (expand_case_tac "v:dom S" 1);
-by (fast_tac (set_cs addss (!simpset addsimps [cod_def])) 1);
-by (fast_tac (set_cs addss (!simpset addsimps [dom_def])) 1);
+by (fast_tac (set_cs addss (simpset() addsimps [cod_def])) 1);
+by (fast_tac (set_cs addss (simpset() addsimps [dom_def])) 1);
 qed "free_tv_subst_var";
 
 goal thy 
      "free_tv ($ S (t::typ)) <= cod S Un free_tv t";
 by (typ.induct_tac "t" 1);
 (* case TVar n *)
-by (simp_tac (!simpset addsimps [free_tv_subst_var]) 1);
+by (simp_tac (simpset() addsimps [free_tv_subst_var]) 1);
 (* case Fun t1 t2 *)
-by (fast_tac (set_cs addss !simpset) 1);
+by (fast_tac (set_cs addss simpset()) 1);
 qed "free_tv_app_subst_te";     
 
 goal thy 
      "free_tv ($ S (sch::type_scheme)) <= cod S Un free_tv sch";
 by (type_scheme.induct_tac "sch" 1);
 (* case FVar n *)
-by (simp_tac (!simpset addsimps [free_tv_subst_var]) 1);
+by (simp_tac (simpset() addsimps [free_tv_subst_var]) 1);
 (* case BVar n *)
 by (Simp_tac 1);
 (* case Fun t1 t2 *)
-by (fast_tac (set_cs addss !simpset) 1);
+by (fast_tac (set_cs addss simpset()) 1);
 qed "free_tv_app_subst_type_scheme";  
 
 goal thy 
@@ -309,7 +309,7 @@
 by (Simp_tac 1);
 (* case a#al *)
 by (cut_facts_tac [free_tv_app_subst_type_scheme] 1);
-by (fast_tac (set_cs addss !simpset) 1);
+by (fast_tac (set_cs addss simpset()) 1);
 qed "free_tv_app_subst_scheme_list";
 
 goalw thy [free_tv_subst,dom_def]
@@ -317,7 +317,7 @@
 \     free_tv s1 Un free_tv s2";
 by (fast_tac (set_cs addSDs [free_tv_app_subst_te RS subsetD,
                              free_tv_subst_var RS subsetD] 
-                     addss (!simpset delsimps bex_simps
+                     addss (simpset() delsimps bex_simps
                                      addsimps [cod_def,dom_def])) 1);
 qed "free_tv_comp_subst";
 
@@ -345,14 +345,14 @@
 by (list.induct_tac "A" 1);
 by (Simp_tac 1);
 by (Simp_tac 1);
-by (fast_tac (!claset addDs [free_tv_of_substitutions_extend_to_schemes]) 1);
+by (fast_tac (claset() addDs [free_tv_of_substitutions_extend_to_schemes]) 1);
 qed_spec_mp "free_tv_of_substitutions_extend_to_scheme_lists";
 
 Addsimps [free_tv_of_substitutions_extend_to_scheme_lists];
 
 goal thy "!!sch::type_scheme. (n : free_tv sch) = (n mem free_tv_ML sch)";
 by (type_scheme.induct_tac "sch" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 by (strip_tac 1);
 by (Fast_tac 1);
 qed "free_tv_ML_scheme";
@@ -360,7 +360,7 @@
 goal thy "!!A::type_scheme list. (n : free_tv A) = (n mem free_tv_ML A)";
 by (list.induct_tac "A" 1);
 by (Simp_tac 1);
-by (asm_simp_tac (!simpset addsimps [free_tv_ML_scheme]) 1);
+by (asm_simp_tac (simpset() addsimps [free_tv_ML_scheme]) 1);
 qed "free_tv_ML_scheme_list";
 
 
@@ -396,13 +396,13 @@
 \                (! l. l < n --> new_tv n (S l) ))";
 by (safe_tac HOL_cs );
 (* ==> *)
-by (fast_tac (HOL_cs addDs [leD] addss (!simpset addsimps [free_tv_subst,dom_def])) 1);
+by (fast_tac (HOL_cs addDs [leD] addss (simpset() addsimps [free_tv_subst,dom_def])) 1);
 by (subgoal_tac "m:cod S | S l = TVar l" 1);
 by (safe_tac HOL_cs );
-by (fast_tac (HOL_cs addDs [UnI2] addss (!simpset addsimps [free_tv_subst])) 1);
+by (fast_tac (HOL_cs addDs [UnI2] addss (simpset() addsimps [free_tv_subst])) 1);
 by (dres_inst_tac [("P","%x. m:free_tv x")] subst 1 THEN atac 1);
 by (Asm_full_simp_tac 1);
-by (fast_tac (set_cs addss (!simpset addsimps [free_tv_subst,cod_def,dom_def])) 1);
+by (fast_tac (set_cs addss (simpset() addsimps [free_tv_subst,cod_def,dom_def])) 1);
 (* <== *)
 by (rewrite_goals_tac [free_tv_subst,cod_def,dom_def] );
 by (safe_tac set_cs );
@@ -423,14 +423,14 @@
 goal thy
   "new_tv n (t::typ) --> $(%x. if x=n then t' else S x) t = $S t";
 by (typ.induct_tac "t" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed "subst_te_new_tv";
 Addsimps [subst_te_new_tv];
 
 goal thy
   "new_tv n (sch::type_scheme) --> $(%x. if x=n then sch' else S x) sch = $S sch";
 by (type_scheme.induct_tac "sch" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed_spec_mp "subst_te_new_type_scheme";
 Addsimps [subst_te_new_type_scheme];
 
@@ -444,7 +444,7 @@
 (* all greater variables are also new *)
 goalw thy [new_tv_def] 
   "!!n m. n<=m ==> new_tv n t ==> new_tv m t";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (dtac spec 1);
 by (mp_tac 1);
 by (trans_tac 1);
@@ -452,27 +452,27 @@
 Addsimps [lessI RS less_imp_le RS new_tv_le];
 
 goal thy "!!n m. n<=m ==> new_tv n (t::typ) ==> new_tv m t";
-by (asm_simp_tac (!simpset addsimps [new_tv_le]) 1);
+by (asm_simp_tac (simpset() addsimps [new_tv_le]) 1);
 qed "new_tv_typ_le";
 
 goal thy "!!n m. n<=m ==> new_tv n (A::type_scheme list) ==> new_tv m A";
-by (asm_simp_tac (!simpset addsimps [new_tv_le]) 1);
+by (asm_simp_tac (simpset() addsimps [new_tv_le]) 1);
 qed "new_scheme_list_le";
 
 goal thy "!!n m. n<=m ==> new_tv n (S::subst) ==> new_tv m S";
-by (asm_simp_tac (!simpset addsimps [new_tv_le]) 1);
+by (asm_simp_tac (simpset() addsimps [new_tv_le]) 1);
 qed "new_tv_subst_le";
 
 (* new_tv property remains if a substitution is applied *)
 goal thy
   "!!n. [| n<m; new_tv m (S::subst) |] ==> new_tv m (S n)";
-by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
+by (asm_full_simp_tac (simpset() addsimps [new_tv_subst]) 1);
 qed "new_tv_subst_var";
 
 goal thy
   "new_tv n S --> new_tv n (t::typ) --> new_tv n ($ S t)";
 by (typ.induct_tac "t" 1);
-by (ALLGOALS(fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst]))));
+by (ALLGOALS(fast_tac (HOL_cs addss (simpset() addsimps [new_tv_subst]))));
 qed_spec_mp "new_tv_subst_te";
 Addsimps [new_tv_subst_te];
 
@@ -480,7 +480,7 @@
 by (type_scheme.induct_tac "sch" 1);
 by (ALLGOALS (Asm_full_simp_tac));
 by (rewtac new_tv_def);
-by (simp_tac (!simpset addsimps [free_tv_subst,dom_def,cod_def]) 1);
+by (simp_tac (simpset() addsimps [free_tv_subst,dom_def,cod_def]) 1);
 by (strip_tac 1);
 by (case_tac "S nat = TVar nat" 1);
 by (rotate_tac 3 1);
@@ -493,13 +493,13 @@
 goal thy
   "new_tv n S --> new_tv n (A::type_scheme list) --> new_tv n ($ S A)";
 by (list.induct_tac "A" 1);
-by (ALLGOALS(fast_tac (HOL_cs addss (!simpset))));
+by (ALLGOALS(fast_tac (HOL_cs addss (simpset()))));
 qed_spec_mp "new_tv_subst_scheme_list";
 Addsimps [new_tv_subst_scheme_list];
 
 goal thy
   "new_tv n A --> new_tv (Suc n) ((TVar n)#A)";
-by (simp_tac (!simpset addsimps [new_tv_list]) 1);
+by (simp_tac (simpset() addsimps [new_tv_list]) 1);
 by (list.induct_tac "A" 1);
 by (ALLGOALS Asm_full_simp_tac);
 qed "new_tv_Suc_list";
@@ -527,13 +527,13 @@
 goal thy 
      "!! n. [| new_tv n (S::subst); new_tv n R |] ==> \
 \           new_tv n (($ R) o S)";
-by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
+by (asm_full_simp_tac (simpset() addsimps [new_tv_subst]) 1);
 qed "new_tv_subst_comp_1";
 
 goal thy
      "!! n. [| new_tv n (S::subst); new_tv n R |] ==>  \ 
 \     new_tv n (%v.$ R (S v))";
-by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
+by (asm_full_simp_tac (simpset() addsimps [new_tv_subst]) 1);
 qed "new_tv_subst_comp_2";
 
 Addsimps [new_tv_subst_comp_1,new_tv_subst_comp_2];
@@ -546,14 +546,14 @@
 Addsimps [new_tv_not_free_tv];
 
 goalw thy [max_def] "!!n::nat. m < n ==> m < max n n'";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
-by (safe_tac (!claset));
+by (simp_tac (simpset() addsplits [expand_if]) 1);
+by (safe_tac (claset()));
 by (trans_tac 1);
 qed "less_maxL";
 
 goalw thy [max_def] "!!n::nat. m < n' ==> m < max n n'";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
-by (fast_tac (!claset addDs [not_leE] addIs [less_trans]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
+by (fast_tac (claset() addDs [not_leE] addIs [less_trans]) 1);
 val less_maxR = result();
 
 goalw thy [new_tv_def] "!!t::typ. ? n. (new_tv n t)";
@@ -564,7 +564,7 @@
 by (rename_tac "n'" 1);
 by (res_inst_tac [("x","max n n'")] exI 1);
 by (Simp_tac 1);
-by (fast_tac (!claset addIs [less_maxR,less_maxL]) 1);
+by (fast_tac (claset() addIs [less_maxR,less_maxL]) 1);
 qed "fresh_variable_types";
 
 Addsimps [fresh_variable_types];
@@ -579,18 +579,18 @@
 by (rename_tac "n'" 1);
 by (res_inst_tac [("x","max n n'")] exI 1);
 by (Simp_tac 1);
-by (fast_tac (!claset addIs [less_maxR,less_maxL]) 1);
+by (fast_tac (claset() addIs [less_maxR,less_maxL]) 1);
 qed "fresh_variable_type_schemes";
 
 Addsimps [fresh_variable_type_schemes];
 
 goalw thy [max_def] "!!n::nat. n <= (max n n')";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 val le_maxL = result();
 
 goalw thy [max_def] "!!n'::nat. n' <= (max n n')";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
-by (fast_tac (!claset addDs [not_leE] addIs [less_or_eq_imp_le]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
+by (fast_tac (claset() addDs [not_leE] addIs [less_or_eq_imp_le]) 1);
 val le_maxR = result();
 
 goal thy "!!A::type_scheme list. ? n. (new_tv n A)";
@@ -604,8 +604,8 @@
 by (res_inst_tac [("x","(max n n')")] exI 1);
 by (subgoal_tac "n <= (max n n')" 1);
 by (subgoal_tac "n' <= (max n n')" 1);
-by (fast_tac (!claset addDs [new_tv_le]) 1);
-by (ALLGOALS (simp_tac (!simpset addsimps [le_maxR,le_maxL])));
+by (fast_tac (claset() addDs [new_tv_le]) 1);
+by (ALLGOALS (simp_tac (simpset() addsimps [le_maxR,le_maxL])));
 qed "fresh_variable_type_scheme_lists";
 
 Addsimps [fresh_variable_type_scheme_lists];
@@ -616,8 +616,8 @@
 by (res_inst_tac [("x","(max n1 n2)")] exI 1);
 by (subgoal_tac "n1 <= max n1 n2" 1);
 by (subgoal_tac "n2 <= max n1 n2" 1);
-by (fast_tac (!claset addDs [new_tv_le]) 1);
-by (ALLGOALS (simp_tac (!simpset addsimps [le_maxL,le_maxR])));
+by (fast_tac (claset() addDs [new_tv_le]) 1);
+by (ALLGOALS (simp_tac (simpset() addsimps [le_maxL,le_maxR])));
 qed "make_one_new_out_of_two";
 
 goal thy "!!(A::type_scheme list) (A'::type_scheme list) (t::typ) (t'::typ). \
@@ -637,7 +637,7 @@
 by (rename_tac "n2 n1" 1);
 by (res_inst_tac [("x","(max n1 n2)")] exI 1);
 by (rewtac new_tv_def);
-by (fast_tac (!claset addIs [less_maxL,less_maxR]) 1);
+by (fast_tac (claset() addIs [less_maxL,less_maxR]) 1);
 qed "ex_fresh_variable";
 
 (* mgu does not introduce new type variables *)
@@ -665,7 +665,7 @@
 
 goal thy "!!A::type_scheme list. $ TVar A = A";
 by (rtac list.induct 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsimps [app_subst_list])));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [app_subst_list])));
 qed "subst_TVar_scheme_list";
 
 Addsimps [subst_TVar_scheme_list];
@@ -698,7 +698,7 @@
 
 goal thy "!!sch::type_scheme. $ id_subst sch = sch";
 by (type_scheme.induct_tac "sch" 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsimps [id_subst_def])));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [id_subst_def])));
 qed "id_subst_sch";
 
 Addsimps [id_subst_sch];
@@ -736,12 +736,12 @@
 (* case [] *)
 by (Simp_tac 1);
 (* case x#xl *)
-by (asm_full_simp_tac (!simpset addsimps [subst_comp_type_scheme]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subst_comp_type_scheme]) 1);
 qed "subst_comp_scheme_list";
 
 goal thy "!!A::type_scheme list. !x : free_tv A. S x = (TVar x) ==> $ S A = $ id_subst A";
 by (rtac scheme_list_substitutions_only_on_free_variables 1);
-by (asm_full_simp_tac (!simpset addsimps [id_subst_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [id_subst_def]) 1);
 qed "subst_id_on_type_scheme_list'";
 
 goal thy "!!A::type_scheme list. !x : free_tv A. S x = (TVar x) ==> $ S A = A";
--- a/src/HOL/MiniML/W.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/MiniML/W.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -18,23 +18,23 @@
         "!A n S t m. W e A n  = Some (S,t,m) --> n<=m";
 by (expr.induct_tac "e" 1);
 (* case Var(n) *)
-by (simp_tac (!simpset addsplits [split_option_bind,expand_if]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind,expand_if]) 1);
 (* case Abs e *)
-by (simp_tac (!simpset addsplits [split_option_bind]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind]) 1);
 by (fast_tac (HOL_cs addDs [Suc_leD]) 1);
 (* case App e1 e2 *)
-by (simp_tac (!simpset addsplits [split_option_bind]) 1);
-by(blast_tac (!claset addIs [le_SucI,le_trans]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind]) 1);
+by(blast_tac (claset() addIs [le_SucI,le_trans]) 1);
 (* case LET e1 e2 *)
-by (simp_tac (!simpset addsplits [split_option_bind]) 1);
-by(blast_tac (!claset addIs [le_trans]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind]) 1);
+by(blast_tac (claset() addIs [le_trans]) 1);
 qed_spec_mp "W_var_ge";
 
 Addsimps [W_var_ge];
 
 goal thy
         "!! s. Some (S,t,m) = W e A n ==> n<=m";
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 1);
 qed "W_var_geD";
 
 goal thy "!! s. new_tv n A ==> Some (S,t,m) = W e A n ==> new_tv m A";
@@ -47,7 +47,7 @@
 goal thy "!!sch. new_tv n sch --> new_tv (n + (min_new_bound_tv sch)) (bound_typ_inst (%b. TVar (b + n)) sch)";
 by (type_scheme.induct_tac "sch" 1);
 by (Asm_full_simp_tac 1);
-by (asm_full_simp_tac (!simpset addsimps [add_commute]) 1);
+by (asm_full_simp_tac (simpset() addsimps [add_commute]) 1);
 by (strip_tac 1);
 by (Asm_full_simp_tac 1);
 by (etac conjE 1);
@@ -58,7 +58,7 @@
 by (assume_tac 2);
 by (rtac add_le_mono 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsplits [expand_if] addsimps [max_def]) 1);
+by (simp_tac (simpset() addsplits [expand_if] addsimps [max_def]) 1);
 by (strip_tac 1);
 by (rtac new_tv_le 1);
 by (mp_tac 2);
@@ -66,7 +66,7 @@
 by (assume_tac 2);
 by (rtac add_le_mono 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsplits [expand_if] addsimps [max_def]) 1);
+by (simp_tac (simpset() addsplits [expand_if] addsimps [max_def]) 1);
 by (strip_tac 1);
 by (dtac not_leE 1);
 by (rtac less_or_eq_imp_le 1);
@@ -81,21 +81,21 @@
 \                 new_tv m S & new_tv m t";
 by (expr.induct_tac "e" 1);
 (* case Var n *)
-by (simp_tac (!simpset addsplits [split_option_bind,expand_if]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind,expand_if]) 1);
 by (strip_tac 1);
 by (dtac new_tv_nth_nat_A 1);
 by (assume_tac 1);
 by (Asm_simp_tac 1);
 (* case Abs e *)
-by (simp_tac (!simpset addsimps [new_tv_subst,new_tv_Suc_list] 
+by (simp_tac (simpset() addsimps [new_tv_subst,new_tv_Suc_list] 
     addsplits [split_option_bind]) 1);
 by (strip_tac 1);
 by (eres_inst_tac [("x","Suc n")] allE 1);
 by (eres_inst_tac [("x","(FVar n)#A")] allE 1);
-by (fast_tac (HOL_cs addss (!simpset
+by (fast_tac (HOL_cs addss (simpset()
               addsimps [new_tv_subst,new_tv_Suc_list])) 1);
 (* case App e1 e2 *)
-by (simp_tac (!simpset addsplits [split_option_bind]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind]) 1);
 by (strip_tac 1);
 by (rename_tac "S1 t1 n1 S2 t2 n2 S3" 1);
 by (eres_inst_tac [("x","n")] allE 1);
@@ -104,18 +104,18 @@
 by (eres_inst_tac [("x","t1")] allE 1);
 by (eres_inst_tac [("x","n1")] allE 1);
 by (eres_inst_tac [("x","n1")] allE 1);
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv] delsimps all_simps) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv] delsimps all_simps) 1);
 by (eres_inst_tac [("x","$S1 A")] allE 1);
 by (eres_inst_tac [("x","S2")] allE 1);
 by (eres_inst_tac [("x","t2")] allE 1);
 by (eres_inst_tac [("x","n2")] allE 1);
-by ( asm_full_simp_tac (!simpset addsimps [o_def,rotate_Some]) 1);
+by ( asm_full_simp_tac (simpset() addsimps [o_def,rotate_Some]) 1);
 by (rtac conjI 1);
 by (rtac new_tv_subst_comp_2 1);
 by (rtac new_tv_subst_comp_2 1);
 by (rtac (lessI RS less_imp_le RS new_tv_le) 1); 
 by (res_inst_tac [("n","n1")] new_tv_subst_le 1); 
-by (asm_full_simp_tac (!simpset addsimps [rotate_Some]) 1);
+by (asm_full_simp_tac (simpset() addsimps [rotate_Some]) 1);
 by (Asm_simp_tac 1);
 by (fast_tac (HOL_cs addDs [W_var_geD] addIs
      [new_scheme_list_le,new_tv_subst_scheme_list,lessI RS less_imp_le RS new_tv_subst_le])
@@ -126,18 +126,18 @@
    new_tv_subst_le,new_tv_le]) 1);
 by (fast_tac (HOL_cs addDs [W_var_geD] addIs
      [new_scheme_list_le,new_tv_subst_scheme_list,new_tv_le] 
-        addss (!simpset)) 1);
+        addss (simpset())) 1);
 by (rtac (lessI RS new_tv_subst_var) 1);
 by (etac (sym RS mgu_new) 1);
 by (best_tac (HOL_cs addSIs [lessI RS less_imp_le RS new_tv_le,new_tv_subst_te]
    addDs [W_var_geD] addIs
    [new_scheme_list_le,new_tv_subst_scheme_list,lessI RS less_imp_le RS
-   new_tv_subst_le,new_tv_le] addss !simpset) 1);
+   new_tv_subst_le,new_tv_le] addss simpset()) 1);
 by (fast_tac (HOL_cs addDs [W_var_geD] addIs
      [new_scheme_list_le,new_tv_subst_scheme_list,new_tv_le]
-     addss (!simpset)) 1);
+     addss (simpset())) 1);
 (* 41: case LET e1 e2 *)
-by (simp_tac (!simpset addsplits [split_option_bind]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind]) 1);
 by (strip_tac 1);
 by(EVERY1[etac allE,etac allE,etac allE,etac allE,etac allE,mp_tac,mp_tac]);
 by (etac conjE 1);
@@ -150,7 +150,7 @@
 by (strip_tac 1);
 by (SELECT_GOAL(rewtac free_tv_subst) 1);
 by (dtac (free_tv_app_subst_scheme_list RS subsetD) 1);
-by (best_tac (!claset addEs [less_le_trans]) 1);
+by (best_tac (claset() addEs [less_le_trans]) 1);
 by (etac conjE 1);
 by (rtac conjI 1);
 by (rtac new_tv_subst_comp_2 1);
@@ -177,18 +177,18 @@
 \         (v:free_tv S | v:free_tv t) --> v<n --> v:free_tv A";
 by (expr.induct_tac "e" 1);
 (* case Var n *)
-by (simp_tac (!simpset addsimps
+by (simp_tac (simpset() addsimps
     [free_tv_subst] addsplits [split_option_bind,expand_if]) 1);
 by (strip_tac 1);
 by (case_tac "v : free_tv (nth nat A)" 1);
 by (Asm_full_simp_tac 1);
 by (dtac free_tv_bound_typ_inst1 1);
-by (simp_tac (!simpset addsimps [o_def]) 1);
+by (simp_tac (simpset() addsimps [o_def]) 1);
 by (etac exE 1);
 by (rotate_tac 3 1);
 by (Asm_full_simp_tac 1);
 (* case Abs e *)
-by (asm_full_simp_tac (!simpset addsimps
+by (asm_full_simp_tac (simpset() addsimps
     [free_tv_subst] addsplits [split_option_bind] delsimps all_simps) 1);
 by (strip_tac 1);
 by (rename_tac "S t n1 S1 t1 m v" 1);
@@ -199,9 +199,9 @@
 by (eres_inst_tac [("x","n1")] allE 1);
 by (eres_inst_tac [("x","v")] allE 1);
 by (best_tac (HOL_cs addIs [cod_app_subst]
-                     addss (!simpset addsimps [less_Suc_eq])) 1);
+                     addss (simpset() addsimps [less_Suc_eq])) 1);
 (* case App e1 e2 *)
-by (simp_tac (!simpset addsplits [split_option_bind] delsimps all_simps) 1);
+by (simp_tac (simpset() addsplits [split_option_bind] delsimps all_simps) 1);
 by (strip_tac 1); 
 by (rename_tac "S t n1 S1 t1 n2 S2 S3 t2 m v" 1);
 by (eres_inst_tac [("x","n")] allE 1);
@@ -218,7 +218,7 @@
 by (eres_inst_tac [("x","n2")] allE 1);
 by (eres_inst_tac [("x","v")] allE 1);
 by (safe_tac (empty_cs addSIs [conjI,impI] addSEs [conjE]) ); 
-by (asm_full_simp_tac (!simpset addsimps [rotate_Some,o_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [rotate_Some,o_def]) 1);
 by (dtac W_var_geD 1);
 by (dtac W_var_geD 1);
 by ( (forward_tac [less_le_trans] 1) THEN (assume_tac 1) );
@@ -226,7 +226,7 @@
     codD,free_tv_app_subst_te RS subsetD,free_tv_app_subst_scheme_list RS subsetD,
     less_le_trans,less_not_refl2,subsetD]
   addEs [UnE] 
-  addss !simpset) 1);
+  addss simpset()) 1);
 by (Asm_full_simp_tac 1); 
 by (dtac (sym RS W_var_geD) 1);
 by (dtac (sym RS W_var_geD) 1);
@@ -235,9 +235,9 @@
     free_tv_app_subst_te RS subsetD,free_tv_app_subst_scheme_list RS subsetD,
     less_le_trans,subsetD]
   addEs [UnE]
-  addss !simpset) 1);
+  addss simpset()) 1);
 (* LET e1 e2 *)
-by (simp_tac (!simpset addsplits [split_option_bind] delsimps all_simps) 1);
+by (simp_tac (simpset() addsplits [split_option_bind] delsimps all_simps) 1);
 by (strip_tac 1); 
 by (rename_tac "nat A S1 t1 n2 S2 t2 m2 S t m v" 1);
 by (eres_inst_tac [("x","nat")] allE 1);
@@ -253,9 +253,9 @@
 by (mp_tac 1);
 by (Asm_full_simp_tac 1);
 by (rtac conjI 1);
-by (fast_tac (!claset addSDs [codD,free_tv_app_subst_scheme_list RS subsetD,free_tv_o_subst RS subsetD,W_var_ge] 
+by (fast_tac (claset() addSDs [codD,free_tv_app_subst_scheme_list RS subsetD,free_tv_o_subst RS subsetD,W_var_ge] 
               addDs [less_le_trans]) 1);
-by (fast_tac (!claset addSDs [codD,free_tv_app_subst_scheme_list RS subsetD,W_var_ge] 
+by (fast_tac (claset() addSDs [codD,free_tv_app_subst_scheme_list RS subsetD,W_var_ge] 
               addDs [less_le_trans]) 1);
 qed_spec_mp "free_tv_W"; 
 
@@ -272,15 +272,15 @@
         "!A S t m n . new_tv n A --> Some (S,t,m) = W e A n --> $S A |- e :: t";
 by (expr.induct_tac "e" 1);
 (* case Var n *)
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 by (strip_tac 1);
 by (rtac has_type.VarI 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsimps [is_bound_typ_instance]) 1);
+by (simp_tac (simpset() addsimps [is_bound_typ_instance]) 1);
 by (rtac exI 1);
 by (rtac refl 1);
 (* case Abs e *)
-by (asm_full_simp_tac (!simpset addsimps [app_subst_list]
+by (asm_full_simp_tac (simpset() addsimps [app_subst_list]
                         addsplits [split_option_bind]) 1);
 by (strip_tac 1);
 by (eres_inst_tac [("x","(mk_scheme (TVar n)) # A")] allE 1);
@@ -294,7 +294,7 @@
 by (Asm_simp_tac 1);
 by (assume_tac 1);
 (* case App e1 e2 *)
-by (simp_tac (!simpset addsplits [split_option_bind]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind]) 1);
 by (strip_tac 1);
 by (rename_tac "S1 t1 n1 S2 t2 n2 S3" 1);
 by (res_inst_tac [("t2.0","$ S3 t2")] has_type.AppI 1);
@@ -304,8 +304,8 @@
 by (Asm_full_simp_tac 1);
 by (simp_tac (HOL_ss addsimps [subst_comp_scheme_list RS sym]) 1);
 by ((rtac (has_type_cl_sub RS spec) 1) THEN (rtac (has_type_cl_sub RS spec) 1));
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
-by (asm_full_simp_tac (!simpset addsimps [subst_comp_scheme_list RS sym,o_def,has_type_cl_sub,eq_sym_conv]) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subst_comp_scheme_list RS sym,o_def,has_type_cl_sub,eq_sym_conv]) 1);
 by (rtac (has_type_cl_sub RS spec) 1);
 by (forward_tac [new_tv_W] 1);
 by (assume_tac 1);
@@ -326,11 +326,11 @@
 by (mp_tac 1);
 by (assume_tac 1);
 (* case Let e1 e2 *)
-by (simp_tac (!simpset addsplits [split_option_bind]) 1);
+by (simp_tac (simpset() addsplits [split_option_bind]) 1);
 by (strip_tac 1);
 by (rename_tac "w q m1 S1 t1 m2 S2 t n2" 1); 
 by (res_inst_tac [("t1.0","$ S2 t1")] has_type.LETI 1);
-by (simp_tac (!simpset addsimps [o_def]) 1);
+by (simp_tac (simpset() addsimps [o_def]) 1);
 by (simp_tac (HOL_ss addsimps [subst_comp_scheme_list RS sym]) 1);
 by (rtac (has_type_cl_sub RS spec) 1);
 by (dres_inst_tac [("x","A")] spec 1);
@@ -340,8 +340,8 @@
 by (rotate_tac 4 1);
 by (dres_inst_tac [("x","m1")] spec 1);
 by (mp_tac 1);
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
-by (simp_tac (!simpset addsimps [o_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 1);
+by (simp_tac (simpset() addsimps [o_def]) 1);
 by (simp_tac (HOL_ss addsimps [subst_comp_scheme_list RS sym]) 1);
 by (rtac (gen_subst_commutes RS sym RS subst) 1);
 by (rtac (app_subst_Cons RS subst) 2);
@@ -385,7 +385,7 @@
 by (rtac new_tv_not_free_tv 1);
 by (rtac new_tv_le 1);
 by (assume_tac 2);
-by (asm_full_simp_tac (!simpset addsimps [not_less_iff_le]) 1);
+by (asm_full_simp_tac (simpset() addsimps [not_less_iff_le]) 1);
 qed_spec_mp "W_correct_lemma";
 
 goal Arith.thy "!!n::nat. ~ k+n < n";
@@ -403,16 +403,16 @@
 by (expr.induct_tac "e" 1);
 (* case Var n *)
 by (strip_tac 1);
-by (simp_tac (!simpset addcongs [conj_cong] addsplits [expand_if]) 1);
+by (simp_tac (simpset() addcongs [conj_cong] addsplits [expand_if]) 1);
 by (eresolve_tac has_type_casesE 1); 
-by (asm_full_simp_tac (!simpset addsimps [is_bound_typ_instance]) 1);
+by (asm_full_simp_tac (simpset() addsimps [is_bound_typ_instance]) 1);
 by (etac exE 1);
 by (hyp_subst_tac 1);
 by (rename_tac "S" 1);
 by (res_inst_tac [("x","%x. (if x < n then S' x else S (x - n))")] exI 1);
 by (rtac conjI 1);
 by (Asm_simp_tac 1);
-by (asm_simp_tac (!simpset addsimps [(bound_typ_inst_composed_subst RS sym),new_tv_nth_nat_A,o_def,nth_subst] 
+by (asm_simp_tac (simpset() addsimps [(bound_typ_inst_composed_subst RS sym),new_tv_nth_nat_A,o_def,nth_subst] 
                            delsimps [bound_typ_inst_composed_subst]) 1);
 (** LEVEL 12 **)
 (* case Abs e *)
@@ -423,7 +423,7 @@
 by (eres_inst_tac [("x","t2")] allE 1);
 by (eres_inst_tac [("x","Suc n")] allE 1);
 by (best_tac (HOL_cs addSDs [mk_scheme_injective] 
-                  addss (!simpset addcongs [conj_cong] 
+                  addss (simpset() addcongs [conj_cong] 
                                 addsplits [split_option_bind])) 1);
 (** LEVEL 19 **)
 
@@ -455,7 +455,7 @@
 by (res_inst_tac [("t","$ (%x. if x = ma then t' else \
 \   (if x:(free_tv t - free_tv Sa) then R x else Ra x)) ($ Sa t)"),
     ("s","($ Ra ta) -> t'")] ssubst 2);
-by (asm_simp_tac (!simpset addsimps [subst_comp_te]) 2);
+by (asm_simp_tac (simpset() addsimps [subst_comp_te]) 2);
 by (rtac eq_free_eq_subst_te 2);  
 by (strip_tac 2);
 by (subgoal_tac "na ~=ma" 2);
@@ -464,7 +464,7 @@
 by (case_tac "na:free_tv Sa" 2);
 (* n1 ~: free_tv S1 *)
 by (forward_tac [not_free_impl_id] 3);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 3);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 3);
 (* na : free_tv Sa *)
 by (dres_inst_tac [("A1","$ S A")] (subst_comp_scheme_list RSN (2,trans)) 2);
 by (dtac eq_subst_scheme_list_eq_free 2);
@@ -472,7 +472,7 @@
 by (Asm_simp_tac 2); 
 by (case_tac "na:dom Sa" 2);
 (* na ~: dom Sa *)
-by (asm_full_simp_tac (!simpset addsimps [dom_def] addsplits [expand_if]) 3);
+by (asm_full_simp_tac (simpset() addsimps [dom_def] addsplits [expand_if]) 3);
 (* na : dom Sa *)
 by (rtac eq_free_eq_subst_te 2);
 by (strip_tac 2);
@@ -482,8 +482,8 @@
 by (dtac new_tv_subst_scheme_list 3);
 by (fast_tac (HOL_cs addIs [new_scheme_list_le] addDs [sym RS W_var_geD]) 3);
 by (fast_tac (set_cs addDs [new_tv_W,new_tv_not_free_tv] addss 
-    (!simpset addsimps [cod_def,free_tv_subst])) 3);
-by (fast_tac (set_cs addss (!simpset addsimps [cod_def,free_tv_subst] 
+    (simpset() addsimps [cod_def,free_tv_subst])) 3);
+by (fast_tac (set_cs addss (simpset() addsimps [cod_def,free_tv_subst] 
                                      addsplits [expand_if])) 2);
 by (Simp_tac 2);  
 by (rtac eq_free_eq_subst_te 2);
@@ -495,31 +495,31 @@
 by (fast_tac (HOL_cs addDs [new_scheme_list_le,new_tv_subst_scheme_list,new_tv_W,new_tv_not_free_tv]) 3);
 by (case_tac "na: free_tv t - free_tv Sa" 2);
 (* case na ~: free_tv t - free_tv Sa *)
-by ( asm_full_simp_tac (!simpset addsplits [expand_if]) 3);
+by ( asm_full_simp_tac (simpset() addsplits [expand_if]) 3);
 by (Fast_tac 3);
 (* case na : free_tv t - free_tv Sa *)
-by ( asm_full_simp_tac (!simpset addsplits [expand_if]) 2);
+by ( asm_full_simp_tac (simpset() addsplits [expand_if]) 2);
 by (dres_inst_tac [("A1","$ S A")] (subst_comp_scheme_list RSN (2,trans)) 2);
 by (dtac eq_subst_scheme_list_eq_free 2);
 by (fast_tac (HOL_cs addIs [free_tv_W,free_tv_le_new_tv] addDs [new_tv_W]) 2);
 (** LEVEL 75 **)
-by (asm_full_simp_tac (!simpset addsimps [free_tv_subst,dom_def]) 2);
-by (asm_simp_tac (!simpset addsplits [split_option_bind]) 1); 
+by (asm_full_simp_tac (simpset() addsimps [free_tv_subst,dom_def]) 2);
+by (asm_simp_tac (simpset() addsplits [split_option_bind]) 1); 
 by (safe_tac HOL_cs );
 by (dtac mgu_Some 1);
-by ( fast_tac (HOL_cs addss !simpset) 1);
+by ( fast_tac (HOL_cs addss simpset()) 1);
 (** LEVEL 80 *)
 by ((dtac mgu_mg 1) THEN (atac 1));
 by (etac exE 1);
 by (res_inst_tac [("x","Rb")] exI 1);
 by (rtac conjI 1);
 by (dres_inst_tac [("x","ma")] fun_cong 2);
-by ( asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 2);
-by (simp_tac (!simpset addsimps [subst_comp_scheme_list]) 1);
-by (simp_tac (!simpset addsimps [subst_comp_scheme_list RS sym]) 1);
+by ( asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 2);
+by (simp_tac (simpset() addsimps [subst_comp_scheme_list]) 1);
+by (simp_tac (simpset() addsimps [subst_comp_scheme_list RS sym]) 1);
 by (res_inst_tac [("A2","($ Sa ($ S A))")]
        ((subst_comp_scheme_list RS sym) RSN (2,trans)) 1);
-by ( asm_full_simp_tac (!simpset addsimps [o_def,eq_sym_conv]) 1);
+by ( asm_full_simp_tac (simpset() addsimps [o_def,eq_sym_conv]) 1);
 by (rtac eq_free_eq_subst_scheme_list 1);
 by ( safe_tac HOL_cs );
 by (subgoal_tac "ma ~= na" 1);
@@ -534,12 +534,12 @@
     new_tv_not_free_tv]) 2);
 by (case_tac "na: free_tv t - free_tv Sa" 1);
 (* case na ~: free_tv t - free_tv Sa *)
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 2);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 2);
 (* case na : free_tv t - free_tv Sa *)
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 by (dtac (free_tv_app_subst_scheme_list RS subsetD) 1);
 by (fast_tac (set_cs addDs [codD,subst_comp_scheme_list RSN (2,trans),
-    eq_subst_scheme_list_eq_free] addss ((!simpset addsimps 
+    eq_subst_scheme_list_eq_free] addss ((simpset() addsimps 
     [free_tv_subst,dom_def]))) 1);
 by (Fast_tac 1);
 (* case Let e1 e2 *)
@@ -567,11 +567,11 @@
 by (forward_tac [new_tv_compatible_W] 1);
 by (rtac sym 1);
 by (assume_tac 1);
-by (fast_tac (!claset addDs [new_tv_compatible_gen,new_tv_subst_scheme_list,new_tv_W]) 1);
+by (fast_tac (claset() addDs [new_tv_compatible_gen,new_tv_subst_scheme_list,new_tv_W]) 1);
 by (safe_tac HOL_cs);
 by (Asm_full_simp_tac 1);
 by (res_inst_tac [("x","Ra")] exI 1);
-by (simp_tac (!simpset addsimps [o_def,subst_comp_scheme_list RS sym]) 1);
+by (simp_tac (simpset() addsimps [o_def,subst_comp_scheme_list RS sym]) 1);
 qed_spec_mp "W_complete_lemma";
 
 goal W.thy
--- a/src/HOL/Modelcheck/MCSyn.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Modelcheck/MCSyn.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -36,5 +36,5 @@
 
 
 val MC_ss =
-  !simpset addsimprocs [pair_eta_expand_proc]
+  simpset() addsimprocs [pair_eta_expand_proc]
     addsimps [split_paired_Ex, Let_def];
--- a/src/HOL/NatDef.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/NatDef.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -28,7 +28,7 @@
     "[| i: Nat;  P(Zero_Rep);   \
 \       !!j. [| j: Nat; P(j) |] ==> P(Suc_Rep(j)) |]  ==> P(i)";
 by (rtac ([Nat_def, Nat_fun_mono, major] MRS def_induct) 1);
-by (blast_tac (!claset addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
 qed "Nat_induct";
 
 val prems = goalw thy [Zero_def,Suc_def]
@@ -64,7 +64,7 @@
 val prems = goal thy 
     "[| n=0 ==> P;  !!x. n = Suc(x) ==> P |] ==> P";
 by (subgoal_tac "n=0 | (EX x. n = Suc(x))" 1);
-by (fast_tac (!claset addSEs prems) 1);
+by (fast_tac (claset() addSEs prems) 1);
 by (nat_ind_tac "n" 1);
 by (rtac (refl RS disjI1) 1);
 by (Blast_tac 1);
@@ -144,11 +144,11 @@
 (*** nat_case -- the selection operator for nat ***)
 
 goalw thy [nat_case_def] "nat_case a f 0 = a";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "nat_case_0";
 
 goalw thy [nat_case_def] "nat_case a f (Suc k) = f(k)";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "nat_case_Suc";
 
 goalw thy [wf_def, pred_nat_def] "wf(pred_nat)";
@@ -176,12 +176,12 @@
 
 goal thy "nat_rec c h 0 = c";
 by (rtac (nat_rec_unfold RS trans) 1);
-by (simp_tac (!simpset addsimps [nat_case_0]) 1);
+by (simp_tac (simpset() addsimps [nat_case_0]) 1);
 qed "nat_rec_0";
 
 goal thy "nat_rec c h (Suc n) = h n (nat_rec c h n)";
 by (rtac (nat_rec_unfold RS trans) 1);
-by (simp_tac (!simpset addsimps [nat_case_Suc, pred_nat_def, cut_apply]) 1);
+by (simp_tac (simpset() addsimps [nat_case_Suc, pred_nat_def, cut_apply]) 1);
 qed "nat_rec_Suc";
 
 (*These 2 rules ease the use of primitive recursion.  NOTE USE OF == *)
@@ -218,7 +218,7 @@
 qed "less_trans";
 
 goalw thy [less_def, pred_nat_def] "n < Suc(n)";
-by (simp_tac (!simpset addsimps [r_into_trancl]) 1);
+by (simp_tac (simpset() addsimps [r_into_trancl]) 1);
 qed "lessI";
 AddIffs [lessI];
 
@@ -237,7 +237,7 @@
 (** Elimination properties **)
 
 val prems = goalw thy [less_def] "n<m ==> ~ m<(n::nat)";
-by (blast_tac (!claset addIs ([wf_pred_nat, wf_trancl RS wf_asym]@prems))1);
+by (blast_tac (claset() addIs ([wf_pred_nat, wf_trancl RS wf_asym]@prems))1);
 qed "less_not_sym";
 
 (* [| n<m; m<n |] ==> R *)
@@ -252,7 +252,7 @@
 bind_thm ("less_irrefl", (less_not_refl RS notE));
 
 goal thy "!!m. n<m ==> m ~= (n::nat)";
-by (blast_tac (!claset addSEs [less_irrefl]) 1);
+by (blast_tac (claset() addSEs [less_irrefl]) 1);
 qed "less_not_refl2";
 
 
@@ -287,11 +287,11 @@
 qed "less_SucE";
 
 goal thy "(m < Suc(n)) = (m < n | m = n)";
-by (blast_tac (!claset addSEs [less_SucE] addIs [less_trans]) 1);
+by (blast_tac (claset() addSEs [less_SucE] addIs [less_trans]) 1);
 qed "less_Suc_eq";
 
 goal thy "(n<1) = (n=0)";
-by (simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+by (simp_tac (simpset() addsimps [less_Suc_eq]) 1);
 qed "less_one";
 AddIffs [less_one];
 
@@ -315,7 +315,7 @@
 val [prem] = goal thy "Suc(m) < n ==> m<n";
 by (rtac (prem RS rev_mp) 1);
 by (nat_ind_tac "n" 1);
-by (ALLGOALS (fast_tac (!claset addSIs [lessI RS less_SucI]
+by (ALLGOALS (fast_tac (claset() addSIs [lessI RS less_SucI]
                                 addEs  [less_trans, lessE])));
 qed "Suc_lessD";
 
@@ -329,13 +329,13 @@
 qed "Suc_lessE";
 
 goal thy "!!m n. Suc(m) < Suc(n) ==> m<n";
-by (blast_tac (!claset addEs [lessE, make_elim Suc_lessD]) 1);
+by (blast_tac (claset() addEs [lessE, make_elim Suc_lessD]) 1);
 qed "Suc_less_SucD";
 
 goal thy "!!m n. m<n ==> Suc(m) < Suc(n)";
 by (etac rev_mp 1);
 by (nat_ind_tac "n" 1);
-by (ALLGOALS (fast_tac (!claset addEs  [less_trans, lessE])));
+by (ALLGOALS (fast_tac (claset() addEs  [less_trans, lessE])));
 qed "Suc_mono";
 
 
@@ -345,15 +345,15 @@
 Addsimps [Suc_less_eq];
 
 goal thy "~(Suc(n) < n)";
-by (blast_tac (!claset addEs [Suc_lessD RS less_irrefl]) 1);
+by (blast_tac (claset() addEs [Suc_lessD RS less_irrefl]) 1);
 qed "not_Suc_n_less_n";
 Addsimps [not_Suc_n_less_n];
 
 goal thy "!!i. i<j ==> j<k --> Suc i < k";
 by (nat_ind_tac "k" 1);
-by (ALLGOALS (asm_simp_tac (!simpset)));
-by (asm_simp_tac (!simpset addsimps [less_Suc_eq]) 1);
-by (blast_tac (!claset addDs [Suc_lessD]) 1);
+by (ALLGOALS (asm_simp_tac (simpset())));
+by (asm_simp_tac (simpset() addsimps [less_Suc_eq]) 1);
+by (blast_tac (claset() addDs [Suc_lessD]) 1);
 qed_spec_mp "less_trans_Suc";
 
 (*"Less than" is a linear ordering*)
@@ -362,7 +362,7 @@
 by (nat_ind_tac "n" 1);
 by (rtac (refl RS disjI1 RS disjI2) 1);
 by (rtac (zero_less_Suc RS disjI1) 1);
-by (blast_tac (!claset addIs [Suc_mono, less_SucI] addEs [lessE]) 1);
+by (blast_tac (claset() addIs [Suc_mono, less_SucI] addEs [lessE]) 1);
 qed "less_linear";
 
 qed_goal "nat_less_cases" thy 
@@ -435,8 +435,8 @@
           nat_case_0, nat_case_Suc, nat_rec_0, nat_rec_Suc];
 
 goal thy "!!m. (m <= Suc(n)) = (m<=n | m = Suc n)";
-by (simp_tac (!simpset addsimps [le_eq_less_Suc]) 1);
-by (blast_tac (!claset addSEs [less_SucE] addIs [less_SucI]) 1);
+by (simp_tac (simpset() addsimps [le_eq_less_Suc]) 1);
+by (blast_tac (claset() addSEs [less_SucE] addIs [less_SucI]) 1);
 qed "le_Suc_eq";
 
 (*
@@ -473,7 +473,7 @@
 val leE = make_elim leD;
 
 goal thy "(~n<m) = (m<=(n::nat))";
-by (blast_tac (!claset addIs [leI] addEs [leE]) 1);
+by (blast_tac (claset() addIs [leI] addEs [leE]) 1);
 qed "not_less_iff_le";
 
 goalw thy [le_def] "!!m. ~ m <= n ==> n<(m::nat)";
@@ -481,47 +481,47 @@
 qed "not_leE";
 
 goalw thy [le_def] "!!m. m < n ==> Suc(m) <= n";
-by (simp_tac (!simpset addsimps [less_Suc_eq]) 1);
-by (blast_tac (!claset addSEs [less_irrefl,less_asym]) 1);
+by (simp_tac (simpset() addsimps [less_Suc_eq]) 1);
+by (blast_tac (claset() addSEs [less_irrefl,less_asym]) 1);
 qed "Suc_leI";  (*formerly called lessD*)
 
 goalw thy [le_def] "!!m. Suc(m) <= n ==> m <= n";
-by (asm_full_simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+by (asm_full_simp_tac (simpset() addsimps [less_Suc_eq]) 1);
 qed "Suc_leD";
 
 (* stronger version of Suc_leD *)
 goalw thy [le_def] 
         "!!m. Suc m <= n ==> m < n";
-by (asm_full_simp_tac (!simpset addsimps [less_Suc_eq]) 1);
+by (asm_full_simp_tac (simpset() addsimps [less_Suc_eq]) 1);
 by (cut_facts_tac [less_linear] 1);
 by (Blast_tac 1);
 qed "Suc_le_lessD";
 
 goal thy "(Suc m <= n) = (m < n)";
-by (blast_tac (!claset addIs [Suc_leI, Suc_le_lessD]) 1);
+by (blast_tac (claset() addIs [Suc_leI, Suc_le_lessD]) 1);
 qed "Suc_le_eq";
 
 goalw thy [le_def] "!!m. m <= n ==> m <= Suc n";
-by (blast_tac (!claset addDs [Suc_lessD]) 1);
+by (blast_tac (claset() addDs [Suc_lessD]) 1);
 qed "le_SucI";
 Addsimps[le_SucI];
 
 bind_thm ("le_Suc", not_Suc_n_less_n RS leI);
 
 goalw thy [le_def] "!!m. m < n ==> m <= (n::nat)";
-by (blast_tac (!claset addEs [less_asym]) 1);
+by (blast_tac (claset() addEs [less_asym]) 1);
 qed "less_imp_le";
 
 (** Equivalence of m<=n and  m<n | m=n **)
 
 goalw thy [le_def] "!!m. m <= n ==> m < n | m=(n::nat)";
 by (cut_facts_tac [less_linear] 1);
-by (blast_tac (!claset addEs [less_irrefl,less_asym]) 1);
+by (blast_tac (claset() addEs [less_irrefl,less_asym]) 1);
 qed "le_imp_less_or_eq";
 
 goalw thy [le_def] "!!m. m<n | m=n ==> m <=(n::nat)";
 by (cut_facts_tac [less_linear] 1);
-by (blast_tac (!claset addSEs [less_irrefl] addEs [less_asym]) 1);
+by (blast_tac (claset() addSEs [less_irrefl] addEs [less_asym]) 1);
 qed "less_or_eq_imp_le";
 
 goal thy "(m <= (n::nat)) = (m < n | m=n)";
@@ -529,34 +529,34 @@
 qed "le_eq_less_or_eq";
 
 goal thy "n <= (n::nat)";
-by (simp_tac (!simpset addsimps [le_eq_less_or_eq]) 1);
+by (simp_tac (simpset() addsimps [le_eq_less_or_eq]) 1);
 qed "le_refl";
 
 val prems = goal thy "!!i. [| i <= j; j < k |] ==> i < (k::nat)";
 by (dtac le_imp_less_or_eq 1);
-by (blast_tac (!claset addIs [less_trans]) 1);
+by (blast_tac (claset() addIs [less_trans]) 1);
 qed "le_less_trans";
 
 goal thy "!!i. [| i < j; j <= k |] ==> i < (k::nat)";
 by (dtac le_imp_less_or_eq 1);
-by (blast_tac (!claset addIs [less_trans]) 1);
+by (blast_tac (claset() addIs [less_trans]) 1);
 qed "less_le_trans";
 
 goal thy "!!i. [| i <= j; j <= k |] ==> i <= (k::nat)";
 by (EVERY1[dtac le_imp_less_or_eq, 
            dtac le_imp_less_or_eq,
            rtac less_or_eq_imp_le, 
-           blast_tac (!claset addIs [less_trans])]);
+           blast_tac (claset() addIs [less_trans])]);
 qed "le_trans";
 
 goal thy "!!m. [| m <= n; n <= m |] ==> m = (n::nat)";
 by (EVERY1[dtac le_imp_less_or_eq, 
            dtac le_imp_less_or_eq,
-           blast_tac (!claset addEs [less_irrefl,less_asym])]);
+           blast_tac (claset() addEs [less_irrefl,less_asym])]);
 qed "le_anti_sym";
 
 goal thy "(Suc(n) <= Suc(m)) = (n <= m)";
-by (simp_tac (!simpset addsimps [le_eq_less_or_eq]) 1);
+by (simp_tac (simpset() addsimps [le_eq_less_or_eq]) 1);
 qed "Suc_le_mono";
 
 AddIffs [Suc_le_mono];
@@ -567,19 +567,19 @@
  by (rtac conjI 1);
   by (etac less_imp_le 1);
  by (etac (less_not_refl2 RS not_sym) 1);
-by (blast_tac (!claset addSDs [le_imp_less_or_eq]) 1);
+by (blast_tac (claset() addSDs [le_imp_less_or_eq]) 1);
 qed "nat_less_le";
 
 (** LEAST -- the least number operator **)
 
 goal thy "(! m::nat. P m --> n <= m) = (! m. m < n --> ~ P m)";
-by (blast_tac (!claset addIs [leI] addEs [leE]) 1);
+by (blast_tac (claset() addIs [leI] addEs [leE]) 1);
 val lemma = result();
 
 (* This is an old def of Least for nat, which is derived for compatibility *)
 goalw thy [Least_def]
   "(LEAST n::nat. P n) == (@n. P(n) & (ALL m. m < n --> ~P(m)))";
-by (simp_tac (!simpset addsimps [lemma]) 1);
+by (simp_tac (simpset() addsimps [lemma]) 1);
 by (rtac eq_reflection 1);
 by (rtac refl 1);
 qed "Least_nat_def";
@@ -587,9 +587,9 @@
 val [prem1,prem2] = goalw thy [Least_nat_def]
     "[| P(k::nat);  !!x. x<k ==> ~P(x) |] ==> (LEAST x. P(x)) = k";
 by (rtac select_equality 1);
-by (blast_tac (!claset addSIs [prem1,prem2]) 1);
+by (blast_tac (claset() addSIs [prem1,prem2]) 1);
 by (cut_facts_tac [less_linear] 1);
-by (blast_tac (!claset addSIs [prem1] addSDs [prem2]) 1);
+by (blast_tac (claset() addSIs [prem1] addSDs [prem2]) 1);
 qed "Least_equality";
 
 val [prem] = goal thy "P(k::nat) ==> P(LEAST x. P(x))";
@@ -612,7 +612,7 @@
 by (res_inst_tac [("s","n")] (Least_equality RS ssubst) 1);
 by (assume_tac 1);
 by (rtac le_refl 2);
-by (blast_tac (!claset addIs [less_imp_le,le_trans]) 1);
+by (blast_tac (claset() addIs [less_imp_le,le_trans]) 1);
 qed "Least_le";
 
 val [prem] = goal thy "k < (LEAST x. P(x)) ==> ~P(k::nat)";
@@ -626,22 +626,22 @@
  (fn _ => [
         rtac select_equality 1,
         fold_goals_tac [Least_nat_def],
-        safe_tac (!claset addSEs [LeastI]),
+        safe_tac (claset() addSEs [LeastI]),
         rename_tac "j" 1,
         res_inst_tac [("n","j")] natE 1,
         Blast_tac 1,
-        blast_tac (!claset addDs [Suc_less_SucD, not_less_Least]) 1,
+        blast_tac (claset() addDs [Suc_less_SucD, not_less_Least]) 1,
         rename_tac "k n" 1,
         res_inst_tac [("n","k")] natE 1,
         Blast_tac 1,
         hyp_subst_tac 1,
         rewtac Least_nat_def,
         rtac (select_equality RS arg_cong RS sym) 1,
-        safe_tac (!claset),
+        safe_tac (claset()),
         dtac Suc_mono 1,
         Blast_tac 1,
         cut_facts_tac [less_linear] 1,
-        safe_tac (!claset),
+        safe_tac (claset()),
         atac 2,
         Blast_tac 2,
         dtac Suc_mono 1,
@@ -669,7 +669,7 @@
   (fn _ => [etac swap2 1, etac leD 1]);
 val eqI = prove_goal thy "!!m. [| m < Suc n; n < Suc m |] ==> m=n"
   (fn _ => [etac less_SucE 1,
-            blast_tac (!claset addSDs [Suc_less_SucD] addSEs [less_irrefl]
+            blast_tac (claset() addSDs [Suc_less_SucD] addSEs [less_irrefl]
                               addDs [less_trans_Suc]) 1,
             assume_tac 1]);
 val leD = le_eq_less_Suc RS iffD1;
--- a/src/HOL/Ord.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Ord.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -25,12 +25,12 @@
 AddIffs [order_refl];
 
 goal Ord.thy "~ x < (x::'a::order)";
-by (simp_tac (!simpset addsimps [order_less_le]) 1);
+by (simp_tac (simpset() addsimps [order_less_le]) 1);
 qed "order_less_irrefl";
 AddIffs [order_less_irrefl];
 
 goal thy "(x::'a::order) <= y = (x < y | x = y)";
-by (simp_tac (!simpset addsimps [order_less_le]) 1);
+by (simp_tac (simpset() addsimps [order_less_le]) 1);
 by (Blast_tac 1);
 qed "order_le_less";
 
@@ -46,5 +46,5 @@
 by (cut_facts_tac prems 1);
 by (split_tac [expand_if] 1);
 by (Asm_simp_tac 1);
-by (blast_tac (!claset addIs [order_antisym]) 1);
+by (blast_tac (claset() addIs [order_antisym]) 1);
 qed "min_leastR";
--- a/src/HOL/Power.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Power.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -14,22 +14,22 @@
 
 goal thy "!!i::nat. i ^ (j+k) = (i^j) * (i^k)";
 by (induct_tac "k" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps mult_ac)));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps mult_ac)));
 qed "power_add";
 
 goal thy "!!i::nat. i ^ (j*k) = (i^j) ^ k";
 by (induct_tac "k" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [power_add])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [power_add])));
 qed "power_mult";
 
 goal thy "!! i. 0 < i ==> 0 < i^n";
 by (induct_tac "n" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [zero_less_mult_iff])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [zero_less_mult_iff])));
 qed "zero_less_power";
 
 goalw thy [dvd_def] "!!m::nat. m<=n ==> i^m dvd i^n";
 by (etac (not_less_iff_le RS iffD2 RS add_diff_inverse RS subst) 1);
-by (asm_simp_tac (!simpset addsimps [power_add]) 1);
+by (asm_simp_tac (simpset() addsimps [power_add]) 1);
 by (Blast_tac 1);
 qed "le_imp_power_dvd";
 
@@ -42,9 +42,9 @@
 
 goal thy "!!n. k^j dvd n --> i<j --> k^i dvd n";
 by (induct_tac "j" 1);
-by (ALLGOALS (simp_tac (!simpset addsimps [less_Suc_eq])));
+by (ALLGOALS (simp_tac (simpset() addsimps [less_Suc_eq])));
 by (stac mult_commute 1);
-by (blast_tac (!claset addSDs [dvd_mult_left]) 1);
+by (blast_tac (claset() addSDs [dvd_mult_left]) 1);
 qed_spec_mp "power_less_dvd";
 
 
@@ -75,7 +75,7 @@
 
 goal thy "(n choose n) = 1";
 by (induct_tac "n" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [less_imp_binomial_eq_0])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [less_imp_binomial_eq_0])));
 qed "binomial_n_n";
 Addsimps [binomial_n_n];
 
--- a/src/HOL/Prod.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Prod.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -31,16 +31,16 @@
 qed "Pair_inject";
 
 goal Prod.thy "((a,b) = (a',b')) = (a=a' & b=b')";
-by (blast_tac (!claset addSEs [Pair_inject]) 1);
+by (blast_tac (claset() addSEs [Pair_inject]) 1);
 qed "Pair_eq";
 AddIffs [Pair_eq];
 
 goalw Prod.thy [fst_def] "fst((a,b)) = a";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "fst_conv";
 
 goalw Prod.thy [snd_def] "snd((a,b)) = b";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "snd_conv";
 
 goalw Prod.thy [Pair_def] "? x y. p = (x,y)";
@@ -79,7 +79,7 @@
 end;
 
 (* Could be nice, but breaks too many proofs:
-claset := !claset addbefore split_all_tac;
+claset_ref() := claset() addbefore split_all_tac;
 *)
 
 (*** lemmas for splitting paired `!!'
@@ -118,13 +118,13 @@
 ***)
 
 goal Prod.thy "(!x. P x) = (!a b. P(a,b))";
-by (fast_tac (!claset addbefore split_all_tac) 1);
+by (fast_tac (claset() addbefore split_all_tac) 1);
 qed "split_paired_All";
 Addsimps [split_paired_All];
 (* AddIffs is not a good idea because it makes Blast_tac loop *)
 
 goal Prod.thy "(? x. P x) = (? a b. P(a,b))";
-by (fast_tac (!claset addbefore split_all_tac) 1);
+by (fast_tac (claset() addbefore split_all_tac) 1);
 qed "split_paired_Ex";
 (* Addsimps [split_paired_Ex]; breaks a number of IOA proofs *)
 
@@ -168,7 +168,7 @@
 qed "expand_split";
 
 (* could be done after split_tac has been speeded up significantly:
-simpset := (!simpset addsplits [expand_split]);
+simpset_ref() := (simpset() addsplits [expand_split]);
    precompute the constants involved and don't do anything unless
    the current goal contains one of those constants
 *)
@@ -223,13 +223,13 @@
     "prod_fun (f1 o f2) (g1 o g2) = ((prod_fun f1 g1) o (prod_fun f2 g2))";
 by (rtac ext 1);
 by (res_inst_tac [("p","x")] PairE 1);
-by (asm_simp_tac (!simpset addsimps [prod_fun,o_def]) 1);
+by (asm_simp_tac (simpset() addsimps [prod_fun,o_def]) 1);
 qed "prod_fun_compose";
 
 goal Prod.thy "prod_fun (%x. x) (%y. y) = (%z. z)";
 by (rtac ext 1);
 by (res_inst_tac [("p","z")] PairE 1);
-by (asm_simp_tac (!simpset addsimps [prod_fun]) 1);
+by (asm_simp_tac (simpset() addsimps [prod_fun]) 1);
 qed "prod_fun_ident";
 
 val prems = goal Prod.thy "(a,b):r ==> (f(a),g(b)) : (prod_fun f g)``r";
@@ -245,7 +245,7 @@
 by (res_inst_tac [("p","x")] PairE 1);
 by (resolve_tac prems 1);
 by (Blast_tac 2);
-by (blast_tac (!claset addIs [prod_fun]) 1);
+by (blast_tac (claset() addIs [prod_fun]) 1);
 qed "prod_fun_imageE";
 
 (*** Disjoint union of a family of sets - Sigma ***)
@@ -290,7 +290,7 @@
 val prems = goal Prod.thy
     "[| A<=C;  !!x. x:A ==> B x <= D x |] ==> Sigma A B <= Sigma C D";
 by (cut_facts_tac prems 1);
-by (blast_tac (!claset addIs (prems RL [subsetD])) 1);
+by (blast_tac (claset() addIs (prems RL [subsetD])) 1);
 qed "Sigma_mono";
 
 qed_goal "Sigma_empty1" Prod.thy "Sigma {} B = {}"
--- a/src/HOL/Quot/FRACT.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Quot/FRACT.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -14,5 +14,5 @@
 
 goalw thy [half_def] "half = <[abs_NP(n,2*n)]>";
 fr per_class_eqI;
-by (simp_tac (!simpset addsimps [inst_NP_per]) 1);
+by (simp_tac (simpset() addsimps [inst_NP_per]) 1);
 qed "test";
--- a/src/HOL/Quot/PER0.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Quot/PER0.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -109,7 +109,7 @@
 by (rtac mp 1);by (assume_tac 1);
 by (Asm_simp_tac 1);
 by (rtac mp 1);by (assume_tac 1);
-by (asm_simp_tac (!simpset addsimps [sym2refl2]) 1);
+by (asm_simp_tac (simpset() addsimps [sym2refl2]) 1);
 qed "per_trans_fun";
 
 
--- a/src/HOL/RelPow.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/RelPow.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -35,7 +35,7 @@
   "[| (x,z) : R^(Suc n);  !!y. [| (x,y) : R^n; (y,z) : R |] ==> P |] ==> P";
 by (cut_facts_tac [major] 1);
 by (Asm_full_simp_tac  1);
-by (blast_tac (!claset addIs [minor]) 1);
+by (blast_tac (claset() addIs [minor]) 1);
 qed "rel_pow_Suc_E";
 
 val [p1,p2,p3] = goal RelPow.thy
@@ -44,7 +44,7 @@
 \    |] ==> P";
 by (res_inst_tac [("n","n")] natE 1);
 by (cut_facts_tac [p1] 1);
-by (asm_full_simp_tac (!simpset addsimps [p2]) 1);
+by (asm_full_simp_tac (simpset() addsimps [p2]) 1);
 by (cut_facts_tac [p1] 1);
 by (Asm_full_simp_tac 1);
 by (etac compEpair 1);
@@ -53,16 +53,16 @@
 
 goal RelPow.thy "!x z. (x,z):R^(Suc n) --> (? y. (x,y):R & (y,z):R^n)";
 by (nat_ind_tac "n" 1);
-by (blast_tac (!claset addIs [rel_pow_0_I] addEs [rel_pow_0_E,rel_pow_Suc_E]) 1);
-by (blast_tac (!claset addIs [rel_pow_Suc_I] addEs[rel_pow_0_E,rel_pow_Suc_E]) 1);
+by (blast_tac (claset() addIs [rel_pow_0_I] addEs [rel_pow_0_E,rel_pow_Suc_E]) 1);
+by (blast_tac (claset() addIs [rel_pow_Suc_I] addEs[rel_pow_0_E,rel_pow_Suc_E]) 1);
 qed_spec_mp "rel_pow_Suc_D2";
 
 
 goal RelPow.thy
 "!x y z. (x,y) : R^n & (y,z) : R --> (? w. (x,w) : R & (w,z) : R^n)";
 by (nat_ind_tac "n" 1);
-by (fast_tac (!claset addss (!simpset)) 1);
-by (fast_tac (!claset addss (!simpset)) 1);
+by (fast_tac (claset() addss (simpset())) 1);
+by (fast_tac (claset() addss (simpset())) 1);
 qed_spec_mp "rel_pow_Suc_D2'";
 
 val [p1,p2,p3] = goal RelPow.thy
@@ -71,7 +71,7 @@
 \    |] ==> P";
 by (res_inst_tac [("n","n")] natE 1);
 by (cut_facts_tac [p1] 1);
-by (asm_full_simp_tac (!simpset addsimps [p2]) 1);
+by (asm_full_simp_tac (simpset() addsimps [p2]) 1);
 by (cut_facts_tac [p1] 1);
 by (Asm_full_simp_tac 1);
 by (etac compEpair 1);
@@ -86,13 +86,13 @@
 goal RelPow.thy "!!p. p:R^* ==> p : (UN n. R^n)";
 by (split_all_tac 1);
 by (etac rtrancl_induct 1);
-by (ALLGOALS (blast_tac (!claset addIs [rel_pow_0_I,rel_pow_Suc_I])));
+by (ALLGOALS (blast_tac (claset() addIs [rel_pow_0_I,rel_pow_Suc_I])));
 qed "rtrancl_imp_UN_rel_pow";
 
 goal RelPow.thy "!y. (x,y):R^n --> (x,y):R^*";
 by (nat_ind_tac "n" 1);
-by (blast_tac (!claset addIs [rtrancl_refl] addEs [rel_pow_0_E]) 1);
-by (blast_tac (!claset addEs [rel_pow_Suc_E]
+by (blast_tac (claset() addIs [rtrancl_refl] addEs [rel_pow_0_E]) 1);
+by (blast_tac (claset() addEs [rel_pow_Suc_E]
                        addIs [rtrancl_into_rtrancl]) 1);
 val lemma = result() RS spec RS mp;
 
@@ -102,7 +102,7 @@
 qed "rel_pow_imp_rtrancl";
 
 goal RelPow.thy "R^* = (UN n. R^n)";
-by (blast_tac (!claset addIs [rtrancl_imp_UN_rel_pow, rel_pow_imp_rtrancl]) 1);
+by (blast_tac (claset() addIs [rtrancl_imp_UN_rel_pow, rel_pow_imp_rtrancl]) 1);
 qed "rtrancl_is_UN_rel_pow";
 
 
--- a/src/HOL/Relation.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Relation.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -178,11 +178,11 @@
     (REPEAT (eresolve_tac [asm_rl, ImageE, subsetD RS SigmaD2] 1)) ]);
 
 goal Relation.thy "R O id = R";
-by (fast_tac (!claset addbefore split_all_tac) 1);
+by (fast_tac (claset() addbefore split_all_tac) 1);
 qed "R_O_id";
 
 goal Relation.thy "id O R = R";
-by (fast_tac (!claset addbefore split_all_tac) 1);
+by (fast_tac (claset() addbefore split_all_tac) 1);
 qed "id_O_R";
 
 Addsimps [R_O_id,id_O_R];
--- a/src/HOL/Set.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Set.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -83,12 +83,12 @@
 
 (*Trival rewrite rule*)
 goal Set.thy "(! x:A. P) = ((? x. x:A) --> P)";
-by (simp_tac (!simpset addsimps [Ball_def]) 1);
+by (simp_tac (simpset() addsimps [Ball_def]) 1);
 qed "ball_triv";
 
 (*Dual form for existentials*)
 goal Set.thy "(? x:A. P) = ((? x. x:A) & P)";
-by (simp_tac (!simpset addsimps [Bex_def]) 1);
+by (simp_tac (simpset() addsimps [Bex_def]) 1);
 qed "bex_triv";
 
 Addsimps [ball_triv, bex_triv];
@@ -228,7 +228,7 @@
 
 qed_goal "equals0I" Set.thy "[| !!y. y:A ==> False |] ==> A={}"
  (fn [prem]=>
-  [ (blast_tac (!claset addIs [prem RS FalseE]) 1) ]);
+  [ (blast_tac (claset() addIs [prem RS FalseE]) 1) ]);
 
 qed_goal "equals0D" Set.thy "!!a. [| A={};  a:A |] ==> P"
  (fn _ => [ (Blast_tac 1) ]);
@@ -414,7 +414,7 @@
 (fn _ => [Blast_tac 1]);
 
 goal Set.thy "!!a b. {a}={b} ==> a=b";
-by (blast_tac (!claset addEs [equalityE]) 1);
+by (blast_tac (claset() addEs [equalityE]) 1);
 qed "singleton_inject";
 
 (*Redundant? But unlike insertCI, it proves the subgoal immediately!*)
@@ -669,7 +669,7 @@
 		  expand_if_mem1, expand_if_mem2];
 
 
-(*Each of these has ALREADY been added to !simpset above.*)
+(*Each of these has ALREADY been added to simpset() above.*)
 val mem_simps = [insert_iff, empty_iff, Un_iff, Int_iff, Compl_iff, Diff_iff, 
                  mem_Collect_eq, 
 		 UN_iff, UN1_iff, Union_iff, 
@@ -677,12 +677,12 @@
 
 (*Not for Addsimps -- it can cause goals to blow up!*)
 goal Set.thy "(a : (if Q then x else y)) = ((Q --> a:x) & (~Q --> a : y))";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 qed "mem_if";
 
 val mksimps_pairs = ("Ball",[bspec]) :: mksimps_pairs;
 
-simpset := !simpset addcongs [ball_cong,bex_cong]
+simpset_ref() := simpset() addcongs [ball_cong,bex_cong]
                     setmksimps (mksimps mksimps_pairs);
 
 Addsimps[subset_UNIV, empty_subsetI, subset_refl];
--- a/src/HOL/Sexp.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Sexp.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -11,15 +11,15 @@
 (** sexp_case **)
 
 goalw Sexp.thy [sexp_case_def] "sexp_case c d e (Leaf a) = c(a)";
-by (blast_tac (!claset addSIs [select_equality]) 1);
+by (blast_tac (claset() addSIs [select_equality]) 1);
 qed "sexp_case_Leaf";
 
 goalw Sexp.thy [sexp_case_def] "sexp_case c d e (Numb k) = d(k)";
-by (blast_tac (!claset addSIs [select_equality]) 1);
+by (blast_tac (claset() addSIs [select_equality]) 1);
 qed "sexp_case_Numb";
 
 goalw Sexp.thy [sexp_case_def] "sexp_case c d e (M$N) = e M N";
-by (blast_tac (!claset addSIs [select_equality]) 1);
+by (blast_tac (claset() addSIs [select_equality]) 1);
 qed "sexp_case_Scons";
 
 
@@ -90,7 +90,7 @@
 goal Sexp.thy "wf(pred_sexp)";
 by (rtac (pred_sexp_subset_Sigma RS wfI) 1);
 by (etac sexp.induct 1);
-by (ALLGOALS (blast_tac (!claset addSEs [allE, pred_sexpE])));
+by (ALLGOALS (blast_tac (claset() addSEs [allE, pred_sexpE])));
 qed "wf_pred_sexp";
 
 
@@ -118,6 +118,6 @@
 goal Sexp.thy "!!M. [| M: sexp;  N: sexp |] ==> \
 \    sexp_rec (M$N) c d h = h M N (sexp_rec M c d h) (sexp_rec N c d h)";
 by (rtac (sexp_rec_unfold RS trans) 1);
-by (asm_simp_tac (!simpset addsimps [sexp_case_Scons,pred_sexpI1,pred_sexpI2])
+by (asm_simp_tac (simpset() addsimps [sexp_case_Scons,pred_sexpI1,pred_sexpI2])
     1);
 qed "sexp_rec_Scons";
--- a/src/HOL/Subst/Subst.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Subst/Subst.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -41,7 +41,7 @@
 qed "agreement";
 
 goal Subst.thy   "~ v: vars_of(t) --> t <| (v,u)#s = t <| s";
-by (simp_tac (!simpset addsimps [agreement] addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsimps [agreement] addsplits [expand_if]) 1);
 qed_spec_mp"repl_invariance";
 
 val asms = goal Subst.thy 
@@ -61,7 +61,7 @@
 local fun prove s = prove_goal Subst.thy s
                   (fn prems => [cut_facts_tac prems 1,
                                 REPEAT (etac rev_mp 1),
-                                simp_tac (!simpset addsimps [subst_eq_iff]) 1])
+                                simp_tac (simpset() addsimps [subst_eq_iff]) 1])
 in 
   val subst_refl      = prove "r =$= r";
   val subst_sym       = prove "r =$= s ==> s =$= r";
@@ -111,31 +111,31 @@
 by (induct_tac "t" 1);
 by (ALLGOALS Asm_simp_tac);
 by (alist_ind_tac "r" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed "subst_comp";
 
 Addsimps [subst_comp];
 
 goal Subst.thy "(q <> r) <> s =$= q <> (r <> s)";
-by (simp_tac (!simpset addsimps [subst_eq_iff]) 1);
+by (simp_tac (simpset() addsimps [subst_eq_iff]) 1);
 qed "comp_assoc";
 
 goal Subst.thy "!!s. [| theta =$= theta1; sigma =$= sigma1|] ==> \
              \       (theta <> sigma) =$= (theta1 <> sigma1)";
-by (asm_full_simp_tac (!simpset addsimps [subst_eq_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subst_eq_def]) 1);
 qed "subst_cong";
 
 
 goal Subst.thy "(w, Var(w) <| s) # s =$= s"; 
-by (simp_tac (!simpset addsimps [subst_eq_iff]) 1);
+by (simp_tac (simpset() addsimps [subst_eq_iff]) 1);
 by (rtac allI 1);
 by (induct_tac "t" 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsplits [expand_if])));
 qed "Cons_trivial";
 
 
 goal Subst.thy "!!s. q <> r =$= s ==>  t <| q <| r = t <| s";
-by (asm_full_simp_tac (!simpset addsimps [subst_eq_iff]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subst_eq_iff]) 1);
 qed "comp_subst_subst";
 
 
@@ -143,7 +143,7 @@
 
 goal Subst.thy  "(v : sdom(s)) = (Var(v) <| s ~= Var(v))";
 by (alist_ind_tac "s" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 by (Blast_tac 1);
 qed "sdom_iff";
 
@@ -160,50 +160,50 @@
 goal Subst.thy  "(t <| s = t) = (sdom(s) Int vars_of(t) = {})";
 by (induct_tac "t" 1);
 by (ALLGOALS
-    (asm_full_simp_tac (!simpset addsimps [empty_iff_all_not, sdom_iff])));
+    (asm_full_simp_tac (simpset() addsimps [empty_iff_all_not, sdom_iff])));
 by (ALLGOALS Blast_tac);
 qed "invariance";
 
 goal Subst.thy  "v : sdom(s) -->  v : vars_of(t <| s) --> v : srange(s)";
 by (induct_tac "t" 1);
 by (case_tac "a : sdom(s)" 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsimps [sdom_iff, srange_iff])));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [sdom_iff, srange_iff])));
 by (ALLGOALS Blast_tac);
 qed_spec_mp "Var_in_srange";
 
 goal Subst.thy 
      "!!v. [| v : sdom(s); v ~: srange(s) |] ==>  v ~: vars_of(t <| s)";
-by (blast_tac (!claset addIs [Var_in_srange]) 1);
+by (blast_tac (claset() addIs [Var_in_srange]) 1);
 qed "Var_elim";
 
 goal Subst.thy  "v : vars_of(t <| s) --> v : srange(s) | v : vars_of(t)";
 by (induct_tac "t" 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsimps [sdom_iff,srange_iff])));
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [sdom_iff,srange_iff])));
 by (Blast_tac 2);
-by (safe_tac (!claset addSIs [exI, vars_var_iff RS iffD1 RS sym]));
+by (safe_tac (claset() addSIs [exI, vars_var_iff RS iffD1 RS sym]));
 by (Auto_tac());
 qed_spec_mp "Var_intro";
 
 goal Subst.thy
     "v : srange(s) --> (? w. w : sdom(s) & v : vars_of(Var(w) <| s))";
-by (simp_tac (!simpset addsimps [srange_iff]) 1);
+by (simp_tac (simpset() addsimps [srange_iff]) 1);
 qed_spec_mp "srangeD";
 
 goal Subst.thy
    "sdom(s) Int srange(s) = {} = (! t. sdom(s) Int vars_of(t <| s) = {})";
-by (simp_tac (!simpset addsimps [empty_iff_all_not]) 1);
-by (fast_tac (!claset addIs [Var_in_srange] addDs [srangeD]) 1);
+by (simp_tac (simpset() addsimps [empty_iff_all_not]) 1);
+by (fast_tac (claset() addIs [Var_in_srange] addDs [srangeD]) 1);
 qed "dom_range_disjoint";
 
 goal Subst.thy "!!u. ~ u <| s = u ==> (? x. x : sdom(s))";
-by (full_simp_tac (!simpset addsimps [empty_iff_all_not, invariance]) 1);
+by (full_simp_tac (simpset() addsimps [empty_iff_all_not, invariance]) 1);
 by (Blast_tac 1);
 qed "subst_not_empty";
 
 
 goal Subst.thy "(M <| [(x, Var x)]) = M";
 by (induct_tac "M" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 qed "id_subst_lemma";
 
 Addsimps [id_subst_lemma];
--- a/src/HOL/Subst/Unifier.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Subst/Unifier.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -17,7 +17,7 @@
 
 goal Unifier.thy
     "Unifier s (Comb t u) (Comb v w) = (Unifier s t v & Unifier s u w)";
-by (simp_tac (!simpset addsimps [Unifier_def]) 1);
+by (simp_tac (simpset() addsimps [Unifier_def]) 1);
 qed "Unifier_Comb";
 
 AddIffs [Unifier_Comb];
@@ -25,7 +25,7 @@
 goal Unifier.thy
   "!!v. [| v ~: vars_of t; v ~: vars_of u; Unifier s t u |] ==> \
 \       Unifier ((v,r)#s) t u";
-by (asm_full_simp_tac (!simpset addsimps [Unifier_def, repl_invariance]) 1);
+by (asm_full_simp_tac (simpset() addsimps [Unifier_def, repl_invariance]) 1);
 qed "Cons_Unifier";
 
 
@@ -34,12 +34,12 @@
  *---------------------------------------------------------------------------*)
 
 goalw Unifier.thy unify_defs "MGUnifier s t u = MGUnifier s u t";
-by (blast_tac (!claset addIs [sym]) 1);
+by (blast_tac (claset() addIs [sym]) 1);
 qed "mgu_sym";
 
 
 goal Unifier.thy  "[] >> s";
-by (simp_tac (!simpset addsimps [MoreGeneral_def]) 1);
+by (simp_tac (simpset() addsimps [MoreGeneral_def]) 1);
 by (Blast_tac 1);
 qed "MoreGen_Nil";
 
@@ -47,19 +47,19 @@
 
 goalw Unifier.thy unify_defs
     "MGUnifier s t u = (ALL r. Unifier r t u = s >> r)";
-by (auto_tac (!claset addIs [ssubst_subst2, subst_comp_Nil], !simpset));
+by (auto_tac (claset() addIs [ssubst_subst2, subst_comp_Nil], simpset()));
 qed "MGU_iff";
 
 
 goal Unifier.thy
      "!!v. ~ Var v <: t ==> MGUnifier [(v,t)] (Var v) t";
-by (simp_tac(!simpset addsimps [MGU_iff, Unifier_def, MoreGeneral_def]
+by (simp_tac(simpset() addsimps [MGU_iff, Unifier_def, MoreGeneral_def]
 	              delsimps [subst_Var]) 1);
 by Safe_tac;
 by (rtac exI 1);
 by (etac subst 1 THEN rtac (Cons_trivial RS subst_sym) 1);
 by (etac ssubst_subst2 1);
-by (asm_simp_tac (!simpset addsimps [Var_not_occs]) 1);
+by (asm_simp_tac (simpset() addsimps [Var_not_occs]) 1);
 qed "MGUnifier_Var";
 
 AddSIs [MGUnifier_Var];
@@ -76,12 +76,12 @@
 AddIffs [Idem_Nil];
 
 goalw Unifier.thy [Idem_def] "Idem(s) = (sdom(s) Int srange(s) = {})";
-by (simp_tac (!simpset addsimps [subst_eq_iff, invariance, 
+by (simp_tac (simpset() addsimps [subst_eq_iff, invariance, 
 				 dom_range_disjoint]) 1);
 qed "Idem_iff";
 
 goal Unifier.thy "~ (Var(v) <: t) --> Idem([(v,t)])";
-by (simp_tac (!simpset addsimps [vars_iff_occseq, Idem_iff, srange_iff, 
+by (simp_tac (simpset() addsimps [vars_iff_occseq, Idem_iff, srange_iff, 
 				 empty_iff_all_not]
                        addsplits [expand_if]) 1);
 by (Blast_tac 1);
@@ -92,7 +92,7 @@
 goalw Unifier.thy [Idem_def]
   "!!r. [| Idem(r); Unifier s (t<|r) (u<|r) |]       \
 \       ==> Unifier (r <> s) (t <| r) (u <| r)";
-by (asm_full_simp_tac (!simpset addsimps [Unifier_def, comp_subst_subst]) 1);
+by (asm_full_simp_tac (simpset() addsimps [Unifier_def, comp_subst_subst]) 1);
 qed "Unifier_Idem_subst";
 
 val [idemr,unifier,minor] = goal Unifier.thy
@@ -101,5 +101,5 @@
 \     |] ==> Idem(r <> s)";
 by (cut_facts_tac [idemr,
                    unifier RS (idemr RS Unifier_Idem_subst RS minor)] 1);
-by (asm_full_simp_tac (!simpset addsimps [Idem_def, subst_eq_iff]) 1);
+by (asm_full_simp_tac (simpset() addsimps [Idem_def, subst_eq_iff]) 1);
 qed "Idem_comp";
--- a/src/HOL/Subst/Unify.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Subst/Unify.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -40,16 +40,16 @@
  *---------------------------------------------------------------------------*)
 Tfl.tgoalw Unify.thy [] unify.rules;
 (* Wellfoundedness of unifyRel *)
-by (simp_tac (!simpset addsimps [unifyRel_def,
+by (simp_tac (simpset() addsimps [unifyRel_def,
 				 wf_inv_image, wf_lex_prod, wf_finite_psubset,
 				 wf_measure]) 1);
 (* TC *)
 by Safe_tac;
-by (simp_tac (!simpset addsimps [finite_psubset_def, finite_vars_of,
+by (simp_tac (simpset() addsimps [finite_psubset_def, finite_vars_of,
 				 lex_prod_def, measure_def, inv_image_def]) 1);
 by (rtac (monotone_vars_of RS (subset_iff_psubset_eq RS iffD1) RS disjE) 1);
 by (Blast_tac 1);
-by (asm_simp_tac (!simpset addsimps [less_eq, less_add_Suc1]) 1);
+by (asm_simp_tac (simpset() addsimps [less_eq, less_add_Suc1]) 1);
 qed "tc0";
 
 
@@ -72,7 +72,7 @@
 goalw Unify.thy [unifyRel_def,lex_prod_def, inv_image_def]
      "!!x. ((X,Y), (Comb A (Comb B C), Comb D (Comb E F))) : unifyRel  ==> \
     \      ((X,Y), (Comb (Comb A B) C, Comb (Comb D E) F)) : unifyRel";
-by (asm_full_simp_tac (!simpset addsimps [measure_def, 
+by (asm_full_simp_tac (simpset() addsimps [measure_def, 
                           less_eq, inv_image_def,add_assoc]) 1);
 by (subgoal_tac "(vars_of A Un vars_of B Un vars_of C Un \
                 \  (vars_of D Un vars_of E Un vars_of F)) = \
@@ -97,30 +97,30 @@
 by (case_tac "x: (vars_of N1 Un vars_of N2)" 1);
 (*uterm_less case*)
 by (asm_simp_tac
-    (!simpset addsimps [less_eq, unifyRel_def, lex_prod_def,
+    (simpset() addsimps [less_eq, unifyRel_def, lex_prod_def,
 			measure_def, inv_image_def]) 1);
 by (Blast_tac 1);
 (*finite_psubset case*)
 by (simp_tac
-    (!simpset addsimps [unifyRel_def, lex_prod_def,
+    (simpset() addsimps [unifyRel_def, lex_prod_def,
 			measure_def, inv_image_def]) 1);
-by (simp_tac (!simpset addsimps [finite_psubset_def, finite_vars_of,
+by (simp_tac (simpset() addsimps [finite_psubset_def, finite_vars_of,
 				 psubset_def, set_eq_subset]) 1);
 by (Blast_tac 1);
 (** LEVEL 9 **)
 (*Final case, also finite_psubset*)
 by (simp_tac
-    (!simpset addsimps [finite_vars_of, unifyRel_def, finite_psubset_def,
+    (simpset() addsimps [finite_vars_of, unifyRel_def, finite_psubset_def,
 			lex_prod_def, measure_def, inv_image_def]) 1);
 by (cut_inst_tac [("s","[(x,M)]"), ("v", "x"), ("t","N2")] Var_elim 1);
 by (cut_inst_tac [("s","[(x,M)]"), ("v", "x"), ("t","N1")] Var_elim 3);
-by (ALLGOALS (asm_simp_tac(!simpset addsimps [srange_iff, vars_iff_occseq])));
+by (ALLGOALS (asm_simp_tac(simpset() addsimps [srange_iff, vars_iff_occseq])));
 by (REPEAT_FIRST (resolve_tac [conjI, disjI1, psubsetI]));
 by (ALLGOALS (asm_full_simp_tac 
-	      (!simpset addsimps [srange_iff, set_eq_subset]))); 
+	      (simpset() addsimps [srange_iff, set_eq_subset]))); 
 by (ALLGOALS
-    (fast_tac (!claset addEs [Var_intro RS disjE]
-	               addss (!simpset addsimps [srange_iff]))));
+    (fast_tac (claset() addEs [Var_intro RS disjE]
+	               addss (simpset() addsimps [srange_iff]))));
 qed "var_elimR";
 
 
@@ -153,15 +153,15 @@
 (* Apply induction *)
 by (res_inst_tac [("u","M1"),("v","M2")] unifyInduct0 1);
 by (ALLGOALS 
-    (asm_simp_tac (!simpset addsimps (var_elimR::unifyRules0)
+    (asm_simp_tac (simpset() addsimps (var_elimR::unifyRules0)
 			    addsplits [expand_if])));
 (*Const-Const case*)
 by (simp_tac
-    (!simpset addsimps [unifyRel_def, lex_prod_def, measure_def,
+    (simpset() addsimps [unifyRel_def, lex_prod_def, measure_def,
 			inv_image_def, less_eq]) 1);
 (** LEVEL 7 **)
 (*Comb-Comb case*)
-by (asm_simp_tac (!simpset addsplits [split_option_case]) 1);
+by (asm_simp_tac (simpset() addsplits [split_option_case]) 1);
 by (strip_tac 1);
 by (rtac (trans_unifyRel RS transD) 1);
 by (Blast_tac 1);
@@ -183,7 +183,7 @@
 \         | Some theta => (case unify(N1 <| theta, N2 <| theta)        \
 \                            of None => None    \
 \                             | Some sigma => Some (theta <> sigma)))";
-by (asm_simp_tac (!simpset addsimps (unify_TC::unifyRules0)
+by (asm_simp_tac (simpset() addsimps (unify_TC::unifyRules0)
 			   addsplits [split_option_case]) 1);
 qed "unifyCombComb";
 
@@ -194,7 +194,7 @@
 
 bind_thm ("unifyInduct",
 	  rule_by_tactic
-	     (ALLGOALS (full_simp_tac (!simpset addsimps [unify_TC])))
+	     (ALLGOALS (full_simp_tac (simpset() addsimps [unify_TC])))
 	     unifyInduct0);
 
 
@@ -207,33 +207,33 @@
 
 goal Unify.thy "!theta. unify(M,N) = Some theta --> MGUnifier theta M N";
 by (res_inst_tac [("u","M"),("v","N")] unifyInduct 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 (*Const-Const case*)
-by (simp_tac (!simpset addsimps [MGUnifier_def,Unifier_def]) 1);
+by (simp_tac (simpset() addsimps [MGUnifier_def,Unifier_def]) 1);
 (*Const-Var case*)
 by (stac mgu_sym 1);
-by (simp_tac (!simpset addsimps [MGUnifier_Var]) 1);
+by (simp_tac (simpset() addsimps [MGUnifier_Var]) 1);
 (*Var-M case*)
-by (simp_tac (!simpset addsimps [MGUnifier_Var]) 1);
+by (simp_tac (simpset() addsimps [MGUnifier_Var]) 1);
 (*Comb-Var case*)
 by (stac mgu_sym 1);
-by (simp_tac (!simpset addsimps [MGUnifier_Var]) 1);
+by (simp_tac (simpset() addsimps [MGUnifier_Var]) 1);
 (** LEVEL 8 **)
 (*Comb-Comb case*)
-by (asm_simp_tac (!simpset addsplits [split_option_case]) 1);
+by (asm_simp_tac (simpset() addsplits [split_option_case]) 1);
 by (strip_tac 1);
 by (rotate_tac ~2 1);
 by (asm_full_simp_tac 
-    (!simpset addsimps [MGUnifier_def, Unifier_def, MoreGeneral_def]) 1);
-by (safe_tac (!claset) THEN rename_tac "theta sigma gamma" 1);
+    (simpset() addsimps [MGUnifier_def, Unifier_def, MoreGeneral_def]) 1);
+by (safe_tac (claset()) THEN rename_tac "theta sigma gamma" 1);
 by (eres_inst_tac [("x","gamma")] allE 1 THEN mp_tac 1);
 by (etac exE 1 THEN rename_tac "delta" 1);
 by (eres_inst_tac [("x","delta")] allE 1);
 by (subgoal_tac "N1 <| theta <| delta = N2 <| theta <| delta" 1);
 (*Proving the subgoal*)
-by (full_simp_tac (!simpset addsimps [subst_eq_iff]) 2
-    THEN blast_tac (!claset addIs [trans,sym] delrules [impCE]) 2);
-by (blast_tac (!claset addIs [subst_trans, subst_cong, 
+by (full_simp_tac (simpset() addsimps [subst_eq_iff]) 2
+    THEN blast_tac (claset() addIs [trans,sym] delrules [impCE]) 2);
+by (blast_tac (claset() addIs [subst_trans, subst_cong, 
 			      comp_assoc RS subst_sym]) 1);
 qed_spec_mp "unify_gives_MGU";
 
@@ -245,16 +245,16 @@
 by (res_inst_tac [("u","M"),("v","N")] unifyInduct 1);
 by (ALLGOALS 
     (asm_simp_tac 
-       (!simpset addsimps [Var_Idem] 
+       (simpset() addsimps [Var_Idem] 
 	         addsplits [expand_if,split_option_case])));
 (*Comb-Comb case*)
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (REPEAT (dtac spec 1 THEN mp_tac 1));
-by (safe_tac (!claset addSDs [rewrite_rule [MGUnifier_def] unify_gives_MGU]));
+by (safe_tac (claset() addSDs [rewrite_rule [MGUnifier_def] unify_gives_MGU]));
 by (rtac Idem_comp 1);
 by (atac 1);
 by (atac 1);
-by (best_tac (!claset addss (!simpset addsimps 
+by (best_tac (claset() addss (simpset() addsimps 
 			     [MoreGeneral_def, subst_eq_iff, Idem_def])) 1);
 qed_spec_mp "unify_gives_Idem";
 
--- a/src/HOL/Sum.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Sum.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -78,11 +78,11 @@
 val Inr_inject = inj_Inr RS injD;
 
 goal Sum.thy "(Inl(x)=Inl(y)) = (x=y)";
-by (blast_tac (!claset addSDs [Inl_inject]) 1);
+by (blast_tac (claset() addSDs [Inl_inject]) 1);
 qed "Inl_eq";
 
 goal Sum.thy "(Inr(x)=Inr(y)) = (x=y)";
-by (blast_tac (!claset addSDs [Inr_inject]) 1);
+by (blast_tac (claset() addSDs [Inr_inject]) 1);
 qed "Inr_eq";
 
 AddIffs [Inl_eq, Inr_eq];
@@ -119,11 +119,11 @@
 (** sum_case -- the selection operator for sums **)
 
 goalw Sum.thy [sum_case_def] "sum_case f g (Inl x) = f(x)";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "sum_case_Inl";
 
 goalw Sum.thy [sum_case_def] "sum_case f g (Inr x) = g(x)";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "sum_case_Inr";
 
 Addsimps [sum_case_Inl, sum_case_Inr];
--- a/src/HOL/TLA/Action.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Action.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -56,7 +56,7 @@
                   handle _ => int_unlift th)
        | _ => th);
 
-simpset := !simpset setmksimps ((mksimps mksimps_pairs) o maybe_unlift);
+simpset_ref() := simpset() setmksimps ((mksimps mksimps_pairs) o maybe_unlift);
 
 (* make act_rews be always active -- intensional_rews has been added before *)
 Addsimps act_rews;
@@ -75,7 +75,7 @@
 		      ORELSE' (eresolve_tac (elims @ [conjE,disjE,exE_prop]))))
          i);
 (* default version without additional plug-in rules *)
-fun Action_simp_tac i = (action_simp_tac (!simpset) [] [] i);
+fun Action_simp_tac i = (action_simp_tac (simpset()) [] [] i);
 
 
 (* ==================== Simplification of abstractions ==================== *)
--- a/src/HOL/TLA/Buffer/Buffer.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Buffer/Buffer.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -12,7 +12,7 @@
 Addsimps [tl_append2];
 
 goal List.thy "xs ~= [] --> tl xs ~= xs";
-by (auto_tac (!claset, !simpset addsimps [neq_Nil_conv]));
+by (auto_tac (claset(), simpset() addsimps [neq_Nil_conv]));
 qed_spec_mp "tl_not_self";
 Addsimps [tl_not_self];
 
@@ -22,17 +22,17 @@
 
 (* Dequeue is visible *)
 goal Buffer.thy "<Deq ic q oc>_<ic,q,oc> .= Deq ic q oc";
-by (auto_tac (!claset, !simpset addsimps [angle_def,Deq_def]));
+by (auto_tac (claset(), simpset() addsimps [angle_def,Deq_def]));
 qed "Deq_visible";
 
 (* Enabling condition for dequeue -- NOT NEEDED *)
 goalw Buffer.thy [temp_rewrite Deq_visible]
    "!!q. base_var <ic,q,oc> ==> $Enabled (<Deq ic q oc>_<ic,q,oc>) .= ($q .~= .[])";
-by (auto_tac (!claset addSEs [base_enabled,enabledE], !simpset addsimps [Deq_def]));
+by (auto_tac (claset() addSEs [base_enabled,enabledE], simpset() addsimps [Deq_def]));
 qed "Deq_enabled";
 
 (* For the left-to-right implication, we don't need the base variable stuff *)
 goalw Buffer.thy [temp_rewrite Deq_visible] 
    "$Enabled (<Deq ic q oc>_<ic,q,oc>) .-> ($q .~= .[])";
-by (auto_tac (!claset addSEs [enabledE], !simpset addsimps [Deq_def]));
+by (auto_tac (claset() addSEs [enabledE], simpset() addsimps [Deq_def]));
 qed "Deq_enabledE";
--- a/src/HOL/TLA/Buffer/DBuffer.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Buffer/DBuffer.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -6,7 +6,7 @@
     Double FIFO buffer implements simple FIFO buffer.
 *)
 
-val db_css = (!claset, !simpset addsimps [qc_def]);
+val db_css = (claset(), simpset() addsimps [qc_def]);
 Addsimps [qc_def];
 
 val db_defs = [BInit_def, Enq_def, Deq_def, Next_def, IBuffer_def, Buffer_def,
@@ -23,7 +23,7 @@
 goal DBuffer.thy "[DBNext]_<inp,mid,out,q1,q2> .-> [Next inp qc out]_<inp,qc,out>";
 by (rtac square_simulation 1);
 by (Action_simp_tac 1);
-by (action_simp_tac (!simpset addsimps hd_append::db_defs) [] [] 1);
+by (action_simp_tac (simpset() addsimps hd_append::db_defs) [] [] 1);
 qed "DB_step_simulation";
 
 
@@ -77,9 +77,9 @@
   "[][DBNext]_<inp,mid,out,q1,q2> .& WF(DBPass)_<inp,mid,out,q1,q2> \
 \  .-> ($qc .~= .[] .& $q2 .= .[] ~> $q2 .~= .[])";
 by (rtac WF1 1);
-by (action_simp_tac (!simpset addsimps square_def::db_defs) [] [] 1);
-by (action_simp_tac (!simpset addsimps [angle_def,DBPass_def]) [] [] 1);
-by (action_simp_tac (!simpset addsimps [DBPass_enabled]) [] [] 1);
+by (action_simp_tac (simpset() addsimps square_def::db_defs) [] [] 1);
+by (action_simp_tac (simpset() addsimps [angle_def,DBPass_def]) [] [] 1);
+by (action_simp_tac (simpset() addsimps [DBPass_enabled]) [] [] 1);
 qed "DBFair_1a";
 
 (* Condition (1) *)
@@ -96,9 +96,9 @@
   "[][DBNext]_<inp,mid,out,q1,q2> .& WF(DBDeq)_<inp,mid,out,q1,q2> \
 \  .-> ($q2 .~= .[] ~> DBDeq)";
 by (rtac WF_leadsto 1);
-by (action_simp_tac (!simpset addsimps [DBDeq_visible,DBDeq_enabled]) [] [] 1);
-by (action_simp_tac (!simpset addsimps [angle_def]) [] [] 1);
-by (action_simp_tac (!simpset addsimps square_def::db_defs) [tempI] [Stable] 1);
+by (action_simp_tac (simpset() addsimps [DBDeq_visible,DBDeq_enabled]) [] [] 1);
+by (action_simp_tac (simpset() addsimps [angle_def]) [] [] 1);
+by (action_simp_tac (simpset() addsimps square_def::db_defs) [tempI] [Stable] 1);
 qed "DBFair_2";
 
 (* High-level fairness *)
--- a/src/HOL/TLA/Inc/Inc.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Inc/Inc.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -10,7 +10,7 @@
 val Psi_defs = [Psi_def,InitPsi_def,N1_def,N2_def,alpha1_def,alpha2_def,
                 beta1_def,beta2_def,gamma1_def,gamma2_def];
 
-val Inc_css = (!claset, !simpset);
+val Inc_css = (claset(), simpset());
 
 (*** Invariant proof for Psi: "manual" proof proves individual lemmas ***)
 
@@ -55,7 +55,7 @@
    More substantial examples require manual guidance anyway.
 
 goal Inc.thy "Psi .-> []PsiInv";
-by (auto_inv_tac (!simpset addsimps PsiInv_defs @ Psi_defs @ pcount.simps) 1);
+by (auto_inv_tac (simpset() addsimps PsiInv_defs @ Psi_defs @ pcount.simps) 1);
 
 *)
 
--- a/src/HOL/TLA/Intensional.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Intensional.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -89,7 +89,7 @@
 	 Const("Intensional.TrueInt",_) $ p => int_unlift th
        | _ => th);
 
-simpset := !simpset setmksimps ((mksimps mksimps_pairs) o maybe_unlift);
+simpset_ref() := simpset() setmksimps ((mksimps mksimps_pairs) o maybe_unlift);
 
 
 (* ==================== Rewrites for abstractions ==================== *)
--- a/src/HOL/TLA/Memory/MIlive.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Memory/MIlive.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -27,7 +27,7 @@
 qed_goal "S1_RNextdisabled" MemoryImplementation.thy
    "$(S1 rmhist p) .-> \
 \   .~$(Enabled (<RNext memCh mem (resbar rmhist) p>_<rtrner memCh @ p, resbar rmhist @ p>))"
-   (fn _ => [action_simp_tac (!simpset addsimps [angle_def,S_def,S1_def])
+   (fn _ => [action_simp_tac (simpset() addsimps [angle_def,S_def,S1_def])
 	                     [notI] [enabledE,MemoryidleE] 1,
 	     auto_tac MI_fast_css
 	    ]);
@@ -35,7 +35,7 @@
 qed_goal "S1_Returndisabled" MemoryImplementation.thy
    "$(S1 rmhist p) .-> \
 \   .~$(Enabled (<MemReturn memCh (resbar rmhist) p>_<rtrner memCh @ p, resbar rmhist @ p>))"
-   (fn _ => [action_simp_tac (!simpset addsimps [angle_def,MemReturn_def,Return_def,S_def,S1_def])
+   (fn _ => [action_simp_tac (simpset() addsimps [angle_def,MemReturn_def,Return_def,S_def,S1_def])
 	                     [notI] [enabledE] 1
 	    ]);
 
@@ -74,7 +74,7 @@
    (fn _ => [cut_facts_tac [MI_base] 1,
 	     auto_tac (MI_css addsimps2 [c_def,base_pair]
 		              addSIs2 [MClkFwd_ch_enabled,action_mp MClkFwd_enabled]),
-	     ALLGOALS (action_simp_tac (!simpset addsimps [S_def,S2_def]) [] [])
+	     ALLGOALS (action_simp_tac (simpset() addsimps [S_def,S2_def]) [] [])
 	    ]);
 
 qed_goal "S2_live" MemoryImplementation.thy
@@ -106,7 +106,7 @@
    (fn _ => [cut_facts_tac [MI_base] 1,
 	     auto_tac (MI_css addsimps2 [r_def,base_pair]
 		              addSIs2 [RPCFail_Next_enabled,action_mp RPCFail_enabled]),
-	     ALLGOALS (action_simp_tac (!simpset addsimps [S_def,S3_def]) [] [])
+	     ALLGOALS (action_simp_tac (simpset() addsimps [S_def,S3_def]) [] [])
 	    ]);
 
 qed_goal "S3_live" MemoryImplementation.thy
@@ -157,7 +157,7 @@
 	     ALLGOALS (cut_facts_tac [MI_base]),
 	     auto_tac (MI_css addsimps2 [base_pair]),
 	        (* it's faster to expand S4 only where necessary *)
-	     action_simp_tac (!simpset addsimps [S_def,S4_def]) [] [] 1
+	     action_simp_tac (simpset() addsimps [S_def,S4_def]) [] [] 1
 	    ]);
 
 qed_goal "S4a_live" MemoryImplementation.thy
@@ -166,7 +166,7 @@
 \  .-> (($(S4 rmhist p) .& ($(ires@p) .= #NotAResult))  \
 \        ~> ($(S4 rmhist p) .& ($(ires@p) .~= #NotAResult)) .| $(S5 rmhist p))"
    (fn _ => [rtac WF1 1,
-	     ALLGOALS (action_simp_tac (!simpset)
+	     ALLGOALS (action_simp_tac (simpset())
 		                       (map ((rewrite_rule [slice_def]) o action_mp) 
                                             [S4a_successors,S4aRNext_successors,S4aRNext_enabled])
 				       [])
@@ -203,7 +203,7 @@
    (fn _ => [cut_facts_tac [MI_base] 1,
              auto_tac (MI_css addsimps2 [m_def,base_pair]
 		              addSIs2 [action_mp MemReturn_enabled]),
-	     ALLGOALS (action_simp_tac (!simpset addsimps [S_def,S4_def]) [] [])
+	     ALLGOALS (action_simp_tac (simpset() addsimps [S_def,S4_def]) [] [])
 	    ]);
 
 qed_goal "S4b_live" MemoryImplementation.thy
@@ -211,7 +211,7 @@
 \  .& WF(MemReturn rmCh ires p)_(m p) \
 \  .-> (($(S4 rmhist p) .& ($(ires@p) .~= #NotAResult)) ~> $(S5 rmhist p))"
    (fn _ => [rtac WF1 1,
-	     ALLGOALS (action_simp_tac (!simpset)
+	     ALLGOALS (action_simp_tac (simpset())
 		                       (map ((rewrite_rule [slice_def]) o action_mp) 
                                             [S4b_successors,S4bReturn_successors,S4bReturn_enabled])
 				       [allE])
@@ -238,7 +238,7 @@
    (fn _ => [cut_facts_tac [MI_base] 1,
 	     auto_tac (MI_css addsimps2 [r_def,base_pair]
 		              addSIs2 [RPCFail_Next_enabled,action_mp RPCFail_enabled]),
-	     ALLGOALS (action_simp_tac (!simpset addsimps [S_def,S5_def]) [] [])
+	     ALLGOALS (action_simp_tac (simpset() addsimps [S_def,S5_def]) [] [])
 	    ]);
 
 qed_goal "S5_live" MemoryImplementation.thy
@@ -268,7 +268,7 @@
 qed_goal "MClkReplyS6" MemoryImplementation.thy
    "$(ImpInv rmhist p) .& <MClkReply memCh crCh cst p>_(c p) .-> $(S6 rmhist p)"
    (fn _ => [action_simp_tac
-	        (!simpset addsimps
+	        (simpset() addsimps
 		    [angle_def,MClkReply_def,Return_def,
 		     ImpInv_def,S_def,S1_def,S2_def,S3_def,S4_def,S5_def])
 		[] [] 1
@@ -279,7 +279,7 @@
    (fn _ => [cut_facts_tac [MI_base] 1,
 	     auto_tac (MI_css addsimps2 [c_def,base_pair]
 		              addSIs2 [action_mp MClkReply_enabled]),
-	     ALLGOALS (action_simp_tac (!simpset addsimps [S_def,S6_def]) [] [])
+	     ALLGOALS (action_simp_tac (simpset() addsimps [S_def,S6_def]) [] [])
 	    ]);
 
 qed_goal "S6_live" MemoryImplementation.thy
@@ -290,7 +290,7 @@
 	     subgoal_tac "sigma |= []<>(<MClkReply memCh crCh cst p>_(c p))" 1,
 	     eres_inst_tac [("P","<MClkReply memCh crCh cst p>_(c p)")]
 	                   EnsuresInfinite 1, atac 1,
-	     action_simp_tac (!simpset) []
+	     action_simp_tac (simpset()) []
 	                     (map action_conjimpE [MClkReplyS6,S6MClkReply_successors]) 1,
 	     auto_tac (MI_css addsimps2 [SF_def]),
 	     etac swap 1,
@@ -377,6 +377,6 @@
 \               (sigma |= []<>($(S6 rmhist p)) .-> []<>($(S1 rmhist p))) |] \
 \            ==> (sigma |= []<>($(S1 rmhist p)))"
    (fn _ => [rtac classical 1,
-	     asm_full_simp_tac (!simpset addsimps [NotBox, temp_rewrite NotDmd]) 1,
+	     asm_full_simp_tac (simpset() addsimps [NotBox, temp_rewrite NotDmd]) 1,
 	     auto_tac (MI_css addSEs2 [mp,leadsto_infinite] addSDs2 [temp_mp DBImplBDAct])
 	    ]);
--- a/src/HOL/TLA/Memory/MIsafe.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Memory/MIsafe.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -141,7 +141,7 @@
 qed_goal "S2Forward" MemoryImplementation.thy
    "$(S2 rmhist p) .& (MClkFwd memCh crCh cst p) .& unchanged <e p, r p, m p, rmhist@p> \
 \   .-> (S3 rmhist p)$"
-   (fn _ => [action_simp_tac (!simpset addsimps
+   (fn _ => [action_simp_tac (simpset() addsimps
                 [MClkFwd_def,Call_def,e_def,r_def,m_def,caller_def,rtrner_def,
                  S_def,S2_def,S3_def,Calling_def])
                [] [] 1
@@ -189,7 +189,7 @@
 qed_goal "S3LegalRcvArg" MemoryImplementation.thy
    "$(S3 rmhist p) .-> IsLegalRcvArg[ arg[$(crCh@p)] ]"
    (fn _ => [action_simp_tac
-	       (!simpset addsimps [IsLegalRcvArg_def,MClkRelayArg_def,S_def,S3_def])
+	       (simpset() addsimps [IsLegalRcvArg_def,MClkRelayArg_def,S_def,S3_def])
 	       [exI] [] 1
 	    ]);
 
@@ -206,7 +206,7 @@
    "(RPCFwd crCh rmCh rst p) .& HNext rmhist p .& $(S3 rmhist p) .& unchanged <e p, c p, m p> \
 \   .-> (S4 rmhist p)$ .& unchanged (rmhist@p)"
    (fn _ => [action_simp_tac 
-               (!simpset addsimps [RPCFwd_def,HNext_def,MemReturn_def,RPCFail_def,MClkReply_def,
+               (simpset() addsimps [RPCFwd_def,HNext_def,MemReturn_def,RPCFail_def,MClkReply_def,
 				   Return_def,Call_def,e_def,c_def,m_def,caller_def,rtrner_def, 
 				   S_def,S3_def,S4_def,Calling_def])
 	       [] [] 1
@@ -217,7 +217,7 @@
    "(RPCFail crCh rmCh rst p) .& $(S3 rmhist p) .& HNext rmhist p .& unchanged <e p, c p, m p> \
 \   .-> (S6 rmhist p)$"
    (fn _ => [action_simp_tac 
-               (!simpset addsimps [HNext_def,RPCFail_def,Return_def,e_def,c_def,m_def,
+               (simpset() addsimps [HNext_def,RPCFail_def,Return_def,e_def,c_def,m_def,
 				   caller_def,rtrner_def,MVOKBARF_def,
 				   S_def,S3_def,S6_def,Calling_def])
                [] [] 1
@@ -268,7 +268,7 @@
 \        .& (HNext rmhist p) .& $(MemInv mem l) \
 \   .-> (S4 rmhist p)$ .& unchanged (rmhist@p)"
    (fn _ => [action_simp_tac 
-               (!simpset addsimps [ReadInner_def,GoodRead_def, BadRead_def,HNext_def,
+               (simpset() addsimps [ReadInner_def,GoodRead_def, BadRead_def,HNext_def,
 				   MemReturn_def, RPCFail_def,MClkReply_def,Return_def,
 				   e_def,c_def,r_def,rtrner_def,caller_def,MVNROKBA_def,
 				   S_def,S4_def,RdRequest_def,Calling_def,MemInv_def])
@@ -288,7 +288,7 @@
    "(WriteInner rmCh mem ires p l v) .& $(S4 rmhist p) .& unchanged <e p, c p, r p> .& (HNext rmhist p) \
 \   .-> (S4 rmhist p)$ .& unchanged (rmhist@p)"
    (fn _ => [action_simp_tac 
-               (!simpset addsimps [WriteInner_def,GoodWrite_def, BadWrite_def,HNext_def,
+               (simpset() addsimps [WriteInner_def,GoodWrite_def, BadWrite_def,HNext_def,
 				   MemReturn_def,RPCFail_def,MClkReply_def,Return_def,
 				   e_def,c_def,r_def,rtrner_def,caller_def,MVNROKBA_def, 
 				   S_def,S4_def,WrRequest_def,Calling_def])
@@ -355,7 +355,7 @@
    "(RPCReply crCh rmCh rst p) .& $(S5 rmhist p) .& unchanged <e p, c p, m p,rmhist@p> \
 \    .-> (S6 rmhist p)$"
    (fn _ => [action_simp_tac 
-               (!simpset
+               (simpset()
 		addsimps [RPCReply_def,Return_def,e_def,c_def,m_def,
 			  MVOKBA_def,MVOKBARF_def,caller_def,rtrner_def,
 			  S_def,S5_def,S6_def,Calling_def])
@@ -367,7 +367,7 @@
    "(RPCFail crCh rmCh rst p) .& $(S5 rmhist p) .& unchanged <e p, c p, m p,rmhist@p>\
 \     .-> (S6 rmhist p)$"
    (fn _ => [action_simp_tac
-	       (!simpset
+	       (simpset()
 		addsimps [RPCFail_def,Return_def,e_def,c_def,m_def,
 			  MVOKBARF_def,caller_def,rtrner_def,
 			  S_def,S5_def,S6_def,Calling_def])
@@ -409,7 +409,7 @@
    "(MClkRetry memCh crCh cst p) .& (HNext rmhist p) .& $(S6 rmhist p) .& unchanged<e p,r p,m p> \
 \     .-> (S3 rmhist p)$ .& unchanged (rmhist@p)"
    (fn _ => [action_simp_tac
-	        (!simpset addsimps [HNext_def,MClkReply_def,MClkRetry_def,Call_def,
+	        (simpset() addsimps [HNext_def,MClkReply_def,MClkRetry_def,Call_def,
 				    Return_def,e_def,r_def,m_def,caller_def,rtrner_def,
 		                    S_def,S6_def,S3_def,Calling_def])
                 [] [] 1]);
@@ -418,7 +418,7 @@
 qed_goal "S6Reply" MemoryImplementation.thy
    "(MClkReply memCh crCh cst p) .& (HNext rmhist p) .& $(S6 rmhist p) .& unchanged<e p,r p,m p> \
 \     .-> (S1 rmhist p)$"
-   (fn _ => [action_simp_tac (!simpset
+   (fn _ => [action_simp_tac (simpset()
 			      addsimps [HNext_def,MemReturn_def,RPCFail_def,Return_def,
 					MClkReply_def,e_def,r_def,m_def,caller_def,rtrner_def,
 					S_def,S6_def,S1_def,Calling_def])
--- a/src/HOL/TLA/Memory/MemClerk.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Memory/MemClerk.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -18,14 +18,14 @@
 
 qed_goal "MClkidle" MemClerk.thy
    ".~ $(Calling send p) .& ($(cst@p) .= #clkA) .-> .~ MClkNext send rcv cst p"
-   (fn _ => [ auto_tac (!claset,
-                        !simpset addsimps (MC_action_defs @ [Return_def]))
+   (fn _ => [ auto_tac (claset(),
+                        simpset() addsimps (MC_action_defs @ [Return_def]))
             ]);
 
 qed_goal "MClkbusy" MemClerk.thy
    "$(Calling rcv p) .-> .~ MClkNext send rcv cst p"
-   (fn _ => [ auto_tac (!claset,
-                        !simpset addsimps (MC_action_defs @ [Call_def]))
+   (fn _ => [ auto_tac (claset(),
+                        simpset() addsimps (MC_action_defs @ [Call_def]))
             ]);
 
 (* unlifted versions as introduction rules *)
@@ -39,14 +39,14 @@
    "!!p. base_var <rtrner send @ p, caller rcv @ p, cst@p> ==> \
 \        $(Calling send p) .& .~ $(Calling rcv p) .& ($(cst@p) .= #clkA)  \
 \        .-> $(Enabled (MClkFwd send rcv cst p))"
-   (fn _ => [action_simp_tac (!simpset addsimps [MClkFwd_def,Call_def,caller_def,rtrner_def])
+   (fn _ => [action_simp_tac (simpset() addsimps [MClkFwd_def,Call_def,caller_def,rtrner_def])
                              [] [base_enabled,Pair_inject] 1]);
 
 qed_goal "MClkFwd_ch_enabled" MemClerk.thy
    "Enabled (MClkFwd send rcv cst p) s  \
 \   ==> Enabled (<MClkFwd send rcv cst p>_<cst@p, rtrner send @ p, caller rcv @ p>) s"
-   (fn [prem] => [auto_tac (!claset addSIs [prem RS enabled_mono],
-			    !simpset addsimps [angle_def,MClkFwd_def])
+   (fn [prem] => [auto_tac (claset() addSIs [prem RS enabled_mono],
+			    simpset() addsimps [angle_def,MClkFwd_def])
 		 ]);
 
 qed_goal "MClkReply_change" MemClerk.thy
@@ -59,13 +59,13 @@
    "!!p. base_var <rtrner send @ p, caller rcv @ p, cst@p> ==> \
 \        $(Calling send p) .& .~ $(Calling rcv p) .& ($(cst@p) .= #clkB)  \
 \        .-> $(Enabled (<MClkReply send rcv cst p>_<cst@p, rtrner send @ p, caller rcv @ p>))"
-   (fn _ => [action_simp_tac (!simpset) [MClkReply_change RSN (2,enabled_mono)] [] 1,
-	     action_simp_tac (!simpset addsimps [MClkReply_def,Return_def,caller_def,rtrner_def])
+   (fn _ => [action_simp_tac (simpset()) [MClkReply_change RSN (2,enabled_mono)] [] 1,
+	     action_simp_tac (simpset() addsimps [MClkReply_def,Return_def,caller_def,rtrner_def])
                              [] [base_enabled,Pair_inject] 1
 	    ]);
 
 qed_goal "MClkReplyNotRetry" MemClerk.thy
    "MClkReply send rcv cst p .-> .~(MClkRetry send rcv cst p)"
-   (fn _ => [ auto_tac (!claset,
-			!simpset addsimps [MClkReply_def,MClkRetry_def]) 
+   (fn _ => [ auto_tac (claset(),
+			simpset() addsimps [MClkReply_def,MClkRetry_def]) 
 	    ]);
--- a/src/HOL/TLA/Memory/Memory.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Memory/Memory.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -19,7 +19,7 @@
 val UM_temp_defs = [UPSpec_def, MSpec_def, IUSpec_def];
 
 (* Make sure the simpset accepts non-boolean simplifications *)
-simpset := !simpset setmksimps ((mksimps mksimps_pairs) o maybe_unlift);
+simpset_ref() := simpset() setmksimps ((mksimps mksimps_pairs) o maybe_unlift);
 
 (* -------------------- Proofs -------------------------------------------------- *)
 
@@ -33,7 +33,7 @@
 (* The memory spec implies the memory invariant *)
 qed_goal "MemoryInvariant" Memory.thy 
    "(MSpec ch mm rs l) .-> []($(MemInv mm l))"
-   (fn _ => [ auto_inv_tac (!simpset addsimps RM_temp_defs @ MP_simps @ RM_action_defs) 1 ]);
+   (fn _ => [ auto_inv_tac (simpset() addsimps RM_temp_defs @ MP_simps @ RM_action_defs) 1 ]);
 
 (* The invariant is trivial for non-locations *)
 qed_goal "NonMemLocInvariant" Memory.thy
@@ -69,8 +69,8 @@
    "!!p. base_var <rtrner ch @ p, rs@p> ==> \
 \        $(Calling ch p) .& ($(rs@p) .~= #NotAResult) \
 \        .-> $(Enabled (<MemReturn ch rs p>_<rtrner ch @ p, rs@p>))"
-   (fn _ => [action_simp_tac (!simpset) [MemReturn_change RSN (2,enabled_mono)] [] 1,
-             action_simp_tac (!simpset addsimps [MemReturn_def,Return_def,rtrner_def])
+   (fn _ => [action_simp_tac (simpset()) [MemReturn_change RSN (2,enabled_mono)] [] 1,
+             action_simp_tac (simpset() addsimps [MemReturn_def,Return_def,rtrner_def])
                              [] [base_enabled,Pair_inject] 1
 	    ]);
 
@@ -83,7 +83,7 @@
 	     case_tac "MemLoc l" 1,
              ALLGOALS
 	        (action_simp_tac 
-                    (!simpset addsimps [ReadInner_def,GoodRead_def,BadRead_def,
+                    (simpset() addsimps [ReadInner_def,GoodRead_def,BadRead_def,
 					RdRequest_def])
                     [] [base_enabled,Pair_inject])
             ]);
@@ -96,7 +96,7 @@
 	     case_tac "MemLoc l & MemVal v" 1,
              ALLGOALS
 	        (action_simp_tac 
-                    (!simpset addsimps [WriteInner_def,GoodWrite_def,BadWrite_def,
+                    (simpset() addsimps [WriteInner_def,GoodWrite_def,BadWrite_def,
 					WrRequest_def])
                     [] [base_enabled,Pair_inject])
             ]);
@@ -104,7 +104,7 @@
 qed_goal "ReadResult" Memory.thy
    "(Read ch mm rs p) .& (RALL l. $(MemInv mm l)) .-> (rs@p)$ .~= #NotAResult"
    (fn _ => [action_simp_tac 
-               (!simpset addsimps (MP_simps 
+               (simpset() addsimps (MP_simps 
 				   @ [Read_def,ReadInner_def,GoodRead_def,
 				      BadRead_def,MemInv_def]))
 	       [] [] 1,
@@ -112,8 +112,8 @@
 
 qed_goal "WriteResult" Memory.thy
    "(Write ch mm rs p l) .-> (rs@p)$ .~= #NotAResult"
-   (fn _ => [auto_tac (!claset,
-		       !simpset addsimps (MP_simps @
+   (fn _ => [auto_tac (claset(),
+		       simpset() addsimps (MP_simps @
 				   [Write_def,WriteInner_def,GoodWrite_def,BadWrite_def]))
 	    ]);
 
@@ -146,14 +146,14 @@
    (fn _ => [auto_tac (action_css addsimps2 [enabled_disj]
 		                  addSIs2 [action_mp RWRNext_enabled]),
 	     res_inst_tac [("s","arg(ch s p)")] sumE 1,
-	     action_simp_tac (!simpset addsimps [Read_def,enabled_ex,base_pair])
+	     action_simp_tac (simpset() addsimps [Read_def,enabled_ex,base_pair])
 	                     [action_mp ReadInner_enabled,exI] [] 1,
 	     split_all_tac 1, Rd.induct_tac "xa" 1,
 	     (* introduce a trivial subgoal to solve flex-flex constraint?! *)
 	     subgoal_tac "y = snd(xa,y)" 1,
 	     TRYALL Simp_tac,  (* solves "read" case *)
 	     etac swap 1,
-	     action_simp_tac (!simpset addsimps [Write_def,enabled_ex,base_pair])
+	     action_simp_tac (simpset() addsimps [Write_def,enabled_ex,base_pair])
 	                     [action_mp WriteInner_enabled,exI] [] 1,
 	     split_all_tac 1, Wr.induct_tac "x" 1,
 	     subgoal_tac "(xa = fst(snd(x,xa,y))) & (y = snd(snd(x,xa,y)))" 1,
--- a/src/HOL/TLA/Memory/MemoryImplementation.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Memory/MemoryImplementation.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -67,7 +67,7 @@
 end;
 
 (* Make sure the simpset accepts non-boolean simplifications *)
-simpset := let val (_,ss) = MI_css in ss end;
+simpset_ref() := let val (_,ss) = MI_css in ss end;
 
 
 (****************************** The history variable ******************************)
@@ -79,9 +79,9 @@
 \                    .& [](RALL p. [HNext rmhist p]_<c p, r p, m p, rmhist@p>))"
    (fn _ => [Auto_tac(),
              rtac historyI 1, TRYALL atac,
-             action_simp_tac (!simpset addsimps [HInit_def]) [] [] 1,
+             action_simp_tac (simpset() addsimps [HInit_def]) [] [] 1,
              res_inst_tac [("x","p")] fun_cong 1, atac 1,
-             action_simp_tac (!simpset addsimps [HNext_def]) [busy_squareI] [] 1,
+             action_simp_tac (simpset() addsimps [HNext_def]) [busy_squareI] [] 1,
              res_inst_tac [("x","p")] fun_cong 1, atac 1
             ]);
 
@@ -127,7 +127,7 @@
 \   .-> (S2 rmhist p)$ .& (ENext p) .& unchanged <c p, r p, m p>"
    (fn _ => [auto_tac (MI_css addsimps2 [ImpNext_def]
 		              addSEs2 [S1ClerkUnchE,S1RPCUnchE,S1MemUnchE,S1HistE]),
-	     ALLGOALS (action_simp_tac (!simpset addsimps [square_def]) [] [S1EnvE])
+	     ALLGOALS (action_simp_tac (simpset() addsimps [square_def]) [] [S1EnvE])
 	    ]);
 
 qed_goal "Step1_2_2" MemoryImplementation.thy
@@ -136,7 +136,7 @@
 \   .-> (S3 rmhist p)$ .& (MClkFwd memCh crCh cst p) .& unchanged <e p, r p, m p, rmhist@p>"
    (fn _ => [auto_tac (MI_css addsimps2 [ImpNext_def]
 		              addSEs2 [S2EnvUnchE,S2RPCUnchE,S2MemUnchE,S2HistE]),
-	     ALLGOALS (action_simp_tac (!simpset addsimps [square_def]) [] [S2ClerkE,S2ForwardE])
+	     ALLGOALS (action_simp_tac (simpset() addsimps [square_def]) [] [S2ClerkE,S2ForwardE])
 	    ]);
 
 qed_goal "Step1_2_3" MemoryImplementation.thy
@@ -144,9 +144,9 @@
 \             .& .~ unchanged <e p, c p, r p, m p, rmhist@p>  .& $(S3 rmhist p) \
 \   .-> ((S4 rmhist p)$ .& RPCFwd crCh rmCh rst p .& unchanged <e p, c p, m p, rmhist@p>) \
 \        .| ((S6 rmhist p)$ .& RPCFail crCh rmCh rst p .& unchanged <e p, c p, m p>)"
-   (fn _ => [action_simp_tac (!simpset addsimps [ImpNext_def])
+   (fn _ => [action_simp_tac (simpset() addsimps [ImpNext_def])
 	                     [] [S3EnvUnchE,S3ClerkUnchE,S3MemUnchE] 1,
-             ALLGOALS (action_simp_tac (!simpset addsimps [square_def])
+             ALLGOALS (action_simp_tac (simpset() addsimps [square_def])
 		                       [] [S3RPCE,S3ForwardE,S3FailE]),
              auto_tac (MI_css addEs2 [S3HistE])
 	    ]);
@@ -158,9 +158,9 @@
 \   .-> ((S4 rmhist p)$ .& Read rmCh mem ires p .& unchanged <e p, c p, r p, rmhist@p>) \
 \        .| ((S4 rmhist p)$ .& (REX l. Write rmCh mem ires p l) .& unchanged <e p, c p, r p, rmhist@p>) \
 \        .| ((S5 rmhist p)$ .& MemReturn rmCh ires p .& unchanged <e p, c p, r p>)"
-   (fn _ => [action_simp_tac (!simpset addsimps [ImpNext_def]) 
+   (fn _ => [action_simp_tac (simpset() addsimps [ImpNext_def]) 
                              [] [S4EnvUnchE,S4ClerkUnchE,S4RPCUnchE] 1,
-             ALLGOALS (action_simp_tac (!simpset addsimps [square_def,RNext_def])
+             ALLGOALS (action_simp_tac (simpset() addsimps [square_def,RNext_def])
                                        [] [S4ReadE,S4WriteE,S4ReturnE]),
              auto_tac (MI_css addEs2 [S4HistE])
             ]);
@@ -170,9 +170,9 @@
 \             .& .~ unchanged <e p, c p, r p, m p, rmhist@p>  .& $(S5 rmhist p) \
 \   .-> ((S6 rmhist p)$ .& RPCReply crCh rmCh rst p .& unchanged <e p, c p, m p>) \
 \        .| ((S6 rmhist p)$ .& RPCFail crCh rmCh rst p .& unchanged <e p, c p, m p>)"
-   (fn _ => [action_simp_tac (!simpset addsimps [ImpNext_def]) 
+   (fn _ => [action_simp_tac (simpset() addsimps [ImpNext_def]) 
                              [] [S5EnvUnchE,S5ClerkUnchE,S5MemUnchE,S5HistE] 1,
-	     action_simp_tac (!simpset addsimps [square_def]) [] [S5RPCE] 1,
+	     action_simp_tac (simpset() addsimps [square_def]) [] [S5RPCE] 1,
 	     auto_tac (MI_fast_css addSEs2 [S5ReplyE,S5FailE])
 	    ]);
 
@@ -181,9 +181,9 @@
 \             .& .~ unchanged <e p, c p, r p, m p, rmhist@p>  .& $(S6 rmhist p) \
 \   .-> ((S1 rmhist p)$ .& (MClkReply memCh crCh cst p) .& unchanged <e p, r p, m p>)\
 \        .| ((S3 rmhist p)$ .& (MClkRetry memCh crCh cst p) .& unchanged <e p,r p,m p,rmhist@p>)"
-   (fn _ => [action_simp_tac (!simpset addsimps [ImpNext_def]) 
+   (fn _ => [action_simp_tac (simpset() addsimps [ImpNext_def]) 
                              [] [S6EnvUnchE,S6RPCUnchE,S6MemUnchE] 1,
-             ALLGOALS (action_simp_tac (!simpset addsimps [square_def]) 
+             ALLGOALS (action_simp_tac (simpset() addsimps [square_def]) 
                                        [] [S6ClerkE,S6RetryE,S6ReplyE]),
              auto_tac (MI_css addEs2 [S6HistE])
             ]);
@@ -199,7 +199,7 @@
 
 qed_goal "Step1_3" MemoryImplementation.thy 
    "$(S1 rmhist p) .-> $(PInit (resbar rmhist) p)"
-   (fn _ => [action_simp_tac (!simpset addsimps [resbar_unl,PInit_def,S_def,S1_def])
+   (fn _ => [action_simp_tac (simpset() addsimps [resbar_unl,PInit_def,S_def,S1_def])
                              [] [] 1
             ]);
 
@@ -233,7 +233,7 @@
                      adding them as unsafe elims doesn't help, 
                      because auto_tac doesn't find the proof! *)
             REPEAT (eresolve_tac [S3_exclE,S4_exclE] 1),
-            action_simp_tac (!simpset addsimps [S_def, S3_def]) [] [] 1
+            action_simp_tac (simpset() addsimps [S_def, S3_def]) [] [] 1
            ]);
 
 qed_goal "Step1_4_3b" MemoryImplementation.thy
@@ -242,7 +242,7 @@
   (fn _ => [auto_tac (MI_css addsimps2 [RPCFail_def,MemFail_def,e_def,c_def,m_def,
 		                        resbar_unl]),
 	        (* It's faster not to expand S3 at once *)
-            action_simp_tac (!simpset addsimps [S3_def,S_def]) [] [] 1,
+            action_simp_tac (simpset() addsimps [S3_def,S_def]) [] [] 1,
             etac S6_exclE 1,
             auto_tac (MI_fast_css addsimps2 [Return_def])
            ]);
@@ -253,12 +253,12 @@
 \   .& unchanged <e p, c p, r p, rmhist@p> .& $(MemInv mem l) \
 \   .-> ReadInner memCh mem (resbar rmhist) p l"
   (fn _ => [action_simp_tac 
-               (!simpset addsimps [ReadInner_def,GoodRead_def,BadRead_def,e_def,c_def,m_def]) 
+               (simpset() addsimps [ReadInner_def,GoodRead_def,BadRead_def,e_def,c_def,m_def]) 
                [] [] 1,
             ALLGOALS (REPEAT o (etac S4_exclE)),
             auto_tac (MI_css addsimps2 [resbar_unl]),
 	    ALLGOALS (action_simp_tac 
-                        (!simpset addsimps [RPCRelayArg_def,MClkRelayArg_def,
+                        (simpset() addsimps [RPCRelayArg_def,MClkRelayArg_def,
 		                            S_def,S4_def,RdRequest_def,MemInv_def])
 		      [] [impE,MemValNotAResultE])
            ]);
@@ -274,14 +274,14 @@
 \                                    .& unchanged <e p, c p, r p, rmhist@p> \
 \   .-> WriteInner memCh mem (resbar rmhist) p l v"
   (fn _ => [action_simp_tac 
-               (!simpset addsimps [WriteInner_def, GoodWrite_def, BadWrite_def,
+               (simpset() addsimps [WriteInner_def, GoodWrite_def, BadWrite_def,
 			           e_def, c_def, m_def])
                [] [] 1,
             ALLGOALS (REPEAT o (etac S4_exclE)),
 	    auto_tac (MI_css addsimps2 [resbar_unl]),
                (* it's faster not to merge the two simplifications *)
 	    ALLGOALS (action_simp_tac
-                        (!simpset addsimps [RPCRelayArg_def,MClkRelayArg_def,
+                        (simpset() addsimps [RPCRelayArg_def,MClkRelayArg_def,
 		                            S_def,S4_def,WrRequest_def])
 		      [] [])
            ]);
@@ -296,7 +296,7 @@
    "MemReturn rmCh ires p .& $(S4 rmhist p) .& (S5 rmhist p)$ .& unchanged <e p, c p, r p> \
 \   .-> unchanged <rtrner memCh @ p, resbar rmhist @ p>"
   (fn _ => [action_simp_tac
-	       (!simpset addsimps [e_def,c_def,r_def,resbar_unl]) [] [] 1,
+	       (simpset() addsimps [e_def,c_def,r_def,resbar_unl]) [] [] 1,
 	    REPEAT (eresolve_tac [S4_exclE,S5_exclE] 1),
 	    auto_tac (MI_fast_css addsimps2 [MemReturn_def,Return_def])
            ]);
@@ -314,10 +314,10 @@
    "RPCFail crCh rmCh rst p .& $(S5 rmhist p) .& (S6 rmhist p)$ .& unchanged <e p, c p, m p>\
 \   .-> MemFail memCh (resbar rmhist) p"
   (fn _ => [action_simp_tac
-	       (!simpset addsimps [e_def, c_def, m_def, RPCFail_def, Return_def,
+	       (simpset() addsimps [e_def, c_def, m_def, RPCFail_def, Return_def,
 				   MemFail_def, resbar_unl])
 	       [] [] 1,
-	    action_simp_tac (!simpset addsimps [S5_def,S_def]) [] [] 1,
+	    action_simp_tac (simpset() addsimps [S5_def,S_def]) [] [] 1,
             etac S6_exclE 1,
 	    auto_tac MI_css
            ]);
@@ -326,16 +326,16 @@
    "MClkReply memCh crCh cst p .& $(S6 rmhist p) .& (S1 rmhist p)$ .& unchanged <e p, r p, m p> \
 \   .-> MemReturn memCh (resbar rmhist) p"
   (fn _ => [action_simp_tac
-	      (!simpset addsimps [e_def, r_def, m_def, MClkReply_def, MemReturn_def,
+	      (simpset() addsimps [e_def, r_def, m_def, MClkReply_def, MemReturn_def,
 				  Return_def, resbar_unl]) 
               [] [] 1,
             ALLGOALS (etac S6_exclE),
 	    ALLGOALS Asm_full_simp_tac,  (* simplify if-then-else *)
 	    ALLGOALS (action_simp_tac
-    	              (!simpset addsimps [MClkReplyVal_def,S6_def,S_def])
+    	              (simpset() addsimps [MClkReplyVal_def,S6_def,S_def])
 		      [] []),
             rtac ifI 1,
-            ALLGOALS (action_simp_tac (!simpset) [] [MVOKBARFnotNRE])
+            ALLGOALS (action_simp_tac (simpset()) [] [MVOKBARFnotNRE])
            ]);
 
 qed_goal "Step1_4_6b" MemoryImplementation.thy
@@ -343,12 +343,12 @@
 \                              .& unchanged <e p, r p, m p, rmhist@p> \
 \   .-> MemFail memCh (resbar rmhist) p"
   (fn _ => [action_simp_tac
-	       (!simpset addsimps [e_def, r_def, m_def, MClkRetry_def, MemFail_def, resbar_unl])
+	       (simpset() addsimps [e_def, r_def, m_def, MClkRetry_def, MemFail_def, resbar_unl])
 	       [] [] 1,
 	    SELECT_GOAL (auto_tac (MI_css addsimps2 [S6_def,S_def])) 1,
             etac S3_exclE 1,
             Asm_full_simp_tac 1,
-	    action_simp_tac (!simpset addsimps [S6_def,S3_def,S_def]) [] [] 1
+	    action_simp_tac (simpset() addsimps [S6_def,S3_def,S_def]) [] [] 1
            ]);
 
 qed_goal "S_lemma" MemoryImplementation.thy
@@ -364,7 +364,7 @@
 \                                    S4 rmhist p, S5 rmhist p, S6 rmhist p>"
    (fn _ => [Action_simp_tac 1,
 	     SELECT_GOAL (auto_tac (MI_fast_css addsimps2 [c_def])) 1,
-             ALLGOALS (simp_tac (!simpset
+             ALLGOALS (simp_tac (simpset()
 				 addsimps [S1_def,S2_def,S3_def,S4_def,S5_def,S6_def])),
 	     auto_tac (MI_css addSIs2 [action_mp S_lemma])
             ]);
@@ -391,7 +391,7 @@
 	   case_tac "(unchanged <e p, c p, r p, m p, rmhist@p>) [[s,t]]" i,
 	   rewrite_goals_tac action_rews,
 	   etac Step1_4_7h i,
-	   asm_full_simp_tac (!simpset addsimps simps) i
+	   asm_full_simp_tac (simpset() addsimps simps) i
 	  ];
 
 (* ----------------------------------------------------------------------
@@ -448,7 +448,7 @@
    (fn _ => [Action_simp_tac 1,
 	     rtac unchanged_safeI 1,
              auto_tac (MI_css addSEs2 [action_conjimpE Step1_2_4]),
-             ALLGOALS (action_simp_tac (!simpset addsimps [square_def,UNext_def,RNext_def]) [] []),
+             ALLGOALS (action_simp_tac (simpset() addsimps [square_def,UNext_def,RNext_def]) [] []),
 	     auto_tac (MI_fast_css addSEs2 (map action_conjimpE 
                                                 [Step1_4_4a,Step1_4_4b,Step1_4_4c]))
 	    ]);
@@ -606,9 +606,9 @@
 \   .& $(S4 rmhist p) .& Write rmCh mem ires p l \
 \   .-> (S4 rmhist p)$ .& unchanged <e p, c p, r p, rmhist@p>"
    (fn _ => [split_idle_tac [] 1,
-             action_simp_tac (!simpset addsimps [ImpNext_def])
+             action_simp_tac (simpset() addsimps [ImpNext_def])
                              [] [S4EnvUnchE,S4ClerkUnchE,S4RPCUnchE] 1,
-             TRYALL (action_simp_tac (!simpset addsimps [square_def]) [] [S4WriteE]),
+             TRYALL (action_simp_tac (simpset() addsimps [square_def]) [] [S4WriteE]),
              Auto_tac()
             ]);
 
--- a/src/HOL/TLA/Memory/ProcedureInterface.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Memory/ProcedureInterface.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -28,13 +28,13 @@
 
 qed_goal "Call_enabled" ProcedureInterface.thy
    "!!p. base_var ((caller ch)@p) ==> (.~ $(Calling ch p) .-> $(Enabled (Call ch p (#v))))"
-   (fn _ => [action_simp_tac (!simpset addsimps [caller_def, Call_def]) 
+   (fn _ => [action_simp_tac (simpset() addsimps [caller_def, Call_def]) 
                              [] [base_enabled,Pair_inject] 1
             ]);
 
 qed_goal "Return_enabled" ProcedureInterface.thy
    "!!p. base_var ((rtrner ch)@p) ==> $(Calling ch p) .-> $(Enabled (Return ch p (#v)))"
-   (fn _ => [action_simp_tac (!simpset addsimps [rtrner_def, Return_def]) 
+   (fn _ => [action_simp_tac (simpset() addsimps [rtrner_def, Return_def]) 
                              [] [base_enabled,Pair_inject] 1
             ]);
 
@@ -43,15 +43,15 @@
 (* Calls and returns change their subchannel *)
 qed_goal "Call_changed" ProcedureInterface.thy
    "Call ch p v .-> <Call ch p v>_((caller ch)@p)"
-   (fn _ => [auto_tac (!claset,
-		       !simpset addsimps [angle_def,Call_def,caller_def,
+   (fn _ => [auto_tac (claset(),
+		       simpset() addsimps [angle_def,Call_def,caller_def,
 					  action_rewrite Calling_def])
 	    ]);
 
 qed_goal "Return_changed" ProcedureInterface.thy
    "Return ch p v .-> <Return ch p v>_((rtrner ch)@p)"
-   (fn _ => [auto_tac (!claset,
-		       !simpset addsimps [angle_def,Return_def,rtrner_def,
+   (fn _ => [auto_tac (claset(),
+		       simpset() addsimps [angle_def,Return_def,rtrner_def,
 					  action_rewrite Calling_def])
 	    ]);
 
--- a/src/HOL/TLA/Memory/RPC.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Memory/RPC.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -32,8 +32,8 @@
 (* RPC failure actions are visible. *)
 qed_goal "RPCFail_vis" RPC.thy
    "RPCFail send rcv rst p .-> <RPCNext send rcv rst p>_<rst@p, rtrner send @ p, caller rcv @ p>"
-   (fn _ => [auto_tac (!claset addSEs [Return_changedE],
-		       !simpset addsimps [angle_def,RPCNext_def,RPCFail_def])
+   (fn _ => [auto_tac (claset() addSEs [Return_changedE],
+		       simpset() addsimps [angle_def,RPCNext_def,RPCFail_def])
 	    ]);
 
 qed_goal "RPCFail_Next_enabled" RPC.thy
@@ -46,7 +46,7 @@
 qed_goal "RPCFail_enabled" RPC.thy
    "!!p. base_var <rtrner send @ p, caller rcv @ p, rst@p> ==> \
 \        .~ $(Calling rcv p) .& $(Calling send p) .-> $(Enabled (RPCFail send rcv rst p))"
-   (fn _ => [action_simp_tac (!simpset addsimps [RPCFail_def,Return_def,caller_def,rtrner_def])
+   (fn _ => [action_simp_tac (simpset() addsimps [RPCFail_def,Return_def,caller_def,rtrner_def])
                              [] [base_enabled,Pair_inject] 1
 	    ]);
 
@@ -54,6 +54,6 @@
    "!!p. base_var <rtrner send @ p, caller rcv @ p, rst@p> ==> \
 \        .~ $(Calling rcv p) .& $(Calling send p) .& $(rst@p) .= #rpcB \
 \        .-> $(Enabled (RPCReply send rcv rst p))"
-   (fn _ => [action_simp_tac (!simpset addsimps [RPCReply_def,Return_def,caller_def,rtrner_def])
+   (fn _ => [action_simp_tac (simpset() addsimps [RPCReply_def,Return_def,caller_def,rtrner_def])
                              [] [base_enabled,Pair_inject] 1]);
 
--- a/src/HOL/TLA/Stfun.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/Stfun.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -20,6 +20,6 @@
 qed_goal "PairVarE" Stfun.thy
   "[| <v,w> u = (x,y); [| v u = x; w u = y |] ==> PROP R |] ==> PROP R"
   (fn prems => [cut_facts_tac prems 1, resolve_tac prems 1,
-		ALLGOALS (asm_full_simp_tac (!simpset addsimps [pairSF_def]))
+		ALLGOALS (asm_full_simp_tac (simpset() addsimps [pairSF_def]))
                ]);
 
--- a/src/HOL/TLA/TLA.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/TLA.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -47,7 +47,7 @@
 AddDs [tempD];
 
 val temp_cs = action_cs addSIs [tempI] addDs [tempD];
-val temp_css = (temp_cs,!simpset);
+val temp_css = (temp_cs,simpset());
 
 (* ========================================================================= *)
 section "Init";
@@ -366,7 +366,7 @@
               Auto_tac(),
 	      etac (temp_conjimpE STL6) 1, atac 1,
 	      Asm_full_simp_tac 1,
-	      ALLGOALS (asm_full_simp_tac (!simpset addsimps more_temp_simps))
+	      ALLGOALS (asm_full_simp_tac (simpset() addsimps more_temp_simps))
 	    ]);
 
 qed_goalw "DmdBoxDmd" TLA.thy [dmd_def] "(<>[]<>F) .= ([]<>F)"
@@ -494,13 +494,13 @@
 
 fun auto_inv_tac ss =
   SELECT_GOAL
-    ((inv_tac (!claset,ss) 1) THEN
+    ((inv_tac (claset(),ss) 1) THEN
      (TRYALL (action_simp_tac (ss addsimps [Init_def,square_def]) [] [])));
 
 
 qed_goalw "unless" TLA.thy [dmd_def]
    "!!sigma. (sigma |= [](P .-> P` .| Q`)) ==> (sigma |= stable P .| <>Q`)"
-   (fn _ => [action_simp_tac (!simpset) [disjCI] [] 1,
+   (fn _ => [action_simp_tac (simpset()) [disjCI] [] 1,
 	     merge_box_tac 1,
 	     fast_tac (temp_cs addSEs [Stable]) 1
 	    ]);
@@ -593,12 +593,12 @@
 qed_goalw "streett_leadsto" TLA.thy [leadsto]
    "([]<>P .-> []<>Q) .= (<>(P ~> Q))"
    (fn _ => [Auto_tac(),
-             asm_full_simp_tac (!simpset addsimps boxact_def::more_temp_simps) 1,
+             asm_full_simp_tac (simpset() addsimps boxact_def::more_temp_simps) 1,
              SELECT_GOAL (auto_tac (temp_css addSEs2 [DmdImplE,STL4E] 
                                              addsimps2 Init_simps)) 1,
              SELECT_GOAL (auto_tac (temp_css addSIs2 [ImplDmdD] addSEs2 [STL4E])) 1,
              subgoal_tac "sigma |= []<><>Q" 1,
-             asm_full_simp_tac (!simpset addsimps more_temp_simps) 1,
+             asm_full_simp_tac (simpset() addsimps more_temp_simps) 1,
              rewtac (temp_rewrite DmdAct),
              dtac BoxDmdDmdBox 1, atac 1,
              auto_tac (temp_css addSEs2 [DmdImplE,STL4E])
@@ -683,7 +683,7 @@
 	     auto_tac (temp_css addSEs2 [STL4E]),
 	     rewtac (temp_rewrite DmdAct),
 	     subgoal_tac "sigmaa |= <><> Init H" 1,
-	     asm_full_simp_tac (!simpset addsimps more_temp_simps) 1,
+	     asm_full_simp_tac (simpset() addsimps more_temp_simps) 1,
 	     fast_tac (temp_cs addSEs [DmdImpl2]) 1
 	    ]);
 
@@ -810,7 +810,7 @@
 	   SELECT_GOAL (auto_tac (temp_css addsimps2 [WF_def,dmd_def])) 2,
 	   case_tac "sigma |= <>[][.~B]_f" 1,
 	   subgoal_tac "sigma |= <>[]P" 1,
-	   asm_full_simp_tac (!simpset addsimps [WF_def]) 1,
+	   asm_full_simp_tac (simpset() addsimps [WF_def]) 1,
 	   rtac (temp_mp (prem1 RS DmdImpl RS STL4)) 1,
 	   eres_inst_tac [("V","sigma |= <>[][.~B]_f")] thin_rl 1,
 	   etac (temp_conjimpE STL6) 1, atac 1,
@@ -844,10 +844,10 @@
 	   SELECT_GOAL
 	     (auto_tac (temp_css addsimps2 [symmetric(temp_rewrite STL5), temp_rewrite STL3]
 		                 addIs2 [(temp_unlift WF_Box) RS iffD1, temp_mp ImplDmd])) 1,
-	   asm_full_simp_tac (!simpset addsimps (WF_def::more_temp_simps)) 1,
+	   asm_full_simp_tac (simpset() addsimps (WF_def::more_temp_simps)) 1,
 	   etac InfImpl 1, atac 1,
 	   SELECT_GOAL (auto_tac (temp_css addSIs2 [action_mp prem1])) 1,
-	   ALLGOALS (asm_full_simp_tac (!simpset addsimps [square_def,angle_def]))
+	   ALLGOALS (asm_full_simp_tac (simpset() addsimps [square_def,angle_def]))
 	  ]);
 
 qed_goal "SF2" TLA.thy
@@ -862,7 +862,7 @@
 	   SELECT_GOAL (auto_tac (temp_css addsimps2 [SF_def,dmd_def])) 2,
 	   case_tac "sigma |= <>[][.~B]_f" 1,
 	   subgoal_tac "sigma |= <>[]P" 1,
-	   asm_full_simp_tac (!simpset addsimps [SF_def]) 1,
+	   asm_full_simp_tac (simpset() addsimps [SF_def]) 1,
 	   rtac (temp_mp (prem1 RS DmdImpl RS STL4)) 1,
 	   eres_inst_tac [("V","sigma |= <>[][.~B]_f")] thin_rl 1,
 	   dtac BoxDmdDmdBox 1, atac 1,
@@ -894,10 +894,10 @@
 	     (auto_tac (temp_css addsimps2 [symmetric(temp_rewrite STL5), temp_rewrite STL3]
 		                 addIs2 [(temp_unlift WF_Box) RS iffD1, temp_mp ImplDmd]
 			         addSEs2 [DmdImplE])) 1,
-	   asm_full_simp_tac (!simpset addsimps (SF_def::more_temp_simps)) 1,
+	   asm_full_simp_tac (simpset() addsimps (SF_def::more_temp_simps)) 1,
 	   eres_inst_tac [("F",".~ [.~ B]_f")] InfImpl 1, atac 1,
 	   SELECT_GOAL (auto_tac (temp_css addSIs2 [action_mp prem1])) 1,
-	   ALLGOALS (asm_full_simp_tac (!simpset addsimps [square_def,angle_def]))
+	   ALLGOALS (asm_full_simp_tac (simpset() addsimps [square_def,angle_def]))
 	  ]);
 
 (* ------------------------------------------------------------------------- *)
@@ -951,7 +951,7 @@
             etac wf_dmd 1,
             etac dup_boxE 1,
             etac STL4E 1,
-            action_simp_tac (!simpset addsimps [con_abs]) [tempI] [] 1,
+            action_simp_tac (simpset() addsimps [con_abs]) [tempI] [] 1,
             case_tac "sigma |= <>[][#False]_v" 1,
             ALLGOALS Asm_full_simp_tac,
             rewrite_goals_tac more_temp_simps,
@@ -983,7 +983,7 @@
   (fn [prem] => [Auto_tac(),
                  rtac ccontr 1,
                  asm_full_simp_tac 
-                   (!simpset addsimps ([action_rewrite not_angle] @ more_temp_simps)) 1,
+                   (simpset() addsimps ([action_rewrite not_angle] @ more_temp_simps)) 1,
                  dtac (prem RS (temp_mp wf_not_dmd_box_decrease)) 1,
                  dtac BoxDmdDmdBox 1, atac 1,
                  subgoal_tac "sigma |= []<>((#False)::action)" 1,
@@ -1001,11 +1001,11 @@
   (fn _ => [Auto_tac(),
             subgoal_tac "sigma |= []<><.~( {[n$,$n]} .: #less_than)>_n" 1,
             etac thin_rl 1, etac STL4E 1, rtac DmdImpl 1,
-            SELECT_GOAL (auto_tac (!claset, !simpset addsimps [angle_def])) 1,
+            SELECT_GOAL (auto_tac (claset(), simpset() addsimps [angle_def])) 1,
             rtac nat_less_cases 1,
             Auto_tac(),
             rtac (temp_mp wf_box_dmd_decrease) 1,
-            auto_tac (!claset addSEs [STL4E] addSIs [DmdImpl], !simpset)
+            auto_tac (claset() addSEs [STL4E] addSIs [DmdImpl], simpset())
            ]);
 
 (* ------------------------------------------------------------------------- *)
--- a/src/HOL/TLA/cladata.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/TLA/cladata.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -43,14 +43,14 @@
 **)
 
 val action_cs = (HOL_cs addSIs [actionI,intI] addSEs [exE_prop] addDs [actionD,intD] 
-                        addss !simpset) 
+                        addss simpset()) 
                 addSaltern action_hyp_subst_tac;
-val action_css = (action_cs, !simpset);
+val action_css = (action_cs, simpset());
 
 
 AddSIs [actionI,intI];
 AddDs  [actionD,intD];
-Addss  (!simpset);
+Addss  (simpset());
 
 
 
--- a/src/HOL/Trancl.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Trancl.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -52,7 +52,7 @@
 \     !!x y z.[| P((x,y)); (x,y): r^*; (y,z): r |]  ==>  P((x,z)) |] \
 \  ==>  P((a,b))";
 by (rtac ([rtrancl_def, rtrancl_fun_mono, major] MRS def_induct) 1);
-by (blast_tac (!claset addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
 qed "rtrancl_full_induct";
 
 (*nice induction rule*)
@@ -67,8 +67,8 @@
 by (Blast_tac 1);
 (*now do the induction*)
 by (resolve_tac [major RS rtrancl_full_induct] 1);
-by (blast_tac (!claset addIs prems) 1);
-by (blast_tac (!claset addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
 qed "rtrancl_induct";
 
 bind_thm
@@ -78,9 +78,9 @@
 
 (*transitivity of transitive closure!! -- by induction.*)
 goalw Trancl.thy [trans_def] "trans(r^*)";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (eres_inst_tac [("b","z")] rtrancl_induct 1);
-by (ALLGOALS(blast_tac (!claset addIs [rtrancl_into_rtrancl])));
+by (ALLGOALS(blast_tac (claset() addIs [rtrancl_into_rtrancl])));
 qed "trans_rtrancl";
 
 bind_thm ("rtrancl_trans", trans_rtrancl RS transD);
@@ -93,8 +93,8 @@
 \    |] ==> P";
 by (subgoal_tac "(a::'a) = b  | (? y. (a,y) : r^* & (y,b) : r)" 1);
 by (rtac (major RS rtrancl_induct) 2);
-by (blast_tac (!claset addIs prems) 2);
-by (blast_tac (!claset addIs prems) 2);
+by (blast_tac (claset() addIs prems) 2);
+by (blast_tac (claset() addIs prems) 2);
 by (REPEAT (eresolve_tac ([asm_rl,exE,disjE,conjE]@prems) 1));
 qed "rtranclE";
 
@@ -110,7 +110,7 @@
 by (rtac iffI 1);
 by (etac rtrancl_induct 1);
 by (rtac rtrancl_refl 1);
-by (blast_tac (!claset addIs [rtrancl_trans]) 1);
+by (blast_tac (claset() addIs [rtrancl_trans]) 1);
 by (etac r_into_rtrancl 1);
 qed "rtrancl_idemp";
 Addsimps [rtrancl_idemp];
@@ -128,12 +128,12 @@
 qed "rtrancl_subset";
 
 goal Trancl.thy "!!R. (R^* Un S^*)^* = (R Un S)^*";
-by (blast_tac (!claset addSIs [rtrancl_subset]
+by (blast_tac (claset() addSIs [rtrancl_subset]
                        addIs [r_into_rtrancl, rtrancl_mono RS subsetD]) 1);
 qed "rtrancl_Un_rtrancl";
 
 goal Trancl.thy "(R^=)^* = R^*";
-by (blast_tac (!claset addSIs [rtrancl_subset]
+by (blast_tac (claset() addSIs [rtrancl_subset]
                        addIs  [rtrancl_refl, r_into_rtrancl]) 1);
 qed "rtrancl_reflcl";
 Addsimps [rtrancl_reflcl];
@@ -142,18 +142,18 @@
 by (rtac inverseI 1);
 by (etac rtrancl_induct 1);
 by (rtac rtrancl_refl 1);
-by (blast_tac (!claset addIs [r_into_rtrancl,rtrancl_trans]) 1);
+by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1);
 qed "rtrancl_inverseD";
 
 goal Trancl.thy "!!r. (x,y) : (r^*)^-1 ==> (x,y) : (r^-1)^*";
 by (dtac inverseD 1);
 by (etac rtrancl_induct 1);
 by (rtac rtrancl_refl 1);
-by (blast_tac (!claset addIs [r_into_rtrancl,rtrancl_trans]) 1);
+by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1);
 qed "rtrancl_inverseI";
 
 goal Trancl.thy "(r^-1)^* = (r^*)^-1";
-by (safe_tac (!claset addSIs [rtrancl_inverseI]));
+by (safe_tac (claset() addSIs [rtrancl_inverseI]));
 by (res_inst_tac [("p","x")] PairE 1);
 by (hyp_subst_tac 1);
 by (etac rtrancl_inverseD 1);
@@ -165,7 +165,7 @@
 \     ==> P(a)";
 by (rtac ((major RS inverseI RS rtrancl_inverseI) RS rtrancl_induct) 1);
 by (resolve_tac prems 1);
-by (blast_tac (!claset addIs prems addSDs[rtrancl_inverseD])1);
+by (blast_tac (claset() addIs prems addSDs[rtrancl_inverseD])1);
 qed "inverse_rtrancl_induct";
 
 val prems = goal Trancl.thy
@@ -189,13 +189,13 @@
 \ |] ==> P";
 by (subgoal_tac "x = z  | (? y. (x,y) : r & (y,z) : r^*)" 1);
 by (rtac (major RS inverse_rtrancl_induct) 2);
-by (blast_tac (!claset addIs prems) 2);
-by (blast_tac (!claset addIs prems) 2);
+by (blast_tac (claset() addIs prems) 2);
+by (blast_tac (claset() addIs prems) 2);
 by (REPEAT (eresolve_tac ([asm_rl,exE,disjE,conjE]@prems) 1));
 qed "rtranclE2";
 
 goal Trancl.thy "r O r^* = r^* O r";
-by (blast_tac (!claset addEs [rtranclE, rtranclE2] 
+by (blast_tac (claset() addEs [rtranclE, rtranclE2] 
 	               addIs [rtrancl_into_rtrancl, rtrancl_into_rtrancl2]) 1);
 qed "r_comp_rtrancl_eq";
 
@@ -203,7 +203,7 @@
 (**** The relation trancl ****)
 
 goalw Trancl.thy [trancl_def] "!!p.[| p:r^+; r <= s |] ==> p:s^+";
-by (blast_tac (!claset addIs [rtrancl_mono RS subsetD]) 1);
+by (blast_tac (claset() addIs [rtrancl_mono RS subsetD]) 1);
 qed "trancl_mono";
 
 (** Conversions between trancl and rtrancl **)
@@ -248,7 +248,7 @@
 (*now solve first subgoal: this formula is sufficient*)
 by (Blast_tac 1);
 by (etac rtrancl_induct 1);
-by (ALLGOALS (blast_tac (!claset addIs (rtrancl_into_trancl1::prems))));
+by (ALLGOALS (blast_tac (claset() addIs (rtrancl_into_trancl1::prems))));
 qed "trancl_induct";
 
 (*elimination of r^+ -- NOT an induction rule*)
@@ -262,7 +262,7 @@
 by (rtac (rewrite_rule [trancl_def] major RS compEpair) 1);
 by (etac rtranclE 1);
 by (Blast_tac 1);
-by (blast_tac (!claset addSIs [rtrancl_into_trancl1]) 1);
+by (blast_tac (claset() addSIs [rtrancl_into_trancl1]) 1);
 qed "tranclE";
 
 (*Transitivity of r^+.
@@ -278,7 +278,7 @@
 
 goalw Trancl.thy [trancl_def]
   "!!r. [| (x,y):r^*; (y,z):r^+ |] ==> (x,z):r^+";
-by (blast_tac (!claset addIs [rtrancl_trans,r_into_rtrancl]) 1);
+by (blast_tac (claset() addIs [rtrancl_trans,r_into_rtrancl]) 1);
 qed "rtrancl_trancl_trancl";
 
 val prems = goal Trancl.thy
@@ -294,18 +294,18 @@
  by (rtac subsetI 1);
  by (split_all_tac 1);
  by (etac trancl_induct 1);
-  by (blast_tac (!claset addIs [r_into_trancl]) 1);
- by (blast_tac (!claset addIs
+  by (blast_tac (claset() addIs [r_into_trancl]) 1);
+ by (blast_tac (claset() addIs
      [rtrancl_into_trancl1,trancl_into_rtrancl,r_into_trancl,trancl_trans]) 1);
 by (rtac subsetI 1);
-by (blast_tac (!claset addIs
+by (blast_tac (claset() addIs
      [rtrancl_into_trancl2, rtrancl_trancl_trancl,
       impOfSubs rtrancl_mono, trancl_mono]) 1);
 qed "trancl_insert";
 
 goalw Trancl.thy [trancl_def] "(r^-1)^+ = (r^+)^-1";
-by (simp_tac (!simpset addsimps [rtrancl_inverse,inverse_comp]) 1);
-by (simp_tac (!simpset addsimps [rtrancl_inverse RS sym,r_comp_rtrancl_eq]) 1);
+by (simp_tac (simpset() addsimps [rtrancl_inverse,inverse_comp]) 1);
+by (simp_tac (simpset() addsimps [rtrancl_inverse RS sym,r_comp_rtrancl_eq]) 1);
 qed "trancl_inverse";
 
 
@@ -319,6 +319,6 @@
 
 goalw Trancl.thy [trancl_def]
     "!!r. r <= A Times A ==> r^+ <= A Times A";
-by (blast_tac (!claset addSDs [lemma]) 1);
+by (blast_tac (claset() addSDs [lemma]) 1);
 qed "trancl_subset_Sigma";
 
--- a/src/HOL/Univ.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/Univ.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -74,7 +74,7 @@
 
 goalw Univ.thy [Node_def,Push_def]
     "!!p. p: Node ==> apfst (Push i) p : Node";
-by (blast_tac (!claset addSIs [apfst_conv, nat_case_Suc RS trans]) 1);
+by (blast_tac (claset() addSIs [apfst_conv, nat_case_Suc RS trans]) 1);
 qed "Node_Push_I";
 
 
@@ -98,12 +98,12 @@
 (** Atomic nodes **)
 
 goalw Univ.thy [Atom_def, inj_def] "inj(Atom)";
-by (blast_tac (!claset addSIs [Node_K0_I] addSDs [Abs_Node_inject]) 1);
+by (blast_tac (claset() addSIs [Node_K0_I] addSDs [Abs_Node_inject]) 1);
 qed "inj_Atom";
 val Atom_inject = inj_Atom RS injD;
 
 goal Univ.thy "(Atom(a)=Atom(b)) = (a=b)";
-by (blast_tac (!claset addSDs [Atom_inject]) 1);
+by (blast_tac (claset() addSDs [Atom_inject]) 1);
 qed "Atom_Atom_eq";
 AddIffs [Atom_Atom_eq];
 
@@ -136,18 +136,18 @@
 by (etac (Push_inject1 RS sym) 1);
 by (rtac (inj_Rep_Node RS injD) 1);
 by (etac trans 1);
-by (safe_tac (!claset addSEs [Push_inject,sym]));
+by (safe_tac (claset() addSEs [Push_inject,sym]));
 qed "Push_Node_inject";
 
 
 (** Injectiveness of Scons **)
 
 goalw Univ.thy [Scons_def] "!!M. M$N <= M'$N' ==> M<=M'";
-by (blast_tac (!claset addSDs [Push_Node_inject]) 1);
+by (blast_tac (claset() addSDs [Push_Node_inject]) 1);
 qed "Scons_inject_lemma1";
 
 goalw Univ.thy [Scons_def] "!!M. M$N <= M'$N' ==> N<=N'";
-by (blast_tac (!claset addSDs [Push_Node_inject]) 1);
+by (blast_tac (claset() addSDs [Push_Node_inject]) 1);
 qed "Scons_inject_lemma2";
 
 val [major] = goal Univ.thy "M$N = M'$N' ==> M=M'";
@@ -167,7 +167,7 @@
 qed "Scons_inject";
 
 goal Univ.thy "(M$N = M'$N') = (M=M' & N=N')";
-by (blast_tac (!claset addSEs [Scons_inject]) 1);
+by (blast_tac (claset() addSEs [Scons_inject]) 1);
 qed "Scons_Scons_eq";
 
 (*** Distinctness involving Leaf and Numb ***)
@@ -195,7 +195,7 @@
 (** Leaf vs Numb **)
 
 goalw Univ.thy [Leaf_def,Numb_def] "Leaf(a) ~= Numb(k)";
-by (simp_tac (!simpset addsimps [Inl_not_Inr]) 1);
+by (simp_tac (simpset() addsimps [Inl_not_Inr]) 1);
 qed "Leaf_not_Numb";
 bind_thm ("Numb_not_Leaf", Leaf_not_Numb RS not_sym);
 
@@ -226,7 +226,7 @@
     "ndepth (Push_Node i n) = Suc(ndepth(n))";
 by (stac (Rep_Node RS Node_Push_I RS Abs_Node_inverse) 1);
 by (cut_facts_tac [rewrite_rule [Node_def] Rep_Node] 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (etac ssubst 1);  (*instantiates type variables!*)
 by (Simp_tac 1);
 by (rtac Least_equality 1);
@@ -244,7 +244,7 @@
 qed "ntrunc_0";
 
 goalw Univ.thy [Atom_def,ntrunc_def] "ntrunc (Suc k) (Atom a) = Atom(a)";
-by (fast_tac (!claset addss (!simpset addsimps [ndepth_K0])) 1);
+by (fast_tac (claset() addss (simpset() addsimps [ndepth_K0])) 1);
 qed "ntrunc_Atom";
 
 goalw Univ.thy [Leaf_def,o_def] "ntrunc (Suc k) (Leaf a) = Leaf(a)";
@@ -257,7 +257,7 @@
 
 goalw Univ.thy [Scons_def,ntrunc_def]
     "ntrunc (Suc k) (M$N) = ntrunc k M $ ntrunc k N";
-by (safe_tac (!claset addSIs [imageI]));
+by (safe_tac (claset() addSIs [imageI]));
 by (REPEAT (stac ndepth_Push_Node 3 THEN etac Suc_mono 3));
 by (REPEAT (rtac Suc_less_SucD 1 THEN 
             rtac (ndepth_Push_Node RS subst) 1 THEN 
@@ -267,25 +267,25 @@
 (** Injection nodes **)
 
 goalw Univ.thy [In0_def] "ntrunc (Suc 0) (In0 M) = {}";
-by (simp_tac (!simpset addsimps [ntrunc_Scons,ntrunc_0]) 1);
+by (simp_tac (simpset() addsimps [ntrunc_Scons,ntrunc_0]) 1);
 by (rewtac Scons_def);
 by (Blast_tac 1);
 qed "ntrunc_one_In0";
 
 goalw Univ.thy [In0_def]
     "ntrunc (Suc (Suc k)) (In0 M) = In0 (ntrunc (Suc k) M)";
-by (simp_tac (!simpset addsimps [ntrunc_Scons,ntrunc_Numb]) 1);
+by (simp_tac (simpset() addsimps [ntrunc_Scons,ntrunc_Numb]) 1);
 qed "ntrunc_In0";
 
 goalw Univ.thy [In1_def] "ntrunc (Suc 0) (In1 M) = {}";
-by (simp_tac (!simpset addsimps [ntrunc_Scons,ntrunc_0]) 1);
+by (simp_tac (simpset() addsimps [ntrunc_Scons,ntrunc_0]) 1);
 by (rewtac Scons_def);
 by (Blast_tac 1);
 qed "ntrunc_one_In1";
 
 goalw Univ.thy [In1_def]
     "ntrunc (Suc (Suc k)) (In1 M) = In1 (ntrunc (Suc k) M)";
-by (simp_tac (!simpset addsimps [ntrunc_Scons,ntrunc_Numb]) 1);
+by (simp_tac (simpset() addsimps [ntrunc_Scons,ntrunc_Numb]) 1);
 qed "ntrunc_In1";
 
 
@@ -355,11 +355,11 @@
 qed "In1_inject";
 
 goal Univ.thy "(In0 M = In0 N) = (M=N)";
-by (blast_tac (!claset addSDs [In0_inject]) 1);
+by (blast_tac (claset() addSDs [In0_inject]) 1);
 qed "In0_eq";
 
 goal Univ.thy "(In1 M = In1 N) = (M=N)";
-by (blast_tac (!claset addSDs [In1_inject]) 1);
+by (blast_tac (claset() addSDs [In1_inject]) 1);
 qed "In1_eq";
 
 AddIffs [In0_eq, In1_eq];
@@ -381,7 +381,7 @@
 
 val [major] = goalw Univ.thy [ntrunc_def]
     "(!!k. ntrunc k M <= N) ==> M<=N";
-by (blast_tac (!claset addIs [less_add_Suc1, less_add_Suc2, 
+by (blast_tac (claset() addIs [less_add_Suc1, less_add_Suc2, 
                             major RS subsetD]) 1);
 qed "ntrunc_subsetD";
 
@@ -426,15 +426,15 @@
 (*** Split and Case ***)
 
 goalw Univ.thy [Split_def] "Split c (M$N) = c M N";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "Split";
 
 goalw Univ.thy [Case_def] "Case c d (In0 M) = c(M)";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "Case_In0";
 
 goalw Univ.thy [Case_def] "Case c d (In1 N) = d(N)";
-by (blast_tac (!claset addIs [select_equality]) 1);
+by (blast_tac (claset() addIs [select_equality]) 1);
 qed "Case_In1";
 
 (**** UN x. B(x) rules ****)
@@ -546,7 +546,7 @@
 (*Dependent version*)
 goal Univ.thy
     "(Sigma A B <**> Sigma C D) <= Sigma (A<*>C) (Split(%x y. B(x)<*>D(y)))";
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (stac Split 1);
 by (Blast_tac 1);
 qed "dprod_subset_Sigma2";
--- a/src/HOL/W0/I.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/W0/I.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -15,33 +15,33 @@
 by (expr.induct_tac "e" 1);
 
   (* case Var n *)
-  by (simp_tac (!simpset addsimps [app_subst_list]
+  by (simp_tac (simpset() addsimps [app_subst_list]
       setloop (split_inside_tac [expand_if])) 1);
 
  (* case Abs e *)
- by (asm_full_simp_tac (!simpset setloop (split_inside_tac [expand_bind])) 1);
+ by (asm_full_simp_tac (simpset() setloop (split_inside_tac [expand_bind])) 1);
  by (strip_tac 1);
  by (rtac conjI 1);
   by (strip_tac 1);
   by (REPEAT (etac allE 1));
   by (etac impE 1);
-   by (fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst])) 2);
+   by (fast_tac (HOL_cs addss (simpset() addsimps [new_tv_subst])) 2);
   by (fast_tac (HOL_cs addIs [new_tv_Suc_list RS mp,new_tv_subst_le,
                               less_imp_le,lessI]) 1); 
 (** LEVEL 10 **)
  by (strip_tac 1);
  by (REPEAT (etac allE 1));
  by (etac impE 1);
-  by (fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst])) 2);
+  by (fast_tac (HOL_cs addss (simpset() addsimps [new_tv_subst])) 2);
  by (fast_tac (HOL_cs addIs [new_tv_Suc_list RS mp,new_tv_subst_le,
                              less_imp_le,lessI]) 1);
 (** LEVEL 15 **)
 (* case App e1 e2 *)
-by (simp_tac (!simpset setloop (split_inside_tac [expand_bind])) 1);
+by (simp_tac (simpset() setloop (split_inside_tac [expand_bind])) 1);
 by (strip_tac 1);
 by (rename_tac "s1' t1 n1 s2' t2 n2 sa" 1);
 by (rtac conjI 1);
- by (fast_tac (HOL_cs addss !simpset) 1);
+ by (fast_tac (HOL_cs addss simpset()) 1);
 by (strip_tac 1);
 by (rename_tac "s1 t1' n1'" 1);
 by (eres_inst_tac [("x","a")] allE 1);
@@ -67,8 +67,8 @@
   by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
   by ((dres_inst_tac [("a","$ s a")] new_tv_W 1) THEN (atac 1));
   by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
-                       addss !simpset) 1);
- by (fast_tac (HOL_cs addss (!simpset addsimps [subst_comp_tel])) 1);
+                       addss simpset()) 1);
+ by (fast_tac (HOL_cs addss (simpset() addsimps [subst_comp_tel])) 1);
 (** LEVEL 45 **)
 by (strip_tac 1);
 by (rename_tac "s2 t2' n2'" 1);
@@ -82,8 +82,8 @@
   by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
   by ((dres_inst_tac [("a","$ s a")] new_tv_W 1) THEN (atac 1));
   by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
-                       addss !simpset) 1);
- by (fast_tac (HOL_cs addss (!simpset addsimps [subst_comp_tel,subst_comp_te])) 1);
+                       addss simpset()) 1);
+ by (fast_tac (HOL_cs addss (simpset() addsimps [subst_comp_tel,subst_comp_te])) 1);
 by (strip_tac 1);
 by (mp_tac 1);
 (** LEVEL 60 **)
@@ -94,29 +94,29 @@
  by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
  by ((dres_inst_tac [("a","$ s a")] new_tv_W 1) THEN (atac 1));
  by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
-                      addss !simpset) 1);
+                      addss simpset()) 1);
 by (mp_tac 1);
 by (REPEAT (eresolve_tac [exE,conjE] 1));
 by (REPEAT(EVERY1
-     [asm_full_simp_tac (!simpset addsimps [subst_comp_tel,subst_comp_te,o_def]),
+     [asm_full_simp_tac (simpset() addsimps [subst_comp_tel,subst_comp_te,o_def]),
       REPEAT o etac conjE, hyp_subst_tac]));
 (** LEVEL 70 **)
 by (subgoal_tac "new_tv n2 s & new_tv n2 r & new_tv n2 ra" 1);
- by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
+ by (asm_full_simp_tac (simpset() addsimps [new_tv_subst]) 1);
 by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1));
 by ((dres_inst_tac [("a","$ s a")] new_tv_W 1) THEN (atac 1));
 by (safe_tac HOL_cs);
   by (best_tac (HOL_cs addDs[sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
-                       addss !simpset) 1);
+                       addss simpset()) 1);
  by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
-                      addss !simpset) 1);
+                      addss simpset()) 1);
 (** LEVEL 77 **)
 by (dres_inst_tac [("e","expr1")] (sym RS W_var_geD) 1);
 by ((dtac new_tv_subst_tel 1) THEN (atac 1));
 by ((dres_inst_tac [("ts","$ s a")] new_tv_list_le 1) THEN (atac 1));
 by ((dtac new_tv_subst_tel 1) THEN (atac 1));
 by (best_tac (HOL_cs addDs [new_tv_W] 
-                     addss (!simpset addsimps [subst_comp_tel])) 1);
+                     addss (simpset() addsimps [subst_comp_tel])) 1);
 (** LEVEL 82 **)
 qed_spec_mp "I_correct_wrt_W";
 
@@ -144,7 +144,7 @@
 goal I.thy "!a m s. \
 \  new_tv m a & new_tv m s --> I e a m s = Fail --> W e ($s a) m = Fail";
 by (expr.induct_tac "e" 1);
-  by (simp_tac (!simpset addsimps [app_subst_list] addsplits [expand_if]) 1);
+  by (simp_tac (simpset() addsimps [app_subst_list] addsplits [expand_if]) 1);
  by (Simp_tac 1);
  by (strip_tac 1);
  by (subgoal_tac "TVar m # $ s a = $s(TVar m # a)" 1);
@@ -169,7 +169,7 @@
 by (etac disjE 1);
  by (rtac disjI1 1);
 (** LEVEL 22 **)
- by (full_simp_tac (!simpset addsimps [o_def,subst_comp_tel]) 1);
+ by (full_simp_tac (simpset() addsimps [o_def,subst_comp_tel]) 1);
  by (EVERY[etac allE 1, etac allE 1, etac allE 1,
           etac impE 1, etac impE 2, atac 2, atac 2]);
  by (rtac conjI 1);
@@ -191,7 +191,7 @@
 by (etac conjE 1);
 by (hyp_subst_tac 1);
 (** LEVEL 41 **)
-by (asm_full_simp_tac (!simpset addsimps
+by (asm_full_simp_tac (simpset() addsimps
      [o_def,subst_comp_te RS sym,subst_comp_tel RS sym]) 1);
 qed_spec_mp "I_complete_wrt_W";
 
--- a/src/HOL/W0/Maybe.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/W0/Maybe.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -20,13 +20,13 @@
 goal thy
   "P(res bind f) = ((res = Fail --> P Fail) & (!s. res = Ok s --> P(f s)))";
 by (maybe.induct_tac "res" 1);
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 by (Asm_simp_tac 1);
 qed "expand_bind";
 
 goal Maybe.thy
   "((m bind f) = Fail) = ((m=Fail) | (? p. m = Ok p & f p = Fail))";
-by (simp_tac (!simpset addsplits [expand_bind]) 1);
+by (simp_tac (simpset() addsplits [expand_bind]) 1);
 qed "bind_eq_Fail";
 
 Addsimps [bind_eq_Fail];
--- a/src/HOL/W0/MiniML.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/W0/MiniML.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -14,11 +14,11 @@
 goal MiniML.thy "!!a e t. a |- e :: t ==> $s a |- e :: $s t";
 by (etac has_type.induct 1);
 (* case VarI *)
-by (asm_full_simp_tac (!simpset addsimps [app_subst_list]) 1);
+by (asm_full_simp_tac (simpset() addsimps [app_subst_list]) 1);
 by (forw_inst_tac [("f1","$ s")] (nth_map RS sym) 1);
-by ( fast_tac (HOL_cs addIs [has_type.VarI] addss (!simpset delsimps [nth_map])) 1);
+by ( fast_tac (HOL_cs addIs [has_type.VarI] addss (simpset() delsimps [nth_map])) 1);
 (* case AbsI *)
-by (asm_full_simp_tac (!simpset addsimps [app_subst_list]) 1);
+by (asm_full_simp_tac (simpset() addsimps [app_subst_list]) 1);
 (* case AppI *)
 by (Asm_full_simp_tac 1);
 qed "has_type_cl_sub";
--- a/src/HOL/W0/Type.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/W0/Type.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -79,7 +79,7 @@
 (* case [] *)
 by (Simp_tac 1);
 (* case x#xl *)
-by (asm_full_simp_tac (!simpset addsimps [subst_comp_te]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subst_comp_te]) 1);
 qed "subst_comp_tel";
 
 
@@ -99,12 +99,12 @@
 (* constructor laws for new_tv *)
 goalw thy [new_tv_def]
   "new_tv n (TVar m) = (m<n)";
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed "new_tv_TVar";
 
 goalw thy [new_tv_def]
   "new_tv n (t1 -> t2) = (new_tv n t1 & new_tv n t2)";
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed "new_tv_Fun";
 
 goalw thy [new_tv_def]
@@ -114,7 +114,7 @@
 
 goalw thy [new_tv_def]
   "new_tv n (t#ts) = (new_tv n t & new_tv n ts)";
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed "new_tv_Cons";
 
 Addsimps [new_tv_TVar,new_tv_Fun,new_tv_Nil,new_tv_Cons];
@@ -130,13 +130,13 @@
 \                (! l. l < n --> new_tv n (s l) ))";
 by (safe_tac HOL_cs );
 (* ==> *)
-by (fast_tac (HOL_cs addDs [leD] addss (!simpset addsimps [free_tv_subst,dom_def])) 1);
+by (fast_tac (HOL_cs addDs [leD] addss (simpset() addsimps [free_tv_subst,dom_def])) 1);
 by (subgoal_tac "m:cod s | s l = TVar l" 1);
 by (safe_tac HOL_cs );
-by (fast_tac (HOL_cs addDs [UnI2] addss (!simpset addsimps [free_tv_subst])) 1);
+by (fast_tac (HOL_cs addDs [UnI2] addss (simpset() addsimps [free_tv_subst])) 1);
 by (dres_inst_tac [("P","%x. m:free_tv x")] subst 1 THEN atac 1);
 by (Asm_full_simp_tac 1);
-by (fast_tac (set_cs addss (!simpset addsimps [free_tv_subst,cod_def,dom_def])) 1);
+by (fast_tac (set_cs addss (simpset() addsimps [free_tv_subst,cod_def,dom_def])) 1);
 (* <== *)
 by (rewrite_goals_tac [free_tv_subst,cod_def,dom_def] );
 by (safe_tac set_cs );
@@ -157,7 +157,7 @@
 goal thy
   "new_tv n (t::typ) --> $(%x. if x=n then t' else s x) t = $s t";
 by (typ.induct_tac "t" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed "subst_te_new_tv";
 Addsimps [subst_te_new_tv];
 
@@ -173,7 +173,7 @@
   "n<=m --> new_tv n (t::typ) --> new_tv m t";
 by (typ.induct_tac "t" 1);
 (* case TVar n *)
-by (fast_tac (HOL_cs addIs [less_le_trans] addss !simpset) 1);
+by (fast_tac (HOL_cs addIs [less_le_trans] addss simpset()) 1);
 (* case Fun t1 t2 *)
 by (Asm_simp_tac 1);
 qed_spec_mp "new_tv_le";
@@ -185,47 +185,47 @@
 (* case [] *)
 by (Simp_tac 1);
 (* case a#al *)
-by (fast_tac (HOL_cs addIs [new_tv_le] addss !simpset) 1);
+by (fast_tac (HOL_cs addIs [new_tv_le] addss simpset()) 1);
 qed_spec_mp "new_tv_list_le";
 Addsimps [lessI RS less_imp_le RS new_tv_list_le];
 
 goal thy
   "!! n. [| n<=m; new_tv n (s::subst) |] ==> new_tv m s";
-by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
+by (asm_full_simp_tac (simpset() addsimps [new_tv_subst]) 1);
 by (rtac conjI 1);
 by (slow_tac (HOL_cs addIs [le_trans]) 1);
 by (safe_tac HOL_cs );
 by (res_inst_tac [("P","l < n"),("Q","n <= l")] disjE 1);
 by (fast_tac (HOL_cs addss (HOL_ss addsimps [le_def])) 1);
-by (ALLGOALS (asm_full_simp_tac (!simpset addsimps [new_tv_le])) );
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [new_tv_le])) );
 qed "new_tv_subst_le";
 Addsimps [lessI RS less_imp_le RS new_tv_subst_le];
 
 (* new_tv property remains if a substitution is applied *)
 goal thy
   "!!n. [| n<m; new_tv m (s::subst) |] ==> new_tv m (s n)";
-by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
+by (asm_full_simp_tac (simpset() addsimps [new_tv_subst]) 1);
 qed "new_tv_subst_var";
 
 goal thy
   "new_tv n s --> new_tv n (t::typ) --> new_tv n ($ s t)";
 by (typ.induct_tac "t" 1);
-by (ALLGOALS(fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst]))));
+by (ALLGOALS(fast_tac (HOL_cs addss (simpset() addsimps [new_tv_subst]))));
 qed_spec_mp "new_tv_subst_te";
 Addsimps [new_tv_subst_te];
 
 goal thy
   "new_tv n s --> new_tv n (ts::typ list) --> new_tv n ($ s ts)";
-by (simp_tac (!simpset addsimps [new_tv_list]) 1);
+by (simp_tac (simpset() addsimps [new_tv_list]) 1);
 by (list.induct_tac "ts" 1);
-by (ALLGOALS(fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst]))));
+by (ALLGOALS(fast_tac (HOL_cs addss (simpset() addsimps [new_tv_subst]))));
 qed_spec_mp "new_tv_subst_tel";
 Addsimps [new_tv_subst_tel];
 
 (* auxilliary lemma *)
 goal thy
   "new_tv n ts --> new_tv (Suc n) ((TVar n)#ts)";
-by (simp_tac (!simpset addsimps [new_tv_list]) 1);
+by (simp_tac (simpset() addsimps [new_tv_list]) 1);
 by (list.induct_tac "ts" 1);
 by (ALLGOALS Asm_full_simp_tac);
 qed "new_tv_Suc_list";
@@ -235,13 +235,13 @@
 goal thy 
      "!! n. [| new_tv n (s::subst); new_tv n r |] ==> \
 \           new_tv n (($ r) o s)";
-by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
+by (asm_full_simp_tac (simpset() addsimps [new_tv_subst]) 1);
 qed "new_tv_subst_comp_1";
 
 goal thy
      "!! n. [| new_tv n (s::subst); new_tv n r |] ==>  \ 
 \     new_tv n (%v.$ r (s v))";
-by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
+by (asm_full_simp_tac (simpset() addsimps [new_tv_subst]) 1);
 qed "new_tv_subst_comp_2";
 
 Addsimps [new_tv_subst_comp_1,new_tv_subst_comp_2];
@@ -259,7 +259,7 @@
 (* case [] *)
 by (Simp_tac 1);
 (* case x#xl *)
-by (fast_tac (set_cs addss(!simpset addsplits [expand_if])) 1);
+by (fast_tac (set_cs addss(simpset() addsplits [expand_if])) 1);
 qed_spec_mp "ftv_mem_sub_ftv_list";
 Addsimps [ftv_mem_sub_ftv_list];
 
@@ -271,36 +271,36 @@
   "$ s1 (t::typ) = $ s2 t --> n:(free_tv t) --> s1 n = s2 n";
 by (typ.induct_tac "t" 1);
 (* case TVar n *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 (* case Fun t1 t2 *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed_spec_mp "eq_subst_te_eq_free";
 
 goal thy
   "(!n. n:(free_tv t) --> s1 n = s2 n) --> $ s1 (t::typ) = $ s2 t";
 by (typ.induct_tac "t" 1);
 (* case TVar n *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 (* case Fun t1 t2 *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 qed_spec_mp "eq_free_eq_subst_te";
 
 goal thy
   "$s1 (ts::typ list) = $s2 ts --> n:(free_tv ts) --> s1 n = s2 n";
 by (list.induct_tac "ts" 1);
 (* case [] *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 (* case x#xl *)
-by (fast_tac (HOL_cs addIs [eq_subst_te_eq_free] addss (!simpset)) 1);
+by (fast_tac (HOL_cs addIs [eq_subst_te_eq_free] addss (simpset())) 1);
 qed_spec_mp "eq_subst_tel_eq_free";
 
 goal thy
   "(!n. n:(free_tv ts) --> s1 n = s2 n) --> $s1 (ts::typ list) = $s2 ts";
 by (list.induct_tac "ts" 1); 
 (* case [] *)
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 (* case x#xl *)
-by (fast_tac (HOL_cs addIs [eq_free_eq_subst_te] addss (!simpset)) 1);
+by (fast_tac (HOL_cs addIs [eq_free_eq_subst_te] addss (simpset())) 1);
 qed_spec_mp "eq_free_eq_subst_tel";
 
 (* some useful theorems *)
@@ -322,17 +322,17 @@
 goal thy
      "free_tv (s (v::nat)) <= insert v (cod s)";
 by (expand_case_tac "v:dom s" 1);
-by (fast_tac (set_cs addss (!simpset addsimps [cod_def])) 1);
-by (fast_tac (set_cs addss (!simpset addsimps [dom_def])) 1);
+by (fast_tac (set_cs addss (simpset() addsimps [cod_def])) 1);
+by (fast_tac (set_cs addss (simpset() addsimps [dom_def])) 1);
 qed "free_tv_subst_var";
 
 goal thy 
      "free_tv ($ s (t::typ)) <= cod s Un free_tv t";
 by (typ.induct_tac "t" 1);
 (* case TVar n *)
-by (simp_tac (!simpset addsimps [free_tv_subst_var]) 1);
+by (simp_tac (simpset() addsimps [free_tv_subst_var]) 1);
 (* case Fun t1 t2 *)
-by (fast_tac (set_cs addss !simpset) 1);
+by (fast_tac (set_cs addss simpset()) 1);
 qed "free_tv_app_subst_te";     
 
 goal thy 
@@ -342,7 +342,7 @@
 by (Simp_tac 1);
 (* case a#al *)
 by (cut_facts_tac [free_tv_app_subst_te] 1);
-by (fast_tac (set_cs addss !simpset) 1);
+by (fast_tac (set_cs addss simpset()) 1);
 qed "free_tv_app_subst_tel";
 
 goalw thy [free_tv_subst,dom_def]
@@ -350,6 +350,6 @@
 \     free_tv s1 Un free_tv s2";
 by (fast_tac (set_cs addSDs [free_tv_app_subst_te RS subsetD,
 			     free_tv_subst_var RS subsetD] 
-	             addss (!simpset delsimps bex_simps
+	             addss (simpset() delsimps bex_simps
 				     addsimps [cod_def,dom_def])) 1);
 qed "free_tv_comp_subst";
--- a/src/HOL/W0/W.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/W0/W.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -14,15 +14,15 @@
         "!a s t m n . Ok (s,t,m) = W e a n --> $s a |- e :: t";
 by (expr.induct_tac "e" 1);
 (* case Var n *)
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 (* case Abs e *)
-by (asm_full_simp_tac (!simpset addsimps [app_subst_list]
+by (asm_full_simp_tac (simpset() addsimps [app_subst_list]
                         addsplits [expand_bind]) 1);
 by (strip_tac 1);
 by (dtac sym 1);
-by (fast_tac (HOL_cs addss !simpset) 1);
+by (fast_tac (HOL_cs addss simpset()) 1);
 (* case App e1 e2 *)
-by (simp_tac (!simpset addsplits [expand_bind]) 1);
+by (simp_tac (simpset() addsplits [expand_bind]) 1);
 by (strip_tac 1);
 by ( rename_tac "sa ta na sb tb nb sc" 1);
 by (res_inst_tac [("t2.0","$ sc tb")] has_type.AppI 1);
@@ -32,8 +32,8 @@
 by (Asm_full_simp_tac 1);
 by (simp_tac (HOL_ss addsimps [subst_comp_tel RS sym]) 1);
 by ( (rtac has_type_cl_sub 1) THEN (rtac has_type_cl_sub 1));
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
-by (asm_full_simp_tac (!simpset addsimps [subst_comp_tel RS sym,o_def,has_type_cl_sub,eq_sym_conv]) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 1);
+by (asm_full_simp_tac (simpset() addsimps [subst_comp_tel RS sym,o_def,has_type_cl_sub,eq_sym_conv]) 1);
 qed_spec_mp "W_correct";
 
 val has_type_casesE = map(has_type.mk_cases expr.simps)
@@ -45,12 +45,12 @@
         "!a n s t m. W e a n  = Ok (s,t,m) --> n<=m";
 by (expr.induct_tac "e" 1);
 (* case Var(n) *)
-by (fast_tac (HOL_cs addss(!simpset addsplits [expand_if])) 1);
+by (fast_tac (HOL_cs addss(simpset() addsplits [expand_if])) 1);
 (* case Abs e *)
-by (simp_tac (!simpset addsplits [expand_bind]) 1);
+by (simp_tac (simpset() addsplits [expand_bind]) 1);
 by (fast_tac (HOL_cs addDs [Suc_leD]) 1);
 (* case App e1 e2 *)
-by (simp_tac (!simpset addsplits [expand_bind]) 1);
+by (simp_tac (simpset() addsplits [expand_bind]) 1);
 by (strip_tac 1);
 by (rename_tac "s t na sa ta nb sb sc tb m" 1);
 by (eres_inst_tac [("x","a")] allE 1);
@@ -60,7 +60,7 @@
 by (eres_inst_tac [("x","t")] allE 1);
 by (eres_inst_tac [("x","na")] allE 1);
 by (eres_inst_tac [("x","na")] allE 1);
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 1);
 by (etac conjE 1);
 by (eres_inst_tac [("x","sa")] allE 1);
 by (eres_inst_tac [("x","ta")] allE 1);
@@ -74,13 +74,13 @@
 
 goal thy
         "!! s. Ok (s,t,m) = W e a n ==> n<=m";
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 1);
 qed "W_var_geD";
 
 
 (* auxiliary lemma *)
 goal Maybe.thy "(y = Ok x) = (Ok x = y)";
-by ( simp_tac (!simpset addsimps [eq_sym_conv]) 1);
+by ( simp_tac (simpset() addsimps [eq_sym_conv]) 1);
 qed "rotate_Ok";
 
 
@@ -90,20 +90,20 @@
 \                 new_tv m s & new_tv m t";
 by (expr.induct_tac "e" 1);
 (* case Var n *)
-by (fast_tac (HOL_cs addDs [list_all_nth] addss (!simpset 
+by (fast_tac (HOL_cs addDs [list_all_nth] addss (simpset() 
         addsimps [id_subst_def,new_tv_list,new_tv_subst] 
         addsplits [expand_if])) 1);
 (* case Abs e *)
-by (simp_tac (!simpset addsimps [new_tv_subst,new_tv_Suc_list] 
+by (simp_tac (simpset() addsimps [new_tv_subst,new_tv_Suc_list] 
     addsplits [expand_bind]) 1);
 by (strip_tac 1);
 by (eres_inst_tac [("x","Suc n")] allE 1);
 by (eres_inst_tac [("x","(TVar n)#a")] allE 1);
-by (fast_tac (HOL_cs addss (!simpset
+by (fast_tac (HOL_cs addss (simpset()
               addsimps [new_tv_subst,new_tv_Suc_list])) 1);
 
 (* case App e1 e2 *)
-by (simp_tac (!simpset addsplits [expand_bind]) 1);
+by (simp_tac (simpset() addsplits [expand_bind]) 1);
 by (strip_tac 1);
 by (rename_tac "s t na sa ta nb sb sc tb m" 1);
 by (eres_inst_tac [("x","n")] allE 1);
@@ -112,18 +112,18 @@
 by (eres_inst_tac [("x","t")] allE 1);
 by (eres_inst_tac [("x","na")] allE 1);
 by (eres_inst_tac [("x","na")] allE 1);
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 1);
 by (eres_inst_tac [("x","$ s a")] allE 1);
 by (eres_inst_tac [("x","sa")] allE 1);
 by (eres_inst_tac [("x","ta")] allE 1);
 by (eres_inst_tac [("x","nb")] allE 1);
-by ( asm_full_simp_tac (!simpset addsimps [o_def,rotate_Ok]) 1);
+by ( asm_full_simp_tac (simpset() addsimps [o_def,rotate_Ok]) 1);
 by (rtac conjI 1);
 by (rtac new_tv_subst_comp_2 1);
 by (rtac new_tv_subst_comp_2 1);
 by (rtac (lessI RS less_imp_le RS new_tv_subst_le) 1);
 by (res_inst_tac [("n","na")] new_tv_subst_le 1); 
-by (asm_full_simp_tac (!simpset addsimps [rotate_Ok]) 1);
+by (asm_full_simp_tac (simpset() addsimps [rotate_Ok]) 1);
 by (Asm_simp_tac 1);
 by (fast_tac (HOL_cs addDs [W_var_geD] addIs
      [new_tv_list_le,new_tv_subst_tel,lessI RS less_imp_le RS new_tv_subst_le])
@@ -137,7 +137,7 @@
                             new_tv_le]) 1);
 by (fast_tac (HOL_cs addDs [W_var_geD] 
                      addIs [new_tv_list_le,new_tv_subst_tel,new_tv_le] 
-                     addss (!simpset)) 1);
+                     addss (simpset())) 1);
 by (rtac (lessI RS new_tv_subst_var) 1);
 by (etac (sym RS mgu_new) 1);
 by (best_tac (HOL_cs addSIs [lessI RS less_imp_le RS new_tv_le,new_tv_subst_te]
@@ -146,10 +146,10 @@
                             new_tv_subst_tel,
                             lessI RS less_imp_le RS new_tv_subst_le,
                             new_tv_le] 
-                     addss !simpset) 1);
+                     addss simpset()) 1);
 by (fast_tac (HOL_cs addDs [W_var_geD] 
                      addIs [new_tv_list_le,new_tv_subst_tel,new_tv_le]
-                     addss (!simpset)) 1);
+                     addss (simpset())) 1);
 qed_spec_mp "new_tv_W";
 
 
@@ -159,10 +159,10 @@
 by (expr.induct_tac "e" 1);
 (* case Var n *)
 by (fast_tac (HOL_cs addIs [nth_mem,subsetD,ftv_mem_sub_ftv_list] 
-    addss (!simpset addsplits [expand_if])) 1);
+    addss (simpset() addsplits [expand_if])) 1);
 
 (* case Abs e *)
-by (asm_full_simp_tac (!simpset addsimps
+by (asm_full_simp_tac (simpset() addsimps
     [free_tv_subst] addsplits [expand_bind]) 1);
 by (strip_tac 1);
 by (rename_tac "s t na sa ta m v" 1);
@@ -174,10 +174,10 @@
 by (eres_inst_tac [("x","v")] allE 1);
 by (fast_tac (HOL_cs addSEs [allE]
                      addIs [cod_app_subst]
-                     addss (!simpset addsimps [less_Suc_eq])) 1);
+                     addss (simpset() addsimps [less_Suc_eq])) 1);
 (** LEVEL 12 **)
 (* case App e1 e2 *)
-by (simp_tac (!simpset addsplits [expand_bind]) 1);
+by (simp_tac (simpset() addsplits [expand_bind]) 1);
 by (strip_tac 1); 
 by (rename_tac "s t na sa ta nb sb sc tb m v" 1);
 by (eres_inst_tac [("x","n")] allE 1);
@@ -195,7 +195,7 @@
 by (eres_inst_tac [("x","nb")] allE 1);
 by (eres_inst_tac [("x","v")] allE 1);
 by (safe_tac (empty_cs addSIs [conjI,impI] addSEs [conjE]) ); 
-by (asm_full_simp_tac (!simpset addsimps [rotate_Ok,o_def]) 1);
+by (asm_full_simp_tac (simpset() addsimps [rotate_Ok,o_def]) 1);
 by (dtac W_var_geD 1);
 by (dtac W_var_geD 1);
 by ( (forward_tac [less_le_trans] 1) THEN (assume_tac 1) );
@@ -204,7 +204,7 @@
     codD,free_tv_app_subst_te RS subsetD,free_tv_app_subst_tel RS subsetD,
     less_le_trans,less_not_refl2,subsetD]
   addEs [UnE] 
-  addss !simpset) 1);
+  addss simpset()) 1);
 by (Asm_full_simp_tac 1); 
 by (dtac (sym RS W_var_geD) 1);
 by (dtac (sym RS W_var_geD) 1);
@@ -214,7 +214,7 @@
                             free_tv_app_subst_tel RS subsetD,
                             less_le_trans,subsetD]
                      addSEs [UnE]
-                     addss !simpset) 1); 
+                     addss simpset()) 1); 
 qed_spec_mp "free_tv_W"; 
 
 (* Completeness of W w.r.t. has_type *)
@@ -225,10 +225,10 @@
 by (expr.induct_tac "e" 1);
 (* case Var n *)
 by (strip_tac 1);
-by (simp_tac (!simpset addcongs [conj_cong] 
+by (simp_tac (simpset() addcongs [conj_cong] 
               addsplits [expand_if]) 1);
 by (eresolve_tac has_type_casesE 1); 
-by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv,app_subst_list]) 1);
+by (asm_full_simp_tac (simpset() addsimps [eq_sym_conv,app_subst_list]) 1);
 by (res_inst_tac [("x","s'")] exI 1);
 by (Asm_simp_tac 1);
 
@@ -240,7 +240,7 @@
 by (eres_inst_tac [("x","(TVar n)#a")] allE 1);
 by (eres_inst_tac [("x","t2")] allE 1);
 by (eres_inst_tac [("x","Suc n")] allE 1);
-by (fast_tac (HOL_cs addss (!simpset addcongs [conj_cong]
+by (fast_tac (HOL_cs addss (simpset() addcongs [conj_cong]
                             addsplits [expand_bind])) 1);
 
 (** LEVEL 17 **)
@@ -274,7 +274,7 @@
 by (res_inst_tac [("t","$ (%x. if x = ma then t' else \
 \   (if x:(free_tv t - free_tv sa) then r x else ra x)) ($ sa t)"),
     ("s","($ ra ta) -> t'")] ssubst 2);
-by (asm_simp_tac (!simpset addsimps [subst_comp_te]) 2);
+by (asm_simp_tac (simpset() addsimps [subst_comp_te]) 2);
 by (rtac eq_free_eq_subst_te 2);  
 by (strip_tac 2);
 by (subgoal_tac "na ~=ma" 2);
@@ -284,7 +284,7 @@
 by (case_tac "na:free_tv sa" 2);
 (* na ~: free_tv sa *)
 by (forward_tac [not_free_impl_id] 3);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 3);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 3);
 (* na : free_tv sa *)
 by (dres_inst_tac [("ts1","$ s a")] (subst_comp_tel RSN (2,trans)) 2);
 by (dtac eq_subst_tel_eq_free 2);
@@ -293,7 +293,7 @@
 by (case_tac "na:dom sa" 2);
 (* na ~: dom sa *)
 (** LEVEL 50 **)
-by (asm_full_simp_tac (!simpset addsimps [dom_def] 
+by (asm_full_simp_tac (simpset() addsimps [dom_def] 
                        addsplits [expand_if]) 3);
 (* na : dom sa *)
 by (rtac eq_free_eq_subst_te 2);
@@ -304,8 +304,8 @@
 by (dtac new_tv_subst_tel 3);
 by (fast_tac (HOL_cs addIs [new_tv_list_le] addDs [sym RS W_var_geD]) 3);
 by (fast_tac (set_cs addDs [new_tv_W,new_tv_not_free_tv] addss 
-              (!simpset addsimps [cod_def,free_tv_subst])) 3);
-by (fast_tac (set_cs addss (!simpset addsimps [cod_def,free_tv_subst] 
+              (simpset() addsimps [cod_def,free_tv_subst])) 3);
+by (fast_tac (set_cs addss (simpset() addsimps [cod_def,free_tv_subst] 
                             addsplits [expand_if])) 2);
 
 (** LEVEL 60 **)
@@ -320,29 +320,29 @@
 by (case_tac "na: free_tv t - free_tv sa" 2);
 (** LEVEL 69 **)
 (* case na ~: free_tv t - free_tv sa *)
-by ( asm_full_simp_tac (!simpset addsplits [expand_if]) 3);
+by ( asm_full_simp_tac (simpset() addsplits [expand_if]) 3);
 (* case na : free_tv t - free_tv sa *)
-by ( asm_full_simp_tac (!simpset addsplits [expand_if]) 2);
+by ( asm_full_simp_tac (simpset() addsplits [expand_if]) 2);
 by (dres_inst_tac [("ts1","$ s a")] (subst_comp_tel RSN (2,trans)) 2);
 by (dtac eq_subst_tel_eq_free 2);
 by (fast_tac (HOL_cs addIs [free_tv_W,free_tv_le_new_tv] addDs [new_tv_W]) 2);
-by (asm_full_simp_tac (!simpset addsimps [free_tv_subst,dom_def]) 2);
+by (asm_full_simp_tac (simpset() addsimps [free_tv_subst,dom_def]) 2);
 by (Fast_tac 2);
 (** LEVEL 76 **)
-by (asm_simp_tac (!simpset addsplits [expand_bind]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_bind]) 1);
 by (safe_tac HOL_cs);
 by (dtac mgu_Ok 1);
-by ( fast_tac (HOL_cs addss !simpset) 1);
+by ( fast_tac (HOL_cs addss simpset()) 1);
 by ((dtac mgu_mg 1) THEN (atac 1));
 by (etac exE 1);
 by (res_inst_tac [("x","rb")] exI 1);
 by (rtac conjI 1);
 by (dres_inst_tac [("x","ma")] fun_cong 2);
-by ( asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 2);
-by (simp_tac (!simpset addsimps [o_def,subst_comp_tel RS sym]) 1);
+by ( asm_full_simp_tac (simpset() addsimps [eq_sym_conv]) 2);
+by (simp_tac (simpset() addsimps [o_def,subst_comp_tel RS sym]) 1);
 (** LEVEL 90 **)
 by (rtac ((subst_comp_tel RS sym) RSN (2,trans)) 1);
-by ( asm_full_simp_tac (!simpset addsimps [o_def,eq_sym_conv]) 1);
+by ( asm_full_simp_tac (simpset() addsimps [o_def,eq_sym_conv]) 1);
 by (rtac eq_free_eq_subst_tel 1);
 by ( safe_tac HOL_cs );
 by (subgoal_tac "ma ~= na" 1);
@@ -358,13 +358,13 @@
     new_tv_not_free_tv]) 2);
 by (case_tac "na: free_tv t - free_tv sa" 1);
 (* case na ~: free_tv t - free_tv sa *)
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 2);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 2);
 (* case na : free_tv t - free_tv sa *)
-by (asm_full_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_full_simp_tac (simpset() addsplits [expand_if]) 1);
 by (dtac (free_tv_app_subst_tel RS subsetD) 1);
 by (fast_tac (set_cs addDs [codD,subst_comp_tel RSN (2,trans),
                             eq_subst_tel_eq_free] 
-       addss ((!simpset addsimps [free_tv_subst,dom_def]))) 1);
+       addss ((simpset() addsimps [free_tv_subst,dom_def]))) 1);
 (** LEVEL 106 **)
 by (Fast_tac 1);
 qed_spec_mp "W_complete_lemma";
--- a/src/HOL/WF.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/WF.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -19,7 +19,7 @@
 by (Clarify_tac 1);
 by (rtac allE 1);
 by (assume_tac 1);
-by (best_tac (!claset addSEs [prem1 RS subsetD RS SigmaE2] addIs [prem2]) 1);
+by (best_tac (claset() addSEs [prem1 RS subsetD RS SigmaE2] addIs [prem2]) 1);
 qed "wfI";
 
 val major::prems = goalw WF.thy [wf_def]
@@ -27,7 +27,7 @@
 \       !!x.[| ! y. (y,x): r --> P(y) |] ==> P(x) \
 \    |]  ==>  P(a)";
 by (rtac (major RS spec RS mp RS spec) 1);
-by (blast_tac (!claset addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
 qed "wf_induct";
 
 (*Perform induction on i, then prove the wf(r) subgoal using prems. *)
@@ -38,7 +38,7 @@
 
 val prems = goal WF.thy "[| wf(r);  (a,x):r;  (x,a):r |] ==> P";
 by (subgoal_tac "! x. (a,x):r --> (x,a):r --> P" 1);
-by (blast_tac (!claset addIs prems) 1);
+by (blast_tac (claset() addIs prems) 1);
 by (wf_ind_tac "a" prems 1);
 by (Blast_tac 1);
 qed "wf_asym";
@@ -81,7 +81,7 @@
 val lemma2 = result();
 
 goal WF.thy "wf r = (! Q x. x:Q --> (? z:Q. ! y. (y,z):r --> y~:Q))";
-by (blast_tac (!claset addSIs [lemma1, lemma2]) 1);
+by (blast_tac (claset() addSIs [lemma1, lemma2]) 1);
 qed "wf_eq_minimal";
 
 (*---------------------------------------------------------------------------
@@ -89,7 +89,7 @@
  *---------------------------------------------------------------------------*)
 
 goal thy "!!r. [| wf(r);  p<=r |] ==> wf(p)";
-by (full_simp_tac (!simpset addsimps [wf_eq_minimal]) 1);
+by (full_simp_tac (simpset() addsimps [wf_eq_minimal]) 1);
 by (Fast_tac 1);
 qed "wf_subset";
 
@@ -98,7 +98,7 @@
  *---------------------------------------------------------------------------*)
 
 goal thy "wf({})";
-by (simp_tac (!simpset addsimps [wf_def]) 1);
+by (simp_tac (simpset() addsimps [wf_def]) 1);
 qed "wf_empty";
 AddSIs [wf_empty];
 
@@ -108,10 +108,10 @@
 
 goal WF.thy "wf(insert (y,x) r) = (wf(r) & (x,y) ~: r^*)";
 by (rtac iffI 1);
- by (blast_tac (!claset addEs [wf_trancl RS wf_irrefl] addIs
+ by (blast_tac (claset() addEs [wf_trancl RS wf_irrefl] addIs
       [rtrancl_into_trancl1,wf_subset,impOfSubs rtrancl_mono]) 1);
-by (asm_full_simp_tac (!simpset addsimps [wf_eq_minimal]) 1);
-by (safe_tac (!claset));
+by (asm_full_simp_tac (simpset() addsimps [wf_eq_minimal]) 1);
+by (safe_tac (claset()));
 by (EVERY1[rtac allE, atac, etac impE, Blast_tac]);
 by (etac bexE 1);
 by (rename_tac "a" 1);
@@ -124,7 +124,7 @@
 by (res_inst_tac [("x","{z. z:Q & (z,y) : r^*}")] allE 1);
  by (assume_tac 1);
 by (thin_tac "! Q. (? x. x : Q) --> ?P Q" 1);	(*essential for speed*)
-by (blast_tac (!claset addIs [rtrancl_into_rtrancl2]) 1);
+by (blast_tac (claset() addIs [rtrancl_into_rtrancl2]) 1);
 qed "wf_insert";
 AddIffs [wf_insert];
 
@@ -132,18 +132,18 @@
 
 goalw WF.thy [acyclic_def]
  "!!r. wf r ==> acyclic r";
-by (blast_tac (!claset addEs [wf_trancl RS wf_irrefl]) 1);
+by (blast_tac (claset() addEs [wf_trancl RS wf_irrefl]) 1);
 qed "wf_acyclic";
 
 goalw WF.thy [acyclic_def]
   "acyclic(insert (y,x) r) = (acyclic r & (x,y) ~: r^*)";
-by (simp_tac (!simpset addsimps [trancl_insert]) 1);
-by (blast_tac (!claset addEs [make_elim rtrancl_trans]) 1);
+by (simp_tac (simpset() addsimps [trancl_insert]) 1);
+by (blast_tac (claset() addEs [make_elim rtrancl_trans]) 1);
 qed "acyclic_insert";
 AddIffs [acyclic_insert];
 
 goalw WF.thy [acyclic_def] "acyclic(r^-1) = acyclic r";
-by (simp_tac (!simpset addsimps [trancl_inverse]) 1);
+by (simp_tac (simpset() addsimps [trancl_inverse]) 1);
 qed "acyclic_inverse";
 
 (** cut **)
--- a/src/HOL/WF_Rel.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/WF_Rel.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -33,10 +33,10 @@
  *---------------------------------------------------------------------------*)
 
 goal thy "!!r. wf(r) ==> wf(inv_image r (f::'a=>'b))"; 
-by (full_simp_tac (!simpset addsimps [inv_image_def, wf_eq_minimal]) 1);
+by (full_simp_tac (simpset() addsimps [inv_image_def, wf_eq_minimal]) 1);
 by (Clarify_tac 1);
 by (subgoal_tac "? (w::'b). w : {w. ? (x::'a). x: Q & (f x = w)}" 1);
-by (blast_tac (!claset delrules [allE]) 2);
+by (blast_tac (claset() delrules [allE]) 2);
 by (etac allE 1);
 by (mp_tac 1);
 by (Blast_tac 1);
@@ -90,13 +90,13 @@
  *---------------------------------------------------------------------------*)
 goalw thy [finite_psubset_def] "wf(finite_psubset)";
 by (rtac (wf_measure RS wf_subset) 1);
-by (simp_tac (!simpset addsimps [measure_def, inv_image_def, less_than_def,
+by (simp_tac (simpset() addsimps [measure_def, inv_image_def, less_than_def,
 				 symmetric less_def])1);
-by (fast_tac (!claset addSIs [psubset_card]) 1);
+by (fast_tac (claset() addSIs [psubset_card]) 1);
 qed "wf_finite_psubset";
 
 goalw thy [finite_psubset_def, trans_def] "trans finite_psubset";
-by (simp_tac (!simpset addsimps [psubset_def]) 1);
+by (simp_tac (simpset() addsimps [psubset_def]) 1);
 by (Blast_tac 1);
 qed "trans_finite_psubset";
 
@@ -113,7 +113,7 @@
 qed_spec_mp "finite_acyclic_wf";
 
 goal thy "!!r. finite r ==> wf r = acyclic r";
-by (blast_tac (!claset addIs [finite_acyclic_wf,wf_acyclic]) 1);
+by (blast_tac (claset() addIs [finite_acyclic_wf,wf_acyclic]) 1);
 qed "wf_iff_acyclic_if_finite";
 
 
--- a/src/HOL/equalities.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/equalities.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -35,7 +35,7 @@
 qed "insert_is_Un";
 
 goal thy "insert a A ~= {}";
-by (blast_tac (!claset addEs [equalityCE]) 1);
+by (blast_tac (claset() addEs [equalityCE]) 1);
 qed"insert_not_empty";
 Addsimps[insert_not_empty];
 
@@ -112,7 +112,7 @@
 Addsimps [insert_image];
 
 goal thy "(f``A = {}) = (A = {})";
-by (blast_tac (!claset addSEs [equalityE]) 1);
+by (blast_tac (claset() addSEs [equalityE]) 1);
 qed "image_is_empty";
 AddIffs [image_is_empty];
 
@@ -151,7 +151,7 @@
 Addsimps[Int_empty_right];
 
 goal thy "(A Int B = {}) = (A <= Compl B)";
-by (blast_tac (!claset addSEs [equalityE]) 1);
+by (blast_tac (claset() addSEs [equalityE]) 1);
 qed "disjoint_eq_subset_Compl";
 
 goal thy "UNIV Int B = B";
@@ -173,11 +173,11 @@
 qed "Int_Un_distrib2";
 
 goal thy "(A<=B) = (A Int B = A)";
-by (blast_tac (!claset addSEs [equalityE]) 1);
+by (blast_tac (claset() addSEs [equalityE]) 1);
 qed "subset_Int_eq";
 
 goal thy "(A Int B = UNIV) = (A = UNIV & B = UNIV)";
-by (blast_tac (!claset addEs [equalityCE]) 1);
+by (blast_tac (claset() addEs [equalityCE]) 1);
 qed "Int_UNIV";
 Addsimps[Int_UNIV];
 
@@ -236,13 +236,13 @@
 
 goal thy "(insert a B) Int C = (if a:C then insert a (B Int C) \
 \                                          else        B Int C)";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Blast_tac 1);
 qed "Int_insert_left";
 
 goal thy "A Int (insert a B) = (if a:A then insert a (A Int B) \
 \                                          else        A Int B)";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Blast_tac 1);
 qed "Int_insert_right";
 
@@ -256,7 +256,7 @@
 qed "Un_Int_crazy";
 
 goal thy "(A<=B) = (A Un B = B)";
-by (blast_tac (!claset addSEs [equalityE]) 1);
+by (blast_tac (claset() addSEs [equalityE]) 1);
 qed "subset_Un_eq";
 
 goal thy "(A <= insert b C) = (A <= C | b:A & A-{b} <= C)";
@@ -264,7 +264,7 @@
 qed "subset_insert_iff";
 
 goal thy "(A Un B = {}) = (A = {} & B = {})";
-by (blast_tac (!claset addEs [equalityCE]) 1);
+by (blast_tac (claset() addEs [equalityCE]) 1);
 qed "Un_empty";
 Addsimps[Un_empty];
 
@@ -303,7 +303,7 @@
 (*Halmos, Naive Set Theory, page 16.*)
 
 goal thy "((A Int B) Un C = A Int (B Un C)) = (C<=A)";
-by (blast_tac (!claset addSEs [equalityE]) 1);
+by (blast_tac (claset() addSEs [equalityE]) 1);
 qed "Un_Int_assoc_eq";
 
 
@@ -334,13 +334,13 @@
 qed "Union_Int_subset";
 
 goal thy "(Union M = {}) = (! A : M. A = {})"; 
-by (blast_tac (!claset addEs [equalityE]) 1);
+by (blast_tac (claset() addEs [equalityE]) 1);
 qed"Union_empty_conv"; 
 AddIffs [Union_empty_conv];
 
 val prems = goal thy
    "(Union(C) Int A = {}) = (! B:C. B Int A = {})";
-by (blast_tac (!claset addSEs [equalityE]) 1);
+by (blast_tac (claset() addSEs [equalityE]) 1);
 qed "Union_disjoint";
 
 section "Inter";
@@ -562,7 +562,7 @@
 qed "Diff_insert2";
 
 goal thy "insert x A - B = (if x:B then A-B else insert x (A-B))";
-by (simp_tac (!simpset addsplits [expand_if]) 1);
+by (simp_tac (simpset() addsplits [expand_if]) 1);
 by (Blast_tac 1);
 qed "insert_Diff_if";
 
--- a/src/HOL/ex/BT.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/BT.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -12,12 +12,12 @@
 
 goal BT.thy "n_leaves(reflect(t)) = n_leaves(t)";
 by (bt.induct_tac "t" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [add_commute])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [add_commute])));
 qed "n_leaves_reflect";
 
 goal BT.thy "n_nodes(reflect(t)) = n_nodes(t)";
 by (bt.induct_tac "t" 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [add_commute])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [add_commute])));
 qed "n_nodes_reflect";
 
 (*The famous relationship between the numbers of leaves and nodes*)
--- a/src/HOL/ex/Fib.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/Fib.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -25,9 +25,9 @@
 by (res_inst_tac [("u","n")] fib.induct 1);
 (*Simplify the LHS just enough to apply the induction hypotheses*)
 by (asm_full_simp_tac
-    (!simpset addsimps [read_instantiate[("x", "Suc(?m+?n)")] fib_Suc_Suc]) 3);
+    (simpset() addsimps [read_instantiate[("x", "Suc(?m+?n)")] fib_Suc_Suc]) 3);
 by (ALLGOALS 
-    (asm_simp_tac (!simpset addsimps 
+    (asm_simp_tac (simpset() addsimps 
 		   (fib.rules @ add_ac @ mult_ac @
 		    [add_mult_distrib, add_mult_distrib2]))));
 qed "fib_add";
@@ -35,7 +35,7 @@
 
 goal thy "fib (Suc n) ~= 0";
 by (res_inst_tac [("u","n")] fib.induct 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps fib.rules)));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps fib.rules)));
 qed "fib_Suc_neq_0";
 Addsimps [fib_Suc_neq_0];
 
@@ -48,16 +48,16 @@
 by (res_inst_tac [("u","n")] fib.induct 1);
 by (res_inst_tac [("P", "%z. ?ff(x) * z = ?kk(x)")] (fib_Suc_Suc RS ssubst) 3);
 by (stac (read_instantiate [("x", "Suc(Suc ?n)")] fib_Suc_Suc) 3);
-by (asm_simp_tac (!simpset addsimps [add_mult_distrib, add_mult_distrib2]) 3);
+by (asm_simp_tac (simpset() addsimps [add_mult_distrib, add_mult_distrib2]) 3);
 by (stac (read_instantiate [("x", "Suc ?n")] fib_Suc_Suc) 3);
 by (ALLGOALS  (*using fib.rules here results in a longer proof!*)
-    (asm_simp_tac (!simpset addsimps [add_mult_distrib, add_mult_distrib2, 
+    (asm_simp_tac (simpset() addsimps [add_mult_distrib, add_mult_distrib2, 
 				      mod_less, mod_Suc]
                             addsplits [expand_if])));
-by (safe_tac (!claset addSDs [mod2_neq_0]));
+by (safe_tac (claset() addSDs [mod2_neq_0]));
 by (ALLGOALS
     (asm_full_simp_tac
-     (!simpset addsimps (fib.rules @ add_ac @ mult_ac @
+     (simpset() addsimps (fib.rules @ add_ac @ mult_ac @
 			 [add_mult_distrib, add_mult_distrib2, 
 			  mod_less, mod_Suc]))));
 qed "fib_Cassini";
--- a/src/HOL/ex/InSort.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/InSort.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -9,7 +9,7 @@
 goal thy "!y. mset(ins f x xs) y = mset (x#xs) y";
 by (list.induct_tac "xs" 1);
 by (Asm_simp_tac 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 qed "mset_ins";
 Addsimps [mset_ins];
 
@@ -19,7 +19,7 @@
 qed "insort_permutes";
 
 goal thy "set(ins f x xs) = insert x (set xs)";
-by (asm_simp_tac (!simpset addsimps [set_via_mset]
+by (asm_simp_tac (simpset() addsimps [set_via_mset]
                            addsplits [expand_if]) 1);
 by (Fast_tac 1);
 qed "set_ins";
@@ -28,7 +28,7 @@
 val prems = goalw InSort.thy [total_def,transf_def]
   "[| total(f); transf(f) |] ==>  sorted f (ins f x xs) = sorted f xs";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 by (cut_facts_tac prems 1);
 by (Fast_tac 1);
 qed "sorted_ins";
--- a/src/HOL/ex/MT.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/MT.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -24,7 +24,7 @@
 val infsys_mono_tac = (REPEAT (ares_tac (basic_monos@[allI,impI]) 1));
 
 val prems = goal MT.thy "P a b ==> P (fst (a,b)) (snd (a,b))";
-by (simp_tac (!simpset addsimps prems) 1);
+by (simp_tac (simpset() addsimps prems) 1);
 qed "infsys_p1";
 
 val prems = goal MT.thy "!!a b. P (fst (a,b)) (snd (a,b)) ==> P a b";
@@ -83,7 +83,7 @@
 by (rtac (monoh RS monoD) 1);
 by (rtac (UnE RS subsetI) 1);
 by (assume_tac 1);
-by (blast_tac (!claset addSIs [cih]) 1);
+by (blast_tac (claset() addSIs [cih]) 1);
 by (rtac (monoh RS monoD RS subsetD) 1);
 by (rtac Un_upper2 1);
 by (etac (monoh RS gfp_lemma2 RS subsetD) 1);
@@ -151,7 +151,7 @@
 by (rtac eval_fun_mono 1);
 by (rewtac eval_fun_def);
 	(*Naughty!  But the quantifiers are nested VERY deeply...*)
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "eval_const";
 
 val prems = goalw MT.thy [eval_def, eval_rel_def] 
@@ -160,7 +160,7 @@
 by (rtac lfp_intro2 1);
 by (rtac eval_fun_mono 1);
 by (rewtac eval_fun_def);
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "eval_var2";
 
 val prems = goalw MT.thy [eval_def, eval_rel_def] 
@@ -169,7 +169,7 @@
 by (rtac lfp_intro2 1);
 by (rtac eval_fun_mono 1);
 by (rewtac eval_fun_def);
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "eval_fn";
 
 val prems = goalw MT.thy [eval_def, eval_rel_def] 
@@ -179,7 +179,7 @@
 by (rtac lfp_intro2 1);
 by (rtac eval_fun_mono 1);
 by (rewtac eval_fun_def);
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "eval_fix";
 
 val prems = goalw MT.thy [eval_def, eval_rel_def]
@@ -189,7 +189,7 @@
 by (rtac lfp_intro2 1);
 by (rtac eval_fun_mono 1);
 by (rewtac eval_fun_def);
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "eval_app1";
 
 val prems = goalw MT.thy [eval_def, eval_rel_def] 
@@ -202,7 +202,7 @@
 by (rtac lfp_intro2 1);
 by (rtac eval_fun_mono 1);
 by (rewtac eval_fun_def);
-by (blast_tac (!claset addSIs [disjI2]) 1);
+by (blast_tac (claset() addSIs [disjI2]) 1);
 qed "eval_app2";
 
 (* Strong elimination, induction on evaluations *)
@@ -230,7 +230,7 @@
 by (rtac eval_fun_mono 1);
 by (rewtac eval_fun_def);
 by (dtac CollectD 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (ALLGOALS (resolve_tac prems));
 by (ALLGOALS (Blast_tac));
 qed "eval_ind0";
@@ -274,7 +274,7 @@
 by (rtac lfp_intro2 1);
 by (rtac elab_fun_mono 1);
 by (rewtac elab_fun_def);
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "elab_const";
 
 goalw MT.thy [elab_def, elab_rel_def] 
@@ -282,7 +282,7 @@
 by (rtac lfp_intro2 1);
 by (rtac elab_fun_mono 1);
 by (rewtac elab_fun_def);
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "elab_var";
 
 goalw MT.thy [elab_def, elab_rel_def] 
@@ -290,7 +290,7 @@
 by (rtac lfp_intro2 1);
 by (rtac elab_fun_mono 1);
 by (rewtac elab_fun_def);
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "elab_fn";
 
 goalw MT.thy [elab_def, elab_rel_def]
@@ -299,7 +299,7 @@
 by (rtac lfp_intro2 1);
 by (rtac elab_fun_mono 1);
 by (rewtac elab_fun_def);
-by (blast_tac (!claset addSIs [exI]) 1);
+by (blast_tac (claset() addSIs [exI]) 1);
 qed "elab_fix";
 
 goalw MT.thy [elab_def, elab_rel_def] 
@@ -308,7 +308,7 @@
 by (rtac lfp_intro2 1);
 by (rtac elab_fun_mono 1);
 by (rewtac elab_fun_def);
-by (blast_tac (!claset addSIs [disjI2]) 1);
+by (blast_tac (claset() addSIs [disjI2]) 1);
 qed "elab_app";
 
 (* Strong elimination, induction on elaborations *)
@@ -336,7 +336,7 @@
 by (rtac elab_fun_mono 1);
 by (rewtac elab_fun_def);
 by (dtac CollectD 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (ALLGOALS (resolve_tac prems));
 by (ALLGOALS (Blast_tac));
 qed "elab_ind0";
@@ -387,7 +387,7 @@
 by (rtac elab_fun_mono 1);
 by (rewtac elab_fun_def);
 by (dtac CollectD 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (ALLGOALS (resolve_tac prems));
 by (ALLGOALS (Blast_tac));
 qed "elab_elim0";
@@ -552,7 +552,7 @@
 by (rewtac hasty_fun_def);
 by (dtac CollectD 1);
 by (fold_goals_tac [hasty_fun_def]);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (REPEAT (ares_tac prems 1));
 qed "hasty_rel_elim0";
 
@@ -581,7 +581,7 @@
 goalw MT.thy [hasty_def,hasty_env_def] 
  "!!t. te |- fn ev => e ===> t & ve hastyenv te ==> v_clos(<|ev,e,ve|>) hasty t";
 by (rtac hasty_rel_clos_coind 1);
-by (ALLGOALS (blast_tac (!claset delrules [equalityI])));
+by (ALLGOALS (blast_tac (claset() delrules [equalityI])));
 qed "hasty_clos";
 
 (* Elimination on constants for hasty *)
@@ -623,13 +623,13 @@
   "!!ve. [| ve hastyenv te; v hasty t |] ==> \
 \        ve + {ev |-> v} hastyenv te + {ev |=> t}";
 by (rewtac hasty_env_def);
-by (asm_full_simp_tac (!simpset delsimps mem_simps
+by (asm_full_simp_tac (simpset() delsimps mem_simps
                                 addsimps [ve_dom_owr, te_dom_owr]) 1);
 by (safe_tac HOL_cs);
 by (excluded_middle_tac "ev=x" 1);
-by (asm_full_simp_tac (!simpset addsimps [ve_app_owr2, te_app_owr2]) 1);
+by (asm_full_simp_tac (simpset() addsimps [ve_app_owr2, te_app_owr2]) 1);
 by (Blast_tac 1);
-by (asm_simp_tac (!simpset addsimps [ve_app_owr1, te_app_owr1]) 1);
+by (asm_simp_tac (simpset() addsimps [ve_app_owr1, te_app_owr1]) 1);
 qed "hasty_env1";
 
 (* ############################################################ *)
@@ -668,15 +668,15 @@
 by ((forward_tac [ssubst] 1) THEN (assume_tac 2));
 by (rtac hasty_rel_clos_coind 1);
 by (etac elab_fn 1);
-by (asm_simp_tac (!simpset addsimps [ve_dom_owr, te_dom_owr]) 1);
+by (asm_simp_tac (simpset() addsimps [ve_dom_owr, te_dom_owr]) 1);
 
-by (asm_simp_tac (!simpset delsimps mem_simps addsimps [ve_dom_owr]) 1);
+by (asm_simp_tac (simpset() delsimps mem_simps addsimps [ve_dom_owr]) 1);
 by (safe_tac HOL_cs);
 by (excluded_middle_tac "ev2=ev1a" 1);
-by (asm_full_simp_tac (!simpset addsimps [ve_app_owr2, te_app_owr2]) 1);
+by (asm_full_simp_tac (simpset() addsimps [ve_app_owr2, te_app_owr2]) 1);
 by (Blast_tac 1);
 
-by (asm_simp_tac (!simpset delsimps mem_simps
+by (asm_simp_tac (simpset() delsimps mem_simps
                            addsimps [ve_app_owr1, te_app_owr1]) 1);
 by (hyp_subst_tac 1);
 by (etac subst 1);
@@ -690,7 +690,7 @@
 \   |] ==> \
 \   v_const(c_app c1 c2) hasty t";
 by (dtac elab_app_elim 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (rtac hasty_const 1);
 by (rtac isof_app 1);
 by (rtac hasty_elim_const 1);
@@ -711,7 +711,7 @@
 \   |] ==> \
 \   v hasty t";
 by (dtac elab_app_elim 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by ((etac allE 1) THEN (etac allE 1) THEN (etac impE 1));
 by (assume_tac 1);
 by (etac impE 1);
@@ -721,9 +721,9 @@
 by (etac impE 1);
 by (assume_tac 1);
 by (dtac hasty_elim_clos 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (dtac elab_fn_elim 1);
-by (blast_tac (!claset addIs [hasty_env1] addSDs [t_fun_inj]) 1);
+by (blast_tac (claset() addIs [hasty_env1] addSDs [t_fun_inj]) 1);
 qed "consistency_app2";
 
 val [major] = goal MT.thy 
@@ -733,7 +733,7 @@
 (* Proof by induction on the structure of evaluations *)
 
 by (rtac (major RS eval_ind) 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (DEPTH_SOLVE 
     (ares_tac [consistency_const, consistency_var, consistency_fn,
                consistency_fix, consistency_app1, consistency_app2] 1));
@@ -746,7 +746,7 @@
 val prems = goalw MT.thy [isof_env_def,hasty_env_def] 
   "ve isofenv te ==> ve hastyenv te";
 by (cut_facts_tac prems 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (etac allE 1);
 by (etac impE 1);
 by (assume_tac 1);
@@ -761,7 +761,7 @@
 by (cut_facts_tac prems 1);
 by (rtac hasty_elim_const 1);
 by (dtac consistency 1);
-by (blast_tac (!claset addSIs [basic_consistency_lem]) 1);
+by (blast_tac (claset() addSIs [basic_consistency_lem]) 1);
 qed "basic_consistency";
 
 writeln"Reached end of file.";
--- a/src/HOL/ex/Primes.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/Primes.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -23,7 +23,7 @@
     and induction rule **)
 
 Tfl.tgoalw thy [] gcd.rules;
-by (simp_tac (!simpset addsimps [mod_less_divisor, zero_less_eq]) 1);
+by (simp_tac (simpset() addsimps [mod_less_divisor, zero_less_eq]) 1);
 val tc = result();
 
 val gcd_eq = tc RS hd gcd.rules;
@@ -36,7 +36,7 @@
 
 goal thy "!!m. 0<n ==> gcd(m,n) = gcd (n, m mod n)";
 by (rtac (gcd_eq RS trans) 1);
-by (asm_simp_tac (!simpset addsplits [expand_if]) 1);
+by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
 qed "gcd_less_0";
 Addsimps [gcd_0, gcd_less_0];
 
@@ -53,8 +53,8 @@
 by (res_inst_tac [("u","m"),("v","n")] gcd_induct 1);
 by (case_tac "n=0" 1);
 by (ALLGOALS 
-    (asm_simp_tac (!simpset addsimps [mod_less_divisor,zero_less_eq])));
-by (blast_tac (!claset addDs [dvd_mod_imp_dvd]) 1);
+    (asm_simp_tac (simpset() addsimps [mod_less_divisor,zero_less_eq])));
+by (blast_tac (claset() addDs [dvd_mod_imp_dvd]) 1);
 qed "gcd_divides_both";
 
 (*Maximality: for all m,n,f naturals, 
@@ -63,18 +63,18 @@
 by (res_inst_tac [("u","m"),("v","n")] gcd_induct 1);
 by (case_tac "n=0" 1);
 by (ALLGOALS 
-    (asm_simp_tac (!simpset addsimps [dvd_mod, mod_less_divisor,
+    (asm_simp_tac (simpset() addsimps [dvd_mod, mod_less_divisor,
 				      zero_less_eq])));
 qed_spec_mp "gcd_greatest";
 
 (*Function gcd yields the Greatest Common Divisor*)
 goalw thy [is_gcd_def] "is_gcd (gcd(m,n)) m n";
-by (asm_simp_tac (!simpset addsimps [gcd_greatest, gcd_divides_both]) 1);
+by (asm_simp_tac (simpset() addsimps [gcd_greatest, gcd_divides_both]) 1);
 qed "is_gcd";
 
 (*uniqueness of GCDs*)
 goalw thy [is_gcd_def] "is_gcd m a b & is_gcd n a b --> m=n";
-by (blast_tac (!claset addIs [dvd_anti_sym]) 1);
+by (blast_tac (claset() addIs [dvd_anti_sym]) 1);
 qed "is_gcd_unique";
 
 (*Davenport, page 27*)
@@ -83,7 +83,7 @@
 by (case_tac "k=0" 1);
 by (case_tac "n=0" 2);
 by (ALLGOALS 
-    (asm_simp_tac (!simpset addsimps [mod_less_divisor, zero_less_eq,
+    (asm_simp_tac (simpset() addsimps [mod_less_divisor, zero_less_eq,
 				      mod_geq, mod_mult_distrib2])));
 qed "gcd_mult_distrib2";
 
@@ -94,8 +94,8 @@
 by (subgoal_tac "m = gcd(m*p, m*n)" 1);
 by (etac ssubst 1);
 by (rtac gcd_greatest 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [gcd_mult_distrib2 RS sym])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [gcd_mult_distrib2 RS sym])));
 (*Now deduce  gcd(p,n)=1  to finish the proof*)
 by (cut_inst_tac [("m","p"),("n","n")] gcd_divides_both 1);
-by (fast_tac (!claset addSss (!simpset)) 1);
+by (fast_tac (claset() addSss (simpset())) 1);
 qed "prime_dvd_mult";
--- a/src/HOL/ex/Primrec.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/Primrec.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -67,20 +67,20 @@
 goal thy "j<k --> ack(i,j) < ack(i,k)";
 by (res_inst_tac [("u","i"),("v","k")] ack.induct 1);
 by (ALLGOALS Asm_simp_tac);
-by (blast_tac (!claset addSEs [less_SucE] addIs [less_trans]) 1);
+by (blast_tac (claset() addSEs [less_SucE] addIs [less_trans]) 1);
 qed_spec_mp "ack_less_mono2";
 
 (*PROPERTY A 5', monotonicity for<=*)
 goal thy "!!i j k. j<=k ==> ack(i,j)<=ack(i,k)";
-by (full_simp_tac (!simpset addsimps [le_eq_less_or_eq]) 1);
-by (blast_tac (!claset addIs [ack_less_mono2]) 1);
+by (full_simp_tac (simpset() addsimps [le_eq_less_or_eq]) 1);
+by (blast_tac (claset() addIs [ack_less_mono2]) 1);
 qed "ack_le_mono2";
 
 (*PROPERTY A 6*)
 goal thy "ack(i, Suc(j)) <= ack(Suc(i), j)";
 by (induct_tac "j" 1);
 by (ALLGOALS Asm_simp_tac);
-by (blast_tac (!claset addIs [ack_le_mono2, less_ack2 RS Suc_leI, 
+by (blast_tac (claset() addIs [ack_le_mono2, less_ack2 RS Suc_leI, 
 			      le_trans]) 1);
 qed "ack2_le_ack1";
 
@@ -88,7 +88,7 @@
 
 (*PROPERTY A 7-, the single-step lemma*)
 goal thy "ack(i,j) < ack(Suc(i),j)";
-by (blast_tac (!claset addIs [ack_less_mono2, less_le_trans]) 1);
+by (blast_tac (claset() addIs [ack_less_mono2, less_le_trans]) 1);
 qed "ack_less_ack_Suc1";
 
 AddIffs [ack_less_ack_Suc1];
@@ -97,7 +97,7 @@
 goal thy "i < ack(i,j)";
 by (induct_tac "i" 1);
 by (ALLGOALS Asm_simp_tac);
-by (blast_tac (!claset addIs [Suc_leI, le_less_trans]) 1);
+by (blast_tac (claset() addIs [Suc_leI, le_less_trans]) 1);
 qed "less_ack1";
 AddIffs [less_ack1];
 
@@ -120,22 +120,22 @@
 goal thy "ack(i,k) < ack(Suc(i+i'),k)";
 by (res_inst_tac [("u","i"),("v","k")] ack.induct 1);
 by (ALLGOALS Asm_full_simp_tac);
-by (blast_tac (!claset addIs [less_trans, ack_less_mono2]) 2);
+by (blast_tac (claset() addIs [less_trans, ack_less_mono2]) 2);
 by (res_inst_tac [("u","i'"),("v","n")] ack.induct 1);
 by (ALLGOALS Asm_simp_tac);
-by (blast_tac (!claset addIs [less_trans, ack_less_mono2]) 1);
-by (blast_tac (!claset addIs [Suc_leI RS le_less_trans, ack_less_mono2]) 1);
+by (blast_tac (claset() addIs [less_trans, ack_less_mono2]) 1);
+by (blast_tac (claset() addIs [Suc_leI RS le_less_trans, ack_less_mono2]) 1);
 val lemma = result();
 
 goal thy "!!i j k. i<j ==> ack(i,k) < ack(j,k)";
 by (etac less_natE 1);
-by (blast_tac (!claset addSIs [lemma]) 1);
+by (blast_tac (claset() addSIs [lemma]) 1);
 qed "ack_less_mono1";
 
 (*PROPERTY A 7', monotonicity for<=*)
 goal thy "!!i j k. i<=j ==> ack(i,k)<=ack(j,k)";
-by (full_simp_tac (!simpset addsimps [le_eq_less_or_eq]) 1);
-by (blast_tac (!claset addIs [ack_less_mono1]) 1);
+by (full_simp_tac (simpset() addsimps [le_eq_less_or_eq]) 1);
+by (blast_tac (claset() addIs [ack_less_mono1]) 1);
 qed "ack_le_mono1";
 
 (*PROPERTY A 10*)
@@ -144,7 +144,7 @@
 by (Asm_simp_tac 1);
 by (rtac (le_add1 RS ack_le_mono1 RS le_less_trans) 1);
 by (rtac (ack_less_mono1 RS ack_less_mono2) 1);
-by (simp_tac (!simpset addsimps [le_imp_less_Suc, le_add2]) 1);
+by (simp_tac (simpset() addsimps [le_imp_less_Suc, le_add2]) 1);
 qed "ack_nest_bound";
 
 (*PROPERTY A 11*)
@@ -153,7 +153,7 @@
 by (Asm_simp_tac 1);
 by (rtac (ack_nest_bound RS less_le_trans) 2);
 by (Asm_simp_tac 2);
-by (blast_tac (!claset addSIs [le_add1, le_add2]
+by (blast_tac (claset() addSIs [le_add1, le_add2]
 		       addIs  [le_imp_less_Suc, ack_le_mono1, le_SucI, 
 			       add_le_mono]) 1);
 qed "ack_add_bound";
@@ -174,7 +174,7 @@
 
 goalw thy [SC_def] "SC l < ack(1, list_add l)";
 by (induct_tac "l" 1);
-by (ALLGOALS (simp_tac (!simpset addsimps [le_add1, le_imp_less_Suc])));
+by (ALLGOALS (simp_tac (simpset() addsimps [le_add1, le_imp_less_Suc])));
 qed "SC_case";
 
 goal thy "CONST k l < ack(k, list_add l)";
@@ -187,9 +187,9 @@
 by (ALLGOALS Asm_simp_tac);
 by (rtac allI 1);
 by (exhaust_tac "i" 1);
-by (asm_simp_tac (!simpset addsimps [le_add1, le_imp_less_Suc]) 1);
+by (asm_simp_tac (simpset() addsimps [le_add1, le_imp_less_Suc]) 1);
 by (Asm_simp_tac 1);
-by (blast_tac (!claset addIs [less_le_trans] 
+by (blast_tac (claset() addIs [less_le_trans] 
                        addSIs [le_add2]) 1);
 qed_spec_mp "PROJ_case";
 
@@ -200,9 +200,9 @@
 \      ==> EX k. ALL l. list_add (map(%f. f l) fs) < ack(k, list_add l)";
 by (etac lists.induct 1);
 by (res_inst_tac [("x","0")] exI 1 THEN Asm_simp_tac 1);
-by (safe_tac (!claset));
+by (safe_tac (claset()));
 by (Asm_simp_tac 1);
-by (blast_tac (!claset addIs [add_less_mono, ack_add_bound, less_trans]) 1);
+by (blast_tac (claset() addIs [add_less_mono, ack_add_bound, less_trans]) 1);
 qed "COMP_map_lemma";
 
 goalw thy [COMP_def]
@@ -215,7 +215,7 @@
 by (rtac allI 1);
 by (REPEAT (dtac spec 1));
 by (etac less_trans 1);
-by (blast_tac (!claset addIs [ack_less_mono2, ack_nest_bound, less_trans]) 1);
+by (blast_tac (claset() addIs [ack_less_mono2, ack_nest_bound, less_trans]) 1);
 qed "COMP_case";
 
 (** PREC case **)
@@ -226,18 +226,18 @@
 \        |] ==> PREC f g l + list_add l < ack(Suc(kf+kg), list_add l)";
 by (exhaust_tac "l" 1);
 by (ALLGOALS Asm_simp_tac);
-by (blast_tac (!claset addIs [less_trans]) 1);
+by (blast_tac (claset() addIs [less_trans]) 1);
 by (etac ssubst 1);  (*get rid of the needless assumption*)
 by (induct_tac "a" 1);
 by (ALLGOALS Asm_simp_tac);
 (*base case*)
-by (blast_tac (!claset addIs [le_add1 RS le_imp_less_Suc RS ack_less_mono1, 
+by (blast_tac (claset() addIs [le_add1 RS le_imp_less_Suc RS ack_less_mono1, 
 			      less_trans]) 1);
 (*induction step*)
 by (rtac (Suc_leI RS le_less_trans) 1);
 by (rtac (le_refl RS add_le_mono RS le_less_trans) 1);
 by (etac spec 2);
-by (asm_simp_tac (!simpset addsimps [le_add2]) 1);
+by (asm_simp_tac (simpset() addsimps [le_add2]) 1);
 (*final part of the simplification*)
 by (Asm_simp_tac 1);
 by (rtac (le_add2 RS ack_le_mono1 RS le_less_trans) 1);
@@ -251,13 +251,13 @@
 by (rtac exI 1);
 by (rtac allI 1);
 by (rtac ([le_add1, PREC_case_lemma] MRS le_less_trans) 1);
-by (REPEAT (blast_tac (!claset addIs [ack_add_bound2]) 1));
+by (REPEAT (blast_tac (claset() addIs [ack_add_bound2]) 1));
 qed "PREC_case";
 
 goal thy "!!f. f:PRIMREC ==> EX k. ALL l. f l < ack(k, list_add l)";
 by (etac PRIMREC.induct 1);
 by (ALLGOALS 
-    (blast_tac (!claset addIs [SC_case, CONST_case, PROJ_case, COMP_case, 
+    (blast_tac (claset() addIs [SC_case, CONST_case, PROJ_case, COMP_case, 
 			       PREC_case])));
 qed "ack_bounds_PRIMREC";
 
--- a/src/HOL/ex/Puzzle.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/Puzzle.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -21,25 +21,25 @@
 by (rtac classical 1);
 by (dtac not_leE 1);
 by (subgoal_tac "f(na) <= f(f(na))" 1);
-by (fast_tac (!claset addIs [Puzzle.f_ax]) 2);
+by (fast_tac (claset() addIs [Puzzle.f_ax]) 2);
 by (rtac Suc_leI 1);
-by (fast_tac (!claset delrules [order_refl] 
+by (fast_tac (claset() delrules [order_refl] 
                       addIs [Puzzle.f_ax, le_less_trans]) 1);
 val lemma = result() RS spec RS mp;
 
 goal Puzzle.thy "n <= f(n)";
-by (fast_tac (!claset addIs [lemma]) 1);
+by (fast_tac (claset() addIs [lemma]) 1);
 qed "lemma1";
 
 goal Puzzle.thy "f(n) < f(Suc(n))";
-by (deepen_tac (!claset addIs [Puzzle.f_ax, le_less_trans, lemma1]) 0 1);
+by (deepen_tac (claset() addIs [Puzzle.f_ax, le_less_trans, lemma1]) 0 1);
 qed "lemma2";
 
 val prems = goal Puzzle.thy "(!!n. f(n) <= f(Suc(n))) ==> m<n --> f(m) <= f(n)";
 by (res_inst_tac[("n","n")]nat_induct 1);
 by (Simp_tac 1);
-by (simp_tac (!simpset addsimps [less_Suc_eq]) 1);
-by (best_tac (!claset addIs (le_trans::prems)) 1);
+by (simp_tac (simpset() addsimps [less_Suc_eq]) 1);
+by (best_tac (claset() addIs (le_trans::prems)) 1);
 qed_spec_mp "mono_lemma1";
 
 val [p1,p2] = goal Puzzle.thy
@@ -50,11 +50,11 @@
 qed "mono_lemma";
 
 val prems = goal Puzzle.thy "m <= n ==> f(m) <= f(n)";
-by (fast_tac (!claset addIs ([mono_lemma,less_imp_le,lemma2]@prems)) 1);
+by (fast_tac (claset() addIs ([mono_lemma,less_imp_le,lemma2]@prems)) 1);
 qed "f_mono";
 
 goal Puzzle.thy "f(n) = n";
 by (rtac le_anti_sym 1);
 by (rtac lemma1 2);
-by (fast_tac (!claset addIs [Puzzle.f_ax,leI] addDs [leD,f_mono,Suc_leI]) 1);
+by (fast_tac (claset() addIs [Puzzle.f_ax,leI] addDs [leD,f_mono,Suc_leI]) 1);
 result();
--- a/src/HOL/ex/Qsort.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/Qsort.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -26,18 +26,18 @@
 
 goal Qsort.thy "!x. mset (qsort le xs) x = mset xs x";
 by (res_inst_tac[("xs","xs"),("p","le")]Qsort.qsort_ind 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed "qsort_permutes";
 
 goal Qsort.thy "set(qsort le xs) = set xs";
-by(simp_tac (!simpset addsimps [set_via_mset,qsort_permutes]) 1);
+by(simp_tac (simpset() addsimps [set_via_mset,qsort_permutes]) 1);
 qed "set_qsort";
 Addsimps [set_qsort];
 
 goal List.thy
   "(!x:set[x:xs. P(x)].Q(x)) = (!x:set xs. P(x)-->Q(x))";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed"Ball_set_filter";
 Addsimps [Ball_set_filter];
 
--- a/src/HOL/ex/Recdef.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/Recdef.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -13,7 +13,7 @@
 
 goal thy "(x mem qsort (ord,l)) = (x mem l)";
 by (res_inst_tac [("u","ord"),("v","l")] qsort.induct 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS (asm_simp_tac (simpset() addsplits [expand_if])));
 by (Blast_tac 1);
 qed "qsort_mem_stable";
 
@@ -30,7 +30,7 @@
 
 goal thy "g x = 0";
 by (res_inst_tac [("u","x")] g.induct 1);
-by (ALLGOALS (asm_simp_tac (!simpset addsimps [g_terminates])));
+by (ALLGOALS (asm_simp_tac (simpset() addsimps [g_terminates])));
 qed "g_zero";
 
 (*** the contrived `mapf' ***)
--- a/src/HOL/ex/Sorting.ML	Mon Nov 03 12:12:10 1997 +0100
+++ b/src/HOL/ex/Sorting.ML	Mon Nov 03 12:13:18 1997 +0100
@@ -8,20 +8,20 @@
 
 goal Sorting.thy "!x. mset (xs@ys) x = mset xs x + mset ys x";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed "mset_append";
 
 goal Sorting.thy "!x. mset [x:xs. ~p(x)] x + mset [x:xs. p(x)] x = \
 \                     mset xs x";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 qed "mset_compl_add";
 
 Addsimps [mset_append, mset_compl_add];
 
 goal Sorting.thy "set xs = {x. mset xs x ~= 0}";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS(asm_simp_tac (!simpset addsplits [expand_if])));
+by (ALLGOALS(asm_simp_tac (simpset() addsplits [expand_if])));
 by (Fast_tac 1);
 qed "set_via_mset";
 
@@ -30,7 +30,7 @@
 val prems = goalw Sorting.thy [transf_def]
   "transf(le) ==> sorted1 le xs = sorted le xs";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS(asm_si