Installation of new simplfier. Previously appeared to set up the old
authorlcp
Mon Sep 20 17:02:11 1993 +0200 (1993-09-20)
changeset 8c3d2c6dcf3f0
parent 7 268f93ab3bc4
child 9 c1795fac88c3
Installation of new simplfier. Previously appeared to set up the old
simplifier to rewrite with the partial ordering [=, something not possible
with the new simplifier. But such rewriting appears not to have actually
been used, and there were few complications. In terms.ML setloop was used
to avoid infinite rewriting with the letrec rule. Congruence rules were
deleted, and an occasional SIMP_TAC had to become asm_simp_tac.
src/CCL/CCL.ML
src/CCL/Fix.ML
src/CCL/Hered.ML
src/CCL/Set.ML
src/CCL/Term.ML
src/CCL/Type.ML
src/CCL/Wfd.ML
src/CCL/ccl.ML
src/CCL/coinduction.ML
src/CCL/ex/List.ML
src/CCL/ex/Nat.ML
src/CCL/ex/Stream.ML
src/CCL/ex/list.ML
src/CCL/ex/nat.ML
src/CCL/ex/stream.ML
src/CCL/fix.ML
src/CCL/hered.ML
src/CCL/set.ML
src/CCL/subset.ML
src/CCL/term.ML
src/CCL/terms.ML
src/CCL/type.ML
src/CCL/wfd.ML
     1.1 --- a/src/CCL/CCL.ML	Fri Sep 17 16:52:10 1993 +0200
     1.2 +++ b/src/CCL/CCL.ML	Mon Sep 20 17:02:11 1993 +0200
     1.3 @@ -10,30 +10,10 @@
     1.4  
     1.5  val ccl_data_defs = [apply_def,fix_def];
     1.6  
     1.7 -(*** Simplifier for pre-order and equality ***)
     1.8 -
     1.9 -structure CCL_SimpData : SIMP_DATA =
    1.10 -  struct
    1.11 -  val refl_thms		= [refl, po_refl, iff_refl]
    1.12 -  val trans_thms	= [trans, iff_trans, po_trans]
    1.13 -  val red1		= iffD1
    1.14 -  val red2		= iffD2
    1.15 -  val mk_rew_rules	= mk_rew_rules
    1.16 -  val case_splits	= []         (*NO IF'S!*)
    1.17 -  val norm_thms		= norm_thms
    1.18 -  val subst_thms	= [subst];
    1.19 -  val dest_red		= dest_red
    1.20 -  end;
    1.21 -
    1.22 -structure CCL_Simp = SimpFun(CCL_SimpData);
    1.23 -open CCL_Simp;
    1.24 -
    1.25 -val auto_ss = empty_ss setauto (fn hyps => ares_tac (TrueI::hyps));
    1.26 -
    1.27  val po_refl_iff_T = make_iff_T po_refl;
    1.28  
    1.29 -val CCL_ss = auto_ss addcongs (FOL_congs @ set_congs)
    1.30 -                     addrews  ([po_refl_iff_T] @ FOL_rews @ mem_rews);
    1.31 +val CCL_ss = FOL_ss addcongs set_congs
    1.32 +                    addsimps  ([po_refl_iff_T] @ mem_rews);
    1.33  
    1.34  (*** Congruence Rules ***)
    1.35  
    1.36 @@ -46,7 +26,7 @@
    1.37   (fn [prem] => [rtac (prem RS subst) 1, rtac refl 1]);
    1.38  
    1.39  goal CCL.thy  "(ALL x. f(x) = g(x)) --> (%x.f(x)) = (%x.g(x))";
    1.40 -by (SIMP_TAC (CCL_ss addrews [eq_iff]) 1);
    1.41 +by (simp_tac (CCL_ss addsimps [eq_iff]) 1);
    1.42  by (fast_tac (set_cs addIs [po_abstractn]) 1);
    1.43  val abstractn = standard (allI RS (result() RS mp));
    1.44  
    1.45 @@ -61,11 +41,6 @@
    1.46     in do_prems 1 (prems_of thm) thm
    1.47     end;
    1.48  
    1.49 -fun ccl_mk_congs thy cs = map abs_prems (mk_congs thy cs); 
    1.50 -
    1.51 -val ccl_congs = ccl_mk_congs CCL.thy 
    1.52 - ["op [=","SIM","POgen","EQgen","pair","lambda","case","op `","fix"];
    1.53 -
    1.54  val caseBs = [caseBtrue,caseBfalse,caseBpair,caseBlam,caseBbot];
    1.55  
    1.56  (*** Termination and Divergence ***)
    1.57 @@ -85,17 +60,16 @@
    1.58  by  (REPEAT (SOMEGOAL (ares_tac (prems@[box_equals]))));
    1.59  val eq_lemma = result();
    1.60  
    1.61 -fun mk_inj_rl thy rews congs s = 
    1.62 +fun mk_inj_rl thy rews s = 
    1.63        let fun mk_inj_lemmas r = ([arg_cong] RL [(r RS (r RS eq_lemma))]);
    1.64            val inj_lemmas = flat (map mk_inj_lemmas rews);
    1.65            val tac = REPEAT (ares_tac [iffI,allI,conjI] 1 ORELSE
    1.66                              eresolve_tac inj_lemmas 1 ORELSE
    1.67 -                            ASM_SIMP_TAC (CCL_ss addrews rews 
    1.68 -                                                 addcongs congs) 1)
    1.69 +                            asm_simp_tac (CCL_ss addsimps rews) 1)
    1.70        in prove_goal thy s (fn _ => [tac])
    1.71        end;
    1.72  
    1.73 -val ccl_injs = map (mk_inj_rl CCL.thy caseBs ccl_congs)
    1.74 +val ccl_injs = map (mk_inj_rl CCL.thy caseBs)
    1.75                 ["<a,b> = <a',b'> <-> (a=a' & b=b')",
    1.76                  "(lam x.b(x) = lam x.b'(x)) <-> ((ALL z.b(z)=b'(z)))"];
    1.77  
    1.78 @@ -124,7 +98,7 @@
    1.79    fun mk_thm_str thy a b = "~ " ^ (saturate thy a "a") ^ " = " ^ (saturate thy b "b");
    1.80  
    1.81    val lemma = prove_goal CCL.thy "t=t' --> case(t,b,c,d,e) = case(t',b,c,d,e)"
    1.82 -                   (fn _ => [SIMP_TAC (CCL_ss addcongs ccl_congs) 1]) RS mp;
    1.83 +                   (fn _ => [simp_tac CCL_ss 1]) RS mp;
    1.84    fun mk_lemma (ra,rb) = [lemma] RL [ra RS (rb RS eq_lemma)] RL 
    1.85                             [distinctness RS notE,sym RS (distinctness RS notE)];
    1.86  in
    1.87 @@ -143,7 +117,7 @@
    1.88  
    1.89  fun mk_dstnct_thms thy defs inj_rls xs = 
    1.90            let fun mk_dstnct_thm rls s = prove_goalw thy defs s 
    1.91 -                               (fn _ => [SIMP_TAC (CCL_ss addrews (rls@inj_rls)) 1])
    1.92 +                               (fn _ => [simp_tac (CCL_ss addsimps (rls@inj_rls)) 1])
    1.93            in map (mk_dstnct_thm ccl_dstncts) (mk_dstnct_rls thy xs) end;
    1.94  
    1.95  fun mkall_dstnct_thms thy defs i_rls xss = flat (map (mk_dstnct_thms thy defs i_rls) xss);
    1.96 @@ -158,7 +132,7 @@
    1.97  val XH_to_Es = map XH_to_E;
    1.98  
    1.99  val ccl_rews = caseBs @ ccl_injs @ ccl_dstncts;
   1.100 -val ccl_ss = CCL_ss addrews ccl_rews addcongs ccl_congs;
   1.101 +val ccl_ss = CCL_ss addsimps ccl_rews;
   1.102  
   1.103  val ccl_cs = set_cs addSEs (pair_inject::(ccl_dstncts RL [notE])) 
   1.104                      addSDs (XH_to_Ds ccl_injs);
   1.105 @@ -179,7 +153,7 @@
   1.106  br monoI 1;
   1.107  by (safe_tac ccl_cs);
   1.108  by (REPEAT_SOME (resolve_tac [exI,conjI,refl]));
   1.109 -by (ALLGOALS (SIMP_TAC ccl_ss));
   1.110 +by (ALLGOALS (simp_tac ccl_ss));
   1.111  by (ALLGOALS (fast_tac set_cs));
   1.112  val POgen_mono = result();
   1.113  
   1.114 @@ -194,7 +168,7 @@
   1.115    "t [= t' <-> t=bot | (t=true & t'=true) | (t=false & t'=false) | \
   1.116  \                    (EX a a' b b'.t=<a,b> &  t'=<a',b'>  & a [= a' & b [= b') | \
   1.117  \                    (EX f f'.t=lam x.f(x) &  t'=lam x.f'(x) & (ALL x.f(x) [= f'(x)))";
   1.118 -by (SIMP_TAC (ccl_ss addrews [PO_iff]) 1);
   1.119 +by (simp_tac (ccl_ss addsimps [PO_iff]) 1);
   1.120  br (rewrite_rule [POgen_def,SIM_def] 
   1.121                   (POgen_mono RS (PO_def RS def_gfp_Tarski) RS XHlemma1)) 1;
   1.122  br (iff_refl RS XHlemma2) 1;
   1.123 @@ -202,27 +176,27 @@
   1.124  
   1.125  goal CCL.thy "bot [= b";
   1.126  br (poXH RS iffD2) 1;
   1.127 -by (SIMP_TAC ccl_ss 1);
   1.128 +by (simp_tac ccl_ss 1);
   1.129  val po_bot = result();
   1.130  
   1.131  goal CCL.thy "a [= bot --> a=bot";
   1.132  br impI 1;
   1.133  bd (poXH RS iffD1) 1;
   1.134  be rev_mp 1;
   1.135 -by (SIMP_TAC ccl_ss 1);
   1.136 +by (simp_tac ccl_ss 1);
   1.137  val bot_poleast = result() RS mp;
   1.138  
   1.139  goal CCL.thy "<a,b> [= <a',b'> <->  a [= a' & b [= b'";
   1.140  br (poXH RS iff_trans) 1;
   1.141 -by (SIMP_TAC ccl_ss 1);
   1.142 +by (simp_tac ccl_ss 1);
   1.143  by (fast_tac ccl_cs 1);
   1.144  val po_pair = result();
   1.145  
   1.146  goal CCL.thy "lam x.f(x) [= lam x.f'(x) <-> (ALL x. f(x) [= f'(x))";
   1.147  br (poXH RS iff_trans) 1;
   1.148 -by (SIMP_TAC ccl_ss 1);
   1.149 +by (simp_tac ccl_ss 1);
   1.150  by (REPEAT (ares_tac [iffI,allI] 1 ORELSE eresolve_tac [exE,conjE] 1));
   1.151 -by (ASM_SIMP_TAC ccl_ss 1);
   1.152 +by (asm_simp_tac ccl_ss 1);
   1.153  by (fast_tac ccl_cs 1);
   1.154  val po_lam = result();
   1.155  
   1.156 @@ -275,7 +249,7 @@
   1.157  
   1.158  fun mk_thm s = prove_goal CCL.thy s (fn _ => 
   1.159                            [rtac notI 1,dtac case_pocong 1,etac rev_mp 5,
   1.160 -                           ALLGOALS (SIMP_TAC ccl_ss),
   1.161 +                           ALLGOALS (simp_tac ccl_ss),
   1.162                             REPEAT (resolve_tac [po_refl,npo_lam_bot] 1)]);
   1.163  
   1.164  val npo_rls = [npo_pair_lam,npo_lam_pair] @ map mk_thm
   1.165 @@ -300,7 +274,7 @@
   1.166  br monoI 1;
   1.167  by (safe_tac set_cs);
   1.168  by (REPEAT_SOME (resolve_tac [exI,conjI,refl]));
   1.169 -by (ALLGOALS (SIMP_TAC ccl_ss));
   1.170 +by (ALLGOALS (simp_tac ccl_ss));
   1.171  by (ALLGOALS (fast_tac set_cs));
   1.172  val EQgen_mono = result();
   1.173  
   1.174 @@ -321,7 +295,7 @@
   1.175  \             (EX a a' b b'.t=<a,b> &  t'=<a',b'>  & <a,a'> : EQ & <b,b'> : EQ) | \
   1.176  \             (EX f f'.t=lam x.f(x) &  t'=lam x.f'(x) & (ALL x.<f(x),f'(x)> : EQ))" 1);
   1.177  be rev_mp 1;
   1.178 -by (SIMP_TAC (CCL_ss addrews [EQ_iff RS iff_sym]) 1);
   1.179 +by (simp_tac (CCL_ss addsimps [EQ_iff RS iff_sym]) 1);
   1.180  br (rewrite_rule [EQgen_def,SIM_def]
   1.181                   (EQgen_mono RS (EQ_def RS def_gfp_Tarski) RS XHlemma1)) 1;
   1.182  br (iff_refl RS XHlemma2) 1;
   1.183 @@ -345,7 +319,7 @@
   1.184  
   1.185  goalw CCL.thy [apply_def]  "(EX f.t=lam x.f(x)) --> t = lam x.(t ` x)";
   1.186  by (safe_tac ccl_cs);
   1.187 -by (SIMP_TAC ccl_ss 1);
   1.188 +by (simp_tac ccl_ss 1);
   1.189  val cond_eta = result() RS mp;
   1.190  
   1.191  goal CCL.thy "(t=bot) | (t=true) | (t=false) | (EX a b.t=<a,b>) | (EX f.t=lam x.f(x))";
     2.1 --- a/src/CCL/Fix.ML	Fri Sep 17 16:52:10 1993 +0200
     2.2 +++ b/src/CCL/Fix.ML	Mon Sep 20 17:02:11 1993 +0200
     2.3 @@ -8,20 +8,13 @@
     2.4  
     2.5  open Fix;
     2.6  
     2.7 -val prems = goalw Fix.thy [INCL_def]
     2.8 -     "[| !!x.P(x) <-> Q(x) |] ==> INCL(%x.P(x)) <-> INCL(%x.Q(x))";
     2.9 -by (REPEAT (ares_tac ([refl] @ FOL_congs @ set_congs @ prems) 1));
    2.10 -val INCL_cong = result();
    2.11 -
    2.12 -val fix_congs = [INCL_cong] @ ccl_mk_congs Fix.thy ["napply"];
    2.13 -
    2.14  (*** Fixed Point Induction ***)
    2.15  
    2.16  val [base,step,incl] = goalw Fix.thy [INCL_def]
    2.17      "[| P(bot);  !!x.P(x) ==> P(f(x));  INCL(P) |] ==> P(fix(f))";
    2.18  br (incl RS spec RS mp) 1;
    2.19  by (rtac (Nat_ind RS ballI) 1 THEN atac 1);
    2.20 -by (ALLGOALS (SIMP_TAC term_ss));
    2.21 +by (ALLGOALS (simp_tac term_ss));
    2.22  by (REPEAT (ares_tac [base,step] 1));
    2.23  val fix_ind = result();
    2.24  
    2.25 @@ -48,7 +41,6 @@
    2.26  by (fast_tac (term_cs addIs ([incl RS inclD] @ prems)) 1);
    2.27  val inclE = result();
    2.28  
    2.29 -val fix_ss = term_ss addcongs fix_congs;
    2.30  
    2.31  (*** Lemmas for Inclusive Predicates ***)
    2.32  
    2.33 @@ -76,7 +68,7 @@
    2.34  val ball_INCL = result();
    2.35  
    2.36  goal Fix.thy "INCL(%x.a(x) = b(x)::'a::prog)";
    2.37 -by (SIMP_TAC (fix_ss addrews [eq_iff]) 1);
    2.38 +by (simp_tac (term_ss addsimps [eq_iff]) 1);
    2.39  by (REPEAT (resolve_tac [conj_INCL,po_INCL] 1));
    2.40  val eq_INCL = result();
    2.41  
    2.42 @@ -89,9 +81,9 @@
    2.43  val fix_idgenfp = result();
    2.44  
    2.45  goalw Fix.thy [idgen_def] "idgen(lam x.x) = lam x.x";
    2.46 -by (SIMP_TAC term_ss 1);
    2.47 +by (simp_tac term_ss 1);
    2.48  br (term_case RS allI) 1;
    2.49 -by (ALLGOALS (SIMP_TAC term_ss));
    2.50 +by (ALLGOALS (simp_tac term_ss));
    2.51  val id_idgenfp = result();
    2.52  
    2.53  (* All fixed points are lam-expressions *)
    2.54 @@ -106,12 +98,12 @@
    2.55  
    2.56  val prems = goalw Fix.thy [idgen_def] 
    2.57      "[| a = b;  a ` t = u |] ==> b ` t = u";
    2.58 -by (SIMP_TAC (term_ss addrews (prems RL [sym])) 1);
    2.59 +by (simp_tac (term_ss addsimps (prems RL [sym])) 1);
    2.60  val l_lemma= result();
    2.61  
    2.62  val idgen_lemmas =
    2.63      let fun mk_thm s = prove_goalw Fix.thy [idgen_def] s
    2.64 -           (fn [prem] => [rtac (prem RS l_lemma) 1,SIMP_TAC term_ss 1])
    2.65 +           (fn [prem] => [rtac (prem RS l_lemma) 1,simp_tac term_ss 1])
    2.66      in map mk_thm
    2.67            [    "idgen(d) = d ==> d ` bot = bot",
    2.68                 "idgen(d) = d ==> d ` true = true",
    2.69 @@ -141,7 +133,7 @@
    2.70  \      POgen({p.EX a b.p=<a,b> & (EX t.a=fix(idgen) ` t  & b = d ` t)})";
    2.71  by (REPEAT (step_tac term_cs 1));
    2.72  by (term_case_tac "t" 1);
    2.73 -by (ALLGOALS (SIMP_TAC (term_ss addrews (POgenXH::([prem,fix_idgenfp] RL idgen_lemmas)))));
    2.74 +by (ALLGOALS (simp_tac (term_ss addsimps (POgenXH::([prem,fix_idgenfp] RL idgen_lemmas)))));
    2.75  by (ALLGOALS (fast_tac set_cs));
    2.76  val lemma1 = result();
    2.77  
    2.78 @@ -157,7 +149,7 @@
    2.79  \      {p.EX a b.p=<a,b> & b = d ` a} <= POgen({p.EX a b.p=<a,b> & b = d ` a})";
    2.80  by (REPEAT (step_tac term_cs 1));
    2.81  by (term_case_tac "a" 1);
    2.82 -by (ALLGOALS (SIMP_TAC (term_ss addrews (POgenXH::([prem] RL idgen_lemmas)))));
    2.83 +by (ALLGOALS (simp_tac (term_ss addsimps (POgenXH::([prem] RL idgen_lemmas)))));
    2.84  by (ALLGOALS (fast_tac set_cs));
    2.85  val lemma2 = result();
    2.86  
    2.87 @@ -165,7 +157,7 @@
    2.88      "idgen(d) = d ==> lam x.x [= d";
    2.89  br (allI RS po_eta) 1;
    2.90  br (lemma2 RSN(2,po_coinduct)) 1;
    2.91 -by (SIMP_TAC term_ss 1);
    2.92 +by (simp_tac term_ss 1);
    2.93  by (ALLGOALS (fast_tac (term_cs addIs [prem,po_eta_lemma,fix_idgenfp])));
    2.94  val id_least_idgen = result();
    2.95  
    2.96 @@ -196,7 +188,7 @@
    2.97  brs prems 1;
    2.98  br (applyB RS ssubst )1;
    2.99  by (res_inst_tac [("t","xa")] term_case 1);
   2.100 -by (ALLGOALS (SIMP_TAC term_ss));
   2.101 +by (ALLGOALS (simp_tac term_ss));
   2.102  by (ALLGOALS (fast_tac (term_cs addIs ([all_INCL,INCL_subst] @ prems))));
   2.103  val term_ind = result();
   2.104  
     3.1 --- a/src/CCL/Hered.ML	Fri Sep 17 16:52:10 1993 +0200
     3.2 +++ b/src/CCL/Hered.ML	Mon Sep 20 17:02:11 1993 +0200
     3.3 @@ -10,8 +10,6 @@
     3.4  
     3.5  fun type_of_terms (Const("Trueprop",_) $ (Const("op =",(Type ("fun", [t,_])))$_$_)) = t;
     3.6  
     3.7 -val cong_rls = ccl_mk_congs Hered.thy  ["HTTgen"];
     3.8 -
     3.9  (*** Hereditary Termination ***)
    3.10  
    3.11  goalw Hered.thy [HTTgen_def]  "mono(%X.HTTgen(X))";
    3.12 @@ -54,16 +52,16 @@
    3.13  
    3.14  goal Hered.thy "lam x.f(x) : HTT <-> (ALL x. f(x) : HTT)";
    3.15  br (HTTXH RS iff_trans) 1;
    3.16 -by (SIMP_TAC term_ss 1);
    3.17 +by (simp_tac term_ss 1);
    3.18  by (safe_tac term_cs);
    3.19 -by (ASM_SIMP_TAC term_ss 1);
    3.20 +by (asm_simp_tac term_ss 1);
    3.21  by (fast_tac term_cs 1);
    3.22  val HTT_lam = result();
    3.23  
    3.24  local
    3.25    val raw_HTTrews = [HTT_bot,HTT_true,HTT_false,HTT_pair,HTT_lam];
    3.26    fun mk_thm s = prove_goalw Hered.thy data_defs s (fn _ => 
    3.27 -                  [SIMP_TAC (term_ss addrews raw_HTTrews) 1]);
    3.28 +                  [simp_tac (term_ss addsimps raw_HTTrews) 1]);
    3.29  in
    3.30    val HTT_rews = raw_HTTrews @
    3.31                 map mk_thm ["one : HTT",
    3.32 @@ -115,22 +113,22 @@
    3.33  (*** Formation Rules for Types ***)
    3.34  
    3.35  goal Hered.thy "Unit <= HTT";
    3.36 -by (SIMP_TAC (CCL_ss addrews ([subsetXH,UnitXH] @ HTT_rews)) 1);
    3.37 +by (simp_tac (CCL_ss addsimps ([subsetXH,UnitXH] @ HTT_rews)) 1);
    3.38  val UnitF = result();
    3.39  
    3.40  goal Hered.thy "Bool <= HTT";
    3.41 -by (SIMP_TAC (CCL_ss addrews ([subsetXH,BoolXH] @ HTT_rews)) 1);
    3.42 +by (simp_tac (CCL_ss addsimps ([subsetXH,BoolXH] @ HTT_rews)) 1);
    3.43  by (fast_tac (set_cs addIs HTT_Is @ (prems RL [subsetD])) 1);
    3.44  val BoolF = result();
    3.45  
    3.46  val prems = goal Hered.thy "[| A <= HTT;  B <= HTT |] ==> A + B  <= HTT";
    3.47 -by (SIMP_TAC (CCL_ss addrews ([subsetXH,PlusXH] @ HTT_rews)) 1);
    3.48 +by (simp_tac (CCL_ss addsimps ([subsetXH,PlusXH] @ HTT_rews)) 1);
    3.49  by (fast_tac (set_cs addIs HTT_Is @ (prems RL [subsetD])) 1);
    3.50  val PlusF = result();
    3.51  
    3.52  val prems = goal Hered.thy 
    3.53       "[| A <= HTT;  !!x.x:A ==> B(x) <= HTT |] ==> SUM x:A.B(x) <= HTT";
    3.54 -by (SIMP_TAC (CCL_ss addrews ([subsetXH,SgXH] @ HTT_rews)) 1);
    3.55 +by (simp_tac (CCL_ss addsimps ([subsetXH,SgXH] @ HTT_rews)) 1);
    3.56  by (fast_tac (set_cs addIs HTT_Is @ (prems RL [subsetD])) 1);
    3.57  val SigmaF = result();
    3.58  
    3.59 @@ -139,7 +137,7 @@
    3.60  
    3.61  (*Proof by induction - needs induction rule for type*)
    3.62  goal Hered.thy "Nat <= HTT";
    3.63 -by (SIMP_TAC (term_ss addrews [subsetXH]) 1);
    3.64 +by (simp_tac (term_ss addsimps [subsetXH]) 1);
    3.65  by (safe_tac set_cs);
    3.66  be Nat_ind 1;
    3.67  by (ALLGOALS (fast_tac (set_cs addIs HTT_Is @ (prems RL [subsetD]))));
    3.68 @@ -186,7 +184,7 @@
    3.69  bd (poXH RS iffD1) 1;
    3.70  by (safe_tac (set_cs addSEs [HTT_bot RS notE]));
    3.71  by (REPEAT_SOME (rtac (POgenXH RS iffD2) ORELSE' etac rev_mp));
    3.72 -by (ALLGOALS (SIMP_TAC (term_ss addrews HTT_rews)));
    3.73 +by (ALLGOALS (simp_tac (term_ss addsimps HTT_rews)));
    3.74  by (ALLGOALS (fast_tac ccl_cs));
    3.75  val HTT_po_op = result();
    3.76  
     4.1 --- a/src/CCL/Set.ML	Fri Sep 17 16:52:10 1993 +0200
     4.2 +++ b/src/CCL/Set.ML	Mon Sep 20 17:02:11 1993 +0200
     4.3 @@ -22,18 +22,13 @@
     4.4  by (resolve_tac (prems RL [mem_Collect_iff  RS iffD1]) 1);
     4.5  val CollectD = result();
     4.6  
     4.7 +val CollectE = make_elim CollectD;
     4.8 +
     4.9  val [prem] = goal Set.thy "[| !!x. x:A <-> x:B |] ==> A = B";
    4.10  by (rtac (set_extension RS iffD2) 1);
    4.11  by (rtac (prem RS allI) 1);
    4.12  val set_ext = result();
    4.13  
    4.14 -val prems = goal Set.thy "[| !!x. P(x) <-> Q(x) |] ==> {x. P(x)} = {x. Q(x)}";
    4.15 -by (REPEAT (ares_tac [set_ext,iffI,CollectI] 1 ORELSE
    4.16 -            eresolve_tac ([CollectD] RL (prems RL [iffD1,iffD2])) 1));
    4.17 -val Collect_cong = result();
    4.18 -
    4.19 -val CollectE = make_elim CollectD;
    4.20 -
    4.21  (*** Bounded quantifiers ***)
    4.22  
    4.23  val prems = goalw Set.thy [Ball_def]
     5.1 --- a/src/CCL/Term.ML	Fri Sep 17 16:52:10 1993 +0200
     5.2 +++ b/src/CCL/Term.ML	Mon Sep 20 17:02:11 1993 +0200
     5.3 @@ -19,15 +19,11 @@
     5.4  val data_defs = simp_defs @ ind_defs @ [napply_def];
     5.5  val genrec_defs = [letrec_def,letrec2_def,letrec3_def];
     5.6  
     5.7 -val term_congs = ccl_mk_congs Term.thy 
     5.8 -    ["inl","inr","succ","op .","split","if","when","ncase","nrec","lcase","lrec",
     5.9 -     "fst","snd","thd","let","letrec","letrec2","letrec3","napply"];
    5.10 -
    5.11  (*** Beta Rules, including strictness ***)
    5.12  
    5.13  goalw Term.thy [let_def] "~ t=bot--> let x be t in f(x) = f(t)";
    5.14  by (res_inst_tac [("t","t")] term_case 1);
    5.15 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
    5.16 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
    5.17  val letB = result() RS mp;
    5.18  
    5.19  goalw Term.thy [let_def] "let x be bot in f(x) = bot";
    5.20 @@ -36,11 +32,11 @@
    5.21  
    5.22  goalw Term.thy [let_def] "let x be t in bot = bot";
    5.23  brs ([caseBbot] RL [term_case]) 1;
    5.24 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
    5.25 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
    5.26  val letBbbot = result();
    5.27  
    5.28  goalw Term.thy [apply_def] "(lam x.b(x)) ` a = b(a)";
    5.29 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
    5.30 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
    5.31  val applyB = result();
    5.32  
    5.33  goalw Term.thy [apply_def] "bot ` a = bot";
    5.34 @@ -57,10 +53,16 @@
    5.35      resolve_tac [applyB RS ssubst] 1 THEN resolve_tac [refl] 1);
    5.36  val letrecB = result();
    5.37  
    5.38 -val rawBs = caseBs @ [applyB,applyBbot,letrecB];
    5.39 +val rawBs = caseBs @ [applyB,applyBbot];
    5.40  
    5.41  fun raw_mk_beta_rl defs s = prove_goalw Term.thy defs s
    5.42 -           (fn _ => [SIMP_TAC (CCL_ss addrews rawBs  addcongs term_congs) 1]);
    5.43 +           (fn _ => [rtac (letrecB RS ssubst) 1,
    5.44 +		     simp_tac (CCL_ss addsimps rawBs) 1]);
    5.45 +fun mk_beta_rl s = raw_mk_beta_rl data_defs s;
    5.46 +
    5.47 +fun raw_mk_beta_rl defs s = prove_goalw Term.thy defs s
    5.48 +           (fn _ => [simp_tac (CCL_ss addsimps rawBs 
    5.49 +			       setloop (rtac (letrecB RS ssubst))) 1]);
    5.50  fun mk_beta_rl s = raw_mk_beta_rl data_defs s;
    5.51  
    5.52  val ifBtrue    = mk_beta_rl "if true then t else u = t";
    5.53 @@ -114,8 +116,7 @@
    5.54  (*** Constructors are injective ***)
    5.55  
    5.56  val term_injs = map (mk_inj_rl Term.thy 
    5.57 -                             [applyB,splitB,whenBinl,whenBinr,ncaseBsucc,lcaseBcons] 
    5.58 -                             (ccl_congs @ term_congs))
    5.59 +		     [applyB,splitB,whenBinl,whenBinr,ncaseBsucc,lcaseBcons])
    5.60                 ["(inl(a) = inl(a')) <-> (a=a')",
    5.61                  "(inr(a) = inr(a')) <-> (a=a')",
    5.62                  "(succ(a) = succ(a')) <-> (a=a')",
    5.63 @@ -130,7 +131,7 @@
    5.64  
    5.65  local
    5.66    fun mk_thm s = prove_goalw Term.thy data_defs s (fn _ => 
    5.67 -                  [SIMP_TAC (ccl_ss addrews (ccl_porews)) 1]);
    5.68 +                  [simp_tac (ccl_ss addsimps (ccl_porews)) 1]);
    5.69  in
    5.70    val term_porews = map mk_thm ["inl(a) [= inl(a') <-> a [= a'",
    5.71                                  "inr(b) [= inr(b') <-> b [= b'",
    5.72 @@ -141,6 +142,7 @@
    5.73  (*** Rewriting and Proving ***)
    5.74  
    5.75  val term_rews = termBs @ term_injs @ term_dstncts @ ccl_porews @ term_porews;
    5.76 -val term_ss = ccl_ss addrews term_rews addcongs term_congs;
    5.77 +val term_ss = ccl_ss addsimps term_rews;
    5.78  
    5.79 -val term_cs = ccl_cs addSEs (term_dstncts RL [notE]) addSDs (XH_to_Ds term_injs);
    5.80 +val term_cs = ccl_cs addSEs (term_dstncts RL [notE]) 
    5.81 +                     addSDs (XH_to_Ds term_injs);
     6.1 --- a/src/CCL/Type.ML	Fri Sep 17 16:52:10 1993 +0200
     6.2 +++ b/src/CCL/Type.ML	Mon Sep 20 17:02:11 1993 +0200
     6.3 @@ -65,7 +65,7 @@
     6.4  fun mk_ncanT_tac thy defs top_crls crls s = prove_goalw thy defs s 
     6.5    (fn major::prems => [(resolve_tac ([major] RL top_crls) 1),
     6.6                         (REPEAT_SOME (eresolve_tac (crls @ [exE,bexE,conjE,disjE]))),
     6.7 -                       (ALLGOALS (ASM_SIMP_TAC term_ss)),
     6.8 +                       (ALLGOALS (asm_simp_tac term_ss)),
     6.9                         (ALLGOALS (ares_tac (prems RL [lemma]) ORELSE' 
    6.10                                    eresolve_tac [bspec])),
    6.11                         (safe_tac (ccl_cs addSIs prems))]);
    6.12 @@ -239,7 +239,7 @@
    6.13  
    6.14  fun mk_prec_tac inds s = prove_goal Type.thy s
    6.15       (fn major::prems => [resolve_tac ([major] RL inds) 1,
    6.16 -                          ALLGOALS (SIMP_TAC term_ss THEN'
    6.17 +                          ALLGOALS (simp_tac term_ss THEN'
    6.18                                      fast_tac (set_cs addSIs prems))]);
    6.19  val prec_tac = mk_prec_tac inds;
    6.20  
     7.1 --- a/src/CCL/Wfd.ML	Fri Sep 17 16:52:10 1993 +0200
     7.2 +++ b/src/CCL/Wfd.ML	Mon Sep 20 17:02:11 1993 +0200
     7.3 @@ -14,10 +14,6 @@
     7.4  
     7.5  (***********)
     7.6  
     7.7 -val wfd_congs = mk_congs Wfd.thy ["Wfd","wf","op **","wmap","ListPR"];
     7.8 -
     7.9 -(***********)
    7.10 -
    7.11  val [major,prem] = goalw Wfd.thy [Wfd_def]
    7.12      "[| Wfd(R);       \
    7.13  \       !!x.[| ALL y. <y,x>: R --> P(y) |] ==> P(x) |]  ==>  \
    7.14 @@ -149,17 +145,17 @@
    7.15  
    7.16  val prems = goal Wfd.thy "<xa,ya> : r ==> <<xa,xb>,<ya,yb>> : wmap(fst,r)";
    7.17  br wmapI 1;
    7.18 -by (SIMP_TAC (term_ss addrews prems) 1);
    7.19 +by (simp_tac (term_ss addsimps prems) 1);
    7.20  val wfstI = result();
    7.21  
    7.22  val prems = goal Wfd.thy "<xb,yb> : r ==> <<xa,xb>,<ya,yb>> : wmap(snd,r)";
    7.23  br wmapI 1;
    7.24 -by (SIMP_TAC (term_ss addrews prems) 1);
    7.25 +by (simp_tac (term_ss addsimps prems) 1);
    7.26  val wsndI = result();
    7.27  
    7.28  val prems = goal Wfd.thy "<xc,yc> : r ==> <<xa,<xb,xc>>,<ya,<yb,yc>>> : wmap(thd,r)";
    7.29  br wmapI 1;
    7.30 -by (SIMP_TAC (term_ss addrews prems) 1);
    7.31 +by (simp_tac (term_ss addsimps prems) 1);
    7.32  val wthdI = result();
    7.33  
    7.34  (*** Ground well-founded relations ***)
    7.35 @@ -175,7 +171,7 @@
    7.36  
    7.37  val prems = goalw Wfd.thy [wf_def] "Wfd(wf(R))";
    7.38  by (res_inst_tac [("Q","Wfd(R)")] (excluded_middle RS disjE) 1);
    7.39 -by (ALLGOALS (ASM_SIMP_TAC (CCL_ss addcongs wfd_congs)));
    7.40 +by (ALLGOALS (asm_simp_tac CCL_ss));
    7.41  br Empty_wf 1;
    7.42  val wf_wf = result();
    7.43  
     8.1 --- a/src/CCL/ccl.ML	Fri Sep 17 16:52:10 1993 +0200
     8.2 +++ b/src/CCL/ccl.ML	Mon Sep 20 17:02:11 1993 +0200
     8.3 @@ -10,30 +10,10 @@
     8.4  
     8.5  val ccl_data_defs = [apply_def,fix_def];
     8.6  
     8.7 -(*** Simplifier for pre-order and equality ***)
     8.8 -
     8.9 -structure CCL_SimpData : SIMP_DATA =
    8.10 -  struct
    8.11 -  val refl_thms		= [refl, po_refl, iff_refl]
    8.12 -  val trans_thms	= [trans, iff_trans, po_trans]
    8.13 -  val red1		= iffD1
    8.14 -  val red2		= iffD2
    8.15 -  val mk_rew_rules	= mk_rew_rules
    8.16 -  val case_splits	= []         (*NO IF'S!*)
    8.17 -  val norm_thms		= norm_thms
    8.18 -  val subst_thms	= [subst];
    8.19 -  val dest_red		= dest_red
    8.20 -  end;
    8.21 -
    8.22 -structure CCL_Simp = SimpFun(CCL_SimpData);
    8.23 -open CCL_Simp;
    8.24 -
    8.25 -val auto_ss = empty_ss setauto (fn hyps => ares_tac (TrueI::hyps));
    8.26 -
    8.27  val po_refl_iff_T = make_iff_T po_refl;
    8.28  
    8.29 -val CCL_ss = auto_ss addcongs (FOL_congs @ set_congs)
    8.30 -                     addrews  ([po_refl_iff_T] @ FOL_rews @ mem_rews);
    8.31 +val CCL_ss = FOL_ss addcongs set_congs
    8.32 +                    addsimps  ([po_refl_iff_T] @ mem_rews);
    8.33  
    8.34  (*** Congruence Rules ***)
    8.35  
    8.36 @@ -46,7 +26,7 @@
    8.37   (fn [prem] => [rtac (prem RS subst) 1, rtac refl 1]);
    8.38  
    8.39  goal CCL.thy  "(ALL x. f(x) = g(x)) --> (%x.f(x)) = (%x.g(x))";
    8.40 -by (SIMP_TAC (CCL_ss addrews [eq_iff]) 1);
    8.41 +by (simp_tac (CCL_ss addsimps [eq_iff]) 1);
    8.42  by (fast_tac (set_cs addIs [po_abstractn]) 1);
    8.43  val abstractn = standard (allI RS (result() RS mp));
    8.44  
    8.45 @@ -61,11 +41,6 @@
    8.46     in do_prems 1 (prems_of thm) thm
    8.47     end;
    8.48  
    8.49 -fun ccl_mk_congs thy cs = map abs_prems (mk_congs thy cs); 
    8.50 -
    8.51 -val ccl_congs = ccl_mk_congs CCL.thy 
    8.52 - ["op [=","SIM","POgen","EQgen","pair","lambda","case","op `","fix"];
    8.53 -
    8.54  val caseBs = [caseBtrue,caseBfalse,caseBpair,caseBlam,caseBbot];
    8.55  
    8.56  (*** Termination and Divergence ***)
    8.57 @@ -85,17 +60,16 @@
    8.58  by  (REPEAT (SOMEGOAL (ares_tac (prems@[box_equals]))));
    8.59  val eq_lemma = result();
    8.60  
    8.61 -fun mk_inj_rl thy rews congs s = 
    8.62 +fun mk_inj_rl thy rews s = 
    8.63        let fun mk_inj_lemmas r = ([arg_cong] RL [(r RS (r RS eq_lemma))]);
    8.64            val inj_lemmas = flat (map mk_inj_lemmas rews);
    8.65            val tac = REPEAT (ares_tac [iffI,allI,conjI] 1 ORELSE
    8.66                              eresolve_tac inj_lemmas 1 ORELSE
    8.67 -                            ASM_SIMP_TAC (CCL_ss addrews rews 
    8.68 -                                                 addcongs congs) 1)
    8.69 +                            asm_simp_tac (CCL_ss addsimps rews) 1)
    8.70        in prove_goal thy s (fn _ => [tac])
    8.71        end;
    8.72  
    8.73 -val ccl_injs = map (mk_inj_rl CCL.thy caseBs ccl_congs)
    8.74 +val ccl_injs = map (mk_inj_rl CCL.thy caseBs)
    8.75                 ["<a,b> = <a',b'> <-> (a=a' & b=b')",
    8.76                  "(lam x.b(x) = lam x.b'(x)) <-> ((ALL z.b(z)=b'(z)))"];
    8.77  
    8.78 @@ -124,7 +98,7 @@
    8.79    fun mk_thm_str thy a b = "~ " ^ (saturate thy a "a") ^ " = " ^ (saturate thy b "b");
    8.80  
    8.81    val lemma = prove_goal CCL.thy "t=t' --> case(t,b,c,d,e) = case(t',b,c,d,e)"
    8.82 -                   (fn _ => [SIMP_TAC (CCL_ss addcongs ccl_congs) 1]) RS mp;
    8.83 +                   (fn _ => [simp_tac CCL_ss 1]) RS mp;
    8.84    fun mk_lemma (ra,rb) = [lemma] RL [ra RS (rb RS eq_lemma)] RL 
    8.85                             [distinctness RS notE,sym RS (distinctness RS notE)];
    8.86  in
    8.87 @@ -143,7 +117,7 @@
    8.88  
    8.89  fun mk_dstnct_thms thy defs inj_rls xs = 
    8.90            let fun mk_dstnct_thm rls s = prove_goalw thy defs s 
    8.91 -                               (fn _ => [SIMP_TAC (CCL_ss addrews (rls@inj_rls)) 1])
    8.92 +                               (fn _ => [simp_tac (CCL_ss addsimps (rls@inj_rls)) 1])
    8.93            in map (mk_dstnct_thm ccl_dstncts) (mk_dstnct_rls thy xs) end;
    8.94  
    8.95  fun mkall_dstnct_thms thy defs i_rls xss = flat (map (mk_dstnct_thms thy defs i_rls) xss);
    8.96 @@ -158,7 +132,7 @@
    8.97  val XH_to_Es = map XH_to_E;
    8.98  
    8.99  val ccl_rews = caseBs @ ccl_injs @ ccl_dstncts;
   8.100 -val ccl_ss = CCL_ss addrews ccl_rews addcongs ccl_congs;
   8.101 +val ccl_ss = CCL_ss addsimps ccl_rews;
   8.102  
   8.103  val ccl_cs = set_cs addSEs (pair_inject::(ccl_dstncts RL [notE])) 
   8.104                      addSDs (XH_to_Ds ccl_injs);
   8.105 @@ -179,7 +153,7 @@
   8.106  br monoI 1;
   8.107  by (safe_tac ccl_cs);
   8.108  by (REPEAT_SOME (resolve_tac [exI,conjI,refl]));
   8.109 -by (ALLGOALS (SIMP_TAC ccl_ss));
   8.110 +by (ALLGOALS (simp_tac ccl_ss));
   8.111  by (ALLGOALS (fast_tac set_cs));
   8.112  val POgen_mono = result();
   8.113  
   8.114 @@ -194,7 +168,7 @@
   8.115    "t [= t' <-> t=bot | (t=true & t'=true) | (t=false & t'=false) | \
   8.116  \                    (EX a a' b b'.t=<a,b> &  t'=<a',b'>  & a [= a' & b [= b') | \
   8.117  \                    (EX f f'.t=lam x.f(x) &  t'=lam x.f'(x) & (ALL x.f(x) [= f'(x)))";
   8.118 -by (SIMP_TAC (ccl_ss addrews [PO_iff]) 1);
   8.119 +by (simp_tac (ccl_ss addsimps [PO_iff]) 1);
   8.120  br (rewrite_rule [POgen_def,SIM_def] 
   8.121                   (POgen_mono RS (PO_def RS def_gfp_Tarski) RS XHlemma1)) 1;
   8.122  br (iff_refl RS XHlemma2) 1;
   8.123 @@ -202,27 +176,27 @@
   8.124  
   8.125  goal CCL.thy "bot [= b";
   8.126  br (poXH RS iffD2) 1;
   8.127 -by (SIMP_TAC ccl_ss 1);
   8.128 +by (simp_tac ccl_ss 1);
   8.129  val po_bot = result();
   8.130  
   8.131  goal CCL.thy "a [= bot --> a=bot";
   8.132  br impI 1;
   8.133  bd (poXH RS iffD1) 1;
   8.134  be rev_mp 1;
   8.135 -by (SIMP_TAC ccl_ss 1);
   8.136 +by (simp_tac ccl_ss 1);
   8.137  val bot_poleast = result() RS mp;
   8.138  
   8.139  goal CCL.thy "<a,b> [= <a',b'> <->  a [= a' & b [= b'";
   8.140  br (poXH RS iff_trans) 1;
   8.141 -by (SIMP_TAC ccl_ss 1);
   8.142 +by (simp_tac ccl_ss 1);
   8.143  by (fast_tac ccl_cs 1);
   8.144  val po_pair = result();
   8.145  
   8.146  goal CCL.thy "lam x.f(x) [= lam x.f'(x) <-> (ALL x. f(x) [= f'(x))";
   8.147  br (poXH RS iff_trans) 1;
   8.148 -by (SIMP_TAC ccl_ss 1);
   8.149 +by (simp_tac ccl_ss 1);
   8.150  by (REPEAT (ares_tac [iffI,allI] 1 ORELSE eresolve_tac [exE,conjE] 1));
   8.151 -by (ASM_SIMP_TAC ccl_ss 1);
   8.152 +by (asm_simp_tac ccl_ss 1);
   8.153  by (fast_tac ccl_cs 1);
   8.154  val po_lam = result();
   8.155  
   8.156 @@ -275,7 +249,7 @@
   8.157  
   8.158  fun mk_thm s = prove_goal CCL.thy s (fn _ => 
   8.159                            [rtac notI 1,dtac case_pocong 1,etac rev_mp 5,
   8.160 -                           ALLGOALS (SIMP_TAC ccl_ss),
   8.161 +                           ALLGOALS (simp_tac ccl_ss),
   8.162                             REPEAT (resolve_tac [po_refl,npo_lam_bot] 1)]);
   8.163  
   8.164  val npo_rls = [npo_pair_lam,npo_lam_pair] @ map mk_thm
   8.165 @@ -300,7 +274,7 @@
   8.166  br monoI 1;
   8.167  by (safe_tac set_cs);
   8.168  by (REPEAT_SOME (resolve_tac [exI,conjI,refl]));
   8.169 -by (ALLGOALS (SIMP_TAC ccl_ss));
   8.170 +by (ALLGOALS (simp_tac ccl_ss));
   8.171  by (ALLGOALS (fast_tac set_cs));
   8.172  val EQgen_mono = result();
   8.173  
   8.174 @@ -321,7 +295,7 @@
   8.175  \             (EX a a' b b'.t=<a,b> &  t'=<a',b'>  & <a,a'> : EQ & <b,b'> : EQ) | \
   8.176  \             (EX f f'.t=lam x.f(x) &  t'=lam x.f'(x) & (ALL x.<f(x),f'(x)> : EQ))" 1);
   8.177  be rev_mp 1;
   8.178 -by (SIMP_TAC (CCL_ss addrews [EQ_iff RS iff_sym]) 1);
   8.179 +by (simp_tac (CCL_ss addsimps [EQ_iff RS iff_sym]) 1);
   8.180  br (rewrite_rule [EQgen_def,SIM_def]
   8.181                   (EQgen_mono RS (EQ_def RS def_gfp_Tarski) RS XHlemma1)) 1;
   8.182  br (iff_refl RS XHlemma2) 1;
   8.183 @@ -345,7 +319,7 @@
   8.184  
   8.185  goalw CCL.thy [apply_def]  "(EX f.t=lam x.f(x)) --> t = lam x.(t ` x)";
   8.186  by (safe_tac ccl_cs);
   8.187 -by (SIMP_TAC ccl_ss 1);
   8.188 +by (simp_tac ccl_ss 1);
   8.189  val cond_eta = result() RS mp;
   8.190  
   8.191  goal CCL.thy "(t=bot) | (t=true) | (t=false) | (EX a b.t=<a,b>) | (EX f.t=lam x.f(x))";
     9.1 --- a/src/CCL/coinduction.ML	Fri Sep 17 16:52:10 1993 +0200
     9.2 +++ b/src/CCL/coinduction.ML	Mon Sep 20 17:02:11 1993 +0200
     9.3 @@ -12,11 +12,11 @@
     9.4  val lfpI = result();
     9.5  
     9.6  val prems = goal CCL.thy "[| a=a';  a' : A |] ==> a : A";
     9.7 -by (SIMP_TAC (term_ss addrews prems) 1);
     9.8 +by (simp_tac (term_ss addsimps prems) 1);
     9.9  val ssubst_single = result();
    9.10  
    9.11  val prems = goal CCL.thy "[| a=a';  b=b';  <a',b'> : A |] ==> <a,b> : A";
    9.12 -by (SIMP_TAC (term_ss addrews prems) 1);
    9.13 +by (simp_tac (term_ss addsimps prems) 1);
    9.14  val ssubst_pair = result();
    9.15  
    9.16  (***)
    9.17 @@ -33,7 +33,7 @@
    9.18  
    9.19  fun mk_genIs thy defs genXH gen_mono s = prove_goalw thy defs s 
    9.20        (fn prems => [rtac (genXH RS iffD2) 1,
    9.21 -                    (SIMP_TAC term_ss 1),
    9.22 +                    (simp_tac term_ss 1),
    9.23                      TRY (fast_tac (term_cs addIs 
    9.24                              ([genXH RS iffD2,gen_mono RS coinduct3_mono_lemma RS lfpI]
    9.25                               @ prems)) 1)]);
    9.26 @@ -75,20 +75,20 @@
    9.27  val EQ_refl = result();
    9.28  
    9.29  val EQgenIs = map (mk_genIs Term.thy data_defs EQgenXH EQgen_mono)
    9.30 -      ["<true,true> : EQgen(R)",
    9.31 -       "<false,false> : EQgen(R)",
    9.32 -       "[| <a,a'> : R;  <b,b'> : R |] ==> <<a,b>,<a',b'>> : EQgen(R)",
    9.33 -       "[|!!x. <b(x),b'(x)> : R |] ==> <lam x.b(x),lam x.b'(x)> : EQgen(R)",
    9.34 -       "<one,one> : EQgen(R)",
    9.35 -       "<a,a'> : lfp(%x. EQgen(x) Un R Un EQ) ==> \
    9.36 -\                         <inl(a),inl(a')> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.37 -       "<b,b'> : lfp(%x. EQgen(x) Un R Un EQ) ==> \
    9.38 -\                         <inr(b),inr(b')> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.39 -       "<zero,zero> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.40 -       "<n,n'> : lfp(%x. EQgen(x) Un R Un EQ) ==> \
    9.41 -\                         <succ(n),succ(n')> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.42 -       "<[],[]> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.43 -       "[| <h,h'> : lfp(%x. EQgen(x) Un R Un EQ); \
    9.44 +["<true,true> : EQgen(R)",
    9.45 + "<false,false> : EQgen(R)",
    9.46 + "[| <a,a'> : R;  <b,b'> : R |] ==> <<a,b>,<a',b'>> : EQgen(R)",
    9.47 + "[|!!x. <b(x),b'(x)> : R |] ==> <lam x.b(x),lam x.b'(x)> : EQgen(R)",
    9.48 + "<one,one> : EQgen(R)",
    9.49 + "<a,a'> : lfp(%x. EQgen(x) Un R Un EQ) ==> \
    9.50 +\                   <inl(a),inl(a')> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.51 + "<b,b'> : lfp(%x. EQgen(x) Un R Un EQ) ==> \
    9.52 +\                   <inr(b),inr(b')> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.53 + "<zero,zero> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.54 + "<n,n'> : lfp(%x. EQgen(x) Un R Un EQ) ==> \
    9.55 +\                   <succ(n),succ(n')> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.56 + "<[],[]> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))",
    9.57 + "[| <h,h'> : lfp(%x. EQgen(x) Un R Un EQ); \
    9.58  \          <t,t'> : lfp(%x. EQgen(x) Un R Un EQ) |] ==> \
    9.59  \       <h.t,h'.t'> : EQgen(lfp(%x. EQgen(x) Un R Un EQ))"];
    9.60  
    9.61 @@ -101,7 +101,8 @@
    9.62  (*      rews are rewrite rules that would cause looping in the simpifier              *)
    9.63  
    9.64  fun EQgen_tac simp_set rews i = 
    9.65 -       SELECT_GOAL (TRY (safe_tac ccl_cs) THEN
    9.66 -                    resolve_tac ((rews@[refl]) RL ((rews@[refl]) RL [ssubst_pair])) i THEN
    9.67 -                    ALLGOALS (SIMP_TAC simp_set) THEN
    9.68 -                    ALLGOALS EQgen_raw_tac) i;
    9.69 + SELECT_GOAL 
    9.70 +   (TRY (safe_tac ccl_cs) THEN
    9.71 +    resolve_tac ((rews@[refl]) RL ((rews@[refl]) RL [ssubst_pair])) i THEN
    9.72 +    ALLGOALS (simp_tac simp_set) THEN
    9.73 +    ALLGOALS EQgen_raw_tac) i;
    10.1 --- a/src/CCL/ex/List.ML	Fri Sep 17 16:52:10 1993 +0200
    10.2 +++ b/src/CCL/ex/List.ML	Mon Sep 20 17:02:11 1993 +0200
    10.3 @@ -13,7 +13,7 @@
    10.4  
    10.5  (****)
    10.6  
    10.7 -val listBs = map (fn s=>prove_goalw List.thy list_defs s (fn _ => [SIMP_TAC term_ss 1]))
    10.8 +val listBs = map (fn s=>prove_goalw List.thy list_defs s (fn _ => [simp_tac term_ss 1]))
    10.9       ["(f o g) = (%a.f(g(a)))",
   10.10        "(f o g)(a) = f(g(a))",
   10.11        "map(f,[]) = []",
   10.12 @@ -27,20 +27,18 @@
   10.13        "insert(f,a,[]) = a.[]",
   10.14        "insert(f,a,x.xs) = if f`a`x then a.x.xs else x.insert(f,a,xs)"];
   10.15  
   10.16 -val list_congs = ccl_mk_congs List.thy ["map","op @","filter","flat","insert","napply"];
   10.17 -
   10.18 -val list_ss = nat_ss addrews listBs addcongs list_congs;
   10.19 +val list_ss = nat_ss addsimps listBs;
   10.20  
   10.21  (****)
   10.22  
   10.23  val [prem] = goal List.thy "n:Nat ==> map(f) ^ n ` [] = []";
   10.24  br (prem RS Nat_ind) 1;
   10.25 -by (ALLGOALS (ASM_SIMP_TAC list_ss));
   10.26 +by (ALLGOALS (asm_simp_tac list_ss));
   10.27  val nmapBnil = result();
   10.28  
   10.29  val [prem] = goal List.thy "n:Nat ==> map(f)^n`(x.xs) = f^n`x.map(f)^n`xs";
   10.30  br (prem RS Nat_ind) 1;
   10.31 -by (ALLGOALS (ASM_SIMP_TAC list_ss));
   10.32 +by (ALLGOALS (asm_simp_tac list_ss));
   10.33  val nmapBcons = result();
   10.34  
   10.35  (***)
    11.1 --- a/src/CCL/ex/Nat.ML	Fri Sep 17 16:52:10 1993 +0200
    11.2 +++ b/src/CCL/ex/Nat.ML	Mon Sep 20 17:02:11 1993 +0200
    11.3 @@ -10,7 +10,7 @@
    11.4  
    11.5  val nat_defs = [not_def,add_def,mult_def,sub_def,le_def,lt_def,ack_def,napply_def];
    11.6  
    11.7 -val natBs = map (fn s=>prove_goalw Nat.thy nat_defs s (fn _ => [SIMP_TAC term_ss 1]))
    11.8 +val natBs = map (fn s=>prove_goalw Nat.thy nat_defs s (fn _ => [simp_tac term_ss 1]))
    11.9       ["not(true) = false",
   11.10        "not(false) = true",
   11.11        "zero #+ n = n",
   11.12 @@ -20,16 +20,13 @@
   11.13        "f^zero`a = a",
   11.14        "f^succ(n)`a = f(f^n`a)"];
   11.15  
   11.16 -val nat_congs  = ccl_mk_congs Nat.thy ["not","op #+","op #*","op #-","op ##",
   11.17 -                                     "op #<","op #<=","ackermann","napply"];
   11.18 -
   11.19 -val nat_ss = term_ss addrews natBs addcongs nat_congs;
   11.20 +val nat_ss = term_ss addsimps natBs;
   11.21  
   11.22  (*** Lemma for napply ***)
   11.23  
   11.24  val [prem] = goal Nat.thy "n:Nat ==> f^n`f(a) = f^succ(n)`a";
   11.25  br (prem RS Nat_ind) 1;
   11.26 -by (ALLGOALS (ASM_SIMP_TAC (nat_ss addcongs [read_instantiate [("f","f")] arg_cong])));
   11.27 +by (ALLGOALS (asm_simp_tac nat_ss));
   11.28  val napply_f = result();
   11.29  
   11.30  (****)
    12.1 --- a/src/CCL/ex/Stream.ML	Fri Sep 17 16:52:10 1993 +0200
    12.2 +++ b/src/CCL/ex/Stream.ML	Mon Sep 20 17:02:11 1993 +0200
    12.3 @@ -21,7 +21,7 @@
    12.4  by (safe_tac type_cs);
    12.5  be (XH_to_E ListsXH) 1;
    12.6  by (EQgen_tac list_ss [] 1);
    12.7 -by (SIMP_TAC list_ss 1);
    12.8 +by (simp_tac list_ss 1);
    12.9  by (fast_tac ccl_cs 1);
   12.10  val map_comp = result();
   12.11  
   12.12 @@ -87,7 +87,7 @@
   12.13  
   12.14  goalw Stream.thy [iter1_def] "iter1(f,a) = a.iter1(f,f(a))";
   12.15  br (letrecB RS trans) 1;
   12.16 -by (SIMP_TAC term_ss 1);
   12.17 +by (simp_tac term_ss 1);
   12.18  val iter1B = result();
   12.19  
   12.20  goalw Stream.thy [iter2_def] "iter2(f,a) = a . map(f,iter2(f,a))";
   12.21 @@ -98,14 +98,17 @@
   12.22  val [prem] =goal Stream.thy
   12.23     "n:Nat ==> map(f) ^ n ` iter2(f,a) = f ^ n ` a . map(f) ^ n ` map(f,iter2(f,a))";
   12.24  br (iter2B RS ssubst) 1;back();back();
   12.25 -by (SIMP_TAC (list_ss addrews [prem RS nmapBcons]) 1);
   12.26 +by (simp_tac (list_ss addsimps [prem RS nmapBcons]) 1);
   12.27  val iter2Blemma = result();
   12.28  
   12.29  goal Stream.thy "iter1(f,a) = iter2(f,a)";
   12.30  by (eq_coinduct3_tac 
   12.31 -    "{p. EX x y.p=<x,y> & (EX n:Nat.x=iter1(f,f^n`a) & y=map(f)^n`iter2(f,a))}" 1);
   12.32 -by (fast_tac (type_cs addSIs [napplyBzero RS sym,napplyBzero RS sym RS arg_cong]) 1);
   12.33 +    "{p. EX x y.p=<x,y> & (EX n:Nat.x=iter1(f,f^n`a) & y=map(f)^n`iter2(f,a))}"
   12.34 +    1);
   12.35 +by (fast_tac (type_cs addSIs [napplyBzero RS sym,
   12.36 +			      napplyBzero RS sym RS arg_cong]) 1);
   12.37  by (EQgen_tac list_ss [iter1B,iter2Blemma] 1);
   12.38 +by (assume_tac 1);   (*should EQgen_tac call asm_simp_tac?*)
   12.39  by (rtac (napply_f RS ssubst) 1 THEN atac 1);
   12.40  by (res_inst_tac [("f1","f")] (napplyBsucc RS subst) 1);
   12.41  by (fast_tac type_cs 1);
    13.1 --- a/src/CCL/ex/list.ML	Fri Sep 17 16:52:10 1993 +0200
    13.2 +++ b/src/CCL/ex/list.ML	Mon Sep 20 17:02:11 1993 +0200
    13.3 @@ -13,7 +13,7 @@
    13.4  
    13.5  (****)
    13.6  
    13.7 -val listBs = map (fn s=>prove_goalw List.thy list_defs s (fn _ => [SIMP_TAC term_ss 1]))
    13.8 +val listBs = map (fn s=>prove_goalw List.thy list_defs s (fn _ => [simp_tac term_ss 1]))
    13.9       ["(f o g) = (%a.f(g(a)))",
   13.10        "(f o g)(a) = f(g(a))",
   13.11        "map(f,[]) = []",
   13.12 @@ -27,20 +27,18 @@
   13.13        "insert(f,a,[]) = a.[]",
   13.14        "insert(f,a,x.xs) = if f`a`x then a.x.xs else x.insert(f,a,xs)"];
   13.15  
   13.16 -val list_congs = ccl_mk_congs List.thy ["map","op @","filter","flat","insert","napply"];
   13.17 -
   13.18 -val list_ss = nat_ss addrews listBs addcongs list_congs;
   13.19 +val list_ss = nat_ss addsimps listBs;
   13.20  
   13.21  (****)
   13.22  
   13.23  val [prem] = goal List.thy "n:Nat ==> map(f) ^ n ` [] = []";
   13.24  br (prem RS Nat_ind) 1;
   13.25 -by (ALLGOALS (ASM_SIMP_TAC list_ss));
   13.26 +by (ALLGOALS (asm_simp_tac list_ss));
   13.27  val nmapBnil = result();
   13.28  
   13.29  val [prem] = goal List.thy "n:Nat ==> map(f)^n`(x.xs) = f^n`x.map(f)^n`xs";
   13.30  br (prem RS Nat_ind) 1;
   13.31 -by (ALLGOALS (ASM_SIMP_TAC list_ss));
   13.32 +by (ALLGOALS (asm_simp_tac list_ss));
   13.33  val nmapBcons = result();
   13.34  
   13.35  (***)
    14.1 --- a/src/CCL/ex/nat.ML	Fri Sep 17 16:52:10 1993 +0200
    14.2 +++ b/src/CCL/ex/nat.ML	Mon Sep 20 17:02:11 1993 +0200
    14.3 @@ -10,7 +10,7 @@
    14.4  
    14.5  val nat_defs = [not_def,add_def,mult_def,sub_def,le_def,lt_def,ack_def,napply_def];
    14.6  
    14.7 -val natBs = map (fn s=>prove_goalw Nat.thy nat_defs s (fn _ => [SIMP_TAC term_ss 1]))
    14.8 +val natBs = map (fn s=>prove_goalw Nat.thy nat_defs s (fn _ => [simp_tac term_ss 1]))
    14.9       ["not(true) = false",
   14.10        "not(false) = true",
   14.11        "zero #+ n = n",
   14.12 @@ -20,16 +20,13 @@
   14.13        "f^zero`a = a",
   14.14        "f^succ(n)`a = f(f^n`a)"];
   14.15  
   14.16 -val nat_congs  = ccl_mk_congs Nat.thy ["not","op #+","op #*","op #-","op ##",
   14.17 -                                     "op #<","op #<=","ackermann","napply"];
   14.18 -
   14.19 -val nat_ss = term_ss addrews natBs addcongs nat_congs;
   14.20 +val nat_ss = term_ss addsimps natBs;
   14.21  
   14.22  (*** Lemma for napply ***)
   14.23  
   14.24  val [prem] = goal Nat.thy "n:Nat ==> f^n`f(a) = f^succ(n)`a";
   14.25  br (prem RS Nat_ind) 1;
   14.26 -by (ALLGOALS (ASM_SIMP_TAC (nat_ss addcongs [read_instantiate [("f","f")] arg_cong])));
   14.27 +by (ALLGOALS (asm_simp_tac nat_ss));
   14.28  val napply_f = result();
   14.29  
   14.30  (****)
    15.1 --- a/src/CCL/ex/stream.ML	Fri Sep 17 16:52:10 1993 +0200
    15.2 +++ b/src/CCL/ex/stream.ML	Mon Sep 20 17:02:11 1993 +0200
    15.3 @@ -21,7 +21,7 @@
    15.4  by (safe_tac type_cs);
    15.5  be (XH_to_E ListsXH) 1;
    15.6  by (EQgen_tac list_ss [] 1);
    15.7 -by (SIMP_TAC list_ss 1);
    15.8 +by (simp_tac list_ss 1);
    15.9  by (fast_tac ccl_cs 1);
   15.10  val map_comp = result();
   15.11  
   15.12 @@ -87,7 +87,7 @@
   15.13  
   15.14  goalw Stream.thy [iter1_def] "iter1(f,a) = a.iter1(f,f(a))";
   15.15  br (letrecB RS trans) 1;
   15.16 -by (SIMP_TAC term_ss 1);
   15.17 +by (simp_tac term_ss 1);
   15.18  val iter1B = result();
   15.19  
   15.20  goalw Stream.thy [iter2_def] "iter2(f,a) = a . map(f,iter2(f,a))";
   15.21 @@ -98,14 +98,17 @@
   15.22  val [prem] =goal Stream.thy
   15.23     "n:Nat ==> map(f) ^ n ` iter2(f,a) = f ^ n ` a . map(f) ^ n ` map(f,iter2(f,a))";
   15.24  br (iter2B RS ssubst) 1;back();back();
   15.25 -by (SIMP_TAC (list_ss addrews [prem RS nmapBcons]) 1);
   15.26 +by (simp_tac (list_ss addsimps [prem RS nmapBcons]) 1);
   15.27  val iter2Blemma = result();
   15.28  
   15.29  goal Stream.thy "iter1(f,a) = iter2(f,a)";
   15.30  by (eq_coinduct3_tac 
   15.31 -    "{p. EX x y.p=<x,y> & (EX n:Nat.x=iter1(f,f^n`a) & y=map(f)^n`iter2(f,a))}" 1);
   15.32 -by (fast_tac (type_cs addSIs [napplyBzero RS sym,napplyBzero RS sym RS arg_cong]) 1);
   15.33 +    "{p. EX x y.p=<x,y> & (EX n:Nat.x=iter1(f,f^n`a) & y=map(f)^n`iter2(f,a))}"
   15.34 +    1);
   15.35 +by (fast_tac (type_cs addSIs [napplyBzero RS sym,
   15.36 +			      napplyBzero RS sym RS arg_cong]) 1);
   15.37  by (EQgen_tac list_ss [iter1B,iter2Blemma] 1);
   15.38 +by (assume_tac 1);   (*should EQgen_tac call asm_simp_tac?*)
   15.39  by (rtac (napply_f RS ssubst) 1 THEN atac 1);
   15.40  by (res_inst_tac [("f1","f")] (napplyBsucc RS subst) 1);
   15.41  by (fast_tac type_cs 1);
    16.1 --- a/src/CCL/fix.ML	Fri Sep 17 16:52:10 1993 +0200
    16.2 +++ b/src/CCL/fix.ML	Mon Sep 20 17:02:11 1993 +0200
    16.3 @@ -8,20 +8,13 @@
    16.4  
    16.5  open Fix;
    16.6  
    16.7 -val prems = goalw Fix.thy [INCL_def]
    16.8 -     "[| !!x.P(x) <-> Q(x) |] ==> INCL(%x.P(x)) <-> INCL(%x.Q(x))";
    16.9 -by (REPEAT (ares_tac ([refl] @ FOL_congs @ set_congs @ prems) 1));
   16.10 -val INCL_cong = result();
   16.11 -
   16.12 -val fix_congs = [INCL_cong] @ ccl_mk_congs Fix.thy ["napply"];
   16.13 -
   16.14  (*** Fixed Point Induction ***)
   16.15  
   16.16  val [base,step,incl] = goalw Fix.thy [INCL_def]
   16.17      "[| P(bot);  !!x.P(x) ==> P(f(x));  INCL(P) |] ==> P(fix(f))";
   16.18  br (incl RS spec RS mp) 1;
   16.19  by (rtac (Nat_ind RS ballI) 1 THEN atac 1);
   16.20 -by (ALLGOALS (SIMP_TAC term_ss));
   16.21 +by (ALLGOALS (simp_tac term_ss));
   16.22  by (REPEAT (ares_tac [base,step] 1));
   16.23  val fix_ind = result();
   16.24  
   16.25 @@ -48,7 +41,6 @@
   16.26  by (fast_tac (term_cs addIs ([incl RS inclD] @ prems)) 1);
   16.27  val inclE = result();
   16.28  
   16.29 -val fix_ss = term_ss addcongs fix_congs;
   16.30  
   16.31  (*** Lemmas for Inclusive Predicates ***)
   16.32  
   16.33 @@ -76,7 +68,7 @@
   16.34  val ball_INCL = result();
   16.35  
   16.36  goal Fix.thy "INCL(%x.a(x) = b(x)::'a::prog)";
   16.37 -by (SIMP_TAC (fix_ss addrews [eq_iff]) 1);
   16.38 +by (simp_tac (term_ss addsimps [eq_iff]) 1);
   16.39  by (REPEAT (resolve_tac [conj_INCL,po_INCL] 1));
   16.40  val eq_INCL = result();
   16.41  
   16.42 @@ -89,9 +81,9 @@
   16.43  val fix_idgenfp = result();
   16.44  
   16.45  goalw Fix.thy [idgen_def] "idgen(lam x.x) = lam x.x";
   16.46 -by (SIMP_TAC term_ss 1);
   16.47 +by (simp_tac term_ss 1);
   16.48  br (term_case RS allI) 1;
   16.49 -by (ALLGOALS (SIMP_TAC term_ss));
   16.50 +by (ALLGOALS (simp_tac term_ss));
   16.51  val id_idgenfp = result();
   16.52  
   16.53  (* All fixed points are lam-expressions *)
   16.54 @@ -106,12 +98,12 @@
   16.55  
   16.56  val prems = goalw Fix.thy [idgen_def] 
   16.57      "[| a = b;  a ` t = u |] ==> b ` t = u";
   16.58 -by (SIMP_TAC (term_ss addrews (prems RL [sym])) 1);
   16.59 +by (simp_tac (term_ss addsimps (prems RL [sym])) 1);
   16.60  val l_lemma= result();
   16.61  
   16.62  val idgen_lemmas =
   16.63      let fun mk_thm s = prove_goalw Fix.thy [idgen_def] s
   16.64 -           (fn [prem] => [rtac (prem RS l_lemma) 1,SIMP_TAC term_ss 1])
   16.65 +           (fn [prem] => [rtac (prem RS l_lemma) 1,simp_tac term_ss 1])
   16.66      in map mk_thm
   16.67            [    "idgen(d) = d ==> d ` bot = bot",
   16.68                 "idgen(d) = d ==> d ` true = true",
   16.69 @@ -141,7 +133,7 @@
   16.70  \      POgen({p.EX a b.p=<a,b> & (EX t.a=fix(idgen) ` t  & b = d ` t)})";
   16.71  by (REPEAT (step_tac term_cs 1));
   16.72  by (term_case_tac "t" 1);
   16.73 -by (ALLGOALS (SIMP_TAC (term_ss addrews (POgenXH::([prem,fix_idgenfp] RL idgen_lemmas)))));
   16.74 +by (ALLGOALS (simp_tac (term_ss addsimps (POgenXH::([prem,fix_idgenfp] RL idgen_lemmas)))));
   16.75  by (ALLGOALS (fast_tac set_cs));
   16.76  val lemma1 = result();
   16.77  
   16.78 @@ -157,7 +149,7 @@
   16.79  \      {p.EX a b.p=<a,b> & b = d ` a} <= POgen({p.EX a b.p=<a,b> & b = d ` a})";
   16.80  by (REPEAT (step_tac term_cs 1));
   16.81  by (term_case_tac "a" 1);
   16.82 -by (ALLGOALS (SIMP_TAC (term_ss addrews (POgenXH::([prem] RL idgen_lemmas)))));
   16.83 +by (ALLGOALS (simp_tac (term_ss addsimps (POgenXH::([prem] RL idgen_lemmas)))));
   16.84  by (ALLGOALS (fast_tac set_cs));
   16.85  val lemma2 = result();
   16.86  
   16.87 @@ -165,7 +157,7 @@
   16.88      "idgen(d) = d ==> lam x.x [= d";
   16.89  br (allI RS po_eta) 1;
   16.90  br (lemma2 RSN(2,po_coinduct)) 1;
   16.91 -by (SIMP_TAC term_ss 1);
   16.92 +by (simp_tac term_ss 1);
   16.93  by (ALLGOALS (fast_tac (term_cs addIs [prem,po_eta_lemma,fix_idgenfp])));
   16.94  val id_least_idgen = result();
   16.95  
   16.96 @@ -196,7 +188,7 @@
   16.97  brs prems 1;
   16.98  br (applyB RS ssubst )1;
   16.99  by (res_inst_tac [("t","xa")] term_case 1);
  16.100 -by (ALLGOALS (SIMP_TAC term_ss));
  16.101 +by (ALLGOALS (simp_tac term_ss));
  16.102  by (ALLGOALS (fast_tac (term_cs addIs ([all_INCL,INCL_subst] @ prems))));
  16.103  val term_ind = result();
  16.104  
    17.1 --- a/src/CCL/hered.ML	Fri Sep 17 16:52:10 1993 +0200
    17.2 +++ b/src/CCL/hered.ML	Mon Sep 20 17:02:11 1993 +0200
    17.3 @@ -10,8 +10,6 @@
    17.4  
    17.5  fun type_of_terms (Const("Trueprop",_) $ (Const("op =",(Type ("fun", [t,_])))$_$_)) = t;
    17.6  
    17.7 -val cong_rls = ccl_mk_congs Hered.thy  ["HTTgen"];
    17.8 -
    17.9  (*** Hereditary Termination ***)
   17.10  
   17.11  goalw Hered.thy [HTTgen_def]  "mono(%X.HTTgen(X))";
   17.12 @@ -54,16 +52,16 @@
   17.13  
   17.14  goal Hered.thy "lam x.f(x) : HTT <-> (ALL x. f(x) : HTT)";
   17.15  br (HTTXH RS iff_trans) 1;
   17.16 -by (SIMP_TAC term_ss 1);
   17.17 +by (simp_tac term_ss 1);
   17.18  by (safe_tac term_cs);
   17.19 -by (ASM_SIMP_TAC term_ss 1);
   17.20 +by (asm_simp_tac term_ss 1);
   17.21  by (fast_tac term_cs 1);
   17.22  val HTT_lam = result();
   17.23  
   17.24  local
   17.25    val raw_HTTrews = [HTT_bot,HTT_true,HTT_false,HTT_pair,HTT_lam];
   17.26    fun mk_thm s = prove_goalw Hered.thy data_defs s (fn _ => 
   17.27 -                  [SIMP_TAC (term_ss addrews raw_HTTrews) 1]);
   17.28 +                  [simp_tac (term_ss addsimps raw_HTTrews) 1]);
   17.29  in
   17.30    val HTT_rews = raw_HTTrews @
   17.31                 map mk_thm ["one : HTT",
   17.32 @@ -115,22 +113,22 @@
   17.33  (*** Formation Rules for Types ***)
   17.34  
   17.35  goal Hered.thy "Unit <= HTT";
   17.36 -by (SIMP_TAC (CCL_ss addrews ([subsetXH,UnitXH] @ HTT_rews)) 1);
   17.37 +by (simp_tac (CCL_ss addsimps ([subsetXH,UnitXH] @ HTT_rews)) 1);
   17.38  val UnitF = result();
   17.39  
   17.40  goal Hered.thy "Bool <= HTT";
   17.41 -by (SIMP_TAC (CCL_ss addrews ([subsetXH,BoolXH] @ HTT_rews)) 1);
   17.42 +by (simp_tac (CCL_ss addsimps ([subsetXH,BoolXH] @ HTT_rews)) 1);
   17.43  by (fast_tac (set_cs addIs HTT_Is @ (prems RL [subsetD])) 1);
   17.44  val BoolF = result();
   17.45  
   17.46  val prems = goal Hered.thy "[| A <= HTT;  B <= HTT |] ==> A + B  <= HTT";
   17.47 -by (SIMP_TAC (CCL_ss addrews ([subsetXH,PlusXH] @ HTT_rews)) 1);
   17.48 +by (simp_tac (CCL_ss addsimps ([subsetXH,PlusXH] @ HTT_rews)) 1);
   17.49  by (fast_tac (set_cs addIs HTT_Is @ (prems RL [subsetD])) 1);
   17.50  val PlusF = result();
   17.51  
   17.52  val prems = goal Hered.thy 
   17.53       "[| A <= HTT;  !!x.x:A ==> B(x) <= HTT |] ==> SUM x:A.B(x) <= HTT";
   17.54 -by (SIMP_TAC (CCL_ss addrews ([subsetXH,SgXH] @ HTT_rews)) 1);
   17.55 +by (simp_tac (CCL_ss addsimps ([subsetXH,SgXH] @ HTT_rews)) 1);
   17.56  by (fast_tac (set_cs addIs HTT_Is @ (prems RL [subsetD])) 1);
   17.57  val SigmaF = result();
   17.58  
   17.59 @@ -139,7 +137,7 @@
   17.60  
   17.61  (*Proof by induction - needs induction rule for type*)
   17.62  goal Hered.thy "Nat <= HTT";
   17.63 -by (SIMP_TAC (term_ss addrews [subsetXH]) 1);
   17.64 +by (simp_tac (term_ss addsimps [subsetXH]) 1);
   17.65  by (safe_tac set_cs);
   17.66  be Nat_ind 1;
   17.67  by (ALLGOALS (fast_tac (set_cs addIs HTT_Is @ (prems RL [subsetD]))));
   17.68 @@ -186,7 +184,7 @@
   17.69  bd (poXH RS iffD1) 1;
   17.70  by (safe_tac (set_cs addSEs [HTT_bot RS notE]));
   17.71  by (REPEAT_SOME (rtac (POgenXH RS iffD2) ORELSE' etac rev_mp));
   17.72 -by (ALLGOALS (SIMP_TAC (term_ss addrews HTT_rews)));
   17.73 +by (ALLGOALS (simp_tac (term_ss addsimps HTT_rews)));
   17.74  by (ALLGOALS (fast_tac ccl_cs));
   17.75  val HTT_po_op = result();
   17.76  
    18.1 --- a/src/CCL/set.ML	Fri Sep 17 16:52:10 1993 +0200
    18.2 +++ b/src/CCL/set.ML	Mon Sep 20 17:02:11 1993 +0200
    18.3 @@ -22,18 +22,13 @@
    18.4  by (resolve_tac (prems RL [mem_Collect_iff  RS iffD1]) 1);
    18.5  val CollectD = result();
    18.6  
    18.7 +val CollectE = make_elim CollectD;
    18.8 +
    18.9  val [prem] = goal Set.thy "[| !!x. x:A <-> x:B |] ==> A = B";
   18.10  by (rtac (set_extension RS iffD2) 1);
   18.11  by (rtac (prem RS allI) 1);
   18.12  val set_ext = result();
   18.13  
   18.14 -val prems = goal Set.thy "[| !!x. P(x) <-> Q(x) |] ==> {x. P(x)} = {x. Q(x)}";
   18.15 -by (REPEAT (ares_tac [set_ext,iffI,CollectI] 1 ORELSE
   18.16 -            eresolve_tac ([CollectD] RL (prems RL [iffD1,iffD2])) 1));
   18.17 -val Collect_cong = result();
   18.18 -
   18.19 -val CollectE = make_elim CollectD;
   18.20 -
   18.21  (*** Bounded quantifiers ***)
   18.22  
   18.23  val prems = goalw Set.thy [Ball_def]
    19.1 --- a/src/CCL/subset.ML	Fri Sep 17 16:52:10 1993 +0200
    19.2 +++ b/src/CCL/subset.ML	Mon Sep 20 17:02:11 1993 +0200
    19.3 @@ -83,10 +83,6 @@
    19.4  by (rtac minor 1);
    19.5  val monoD = result();
    19.6  
    19.7 -val [prem] = goalw Set.thy [mono_def] "(!!x.f(x) = g(x)) ==> mono(f) <-> mono(g)";
    19.8 -by (REPEAT (resolve_tac (iff_refl::FOL_congs @ [prem RS subst]) 1));
    19.9 -val mono_cong = result();
   19.10 -
   19.11  val [prem] = goal Set.thy "mono(f) ==> f(A) Un f(B) <= f(A Un B)";
   19.12  by (rtac Un_least 1);
   19.13  by (rtac (Un_upper1 RS (prem RS monoD)) 1);
   19.14 @@ -121,9 +117,6 @@
   19.15     "(a : {})       <->   False",
   19.16     "(a : {x.P(x)}) <->  P(a)" ]);
   19.17  
   19.18 -val set_congs = 
   19.19 -    [Collect_cong, ball_cong, bex_cong, INT_cong, UN_cong, mono_cong] @ 
   19.20 -    mk_congs Set.thy ["Compl", "op Int", "op Un", "Union", "Inter", 
   19.21 -		      "op :", "op <=", "singleton"];
   19.22 +val set_congs = [ball_cong, bex_cong, INT_cong, UN_cong];
   19.23  
   19.24 -val set_ss = FOL_ss addcongs set_congs addrews mem_rews;
   19.25 +val set_ss = FOL_ss addcongs set_congs addsimps mem_rews;
    20.1 --- a/src/CCL/term.ML	Fri Sep 17 16:52:10 1993 +0200
    20.2 +++ b/src/CCL/term.ML	Mon Sep 20 17:02:11 1993 +0200
    20.3 @@ -19,15 +19,11 @@
    20.4  val data_defs = simp_defs @ ind_defs @ [napply_def];
    20.5  val genrec_defs = [letrec_def,letrec2_def,letrec3_def];
    20.6  
    20.7 -val term_congs = ccl_mk_congs Term.thy 
    20.8 -    ["inl","inr","succ","op .","split","if","when","ncase","nrec","lcase","lrec",
    20.9 -     "fst","snd","thd","let","letrec","letrec2","letrec3","napply"];
   20.10 -
   20.11  (*** Beta Rules, including strictness ***)
   20.12  
   20.13  goalw Term.thy [let_def] "~ t=bot--> let x be t in f(x) = f(t)";
   20.14  by (res_inst_tac [("t","t")] term_case 1);
   20.15 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   20.16 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   20.17  val letB = result() RS mp;
   20.18  
   20.19  goalw Term.thy [let_def] "let x be bot in f(x) = bot";
   20.20 @@ -36,11 +32,11 @@
   20.21  
   20.22  goalw Term.thy [let_def] "let x be t in bot = bot";
   20.23  brs ([caseBbot] RL [term_case]) 1;
   20.24 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   20.25 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   20.26  val letBbbot = result();
   20.27  
   20.28  goalw Term.thy [apply_def] "(lam x.b(x)) ` a = b(a)";
   20.29 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   20.30 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   20.31  val applyB = result();
   20.32  
   20.33  goalw Term.thy [apply_def] "bot ` a = bot";
   20.34 @@ -57,10 +53,16 @@
   20.35      resolve_tac [applyB RS ssubst] 1 THEN resolve_tac [refl] 1);
   20.36  val letrecB = result();
   20.37  
   20.38 -val rawBs = caseBs @ [applyB,applyBbot,letrecB];
   20.39 +val rawBs = caseBs @ [applyB,applyBbot];
   20.40  
   20.41  fun raw_mk_beta_rl defs s = prove_goalw Term.thy defs s
   20.42 -           (fn _ => [SIMP_TAC (CCL_ss addrews rawBs  addcongs term_congs) 1]);
   20.43 +           (fn _ => [rtac (letrecB RS ssubst) 1,
   20.44 +		     simp_tac (CCL_ss addsimps rawBs) 1]);
   20.45 +fun mk_beta_rl s = raw_mk_beta_rl data_defs s;
   20.46 +
   20.47 +fun raw_mk_beta_rl defs s = prove_goalw Term.thy defs s
   20.48 +           (fn _ => [simp_tac (CCL_ss addsimps rawBs 
   20.49 +			       setloop (rtac (letrecB RS ssubst))) 1]);
   20.50  fun mk_beta_rl s = raw_mk_beta_rl data_defs s;
   20.51  
   20.52  val ifBtrue    = mk_beta_rl "if true then t else u = t";
   20.53 @@ -114,8 +116,7 @@
   20.54  (*** Constructors are injective ***)
   20.55  
   20.56  val term_injs = map (mk_inj_rl Term.thy 
   20.57 -                             [applyB,splitB,whenBinl,whenBinr,ncaseBsucc,lcaseBcons] 
   20.58 -                             (ccl_congs @ term_congs))
   20.59 +		     [applyB,splitB,whenBinl,whenBinr,ncaseBsucc,lcaseBcons])
   20.60                 ["(inl(a) = inl(a')) <-> (a=a')",
   20.61                  "(inr(a) = inr(a')) <-> (a=a')",
   20.62                  "(succ(a) = succ(a')) <-> (a=a')",
   20.63 @@ -130,7 +131,7 @@
   20.64  
   20.65  local
   20.66    fun mk_thm s = prove_goalw Term.thy data_defs s (fn _ => 
   20.67 -                  [SIMP_TAC (ccl_ss addrews (ccl_porews)) 1]);
   20.68 +                  [simp_tac (ccl_ss addsimps (ccl_porews)) 1]);
   20.69  in
   20.70    val term_porews = map mk_thm ["inl(a) [= inl(a') <-> a [= a'",
   20.71                                  "inr(b) [= inr(b') <-> b [= b'",
   20.72 @@ -141,6 +142,7 @@
   20.73  (*** Rewriting and Proving ***)
   20.74  
   20.75  val term_rews = termBs @ term_injs @ term_dstncts @ ccl_porews @ term_porews;
   20.76 -val term_ss = ccl_ss addrews term_rews addcongs term_congs;
   20.77 +val term_ss = ccl_ss addsimps term_rews;
   20.78  
   20.79 -val term_cs = ccl_cs addSEs (term_dstncts RL [notE]) addSDs (XH_to_Ds term_injs);
   20.80 +val term_cs = ccl_cs addSEs (term_dstncts RL [notE]) 
   20.81 +                     addSDs (XH_to_Ds term_injs);
    21.1 --- a/src/CCL/terms.ML	Fri Sep 17 16:52:10 1993 +0200
    21.2 +++ b/src/CCL/terms.ML	Mon Sep 20 17:02:11 1993 +0200
    21.3 @@ -19,15 +19,11 @@
    21.4  val data_defs = simp_defs @ ind_defs @ [napply_def];
    21.5  val genrec_defs = [letrec_def,letrec2_def,letrec3_def];
    21.6  
    21.7 -val term_congs = ccl_mk_congs Term.thy 
    21.8 -    ["inl","inr","succ","op .","split","if","when","ncase","nrec","lcase","lrec",
    21.9 -     "fst","snd","thd","let","letrec","letrec2","letrec3","napply"];
   21.10 -
   21.11  (*** Beta Rules, including strictness ***)
   21.12  
   21.13  goalw Term.thy [let_def] "~ t=bot--> let x be t in f(x) = f(t)";
   21.14  by (res_inst_tac [("t","t")] term_case 1);
   21.15 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   21.16 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   21.17  val letB = result() RS mp;
   21.18  
   21.19  goalw Term.thy [let_def] "let x be bot in f(x) = bot";
   21.20 @@ -36,11 +32,11 @@
   21.21  
   21.22  goalw Term.thy [let_def] "let x be t in bot = bot";
   21.23  brs ([caseBbot] RL [term_case]) 1;
   21.24 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   21.25 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   21.26  val letBbbot = result();
   21.27  
   21.28  goalw Term.thy [apply_def] "(lam x.b(x)) ` a = b(a)";
   21.29 -by (ALLGOALS(SIMP_TAC(CCL_ss addrews [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   21.30 +by (ALLGOALS(simp_tac(CCL_ss addsimps [caseBtrue,caseBfalse,caseBpair,caseBlam])));
   21.31  val applyB = result();
   21.32  
   21.33  goalw Term.thy [apply_def] "bot ` a = bot";
   21.34 @@ -57,10 +53,16 @@
   21.35      resolve_tac [applyB RS ssubst] 1 THEN resolve_tac [refl] 1);
   21.36  val letrecB = result();
   21.37  
   21.38 -val rawBs = caseBs @ [applyB,applyBbot,letrecB];
   21.39 +val rawBs = caseBs @ [applyB,applyBbot];
   21.40  
   21.41  fun raw_mk_beta_rl defs s = prove_goalw Term.thy defs s
   21.42 -           (fn _ => [SIMP_TAC (CCL_ss addrews rawBs  addcongs term_congs) 1]);
   21.43 +           (fn _ => [rtac (letrecB RS ssubst) 1,
   21.44 +		     simp_tac (CCL_ss addsimps rawBs) 1]);
   21.45 +fun mk_beta_rl s = raw_mk_beta_rl data_defs s;
   21.46 +
   21.47 +fun raw_mk_beta_rl defs s = prove_goalw Term.thy defs s
   21.48 +           (fn _ => [simp_tac (CCL_ss addsimps rawBs 
   21.49 +			       setloop (rtac (letrecB RS ssubst))) 1]);
   21.50  fun mk_beta_rl s = raw_mk_beta_rl data_defs s;
   21.51  
   21.52  val ifBtrue    = mk_beta_rl "if true then t else u = t";
   21.53 @@ -114,8 +116,7 @@
   21.54  (*** Constructors are injective ***)
   21.55  
   21.56  val term_injs = map (mk_inj_rl Term.thy 
   21.57 -                             [applyB,splitB,whenBinl,whenBinr,ncaseBsucc,lcaseBcons] 
   21.58 -                             (ccl_congs @ term_congs))
   21.59 +		     [applyB,splitB,whenBinl,whenBinr,ncaseBsucc,lcaseBcons])
   21.60                 ["(inl(a) = inl(a')) <-> (a=a')",
   21.61                  "(inr(a) = inr(a')) <-> (a=a')",
   21.62                  "(succ(a) = succ(a')) <-> (a=a')",
   21.63 @@ -130,7 +131,7 @@
   21.64  
   21.65  local
   21.66    fun mk_thm s = prove_goalw Term.thy data_defs s (fn _ => 
   21.67 -                  [SIMP_TAC (ccl_ss addrews (ccl_porews)) 1]);
   21.68 +                  [simp_tac (ccl_ss addsimps (ccl_porews)) 1]);
   21.69  in
   21.70    val term_porews = map mk_thm ["inl(a) [= inl(a') <-> a [= a'",
   21.71                                  "inr(b) [= inr(b') <-> b [= b'",
   21.72 @@ -141,6 +142,7 @@
   21.73  (*** Rewriting and Proving ***)
   21.74  
   21.75  val term_rews = termBs @ term_injs @ term_dstncts @ ccl_porews @ term_porews;
   21.76 -val term_ss = ccl_ss addrews term_rews addcongs term_congs;
   21.77 +val term_ss = ccl_ss addsimps term_rews;
   21.78  
   21.79 -val term_cs = ccl_cs addSEs (term_dstncts RL [notE]) addSDs (XH_to_Ds term_injs);
   21.80 +val term_cs = ccl_cs addSEs (term_dstncts RL [notE]) 
   21.81 +                     addSDs (XH_to_Ds term_injs);
    22.1 --- a/src/CCL/type.ML	Fri Sep 17 16:52:10 1993 +0200
    22.2 +++ b/src/CCL/type.ML	Mon Sep 20 17:02:11 1993 +0200
    22.3 @@ -65,7 +65,7 @@
    22.4  fun mk_ncanT_tac thy defs top_crls crls s = prove_goalw thy defs s 
    22.5    (fn major::prems => [(resolve_tac ([major] RL top_crls) 1),
    22.6                         (REPEAT_SOME (eresolve_tac (crls @ [exE,bexE,conjE,disjE]))),
    22.7 -                       (ALLGOALS (ASM_SIMP_TAC term_ss)),
    22.8 +                       (ALLGOALS (asm_simp_tac term_ss)),
    22.9                         (ALLGOALS (ares_tac (prems RL [lemma]) ORELSE' 
   22.10                                    eresolve_tac [bspec])),
   22.11                         (safe_tac (ccl_cs addSIs prems))]);
   22.12 @@ -239,7 +239,7 @@
   22.13  
   22.14  fun mk_prec_tac inds s = prove_goal Type.thy s
   22.15       (fn major::prems => [resolve_tac ([major] RL inds) 1,
   22.16 -                          ALLGOALS (SIMP_TAC term_ss THEN'
   22.17 +                          ALLGOALS (simp_tac term_ss THEN'
   22.18                                      fast_tac (set_cs addSIs prems))]);
   22.19  val prec_tac = mk_prec_tac inds;
   22.20  
    23.1 --- a/src/CCL/wfd.ML	Fri Sep 17 16:52:10 1993 +0200
    23.2 +++ b/src/CCL/wfd.ML	Mon Sep 20 17:02:11 1993 +0200
    23.3 @@ -14,10 +14,6 @@
    23.4  
    23.5  (***********)
    23.6  
    23.7 -val wfd_congs = mk_congs Wfd.thy ["Wfd","wf","op **","wmap","ListPR"];
    23.8 -
    23.9 -(***********)
   23.10 -
   23.11  val [major,prem] = goalw Wfd.thy [Wfd_def]
   23.12      "[| Wfd(R);       \
   23.13  \       !!x.[| ALL y. <y,x>: R --> P(y) |] ==> P(x) |]  ==>  \
   23.14 @@ -149,17 +145,17 @@
   23.15  
   23.16  val prems = goal Wfd.thy "<xa,ya> : r ==> <<xa,xb>,<ya,yb>> : wmap(fst,r)";
   23.17  br wmapI 1;
   23.18 -by (SIMP_TAC (term_ss addrews prems) 1);
   23.19 +by (simp_tac (term_ss addsimps prems) 1);
   23.20  val wfstI = result();
   23.21  
   23.22  val prems = goal Wfd.thy "<xb,yb> : r ==> <<xa,xb>,<ya,yb>> : wmap(snd,r)";
   23.23  br wmapI 1;
   23.24 -by (SIMP_TAC (term_ss addrews prems) 1);
   23.25 +by (simp_tac (term_ss addsimps prems) 1);
   23.26  val wsndI = result();
   23.27  
   23.28  val prems = goal Wfd.thy "<xc,yc> : r ==> <<xa,<xb,xc>>,<ya,<yb,yc>>> : wmap(thd,r)";
   23.29  br wmapI 1;
   23.30 -by (SIMP_TAC (term_ss addrews prems) 1);
   23.31 +by (simp_tac (term_ss addsimps prems) 1);
   23.32  val wthdI = result();
   23.33  
   23.34  (*** Ground well-founded relations ***)
   23.35 @@ -175,7 +171,7 @@
   23.36  
   23.37  val prems = goalw Wfd.thy [wf_def] "Wfd(wf(R))";
   23.38  by (res_inst_tac [("Q","Wfd(R)")] (excluded_middle RS disjE) 1);
   23.39 -by (ALLGOALS (ASM_SIMP_TAC (CCL_ss addcongs wfd_congs)));
   23.40 +by (ALLGOALS (asm_simp_tac CCL_ss));
   23.41  br Empty_wf 1;
   23.42  val wf_wf = result();
   23.43