massive tidy-up: goal -> Goal, remove use of prems, etc.
authorpaulson
Wed Jul 05 16:37:52 2000 +0200 (2000-07-05)
changeset 9248e1dee89de037
parent 9247 ad9f986616de
child 9249 c71db8c28727
massive tidy-up: goal -> Goal, remove use of prems, etc.
src/HOLCF/Cfun1.ML
src/HOLCF/Cfun2.ML
src/HOLCF/Cfun3.ML
src/HOLCF/Cont.ML
src/HOLCF/Cprod1.ML
src/HOLCF/Cprod2.ML
src/HOLCF/Cprod3.ML
src/HOLCF/Fix.ML
src/HOLCF/Fun2.ML
src/HOLCF/Fun3.ML
src/HOLCF/Lift1.ML
src/HOLCF/Lift2.ML
src/HOLCF/Lift3.ML
src/HOLCF/One.ML
src/HOLCF/Pcpo.ML
src/HOLCF/Porder.ML
src/HOLCF/Porder0.ML
src/HOLCF/Sprod0.ML
src/HOLCF/Sprod1.ML
src/HOLCF/Sprod2.ML
src/HOLCF/Sprod3.ML
src/HOLCF/Ssum0.ML
src/HOLCF/Ssum1.ML
src/HOLCF/Ssum2.ML
src/HOLCF/Ssum3.ML
src/HOLCF/Up1.ML
src/HOLCF/Up2.ML
src/HOLCF/Up3.ML
src/HOLCF/ex/Loop.ML
src/HOLCF/ex/Stream.ML
src/HOLCF/ex/loeckx.ML
     1.1 --- a/src/HOLCF/Cfun1.ML	Wed Jul 05 14:26:58 2000 +0200
     1.2 +++ b/src/HOLCF/Cfun1.ML	Wed Jul 05 16:37:52 2000 +0200
     1.3 @@ -10,16 +10,15 @@
     1.4  (* derive old type definition rules for Abs_CFun & Rep_CFun                         *)
     1.5  (* Rep_CFun and Abs_CFun should be replaced by Rep_Cfun anf Abs_Cfun in future      *)
     1.6  (* ------------------------------------------------------------------------ *)
     1.7 -val prems = goal thy "Rep_CFun fo : CFun";
     1.8 +Goal "Rep_CFun fo : CFun";
     1.9  by (rtac Rep_CFun 1);
    1.10  qed "Rep_Cfun";
    1.11  
    1.12 -val prems = goal thy "Abs_CFun (Rep_CFun fo) = fo";
    1.13 +Goal "Abs_CFun (Rep_CFun fo) = fo";
    1.14  by (rtac Rep_CFun_inverse 1);
    1.15  qed "Rep_Cfun_inverse";
    1.16  
    1.17 -val prems = goal thy "f:CFun==>Rep_CFun(Abs_CFun f)=f";
    1.18 -by (cut_facts_tac prems 1);
    1.19 +Goal "f:CFun==>Rep_CFun(Abs_CFun f)=f";
    1.20  by (etac Abs_CFun_inverse 1);
    1.21  qed "Abs_Cfun_inverse";
    1.22  
    1.23 @@ -27,13 +26,12 @@
    1.24  (* less_cfun is a partial order on type 'a -> 'b                            *)
    1.25  (* ------------------------------------------------------------------------ *)
    1.26  
    1.27 -val prems = goalw thy [less_cfun_def] "(f::'a->'b) << f";
    1.28 +Goalw [less_cfun_def] "(f::'a->'b) << f";
    1.29  by (rtac refl_less 1);
    1.30  qed "refl_less_cfun";
    1.31  
    1.32 -val prems = goalw thy [less_cfun_def] 
    1.33 +Goalw [less_cfun_def] 
    1.34          "[|(f1::'a->'b) << f2; f2 << f1|] ==> f1 = f2";
    1.35 -by (cut_facts_tac prems 1);
    1.36  by (rtac injD 1);
    1.37  by (rtac antisym_less 2);
    1.38  by (atac 3);
    1.39 @@ -42,9 +40,8 @@
    1.40  by (rtac Rep_Cfun_inverse 1);
    1.41  qed "antisym_less_cfun";
    1.42  
    1.43 -val prems = goalw thy [less_cfun_def] 
    1.44 +Goalw [less_cfun_def] 
    1.45          "[|(f1::'a->'b) << f2; f2 << f3|] ==> f1 << f3";
    1.46 -by (cut_facts_tac prems 1);
    1.47  by (etac trans_less 1);
    1.48  by (atac 1);
    1.49  qed "trans_less_cfun";
    1.50 @@ -53,23 +50,16 @@
    1.51  (* lemmas about application of continuous functions                         *)
    1.52  (* ------------------------------------------------------------------------ *)
    1.53  
    1.54 -val prems = goal thy 
    1.55 -         "[| f=g; x=y |] ==> f`x = g`y";
    1.56 -by (cut_facts_tac prems 1);
    1.57 -by (fast_tac HOL_cs 1);
    1.58 +Goal "[| f=g; x=y |] ==> f`x = g`y";
    1.59 +by (Asm_simp_tac 1);
    1.60  qed "cfun_cong";
    1.61  
    1.62 -val prems = goal thy "f=g ==> f`x = g`x";
    1.63 -by (cut_facts_tac prems 1);
    1.64 -by (etac cfun_cong 1);
    1.65 -by (rtac refl 1);
    1.66 +Goal "f=g ==> f`x = g`x";
    1.67 +by (Asm_simp_tac 1);
    1.68  qed "cfun_fun_cong";
    1.69  
    1.70 -val prems = goal thy "x=y ==> f`x = f`y";
    1.71 -by (cut_facts_tac prems 1);
    1.72 -by (rtac cfun_cong 1);
    1.73 -by (rtac refl 1);
    1.74 -by (atac 1);
    1.75 +Goal "x=y ==> f`x = f`y";
    1.76 +by (Asm_simp_tac 1);
    1.77  qed "cfun_arg_cong";
    1.78  
    1.79  
    1.80 @@ -77,8 +67,7 @@
    1.81  (* additional lemma about the isomorphism between -> and Cfun               *)
    1.82  (* ------------------------------------------------------------------------ *)
    1.83  
    1.84 -val prems = goal thy "cont f ==> Rep_CFun (Abs_CFun f) = f";
    1.85 -by (cut_facts_tac prems 1);
    1.86 +Goal "cont f ==> Rep_CFun (Abs_CFun f) = f";
    1.87  by (rtac Abs_Cfun_inverse 1);
    1.88  by (rewtac CFun_def);
    1.89  by (etac (mem_Collect_eq RS ssubst) 1);
    1.90 @@ -88,8 +77,7 @@
    1.91  (* simplification of application                                            *)
    1.92  (* ------------------------------------------------------------------------ *)
    1.93  
    1.94 -val prems = goal thy "cont f ==> (Abs_CFun f)`x = f x";
    1.95 -by (cut_facts_tac prems 1);
    1.96 +Goal "cont f ==> (Abs_CFun f)`x = f x";
    1.97  by (etac (Abs_Cfun_inverse2 RS fun_cong) 1);
    1.98  qed "Cfunapp2";
    1.99  
   1.100 @@ -97,9 +85,7 @@
   1.101  (* beta - equality for continuous functions                                 *)
   1.102  (* ------------------------------------------------------------------------ *)
   1.103  
   1.104 -val prems = goal thy 
   1.105 -        "cont(c1) ==> (LAM x .c1 x)`u = c1 u";
   1.106 -by (cut_facts_tac prems 1);
   1.107 +Goal "cont(c1) ==> (LAM x .c1 x)`u = c1 u";
   1.108  by (rtac Cfunapp2 1);
   1.109  by (atac 1);
   1.110  qed "beta_cfun";
     2.1 --- a/src/HOLCF/Cfun2.ML	Wed Jul 05 14:26:58 2000 +0200
     2.2 +++ b/src/HOLCF/Cfun2.ML	Wed Jul 05 16:37:52 2000 +0200
     2.3 @@ -7,7 +7,7 @@
     2.4  *)
     2.5  
     2.6  (* for compatibility with old HOLCF-Version *)
     2.7 -val prems = goal thy "(op <<)=(%f1 f2. Rep_CFun f1 << Rep_CFun f2)";
     2.8 +Goal "(op <<)=(%f1 f2. Rep_CFun f1 << Rep_CFun f2)";
     2.9  by (fold_goals_tac [less_cfun_def]);
    2.10  by (rtac refl 1);
    2.11  qed "inst_cfun_po";
    2.12 @@ -16,7 +16,7 @@
    2.13  (* access to less_cfun in class po                                          *)
    2.14  (* ------------------------------------------------------------------------ *)
    2.15  
    2.16 -val prems = goal thy "( f1 << f2 ) = (Rep_CFun(f1) << Rep_CFun(f2))";
    2.17 +Goal "( f1 << f2 ) = (Rep_CFun(f1) << Rep_CFun(f2))";
    2.18  by (simp_tac (simpset() addsimps [inst_cfun_po]) 1);
    2.19  qed "less_cfun";
    2.20  
    2.21 @@ -24,7 +24,7 @@
    2.22  (* Type 'a ->'b  is pointed                                                 *)
    2.23  (* ------------------------------------------------------------------------ *)
    2.24  
    2.25 -val prems = goal thy "Abs_CFun(% x. UU) << f";
    2.26 +Goal "Abs_CFun(% x. UU) << f";
    2.27  by (stac less_cfun 1);
    2.28  by (stac Abs_Cfun_inverse2 1);
    2.29  by (rtac cont_const 1);
    2.30 @@ -33,7 +33,7 @@
    2.31  
    2.32  bind_thm ("UU_cfun_def",minimal_cfun RS minimal2UU RS sym);
    2.33  
    2.34 -val prems = goal thy "? x::'a->'b::pcpo.!y. x<<y";
    2.35 +Goal "? x::'a->'b::pcpo.!y. x<<y";
    2.36  by (res_inst_tac [("x","Abs_CFun(% x. UU)")] exI 1);
    2.37  by (rtac (minimal_cfun RS allI) 1);
    2.38  qed "least_cfun";
    2.39 @@ -44,7 +44,7 @@
    2.40  (* cont_Rep_CFun2 ==> monofun_Rep_CFun2 & contlub_Rep_CFun2                            *)
    2.41  (* ------------------------------------------------------------------------ *)
    2.42  
    2.43 -val prems = goal thy "cont(Rep_CFun(fo))";
    2.44 +Goal "cont(Rep_CFun(fo))";
    2.45  by (res_inst_tac [("P","cont")] CollectD 1);
    2.46  by (fold_goals_tac [CFun_def]);
    2.47  by (rtac Rep_Cfun 1);
    2.48 @@ -73,7 +73,7 @@
    2.49  (* Rep_CFun is monotone in its 'first' argument                                 *)
    2.50  (* ------------------------------------------------------------------------ *)
    2.51  
    2.52 -val prems = goalw thy [monofun] "monofun(Rep_CFun)";
    2.53 +Goalw [monofun] "monofun(Rep_CFun)";
    2.54  by (strip_tac 1);
    2.55  by (etac (less_cfun RS subst) 1);
    2.56  qed "monofun_Rep_CFun1";
    2.57 @@ -83,8 +83,7 @@
    2.58  (* monotonicity of application Rep_CFun in mixfix syntax [_]_                   *)
    2.59  (* ------------------------------------------------------------------------ *)
    2.60  
    2.61 -val prems = goal thy  "f1 << f2 ==> f1`x << f2`x";
    2.62 -by (cut_facts_tac prems 1);
    2.63 +Goal  "f1 << f2 ==> f1`x << f2`x";
    2.64  by (res_inst_tac [("x","x")] spec 1);
    2.65  by (rtac (less_fun RS subst) 1);
    2.66  by (etac (monofun_Rep_CFun1 RS monofunE RS spec RS spec RS mp) 1);
    2.67 @@ -98,9 +97,7 @@
    2.68  (* monotonicity of Rep_CFun in both arguments in mixfix syntax [_]_             *)
    2.69  (* ------------------------------------------------------------------------ *)
    2.70  
    2.71 -val prems = goal thy
    2.72 -        "[|f1<<f2;x1<<x2|] ==> f1`x1 << f2`x2";
    2.73 -by (cut_facts_tac prems 1);
    2.74 +Goal "[|f1<<f2;x1<<x2|] ==> f1`x1 << f2`x2";
    2.75  by (rtac trans_less 1);
    2.76  by (etac monofun_cfun_arg 1);
    2.77  by (etac monofun_cfun_fun 1);
    2.78 @@ -119,9 +116,7 @@
    2.79  (* use MF2 lemmas from Cont.ML                                              *)
    2.80  (* ------------------------------------------------------------------------ *)
    2.81  
    2.82 -val prems = goal thy 
    2.83 - "chain(Y) ==> chain(%i. f`(Y i))";
    2.84 -by (cut_facts_tac prems 1);
    2.85 +Goal "chain(Y) ==> chain(%i. f`(Y i))";
    2.86  by (etac (monofun_Rep_CFun2 RS ch2ch_MF2R) 1);
    2.87  qed "ch2ch_Rep_CFunR";
    2.88  
    2.89 @@ -135,9 +130,7 @@
    2.90  (* use MF2 lemmas from Cont.ML                                              *)
    2.91  (* ------------------------------------------------------------------------ *)
    2.92  
    2.93 -val prems = goal thy 
    2.94 -        "chain(F) ==> monofun(% x. lub(range(% j.(F j)`x)))";
    2.95 -by (cut_facts_tac prems 1);
    2.96 +Goal "chain(F) ==> monofun(% x. lub(range(% j.(F j)`x)))";
    2.97  by (rtac lub_MF2_mono 1);
    2.98  by (rtac monofun_Rep_CFun1 1);
    2.99  by (rtac (monofun_Rep_CFun2 RS allI) 1);
   2.100 @@ -149,11 +142,9 @@
   2.101  (* use MF2 lemmas from Cont.ML                                              *)
   2.102  (* ------------------------------------------------------------------------ *)
   2.103  
   2.104 -val prems = goal thy
   2.105 -        "[| chain(F); chain(Y) |] ==>\
   2.106 +Goal "[| chain(F); chain(Y) |] ==>\
   2.107  \               lub(range(%j. lub(range(%i. F(j)`(Y i))))) =\
   2.108  \               lub(range(%i. lub(range(%j. F(j)`(Y i)))))";
   2.109 -by (cut_facts_tac prems 1);
   2.110  by (rtac ex_lubMF2 1);
   2.111  by (rtac monofun_Rep_CFun1 1);
   2.112  by (rtac (monofun_Rep_CFun2 RS allI) 1);
   2.113 @@ -165,9 +156,7 @@
   2.114  (* the lub of a chain of cont. functions is continuous                      *)
   2.115  (* ------------------------------------------------------------------------ *)
   2.116  
   2.117 -val prems = goal thy 
   2.118 -        "chain(F) ==> cont(% x. lub(range(% j. F(j)`x)))";
   2.119 -by (cut_facts_tac prems 1);
   2.120 +Goal "chain(F) ==> cont(% x. lub(range(% j. F(j)`x)))";
   2.121  by (rtac monocontlub2cont 1);
   2.122  by (etac lub_cfun_mono 1);
   2.123  by (rtac contlubI 1);
   2.124 @@ -182,23 +171,18 @@
   2.125  (* type 'a -> 'b is chain complete                                          *)
   2.126  (* ------------------------------------------------------------------------ *)
   2.127  
   2.128 -val prems = goal thy 
   2.129 -  "chain(CCF) ==> range(CCF) <<| (LAM x. lub(range(% i. CCF(i)`x)))";
   2.130 -by (cut_facts_tac prems 1);
   2.131 +Goal "chain(CCF) ==> range(CCF) <<| (LAM x. lub(range(% i. CCF(i)`x)))";
   2.132  by (rtac is_lubI 1);
   2.133 -by (rtac conjI 1);
   2.134  by (rtac ub_rangeI 1);
   2.135 -by (rtac allI 1);
   2.136  by (stac less_cfun 1);
   2.137  by (stac Abs_Cfun_inverse2 1);
   2.138  by (etac cont_lubcfun 1);
   2.139 -by (rtac (lub_fun RS is_lubE RS conjunct1 RS ub_rangeE RS spec) 1);
   2.140 +by (rtac (lub_fun RS is_lubD1 RS ub_rangeD) 1);
   2.141  by (etac (monofun_Rep_CFun1 RS ch2ch_monofun) 1);
   2.142 -by (strip_tac 1);
   2.143  by (stac less_cfun 1);
   2.144  by (stac Abs_Cfun_inverse2 1);
   2.145  by (etac cont_lubcfun 1);
   2.146 -by (rtac (lub_fun RS is_lubE RS conjunct2 RS spec RS mp) 1);
   2.147 +by (rtac (lub_fun RS is_lub_lub) 1);
   2.148  by (etac (monofun_Rep_CFun1 RS ch2ch_monofun) 1);
   2.149  by (etac (monofun_Rep_CFun1 RS ub2ub_monofun) 1);
   2.150  qed "lub_cfun";
   2.151 @@ -208,9 +192,7 @@
   2.152  chain(?CCF1) ==>  lub (range ?CCF1) = (LAM x. lub (range (%i. ?CCF1 i`x)))
   2.153  *)
   2.154  
   2.155 -val prems = goal thy 
   2.156 -  "chain(CCF::nat=>('a->'b)) ==> ? x. range(CCF) <<| x";
   2.157 -by (cut_facts_tac prems 1);
   2.158 +Goal "chain(CCF::nat=>('a->'b)) ==> ? x. range(CCF) <<| x";
   2.159  by (rtac exI 1);
   2.160  by (etac lub_cfun 1);
   2.161  qed "cpo_cfun";
   2.162 @@ -220,7 +202,7 @@
   2.163  (* Extensionality in 'a -> 'b                                               *)
   2.164  (* ------------------------------------------------------------------------ *)
   2.165  
   2.166 -val prems = goal Cfun1.thy "(!!x. f`x = g`x) ==> f = g";
   2.167 +val prems = Goal "(!!x. f`x = g`x) ==> f = g";
   2.168  by (res_inst_tac [("t","f")] (Rep_Cfun_inverse RS subst) 1);
   2.169  by (res_inst_tac [("t","g")] (Rep_Cfun_inverse RS subst) 1);
   2.170  by (res_inst_tac [("f","Abs_CFun")] arg_cong 1);
   2.171 @@ -232,21 +214,20 @@
   2.172  (* Monotonicity of Abs_CFun                                                     *)
   2.173  (* ------------------------------------------------------------------------ *)
   2.174  
   2.175 -val prems = goal thy 
   2.176 -        "[|cont(f);cont(g);f<<g|]==>Abs_CFun(f)<<Abs_CFun(g)";
   2.177 +Goal "[| cont(f); cont(g); f<<g|] ==> Abs_CFun(f)<<Abs_CFun(g)";
   2.178  by (rtac (less_cfun RS iffD2) 1);
   2.179  by (stac Abs_Cfun_inverse2 1);
   2.180 -by (resolve_tac prems 1);
   2.181 +by (assume_tac 1);
   2.182  by (stac Abs_Cfun_inverse2 1);
   2.183 -by (resolve_tac prems 1);
   2.184 -by (resolve_tac prems 1);
   2.185 +by (assume_tac 1);
   2.186 +by (assume_tac 1);
   2.187  qed "semi_monofun_Abs_CFun";
   2.188  
   2.189  (* ------------------------------------------------------------------------ *)
   2.190  (* Extenionality wrt. << in 'a -> 'b                                        *)
   2.191  (* ------------------------------------------------------------------------ *)
   2.192  
   2.193 -val prems = goal thy "(!!x. f`x << g`x) ==> f << g";
   2.194 +val prems = Goal "(!!x. f`x << g`x) ==> f << g";
   2.195  by (res_inst_tac [("t","f")] (Rep_Cfun_inverse RS subst) 1);
   2.196  by (res_inst_tac [("t","g")] (Rep_Cfun_inverse RS subst) 1);
   2.197  by (rtac semi_monofun_Abs_CFun 1);
     3.1 --- a/src/HOLCF/Cfun3.ML	Wed Jul 05 14:26:58 2000 +0200
     3.2 +++ b/src/HOLCF/Cfun3.ML	Wed Jul 05 16:37:52 2000 +0200
     3.3 @@ -7,7 +7,7 @@
     3.4  *)
     3.5  
     3.6  (* for compatibility with old HOLCF-Version *)
     3.7 -val prems = goal thy "UU = Abs_CFun(%x. UU)";
     3.8 +Goal "UU = Abs_CFun(%x. UU)";
     3.9  by (simp_tac (HOL_ss addsimps [UU_def,UU_cfun_def]) 1);
    3.10  qed "inst_cfun_pcpo";
    3.11  
    3.12 @@ -15,7 +15,7 @@
    3.13  (* the contlub property for Rep_CFun its 'first' argument                       *)
    3.14  (* ------------------------------------------------------------------------ *)
    3.15  
    3.16 -val prems = goal thy "contlub(Rep_CFun)";
    3.17 +Goal "contlub(Rep_CFun)";
    3.18  by (rtac contlubI 1);
    3.19  by (strip_tac 1);
    3.20  by (rtac (expand_fun_eq RS iffD2) 1);
    3.21 @@ -34,7 +34,7 @@
    3.22  (* the cont property for Rep_CFun in its first argument                        *)
    3.23  (* ------------------------------------------------------------------------ *)
    3.24  
    3.25 -val prems = goal thy "cont(Rep_CFun)";
    3.26 +Goal "cont(Rep_CFun)";
    3.27  by (rtac monocontlub2cont 1);
    3.28  by (rtac monofun_Rep_CFun1 1);
    3.29  by (rtac contlub_Rep_CFun1 1);
    3.30 @@ -45,10 +45,9 @@
    3.31  (* contlub, cont properties of Rep_CFun in its first argument in mixfix _[_]   *)
    3.32  (* ------------------------------------------------------------------------ *)
    3.33  
    3.34 -val prems = goal thy 
    3.35 +Goal 
    3.36  "chain(FY) ==>\
    3.37  \ lub(range FY)`x = lub(range (%i. FY(i)`x))";
    3.38 -by (cut_facts_tac prems 1);
    3.39  by (rtac trans 1);
    3.40  by (etac (contlub_Rep_CFun1 RS contlubE RS spec RS mp RS fun_cong) 1);
    3.41  by (stac thelub_fun 1);
    3.42 @@ -57,10 +56,9 @@
    3.43  qed "contlub_cfun_fun";
    3.44  
    3.45  
    3.46 -val prems = goal thy 
    3.47 +Goal 
    3.48  "chain(FY) ==>\
    3.49  \ range(%i. FY(i)`x) <<| lub(range FY)`x";
    3.50 -by (cut_facts_tac prems 1);
    3.51  by (rtac thelubE 1);
    3.52  by (etac ch2ch_Rep_CFunL 1);
    3.53  by (etac (contlub_cfun_fun RS sym) 1);
    3.54 @@ -71,10 +69,9 @@
    3.55  (* contlub, cont  properties of Rep_CFun in both argument in mixfix _[_]       *)
    3.56  (* ------------------------------------------------------------------------ *)
    3.57  
    3.58 -val prems = goal thy 
    3.59 +Goal 
    3.60  "[|chain(FY);chain(TY)|] ==>\
    3.61  \ (lub(range FY))`(lub(range TY)) = lub(range(%i. FY(i)`(TY i)))";
    3.62 -by (cut_facts_tac prems 1);
    3.63  by (rtac contlub_CF2 1);
    3.64  by (rtac cont_Rep_CFun1 1);
    3.65  by (rtac allI 1);
    3.66 @@ -83,10 +80,9 @@
    3.67  by (atac 1);
    3.68  qed "contlub_cfun";
    3.69  
    3.70 -val prems = goal thy 
    3.71 +Goal 
    3.72  "[|chain(FY);chain(TY)|] ==>\
    3.73  \ range(%i.(FY i)`(TY i)) <<| (lub (range FY))`(lub(range TY))";
    3.74 -by (cut_facts_tac prems 1);
    3.75  by (rtac thelubE 1);
    3.76  by (rtac (monofun_Rep_CFun1 RS ch2ch_MF2LR) 1);
    3.77  by (rtac allI 1);
    3.78 @@ -113,7 +109,7 @@
    3.79  (* cont2mono Lemma for %x. LAM y. c1(x)(y)                                  *)
    3.80  (* ------------------------------------------------------------------------ *)
    3.81  
    3.82 -val [p1,p2] = goal thy 
    3.83 +val [p1,p2] = Goal  
    3.84   "[| !!x. cont(c1 x); !!y. monofun(%x. c1 x y)|] ==> monofun(%x. LAM y. c1 x y)";
    3.85  by (rtac monofunI 1);
    3.86  by (strip_tac 1);
    3.87 @@ -131,7 +127,7 @@
    3.88  (* cont2cont Lemma for %x. LAM y. c1 x y)                                 *)
    3.89  (* ------------------------------------------------------------------------ *)
    3.90  
    3.91 -val [p1,p2] = goal thy 
    3.92 +val [p1,p2] = Goal  
    3.93   "[| !!x. cont(c1 x); !!y. cont(%x. c1 x y) |] ==> cont(%x. LAM y. c1 x y)";
    3.94  by (rtac monocontlub2cont 1);
    3.95  by (rtac (p1 RS cont2mono_LAM) 1);
    3.96 @@ -166,7 +162,7 @@
    3.97  (* function application _[_]  is strict in its first arguments              *)
    3.98  (* ------------------------------------------------------------------------ *)
    3.99  
   3.100 -val prems = goal thy "(UU::'a::cpo->'b)`x = (UU::'b)";
   3.101 +Goal "(UU::'a::cpo->'b)`x = (UU::'b)";
   3.102  by (stac inst_cfun_pcpo 1);
   3.103  by (stac beta_cfun 1);
   3.104  by (Simp_tac 1);
   3.105 @@ -178,18 +174,17 @@
   3.106  (* results about strictify                                                  *)
   3.107  (* ------------------------------------------------------------------------ *)
   3.108  
   3.109 -val prems = goalw thy [Istrictify_def]
   3.110 +Goalw [Istrictify_def]
   3.111          "Istrictify(f)(UU)= (UU)";
   3.112  by (Simp_tac 1);
   3.113  qed "Istrictify1";
   3.114  
   3.115 -val prems = goalw thy [Istrictify_def]
   3.116 +Goalw [Istrictify_def]
   3.117          "~x=UU ==> Istrictify(f)(x)=f`x";
   3.118 -by (cut_facts_tac prems 1);
   3.119  by (Asm_simp_tac 1);
   3.120  qed "Istrictify2";
   3.121  
   3.122 -val prems = goal thy "monofun(Istrictify)";
   3.123 +Goal "monofun(Istrictify)";
   3.124  by (rtac monofunI 1);
   3.125  by (strip_tac 1);
   3.126  by (rtac (less_fun RS iffD2) 1);
   3.127 @@ -207,7 +202,7 @@
   3.128  by (rtac refl_less 1);
   3.129  qed "monofun_Istrictify1";
   3.130  
   3.131 -val prems = goal thy "monofun(Istrictify(f))";
   3.132 +Goal "monofun(Istrictify(f))";
   3.133  by (rtac monofunI 1);
   3.134  by (strip_tac 1);
   3.135  by (res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1);
   3.136 @@ -224,7 +219,7 @@
   3.137  qed "monofun_Istrictify2";
   3.138  
   3.139  
   3.140 -val prems = goal thy "contlub(Istrictify)";
   3.141 +Goal "contlub(Istrictify)";
   3.142  by (rtac contlubI 1);
   3.143  by (strip_tac 1);
   3.144  by (rtac (expand_fun_eq RS iffD2) 1);
   3.145 @@ -276,7 +271,7 @@
   3.146          (monofun_Istrictify2 RS monocontlub2cont)); 
   3.147  
   3.148  
   3.149 -val _ = goalw thy [strictify_def] "strictify`f`UU=UU";
   3.150 +Goalw [strictify_def] "strictify`f`UU=UU";
   3.151  by (stac beta_cfun 1);
   3.152  by (simp_tac (simpset() addsimps [cont_Istrictify2,cont_Istrictify1, cont2cont_CF1L]) 1);
   3.153  by (stac beta_cfun 1);
   3.154 @@ -284,14 +279,12 @@
   3.155  by (rtac Istrictify1 1);
   3.156  qed "strictify1";
   3.157  
   3.158 -val prems = goalw thy [strictify_def]
   3.159 -        "~x=UU ==> strictify`f`x=f`x";
   3.160 +Goalw [strictify_def] "~x=UU ==> strictify`f`x=f`x";
   3.161  by (stac beta_cfun 1);
   3.162  by (simp_tac (simpset() addsimps [cont_Istrictify2,cont_Istrictify1, cont2cont_CF1L]) 1);
   3.163  by (stac beta_cfun 1);
   3.164  by (rtac cont_Istrictify2 1);
   3.165 -by (rtac Istrictify2 1);
   3.166 -by (resolve_tac prems 1);
   3.167 +by (etac Istrictify2 1);
   3.168  qed "strictify2";
   3.169  
   3.170  
   3.171 @@ -326,7 +319,7 @@
   3.172  (* a prove for embedding projection pairs is similar                        *)
   3.173  (* ------------------------------------------------------------------------ *)
   3.174  
   3.175 -val prems = goal  thy  
   3.176 +Goal  
   3.177  "!!f g.[|!y. f`(g`y)=(y::'b) ; !x. g`(f`x)=(x::'a) |] \
   3.178  \ ==> f`UU=UU & g`UU=UU";
   3.179  by (rtac conjI 1);
   3.180 @@ -341,9 +334,7 @@
   3.181  qed "iso_strict";
   3.182  
   3.183  
   3.184 -val prems = goal thy 
   3.185 -        "[|!x. rep`(ab`x)=x;!y. ab`(rep`y)=y; z~=UU|] ==> rep`z ~= UU";
   3.186 -by (cut_facts_tac prems 1);
   3.187 +Goal "[|!x. rep`(ab`x)=x;!y. ab`(rep`y)=y; z~=UU|] ==> rep`z ~= UU";
   3.188  by (etac swap 1);
   3.189  by (dtac notnotD 1);
   3.190  by (dres_inst_tac [("f","ab")] cfun_arg_cong 1);
   3.191 @@ -353,9 +344,7 @@
   3.192  by (atac 1);
   3.193  qed "isorep_defined";
   3.194  
   3.195 -val prems = goal thy 
   3.196 -        "[|!x. rep`(ab`x) = x;!y. ab`(rep`y)=y ; z~=UU|] ==> ab`z ~= UU";
   3.197 -by (cut_facts_tac prems 1);
   3.198 +Goal "[|!x. rep`(ab`x) = x;!y. ab`(rep`y)=y ; z~=UU|] ==> ab`z ~= UU";
   3.199  by (etac swap 1);
   3.200  by (dtac notnotD 1);
   3.201  by (dres_inst_tac [("f","rep")] cfun_arg_cong 1);
   3.202 @@ -369,7 +358,7 @@
   3.203  (* propagation of flatness and chainfiniteness by continuous isomorphisms   *)
   3.204  (* ------------------------------------------------------------------------ *)
   3.205  
   3.206 -val prems = goal thy "!!f g.[|! Y::nat=>'a. chain Y --> (? n. max_in_chain n Y); \
   3.207 +Goal "!!f g.[|! Y::nat=>'a. chain Y --> (? n. max_in_chain n Y); \
   3.208  \ !y. f`(g`y)=(y::'b) ; !x. g`(f`x)=(x::'a::chfin) |] \
   3.209  \ ==> ! Y::nat=>'b. chain Y --> (? n. max_in_chain n Y)";
   3.210  by (rewtac max_in_chain_def);
   3.211 @@ -391,7 +380,7 @@
   3.212  qed "chfin2chfin";
   3.213  
   3.214  
   3.215 -val prems = goal thy "!!f g.[|!x y::'a. x<<y --> x=UU | x=y; \
   3.216 +Goal "!!f g.[|!x y::'a. x<<y --> x=UU | x=y; \
   3.217  \ !y. f`(g`y)=(y::'b); !x. g`(f`x)=(x::'a)|] ==> !x y::'b. x<<y --> x=UU | x=y";
   3.218  by (strip_tac 1);
   3.219  by (rtac disjE 1);
   3.220 @@ -419,9 +408,7 @@
   3.221  (* a result about functions with flat codomain                               *)
   3.222  (* ------------------------------------------------------------------------- *)
   3.223  
   3.224 -val prems = goal thy 
   3.225 -"f`(x::'a)=(c::'b::flat) ==> f`(UU::'a)=(UU::'b) | (!z. f`(z::'a)=c)";
   3.226 -by (cut_facts_tac prems 1);
   3.227 +Goal "f`(x::'a)=(c::'b::flat) ==> f`(UU::'a)=(UU::'b) | (!z. f`(z::'a)=c)";
   3.228  by (case_tac "f`(x::'a)=(UU::'b)" 1);
   3.229  by (rtac disjI1 1);
   3.230  by (rtac UU_I 1);
   3.231 @@ -448,13 +435,13 @@
   3.232  (* ------------------------------------------------------------------------ *)
   3.233  
   3.234  
   3.235 -val prems = goalw thy [ID_def] "ID`x=x";
   3.236 +Goalw [ID_def] "ID`x=x";
   3.237  by (stac beta_cfun 1);
   3.238  by (rtac cont_id 1);
   3.239  by (rtac refl 1);
   3.240  qed "ID1";
   3.241  
   3.242 -val _ = goalw thy [oo_def] "(f oo g)=(LAM x. f`(g`x))";
   3.243 +Goalw [oo_def] "(f oo g)=(LAM x. f`(g`x))";
   3.244  by (stac beta_cfun 1);
   3.245  by (Simp_tac 1);
   3.246  by (stac beta_cfun 1);
   3.247 @@ -462,7 +449,7 @@
   3.248  by (rtac refl 1);
   3.249  qed "cfcomp1";
   3.250  
   3.251 -val _ = goal thy  "(f oo g)`x=f`(g`x)";
   3.252 +Goal  "(f oo g)`x=f`(g`x)";
   3.253  by (stac cfcomp1 1);
   3.254  by (stac beta_cfun 1);
   3.255  by (Simp_tac 1);
   3.256 @@ -479,14 +466,14 @@
   3.257  (* ------------------------------------------------------------------------ *)
   3.258  
   3.259  
   3.260 -val prems = goal thy "f oo ID = f ";
   3.261 +Goal "f oo ID = f ";
   3.262  by (rtac ext_cfun 1);
   3.263  by (stac cfcomp2 1);
   3.264  by (stac ID1 1);
   3.265  by (rtac refl 1);
   3.266  qed "ID2";
   3.267  
   3.268 -val prems = goal thy "ID oo f = f ";
   3.269 +Goal "ID oo f = f ";
   3.270  by (rtac ext_cfun 1);
   3.271  by (stac cfcomp2 1);
   3.272  by (stac ID1 1);
   3.273 @@ -494,7 +481,7 @@
   3.274  qed "ID3";
   3.275  
   3.276  
   3.277 -val prems = goal thy "f oo (g oo h) = (f oo g) oo h";
   3.278 +Goal "f oo (g oo h) = (f oo g) oo h";
   3.279  by (rtac ext_cfun 1);
   3.280  by (res_inst_tac [("s","f`(g`(h`x))")] trans  1);
   3.281  by (stac cfcomp2 1);
     4.1 --- a/src/HOLCF/Cont.ML	Wed Jul 05 14:26:58 2000 +0200
     4.2 +++ b/src/HOLCF/Cont.ML	Wed Jul 05 16:37:52 2000 +0200
     4.3 @@ -10,43 +10,37 @@
     4.4  (* access to definition                                                     *)
     4.5  (* ------------------------------------------------------------------------ *)
     4.6  
     4.7 -val prems = goalw thy [contlub]
     4.8 +Goalw [contlub]
     4.9          "! Y. chain(Y) --> f(lub(range(Y))) = lub(range(%i. f(Y(i))))==>\
    4.10  \        contlub(f)";
    4.11 -by (cut_facts_tac prems 1);
    4.12  by (atac 1);
    4.13  qed "contlubI";
    4.14  
    4.15 -val prems = goalw thy [contlub]
    4.16 +Goalw [contlub]
    4.17          " contlub(f)==>\
    4.18  \         ! Y. chain(Y) --> f(lub(range(Y))) = lub(range(%i. f(Y(i))))";
    4.19 -by (cut_facts_tac prems 1);
    4.20  by (atac 1);
    4.21  qed "contlubE";
    4.22  
    4.23  
    4.24 -val prems = goalw thy [cont]
    4.25 +Goalw [cont]
    4.26   "! Y. chain(Y) --> range(% i. f(Y(i))) <<| f(lub(range(Y))) ==> cont(f)";
    4.27 -by (cut_facts_tac prems 1);
    4.28  by (atac 1);
    4.29  qed "contI";
    4.30  
    4.31 -val prems = goalw thy [cont]
    4.32 +Goalw [cont]
    4.33   "cont(f) ==> ! Y. chain(Y) --> range(% i. f(Y(i))) <<| f(lub(range(Y)))";
    4.34 -by (cut_facts_tac prems 1);
    4.35  by (atac 1);
    4.36  qed "contE";
    4.37  
    4.38  
    4.39 -val prems = goalw thy [monofun]
    4.40 +Goalw [monofun]
    4.41          "! x y. x << y --> f(x) << f(y) ==> monofun(f)";
    4.42 -by (cut_facts_tac prems 1);
    4.43  by (atac 1);
    4.44  qed "monofunI";
    4.45  
    4.46 -val prems = goalw thy [monofun]
    4.47 +Goalw [monofun]
    4.48          "monofun(f) ==> ! x y. x << y --> f(x) << f(y)";
    4.49 -by (cut_facts_tac prems 1);
    4.50  by (atac 1);
    4.51  qed "monofunE";
    4.52  
    4.53 @@ -59,35 +53,30 @@
    4.54  (* monotone functions map chains to chains                                  *)
    4.55  (* ------------------------------------------------------------------------ *)
    4.56  
    4.57 -val prems = goal thy 
    4.58 +Goal 
    4.59          "[| monofun(f); chain(Y) |] ==> chain(%i. f(Y(i)))";
    4.60 -by (cut_facts_tac prems 1);
    4.61  by (rtac chainI 1);
    4.62 -by (rtac allI 1);
    4.63  by (etac (monofunE RS spec RS spec RS mp) 1);
    4.64 -by (etac (chainE RS spec) 1);
    4.65 +by (etac (chainE) 1);
    4.66  qed "ch2ch_monofun";
    4.67  
    4.68  (* ------------------------------------------------------------------------ *)
    4.69  (* monotone functions map upper bound to upper bounds                       *)
    4.70  (* ------------------------------------------------------------------------ *)
    4.71  
    4.72 -val prems = goal thy 
    4.73 +Goal 
    4.74   "[| monofun(f); range(Y) <| u|]  ==> range(%i. f(Y(i))) <| f(u)";
    4.75 -by (cut_facts_tac prems 1);
    4.76  by (rtac ub_rangeI 1);
    4.77 -by (rtac allI 1);
    4.78  by (etac (monofunE RS spec RS spec RS mp) 1);
    4.79 -by (etac (ub_rangeE RS spec) 1);
    4.80 +by (etac (ub_rangeD) 1);
    4.81  qed "ub2ub_monofun";
    4.82  
    4.83  (* ------------------------------------------------------------------------ *)
    4.84  (* left to right: monofun(f) & contlub(f)  ==> cont(f)                     *)
    4.85  (* ------------------------------------------------------------------------ *)
    4.86  
    4.87 -val prems = goalw thy [cont]
    4.88 +Goalw [cont]
    4.89          "[|monofun(f);contlub(f)|] ==> cont(f)";
    4.90 -by (cut_facts_tac prems 1);
    4.91  by (strip_tac 1);
    4.92  by (rtac thelubE 1);
    4.93  by (etac ch2ch_monofun 1);
    4.94 @@ -155,77 +144,70 @@
    4.95  (* in both arguments                                                        *)
    4.96  (* ------------------------------------------------------------------------ *)
    4.97  
    4.98 -val prems = goal thy 
    4.99 +Goal 
   4.100  "[|monofun(MF2); chain(F)|] ==> chain(%i. MF2 (F i) x)";
   4.101 -by (cut_facts_tac prems 1);
   4.102  by (etac (ch2ch_monofun RS ch2ch_fun) 1);
   4.103  by (atac 1);
   4.104  qed "ch2ch_MF2L";
   4.105  
   4.106  
   4.107 -val prems = goal thy 
   4.108 +Goal 
   4.109  "[|monofun(MF2(f)); chain(Y)|] ==> chain(%i. MF2 f (Y i))";
   4.110 -by (cut_facts_tac prems 1);
   4.111  by (etac ch2ch_monofun 1);
   4.112  by (atac 1);
   4.113  qed "ch2ch_MF2R";
   4.114  
   4.115 -val prems = goal thy 
   4.116 +Goal 
   4.117  "[|monofun(MF2); !f. monofun(MF2(f)); chain(F); chain(Y)|] ==> \
   4.118  \  chain(%i. MF2(F(i))(Y(i)))";
   4.119 -by (cut_facts_tac prems 1);
   4.120  by (rtac chainI 1);
   4.121 -by (strip_tac 1 );
   4.122  by (rtac trans_less 1);
   4.123 -by (etac (ch2ch_MF2L RS chainE RS spec) 1);
   4.124 +by (etac (ch2ch_MF2L RS chainE) 1);
   4.125  by (atac 1);
   4.126  by ((rtac (monofunE RS spec RS spec RS mp) 1) THEN (etac spec 1));
   4.127 -by (etac (chainE RS spec) 1);
   4.128 +by (etac (chainE) 1);
   4.129  qed "ch2ch_MF2LR";
   4.130  
   4.131  
   4.132 -val prems = goal thy 
   4.133 +Goal 
   4.134  "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   4.135  \  !f. monofun(MF2(f)::('b::po=>'c::cpo));\
   4.136  \       chain(F);chain(Y)|] ==> \
   4.137  \       chain(%j. lub(range(%i. MF2 (F j) (Y i))))";
   4.138 -by (cut_facts_tac prems 1);
   4.139 -by (rtac (lub_mono RS allI RS chainI) 1);
   4.140 +by (rtac (lub_mono RS chainI) 1);
   4.141  by ((rtac ch2ch_MF2R 1) THEN (etac spec 1));
   4.142  by (atac 1);
   4.143  by ((rtac ch2ch_MF2R 1) THEN (etac spec 1));
   4.144  by (atac 1);
   4.145  by (strip_tac 1);
   4.146 -by (rtac (chainE RS spec) 1);
   4.147 +by (rtac (chainE) 1);
   4.148  by (etac ch2ch_MF2L 1);
   4.149  by (atac 1);
   4.150  qed "ch2ch_lubMF2R";
   4.151  
   4.152  
   4.153 -val prems = goal thy 
   4.154 +Goal 
   4.155  "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   4.156  \  !f. monofun(MF2(f)::('b::po=>'c::cpo));\
   4.157  \       chain(F);chain(Y)|] ==> \
   4.158  \       chain(%i. lub(range(%j. MF2 (F j) (Y i))))";
   4.159 -by (cut_facts_tac prems 1);
   4.160 -by (rtac (lub_mono RS allI RS chainI) 1);
   4.161 +by (rtac (lub_mono RS chainI) 1);
   4.162  by (etac ch2ch_MF2L 1);
   4.163  by (atac 1);
   4.164  by (etac ch2ch_MF2L 1);
   4.165  by (atac 1);
   4.166  by (strip_tac 1);
   4.167 -by (rtac (chainE RS spec) 1);
   4.168 +by (rtac (chainE) 1);
   4.169  by ((rtac ch2ch_MF2R 1) THEN (etac spec 1));
   4.170  by (atac 1);
   4.171  qed "ch2ch_lubMF2L";
   4.172  
   4.173  
   4.174 -val prems = goal thy 
   4.175 +Goal 
   4.176  "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   4.177  \  !f. monofun(MF2(f)::('b::po=>'c::cpo));\
   4.178  \       chain(F)|] ==> \
   4.179  \       monofun(% x. lub(range(% j. MF2 (F j) (x))))";
   4.180 -by (cut_facts_tac prems 1);
   4.181  by (rtac monofunI 1);
   4.182  by (strip_tac 1);
   4.183  by (rtac lub_mono 1);
   4.184 @@ -238,13 +220,12 @@
   4.185  by (atac 1);
   4.186  qed "lub_MF2_mono";
   4.187  
   4.188 -val prems = goal thy 
   4.189 +Goal 
   4.190  "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   4.191  \  !f. monofun(MF2(f)::('b::po=>'c::cpo));\
   4.192  \       chain(F); chain(Y)|] ==> \
   4.193  \               lub(range(%j. lub(range(%i. MF2(F j) (Y i))))) =\
   4.194  \               lub(range(%i. lub(range(%j. MF2(F j) (Y i)))))";
   4.195 -by (cut_facts_tac prems 1);
   4.196  by (rtac antisym_less 1);
   4.197  by (rtac (ub_rangeI RSN (2,is_lub_thelub)) 1);
   4.198  by (etac ch2ch_lubMF2R 1);
   4.199 @@ -275,13 +256,12 @@
   4.200  qed "ex_lubMF2";
   4.201  
   4.202  
   4.203 -val prems = goal thy 
   4.204 +Goal 
   4.205  "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   4.206  \  !f. monofun(MF2(f)::('b::po=>'c::cpo));\
   4.207  \  chain(FY);chain(TY)|] ==>\
   4.208  \ lub(range(%i. lub(range(%j. MF2(FY(j))(TY(i)))))) =\
   4.209  \ lub(range(%i. MF2(FY(i))(TY(i))))";
   4.210 -by (cut_facts_tac prems 1);
   4.211  by (rtac antisym_less 1);
   4.212  by (rtac (ub_rangeI RSN (2,is_lub_thelub)) 1);
   4.213  by (etac ch2ch_lubMF2L 1);
   4.214 @@ -295,7 +275,7 @@
   4.215  by (rtac allI 1);
   4.216  by (res_inst_tac [("m","i"),("n","ia")] nat_less_cases 1);
   4.217  by (res_inst_tac [("x","ia")] exI 1);
   4.218 -by (rtac (chain_mono RS mp) 1);
   4.219 +by (rtac (chain_mono) 1);
   4.220  by (etac allE 1);
   4.221  by (etac ch2ch_MF2R 1);
   4.222  by (REPEAT (atac 1));
   4.223 @@ -303,7 +283,7 @@
   4.224  by (res_inst_tac [("x","ia")] exI 1);
   4.225  by (rtac refl_less 1);
   4.226  by (res_inst_tac [("x","i")] exI 1);
   4.227 -by (rtac (chain_mono RS mp) 1);
   4.228 +by (rtac (chain_mono) 1);
   4.229  by (etac ch2ch_MF2L 1);
   4.230  by (REPEAT (atac 1));
   4.231  by (rtac lub_mono 1);
   4.232 @@ -317,13 +297,12 @@
   4.233  by (atac 1);
   4.234  qed "diag_lubMF2_1";
   4.235  
   4.236 -val prems = goal thy 
   4.237 +Goal 
   4.238  "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   4.239  \  !f. monofun(MF2(f)::('b::po=>'c::cpo));\
   4.240  \  chain(FY);chain(TY)|] ==>\
   4.241  \ lub(range(%j. lub(range(%i. MF2(FY(j))(TY(i)))))) =\
   4.242  \ lub(range(%i. MF2(FY(i))(TY(i))))";
   4.243 -by (cut_facts_tac prems 1);
   4.244  by (rtac trans 1);
   4.245  by (rtac ex_lubMF2 1);
   4.246  by (REPEAT (atac 1));
   4.247 @@ -337,46 +316,35 @@
   4.248  (* in both arguments                                                        *)
   4.249  (* ------------------------------------------------------------------------ *)
   4.250  
   4.251 -val prems = goal thy 
   4.252 -"[|cont(CF2);!f. cont(CF2(f));chain(FY);chain(TY)|] ==>\
   4.253 +val [prem1,prem2,prem3,prem4] = goal thy 
   4.254 +"[| cont(CF2); !f. cont(CF2(f)); chain(FY); chain(TY)|] ==>\
   4.255  \ CF2(lub(range(FY)))(lub(range(TY))) = lub(range(%i. CF2(FY(i))(TY(i))))";
   4.256 -by (cut_facts_tac prems 1);
   4.257 -by (stac ((hd prems) RS cont2contlub RS contlubE RS spec RS mp) 1);
   4.258 -by (atac 1);
   4.259 +by (cut_facts_tac [prem1,prem2,prem3, prem4] 1);
   4.260 +by (stac (prem1 RS cont2contlub RS contlubE RS spec RS mp) 1);
   4.261 +by (assume_tac 1);
   4.262  by (stac thelub_fun 1);
   4.263 -by (rtac ((hd prems) RS cont2mono RS ch2ch_monofun) 1);
   4.264 -by (atac 1);
   4.265 +by (rtac (prem1 RS (cont2mono RS ch2ch_monofun)) 1);
   4.266 +by (assume_tac 1);
   4.267  by (rtac trans 1);
   4.268 -by (rtac (((hd (tl prems)) RS spec RS cont2contlub) RS contlubE RS                spec RS mp RS ext RS arg_cong RS arg_cong) 1);
   4.269 -by (atac 1);
   4.270 -by (rtac diag_lubMF2_2 1);
   4.271 -by (etac cont2mono 1);
   4.272 -by (rtac allI 1);
   4.273 -by (etac allE 1);
   4.274 -by (etac cont2mono 1);
   4.275 -by (REPEAT (atac 1));
   4.276 +by (rtac ((prem2 RS spec RS cont2contlub) RS contlubE RS spec RS mp RS ext RS arg_cong RS arg_cong) 1);
   4.277 +by (rtac prem4 1);
   4.278 +by (blast_tac (claset() addIs [diag_lubMF2_2, cont2mono]) 1);
   4.279  qed "contlub_CF2";
   4.280  
   4.281  (* ------------------------------------------------------------------------ *)
   4.282  (* The following results are about application for functions in 'a=>'b      *)
   4.283  (* ------------------------------------------------------------------------ *)
   4.284  
   4.285 -val prems = goal thy 
   4.286 -        "f1 << f2 ==> f1(x) << f2(x)";
   4.287 -by (cut_facts_tac prems 1);
   4.288 +Goal "f1 << f2 ==> f1(x) << f2(x)";
   4.289  by (etac (less_fun RS iffD1 RS spec) 1);
   4.290  qed "monofun_fun_fun";
   4.291  
   4.292 -val prems = goal thy 
   4.293 -        "[|monofun(f); x1 << x2|] ==> f(x1) << f(x2)";
   4.294 -by (cut_facts_tac prems 1);
   4.295 +Goal "[|monofun(f); x1 << x2|] ==> f(x1) << f(x2)";
   4.296  by (etac (monofunE RS spec RS spec RS mp) 1);
   4.297  by (atac 1);
   4.298  qed "monofun_fun_arg";
   4.299  
   4.300 -val prems = goal thy 
   4.301 -"[|monofun(f1); monofun(f2); f1 << f2; x1 << x2|] ==> f1(x1) << f2(x2)";
   4.302 -by (cut_facts_tac prems 1);
   4.303 +Goal "[|monofun(f1); monofun(f2); f1 << f2; x1 << x2|] ==> f1(x1) << f2(x2)";
   4.304  by (rtac trans_less 1);
   4.305  by (etac monofun_fun_arg 1);
   4.306  by (atac 1);
   4.307 @@ -389,23 +357,20 @@
   4.308  (* continuity                                                               *)
   4.309  (* ------------------------------------------------------------------------ *)
   4.310  
   4.311 -val prems = goal thy 
   4.312 -        "[|monofun(c1)|] ==> monofun(%x. c1 x y)";
   4.313 -by (cut_facts_tac prems 1);
   4.314 +Goal "[|monofun(c1)|] ==> monofun(%x. c1 x y)";
   4.315  by (rtac monofunI 1);
   4.316  by (strip_tac 1);
   4.317  by (etac (monofun_fun_arg RS monofun_fun_fun) 1);
   4.318  by (atac 1);
   4.319  qed "mono2mono_MF1L";
   4.320  
   4.321 -val prems = goal thy 
   4.322 -        "[|cont(c1)|] ==> cont(%x. c1 x y)";
   4.323 -by (cut_facts_tac prems 1);
   4.324 +Goal "[|cont(c1)|] ==> cont(%x. c1 x y)";
   4.325  by (rtac monocontlub2cont 1);
   4.326  by (etac (cont2mono RS mono2mono_MF1L) 1);
   4.327  by (rtac contlubI 1);
   4.328  by (strip_tac 1);
   4.329 -by (rtac ((hd prems) RS cont2contlub RS contlubE RS spec RS mp RS ssubst) 1);
   4.330 +by (ftac asm_rl 1);
   4.331 +by (etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1);
   4.332  by (atac 1);
   4.333  by (stac thelub_fun 1);
   4.334  by (rtac ch2ch_monofun 1);
   4.335 @@ -416,20 +381,14 @@
   4.336  
   4.337  (*********  Note "(%x.%y.c1 x y) = c1" ***********)
   4.338  
   4.339 -val prems = goal thy
   4.340 -        "!y. monofun(%x. c1 x y) ==> monofun(c1)";
   4.341 -by (cut_facts_tac prems 1);
   4.342 +Goal "!y. monofun(%x. c1 x y) ==> monofun(c1)";
   4.343  by (rtac monofunI 1);
   4.344  by (strip_tac 1);
   4.345  by (rtac (less_fun RS iffD2) 1);
   4.346 -by (strip_tac 1);
   4.347 -by (rtac ((hd prems) RS spec RS monofunE RS spec RS spec RS mp) 1);
   4.348 -by (atac 1);
   4.349 +by (blast_tac (claset() addDs [monofunE]) 1);
   4.350  qed "mono2mono_MF1L_rev";
   4.351  
   4.352 -val prems = goal thy
   4.353 -        "!y. cont(%x. c1 x y) ==> cont(c1)";
   4.354 -by (cut_facts_tac prems 1);
   4.355 +Goal "!y. cont(%x. c1 x y) ==> cont(c1)";
   4.356  by (rtac monocontlub2cont 1);
   4.357  by (rtac (cont2mono RS allI RS mono2mono_MF1L_rev ) 1);
   4.358  by (etac spec 1);
   4.359 @@ -440,8 +399,7 @@
   4.360  by (rtac (cont2mono RS allI RS mono2mono_MF1L_rev RS ch2ch_monofun) 1);
   4.361  by (etac spec 1);
   4.362  by (atac 1);
   4.363 -by (rtac ((hd prems) RS spec RS cont2contlub RS contlubE RS spec RS mp) 1);
   4.364 -by (atac 1);
   4.365 +by (blast_tac (claset() addDs [ cont2contlub RS contlubE]) 1);
   4.366  qed "cont2cont_CF1L_rev";
   4.367  
   4.368  (* ------------------------------------------------------------------------ *)
   4.369 @@ -449,10 +407,9 @@
   4.370  (* never used here                                                          *)
   4.371  (* ------------------------------------------------------------------------ *)
   4.372  
   4.373 -val prems = goal thy
   4.374 +Goal
   4.375  "[|chain(Y::nat=>'a);!y. cont(%x.(c::'a::cpo=>'b::cpo=>'c::cpo) x y)|] ==>\
   4.376  \ (%y. lub(range(%i. c (Y i) y))) = (lub(range(%i.%y. c (Y i) y)))";
   4.377 -by (cut_facts_tac prems 1);
   4.378  by (rtac trans 1);
   4.379  by (rtac (cont2contlub RS contlubE RS spec RS mp) 2);
   4.380  by (atac 3);
   4.381 @@ -463,10 +420,8 @@
   4.382  by (atac 1);
   4.383  qed "contlub_abstraction";
   4.384  
   4.385 -val prems = goal thy 
   4.386 -"[|monofun(ft);!x. monofun(ft(x));monofun(tt)|] ==>\
   4.387 +Goal "[|monofun(ft);!x. monofun(ft(x));monofun(tt)|] ==>\
   4.388  \        monofun(%x.(ft(x))(tt(x)))";
   4.389 -by (cut_facts_tac prems 1);
   4.390  by (rtac monofunI 1);
   4.391  by (strip_tac 1);
   4.392  by (res_inst_tac [("f1.0","ft(x)"),("f2.0","ft(y)")] monofun_fun 1);
   4.393 @@ -479,9 +434,7 @@
   4.394  qed "mono2mono_app";
   4.395  
   4.396  
   4.397 -val prems = goal thy 
   4.398 -"[|cont(ft);!x. cont(ft(x));cont(tt)|] ==> contlub(%x.(ft(x))(tt(x)))";
   4.399 -by (cut_facts_tac prems 1);
   4.400 +Goal "[|cont(ft);!x. cont(ft(x));cont(tt)|] ==> contlub(%x.(ft(x))(tt(x)))";
   4.401  by (rtac contlubI 1);
   4.402  by (strip_tac 1);
   4.403  by (res_inst_tac [("f3","tt")] (contlubE RS spec RS mp RS ssubst) 1);
   4.404 @@ -509,7 +462,7 @@
   4.405  (* The identity function is continuous                                      *)
   4.406  (* ------------------------------------------------------------------------ *)
   4.407  
   4.408 -val prems = goal thy "cont(% x. x)";
   4.409 +Goal "cont(% x. x)";
   4.410  by (rtac contI 1);
   4.411  by (strip_tac 1);
   4.412  by (etac thelubE 1);
   4.413 @@ -520,16 +473,9 @@
   4.414  (* constant functions are continuous                                        *)
   4.415  (* ------------------------------------------------------------------------ *)
   4.416  
   4.417 -val prems = goalw thy [cont] "cont(%x. c)";
   4.418 +Goalw [cont] "cont(%x. c)";
   4.419  by (strip_tac 1);
   4.420 -by (rtac is_lubI 1);
   4.421 -by (rtac conjI 1);
   4.422 -by (rtac ub_rangeI 1);
   4.423 -by (strip_tac 1);
   4.424 -by (rtac refl_less 1);
   4.425 -by (strip_tac 1);
   4.426 -by (dtac ub_rangeE 1);
   4.427 -by (etac spec 1);
   4.428 +by (blast_tac (claset() addIs [is_lubI, ub_rangeI] addDs [ub_rangeD]) 1);
   4.429  qed "cont_const";
   4.430  
   4.431  
   4.432 @@ -541,7 +487,7 @@
   4.433  (* A non-emptyness result for Cfun                                          *)
   4.434  (* ------------------------------------------------------------------------ *)
   4.435  
   4.436 -val prems = goal thy "?x:Collect cont";
   4.437 +Goal "?x:Collect cont";
   4.438  by (rtac CollectI 1);
   4.439  by (rtac cont_const 1);
   4.440  qed "CfunI";
   4.441 @@ -550,9 +496,7 @@
   4.442  (* some properties of flat                                                  *)
   4.443  (* ------------------------------------------------------------------------ *)
   4.444  
   4.445 -val prems = goalw thy [monofun]
   4.446 -  "f UU = UU ==> monofun (f::'a::flat=>'b::pcpo)";
   4.447 -by (cut_facts_tac prems 1);
   4.448 +Goalw [monofun] "f UU = UU ==> monofun (f::'a::flat=>'b::pcpo)";
   4.449  by (strip_tac 1);
   4.450  by (dtac (ax_flat RS spec RS spec RS mp) 1);
   4.451  by (fast_tac ((HOL_cs addss (simpset() addsimps [minimal]))) 1);
     5.1 --- a/src/HOLCF/Cprod1.ML	Wed Jul 05 14:26:58 2000 +0200
     5.2 +++ b/src/HOLCF/Cprod1.ML	Wed Jul 05 16:37:52 2000 +0200
     5.3 @@ -11,16 +11,14 @@
     5.4  (* less_cprod is a partial order on 'a * 'b                                 *)
     5.5  (* ------------------------------------------------------------------------ *)
     5.6  
     5.7 -val prems = goal Prod.thy
     5.8 -        "[|fst x = fst y; snd x = snd y|] ==> x = y";
     5.9 -by (cut_facts_tac prems 1);
    5.10 +Goal "[|fst x = fst y; snd x = snd y|] ==> x = y";
    5.11  by (subgoal_tac "(fst x,snd x)=(fst y,snd y)" 1);
    5.12  by (rotate_tac ~1 1);
    5.13  by (asm_full_simp_tac(HOL_ss addsimps[surjective_pairing RS sym])1);
    5.14  by (asm_simp_tac (simpset_of Prod.thy) 1);
    5.15  qed "Sel_injective_cprod";
    5.16  
    5.17 -val prems = goalw Cprod1.thy [less_cprod_def] "(p::'a*'b) << p";
    5.18 +Goalw [less_cprod_def] "(p::'a*'b) << p";
    5.19  by (Simp_tac 1);
    5.20  qed "refl_less_cprod";
    5.21  
    5.22 @@ -30,9 +28,8 @@
    5.23  by (fast_tac (HOL_cs addIs [antisym_less]) 1);
    5.24  qed "antisym_less_cprod";
    5.25  
    5.26 -val prems = goalw thy [less_cprod_def]
    5.27 +Goalw [less_cprod_def]
    5.28          "[|(p1::'a*'b) << p2;p2 << p3|] ==> p1 << p3";
    5.29 -by (cut_facts_tac prems 1);
    5.30  by (rtac conjI 1);
    5.31  by (fast_tac (HOL_cs addIs [trans_less]) 1);
    5.32  by (fast_tac (HOL_cs addIs [trans_less]) 1);
     6.1 --- a/src/HOLCF/Cprod2.ML	Wed Jul 05 14:26:58 2000 +0200
     6.2 +++ b/src/HOLCF/Cprod2.ML	Wed Jul 05 16:37:52 2000 +0200
     6.3 @@ -7,37 +7,26 @@
     6.4  *)
     6.5  
     6.6  (* for compatibility with old HOLCF-Version *)
     6.7 -val prems = goal thy "(op <<)=(%x y. fst x<<fst y & snd x<<snd y)";
     6.8 +Goal "(op <<)=(%x y. fst x<<fst y & snd x<<snd y)";
     6.9  by (fold_goals_tac [less_cprod_def]);
    6.10  by (rtac refl 1);
    6.11  qed "inst_cprod_po";
    6.12  
    6.13 -val prems = goalw thy [inst_cprod_po RS eq_reflection] 
    6.14 - "(x1,y1) << (x2,y2) ==> x1 << x2 & y1 << y2";
    6.15 -by (cut_facts_tac prems 1);
    6.16 -by (etac conjE 1);
    6.17 -by (dtac (fst_conv RS subst) 1);
    6.18 -by (dtac (fst_conv RS subst) 1);
    6.19 -by (dtac (fst_conv RS subst) 1);
    6.20 -by (dtac (snd_conv RS subst) 1);
    6.21 -by (dtac (snd_conv RS subst) 1);
    6.22 -by (dtac (snd_conv RS subst) 1);
    6.23 -by (rtac conjI 1);
    6.24 -by (atac 1);
    6.25 -by (atac 1);
    6.26 +Goal "(x1,y1) << (x2,y2) ==> x1 << x2 & y1 << y2";
    6.27 +by (asm_full_simp_tac (simpset() addsimps [inst_cprod_po]) 1);
    6.28  qed "less_cprod4c";
    6.29  
    6.30  (* ------------------------------------------------------------------------ *)
    6.31  (* type cprod is pointed                                                    *)
    6.32  (* ------------------------------------------------------------------------ *)
    6.33  
    6.34 -val prems = goal thy  "(UU,UU)<<p";
    6.35 +Goal  "(UU,UU)<<p";
    6.36  by (simp_tac(simpset() addsimps[inst_cprod_po])1);
    6.37  qed "minimal_cprod";
    6.38  
    6.39  bind_thm ("UU_cprod_def",minimal_cprod RS minimal2UU RS sym);
    6.40  
    6.41 -val prems = goal thy "? x::'a*'b.!y. x<<y";
    6.42 +Goal "EX x::'a*'b. ALL y. x<<y";
    6.43  by (res_inst_tac [("x","(UU,UU)")] exI 1);
    6.44  by (rtac (minimal_cprod RS allI) 1);
    6.45  qed "least_cprod";
    6.46 @@ -46,19 +35,18 @@
    6.47  (* Pair <_,_>  is monotone in both arguments                                *)
    6.48  (* ------------------------------------------------------------------------ *)
    6.49  
    6.50 -val prems = goalw thy [monofun]  "monofun Pair";
    6.51 +Goalw [monofun]  "monofun Pair";
    6.52  by (strip_tac 1);
    6.53  by (rtac (less_fun RS iffD2) 1);
    6.54  by (strip_tac 1);
    6.55  by (asm_simp_tac (simpset() addsimps [inst_cprod_po]) 1);
    6.56  qed "monofun_pair1";
    6.57  
    6.58 -val prems = goalw thy [monofun]  "monofun(Pair x)";
    6.59 +Goalw [monofun]  "monofun(Pair x)";
    6.60  by (asm_simp_tac (simpset() addsimps [inst_cprod_po]) 1);
    6.61  qed "monofun_pair2";
    6.62  
    6.63 -val prems = goal thy "[|x1<<x2; y1<<y2|] ==> (x1::'a::cpo,y1::'b::cpo)<<(x2,y2)";
    6.64 -by (cut_facts_tac prems 1);
    6.65 +Goal "[|x1<<x2; y1<<y2|] ==> (x1::'a::cpo,y1::'b::cpo)<<(x2,y2)";
    6.66  by (rtac trans_less 1);
    6.67  by (rtac (monofun_pair1 RS monofunE RS spec RS spec RS mp RS (less_fun RS iffD1 RS spec)) 1);
    6.68  by (rtac (monofun_pair2 RS monofunE RS spec RS spec RS mp) 2);
    6.69 @@ -70,7 +58,7 @@
    6.70  (* fst and snd are monotone                                                 *)
    6.71  (* ------------------------------------------------------------------------ *)
    6.72  
    6.73 -val prems = goalw thy [monofun]  "monofun fst";
    6.74 +Goalw [monofun]  "monofun fst";
    6.75  by (strip_tac 1);
    6.76  by (res_inst_tac [("p","x")] PairE 1);
    6.77  by (hyp_subst_tac 1);
    6.78 @@ -80,7 +68,7 @@
    6.79  by (etac (less_cprod4c RS conjunct1) 1);
    6.80  qed "monofun_fst";
    6.81  
    6.82 -val prems = goalw thy [monofun]  "monofun snd";
    6.83 +Goalw [monofun]  "monofun snd";
    6.84  by (strip_tac 1);
    6.85  by (res_inst_tac [("p","x")] PairE 1);
    6.86  by (hyp_subst_tac 1);
    6.87 @@ -94,11 +82,10 @@
    6.88  (* the type 'a * 'b is a cpo                                                *)
    6.89  (* ------------------------------------------------------------------------ *)
    6.90  
    6.91 -val prems = goal thy 
    6.92 +Goal 
    6.93  "chain S ==> range S<<|(lub(range(%i. fst(S i))),lub(range(%i. snd(S i))))";
    6.94 -by (cut_facts_tac prems 1);
    6.95 -by (rtac (conjI RS is_lubI) 1);
    6.96 -by (rtac (allI RS ub_rangeI) 1);
    6.97 +by (rtac (is_lubI) 1);
    6.98 +by (rtac (ub_rangeI) 1);
    6.99  by (res_inst_tac [("t","S i")] (surjective_pairing RS ssubst) 1);
   6.100  by (rtac monofun_pair 1);
   6.101  by (rtac is_ub_thelub 1);
   6.102 @@ -124,8 +111,7 @@
   6.103  
   6.104  *)
   6.105  
   6.106 -val prems = goal thy "chain(S::nat=>'a::cpo*'b::cpo)==>? x. range S<<| x";
   6.107 -by (cut_facts_tac prems 1);
   6.108 +Goal "chain(S::nat=>'a::cpo*'b::cpo)==>EX x. range S<<| x";
   6.109  by (rtac exI 1);
   6.110  by (etac lub_cprod 1);
   6.111  qed "cpo_cprod";
     7.1 --- a/src/HOLCF/Cprod3.ML	Wed Jul 05 14:26:58 2000 +0200
     7.2 +++ b/src/HOLCF/Cprod3.ML	Wed Jul 05 16:37:52 2000 +0200
     7.3 @@ -7,7 +7,7 @@
     7.4  *)
     7.5  
     7.6  (* for compatibility with old HOLCF-Version *)
     7.7 -val prems = goal thy "UU = (UU,UU)";
     7.8 +Goal "UU = (UU,UU)";
     7.9  by (simp_tac (HOL_ss addsimps [UU_def,UU_cprod_def]) 1);
    7.10  qed "inst_cprod_pcpo";
    7.11  
    7.12 @@ -15,11 +15,10 @@
    7.13  (* continuity of (_,_) , fst, snd                                           *)
    7.14  (* ------------------------------------------------------------------------ *)
    7.15  
    7.16 -val prems = goal Cprod3.thy 
    7.17 +Goal 
    7.18  "chain(Y::(nat=>'a::cpo)) ==>\
    7.19  \ (lub(range(Y)),(x::'b::cpo)) =\
    7.20  \ (lub(range(%i. fst(Y i,x))),lub(range(%i. snd(Y i,x))))";
    7.21 -by (cut_facts_tac prems 1);
    7.22  by (res_inst_tac [("f1","Pair")] (arg_cong RS cong) 1);
    7.23  by (rtac lub_equal 1);
    7.24  by (atac 1);
    7.25 @@ -34,7 +33,7 @@
    7.26  by (rtac (lub_const RS thelubI) 1);
    7.27  qed "Cprod3_lemma1";
    7.28  
    7.29 -val prems = goal Cprod3.thy "contlub(Pair)";
    7.30 +Goal "contlub(Pair)";
    7.31  by (rtac contlubI 1);
    7.32  by (strip_tac 1);
    7.33  by (rtac (expand_fun_eq RS iffD2) 1);
    7.34 @@ -48,11 +47,10 @@
    7.35  by (etac Cprod3_lemma1 1);
    7.36  qed "contlub_pair1";
    7.37  
    7.38 -val prems = goal Cprod3.thy 
    7.39 +Goal 
    7.40  "chain(Y::(nat=>'a::cpo)) ==>\
    7.41  \ ((x::'b::cpo),lub(range Y)) =\
    7.42  \ (lub(range(%i. fst(x,Y i))),lub(range(%i. snd(x, Y i))))";
    7.43 -by (cut_facts_tac prems 1);
    7.44  by (res_inst_tac [("f1","Pair")] (arg_cong RS cong) 1);
    7.45  by (rtac sym 1);
    7.46  by (Simp_tac 1);
    7.47 @@ -66,7 +64,7 @@
    7.48  by (Simp_tac 1);
    7.49  qed "Cprod3_lemma2";
    7.50  
    7.51 -val prems = goal Cprod3.thy "contlub(Pair(x))";
    7.52 +Goal "contlub(Pair(x))";
    7.53  by (rtac contlubI 1);
    7.54  by (strip_tac 1);
    7.55  by (rtac trans 1);
    7.56 @@ -75,19 +73,19 @@
    7.57  by (etac Cprod3_lemma2 1);
    7.58  qed "contlub_pair2";
    7.59  
    7.60 -val prems = goal Cprod3.thy "cont(Pair)";
    7.61 +Goal "cont(Pair)";
    7.62  by (rtac monocontlub2cont 1);
    7.63  by (rtac monofun_pair1 1);
    7.64  by (rtac contlub_pair1 1);
    7.65  qed "cont_pair1";
    7.66  
    7.67 -val prems = goal Cprod3.thy "cont(Pair(x))";
    7.68 +Goal "cont(Pair(x))";
    7.69  by (rtac monocontlub2cont 1);
    7.70  by (rtac monofun_pair2 1);
    7.71  by (rtac contlub_pair2 1);
    7.72  qed "cont_pair2";
    7.73  
    7.74 -val prems = goal Cprod3.thy "contlub(fst)";
    7.75 +Goal "contlub(fst)";
    7.76  by (rtac contlubI 1);
    7.77  by (strip_tac 1);
    7.78  by (stac (lub_cprod RS thelubI) 1);
    7.79 @@ -95,7 +93,7 @@
    7.80  by (Simp_tac 1);
    7.81  qed "contlub_fst";
    7.82  
    7.83 -val prems = goal Cprod3.thy "contlub(snd)";
    7.84 +Goal "contlub(snd)";
    7.85  by (rtac contlubI 1);
    7.86  by (strip_tac 1);
    7.87  by (stac (lub_cprod RS thelubI) 1);
    7.88 @@ -103,13 +101,13 @@
    7.89  by (Simp_tac 1);
    7.90  qed "contlub_snd";
    7.91  
    7.92 -val prems = goal Cprod3.thy "cont(fst)";
    7.93 +Goal "cont(fst)";
    7.94  by (rtac monocontlub2cont 1);
    7.95  by (rtac monofun_fst 1);
    7.96  by (rtac contlub_fst 1);
    7.97  qed "cont_fst";
    7.98  
    7.99 -val prems = goal Cprod3.thy "cont(snd)";
   7.100 +Goal "cont(snd)";
   7.101  by (rtac monocontlub2cont 1);
   7.102  by (rtac monofun_snd 1);
   7.103  by (rtac contlub_snd 1);
   7.104 @@ -126,7 +124,7 @@
   7.105  (* convert all lemmas to the continuous versions                            *)
   7.106  (* ------------------------------------------------------------------------ *)
   7.107  
   7.108 -val prems = goalw Cprod3.thy [cpair_def]
   7.109 +Goalw [cpair_def]
   7.110          "(LAM x y.(x,y))`a`b = (a,b)";
   7.111  by (stac beta_cfun 1);
   7.112  by (simp_tac (simpset() addsimps [cont_pair1,cont_pair2,cont2cont_CF1L]) 1);
   7.113 @@ -135,16 +133,15 @@
   7.114  by (rtac refl 1);
   7.115  qed "beta_cfun_cprod";
   7.116  
   7.117 -val prems = goalw Cprod3.thy [cpair_def]
   7.118 +Goalw [cpair_def]
   7.119          " <a,b>=<aa,ba>  ==> a=aa & b=ba";
   7.120 -by (cut_facts_tac prems 1);
   7.121  by (dtac (beta_cfun_cprod RS subst) 1);
   7.122  by (dtac (beta_cfun_cprod RS subst) 1);
   7.123  by (etac Pair_inject 1);
   7.124  by (fast_tac HOL_cs 1);
   7.125  qed "inject_cpair";
   7.126  
   7.127 -val prems = goalw Cprod3.thy [cpair_def] "UU = <UU,UU>";
   7.128 +Goalw [cpair_def] "UU = <UU,UU>";
   7.129  by (rtac sym 1);
   7.130  by (rtac trans 1);
   7.131  by (rtac beta_cfun_cprod 1);
   7.132 @@ -152,14 +149,13 @@
   7.133  by (rtac inst_cprod_pcpo 1);
   7.134  qed "inst_cprod_pcpo2";
   7.135  
   7.136 -val prems = goal Cprod3.thy
   7.137 +Goal
   7.138   "<a,b> = UU ==> a = UU & b = UU";
   7.139 -by (cut_facts_tac prems 1);
   7.140  by (dtac (inst_cprod_pcpo2 RS subst) 1);
   7.141  by (etac inject_cpair 1);
   7.142  qed "defined_cpair_rev";
   7.143  
   7.144 -val prems = goalw Cprod3.thy [cpair_def]
   7.145 +Goalw [cpair_def]
   7.146          "? a b. z=<a,b>";
   7.147  by (rtac PairE 1);
   7.148  by (rtac exI 1);
   7.149 @@ -167,39 +163,37 @@
   7.150  by (etac (beta_cfun_cprod RS ssubst) 1);
   7.151  qed "Exh_Cprod2";
   7.152  
   7.153 -val prems = goalw Cprod3.thy [cpair_def]
   7.154 -"[|!!x y. [|p=<x,y> |] ==> Q|] ==> Q";
   7.155 +val prems = Goalw [cpair_def] "[|!!x y. [|p=<x,y> |] ==> Q|] ==> Q";
   7.156  by (rtac PairE 1);
   7.157  by (resolve_tac prems 1);
   7.158  by (etac (beta_cfun_cprod RS ssubst) 1);
   7.159  qed "cprodE";
   7.160  
   7.161 -val prems = goalw Cprod3.thy [cfst_def,cpair_def] 
   7.162 +Goalw [cfst_def,cpair_def] 
   7.163          "cfst`<x,y>=x";
   7.164 -by (cut_facts_tac prems 1);
   7.165  by (stac beta_cfun_cprod 1);
   7.166  by (stac beta_cfun 1);
   7.167  by (rtac cont_fst 1);
   7.168  by (Simp_tac  1);
   7.169  qed "cfst2";
   7.170  
   7.171 -val prems = goalw Cprod3.thy [csnd_def,cpair_def] 
   7.172 +Goalw [csnd_def,cpair_def] 
   7.173          "csnd`<x,y>=y";
   7.174 -by (cut_facts_tac prems 1);
   7.175  by (stac beta_cfun_cprod 1);
   7.176  by (stac beta_cfun 1);
   7.177  by (rtac cont_snd 1);
   7.178  by (Simp_tac  1);
   7.179  qed "csnd2";
   7.180  
   7.181 -val _ = goal Cprod3.thy "cfst`UU = UU";
   7.182 +Goal "cfst`UU = UU";
   7.183  by (simp_tac (HOL_ss addsimps [inst_cprod_pcpo2,cfst2]) 1);
   7.184  qed "cfst_strict";
   7.185 -val _ = goal Cprod3.thy "csnd`UU = UU";
   7.186 +
   7.187 +Goal "csnd`UU = UU";
   7.188  by (simp_tac (HOL_ss addsimps [inst_cprod_pcpo2,csnd2]) 1);
   7.189  qed "csnd_strict";
   7.190  
   7.191 -val prems = goalw Cprod3.thy [cfst_def,csnd_def,cpair_def] "<cfst`p , csnd`p> = p";
   7.192 +Goalw [cfst_def,csnd_def,cpair_def] "<cfst`p , csnd`p> = p";
   7.193  by (stac beta_cfun_cprod 1);
   7.194  by (stac beta_cfun 1);
   7.195  by (rtac cont_snd 1);
   7.196 @@ -208,19 +202,17 @@
   7.197  by (rtac (surjective_pairing RS sym) 1);
   7.198  qed "surjective_pairing_Cprod2";
   7.199  
   7.200 -val prems = goalw Cprod3.thy [cfst_def,csnd_def,cpair_def]
   7.201 +Goalw [cfst_def,csnd_def,cpair_def]
   7.202   "<xa,ya> << <x,y> ==> xa<<x & ya << y";
   7.203 -by (cut_facts_tac prems 1);
   7.204  by (rtac less_cprod4c 1);
   7.205  by (dtac (beta_cfun_cprod RS subst) 1);
   7.206  by (dtac (beta_cfun_cprod RS subst) 1);
   7.207  by (atac 1);
   7.208  qed "less_cprod5c";
   7.209  
   7.210 -val prems = goalw Cprod3.thy [cfst_def,csnd_def,cpair_def]
   7.211 +Goalw [cfst_def,csnd_def,cpair_def]
   7.212  "[|chain(S)|] ==> range(S) <<| \
   7.213  \ <(lub(range(%i. cfst`(S i)))) , lub(range(%i. csnd`(S i)))>";
   7.214 -by (cut_facts_tac prems 1);
   7.215  by (stac beta_cfun_cprod 1);
   7.216  by (stac (beta_cfun RS ext) 1);
   7.217  by (rtac cont_snd 1);
   7.218 @@ -236,14 +228,14 @@
   7.219   lub (range ?S1) =
   7.220   <lub (range (%i. cfst`(?S1 i))), lub (range (%i. csnd`(?S1 i)))>" 
   7.221  *)
   7.222 -val prems = goalw Cprod3.thy [csplit_def]
   7.223 +Goalw [csplit_def]
   7.224          "csplit`f`<x,y> = f`x`y";
   7.225  by (stac beta_cfun 1);
   7.226  by (Simp_tac 1);
   7.227  by (simp_tac (simpset() addsimps [cfst2,csnd2]) 1);
   7.228  qed "csplit2";
   7.229  
   7.230 -val prems = goalw Cprod3.thy [csplit_def]
   7.231 +Goalw [csplit_def]
   7.232    "csplit`cpair`z=z";
   7.233  by (stac beta_cfun 1);
   7.234  by (Simp_tac 1);
     8.1 --- a/src/HOLCF/Fix.ML	Wed Jul 05 14:26:58 2000 +0200
     8.2 +++ b/src/HOLCF/Fix.ML	Wed Jul 05 16:37:52 2000 +0200
     8.3 @@ -10,13 +10,9 @@
     8.4  (* derive inductive properties of iterate from primitive recursion          *)
     8.5  (* ------------------------------------------------------------------------ *)
     8.6  
     8.7 -val prems = goal thy "iterate (Suc n) F x = iterate n F (F`x)";
     8.8 +Goal "iterate (Suc n) F x = iterate n F (F`x)";
     8.9  by (induct_tac "n" 1);
    8.10 -by (Simp_tac 1);
    8.11 -by (stac iterate_Suc 1);
    8.12 -by (stac iterate_Suc 1);
    8.13 -by (etac ssubst 1);
    8.14 -by (rtac refl 1);
    8.15 +by Auto_tac;  
    8.16  qed "iterate_Suc2";
    8.17  
    8.18  (* ------------------------------------------------------------------------ *)
    8.19 @@ -24,20 +20,15 @@
    8.20  (* This property is essential since monotonicity of iterate makes no sense  *)
    8.21  (* ------------------------------------------------------------------------ *)
    8.22  
    8.23 -val prems = goalw thy [chain] 
    8.24 -        " x << F`x ==> chain (%i. iterate i F x)";
    8.25 -by (cut_facts_tac prems 1);
    8.26 +Goalw [chain]  "x << F`x ==> chain (%i. iterate i F x)";
    8.27  by (strip_tac 1);
    8.28 -by (Simp_tac 1);
    8.29  by (induct_tac "i" 1);
    8.30 -by (Asm_simp_tac 1);
    8.31 -by (Asm_simp_tac 1);
    8.32 +by Auto_tac;  
    8.33  by (etac monofun_cfun_arg 1);
    8.34  qed "chain_iterate2";
    8.35  
    8.36  
    8.37 -val prems = goal thy  
    8.38 -        "chain (%i. iterate i F UU)";
    8.39 +Goal   "chain (%i. iterate i F UU)";
    8.40  by (rtac chain_iterate2 1);
    8.41  by (rtac minimal 1);
    8.42  qed "chain_iterate";
    8.43 @@ -49,7 +40,7 @@
    8.44  (* ------------------------------------------------------------------------ *)
    8.45  
    8.46  
    8.47 -val prems = goalw thy [Ifix_def] "Ifix F =F`(Ifix F)";
    8.48 +Goalw [Ifix_def] "Ifix F =F`(Ifix F)";
    8.49  by (stac contlub_cfun_arg 1);
    8.50  by (rtac chain_iterate 1);
    8.51  by (rtac antisym_less 1);
    8.52 @@ -59,20 +50,18 @@
    8.53  by (rtac chain_iterate 1);
    8.54  by (rtac allI 1);
    8.55  by (rtac (iterate_Suc RS subst) 1);
    8.56 -by (rtac (chain_iterate RS chainE RS spec) 1);
    8.57 +by (rtac (chain_iterate RS chainE) 1);
    8.58  by (rtac is_lub_thelub 1);
    8.59  by (rtac ch2ch_Rep_CFunR 1);
    8.60  by (rtac chain_iterate 1);
    8.61  by (rtac ub_rangeI 1);
    8.62 -by (rtac allI 1);
    8.63  by (rtac (iterate_Suc RS subst) 1);
    8.64  by (rtac is_ub_thelub 1);
    8.65  by (rtac chain_iterate 1);
    8.66  qed "Ifix_eq";
    8.67  
    8.68  
    8.69 -val prems = goalw thy [Ifix_def] "F`x=x ==> Ifix(F) << x";
    8.70 -by (cut_facts_tac prems 1);
    8.71 +Goalw [Ifix_def] "F`x=x ==> Ifix(F) << x";
    8.72  by (rtac is_lub_thelub 1);
    8.73  by (rtac chain_iterate 1);
    8.74  by (rtac ub_rangeI 1);
    8.75 @@ -103,7 +92,7 @@
    8.76  (* In this special case it is the application function Rep_CFun                 *)
    8.77  (* ------------------------------------------------------------------------ *)
    8.78  
    8.79 -val prems = goalw thy [contlub] "contlub(iterate(i))";
    8.80 +Goalw [contlub] "contlub(iterate(i))";
    8.81  by (strip_tac 1);
    8.82  by (induct_tac "i" 1);
    8.83  by (Asm_simp_tac 1);
    8.84 @@ -112,10 +101,9 @@
    8.85  by (rtac ext 1);
    8.86  by (stac thelub_fun 1);
    8.87  by (rtac chainI 1);
    8.88 -by (rtac allI 1);
    8.89  by (rtac (less_fun RS iffD2) 1);
    8.90  by (rtac allI 1);
    8.91 -by (rtac (chainE RS spec) 1);
    8.92 +by (rtac (chainE) 1);
    8.93  by (rtac (monofun_Rep_CFun1 RS ch2ch_MF2LR) 1);
    8.94  by (rtac allI 1);
    8.95  by (rtac monofun_Rep_CFun2 1);
    8.96 @@ -132,7 +120,7 @@
    8.97  qed "contlub_iterate";
    8.98  
    8.99  
   8.100 -val prems = goal thy "cont(iterate(i))";
   8.101 +Goal "cont(iterate(i))";
   8.102  by (rtac monocontlub2cont 1);
   8.103  by (rtac monofun_iterate 1);
   8.104  by (rtac contlub_iterate 1);
   8.105 @@ -142,7 +130,7 @@
   8.106  (* a lemma about continuity of iterate in its third argument                *)
   8.107  (* ------------------------------------------------------------------------ *)
   8.108  
   8.109 -val prems = goal thy "monofun(iterate n F)";
   8.110 +Goal "monofun(iterate n F)";
   8.111  by (rtac monofunI 1);
   8.112  by (strip_tac 1);
   8.113  by (induct_tac "n" 1);
   8.114 @@ -164,7 +152,7 @@
   8.115  by (etac (monofun_iterate2 RS ch2ch_monofun) 1);
   8.116  qed "contlub_iterate2";
   8.117  
   8.118 -val prems = goal thy "cont (iterate n F)";
   8.119 +Goal "cont (iterate n F)";
   8.120  by (rtac monocontlub2cont 1);
   8.121  by (rtac monofun_iterate2 1);
   8.122  by (rtac contlub_iterate2 1);
   8.123 @@ -189,16 +177,15 @@
   8.124  (* be derived for lubs in this argument                                     *)
   8.125  (* ------------------------------------------------------------------------ *)
   8.126  
   8.127 -val prems = goal thy   
   8.128 +Goal   
   8.129  "chain(Y) ==> chain(%i. lub(range(%ia. iterate ia (Y i) UU)))";
   8.130 -by (cut_facts_tac prems 1);
   8.131  by (rtac chainI 1);
   8.132  by (strip_tac 1);
   8.133  by (rtac lub_mono 1);
   8.134  by (rtac chain_iterate 1);
   8.135  by (rtac chain_iterate 1);
   8.136  by (strip_tac 1);
   8.137 -by (etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun RS chainE RS spec) 1);
   8.138 +by (etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun RS chainE) 1);
   8.139  qed "chain_iterate_lub";
   8.140  
   8.141  (* ------------------------------------------------------------------------ *)
   8.142 @@ -207,18 +194,16 @@
   8.143  (* chains is the essential argument which is usually derived from monot.    *)
   8.144  (* ------------------------------------------------------------------------ *)
   8.145  
   8.146 -Goal
   8.147 - "chain(Y) ==>iterate n (lub(range Y)) y = lub(range(%i. iterate n (Y i) y))";
   8.148 +Goal "chain(Y) ==>iterate n (lub(range Y)) y = lub(range(%i. iterate n (Y i) y))";
   8.149  by (rtac (thelub_fun RS subst) 1);
   8.150  by (etac (monofun_iterate RS ch2ch_monofun) 1);
   8.151  by (asm_simp_tac (simpset() addsimps [contlub_iterate RS contlubE]) 1);
   8.152  qed "contlub_Ifix_lemma1";
   8.153  
   8.154  
   8.155 -val prems = goal thy  "chain(Y) ==>\
   8.156 +Goal  "chain(Y) ==>\
   8.157  \         lub(range(%i. lub(range(%ia. iterate i (Y ia) UU)))) =\
   8.158  \         lub(range(%i. lub(range(%ia. iterate ia (Y i) UU))))";
   8.159 -by (cut_facts_tac prems 1);
   8.160  by (rtac antisym_less 1);
   8.161  by (rtac is_lub_thelub 1);
   8.162  by (rtac (contlub_Ifix_lemma1 RS ext RS subst) 1);
   8.163 @@ -247,7 +232,7 @@
   8.164  qed "ex_lub_iterate";
   8.165  
   8.166  
   8.167 -val prems = goalw thy [contlub,Ifix_def] "contlub(Ifix)";
   8.168 +Goalw [contlub,Ifix_def] "contlub(Ifix)";
   8.169  by (strip_tac 1);
   8.170  by (stac (contlub_Ifix_lemma1 RS ext) 1);
   8.171  by (atac 1);
   8.172 @@ -255,7 +240,7 @@
   8.173  qed "contlub_Ifix";
   8.174  
   8.175  
   8.176 -val prems = goal thy "cont(Ifix)";
   8.177 +Goal "cont(Ifix)";
   8.178  by (rtac monocontlub2cont 1);
   8.179  by (rtac monofun_Ifix 1);
   8.180  by (rtac contlub_Ifix 1);
   8.181 @@ -265,21 +250,19 @@
   8.182  (* propagate properties of Ifix to its continuous counterpart               *)
   8.183  (* ------------------------------------------------------------------------ *)
   8.184  
   8.185 -val prems = goalw thy [fix_def] "fix`F = F`(fix`F)";
   8.186 +Goalw [fix_def] "fix`F = F`(fix`F)";
   8.187  by (asm_simp_tac (simpset() addsimps [cont_Ifix]) 1);
   8.188  by (rtac Ifix_eq 1);
   8.189  qed "fix_eq";
   8.190  
   8.191 -val prems = goalw thy [fix_def] "F`x = x ==> fix`F << x";
   8.192 -by (cut_facts_tac prems 1);
   8.193 +Goalw [fix_def] "F`x = x ==> fix`F << x";
   8.194  by (asm_simp_tac (simpset() addsimps [cont_Ifix]) 1);
   8.195  by (etac Ifix_least 1);
   8.196  qed "fix_least";
   8.197  
   8.198  
   8.199 -val prems = goal thy
   8.200 +Goal
   8.201  "[| F`x = x; !z. F`z = z --> x << z |] ==> x = fix`F";
   8.202 -by (cut_facts_tac prems 1);
   8.203  by (rtac antisym_less 1);
   8.204  by (etac allE 1);
   8.205  by (etac mp 1);
   8.206 @@ -288,28 +271,24 @@
   8.207  qed "fix_eqI";
   8.208  
   8.209  
   8.210 -val prems = goal thy "f == fix`F ==> f = F`f";
   8.211 -by (rewrite_goals_tac prems);
   8.212 -by (rtac fix_eq 1);
   8.213 +Goal "f == fix`F ==> f = F`f";
   8.214 +by (asm_simp_tac (simpset() addsimps [fix_eq RS sym]) 1);
   8.215  qed "fix_eq2";
   8.216  
   8.217 -val prems = goal thy "f == fix`F ==> f`x = F`f`x";
   8.218 -by (rtac trans 1);
   8.219 -by (rtac ((hd prems) RS fix_eq2 RS cfun_fun_cong) 1);
   8.220 -by (rtac refl 1);
   8.221 +Goal "f == fix`F ==> f`x = F`f`x";
   8.222 +by (etac (fix_eq2 RS cfun_fun_cong) 1);
   8.223  qed "fix_eq3";
   8.224  
   8.225  fun fix_tac3 thm i  = ((rtac trans i) THEN (rtac (thm RS fix_eq3) i)); 
   8.226  
   8.227 -val prems = goal thy "f = fix`F ==> f = F`f";
   8.228 -by (cut_facts_tac prems 1);
   8.229 +Goal "f = fix`F ==> f = F`f";
   8.230  by (hyp_subst_tac 1);
   8.231  by (rtac fix_eq 1);
   8.232  qed "fix_eq4";
   8.233  
   8.234 -val prems = goal thy "f = fix`F ==> f`x = F`f`x";
   8.235 +Goal "f = fix`F ==> f`x = F`f`x";
   8.236  by (rtac trans 1);
   8.237 -by (rtac ((hd prems) RS fix_eq4 RS cfun_fun_cong) 1);
   8.238 +by (etac (fix_eq4 RS cfun_fun_cong) 1);
   8.239  by (rtac refl 1);
   8.240  qed "fix_eq5";
   8.241  
   8.242 @@ -346,7 +325,7 @@
   8.243  (* ------------------------------------------------------------------------ *)
   8.244  
   8.245  
   8.246 -val prems = goal thy "Ifix=(%x. lub(range(%i. iterate i x UU)))";
   8.247 +Goal "Ifix=(%x. lub(range(%i. iterate i x UU)))";
   8.248  by (rtac ext 1);
   8.249  by (rewtac Ifix_def);
   8.250  by (rtac refl 1);
   8.251 @@ -356,8 +335,7 @@
   8.252  (* direct connection between fix and iteration without Ifix                 *)
   8.253  (* ------------------------------------------------------------------------ *)
   8.254  
   8.255 -val prems = goalw thy [fix_def]
   8.256 - "fix`F = lub(range(%i. iterate i F UU))";
   8.257 +Goalw [fix_def] "fix`F = lub(range(%i. iterate i F UU))";
   8.258  by (fold_goals_tac [Ifix_def]);
   8.259  by (asm_simp_tac (simpset() addsimps [cont_Ifix]) 1);
   8.260  qed "fix_def2";
   8.261 @@ -371,17 +349,16 @@
   8.262  (* access to definitions                                                    *)
   8.263  (* ------------------------------------------------------------------------ *)
   8.264  
   8.265 -val prems = goalw thy [adm_def]
   8.266 -        "(!!Y. [| chain(Y); !i. P(Y(i)) |] ==> P(lub(range(Y)))) ==> adm(P)";
   8.267 -by (fast_tac (HOL_cs addIs prems) 1);
   8.268 +val prems = Goalw [adm_def]
   8.269 +   "(!!Y. [| chain(Y); !i. P(Y(i)) |] ==> P(lub(range(Y)))) ==> adm(P)";
   8.270 +by (blast_tac (claset() addIs prems) 1);
   8.271  qed "admI";
   8.272  
   8.273  Goalw [adm_def] "[| adm(P); chain(Y); !i. P(Y(i)) |] ==> P(lub(range(Y)))";
   8.274  by (Blast_tac 1);
   8.275  qed "admD";
   8.276  
   8.277 -val prems = goalw thy [admw_def]
   8.278 -        "admw(P) = (!F.(!n. P(iterate n F UU)) -->\
   8.279 +Goalw [admw_def] "admw(P) = (!F.(!n. P(iterate n F UU)) -->\
   8.280  \                        P (lub(range(%i. iterate i F UU))))";
   8.281  by (rtac refl 1);
   8.282  qed "admw_def2";
   8.283 @@ -390,7 +367,7 @@
   8.284  (* an admissible formula is also weak admissible                            *)
   8.285  (* ------------------------------------------------------------------------ *)
   8.286  
   8.287 -val prems = goalw thy [admw_def] "!!P. adm(P)==>admw(P)";
   8.288 +Goalw [admw_def] "!!P. adm(P)==>admw(P)";
   8.289  by (strip_tac 1);
   8.290  by (etac admD 1);
   8.291  by (rtac chain_iterate 1);
   8.292 @@ -401,23 +378,19 @@
   8.293  (* fixed point induction                                                    *)
   8.294  (* ------------------------------------------------------------------------ *)
   8.295  
   8.296 -val prems = goal  thy  
   8.297 -"[| adm(P);P(UU);!!x. P(x) ==> P(F`x)|] ==> P(fix`F)";
   8.298 -by (cut_facts_tac prems 1);
   8.299 +val major::prems = Goal
   8.300 +     "[| adm(P); P(UU); !!x. P(x) ==> P(F`x)|] ==> P(fix`F)";
   8.301  by (stac fix_def2 1);
   8.302 -by (etac admD 1);
   8.303 +by (rtac (major RS admD) 1);
   8.304  by (rtac chain_iterate 1);
   8.305  by (rtac allI 1);
   8.306  by (induct_tac "i" 1);
   8.307 -by (stac iterate_0 1);
   8.308 -by (atac 1);
   8.309 -by (stac iterate_Suc 1);
   8.310 -by (resolve_tac prems 1);
   8.311 -by (atac 1);
   8.312 +by (asm_simp_tac (simpset() addsimps (iterate_0::prems)) 1);
   8.313 +by (asm_simp_tac (simpset() addsimps (iterate_Suc::prems)) 1);
   8.314  qed "fix_ind";
   8.315  
   8.316 -val prems = goal thy "[| f == fix`F; adm(P); \
   8.317 -\       P(UU);!!x. P(x) ==> P(F`x)|] ==> P f";
   8.318 +val prems = Goal "[| f == fix`F; adm(P); \
   8.319 +\       P(UU); !!x. P(x) ==> P(F`x)|] ==> P f";
   8.320  by (cut_facts_tac prems 1);
   8.321  by (asm_simp_tac HOL_ss 1);
   8.322  by (etac fix_ind 1);
   8.323 @@ -429,9 +402,7 @@
   8.324  (* computational induction for weak admissible formulae                     *)
   8.325  (* ------------------------------------------------------------------------ *)
   8.326  
   8.327 -val prems = goal  thy  
   8.328 -"[| admw(P); !n. P(iterate n F UU)|] ==> P(fix`F)";
   8.329 -by (cut_facts_tac prems 1);
   8.330 +Goal "[| admw(P); !n. P(iterate n F UU)|] ==> P(fix`F)";
   8.331  by (stac fix_def2 1);
   8.332  by (rtac (admw_def2 RS iffD1 RS spec RS mp) 1);
   8.333  by (atac 1);
   8.334 @@ -439,9 +410,8 @@
   8.335  by (etac spec 1);
   8.336  qed "wfix_ind";
   8.337  
   8.338 -val prems = goal thy "[| f == fix`F; admw(P); \
   8.339 +Goal "[| f == fix`F; admw(P); \
   8.340  \       !n. P(iterate n F UU) |] ==> P f";
   8.341 -by (cut_facts_tac prems 1);
   8.342  by (asm_simp_tac HOL_ss 1);
   8.343  by (etac wfix_ind 1);
   8.344  by (atac 1);
   8.345 @@ -451,9 +421,8 @@
   8.346  (* for chain-finite (easy) types every formula is admissible                *)
   8.347  (* ------------------------------------------------------------------------ *)
   8.348  
   8.349 -val prems = goalw thy [adm_def]
   8.350 +Goalw [adm_def]
   8.351  "!Y. chain(Y::nat=>'a) --> (? n. max_in_chain n Y) ==> adm(P::'a=>bool)";
   8.352 -by (cut_facts_tac prems 1);
   8.353  by (strip_tac 1);
   8.354  by (rtac exE 1);
   8.355  by (rtac mp 1);
   8.356 @@ -484,7 +453,7 @@
   8.357  (* improved admisibility introduction                                       *)
   8.358  (* ------------------------------------------------------------------------ *)
   8.359  
   8.360 -val prems = goalw thy [adm_def]
   8.361 +val prems = Goalw [adm_def]
   8.362   "(!!Y. [| chain Y; !i. P (Y i); !i. ? j. i < j & Y i ~= Y j & Y i << Y j |]\
   8.363  \ ==> P(lub (range Y))) ==> adm P";
   8.364  by (strip_tac 1);
   8.365 @@ -500,38 +469,31 @@
   8.366  (* admissibility of special formulae and propagation                        *)
   8.367  (* ------------------------------------------------------------------------ *)
   8.368  
   8.369 -val prems = goalw thy [adm_def]
   8.370 -        "[|cont u;cont v|]==> adm(%x. u x << v x)";
   8.371 -by (cut_facts_tac prems 1);
   8.372 +Goalw [adm_def] "[|cont u;cont v|]==> adm(%x. u x << v x)";
   8.373  by (strip_tac 1);
   8.374 +by (forw_inst_tac [("f","u")] (cont2mono RS ch2ch_monofun) 1);
   8.375 +by (assume_tac  1);
   8.376 +by (forw_inst_tac [("f","v")] (cont2mono RS ch2ch_monofun) 1);
   8.377 +by (assume_tac  1);
   8.378  by (etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1);
   8.379  by (atac 1);
   8.380  by (etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1);
   8.381  by (atac 1);
   8.382 -by (rtac lub_mono 1);
   8.383 -by (cut_facts_tac prems 1);
   8.384 -by (etac (cont2mono RS ch2ch_monofun) 1);
   8.385 -by (atac 1);
   8.386 -by (cut_facts_tac prems 1);
   8.387 -by (etac (cont2mono RS ch2ch_monofun) 1);
   8.388 -by (atac 1);
   8.389 -by (atac 1);
   8.390 +by (blast_tac (claset() addIs [lub_mono]) 1);
   8.391  qed "adm_less";
   8.392  Addsimps [adm_less];
   8.393  
   8.394 -val prems = goal  thy  
   8.395 -        "!!P. [| adm P; adm Q |] ==> adm(%x. P x & Q x)";
   8.396 +Goal   "!!P. [| adm P; adm Q |] ==> adm(%x. P x & Q x)";
   8.397  by (fast_tac (HOL_cs addEs [admD] addIs [admI]) 1);
   8.398  qed "adm_conj";
   8.399  Addsimps [adm_conj];
   8.400  
   8.401 -val prems = goalw thy [adm_def] "adm(%x. t)";
   8.402 +Goalw [adm_def] "adm(%x. t)";
   8.403  by (fast_tac HOL_cs 1);
   8.404  qed "adm_not_free";
   8.405  Addsimps [adm_not_free];
   8.406  
   8.407 -val prems = goalw thy [adm_def]
   8.408 -        "!!t. cont t ==> adm(%x.~ (t x) << u)";
   8.409 +Goalw [adm_def] "!!t. cont t ==> adm(%x.~ (t x) << u)";
   8.410  by (strip_tac 1);
   8.411  by (rtac contrapos 1);
   8.412  by (etac spec 1);
   8.413 @@ -542,15 +504,13 @@
   8.414  by (atac 1);
   8.415  qed "adm_not_less";
   8.416  
   8.417 -val prems = goal thy  
   8.418 -        "!!P. !y. adm(P y) ==> adm(%x.!y. P y x)";
   8.419 +Goal   "!!P. !y. adm(P y) ==> adm(%x.!y. P y x)";
   8.420  by (fast_tac (HOL_cs addIs [admI] addEs [admD]) 1);
   8.421  qed "adm_all";
   8.422  
   8.423  bind_thm ("adm_all2", allI RS adm_all);
   8.424  
   8.425 -val prems = goal  thy  
   8.426 -        "!!P. [|cont t; adm P|] ==> adm(%x. P (t x))";
   8.427 +Goal   "!!P. [|cont t; adm P|] ==> adm(%x. P (t x))";
   8.428  by (rtac admI 1);
   8.429  by (stac (cont2contlub RS contlubE RS spec RS mp) 1);
   8.430  by (atac 1);
   8.431 @@ -561,7 +521,7 @@
   8.432  by (atac 1);
   8.433  qed "adm_subst";
   8.434  
   8.435 -val prems = goal  thy "adm(%x.~ UU << t(x))";
   8.436 +Goal "adm(%x.~ UU << t(x))";
   8.437  by (Simp_tac 1);
   8.438  qed "adm_UU_not_less";
   8.439  
   8.440 @@ -589,32 +549,27 @@
   8.441  (* ------------------------------------------------------------------------ *)
   8.442  
   8.443  
   8.444 -val prems = goal HOL.thy 
   8.445 -  "!n. P(Y n)|Q(Y n) ==> (? i.!j. R i j --> Q(Y(j))) | (!i.? j. R i j & P(Y(j)))";
   8.446 -by (cut_facts_tac prems 1);
   8.447 -by (fast_tac HOL_cs 1);
   8.448 +Goal  "!n. P(Y n)|Q(Y n) ==> (? i.!j. R i j --> Q(Y(j))) | (!i.? j. R i j & P(Y(j)))";
   8.449 +by (Fast_tac 1);
   8.450  qed "adm_disj_lemma1";
   8.451  
   8.452 -val _ = goal thy  
   8.453 -  "!!Q. [| adm(Q); ? X. chain(X) & (!n. Q(X(n))) &\
   8.454 +Goal "[| adm(Q); ? X. chain(X) & (!n. Q(X(n))) &\
   8.455    \   lub(range(Y))=lub(range(X))|] ==> Q(lub(range(Y)))";
   8.456 -by (fast_tac (claset() addEs [admD] addss simpset()) 1);
   8.457 +by (force_tac (claset() addEs [admD], simpset()) 1);
   8.458  qed "adm_disj_lemma2";
   8.459  
   8.460 -val _ = goalw thy [chain]
   8.461 -  "!!Q. chain(Y) ==> chain(%m. if m < Suc i then Y(Suc i) else Y m)";
   8.462 +Goalw [chain] "chain(Y) ==> chain(%m. if m < Suc i then Y(Suc i) else Y m)";
   8.463  by (Asm_simp_tac 1);
   8.464  by (safe_tac HOL_cs);
   8.465  by (subgoal_tac "ia = i" 1);
   8.466  by (ALLGOALS Asm_simp_tac);
   8.467  qed "adm_disj_lemma3";
   8.468  
   8.469 -val _ = goal Arith.thy
   8.470 -  "!!Q. !j. i < j --> Q(Y(j))  ==> !n. Q( if n < Suc i then Y(Suc i) else Y n)";
   8.471 -by (asm_simp_tac (simpset_of Arith.thy) 1);
   8.472 +Goal "!j. i < j --> Q(Y(j))  ==> !n. Q( if n < Suc i then Y(Suc i) else Y n)";
   8.473 +by (Asm_simp_tac 1);
   8.474  qed "adm_disj_lemma4";
   8.475  
   8.476 -val prems = goal thy
   8.477 +Goal
   8.478    "!!Y::nat=>'a::cpo. [| chain(Y); ! j. i < j --> Q(Y(j)) |] ==>\
   8.479    \       lub(range(Y)) = lub(range(%m. if m< Suc(i) then Y(Suc(i)) else Y m))";
   8.480  by (safe_tac (HOL_cs addSIs [lub_equal2,adm_disj_lemma3]));
   8.481 @@ -623,10 +578,9 @@
   8.482  by (Asm_simp_tac 1);
   8.483  qed "adm_disj_lemma5";
   8.484  
   8.485 -val prems = goal thy
   8.486 +Goal
   8.487    "[| chain(Y::nat=>'a::cpo); ? i. ! j. i < j --> Q(Y(j)) |] ==>\
   8.488    \         ? X. chain(X) & (! n. Q(X(n))) & lub(range(Y)) = lub(range(X))";
   8.489 -by (cut_facts_tac prems 1);
   8.490  by (etac exE 1);
   8.491  by (res_inst_tac [("x","%m. if m<Suc(i) then Y(Suc(i)) else Y m")] exI 1);
   8.492  by (rtac conjI 1);
   8.493 @@ -640,12 +594,10 @@
   8.494  by (atac 1);
   8.495  qed "adm_disj_lemma6";
   8.496  
   8.497 -val prems = goal thy 
   8.498 +Goal 
   8.499    "[| chain(Y::nat=>'a::cpo); ! i. ? j. i < j & P(Y(j))  |] ==>\
   8.500    \         chain(%m. Y(Least(%j. m<j & P(Y(j)))))";
   8.501 -by (cut_facts_tac prems 1);
   8.502  by (rtac chainI 1);
   8.503 -by (rtac allI 1);
   8.504  by (rtac chain_mono3 1);
   8.505  by (atac 1);
   8.506  by (rtac Least_le 1);
   8.507 @@ -661,19 +613,17 @@
   8.508  by (atac 1);
   8.509  qed "adm_disj_lemma7";
   8.510  
   8.511 -val prems = goal thy 
   8.512 +Goal 
   8.513    "[| ! i. ? j. i < j & P(Y(j)) |] ==> ! m. P(Y(LEAST j::nat. m<j & P(Y(j))))";
   8.514 -by (cut_facts_tac prems 1);
   8.515  by (strip_tac 1);
   8.516  by (etac allE 1);
   8.517  by (etac exE 1);
   8.518  by (etac (LeastI RS conjunct2) 1);
   8.519  qed "adm_disj_lemma8";
   8.520  
   8.521 -val prems = goal thy
   8.522 +Goal
   8.523    "[| chain(Y::nat=>'a::cpo); ! i. ? j. i < j & P(Y(j)) |] ==>\
   8.524    \         lub(range(Y)) = lub(range(%m. Y(Least(%j. m<j & P(Y(j))))))";
   8.525 -by (cut_facts_tac prems 1);
   8.526  by (rtac antisym_less 1);
   8.527  by (rtac lub_mono 1);
   8.528  by (atac 1);
   8.529 @@ -681,7 +631,7 @@
   8.530  by (atac 1);
   8.531  by (atac 1);
   8.532  by (strip_tac 1);
   8.533 -by (rtac (chain_mono RS mp) 1);
   8.534 +by (rtac (chain_mono) 1);
   8.535  by (atac 1);
   8.536  by (etac allE 1);
   8.537  by (etac exE 1);
   8.538 @@ -694,15 +644,13 @@
   8.539  by (atac 1);
   8.540  by (strip_tac 1);
   8.541  by (rtac exI 1);
   8.542 -by (rtac (chain_mono RS mp) 1);
   8.543 +by (rtac (chain_mono) 1);
   8.544  by (atac 1);
   8.545  by (rtac lessI 1);
   8.546  qed "adm_disj_lemma9";
   8.547  
   8.548 -val prems = goal thy
   8.549 -  "[| chain(Y::nat=>'a::cpo); ! i. ? j. i < j & P(Y(j)) |] ==>\
   8.550 +Goal "[| chain(Y::nat=>'a::cpo); ! i. ? j. i < j & P(Y(j)) |] ==>\
   8.551    \         ? X. chain(X) & (! n. P(X(n))) & lub(range(Y)) = lub(range(X))";
   8.552 -by (cut_facts_tac prems 1);
   8.553  by (res_inst_tac [("x","%m. Y(Least(%j. m<j & P(Y(j))))")] exI 1);
   8.554  by (rtac conjI 1);
   8.555  by (rtac adm_disj_lemma7 1);
   8.556 @@ -716,25 +664,21 @@
   8.557  by (atac 1);
   8.558  qed "adm_disj_lemma10";
   8.559  
   8.560 -val prems = goal thy
   8.561 -  "[| adm(P); chain(Y);? i. ! j. i < j --> P(Y(j))|]==>P(lub(range(Y)))";
   8.562 -by (cut_facts_tac prems 1);
   8.563 +Goal "[| adm(P); chain(Y);? i. ! j. i < j --> P(Y(j))|]==>P(lub(range(Y)))";
   8.564  by (etac adm_disj_lemma2 1);
   8.565  by (etac adm_disj_lemma6 1);
   8.566  by (atac 1);
   8.567  qed "adm_disj_lemma12";
   8.568  
   8.569  
   8.570 -val prems = goal thy
   8.571 +Goal
   8.572  "[| adm(P); chain(Y); ! i. ? j. i < j & P(Y(j)) |]==>P(lub(range(Y)))";
   8.573 -by (cut_facts_tac prems 1);
   8.574  by (etac adm_disj_lemma2 1);
   8.575  by (etac adm_disj_lemma10 1);
   8.576  by (atac 1);
   8.577  qed "adm_lemma11";
   8.578  
   8.579 -val prems = goal thy  
   8.580 -        "!!P. [| adm P; adm Q |] ==> adm(%x. P x | Q x)";
   8.581 +Goal   "!!P. [| adm P; adm Q |] ==> adm(%x. P x | Q x)";
   8.582  by (rtac admI 1);
   8.583  by (rtac (adm_disj_lemma1 RS disjE) 1);
   8.584  by (atac 1);
   8.585 @@ -752,8 +696,7 @@
   8.586  bind_thm("adm_lemma11",adm_lemma11);
   8.587  bind_thm("adm_disj",adm_disj);
   8.588  
   8.589 -val prems = goal  thy  
   8.590 -        "!!P. [| adm(%x.~(P x)); adm Q |] ==> adm(%x. P x --> Q x)";
   8.591 +Goal   "!!P. [| adm(%x.~(P x)); adm Q |] ==> adm(%x. P x --> Q x)";
   8.592  by (subgoal_tac "(%x. P x --> Q x) = (%x. ~P x | Q x)" 1);
   8.593  by (etac ssubst 1);
   8.594  by (etac adm_disj 1);
   8.595 @@ -770,9 +713,7 @@
   8.596  qed"adm_iff";
   8.597  
   8.598  
   8.599 -val prems= goal  thy  
   8.600 -"[| adm (%x. ~ P x); adm (%x. ~ Q x) |] ==> adm (%x. ~ (P x & Q x))";
   8.601 -by (cut_facts_tac prems 1);
   8.602 +Goal "[| adm (%x. ~ P x); adm (%x. ~ Q x) |] ==> adm (%x. ~ (P x & Q x))";
   8.603  by (subgoal_tac "(%x. ~ (P x & Q x)) = (%x. ~ P x | ~ Q x)" 1);
   8.604  by (rtac ext 2);
   8.605  by (fast_tac HOL_cs 2);
     9.1 --- a/src/HOLCF/Fun2.ML	Wed Jul 05 14:26:58 2000 +0200
     9.2 +++ b/src/HOLCF/Fun2.ML	Wed Jul 05 16:37:52 2000 +0200
     9.3 @@ -7,7 +7,7 @@
     9.4  *)
     9.5  
     9.6  (* for compatibility with old HOLCF-Version *)
     9.7 -val prems = goal thy "(op <<)=(%f g.!x. f x << g x)";
     9.8 +Goal "(op <<)=(%f g.!x. f x << g x)";
     9.9  by (fold_goals_tac [less_fun_def]);
    9.10  by (rtac refl 1);
    9.11  qed "inst_fun_po";
    9.12 @@ -16,13 +16,13 @@
    9.13  (* Type 'a::term => 'b::pcpo is pointed                                     *)
    9.14  (* ------------------------------------------------------------------------ *)
    9.15  
    9.16 -val prems = goal thy "(%z. UU) << x";
    9.17 +Goal "(%z. UU) << x";
    9.18  by (simp_tac (simpset() addsimps [inst_fun_po,minimal]) 1);
    9.19  qed "minimal_fun";
    9.20  
    9.21  bind_thm ("UU_fun_def",minimal_fun RS minimal2UU RS sym);
    9.22  
    9.23 -val prems = goal thy "? x::'a=>'b::pcpo.!y. x<<y";
    9.24 +Goal "? x::'a=>'b::pcpo.!y. x<<y";
    9.25  by (res_inst_tac [("x","(%z. UU)")] exI 1);
    9.26  by (rtac (minimal_fun RS allI) 1);
    9.27  qed "least_fun";
    9.28 @@ -31,7 +31,7 @@
    9.29  (* make the symbol << accessible for type fun                               *)
    9.30  (* ------------------------------------------------------------------------ *)
    9.31  
    9.32 -val prems = goal thy "(f1 << f2) = (! x. f1(x) << f2(x))";
    9.33 +Goal "(f1 << f2) = (! x. f1(x) << f2(x))";
    9.34  by (stac inst_fun_po 1);
    9.35  by (rtac refl 1);
    9.36  qed "less_fun";
    9.37 @@ -48,29 +48,21 @@
    9.38  (* upper bounds of function chains yield upper bound in the po range        *)
    9.39  (* ------------------------------------------------------------------------ *)
    9.40  
    9.41 -val prems = goal Fun2.thy 
    9.42 -   " range(S::nat=>('a::term => 'b::po)) <| u ==> range(%i. S i x) <| u(x)";
    9.43 -by (cut_facts_tac prems 1);
    9.44 +Goal "range(S::nat=>('a::term => 'b::po)) <| u ==> range(%i. S i x) <| u(x)";
    9.45  by (rtac ub_rangeI 1);
    9.46 -by (rtac allI 1);
    9.47 -by (rtac allE 1);
    9.48 -by (rtac (less_fun RS subst) 1);
    9.49 -by (etac (ub_rangeE RS spec) 1);
    9.50 -by (atac 1);
    9.51 +by (dtac ub_rangeD 1);
    9.52 +by (asm_full_simp_tac (simpset() addsimps [less_fun]) 1);
    9.53 +by Auto_tac; 	
    9.54  qed "ub2ub_fun";
    9.55  
    9.56  (* ------------------------------------------------------------------------ *)
    9.57  (* Type 'a::term => 'b::pcpo is chain complete                              *)
    9.58  (* ------------------------------------------------------------------------ *)
    9.59  
    9.60 -val prems = goal  Fun2.thy
    9.61 -        "chain(S::nat=>('a::term => 'b::cpo)) ==> \
    9.62 +Goal "chain(S::nat=>('a::term => 'b::cpo)) ==> \
    9.63  \        range(S) <<| (% x. lub(range(% i. S(i)(x))))";
    9.64 -by (cut_facts_tac prems 1);
    9.65  by (rtac is_lubI 1);
    9.66 -by (rtac conjI 1);
    9.67  by (rtac ub_rangeI 1);
    9.68 -by (rtac allI 1);
    9.69  by (stac less_fun 1);
    9.70  by (rtac allI 1);
    9.71  by (rtac is_ub_thelub 1);
    9.72 @@ -86,9 +78,7 @@
    9.73  bind_thm ("thelub_fun", lub_fun RS thelubI);
    9.74  (* chain ?S1 ==> lub (range ?S1) = (%x. lub (range (%i. ?S1 i x))) *)
    9.75  
    9.76 -val prems = goal  Fun2.thy
    9.77 -        "chain(S::nat=>('a::term => 'b::cpo)) ==> ? x. range(S) <<| x";
    9.78 -by (cut_facts_tac prems 1);
    9.79 +Goal "chain(S::nat=>('a::term => 'b::cpo)) ==> ? x. range(S) <<| x";
    9.80  by (rtac exI 1);
    9.81  by (etac lub_fun 1);
    9.82  qed "cpo_fun";
    10.1 --- a/src/HOLCF/Fun3.ML	Wed Jul 05 14:26:58 2000 +0200
    10.2 +++ b/src/HOLCF/Fun3.ML	Wed Jul 05 16:37:52 2000 +0200
    10.3 @@ -5,6 +5,6 @@
    10.4  *)
    10.5  
    10.6  (* for compatibility with old HOLCF-Version *)
    10.7 -val prems = goal thy "UU = (%x. UU)";
    10.8 +Goal "UU = (%x. UU)";
    10.9  by (simp_tac (HOL_ss addsimps [UU_def,UU_fun_def]) 1);
   10.10  qed "inst_fun_pcpo";
    11.1 --- a/src/HOLCF/Lift1.ML	Wed Jul 05 14:26:58 2000 +0200
    11.2 +++ b/src/HOLCF/Lift1.ML	Wed Jul 05 16:37:52 2000 +0200
    11.3 @@ -17,14 +17,12 @@
    11.4  by (fast_tac HOL_cs 1);
    11.5  qed"refl_less_lift";
    11.6  
    11.7 -val prems = goalw thy [less_lift_def] 
    11.8 +Goalw [less_lift_def] 
    11.9    "[|(x1::'a lift) << x2; x2 << x1|] ==> x1 = x2";
   11.10 -by (cut_facts_tac prems 1);
   11.11  by (fast_tac HOL_cs 1);
   11.12  qed"antisym_less_lift";
   11.13  
   11.14 -val prems = goalw Lift1.thy [less_lift_def] 
   11.15 +Goalw [less_lift_def] 
   11.16    "[|(x1::'a lift) << x2; x2 << x3|] ==> x1 << x3";
   11.17 -by (cut_facts_tac prems 1);
   11.18  by (fast_tac HOL_cs 1);
   11.19  qed"trans_less_lift";
    12.1 --- a/src/HOLCF/Lift2.ML	Wed Jul 05 14:26:58 2000 +0200
    12.2 +++ b/src/HOLCF/Lift2.ML	Wed Jul 05 16:37:52 2000 +0200
    12.3 @@ -7,7 +7,7 @@
    12.4  *)
    12.5  
    12.6  (* for compatibility with old HOLCF-Version *)
    12.7 -val prems = goal thy "(op <<)=(%x y. x=y|x=Undef)";
    12.8 +Goal "(op <<)=(%x y. x=y|x=Undef)";
    12.9  by (fold_goals_tac [less_lift_def]);
   12.10  by (rtac refl 1);
   12.11  qed "inst_lift_po";
   12.12 @@ -22,7 +22,9 @@
   12.13  
   12.14  bind_thm ("UU_lift_def",minimal_lift RS minimal2UU RS sym);
   12.15  
   12.16 -val prems = goal thy "? x::'a lift.!y. x<<y";
   12.17 +AddIffs [minimal_lift];
   12.18 +
   12.19 +Goal "EX x::'a lift. ALL y. x<<y";
   12.20  by (res_inst_tac [("x","Undef")] exI 1);
   12.21  by (rtac (minimal_lift RS allI) 1);
   12.22  qed "least_lift";
   12.23 @@ -39,41 +41,37 @@
   12.24  (* Tailoring notUU_I of Pcpo.ML to Undef *)
   12.25  
   12.26  Goal "[| x<<y; ~x=Undef |] ==> ~y=Undef";
   12.27 -by (etac contrapos 1);
   12.28 -by (hyp_subst_tac 1);
   12.29 -by (rtac antisym_less 1);
   12.30 -by (atac 1);
   12.31 -by (rtac minimal_lift 1);
   12.32 +by (blast_tac (claset() addIs [antisym_less]) 1);
   12.33  qed"notUndef_I";
   12.34  
   12.35  
   12.36  (* Tailoring chain_mono2 of Pcpo.ML to Undef *)
   12.37  
   12.38 -Goal "[| ? j.~Y(j)=Undef; chain(Y::nat=>('a)lift) |] \
   12.39 -\        ==> ? j.!i. j<i-->~Y(i)=Undef";
   12.40 +Goal "[| EX j.~Y(j)=Undef; chain(Y::nat=>('a)lift) |] \
   12.41 +\        ==> EX j. ALL i. j<i-->~Y(i)=Undef";
   12.42  by Safe_tac;
   12.43  by (Step_tac 1);
   12.44  by (strip_tac 1);
   12.45  by (rtac notUndef_I 1);
   12.46  by (atac 2);
   12.47 -by (etac (chain_mono RS mp) 1);
   12.48 +by (etac (chain_mono) 1);
   12.49  by (atac 1);
   12.50  qed"chain_mono2_po";
   12.51  
   12.52  
   12.53  (* Tailoring flat_imp_chfin of Fix.ML to lift *)
   12.54  
   12.55 -Goal "(! Y. chain(Y::nat=>('a)lift)-->(? n. max_in_chain n Y))";
   12.56 +Goal "(ALL Y. chain(Y::nat=>('a)lift)-->(EX n. max_in_chain n Y))";
   12.57  by (rewtac max_in_chain_def);  
   12.58  by (strip_tac 1);
   12.59 -by (res_inst_tac [("P","!i. Y(i)=Undef")] case_split_thm  1);
   12.60 +by (res_inst_tac [("P","ALL i. Y(i)=Undef")] case_split_thm  1);
   12.61  by (res_inst_tac [("x","0")] exI 1);
   12.62  by (strip_tac 1);
   12.63  by (rtac trans 1);
   12.64  by (etac spec 1);
   12.65  by (rtac sym 1);
   12.66  by (etac spec 1); 
   12.67 -by (subgoal_tac "!x y. x<<(y::('a)lift) --> x=Undef | x=y" 1);
   12.68 +by (subgoal_tac "ALL x y. x<<(y::('a)lift) --> x=Undef | x=y" 1);
   12.69  by (simp_tac (simpset() addsimps [inst_lift_po]) 2);
   12.70  by (rtac (chain_mono2_po RS exE) 1); 
   12.71  by (Fast_tac 1); 
   12.72 @@ -86,29 +84,16 @@
   12.73  by (dtac spec 1);
   12.74  by (etac spec 1); 
   12.75  by (etac (le_imp_less_or_eq RS disjE) 1); 
   12.76 -by (etac (chain_mono RS mp) 1); 
   12.77 -by (atac 1); 
   12.78 -by (hyp_subst_tac 1); 
   12.79 -by (rtac refl_less 1); 
   12.80 -by (res_inst_tac [("P","Y(Suc(x)) = Undef")] notE 1); 
   12.81 -by (atac 2); 
   12.82 -by (rtac mp 1); 
   12.83 -by (etac spec 1); 
   12.84 -by (Asm_simp_tac 1);
   12.85 +by (etac (chain_mono) 1);
   12.86 +by Auto_tac;   
   12.87  qed"flat_imp_chfin_poo";
   12.88  
   12.89  
   12.90  (* Main Lemma: cpo_lift *)
   12.91  
   12.92 -Goal "chain(Y::nat=>('a)lift) ==> ? x. range(Y) <<|x";
   12.93 +Goal "chain(Y::nat=>('a)lift) ==> EX x. range(Y) <<|x";
   12.94  by (cut_inst_tac [] flat_imp_chfin_poo 1);
   12.95 -by (Step_tac 1);
   12.96 -by Safe_tac;
   12.97 -by (Step_tac 1); 
   12.98 -by (rtac exI 1);
   12.99 -by (rtac lub_finch1 1);
  12.100 -by (atac 1);
  12.101 -by (atac 1);
  12.102 +by (blast_tac (claset() addIs [lub_finch1]) 1);
  12.103  qed"cpo_lift";
  12.104  
  12.105  
    13.1 --- a/src/HOLCF/Lift3.ML	Wed Jul 05 14:26:58 2000 +0200
    13.2 +++ b/src/HOLCF/Lift3.ML	Wed Jul 05 16:37:52 2000 +0200
    13.3 @@ -8,7 +8,7 @@
    13.4  
    13.5  
    13.6  (* for compatibility with old HOLCF-Version *)
    13.7 -val prems = goal thy "UU = Undef";
    13.8 +Goal "UU = Undef";
    13.9  by (simp_tac (HOL_ss addsimps [UU_def,UU_lift_def]) 1);
   13.10  qed "inst_lift_pcpo";
   13.11  
   13.12 @@ -86,8 +86,7 @@
   13.13  by (Asm_simp_tac 1);
   13.14  qed"Lift_exhaust";
   13.15  
   13.16 -val prems = goal thy 
   13.17 -  "[| x = UU ==> P; ? a. x = Def a ==> P |] ==> P";
   13.18 +val prems = Goal "[| x = UU ==> P; ? a. x = Def a ==> P |] ==> P";
   13.19  by (cut_facts_tac [Lift_exhaust] 1);
   13.20  by (fast_tac (HOL_cs addSEs prems) 1);
   13.21  qed"Lift_cases";
   13.22 @@ -103,13 +102,11 @@
   13.23  
   13.24  bind_thm("Undef_eq_UU", inst_lift_pcpo RS sym);
   13.25  
   13.26 -val prems = goal thy "Def x = UU ==> R";
   13.27 -by (cut_facts_tac prems 1);
   13.28 +Goal "Def x = UU ==> R";
   13.29  by (asm_full_simp_tac (HOL_ss addsimps [Def_not_UU]) 1);
   13.30  qed "DefE";
   13.31  
   13.32 -val prems = goal thy "[| x = Def s; x = UU |] ==> R";
   13.33 -by (cut_facts_tac prems 1);
   13.34 +Goal "[| x = Def s; x = UU |] ==> R";
   13.35  by (fast_tac (HOL_cs addSDs [DefE]) 1);
   13.36  qed"DefE2";
   13.37  
   13.38 @@ -151,10 +148,8 @@
   13.39  
   13.40  
   13.41  (* continuity of if then else *)
   13.42 -val prems = goal thy "[| cont f1; cont f2 |] ==> \
   13.43 -\   cont (%x. if b then f1 x else f2 x)";
   13.44 -by (cut_facts_tac prems 1);
   13.45 +Goal "[| cont f1; cont f2 |] ==> cont (%x. if b then f1 x else f2 x)";
   13.46  by (case_tac "b" 1);
   13.47 -by (TRYALL (fast_tac (HOL_cs addss HOL_ss)));
   13.48 +by Auto_tac;
   13.49  qed"cont_if";
   13.50  
    14.1 --- a/src/HOLCF/One.ML	Wed Jul 05 14:26:58 2000 +0200
    14.2 +++ b/src/HOLCF/One.ML	Wed Jul 05 16:37:52 2000 +0200
    14.3 @@ -10,14 +10,13 @@
    14.4  (* Exhaustion and Elimination for type one                                  *)
    14.5  (* ------------------------------------------------------------------------ *)
    14.6  
    14.7 -val prems = goalw thy [ONE_def] "t=UU | t = ONE";
    14.8 +Goalw [ONE_def] "t=UU | t = ONE";
    14.9  by (lift.induct_tac "t" 1);
   14.10  by (Simp_tac 1);
   14.11  by (Simp_tac 1);
   14.12  qed "Exh_one";
   14.13  
   14.14 -val prems = goal thy
   14.15 -        "[| p=UU ==> Q; p = ONE ==>Q|] ==>Q";
   14.16 +val prems = Goal "[| p=UU ==> Q; p = ONE ==>Q|] ==>Q";
   14.17  by (rtac (Exh_one RS disjE) 1);
   14.18  by (eresolve_tac prems 1);
   14.19  by (eresolve_tac prems 1);
    15.1 --- a/src/HOLCF/Pcpo.ML	Wed Jul 05 14:26:58 2000 +0200
    15.2 +++ b/src/HOLCF/Pcpo.ML	Wed Jul 05 16:37:52 2000 +0200
    15.3 @@ -18,14 +18,14 @@
    15.4  
    15.5  bind_thm("minimal", UU_least RS spec);
    15.6  
    15.7 +AddIffs [minimal];
    15.8 +
    15.9  (* ------------------------------------------------------------------------ *)
   15.10  (* in cpo's everthing equal to THE lub has lub properties for every chain  *)
   15.11  (* ------------------------------------------------------------------------ *)
   15.12  
   15.13 -Goal "[| chain(S);lub(range(S)) = (l::'a::cpo)|] ==> range(S) <<| l ";
   15.14 -by (hyp_subst_tac 1);
   15.15 -by (rtac lubI 1);
   15.16 -by (etac cpo 1);
   15.17 +Goal "[| chain(S); lub(range(S)) = (l::'a::cpo) |] ==> range(S) <<| l ";
   15.18 +by (blast_tac (claset() addDs [cpo] addIs [lubI]) 1);
   15.19  qed "thelubE";
   15.20  
   15.21  (* ------------------------------------------------------------------------ *)
   15.22 @@ -33,11 +33,14 @@
   15.23  (* ------------------------------------------------------------------------ *)
   15.24  
   15.25  
   15.26 -bind_thm ("is_ub_thelub", cpo RS lubI RS is_ub_lub);
   15.27 -(* chain(?S1) ==> ?S1(?x) << lub(range(?S1))                             *)
   15.28 +Goal "chain (S::nat => 'a::cpo) ==> S(x) << lub(range(S))";
   15.29 +by (blast_tac (claset() addDs [cpo] addIs [lubI RS is_ub_lub]) 1);
   15.30 +qed "is_ub_thelub";
   15.31  
   15.32 -bind_thm ("is_lub_thelub", cpo RS lubI RS is_lub_lub);
   15.33 -(* [| chain(?S5); range(?S5) <| ?x1 |] ==> lub(range(?S5)) << ?x1        *)
   15.34 +Goal "[| chain (S::nat => 'a::cpo); range(S) <| x |] ==> lub(range S) << x";
   15.35 +by (blast_tac (claset() addDs [cpo] addIs [lubI RS is_lub_lub]) 1);
   15.36 +qed "is_lub_thelub";
   15.37 +
   15.38  
   15.39  Goal "chain Y ==> max_in_chain i Y = (lub(range(Y)) = ((Y i)::'a::cpo))";
   15.40  by (rtac iffI 1);
   15.41 @@ -58,7 +61,6 @@
   15.42  \     ==> lub(range(C1)) << lub(range(C2))";
   15.43  by (etac is_lub_thelub 1);
   15.44  by (rtac ub_rangeI 1);
   15.45 -by (rtac allI 1);
   15.46  by (rtac trans_less 1);
   15.47  by (etac spec 1);
   15.48  by (etac is_ub_thelub 1);
   15.49 @@ -103,7 +105,7 @@
   15.50  by (rtac is_ub_thelub 1);
   15.51  by (assume_tac 1);
   15.52  by (res_inst_tac [("y","X(Suc(j))")] trans_less 1);
   15.53 -by (rtac (chain_mono RS mp) 1);
   15.54 +by (rtac chain_mono 1);
   15.55  by (assume_tac 1);
   15.56  by (rtac (not_less_eq RS subst) 1);
   15.57  by (atac 1);
   15.58 @@ -164,7 +166,6 @@
   15.59  
   15.60  Goal "ALL i. Y(i::nat)=UU ==> lub(range(Y::(nat=>'a::pcpo)))=UU";
   15.61  by (rtac lub_chain_maxelem 1);
   15.62 -by (rtac exI 1);
   15.63  by (etac spec 1);
   15.64  by (rtac allI 1);
   15.65  by (rtac (antisym_less_inverse RS conjunct1) 1);
   15.66 @@ -181,7 +182,7 @@
   15.67  
   15.68  Goal 
   15.69   "[|EX j. ~Y(j)=UU;chain(Y::nat=>'a::pcpo)|] ==> EX j. ALL i. j<i-->~Y(i)=UU";
   15.70 -by (blast_tac (claset() addDs [notUU_I, chain_mono RS mp]) 1);
   15.71 +by (blast_tac (claset() addDs [notUU_I, chain_mono]) 1);
   15.72  qed "chain_mono2";
   15.73  
   15.74  (**************************************)
   15.75 @@ -192,9 +193,10 @@
   15.76  (* flat types are chfin                                              *)
   15.77  (* ------------------------------------------------------------------------ *)
   15.78  
   15.79 +(*Used only in an "instance" declaration (Fun1.thy)*)
   15.80  Goalw [max_in_chain_def]
   15.81 -     "ALL Y::nat=>'a::flat. chain Y-->(EX n. max_in_chain n Y)";
   15.82 -by (strip_tac 1);
   15.83 +     "ALL Y::nat=>'a::flat. chain Y --> (EX n. max_in_chain n Y)";
   15.84 +by (Clarify_tac 1);
   15.85  by (case_tac "ALL i. Y(i)=UU" 1);
   15.86  by (res_inst_tac [("x","0")] exI 1);
   15.87  by (Asm_simp_tac 1);
   15.88 @@ -202,11 +204,9 @@
   15.89  by (etac exE 1);
   15.90  by (res_inst_tac [("x","i")] exI 1);
   15.91  by (strip_tac 1);
   15.92 -by (dres_inst_tac [("x","i"),("y","j")] chain_mono 1);
   15.93  by (etac (le_imp_less_or_eq RS disjE) 1);
   15.94  by Safe_tac;
   15.95 -by (dtac (ax_flat RS spec RS spec RS mp) 1);
   15.96 -by (Fast_tac 1);
   15.97 +by (blast_tac (claset() addDs [chain_mono, ax_flat RS spec RS spec RS mp]) 1);
   15.98  qed "flat_imp_chfin";
   15.99  
  15.100  (* flat subclass of chfin --> adm_flat not needed *)
  15.101 @@ -253,5 +253,5 @@
  15.102  by (rewtac finite_chain_def);
  15.103  by (rewtac max_in_chain_def);
  15.104  by (fast_tac (HOL_cs addIs prems
  15.105 -		     addDs [le_imp_less_or_eq] addEs [chain_mono RS mp]) 1);
  15.106 +		     addDs [le_imp_less_or_eq] addEs [chain_mono]) 1);
  15.107  qed "increasing_chain_adm_lemma";
    16.1 --- a/src/HOLCF/Porder.ML	Wed Jul 05 14:26:58 2000 +0200
    16.2 +++ b/src/HOLCF/Porder.ML	Wed Jul 05 16:37:52 2000 +0200
    16.3 @@ -11,46 +11,25 @@
    16.4  (* ------------------------------------------------------------------------ *)
    16.5  
    16.6  
    16.7 -val prems = goalw thy [is_lub, is_ub] 
    16.8 +Goalw [is_lub, is_ub] 
    16.9          "[| S <<| x ; S <<| y |] ==> x=y";
   16.10 -by (cut_facts_tac prems 1);
   16.11 -by (etac conjE 1);
   16.12 -by (etac conjE 1);
   16.13 -by (rtac antisym_less 1);
   16.14 -by (rtac mp 1);
   16.15 -by ((etac allE 1) THEN (atac 1) THEN (atac 1));
   16.16 -by (rtac mp 1);
   16.17 -by ((etac allE 1) THEN (atac 1) THEN (atac 1));
   16.18 +by (blast_tac (claset() addIs [antisym_less]) 1);
   16.19  qed "unique_lub";
   16.20  
   16.21  (* ------------------------------------------------------------------------ *)
   16.22  (* chains are monotone functions                                            *)
   16.23  (* ------------------------------------------------------------------------ *)
   16.24  
   16.25 -val prems = goalw thy [chain] "chain F ==> x<y --> F x<<F y";
   16.26 -by (cut_facts_tac prems 1);
   16.27 +Goalw [chain] "chain F ==> x<y --> F x<<F y";
   16.28  by (induct_tac "y" 1);
   16.29 -by (rtac impI 1);
   16.30 -by (etac less_zeroE 1);
   16.31 -by (stac less_Suc_eq 1);
   16.32 -by (strip_tac 1);
   16.33 -by (etac disjE 1);
   16.34 -by (rtac trans_less 1);
   16.35 -by (etac allE 2);
   16.36 -by (atac 2);
   16.37 -by (fast_tac HOL_cs 1);
   16.38 -by (hyp_subst_tac 1);
   16.39 -by (etac allE 1);
   16.40 -by (atac 1);
   16.41 -qed "chain_mono";
   16.42 +by Auto_tac;  
   16.43 +by (blast_tac (claset() addIs [trans_less]) 2);
   16.44 +by (blast_tac (claset() addSEs [less_SucE]) 1);
   16.45 +qed_spec_mp "chain_mono";
   16.46  
   16.47  Goal "[| chain F; x <= y |] ==> F x << F y";
   16.48 -by (rtac (le_imp_less_or_eq RS disjE) 1);
   16.49 -by (atac 1);
   16.50 -by (etac (chain_mono RS mp) 1);
   16.51 -by (atac 1);
   16.52 -by (hyp_subst_tac 1);
   16.53 -by (rtac refl_less 1);
   16.54 +by (dtac le_imp_less_or_eq 1);
   16.55 +by (blast_tac (claset() addIs [chain_mono]) 1);
   16.56  qed "chain_mono3";
   16.57  
   16.58  
   16.59 @@ -58,11 +37,10 @@
   16.60  (* The range of a chain is a totally ordered     <<                         *)
   16.61  (* ------------------------------------------------------------------------ *)
   16.62  
   16.63 -val _ = goalw thy [tord] 
   16.64 -"!!F. chain(F) ==> tord(range(F))";
   16.65 +Goalw [tord] "chain(F) ==> tord(range(F))";
   16.66  by (Safe_tac);
   16.67  by (rtac nat_less_cases 1);
   16.68 -by (ALLGOALS (fast_tac (claset() addIs [refl_less, chain_mono RS mp])));
   16.69 +by (ALLGOALS (fast_tac (claset() addIs [chain_mono])));
   16.70  qed "chain_tord";
   16.71  
   16.72  
   16.73 @@ -71,21 +49,9 @@
   16.74  (* ------------------------------------------------------------------------ *)
   16.75  bind_thm("lub",lub_def RS meta_eq_to_obj_eq);
   16.76  
   16.77 -Goal "? x. M <<| x ==> M <<| lub(M)";
   16.78 -by (stac lub 1);
   16.79 -by (etac (select_eq_Ex RS iffD2) 1);
   16.80 -qed "lubI";
   16.81 -
   16.82 -Goal "M <<| lub(M) ==> ? x. M <<| x";
   16.83 -by (etac exI 1);
   16.84 -qed "lubE";
   16.85 -
   16.86 -Goal "(? x. M <<| x)  = M <<| lub(M)";
   16.87 -by (stac lub 1);
   16.88 -by (rtac (select_eq_Ex RS subst) 1);
   16.89 -by (rtac refl 1);
   16.90 -qed "lub_eq";
   16.91 -
   16.92 +Goal "EX x. M <<| x ==> M <<| lub(M)";
   16.93 +by (asm_full_simp_tac (simpset() addsimps [lub, Ex_def]) 1);
   16.94 +bind_thm ("lubI", exI RS result());
   16.95  
   16.96  Goal "M <<| l ==> lub(M) = l";
   16.97  by (rtac unique_lub 1);
   16.98 @@ -96,8 +62,7 @@
   16.99  
  16.100  
  16.101  Goal "lub{x} = x";
  16.102 -by (rtac thelubI 1);
  16.103 -by (simp_tac (simpset() addsimps [is_lub,is_ub]) 1);
  16.104 +by (simp_tac (simpset() addsimps [thelubI,is_lub,is_ub]) 1);
  16.105  qed "lub_singleton";
  16.106  Addsimps [lub_singleton];
  16.107  
  16.108 @@ -105,65 +70,51 @@
  16.109  (* access to some definition as inference rule                              *)
  16.110  (* ------------------------------------------------------------------------ *)
  16.111  
  16.112 -val prems = goalw thy [is_lub]
  16.113 -        "S <<| x  ==> S <| x & (! u. S <| u  --> x << u)";
  16.114 -by (cut_facts_tac prems 1);
  16.115 -by (atac 1);
  16.116 -qed "is_lubE";
  16.117 +Goalw [is_lub] "S <<| x ==> S <| x";
  16.118 +by Auto_tac;
  16.119 +qed "is_lubD1";
  16.120  
  16.121 -val prems = goalw thy [is_lub]
  16.122 -        "S <| x & (! u. S <| u  --> x << u) ==> S <<| x";
  16.123 -by (cut_facts_tac prems 1);
  16.124 -by (atac 1);
  16.125 +Goalw [is_lub] "[| S <<| x; S <| u |] ==> x << u";
  16.126 +by Auto_tac;
  16.127 +qed "is_lub_lub";
  16.128 +
  16.129 +val prems = Goalw [is_lub]
  16.130 +        "[| S <| x; !!u. S <| u ==> x << u |] ==> S <<| x";
  16.131 +by (blast_tac (claset() addIs prems) 1);
  16.132  qed "is_lubI";
  16.133  
  16.134 -val prems = goalw thy [chain] "chain F ==> !i. F(i) << F(Suc(i))";
  16.135 -by (cut_facts_tac prems 1);
  16.136 -by (atac 1);
  16.137 +Goalw [chain] "chain F ==> F(i) << F(Suc(i))";
  16.138 +by Auto_tac;
  16.139  qed "chainE";
  16.140  
  16.141 -val prems = goalw thy [chain] "!i. F i << F(Suc i) ==> chain F";
  16.142 -by (cut_facts_tac prems 1);
  16.143 -by (atac 1);
  16.144 +val prems = Goalw [chain] "(!!i. F i << F(Suc i)) ==> chain F";
  16.145 +by (blast_tac (claset() addIs prems) 1);
  16.146  qed "chainI";
  16.147  
  16.148  (* ------------------------------------------------------------------------ *)
  16.149  (* technical lemmas about (least) upper bounds of chains                    *)
  16.150  (* ------------------------------------------------------------------------ *)
  16.151  
  16.152 -val prems = goalw thy [is_ub] "range S <| x  ==> !i. S(i) << x";
  16.153 -by (cut_facts_tac prems 1);
  16.154 -by (strip_tac 1);
  16.155 -by (rtac mp 1);
  16.156 -by (etac spec 1);
  16.157 -by (rtac rangeI 1);
  16.158 -qed "ub_rangeE";
  16.159 +Goalw [is_ub] "range S <| x  ==> S(i) << x";
  16.160 +by (Blast_tac 1);
  16.161 +qed "ub_rangeD";
  16.162  
  16.163 -val prems = goalw thy [is_ub] "!i. S i << x  ==> range S <| x";
  16.164 -by (cut_facts_tac prems 1);
  16.165 -by (strip_tac 1);
  16.166 -by (etac rangeE 1);
  16.167 -by (hyp_subst_tac 1);
  16.168 -by (etac spec 1);
  16.169 +val prems = Goalw [is_ub] "(!!i. S i << x) ==> range S <| x";
  16.170 +by (blast_tac (claset() addIs prems) 1);
  16.171  qed "ub_rangeI";
  16.172  
  16.173 -bind_thm ("is_ub_lub", is_lubE RS conjunct1 RS ub_rangeE RS spec);
  16.174 +bind_thm ("is_ub_lub", is_lubD1 RS ub_rangeD);
  16.175  (* range(?S1) <<| ?x1 ==> ?S1(?x) << ?x1                                    *)
  16.176  
  16.177 -bind_thm ("is_lub_lub", is_lubE RS conjunct2 RS spec RS mp);
  16.178 -(* [| ?S3 <<| ?x3; ?S3 <| ?x1 |] ==> ?x3 << ?x1                             *)
  16.179  
  16.180  (* ------------------------------------------------------------------------ *)
  16.181  (* results about finite chains                                              *)
  16.182  (* ------------------------------------------------------------------------ *)
  16.183  
  16.184 -val prems = goalw thy [max_in_chain_def]
  16.185 +Goalw [max_in_chain_def]
  16.186          "[| chain C; max_in_chain i C|] ==> range C <<| C i";
  16.187 -by (cut_facts_tac prems 1);
  16.188  by (rtac is_lubI 1);
  16.189 -by (rtac conjI 1);
  16.190  by (rtac ub_rangeI 1);
  16.191 -by (rtac allI 1);
  16.192  by (res_inst_tac [("m","i")] nat_less_cases 1);
  16.193  by (rtac (antisym_less_inverse RS conjunct2) 1);
  16.194  by (etac (disjI1 RS less_or_eq_imp_le RS rev_mp) 1);
  16.195 @@ -171,37 +122,30 @@
  16.196  by (rtac (antisym_less_inverse RS conjunct2) 1);
  16.197  by (etac (disjI2 RS less_or_eq_imp_le RS rev_mp) 1);
  16.198  by (etac spec 1);
  16.199 -by (etac (chain_mono RS mp) 1);
  16.200 +by (etac chain_mono 1);
  16.201  by (atac 1);
  16.202 -by (strip_tac 1);
  16.203 -by (etac (ub_rangeE RS spec) 1);
  16.204 +by (etac (ub_rangeD) 1);
  16.205  qed "lub_finch1";     
  16.206  
  16.207 -val prems= goalw thy [finite_chain_def]
  16.208 +Goalw [finite_chain_def]
  16.209          "finite_chain(C) ==> range(C) <<| C(@ i. max_in_chain i C)";
  16.210 -by (cut_facts_tac prems 1);
  16.211  by (rtac lub_finch1 1);
  16.212 -by (etac conjunct1 1);
  16.213 -by (rtac (select_eq_Ex RS iffD2) 1);
  16.214 -by (etac conjunct2 1);
  16.215 +by (best_tac (claset() addIs [selectI]) 2);
  16.216 +by (Blast_tac 1);
  16.217  qed "lub_finch2";
  16.218  
  16.219  
  16.220  Goal "x<<y ==> chain (%i. if i=0 then x else y)";
  16.221  by (rtac chainI 1);
  16.222 -by (rtac allI 1);
  16.223  by (induct_tac "i" 1);
  16.224 -by (Asm_simp_tac 1);
  16.225 -by (Asm_simp_tac 1);
  16.226 +by Auto_tac;  
  16.227  qed "bin_chain";
  16.228  
  16.229 -val prems = goalw thy [max_in_chain_def,le_def]
  16.230 +Goalw [max_in_chain_def,le_def]
  16.231          "x<<y ==> max_in_chain (Suc 0) (%i. if (i=0) then x else y)";
  16.232 -by (cut_facts_tac prems 1);
  16.233  by (rtac allI 1);
  16.234  by (induct_tac "j" 1);
  16.235 -by (Asm_simp_tac 1);
  16.236 -by (Asm_simp_tac 1);
  16.237 +by Auto_tac; 
  16.238  qed "bin_chainmax";
  16.239  
  16.240  Goal "x << y ==> range(%i::nat. if (i=0) then x else y) <<| y";
  16.241 @@ -209,22 +153,16 @@
  16.242      THEN rtac lub_finch1 2);
  16.243  by (etac bin_chain 2);
  16.244  by (etac bin_chainmax 2);
  16.245 -by (Simp_tac  1);
  16.246 +by (Simp_tac 1);
  16.247  qed "lub_bin_chain";
  16.248  
  16.249  (* ------------------------------------------------------------------------ *)
  16.250  (* the maximal element in a chain is its lub                                *)
  16.251  (* ------------------------------------------------------------------------ *)
  16.252  
  16.253 -Goal "[|? i. Y i=c;!i. Y i<<c|] ==> lub(range Y) = c";
  16.254 -by (rtac thelubI 1);
  16.255 -by (rtac is_lubI 1);
  16.256 -by (rtac conjI 1);
  16.257 -by (etac ub_rangeI 1);
  16.258 -by (strip_tac 1);
  16.259 -by (etac exE 1);
  16.260 -by (hyp_subst_tac 1);
  16.261 -by (etac (ub_rangeE RS spec) 1);
  16.262 +Goal "[| Y i = c;  ALL i. Y i<<c |] ==> lub(range Y) = c";
  16.263 +by (blast_tac (claset()  addDs [ub_rangeD] 
  16.264 +                         addIs [thelubI, is_lubI, ub_rangeI]) 1);
  16.265  qed "lub_chain_maxelem";
  16.266  
  16.267  (* ------------------------------------------------------------------------ *)
  16.268 @@ -232,13 +170,7 @@
  16.269  (* ------------------------------------------------------------------------ *)
  16.270  
  16.271  Goal "range(%x. c) <<| c";
  16.272 -by (rtac is_lubI 1);
  16.273 -by (rtac conjI 1);
  16.274 -by (rtac ub_rangeI 1);
  16.275 -by (strip_tac 1);
  16.276 -by (rtac refl_less 1);
  16.277 -by (strip_tac 1);
  16.278 -by (etac (ub_rangeE RS spec) 1);
  16.279 +by (blast_tac (claset()  addDs [ub_rangeD] addIs [is_lubI, ub_rangeI]) 1);
  16.280  qed "lub_const";
  16.281  
  16.282  
    17.1 --- a/src/HOLCF/Porder0.ML	Wed Jul 05 14:26:58 2000 +0200
    17.2 +++ b/src/HOLCF/Porder0.ML	Wed Jul 05 16:37:52 2000 +0200
    17.3 @@ -12,11 +12,7 @@
    17.4  (* minimal fixes least element                                              *)
    17.5  (* ------------------------------------------------------------------------ *)
    17.6  Goal "!x::'a::po. uu<<x ==> uu=(@u.!y. u<<y)";
    17.7 -by (rtac antisym_less 1);
    17.8 -by (etac spec 1);
    17.9 -by (res_inst_tac [("a","uu")] selectI2 1);
   17.10 -by (atac 1);
   17.11 -by (etac spec 1);
   17.12 +by (blast_tac (claset() addIs [selectI2,antisym_less]) 1);
   17.13  bind_thm ("minimal2UU", allI RS result());
   17.14  
   17.15  (* ------------------------------------------------------------------------ *)
   17.16 @@ -24,9 +20,7 @@
   17.17  (* ------------------------------------------------------------------------ *)
   17.18  
   17.19  Goal "(x::'a::po)=y ==> x << y & y << x";
   17.20 -by (rtac conjI 1);
   17.21 -by ((rtac subst 1) THEN (rtac refl_less 2) THEN (atac 1));
   17.22 -by ((rtac subst 1) THEN (rtac refl_less 2) THEN (etac sym 1));
   17.23 +by (Blast_tac 1);
   17.24  qed "antisym_less_inverse";
   17.25  
   17.26  
    18.1 --- a/src/HOLCF/Sprod0.ML	Wed Jul 05 14:26:58 2000 +0200
    18.2 +++ b/src/HOLCF/Sprod0.ML	Wed Jul 05 16:37:52 2000 +0200
    18.3 @@ -10,13 +10,11 @@
    18.4  (* A non-emptyness result for Sprod                                         *)
    18.5  (* ------------------------------------------------------------------------ *)
    18.6  
    18.7 -val prems = goalw Sprod0.thy [Sprod_def]
    18.8 -        "(Spair_Rep a b):Sprod";
    18.9 +Goalw [Sprod_def] "(Spair_Rep a b):Sprod";
   18.10  by (EVERY1 [rtac CollectI, rtac exI,rtac exI, rtac refl]);
   18.11  qed "SprodI";
   18.12  
   18.13 -val prems = goal Sprod0.thy 
   18.14 -        "inj_on Abs_Sprod Sprod";
   18.15 +Goal "inj_on Abs_Sprod Sprod";
   18.16  by (rtac inj_on_inverseI 1);
   18.17  by (etac Abs_Sprod_inverse 1);
   18.18  qed "inj_on_Abs_Sprod";
   18.19 @@ -25,9 +23,8 @@
   18.20  (* Strictness and definedness of Spair_Rep                                  *)
   18.21  (* ------------------------------------------------------------------------ *)
   18.22  
   18.23 -val prems = goalw Sprod0.thy [Spair_Rep_def]
   18.24 +Goalw [Spair_Rep_def]
   18.25   "(a=UU | b=UU) ==> (Spair_Rep a b) = (Spair_Rep UU UU)";
   18.26 -by (cut_facts_tac prems 1);
   18.27  by (rtac ext 1);
   18.28  by (rtac ext 1);
   18.29  by (rtac iffI 1);
   18.30 @@ -35,32 +32,28 @@
   18.31  by (fast_tac HOL_cs 1);
   18.32  qed "strict_Spair_Rep";
   18.33  
   18.34 -val prems = goalw Sprod0.thy [Spair_Rep_def]
   18.35 +Goalw [Spair_Rep_def]
   18.36   "(Spair_Rep a b) = (Spair_Rep UU UU) ==> (a=UU | b=UU)";
   18.37  by (case_tac "a=UU|b=UU" 1);
   18.38  by (atac 1);
   18.39 -by (rtac disjI1 1);
   18.40 -by (rtac ((hd prems) RS fun_cong RS fun_cong RS iffD2 RS mp RS conjunct1 RS sym) 1);
   18.41 -by (fast_tac HOL_cs 1);
   18.42 -by (fast_tac HOL_cs 1);
   18.43 +by (fast_tac (claset() addDs [fun_cong]) 1);
   18.44  qed "defined_Spair_Rep_rev";
   18.45  
   18.46  (* ------------------------------------------------------------------------ *)
   18.47  (* injectivity of Spair_Rep and Ispair                                      *)
   18.48  (* ------------------------------------------------------------------------ *)
   18.49  
   18.50 -val prems = goalw Sprod0.thy [Spair_Rep_def]
   18.51 +Goalw [Spair_Rep_def]
   18.52  "[|~aa=UU ; ~ba=UU ; Spair_Rep a b = Spair_Rep aa ba |] ==> a=aa & b=ba";
   18.53 -by (cut_facts_tac prems 1);
   18.54 -by (rtac ((nth_elem (2,prems)) RS fun_cong  RS fun_cong RS iffD1 RS mp) 1);
   18.55 -by (fast_tac HOL_cs 1);
   18.56 -by (fast_tac HOL_cs 1);
   18.57 +by (dtac fun_cong 1);
   18.58 +by (dtac fun_cong 1);
   18.59 +by (etac (iffD1 RS mp) 1);
   18.60 +by Auto_tac;  
   18.61  qed "inject_Spair_Rep";
   18.62  
   18.63  
   18.64 -val prems = goalw Sprod0.thy [Ispair_def]
   18.65 +Goalw [Ispair_def]
   18.66          "[|~aa=UU ; ~ba=UU ; Ispair a b = Ispair aa ba |] ==> a=aa & b=ba";
   18.67 -by (cut_facts_tac prems 1);
   18.68  by (etac inject_Spair_Rep 1);
   18.69  by (atac 1);
   18.70  by (etac (inj_on_Abs_Sprod  RS inj_onD) 1);
   18.71 @@ -73,37 +66,33 @@
   18.72  (* strictness and definedness of Ispair                                     *)
   18.73  (* ------------------------------------------------------------------------ *)
   18.74  
   18.75 -val prems = goalw Sprod0.thy [Ispair_def] 
   18.76 +Goalw [Ispair_def] 
   18.77   "(a=UU | b=UU) ==> Ispair a b = Ispair UU UU";
   18.78 -by (cut_facts_tac prems 1);
   18.79  by (etac (strict_Spair_Rep RS arg_cong) 1);
   18.80  qed "strict_Ispair";
   18.81  
   18.82 -val prems = goalw Sprod0.thy [Ispair_def]
   18.83 +Goalw [Ispair_def]
   18.84          "Ispair UU b  = Ispair UU UU";
   18.85  by (rtac (strict_Spair_Rep RS arg_cong) 1);
   18.86  by (rtac disjI1 1);
   18.87  by (rtac refl 1);
   18.88  qed "strict_Ispair1";
   18.89  
   18.90 -val prems = goalw Sprod0.thy [Ispair_def]
   18.91 +Goalw [Ispair_def]
   18.92          "Ispair a UU = Ispair UU UU";
   18.93  by (rtac (strict_Spair_Rep RS arg_cong) 1);
   18.94  by (rtac disjI2 1);
   18.95  by (rtac refl 1);
   18.96  qed "strict_Ispair2";
   18.97  
   18.98 -val prems = goal Sprod0.thy 
   18.99 -        "~Ispair x y = Ispair UU UU ==> ~x=UU & ~y=UU";
  18.100 -by (cut_facts_tac prems 1);
  18.101 +Goal "~Ispair x y = Ispair UU UU ==> ~x=UU & ~y=UU";
  18.102  by (rtac (de_Morgan_disj RS subst) 1);
  18.103  by (etac contrapos 1);
  18.104  by (etac strict_Ispair 1);
  18.105  qed "strict_Ispair_rev";
  18.106  
  18.107 -val prems = goalw Sprod0.thy [Ispair_def]
  18.108 +Goalw [Ispair_def]
  18.109          "Ispair a b  = Ispair UU UU ==> (a = UU | b = UU)";
  18.110 -by (cut_facts_tac prems 1);
  18.111  by (rtac defined_Spair_Rep_rev 1);
  18.112  by (rtac (inj_on_Abs_Sprod  RS inj_onD) 1);
  18.113  by (atac 1);
  18.114 @@ -111,9 +100,7 @@
  18.115  by (rtac SprodI 1);
  18.116  qed "defined_Ispair_rev";
  18.117  
  18.118 -val prems = goal Sprod0.thy  
  18.119 -"[|a~=UU; b~=UU|] ==> (Ispair a b) ~= (Ispair UU UU)";
  18.120 -by (cut_facts_tac prems 1);
  18.121 +Goal "[|a~=UU; b~=UU|] ==> (Ispair a b) ~= (Ispair UU UU)";
  18.122  by (rtac contrapos 1);
  18.123  by (etac defined_Ispair_rev 2);
  18.124  by (rtac (de_Morgan_disj RS iffD2) 1);
  18.125 @@ -126,7 +113,7 @@
  18.126  (* Exhaustion of the strict product **                                      *)
  18.127  (* ------------------------------------------------------------------------ *)
  18.128  
  18.129 -val prems = goalw Sprod0.thy [Ispair_def]
  18.130 +Goalw [Ispair_def]
  18.131          "z=Ispair UU UU | (? a b. z=Ispair a b & a~=UU & b~=UU)";
  18.132  by (rtac (rewrite_rule [Sprod_def] Rep_Sprod RS CollectE) 1);
  18.133  by (etac exE 1);
  18.134 @@ -151,15 +138,16 @@
  18.135  (* general elimination rule for strict product                              *)
  18.136  (* ------------------------------------------------------------------------ *)
  18.137  
  18.138 -val prems = goal Sprod0.thy
  18.139 -"[|p=Ispair UU UU ==> Q ;!!x y. [|p=Ispair x y; x~=UU ; y~=UU|] ==> Q|] ==> Q";
  18.140 +val [prem1,prem2] = Goal
  18.141 +"  [| p=Ispair UU UU ==> Q ; !!x y. [|p=Ispair x y; x~=UU ; y~=UU|] ==> Q|] \
  18.142 +\  ==> Q";
  18.143  by (rtac (Exh_Sprod RS disjE) 1);
  18.144 -by (etac (hd prems) 1);
  18.145 +by (etac prem1 1);
  18.146  by (etac exE 1);
  18.147  by (etac exE 1);
  18.148  by (etac conjE 1);
  18.149  by (etac conjE 1);
  18.150 -by (etac (hd (tl prems)) 1);
  18.151 +by (etac prem2 1);
  18.152  by (atac 1);
  18.153  by (atac 1);
  18.154  qed "IsprodE";
  18.155 @@ -169,9 +157,7 @@
  18.156  (* some results about the selectors Isfst, Issnd                            *)
  18.157  (* ------------------------------------------------------------------------ *)
  18.158  
  18.159 -val prems = goalw Sprod0.thy [Isfst_def] 
  18.160 -        "p=Ispair UU UU ==> Isfst p = UU";
  18.161 -by (cut_facts_tac prems 1);
  18.162 +Goalw [Isfst_def] "p=Ispair UU UU ==> Isfst p = UU";
  18.163  by (rtac select_equality 1);
  18.164  by (rtac conjI 1);
  18.165  by (fast_tac HOL_cs  1);
  18.166 @@ -183,24 +169,24 @@
  18.167  qed "strict_Isfst";
  18.168  
  18.169  
  18.170 -val prems = goal Sprod0.thy
  18.171 -        "Isfst(Ispair UU y) = UU";
  18.172 +Goal "Isfst(Ispair UU y) = UU";
  18.173  by (stac strict_Ispair1 1);
  18.174  by (rtac strict_Isfst 1);
  18.175  by (rtac refl 1);
  18.176  qed "strict_Isfst1";
  18.177  
  18.178 -val prems = goal Sprod0.thy
  18.179 -        "Isfst(Ispair x UU) = UU";
  18.180 +Addsimps [strict_Isfst1];
  18.181 +
  18.182 +Goal "Isfst(Ispair x UU) = UU";
  18.183  by (stac strict_Ispair2 1);
  18.184  by (rtac strict_Isfst 1);
  18.185  by (rtac refl 1);
  18.186  qed "strict_Isfst2";
  18.187  
  18.188 +Addsimps [strict_Isfst2];
  18.189  
  18.190 -val prems = goalw Sprod0.thy [Issnd_def] 
  18.191 -        "p=Ispair UU UU ==>Issnd p=UU";
  18.192 -by (cut_facts_tac prems 1);
  18.193 +
  18.194 +Goalw [Issnd_def] "p=Ispair UU UU ==>Issnd p=UU";
  18.195  by (rtac select_equality 1);
  18.196  by (rtac conjI 1);
  18.197  by (fast_tac HOL_cs  1);
  18.198 @@ -211,23 +197,23 @@
  18.199  by (REPEAT (fast_tac HOL_cs  1));
  18.200  qed "strict_Issnd";
  18.201  
  18.202 -val prems = goal Sprod0.thy
  18.203 -        "Issnd(Ispair UU y) = UU";
  18.204 +Goal "Issnd(Ispair UU y) = UU";
  18.205  by (stac strict_Ispair1 1);
  18.206  by (rtac strict_Issnd 1);
  18.207  by (rtac refl 1);
  18.208  qed "strict_Issnd1";
  18.209  
  18.210 -val prems = goal Sprod0.thy
  18.211 -        "Issnd(Ispair x UU) = UU";
  18.212 +Addsimps [strict_Issnd1];
  18.213 +
  18.214 +Goal "Issnd(Ispair x UU) = UU";
  18.215  by (stac strict_Ispair2 1);
  18.216  by (rtac strict_Issnd 1);
  18.217  by (rtac refl 1);
  18.218  qed "strict_Issnd2";
  18.219  
  18.220 -val prems = goalw Sprod0.thy [Isfst_def]
  18.221 -        "[|x~=UU ;y~=UU |] ==> Isfst(Ispair x y) = x";
  18.222 -by (cut_facts_tac prems 1);
  18.223 +Addsimps [strict_Issnd2];
  18.224 +
  18.225 +Goalw [Isfst_def] "[|x~=UU ;y~=UU |] ==> Isfst(Ispair x y) = x";
  18.226  by (rtac select_equality 1);
  18.227  by (rtac conjI 1);
  18.228  by (strip_tac 1);
  18.229 @@ -243,9 +229,7 @@
  18.230  by (fast_tac HOL_cs  1);
  18.231  qed "Isfst";
  18.232  
  18.233 -val prems = goalw Sprod0.thy [Issnd_def]
  18.234 -        "[|x~=UU ;y~=UU |] ==> Issnd(Ispair x y) = y";
  18.235 -by (cut_facts_tac prems 1);
  18.236 +Goalw [Issnd_def] "[|x~=UU ;y~=UU |] ==> Issnd(Ispair x y) = y";
  18.237  by (rtac select_equality 1);
  18.238  by (rtac conjI 1);
  18.239  by (strip_tac 1);
  18.240 @@ -261,8 +245,7 @@
  18.241  by (fast_tac HOL_cs  1);
  18.242  qed "Issnd";
  18.243  
  18.244 -val prems = goal Sprod0.thy "y~=UU ==>Isfst(Ispair x y)=x";
  18.245 -by (cut_facts_tac prems 1);
  18.246 +Goal "y~=UU ==>Isfst(Ispair x y)=x";
  18.247  by (res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1);
  18.248  by (etac Isfst 1);
  18.249  by (atac 1);
  18.250 @@ -270,8 +253,7 @@
  18.251  by (rtac strict_Isfst1 1);
  18.252  qed "Isfst2";
  18.253  
  18.254 -val prems = goal Sprod0.thy "~x=UU ==>Issnd(Ispair x y)=y";
  18.255 -by (cut_facts_tac prems 1);
  18.256 +Goal "~x=UU ==>Issnd(Ispair x y)=y";
  18.257  by (res_inst_tac [("Q","y=UU")] (excluded_middle RS disjE) 1);
  18.258  by (etac Issnd 1);
  18.259  by (atac 1);
  18.260 @@ -289,9 +271,9 @@
  18.261          addsimps [strict_Isfst1,strict_Isfst2,strict_Issnd1,strict_Issnd2,
  18.262                   Isfst2,Issnd2];
  18.263  
  18.264 -val prems = goal Sprod0.thy 
  18.265 -        "p~=Ispair UU UU ==> Isfst p ~= UU & Issnd p ~= UU";
  18.266 -by (cut_facts_tac prems 1);
  18.267 +Addsimps [Isfst2,Issnd2];
  18.268 +
  18.269 +Goal "p~=Ispair UU UU ==> Isfst p ~= UU & Issnd p ~= UU";
  18.270  by (res_inst_tac [("p","p")] IsprodE 1);
  18.271  by (contr_tac 1);
  18.272  by (hyp_subst_tac 1);
  18.273 @@ -305,8 +287,7 @@
  18.274  (* Surjective pairing: equivalent to Exh_Sprod                              *)
  18.275  (* ------------------------------------------------------------------------ *)
  18.276  
  18.277 -val prems = goal Sprod0.thy 
  18.278 -        "z = Ispair(Isfst z)(Issnd z)";
  18.279 +Goal "z = Ispair(Isfst z)(Issnd z)";
  18.280  by (res_inst_tac [("z1","z")] (Exh_Sprod RS disjE) 1);
  18.281  by (asm_simp_tac Sprod0_ss 1);
  18.282  by (etac exE 1);
  18.283 @@ -314,9 +295,7 @@
  18.284  by (asm_simp_tac Sprod0_ss 1);
  18.285  qed "surjective_pairing_Sprod";
  18.286  
  18.287 -val prems = goal thy 
  18.288 -        "[|Isfst x = Isfst y; Issnd x = Issnd y|] ==> x = y";
  18.289 -by (cut_facts_tac prems 1);
  18.290 +Goal "[|Isfst x = Isfst y; Issnd x = Issnd y|] ==> x = y";
  18.291  by (subgoal_tac "Ispair(Isfst x)(Issnd x)=Ispair(Isfst y)(Issnd y)" 1);
  18.292  by (rotate_tac ~1 1);
  18.293  by (asm_full_simp_tac(HOL_ss addsimps[surjective_pairing_Sprod RS sym])1);
    19.1 --- a/src/HOLCF/Sprod1.ML	Wed Jul 05 14:26:58 2000 +0200
    19.2 +++ b/src/HOLCF/Sprod1.ML	Wed Jul 05 16:37:52 2000 +0200
    19.3 @@ -9,22 +9,18 @@
    19.4  (* less_sprod is a partial order on Sprod                                   *)
    19.5  (* ------------------------------------------------------------------------ *)
    19.6  
    19.7 -val prems = goalw thy [less_sprod_def]"(p::'a ** 'b) << p";
    19.8 +Goalw [less_sprod_def]"(p::'a ** 'b) << p";
    19.9  by (fast_tac (HOL_cs addIs [refl_less]) 1);
   19.10  qed "refl_less_sprod";
   19.11  
   19.12 -val prems = goalw thy [less_sprod_def]
   19.13 +Goalw [less_sprod_def]
   19.14          "[|(p1::'a ** 'b) << p2;p2 << p1|] ==> p1=p2";
   19.15 -by (cut_facts_tac prems 1);
   19.16  by (rtac Sel_injective_Sprod 1);
   19.17  by (fast_tac (HOL_cs addIs [antisym_less]) 1);
   19.18  by (fast_tac (HOL_cs addIs [antisym_less]) 1);
   19.19  qed "antisym_less_sprod";
   19.20  
   19.21 -val prems = goalw thy [less_sprod_def]
   19.22 +Goalw [less_sprod_def]
   19.23          "[|(p1::'a**'b) << p2;p2 << p3|] ==> p1 << p3";
   19.24 -by (cut_facts_tac prems 1);
   19.25 -by (rtac conjI 1);
   19.26 -by (fast_tac (HOL_cs addIs [trans_less]) 1);
   19.27 -by (fast_tac (HOL_cs addIs [trans_less]) 1);
   19.28 +by (blast_tac (HOL_cs addIs [trans_less]) 1);
   19.29  qed "trans_less_sprod";
    20.1 --- a/src/HOLCF/Sprod2.ML	Wed Jul 05 14:26:58 2000 +0200
    20.2 +++ b/src/HOLCF/Sprod2.ML	Wed Jul 05 16:37:52 2000 +0200
    20.3 @@ -7,7 +7,7 @@
    20.4  *)
    20.5  
    20.6  (* for compatibility with old HOLCF-Version *)
    20.7 -val prems = goal thy "(op <<)=(%x y. Isfst x<<Isfst y&Issnd x<<Issnd y)";
    20.8 +Goal "(op <<)=(%x y. Isfst x<<Isfst y&Issnd x<<Issnd y)";
    20.9  by (fold_goals_tac [less_sprod_def]);
   20.10  by (rtac refl 1);
   20.11  qed "inst_sprod_po";
   20.12 @@ -16,13 +16,13 @@
   20.13  (* type sprod is pointed                                                    *)
   20.14  (* ------------------------------------------------------------------------ *)
   20.15  
   20.16 -val prems = goal thy "Ispair UU UU << p";
   20.17 +Goal "Ispair UU UU << p";
   20.18  by (simp_tac(Sprod0_ss addsimps[inst_sprod_po,minimal])1);
   20.19  qed "minimal_sprod";
   20.20  
   20.21  bind_thm ("UU_sprod_def",minimal_sprod RS minimal2UU RS sym);
   20.22  
   20.23 -val prems = goal thy "? x::'a**'b.!y. x<<y";
   20.24 +Goal "? x::'a**'b.!y. x<<y";
   20.25  by (res_inst_tac [("x","Ispair UU UU")] exI 1);
   20.26  by (rtac (minimal_sprod RS allI) 1);
   20.27  qed "least_sprod";
   20.28 @@ -31,7 +31,7 @@
   20.29  (* Ispair is monotone in both arguments                                     *)
   20.30  (* ------------------------------------------------------------------------ *)
   20.31  
   20.32 -val prems = goalw Sprod2.thy [monofun]  "monofun(Ispair)";
   20.33 +Goalw [monofun]  "monofun(Ispair)";
   20.34  by (strip_tac 1);
   20.35  by (rtac (less_fun RS iffD2) 1);
   20.36  by (strip_tac 1);
   20.37 @@ -42,7 +42,7 @@
   20.38  by (REPEAT(asm_simp_tac(Sprod0_ss addsimps[inst_sprod_po,refl_less,minimal]) 1));
   20.39  qed "monofun_Ispair1";
   20.40  
   20.41 -val prems = goalw Sprod2.thy [monofun]  "monofun(Ispair(x))";
   20.42 +Goalw [monofun]  "monofun(Ispair(x))";
   20.43  by (strip_tac 1);
   20.44  by (res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1);
   20.45  by (res_inst_tac [("Q","xa=UU")] (excluded_middle RS disjE) 1);
   20.46 @@ -64,11 +64,11 @@
   20.47  (* Isfst and Issnd are monotone                                             *)
   20.48  (* ------------------------------------------------------------------------ *)
   20.49  
   20.50 -val prems = goalw Sprod2.thy [monofun]  "monofun(Isfst)";
   20.51 +Goalw [monofun]  "monofun(Isfst)";
   20.52  by (simp_tac (HOL_ss addsimps [inst_sprod_po]) 1);
   20.53  qed "monofun_Isfst";
   20.54  
   20.55 -val prems = goalw Sprod2.thy [monofun]  "monofun(Issnd)";
   20.56 +Goalw [monofun]  "monofun(Issnd)";
   20.57  by (simp_tac (HOL_ss addsimps [inst_sprod_po]) 1);
   20.58  qed "monofun_Issnd";
   20.59  
   20.60 @@ -76,12 +76,11 @@
   20.61  (* the type 'a ** 'b is a cpo                                               *)
   20.62  (* ------------------------------------------------------------------------ *)
   20.63  
   20.64 -val prems = goal Sprod2.thy 
   20.65 +Goal 
   20.66  "[|chain(S)|] ==> range(S) <<| \
   20.67  \ Ispair (lub(range(%i. Isfst(S i)))) (lub(range(%i. Issnd(S i))))";
   20.68 -by (cut_facts_tac prems 1);
   20.69 -by (rtac (conjI RS is_lubI) 1);
   20.70 -by (rtac (allI RS ub_rangeI) 1);
   20.71 +by (rtac (is_lubI) 1);
   20.72 +by (rtac (ub_rangeI) 1);
   20.73  by (res_inst_tac [("t","S(i)")] (surjective_pairing_Sprod RS ssubst) 1);
   20.74  by (rtac monofun_Ispair 1);
   20.75  by (rtac is_ub_thelub 1);
   20.76 @@ -102,9 +101,7 @@
   20.77  bind_thm ("thelub_sprod", lub_sprod RS thelubI);
   20.78  
   20.79  
   20.80 -val prems = goal Sprod2.thy 
   20.81 -        "chain(S::nat=>'a**'b)==>? x. range(S)<<| x";
   20.82 -by (cut_facts_tac prems 1);
   20.83 +Goal "chain(S::nat=>'a**'b)==>? x. range(S)<<| x";
   20.84  by (rtac exI 1);
   20.85  by (etac lub_sprod 1);
   20.86  qed "cpo_sprod";
    21.1 --- a/src/HOLCF/Sprod3.ML	Wed Jul 05 14:26:58 2000 +0200
    21.2 +++ b/src/HOLCF/Sprod3.ML	Wed Jul 05 16:37:52 2000 +0200
    21.3 @@ -7,7 +7,7 @@
    21.4  *)
    21.5  
    21.6  (* for compatibility with old HOLCF-Version *)
    21.7 -val prems = goal thy "UU = Ispair UU UU";
    21.8 +Goal "UU = Ispair UU UU";
    21.9  by (simp_tac (HOL_ss addsimps [UU_def,UU_sprod_def]) 1);
   21.10  qed "inst_sprod_pcpo";
   21.11  
   21.12 @@ -17,12 +17,11 @@
   21.13  (* continuity of Ispair, Isfst, Issnd                                       *)
   21.14  (* ------------------------------------------------------------------------ *)
   21.15  
   21.16 -val prems = goal thy 
   21.17 +Goal 
   21.18  "[| chain(Y);  x~= UU;  lub(range(Y))~= UU |] ==>\
   21.19  \ Ispair (lub(range Y)) x =\
   21.20  \ Ispair (lub(range(%i. Isfst(Ispair(Y i) x)))) \
   21.21  \        (lub(range(%i. Issnd(Ispair(Y i) x))))";
   21.22 -by (cut_facts_tac prems 1);
   21.23  by (res_inst_tac [("f1","Ispair")] (arg_cong RS cong) 1);
   21.24  by (rtac lub_equal 1);
   21.25  by (atac 1);
   21.26 @@ -31,33 +30,23 @@
   21.27  by (rtac (monofun_Ispair1 RS ch2ch_monofun) 1);
   21.28  by (atac 1);
   21.29  by (rtac allI 1);
   21.30 -by (asm_simp_tac Sprod0_ss 1);
   21.31 +by (Asm_simp_tac 1);
   21.32  by (rtac sym 1);
   21.33 +by (dtac chain_UU_I_inverse2 1);
   21.34 +by (etac exE 1);
   21.35  by (rtac lub_chain_maxelem 1);
   21.36 -by (res_inst_tac [("P","%j.~Y(j)=UU")] exE 1);
   21.37 -by (rtac (not_all RS iffD1) 1);
   21.38 -by (res_inst_tac [("Q","lub(range(Y)) = UU")] contrapos 1);
   21.39 -by (atac 1);
   21.40 -by (rtac chain_UU_I_inverse 1);
   21.41 -by (atac 1);
   21.42 -by (rtac exI 1);
   21.43  by (etac Issnd2 1);
   21.44  by (rtac allI 1);
   21.45 -by (res_inst_tac [("Q","Y(i)=UU")] (excluded_middle RS disjE) 1);
   21.46 -by (asm_simp_tac Sprod0_ss 1);
   21.47 -by (rtac refl_less 1);
   21.48 -by (res_inst_tac [("s","UU"),("t","Y(i)")] subst 1);
   21.49 -by (etac sym 1);
   21.50 -by (asm_simp_tac Sprod0_ss  1);
   21.51 -by (rtac minimal 1);
   21.52 +by (rename_tac "j" 1);
   21.53 +by (case_tac "Y(j)=UU" 1);
   21.54 +by Auto_tac;  
   21.55  qed "sprod3_lemma1";
   21.56  
   21.57 -val prems = goal thy 
   21.58 +Goal 
   21.59  "[| chain(Y); x ~= UU; lub(range(Y)) = UU |] ==>\
   21.60  \   Ispair (lub(range Y)) x =\
   21.61  \   Ispair (lub(range(%i. Isfst(Ispair(Y i) x))))\
   21.62  \          (lub(range(%i. Issnd(Ispair(Y i) x))))";
   21.63 -by (cut_facts_tac prems 1);
   21.64  by (res_inst_tac [("s","UU"),("t","lub(range(Y))")] ssubst 1);
   21.65  by (atac 1);
   21.66  by (rtac trans 1);
   21.67 @@ -65,21 +54,18 @@
   21.68  by (rtac (strict_Ispair RS sym) 1);
   21.69  by (rtac disjI1 1);
   21.70  by (rtac chain_UU_I_inverse 1);
   21.71 -by (rtac allI 1);
   21.72 -by (asm_simp_tac Sprod0_ss  1);
   21.73 +by Auto_tac;  
   21.74  by (etac (chain_UU_I RS spec) 1);
   21.75  by (atac 1);
   21.76  qed "sprod3_lemma2";
   21.77  
   21.78  
   21.79 -val prems = goal thy 
   21.80 +Goal 
   21.81  "[| chain(Y); x = UU |] ==>\
   21.82  \          Ispair (lub(range Y)) x =\
   21.83  \          Ispair (lub(range(%i. Isfst(Ispair (Y i) x))))\
   21.84  \                 (lub(range(%i. Issnd(Ispair (Y i) x))))";
   21.85 -by (cut_facts_tac prems 1);
   21.86 -by (res_inst_tac [("s","UU"),("t","x")] ssubst 1);
   21.87 -by (atac 1);
   21.88 +by (etac ssubst 1);
   21.89  by (rtac trans 1);
   21.90  by (rtac strict_Ispair2 1);
   21.91  by (rtac (strict_Ispair RS sym) 1);
   21.92 @@ -112,46 +98,28 @@
   21.93  by (atac 1);
   21.94  qed "contlub_Ispair1";
   21.95  
   21.96 -val prems = goal thy 
   21.97 +Goal 
   21.98  "[| chain(Y); x ~= UU; lub(range(Y)) ~= UU |] ==>\
   21.99  \         Ispair x (lub(range Y)) =\
  21.100  \         Ispair (lub(range(%i. Isfst (Ispair x (Y i)))))\
  21.101  \                (lub(range(%i. Issnd (Ispair x (Y i)))))";
  21.102 -by (cut_facts_tac prems 1);
  21.103  by (res_inst_tac [("f1","Ispair")] (arg_cong RS cong) 1);
  21.104  by (rtac sym 1);
  21.105 +by (dtac chain_UU_I_inverse2 1);
  21.106 +by (etac exE 1);
  21.107  by (rtac lub_chain_maxelem 1);
  21.108 -by (res_inst_tac [("P","%j. Y(j)~=UU")] exE 1);
  21.109 -by (rtac (not_all RS iffD1) 1);
  21.110 -by (res_inst_tac [("Q","lub(range(Y)) = UU")] contrapos 1);
  21.111 -by (atac 1);
  21.112 -by (rtac chain_UU_I_inverse 1);
  21.113 -by (atac 1);
  21.114 -by (rtac exI 1);
  21.115  by (etac Isfst2 1);
  21.116  by (rtac allI 1);
  21.117 -by (res_inst_tac [("Q","Y(i)=UU")] (excluded_middle RS disjE) 1);
  21.118 -by (asm_simp_tac Sprod0_ss 1);
  21.119 -by (rtac refl_less 1);
  21.120 -by (res_inst_tac [("s","UU"),("t","Y(i)")] subst 1);
  21.121 -by (etac sym 1);
  21.122 -by (asm_simp_tac Sprod0_ss  1);
  21.123 -by (rtac minimal 1);
  21.124 -by (rtac lub_equal 1);
  21.125 -by (atac 1);
  21.126 -by (rtac (monofun_Issnd RS ch2ch_monofun) 1);
  21.127 -by (rtac (monofun_Ispair2 RS ch2ch_monofun) 1);
  21.128 -by (atac 1);
  21.129 -by (rtac allI 1);
  21.130 -by (asm_simp_tac Sprod0_ss 1);
  21.131 +by (rename_tac "j" 1);
  21.132 +by (case_tac "Y(j)=UU" 1);
  21.133 +by Auto_tac;  
  21.134  qed "sprod3_lemma4";
  21.135  
  21.136 -val prems = goal thy 
  21.137 +Goal 
  21.138  "[| chain(Y); x ~= UU; lub(range(Y)) = UU |] ==>\
  21.139  \         Ispair x (lub(range Y)) =\
  21.140  \         Ispair (lub(range(%i. Isfst(Ispair x (Y i)))))\
  21.141  \                (lub(range(%i. Issnd(Ispair x (Y i)))))";
  21.142 -by (cut_facts_tac prems 1);
  21.143  by (res_inst_tac [("s","UU"),("t","lub(range(Y))")] ssubst 1);
  21.144  by (atac 1);
  21.145  by (rtac trans 1);
  21.146 @@ -165,12 +133,11 @@
  21.147  by (atac 1);
  21.148  qed "sprod3_lemma5";
  21.149  
  21.150 -val prems = goal thy 
  21.151 +Goal 
  21.152  "[| chain(Y); x = UU |] ==>\
  21.153  \         Ispair x (lub(range Y)) =\
  21.154  \         Ispair (lub(range(%i. Isfst (Ispair x (Y i)))))\
  21.155  \                (lub(range(%i. Issnd (Ispair x (Y i)))))";
  21.156 -by (cut_facts_tac prems 1);
  21.157  by (res_inst_tac [("s","UU"),("t","x")] ssubst 1);
  21.158  by (atac 1);
  21.159  by (rtac trans 1);
  21.160 @@ -182,7 +149,7 @@
  21.161  by (simp_tac Sprod0_ss  1);
  21.162  qed "sprod3_lemma6";
  21.163  
  21.164 -val prems = goal thy "contlub(Ispair(x))";
  21.165 +Goal "contlub(Ispair(x))";
  21.166  by (rtac contlubI 1);
  21.167  by (strip_tac 1);
  21.168  by (rtac trans 1);
  21.169 @@ -200,20 +167,20 @@
  21.170  by (atac 1);
  21.171  qed "contlub_Ispair2";
  21.172  
  21.173 -val prems = goal thy "cont(Ispair)";
  21.174 +Goal "cont(Ispair)";
  21.175  by (rtac monocontlub2cont 1);
  21.176  by (rtac monofun_Ispair1 1);
  21.177  by (rtac contlub_Ispair1 1);
  21.178  qed "cont_Ispair1";
  21.179  
  21.180  
  21.181 -val prems = goal thy "cont(Ispair(x))";
  21.182 +Goal "cont(Ispair(x))";
  21.183  by (rtac monocontlub2cont 1);
  21.184  by (rtac monofun_Ispair2 1);
  21.185  by (rtac contlub_Ispair2 1);
  21.186  qed "cont_Ispair2";
  21.187  
  21.188 -val prems = goal thy "contlub(Isfst)";
  21.189 +Goal "contlub(Isfst)";
  21.190  by (rtac contlubI 1);
  21.191  by (strip_tac 1);
  21.192  by (stac (lub_sprod RS thelubI) 1);
  21.193 @@ -233,7 +200,7 @@
  21.194  by (fast_tac (HOL_cs addSDs [monofun_Issnd RS ch2ch_monofun RS chain_UU_I RS spec]) 1);
  21.195  qed "contlub_Isfst";
  21.196  
  21.197 -val prems = goal thy "contlub(Issnd)";
  21.198 +Goal "contlub(Issnd)";
  21.199  by (rtac contlubI 1);
  21.200  by (strip_tac 1);
  21.201  by (stac (lub_sprod RS thelubI) 1);
  21.202 @@ -252,20 +219,19 @@
  21.203  by (fast_tac (HOL_cs addSDs [monofun_Isfst RS ch2ch_monofun RS chain_UU_I RS spec]) 1);
  21.204  qed "contlub_Issnd";
  21.205  
  21.206 -val prems = goal thy "cont(Isfst)";
  21.207 +Goal "cont(Isfst)";
  21.208  by (rtac monocontlub2cont 1);
  21.209  by (rtac monofun_Isfst 1);
  21.210  by (rtac contlub_Isfst 1);
  21.211  qed "cont_Isfst";
  21.212  
  21.213 -val prems = goal thy "cont(Issnd)";
  21.214 +Goal "cont(Issnd)";
  21.215  by (rtac monocontlub2cont 1);
  21.216  by (rtac monofun_Issnd 1);
  21.217  by (rtac contlub_Issnd 1);
  21.218  qed "cont_Issnd";
  21.219  
  21.220 -val prems = goal thy "[|x1=x2;y1=y2|] ==> (:x1,y1:) = (:x2,y2:)";
  21.221 -by (cut_facts_tac prems 1);
  21.222 +Goal "[|x1=x2;y1=y2|] ==> (:x1,y1:) = (:x2,y2:)";
  21.223  by (fast_tac HOL_cs 1);
  21.224  qed "spair_eq";
  21.225  
  21.226 @@ -273,7 +239,7 @@
  21.227  (* convert all lemmas to the continuous versions                            *)
  21.228  (* ------------------------------------------------------------------------ *)
  21.229  
  21.230 -val prems = goalw thy [spair_def]
  21.231 +Goalw [spair_def]
  21.232          "(LAM x y. Ispair x y)`a`b = Ispair a b";
  21.233  by (stac beta_cfun 1);
  21.234  by (simp_tac (simpset() addsimps [cont_Ispair2, cont_Ispair1, cont2cont_CF1L]) 1);
  21.235 @@ -284,9 +250,8 @@
  21.236  
  21.237  Addsimps [beta_cfun_sprod];
  21.238  
  21.239 -val prems = goalw thy [spair_def]
  21.240 +Goalw [spair_def]
  21.241          "[| aa~=UU ; ba~=UU ; (:a,b:)=(:aa,ba:) |] ==> a=aa & b=ba";
  21.242 -by (cut_facts_tac prems 1);
  21.243  by (etac inject_Ispair 1);
  21.244  by (atac 1);
  21.245  by (etac box_equals 1);
  21.246 @@ -294,7 +259,7 @@
  21.247  by (rtac beta_cfun_sprod 1);
  21.248  qed "inject_spair";
  21.249  
  21.250 -val prems = goalw thy [spair_def] "UU = (:UU,UU:)";
  21.251 +Goalw [spair_def] "UU = (:UU,UU:)";
  21.252  by (rtac sym 1);
  21.253  by (rtac trans 1);
  21.254  by (rtac beta_cfun_sprod 1);
  21.255 @@ -302,9 +267,8 @@
  21.256  by (rtac inst_sprod_pcpo 1);
  21.257  qed "inst_sprod_pcpo2";
  21.258  
  21.259 -val prems = goalw thy [spair_def] 
  21.260 +Goalw [spair_def] 
  21.261          "(a=UU | b=UU) ==> (:a,b:)=UU";
  21.262 -by (cut_facts_tac prems 1);
  21.263  by (rtac trans 1);
  21.264  by (rtac beta_cfun_sprod 1);
  21.265  by (rtac trans 1);
  21.266 @@ -312,14 +276,14 @@
  21.267  by (etac strict_Ispair 1);
  21.268  qed "strict_spair";
  21.269  
  21.270 -val prems = goalw thy [spair_def] "(:UU,b:) = UU";
  21.271 +Goalw [spair_def] "(:UU,b:) = UU";
  21.272  by (stac beta_cfun_sprod 1);
  21.273  by (rtac trans 1);
  21.274  by (rtac (inst_sprod_pcpo RS sym) 2);
  21.275  by (rtac strict_Ispair1 1);
  21.276  qed "strict_spair1";
  21.277  
  21.278 -val prems = goalw thy [spair_def] "(:a,UU:) = UU";
  21.279 +Goalw [spair_def] "(:a,UU:) = UU";
  21.280  by (stac beta_cfun_sprod 1);
  21.281  by (rtac trans 1);
  21.282  by (rtac (inst_sprod_pcpo RS sym) 2);
  21.283 @@ -338,16 +302,15 @@
  21.284  by Auto_tac;  
  21.285  qed "defined_spair_rev";
  21.286  
  21.287 -val prems = goalw thy [spair_def]
  21.288 +Goalw [spair_def]
  21.289          "[|a~=UU; b~=UU|] ==> (:a,b:) ~= UU";
  21.290 -by (cut_facts_tac prems 1);
  21.291  by (stac beta_cfun_sprod 1);
  21.292  by (stac inst_sprod_pcpo 1);
  21.293  by (etac defined_Ispair 1);
  21.294  by (atac 1);
  21.295  qed "defined_spair";
  21.296  
  21.297 -val prems = goalw thy [spair_def]
  21.298 +Goalw [spair_def]
  21.299          "z=UU | (? a b. z=(:a,b:) & a~=UU & b~=UU)";
  21.300  by (rtac (Exh_Sprod RS disjE) 1);
  21.301  by (rtac disjI1 1);
  21.302 @@ -379,9 +342,8 @@
  21.303  qed "sprodE";
  21.304  
  21.305  
  21.306 -val prems = goalw thy [sfst_def] 
  21.307 +Goalw [sfst_def] 
  21.308          "p=UU==>sfst`p=UU";
  21.309 -by (cut_facts_tac prems 1);
  21.310  by (stac beta_cfun 1);
  21.311  by (rtac cont_Isfst 1);
  21.312  by (rtac strict_Isfst 1);
  21.313 @@ -389,7 +351,7 @@
  21.314  by (atac 1);
  21.315  qed "strict_sfst";
  21.316  
  21.317 -val prems = goalw thy [sfst_def,spair_def] 
  21.318 +Goalw [sfst_def,spair_def] 
  21.319          "sfst`(:UU,y:) = UU";
  21.320  by (stac beta_cfun_sprod 1);
  21.321  by (stac beta_cfun 1);
  21.322 @@ -397,7 +359,7 @@
  21.323  by (rtac strict_Isfst1 1);
  21.324  qed "strict_sfst1";
  21.325   
  21.326 -val prems = goalw thy [sfst_def,spair_def] 
  21.327 +Goalw [sfst_def,spair_def] 
  21.328          "sfst`(:x,UU:) = UU";
  21.329  by (stac beta_cfun_sprod 1);
  21.330  by (stac beta_cfun 1);
  21.331 @@ -405,9 +367,8 @@
  21.332  by (rtac strict_Isfst2 1);
  21.333  qed "strict_sfst2";
  21.334  
  21.335 -val prems = goalw thy [ssnd_def] 
  21.336 +Goalw [ssnd_def] 
  21.337          "p=UU==>ssnd`p=UU";
  21.338 -by (cut_facts_tac prems 1);
  21.339  by (stac beta_cfun 1);
  21.340  by (rtac cont_Issnd 1);
  21.341  by (rtac strict_Issnd 1);
  21.342 @@ -415,7 +376,7 @@
  21.343  by (atac 1);
  21.344  qed "strict_ssnd";
  21.345  
  21.346 -val prems = goalw thy [ssnd_def,spair_def] 
  21.347 +Goalw [ssnd_def,spair_def] 
  21.348          "ssnd`(:UU,y:) = UU";
  21.349  by (stac beta_cfun_sprod 1);
  21.350  by (stac beta_cfun 1);
  21.351 @@ -423,7 +384,7 @@
  21.352  by (rtac strict_Issnd1 1);
  21.353  qed "strict_ssnd1";
  21.354  
  21.355 -val prems = goalw thy [ssnd_def,spair_def] 
  21.356 +Goalw [ssnd_def,spair_def] 
  21.357          "ssnd`(:x,UU:) = UU";
  21.358  by (stac beta_cfun_sprod 1);
  21.359  by (stac beta_cfun 1);
  21.360 @@ -431,18 +392,16 @@
  21.361  by (rtac strict_Issnd2 1);
  21.362  qed "strict_ssnd2";
  21.363  
  21.364 -val prems = goalw thy [sfst_def,spair_def] 
  21.365 +Goalw [sfst_def,spair_def] 
  21.366          "y~=UU ==>sfst`(:x,y:)=x";
  21.367 -by (cut_facts_tac prems 1);
  21.368  by (stac beta_cfun_sprod 1);
  21.369  by (stac beta_cfun 1);
  21.370  by (rtac cont_Isfst 1);
  21.371  by (etac Isfst2 1);
  21.372  qed "sfst2";
  21.373  
  21.374 -val prems = goalw thy [ssnd_def,spair_def] 
  21.375 +Goalw [ssnd_def,spair_def] 
  21.376          "x~=UU ==>ssnd`(:x,y:)=y";
  21.377 -by (cut_facts_tac prems 1);
  21.378  by (stac beta_cfun_sprod 1);
  21.379  by (stac beta_cfun 1);
  21.380  by (rtac cont_Issnd 1);
  21.381 @@ -450,9 +409,8 @@
  21.382  qed "ssnd2";
  21.383  
  21.384  
  21.385 -val prems = goalw thy [sfst_def,ssnd_def,spair_def]
  21.386 +Goalw [sfst_def,ssnd_def,spair_def]
  21.387          "p~=UU ==> sfst`p ~=UU & ssnd`p ~=UU";
  21.388 -by (cut_facts_tac prems 1);
  21.389  by (stac beta_cfun 1);
  21.390  by (rtac cont_Issnd 1);
  21.391  by (stac beta_cfun 1);
  21.392 @@ -462,7 +420,7 @@
  21.393  by (atac 1);
  21.394  qed "defined_sfstssnd";
  21.395   
  21.396 -val prems = goalw thy [sfst_def,ssnd_def,spair_def] "(:sfst`p , ssnd`p:) = p";
  21.397 +Goalw [sfst_def,ssnd_def,spair_def] "(:sfst`p , ssnd`p:) = p";
  21.398  by (stac beta_cfun_sprod 1);
  21.399  by (stac beta_cfun 1);
  21.400  by (rtac cont_Issnd 1);
  21.401 @@ -471,17 +429,15 @@
  21.402  by (rtac (surjective_pairing_Sprod RS sym) 1);
  21.403  qed "surjective_pairing_Sprod2";
  21.404  
  21.405 -val prems = goalw thy [sfst_def,ssnd_def,spair_def]
  21.406 -"[|chain(S)|] ==> range(S) <<| \
  21.407 -\ (: lub(range(%i. sfst`(S i))), lub(range(%i. ssnd`(S i))) :)";
  21.408 -by (cut_facts_tac prems 1);
  21.409 +Goalw [sfst_def,ssnd_def,spair_def]
  21.410 +"chain(S) ==> range(S) <<| \
  21.411 +\              (: lub(range(%i. sfst`(S i))), lub(range(%i. ssnd`(S i))) :)";
  21.412  by (stac beta_cfun_sprod 1);
  21.413  by (stac (beta_cfun RS ext) 1);
  21.414  by (rtac cont_Issnd 1);
  21.415  by (stac (beta_cfun RS ext) 1);
  21.416  by (rtac cont_Isfst 1);
  21.417 -by (rtac lub_sprod 1);
  21.418 -by (resolve_tac prems 1);
  21.419 +by (etac lub_sprod 1);
  21.420  qed "lub_sprod2";
  21.421  
  21.422  
  21.423 @@ -492,7 +448,7 @@
  21.424   (:lub (range (%i. sfst`(?S1 i))), lub (range (%i. ssnd`(?S1 i))):)" : thm
  21.425  *)
  21.426  
  21.427 -val prems = goalw thy [ssplit_def]
  21.428 +Goalw [ssplit_def]
  21.429          "ssplit`f`UU=UU";
  21.430  by (stac beta_cfun 1);
  21.431  by (Simp_tac 1);
  21.432 @@ -500,25 +456,25 @@
  21.433  by (rtac refl 1);
  21.434  qed "ssplit1";
  21.435  
  21.436 -val prems = goalw thy [ssplit_def]
  21.437 +Goalw [ssplit_def]
  21.438          "[|x~=UU;y~=UU|] ==> ssplit`f`(:x,y:)= f`x`y";
  21.439  by (stac beta_cfun 1);
  21.440  by (Simp_tac 1);
  21.441  by (stac strictify2 1);
  21.442  by (rtac defined_spair 1);
  21.443 -by (resolve_tac prems 1);
  21.444 -by (resolve_tac prems 1);
  21.445 +by (assume_tac 1);
  21.446 +by (assume_tac 1);
  21.447  by (stac beta_cfun 1);
  21.448  by (Simp_tac 1);
  21.449  by (stac sfst2 1);
  21.450 -by (resolve_tac prems 1);
  21.451 +by (assume_tac 1);
  21.452  by (stac ssnd2 1);
  21.453 -by (resolve_tac prems 1);
  21.454 +by (assume_tac 1);
  21.455  by (rtac refl 1);
  21.456  qed "ssplit2";
  21.457  
  21.458  
  21.459 -val prems = goalw thy [ssplit_def]
  21.460 +Goalw [ssplit_def]
  21.461    "ssplit`spair`z=z";
  21.462  by (stac beta_cfun 1);
  21.463  by (Simp_tac 1);
    22.1 --- a/src/HOLCF/Ssum0.ML	Wed Jul 05 14:26:58 2000 +0200
    22.2 +++ b/src/HOLCF/Ssum0.ML	Wed Jul 05 16:37:52 2000 +0200
    22.3 @@ -10,14 +10,14 @@
    22.4  (* A non-emptyness result for Sssum                                         *)
    22.5  (* ------------------------------------------------------------------------ *)
    22.6  
    22.7 -val prems = goalw Ssum0.thy [Ssum_def] "Sinl_Rep(a):Ssum";
    22.8 +Goalw [Ssum_def] "Sinl_Rep(a):Ssum";
    22.9  by (rtac CollectI 1);
   22.10  by (rtac disjI1 1);
   22.11  by (rtac exI 1);
   22.12  by (rtac refl 1);
   22.13  qed "SsumIl";
   22.14  
   22.15 -val prems = goalw Ssum0.thy [Ssum_def] "Sinr_Rep(a):Ssum";
   22.16 +Goalw [Ssum_def] "Sinr_Rep(a):Ssum";
   22.17  by (rtac CollectI 1);
   22.18  by (rtac disjI2 1);
   22.19  by (rtac exI 1);
   22.20 @@ -33,7 +33,7 @@
   22.21  (* Strictness of Sinr_Rep, Sinl_Rep and Isinl, Isinr                        *)
   22.22  (* ------------------------------------------------------------------------ *)
   22.23  
   22.24 -val prems = goalw Ssum0.thy [Sinr_Rep_def,Sinl_Rep_def]
   22.25 +Goalw [Sinr_Rep_def,Sinl_Rep_def]
   22.26   "Sinl_Rep(UU) = Sinr_Rep(UU)";
   22.27  by (rtac ext 1);
   22.28  by (rtac ext 1);
   22.29 @@ -41,7 +41,7 @@
   22.30  by (fast_tac HOL_cs 1);
   22.31  qed "strict_SinlSinr_Rep";
   22.32  
   22.33 -val prems = goalw Ssum0.thy [Isinl_def,Isinr_def]
   22.34 +Goalw [Isinl_def,Isinr_def]
   22.35   "Isinl(UU) = Isinr(UU)";
   22.36  by (rtac (strict_SinlSinr_Rep RS arg_cong) 1);
   22.37  qed "strict_IsinlIsinr";
   22.38 @@ -51,25 +51,14 @@
   22.39  (* distinctness of  Sinl_Rep, Sinr_Rep and Isinl, Isinr                     *)
   22.40  (* ------------------------------------------------------------------------ *)
   22.41  
   22.42 -val prems = goalw Ssum0.thy [Sinl_Rep_def,Sinr_Rep_def]
   22.43 +Goalw [Sinl_Rep_def,Sinr_Rep_def]
   22.44          "(Sinl_Rep(a) = Sinr_Rep(b)) ==> a=UU & b=UU";
   22.45 -by (rtac conjI 1);
   22.46 -by (case_tac "a=UU" 1);
   22.47 -by (atac 1);
   22.48 -by (rtac ((hd prems) RS fun_cong RS fun_cong RS fun_cong RS iffD2  RS mp RS conjunct1 RS sym) 1);
   22.49 -by (fast_tac HOL_cs 1);
   22.50 -by (atac 1);
   22.51 -by (case_tac "b=UU" 1);
   22.52 -by (atac 1);
   22.53 -by (rtac ((hd prems) RS fun_cong RS fun_cong RS fun_cong RS iffD1  RS mp RS conjunct1 RS sym) 1);
   22.54 -by (fast_tac HOL_cs 1);
   22.55 -by (atac 1);
   22.56 +by (blast_tac (claset() addSDs [fun_cong]) 1);
   22.57  qed "noteq_SinlSinr_Rep";
   22.58  
   22.59  
   22.60 -val prems = goalw Ssum0.thy [Isinl_def,Isinr_def]
   22.61 +Goalw [Isinl_def,Isinr_def]
   22.62          "Isinl(a)=Isinr(b) ==> a=UU & b=UU";
   22.63 -by (cut_facts_tac prems 1);
   22.64  by (rtac noteq_SinlSinr_Rep 1);
   22.65  by (etac (inj_on_Abs_Ssum  RS inj_onD) 1);
   22.66  by (rtac SsumIl 1);
   22.67 @@ -82,36 +71,22 @@
   22.68  (* injectivity of Sinl_Rep, Sinr_Rep and Isinl, Isinr                       *)
   22.69  (* ------------------------------------------------------------------------ *)
   22.70  
   22.71 -val prems = goalw Ssum0.thy [Sinl_Rep_def]
   22.72 - "(Sinl_Rep(a) = Sinl_Rep(UU)) ==> a=UU";
   22.73 -by (case_tac "a=UU" 1);
   22.74 -by (atac 1);
   22.75 -by (rtac ((hd prems) RS fun_cong RS fun_cong RS fun_cong  RS iffD2 RS mp RS conjunct1 RS sym) 1);
   22.76 -by (fast_tac HOL_cs 1);
   22.77 -by (atac 1);
   22.78 +Goalw [Sinl_Rep_def] "(Sinl_Rep(a) = Sinl_Rep(UU)) ==> a=UU";
   22.79 +by (blast_tac (claset() addSDs [fun_cong]) 1);
   22.80  qed "inject_Sinl_Rep1";
   22.81  
   22.82 -val prems = goalw Ssum0.thy [Sinr_Rep_def]
   22.83 - "(Sinr_Rep(b) = Sinr_Rep(UU)) ==> b=UU";
   22.84 -by (case_tac "b=UU" 1);
   22.85 -by (atac 1);
   22.86 -by (rtac ((hd prems) RS fun_cong RS fun_cong RS fun_cong  RS iffD2 RS mp RS conjunct1 RS sym) 1);
   22.87 -by (fast_tac HOL_cs 1);
   22.88 -by (atac 1);
   22.89 +Goalw [Sinr_Rep_def] "(Sinr_Rep(b) = Sinr_Rep(UU)) ==> b=UU";
   22.90 +by (blast_tac (claset() addSDs [fun_cong]) 1);
   22.91  qed "inject_Sinr_Rep1";
   22.92  
   22.93 -val prems = goalw Ssum0.thy [Sinl_Rep_def]
   22.94 +Goalw [Sinl_Rep_def]
   22.95  "[| a1~=UU ; a2~=UU ; Sinl_Rep(a1)=Sinl_Rep(a2) |] ==> a1=a2";
   22.96 -by (rtac ((nth_elem (2,prems)) RS fun_cong  RS fun_cong RS fun_cong  RS iffD1 RS mp RS conjunct1) 1);
   22.97 -by (fast_tac HOL_cs 1);
   22.98 -by (resolve_tac prems 1);
   22.99 +by (blast_tac (claset() addSDs [fun_cong]) 1);
  22.100  qed "inject_Sinl_Rep2";
  22.101  
  22.102 -val prems = goalw Ssum0.thy [Sinr_Rep_def]
  22.103 +Goalw [Sinr_Rep_def]
  22.104  "[|b1~=UU ; b2~=UU ; Sinr_Rep(b1)=Sinr_Rep(b2) |] ==> b1=b2";
  22.105 -by (rtac ((nth_elem (2,prems)) RS fun_cong  RS fun_cong RS fun_cong  RS iffD1 RS mp RS conjunct1) 1);
  22.106 -by (fast_tac HOL_cs 1);
  22.107 -by (resolve_tac prems 1);
  22.108 +by (blast_tac (claset() addSDs [fun_cong]) 1);
  22.109  qed "inject_Sinr_Rep2";
  22.110  
  22.111  Goal "Sinl_Rep(a1)=Sinl_Rep(a2) ==> a1=a2";
  22.112 @@ -140,18 +115,14 @@
  22.113  by (atac 1);
  22.114  qed "inject_Sinr_Rep";
  22.115  
  22.116 -val prems = goalw Ssum0.thy [Isinl_def]
  22.117 -"Isinl(a1)=Isinl(a2)==> a1=a2";
  22.118 -by (cut_facts_tac prems 1);
  22.119 +Goalw [Isinl_def] "Isinl(a1)=Isinl(a2)==> a1=a2";
  22.120  by (rtac inject_Sinl_Rep 1);
  22.121  by (etac (inj_on_Abs_Ssum  RS inj_onD) 1);
  22.122  by (rtac SsumIl 1);
  22.123  by (rtac SsumIl 1);
  22.124  qed "inject_Isinl";
  22.125  
  22.126 -val prems = goalw Ssum0.thy [Isinr_def]
  22.127 -"Isinr(b1)=Isinr(b2) ==> b1=b2";
  22.128 -by (cut_facts_tac prems 1);
  22.129 +Goalw [Isinr_def] "Isinr(b1)=Isinr(b2) ==> b1=b2";
  22.130  by (rtac inject_Sinr_Rep 1);
  22.131  by (etac (inj_on_Abs_Ssum  RS inj_onD) 1);
  22.132  by (rtac SsumIr 1);
  22.133 @@ -175,7 +146,7 @@
  22.134  (* choice of the bottom representation is arbitrary                         *)
  22.135  (* ------------------------------------------------------------------------ *)
  22.136  
  22.137 -val prems = goalw Ssum0.thy [Isinl_def,Isinr_def]
  22.138 +Goalw [Isinl_def,Isinr_def]
  22.139          "z=Isinl(UU) | (? a. z=Isinl(a) & a~=UU) | (? b. z=Isinr(b) & b~=UU)";
  22.140  by (rtac (rewrite_rule [Ssum_def] Rep_Ssum RS CollectE) 1);
  22.141  by (etac disjE 1);
  22.142 @@ -250,7 +221,7 @@
  22.143  (* rewrites for Iwhen                                                       *)
  22.144  (* ------------------------------------------------------------------------ *)
  22.145  
  22.146 -val prems = goalw Ssum0.thy [Iwhen_def]
  22.147 +Goalw [Iwhen_def]
  22.148          "Iwhen f g (Isinl UU) = UU";
  22.149  by (rtac select_equality 1);
  22.150  by (rtac conjI 1);
  22.151 @@ -273,9 +244,8 @@
  22.152  qed "Iwhen1";
  22.153  
  22.154  
  22.155 -val prems = goalw Ssum0.thy [Iwhen_def]
  22.156 +Goalw [Iwhen_def]
  22.157          "x~=UU ==> Iwhen f g (Isinl x) = f`x";
  22.158 -by (cut_facts_tac prems 1);
  22.159  by (rtac select_equality 1);
  22.160  by (fast_tac HOL_cs  2);
  22.161  by (rtac conjI 1);
  22.162 @@ -297,9 +267,8 @@
  22.163  by (fast_tac HOL_cs  1);
  22.164  qed "Iwhen2";
  22.165  
  22.166 -val prems = goalw Ssum0.thy [Iwhen_def]
  22.167 +Goalw [Iwhen_def]
  22.168          "y~=UU ==> Iwhen f g (Isinr y) = g`y";
  22.169 -by (cut_facts_tac prems 1);
  22.170  by (rtac select_equality 1);
  22.171  by (fast_tac HOL_cs  2);
  22.172  by (rtac conjI 1);
  22.173 @@ -329,3 +298,4 @@
  22.174  val Ssum0_ss = (simpset_of Cfun3.thy) delsimps [range_composition] addsimps 
  22.175                  [(strict_IsinlIsinr RS sym),Iwhen1,Iwhen2,Iwhen3];
  22.176  
  22.177 +Addsimps [strict_IsinlIsinr RS sym, Iwhen1, Iwhen2, Iwhen3];
    23.1 --- a/src/HOLCF/Ssum1.ML	Wed Jul 05 14:26:58 2000 +0200
    23.2 +++ b/src/HOLCF/Ssum1.ML	Wed Jul 05 16:37:52 2000 +0200
    23.3 @@ -32,11 +32,10 @@
    23.4          (res_inst_tac [("t",s1)](noteq_IsinlIsinr RS conjunct2 RS ssubst)1)
    23.5          THEN (rtac trans 1)
    23.6          THEN (atac 2)
    23.7 -        THEN (etac sym 1))
    23.8 +        THEN (etac sym 1));
    23.9  
   23.10 -val prems = goalw thy [less_ssum_def]
   23.11 +Goalw [less_ssum_def]
   23.12  "[|s1=Isinl(x::'a); s2=Isinl(y::'a)|] ==> s1 << s2 = (x << y)";
   23.13 -by (cut_facts_tac prems 1);
   23.14  by (rtac select_equality 1);
   23.15  by (dtac conjunct1 2);
   23.16  by (dtac spec 2);
   23.17 @@ -73,9 +72,8 @@
   23.18  qed "less_ssum1a";
   23.19  
   23.20  
   23.21 -val prems = goalw thy [less_ssum_def]
   23.22 +Goalw [less_ssum_def]
   23.23  "[|s1=Isinr(x::'b); s2=Isinr(y::'b)|] ==> s1 << s2 = (x << y)";
   23.24 -by (cut_facts_tac prems 1);
   23.25  by (rtac select_equality 1);
   23.26  by (dtac conjunct2 2);
   23.27  by (dtac conjunct1 2);
   23.28 @@ -113,9 +111,8 @@
   23.29  qed "less_ssum1b";
   23.30  
   23.31  
   23.32 -val prems = goalw thy [less_ssum_def]
   23.33 +Goalw [less_ssum_def]
   23.34  "[|s1=Isinl(x::'a); s2=Isinr(y::'b)|] ==> s1 << s2 = ((x::'a) = UU)";
   23.35 -by (cut_facts_tac prems 1);
   23.36  by (rtac select_equality 1);
   23.37  by (rtac conjI 1);
   23.38  by (strip_tac 1);
   23.39 @@ -153,9 +150,8 @@
   23.40  qed "less_ssum1c";
   23.41  
   23.42  
   23.43 -val prems = goalw thy [less_ssum_def]
   23.44 +Goalw [less_ssum_def]
   23.45  "[|s1=Isinr(x); s2=Isinl(y)|] ==> s1 << s2 = (x = UU)";
   23.46 -by (cut_facts_tac prems 1);
   23.47  by (rtac select_equality 1);
   23.48  by (dtac conjunct2 2);
   23.49  by (dtac conjunct2 2);
    24.1 --- a/src/HOLCF/Ssum2.ML	Wed Jul 05 14:26:58 2000 +0200
    24.2 +++ b/src/HOLCF/Ssum2.ML	Wed Jul 05 16:37:52 2000 +0200
    24.3 @@ -62,12 +62,12 @@
    24.4  (* Isinl, Isinr are monotone                                                *)
    24.5  (* ------------------------------------------------------------------------ *)
    24.6  
    24.7 -val prems = goalw thy [monofun]  "monofun(Isinl)";
    24.8 +Goalw [monofun]  "monofun(Isinl)";
    24.9  by (strip_tac 1);
   24.10  by (etac (less_ssum3a RS iffD2) 1);
   24.11  qed "monofun_Isinl";
   24.12  
   24.13 -val prems = goalw thy [monofun]  "monofun(Isinr)";
   24.14 +Goalw [monofun]  "monofun(Isinr)";
   24.15  by (strip_tac 1);
   24.16  by (etac (less_ssum3b RS iffD2) 1);
   24.17  qed "monofun_Isinr";
   24.18 @@ -78,7 +78,7 @@
   24.19  (* ------------------------------------------------------------------------ *)
   24.20  
   24.21  
   24.22 -val prems = goalw thy [monofun]  "monofun(Iwhen)";
   24.23 +Goalw [monofun]  "monofun(Iwhen)";
   24.24  by (strip_tac 1);
   24.25  by (rtac (less_fun RS iffD2) 1);
   24.26  by (strip_tac 1);
   24.27 @@ -92,7 +92,7 @@
   24.28  by (asm_simp_tac Ssum0_ss 1);
   24.29  qed "monofun_Iwhen1";
   24.30  
   24.31 -val prems = goalw thy [monofun]  "monofun(Iwhen(f))";
   24.32 +Goalw [monofun]  "monofun(Iwhen(f))";
   24.33  by (strip_tac 1);
   24.34  by (rtac (less_fun RS iffD2) 1);
   24.35  by (strip_tac 1);
   24.36 @@ -104,7 +104,7 @@
   24.37  by (etac monofun_cfun_fun 1);
   24.38  qed "monofun_Iwhen2";
   24.39  
   24.40 -val prems = goalw thy [monofun]  "monofun(Iwhen(f)(g))";
   24.41 +Goalw [monofun]  "monofun(Iwhen(f)(g))";
   24.42  by (strip_tac 1);
   24.43  by (res_inst_tac [("p","x")] IssumE 1);
   24.44  by (hyp_subst_tac 1);
   24.45 @@ -182,13 +182,13 @@
   24.46  by (rtac (less_ssum3d RS iffD1) 1);
   24.47  by (eres_inst_tac [("s","Y(i)"),("t","Isinr(x)::'a++'b")] subst 1);
   24.48  by (eres_inst_tac [("s","Y(ia)"),("t","Isinl(xa)::'a++'b")] subst 1);
   24.49 -by (etac (chain_mono RS mp) 1);
   24.50 +by (etac (chain_mono) 1);
   24.51  by (atac 1);
   24.52  by (eres_inst_tac [("P","xa=UU")] notE 1);
   24.53  by (rtac (less_ssum3c RS iffD1) 1);
   24.54  by (eres_inst_tac [("s","Y(i)"),("t","Isinr(x)::'a++'b")] subst 1);
   24.55  by (eres_inst_tac [("s","Y(ia)"),("t","Isinl(xa)::'a++'b")] subst 1);
   24.56 -by (etac (chain_mono RS mp) 1);
   24.57 +by (etac (chain_mono) 1);
   24.58  by (atac 1);
   24.59  qed "ssum_lemma3";
   24.60  
   24.61 @@ -261,9 +261,7 @@
   24.62  Goal "[|chain(Y);(!i.? x. Y(i)=Isinl(x))|] ==>\
   24.63  \     range(Y) <<| Isinl(lub(range(%i.(Iwhen (LAM x. x) (LAM y. UU))(Y i))))";
   24.64  by (rtac is_lubI 1);
   24.65 -by (rtac conjI 1);
   24.66  by (rtac ub_rangeI 1);
   24.67 -by (rtac allI 1);
   24.68  by (etac allE 1);
   24.69  by (etac exE 1);
   24.70  by (res_inst_tac [("t","Y(i)")] (ssum_lemma5 RS subst) 1);
   24.71 @@ -290,16 +288,14 @@
   24.72  by (rtac (less_ssum3c RS iffD1) 1);
   24.73  by (res_inst_tac [("t","Isinl(x)")] subst 1);
   24.74  by (atac 1);
   24.75 -by (etac (ub_rangeE RS spec) 1);
   24.76 +by (etac (ub_rangeD) 1);
   24.77  qed "lub_ssum1a";
   24.78  
   24.79  
   24.80  Goal "[|chain(Y);(!i.? x. Y(i)=Isinr(x))|] ==>\
   24.81  \     range(Y) <<| Isinr(lub(range(%i.(Iwhen (LAM y. UU) (LAM x. x))(Y i))))";
   24.82  by (rtac is_lubI 1);
   24.83 -by (rtac conjI 1);
   24.84  by (rtac ub_rangeI 1);
   24.85 -by (rtac allI 1);
   24.86  by (etac allE 1);
   24.87  by (etac exE 1);
   24.88  by (res_inst_tac [("t","Y(i)")] (ssum_lemma6 RS subst) 1);
   24.89 @@ -320,7 +316,7 @@
   24.90  by (rtac (less_ssum3d RS iffD1) 1);
   24.91  by (res_inst_tac [("t","Isinr(y)")] subst 1);
   24.92  by (atac 1);
   24.93 -by (etac (ub_rangeE RS spec) 1);
   24.94 +by (etac (ub_rangeD) 1);
   24.95  by (res_inst_tac [("t","u")] (ssum_lemma6 RS subst) 1);
   24.96  by (atac 1);
   24.97  by (rtac (monofun_Isinr RS monofunE RS spec RS spec RS mp) 1);
    25.1 --- a/src/HOLCF/Ssum3.ML	Wed Jul 05 14:26:58 2000 +0200
    25.2 +++ b/src/HOLCF/Ssum3.ML	Wed Jul 05 16:37:52 2000 +0200
    25.3 @@ -334,37 +334,34 @@
    25.4  (* continuous versions of lemmas for 'a ++ 'b                               *)
    25.5  (* ------------------------------------------------------------------------ *)
    25.6  
    25.7 -val prems = goalw Ssum3.thy [sinl_def] "sinl`UU =UU";
    25.8 +Goalw [sinl_def] "sinl`UU =UU";
    25.9  by (simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1);
   25.10  by (rtac (inst_ssum_pcpo RS sym) 1);
   25.11  qed "strict_sinl";
   25.12  
   25.13 -val prems = goalw Ssum3.thy [sinr_def] "sinr`UU=UU";
   25.14 +Goalw [sinr_def] "sinr`UU=UU";
   25.15  by (simp_tac (Ssum0_ss addsimps [cont_Isinr]) 1);
   25.16  by (rtac (inst_ssum_pcpo RS sym) 1);
   25.17  qed "strict_sinr";
   25.18  
   25.19 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
   25.20 +Goalw [sinl_def,sinr_def] 
   25.21          "sinl`a=sinr`b ==> a=UU & b=UU";
   25.22 -by (cut_facts_tac prems 1);
   25.23  by (rtac noteq_IsinlIsinr 1);
   25.24  by (etac box_equals 1);
   25.25  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1);
   25.26  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1);
   25.27  qed "noteq_sinlsinr";
   25.28  
   25.29 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
   25.30 +Goalw [sinl_def,sinr_def] 
   25.31          "sinl`a1=sinl`a2==> a1=a2";
   25.32 -by (cut_facts_tac prems 1);
   25.33  by (rtac inject_Isinl 1);
   25.34  by (etac box_equals 1);
   25.35  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1);
   25.36  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1);
   25.37  qed "inject_sinl";
   25.38  
   25.39 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
   25.40 +Goalw [sinl_def,sinr_def] 
   25.41          "sinr`a1=sinr`a2==> a1=a2";
   25.42 -by (cut_facts_tac prems 1);
   25.43  by (rtac inject_Isinr 1);
   25.44  by (etac box_equals 1);
   25.45  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1);
   25.46 @@ -386,7 +383,7 @@
   25.47  by (etac notnotD 1);
   25.48  qed "defined_sinr";
   25.49  
   25.50 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
   25.51 +Goalw [sinl_def,sinr_def] 
   25.52          "z=UU | (? a. z=sinl`a & a~=UU) | (? b. z=sinr`b & b~=UU)";
   25.53  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1);
   25.54  by (stac inst_ssum_pcpo 1);
   25.55 @@ -422,7 +419,7 @@
   25.56  val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2,
   25.57                  cont_Iwhen3,cont2cont_CF1L]) 1)); 
   25.58  
   25.59 -val _ = goalw Ssum3.thy [sscase_def,sinl_def,sinr_def] 
   25.60 +Goalw [sscase_def,sinl_def,sinr_def] 
   25.61          "sscase`f`g`UU = UU";
   25.62  by (stac inst_ssum_pcpo 1);
   25.63  by (stac beta_cfun 1);
   25.64 @@ -438,9 +435,8 @@
   25.65  val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2,
   25.66                  cont_Iwhen3,cont_Isinl,cont_Isinr,cont2cont_CF1L]) 1));
   25.67  
   25.68 -val prems = goalw Ssum3.thy [sscase_def,sinl_def,sinr_def] 
   25.69 +Goalw [sscase_def,sinl_def,sinr_def] 
   25.70          "x~=UU==> sscase`f`g`(sinl`x) = f`x";
   25.71 -by (cut_facts_tac prems 1);
   25.72  by (stac beta_cfun 1);
   25.73  by tac;
   25.74  by (stac beta_cfun 1);
   25.75 @@ -452,9 +448,8 @@
   25.76  by (asm_simp_tac Ssum0_ss  1);
   25.77  qed "sscase2";
   25.78  
   25.79 -val prems = goalw Ssum3.thy [sscase_def,sinl_def,sinr_def] 
   25.80 +Goalw [sscase_def,sinl_def,sinr_def] 
   25.81          "x~=UU==> sscase`f`g`(sinr`x) = g`x";
   25.82 -by (cut_facts_tac prems 1);
   25.83  by (stac beta_cfun 1);
   25.84  by tac;
   25.85  by (stac beta_cfun 1);
   25.86 @@ -467,7 +462,7 @@
   25.87  qed "sscase3";
   25.88  
   25.89  
   25.90 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
   25.91 +Goalw [sinl_def,sinr_def] 
   25.92          "(sinl`x << sinl`y) = (x << y)";
   25.93  by (stac beta_cfun 1);
   25.94  by tac;
   25.95 @@ -476,7 +471,7 @@
   25.96  by (rtac less_ssum3a 1);
   25.97  qed "less_ssum4a";
   25.98  
   25.99 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
  25.100 +Goalw [sinl_def,sinr_def] 
  25.101          "(sinr`x << sinr`y) = (x << y)";
  25.102  by (stac beta_cfun 1);
  25.103  by tac;
  25.104 @@ -485,7 +480,7 @@
  25.105  by (rtac less_ssum3b 1);
  25.106  qed "less_ssum4b";
  25.107  
  25.108 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
  25.109 +Goalw [sinl_def,sinr_def] 
  25.110          "(sinl`x << sinr`y) = (x = UU)";
  25.111  by (stac beta_cfun 1);
  25.112  by tac;
  25.113 @@ -494,7 +489,7 @@
  25.114  by (rtac less_ssum3c 1);
  25.115  qed "less_ssum4c";
  25.116  
  25.117 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
  25.118 +Goalw [sinl_def,sinr_def] 
  25.119          "(sinr`x << sinl`y) = (x = UU)";
  25.120  by (stac beta_cfun 1);
  25.121  by tac;
  25.122 @@ -503,18 +498,16 @@
  25.123  by (rtac less_ssum3d 1);
  25.124  qed "less_ssum4d";
  25.125  
  25.126 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
  25.127 +Goalw [sinl_def,sinr_def] 
  25.128          "chain(Y) ==> (!i.? x.(Y i)=sinl`x)|(!i.? y.(Y i)=sinr`y)";
  25.129 -by (cut_facts_tac prems 1);
  25.130  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1);
  25.131  by (etac ssum_lemma4 1);
  25.132  qed "ssum_chainE";
  25.133  
  25.134  
  25.135 -val prems = goalw Ssum3.thy [sinl_def,sinr_def,sscase_def] 
  25.136 +Goalw [sinl_def,sinr_def,sscase_def] 
  25.137  "[| chain(Y); !i.? x. Y(i) = sinl`x |] ==>\ 
  25.138  \   lub(range(Y)) = sinl`(lub(range(%i. sscase`(LAM x. x)`(LAM y. UU)`(Y i))))";
  25.139 -by (cut_facts_tac prems 1);
  25.140  by (stac beta_cfun 1);
  25.141  by tac;
  25.142  by (stac beta_cfun 1);
  25.143 @@ -534,10 +527,9 @@
  25.144  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1);
  25.145  qed "thelub_ssum2a";
  25.146  
  25.147 -val prems = goalw Ssum3.thy [sinl_def,sinr_def,sscase_def] 
  25.148 +Goalw [sinl_def,sinr_def,sscase_def] 
  25.149  "[| chain(Y); !i.? x. Y(i) = sinr`x |] ==>\ 
  25.150  \   lub(range(Y)) = sinr`(lub(range(%i. sscase`(LAM y. UU)`(LAM x. x)`(Y i))))";
  25.151 -by (cut_facts_tac prems 1);
  25.152  by (stac beta_cfun 1);
  25.153  by tac;
  25.154  by (stac beta_cfun 1);
  25.155 @@ -557,17 +549,15 @@
  25.156  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1);
  25.157  qed "thelub_ssum2b";
  25.158  
  25.159 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
  25.160 +Goalw [sinl_def,sinr_def] 
  25.161          "[| chain(Y); lub(range(Y)) = sinl`x|] ==> !i.? x. Y(i)=sinl`x";
  25.162 -by (cut_facts_tac prems 1);
  25.163  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1);
  25.164  by (etac ssum_lemma9 1);
  25.165  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1);
  25.166  qed "thelub_ssum2a_rev";
  25.167  
  25.168 -val prems = goalw Ssum3.thy [sinl_def,sinr_def] 
  25.169 -        "[| chain(Y); lub(range(Y)) = sinr`x|] ==> !i.? x. Y(i)=sinr`x";
  25.170 -by (cut_facts_tac prems 1);
  25.171 +Goalw [sinl_def,sinr_def] 
  25.172 +     "[| chain(Y); lub(range(Y)) = sinr`x|] ==> !i.? x. Y(i)=sinr`x";
  25.173  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1);
  25.174  by (etac ssum_lemma10 1);
  25.175  by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1);
    26.1 --- a/src/HOLCF/Up1.ML	Wed Jul 05 14:26:58 2000 +0200
    26.2 +++ b/src/HOLCF/Up1.ML	Wed Jul 05 16:37:52 2000 +0200
    26.3 @@ -10,8 +10,7 @@
    26.4  by (simp_tac (simpset() addsimps [Up_def,Abs_Up_inverse]) 1);
    26.5  qed "Abs_Up_inverse2";
    26.6  
    26.7 -val prems = Goalw [Iup_def ]
    26.8 -        "z = Abs_Up(Inl ()) | (? x. z = Iup x)";
    26.9 +Goalw [Iup_def] "z = Abs_Up(Inl ()) | (? x. z = Iup x)";
   26.10  by (rtac (Rep_Up_inverse RS subst) 1);
   26.11  by (res_inst_tac [("s","Rep_Up z")] sumE 1);
   26.12  by (rtac disjI1 1);
   26.13 @@ -34,8 +33,7 @@
   26.14  by (rtac Rep_Up_inverse 1);
   26.15  qed "inj_Rep_Up";
   26.16  
   26.17 -val prems = goalw thy [Iup_def] "Iup x=Iup y ==> x=y";
   26.18 -by (cut_facts_tac prems 1);
   26.19 +Goalw [Iup_def] "Iup x=Iup y ==> x=y";
   26.20  by (rtac (inj_Inr RS injD) 1);
   26.21  by (rtac (inj_Abs_Up RS injD) 1);
   26.22  by (atac 1);
   26.23 @@ -43,7 +41,7 @@
   26.24  
   26.25  AddSDs [inject_Iup];
   26.26  
   26.27 -val prems = goalw thy [Iup_def] "Iup x~=Abs_Up(Inl ())";
   26.28 +Goalw [Iup_def] "Iup x~=Abs_Up(Inl ())";
   26.29  by (rtac notI 1);
   26.30  by (rtac notE 1);
   26.31  by (rtac Inl_not_Inr 1);
   26.32 @@ -59,14 +57,13 @@
   26.33  by (eresolve_tac prems 1);
   26.34  qed "upE";
   26.35  
   26.36 -val prems = goalw thy [Ifup_def]
   26.37 -        "Ifup(f)(Abs_Up(Inl ()))=UU";
   26.38 +Goalw [Ifup_def] "Ifup(f)(Abs_Up(Inl ()))=UU";
   26.39  by (stac Abs_Up_inverse2 1);
   26.40  by (stac sum_case_Inl 1);
   26.41  by (rtac refl 1);
   26.42  qed "Ifup1";
   26.43  
   26.44 -val prems = goalw thy [Ifup_def,Iup_def]
   26.45 +Goalw [Ifup_def,Iup_def]
   26.46          "Ifup(f)(Iup(x))=f`x";
   26.47  by (stac Abs_Up_inverse2 1);
   26.48  by (stac sum_case_Inr 1);
   26.49 @@ -78,14 +75,14 @@
   26.50  
   26.51  Addsimps [Ifup1,Ifup2];
   26.52  
   26.53 -val prems = goalw thy [less_up_def]
   26.54 +Goalw [less_up_def]
   26.55          "Abs_Up(Inl ())<< z";
   26.56  by (stac Abs_Up_inverse2 1);
   26.57  by (stac sum_case_Inl 1);
   26.58  by (rtac TrueI 1);
   26.59  qed "less_up1a";
   26.60  
   26.61 -val prems = goalw thy [Iup_def,less_up_def]
   26.62 +Goalw [Iup_def,less_up_def]
   26.63          "~(Iup x) << (Abs_Up(Inl ()))";
   26.64  by (rtac notI 1);
   26.65  by (rtac iffD1 1);
   26.66 @@ -97,7 +94,7 @@
   26.67  by (rtac refl 1);
   26.68  qed "less_up1b";
   26.69  
   26.70 -val prems = goalw thy [Iup_def,less_up_def]
   26.71 +Goalw [Iup_def,less_up_def]
   26.72          "(Iup x) << (Iup y)=(x<<y)";
   26.73  by (stac Abs_Up_inverse2 1);
   26.74  by (stac Abs_Up_inverse2 1);
    27.1 --- a/src/HOLCF/Up2.ML	Wed Jul 05 14:26:58 2000 +0200
    27.2 +++ b/src/HOLCF/Up2.ML	Wed Jul 05 16:37:52 2000 +0200
    27.3 @@ -25,7 +25,7 @@
    27.4  
    27.5  bind_thm ("UU_up_def",minimal_up RS minimal2UU RS sym);
    27.6  
    27.7 -Goal "? x::'a u.!y. x<<y";
    27.8 +Goal "EX x::'a u. ALL y. x<<y";
    27.9  by (res_inst_tac [("x","Abs_Up(Inl ())")] exI 1);
   27.10  by (rtac (minimal_up RS allI) 1);
   27.11  qed "least_up";
   27.12 @@ -46,12 +46,12 @@
   27.13  (* Iup and Ifup are monotone                                               *)
   27.14  (* ------------------------------------------------------------------------ *)
   27.15  
   27.16 -val prems = goalw thy [monofun]  "monofun(Iup)";
   27.17 +Goalw [monofun]  "monofun(Iup)";
   27.18  by (strip_tac 1);
   27.19  by (etac (less_up2c RS iffD2) 1);
   27.20  qed "monofun_Iup";
   27.21  
   27.22 -val prems = goalw thy [monofun]  "monofun(Ifup)";
   27.23 +Goalw [monofun]  "monofun(Ifup)";
   27.24  by (strip_tac 1);
   27.25  by (rtac (less_fun RS iffD2) 1);
   27.26  by (strip_tac 1);
   27.27 @@ -61,7 +61,7 @@
   27.28  by (etac monofun_cfun_fun 1);
   27.29  qed "monofun_Ifup1";
   27.30  
   27.31 -val prems = goalw thy [monofun]  "monofun(Ifup(f))";
   27.32 +Goalw [monofun]  "monofun(Ifup(f))";
   27.33  by (strip_tac 1);
   27.34  by (res_inst_tac [("p","x")] upE 1);
   27.35  by (asm_simp_tac Up0_ss 1);
   27.36 @@ -89,12 +89,10 @@
   27.37  (* ('a)u is a cpo                                                           *)
   27.38  (* ------------------------------------------------------------------------ *)
   27.39  
   27.40 -Goal "[|chain(Y);? i x. Y(i)=Iup(x)|] \
   27.41 +Goal "[|chain(Y);EX i x. Y(i)=Iup(x)|] \
   27.42  \     ==> range(Y) <<| Iup(lub(range(%i.(Ifup (LAM x. x) (Y(i))))))";
   27.43  by (rtac is_lubI 1);
   27.44 -by (rtac conjI 1);
   27.45  by (rtac ub_rangeI 1);
   27.46 -by (rtac allI 1);
   27.47  by (res_inst_tac [("p","Y(i)")] upE 1);
   27.48  by (res_inst_tac [("s","Abs_Up (Inl ())"),("t","Y(i)")] subst 1);
   27.49  by (etac sym 1);
   27.50 @@ -113,7 +111,7 @@
   27.51  by (atac 1);
   27.52  by (rtac less_up2b 1);
   27.53  by (hyp_subst_tac 1);
   27.54 -by (etac (ub_rangeE RS spec) 1);
   27.55 +by (etac ub_rangeD 1);
   27.56  by (res_inst_tac [("t","u")] (up_lemma1 RS subst) 1);
   27.57  by (atac 1);
   27.58  by (rtac (less_up2c RS iffD2) 1);
   27.59 @@ -122,11 +120,9 @@
   27.60  by (etac (monofun_Ifup2 RS ub2ub_monofun) 1);
   27.61  qed "lub_up1a";
   27.62  
   27.63 -Goal "[|chain(Y);!i x. Y(i)~=Iup(x)|] ==> range(Y) <<| Abs_Up (Inl ())";
   27.64 +Goal "[|chain(Y); ALL i x. Y(i)~=Iup(x)|] ==> range(Y) <<| Abs_Up (Inl ())";
   27.65  by (rtac is_lubI 1);
   27.66 -by (rtac conjI 1);
   27.67  by (rtac ub_rangeI 1);
   27.68 -by (rtac allI 1);
   27.69  by (res_inst_tac [("p","Y(i)")] upE 1);
   27.70  by (res_inst_tac [("s","Abs_Up (Inl ())"),("t","Y(i)")] ssubst 1);
   27.71  by (atac 1);
   27.72 @@ -142,7 +138,7 @@
   27.73  
   27.74  bind_thm ("thelub_up1a", lub_up1a RS thelubI);
   27.75  (*
   27.76 -[| chain ?Y1; ? i x. ?Y1 i = Iup x |] ==>
   27.77 +[| chain ?Y1; EX i x. ?Y1 i = Iup x |] ==>
   27.78   lub (range ?Y1) = Iup (lub (range (%i. Iup (LAM x. x) (?Y1 i))))
   27.79  *)
   27.80  
   27.81 @@ -152,7 +148,7 @@
   27.82   lub (range ?Y1) = UU_up
   27.83  *)
   27.84  
   27.85 -Goal "chain(Y::nat=>('a)u) ==> ? x. range(Y) <<|x";
   27.86 +Goal "chain(Y::nat=>('a)u) ==> EX x. range(Y) <<|x";
   27.87  by (rtac disjE 1);
   27.88  by (rtac exI 2);
   27.89  by (etac lub_up1a 2);
    28.1 --- a/src/HOLCF/Up3.ML	Wed Jul 05 14:26:58 2000 +0200
    28.2 +++ b/src/HOLCF/Up3.ML	Wed Jul 05 16:37:52 2000 +0200
    28.3 @@ -132,26 +132,25 @@
    28.4  (* continuous versions of lemmas for ('a)u                                  *)
    28.5  (* ------------------------------------------------------------------------ *)
    28.6  
    28.7 -val prems = goalw thy [up_def] "z = UU | (? x. z = up`x)";
    28.8 +Goalw [up_def] "z = UU | (? x. z = up`x)";
    28.9  by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
   28.10  by (stac inst_up_pcpo 1);
   28.11  by (rtac Exh_Up 1);
   28.12  qed "Exh_Up1";
   28.13  
   28.14 -val prems = goalw thy [up_def] "up`x=up`y ==> x=y";
   28.15 -by (cut_facts_tac prems 1);
   28.16 +Goalw [up_def] "up`x=up`y ==> x=y";
   28.17  by (rtac inject_Iup 1);
   28.18  by (etac box_equals 1);
   28.19  by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
   28.20  by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
   28.21  qed "inject_up";
   28.22  
   28.23 -val prems = goalw thy [up_def] " up`x ~= UU";
   28.24 +Goalw [up_def] " up`x ~= UU";
   28.25  by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
   28.26  by (rtac defined_Iup2 1);
   28.27  qed "defined_up";
   28.28  
   28.29 -val prems = goalw thy [up_def] 
   28.30 +val prems = Goalw [up_def] 
   28.31          "[| p=UU ==> Q; !!x. p=up`x==>Q|] ==>Q";
   28.32  by (rtac upE 1);
   28.33  by (resolve_tac prems 1);
   28.34 @@ -163,7 +162,7 @@
   28.35  val tac = (simp_tac (simpset() addsimps [cont_Iup,cont_Ifup1,
   28.36                  cont_Ifup2,cont2cont_CF1L]) 1);
   28.37  
   28.38 -val prems = goalw thy [up_def,fup_def] "fup`f`UU=UU";
   28.39 +Goalw [up_def,fup_def] "fup`f`UU=UU";
   28.40  by (stac inst_up_pcpo 1);
   28.41  by (stac beta_cfun 1);
   28.42  by tac;
   28.43 @@ -172,7 +171,7 @@
   28.44  by (simp_tac (Up0_ss addsimps [cont_Iup,cont_Ifup1,cont_Ifup2]) 1);
   28.45  qed "fup1";
   28.46  
   28.47 -val prems = goalw thy [up_def,fup_def] "fup`f`(up`x)=f`x";
   28.48 +Goalw [up_def,fup_def] "fup`f`(up`x)=f`x";
   28.49  by (stac beta_cfun 1);
   28.50  by (rtac cont_Iup 1);
   28.51  by (stac beta_cfun 1);
   28.52 @@ -182,21 +181,20 @@
   28.53  by (simp_tac (Up0_ss addsimps [cont_Iup,cont_Ifup1,cont_Ifup2]) 1);
   28.54  qed "fup2";
   28.55  
   28.56 -val prems = goalw thy [up_def,fup_def] "~ up`x << UU";
   28.57 +Goalw [up_def,fup_def] "~ up`x << UU";
   28.58  by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
   28.59  by (rtac less_up3b 1);
   28.60  qed "less_up4b";
   28.61  
   28.62 -val prems = goalw thy [up_def,fup_def]
   28.63 +Goalw [up_def,fup_def]
   28.64           "(up`x << up`y) = (x<<y)";
   28.65  by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
   28.66  by (rtac less_up2c 1);
   28.67  qed "less_up4c";
   28.68  
   28.69 -val prems = goalw thy [up_def,fup_def] 
   28.70 +Goalw [up_def,fup_def] 
   28.71  "[| chain(Y); ? i x. Y(i) = up`x |] ==>\
   28.72  \      lub(range(Y)) = up`(lub(range(%i. fup`(LAM x. x)`(Y i))))";
   28.73 -by (cut_facts_tac prems 1);
   28.74  by (stac beta_cfun 1);
   28.75  by tac;
   28.76  by (stac beta_cfun 1);
   28.77 @@ -216,9 +214,8 @@
   28.78  
   28.79  
   28.80  
   28.81 -val prems = goalw thy [up_def,fup_def] 
   28.82 +Goalw [up_def,fup_def] 
   28.83  "[| chain(Y); ! i x. Y(i) ~= up`x |] ==> lub(range(Y)) = UU";
   28.84 -by (cut_facts_tac prems 1);
   28.85  by (stac inst_up_pcpo 1);
   28.86  by (rtac thelub_up1b 1);
   28.87  by (atac 1);
    29.1 --- a/src/HOLCF/ex/Loop.ML	Wed Jul 05 14:26:58 2000 +0200
    29.2 +++ b/src/HOLCF/ex/Loop.ML	Wed Jul 05 16:37:52 2000 +0200
    29.3 @@ -10,275 +10,179 @@
    29.4  (* access to definitions                                                     *)
    29.5  (* ------------------------------------------------------------------------- *)
    29.6  
    29.7 -val step_def2 = prove_goalw Loop.thy [step_def]
    29.8 -"step`b`g`x = If b`x then g`x else x fi"
    29.9 - (fn prems =>
   29.10 -        [
   29.11 -        (Simp_tac 1)
   29.12 -        ]);
   29.13  
   29.14 -val while_def2 = prove_goalw Loop.thy [while_def]
   29.15 -"while`b`g = fix`(LAM f x. If b`x then f`(g`x) else x fi)"
   29.16 - (fn prems =>
   29.17 -        [
   29.18 -        (Simp_tac 1)
   29.19 -        ]);
   29.20 +Goalw [step_def] "step`b`g`x = If b`x then g`x else x fi";
   29.21 +by (Simp_tac 1);
   29.22 +qed "step_def2";
   29.23 +
   29.24 +Goalw [while_def] "while`b`g = fix`(LAM f x. If b`x then f`(g`x) else x fi)";
   29.25 +by (Simp_tac 1);
   29.26 +qed "while_def2";
   29.27  
   29.28  
   29.29  (* ------------------------------------------------------------------------- *)
   29.30  (* rekursive properties of while                                             *)
   29.31  (* ------------------------------------------------------------------------- *)
   29.32  
   29.33 -val while_unfold = prove_goal Loop.thy 
   29.34 -"while`b`g`x = If b`x then while`b`g`(g`x) else x fi"
   29.35 - (fn prems =>
   29.36 -        [
   29.37 -        (fix_tac5  while_def2 1),
   29.38 -        (Simp_tac 1)
   29.39 -        ]);
   29.40 +Goal "while`b`g`x = If b`x then while`b`g`(g`x) else x fi";
   29.41 +by (fix_tac5  while_def2 1);
   29.42 +by (Simp_tac 1);
   29.43 +qed "while_unfold";
   29.44  
   29.45 -val while_unfold2 = prove_goal Loop.thy 
   29.46 -        "ALL x. while`b`g`x = while`b`g`(iterate k (step`b`g) x)"
   29.47 - (fn prems =>
   29.48 -        [
   29.49 -        (nat_ind_tac "k" 1),
   29.50 -        (simp_tac HOLCF_ss 1),
   29.51 -        (rtac allI 1),
   29.52 -        (rtac trans 1),
   29.53 -        (stac while_unfold 1),
   29.54 -        (rtac refl 2),
   29.55 -        (stac iterate_Suc2 1),
   29.56 -        (rtac trans 1),
   29.57 -        (etac spec 2),
   29.58 -        (stac step_def2 1),
   29.59 -        (res_inst_tac [("p","b`x")] trE 1),
   29.60 -        (asm_simp_tac HOLCF_ss 1),
   29.61 -        (stac while_unfold 1),
   29.62 -        (res_inst_tac [("s","UU"),("t","b`UU")]ssubst 1),
   29.63 -        (etac (flat_codom RS disjE) 1),
   29.64 -        (atac 1),
   29.65 -        (etac spec 1),
   29.66 -        (simp_tac HOLCF_ss 1),
   29.67 -        (asm_simp_tac HOLCF_ss 1),
   29.68 -        (asm_simp_tac HOLCF_ss 1),
   29.69 -        (stac while_unfold 1),
   29.70 -        (asm_simp_tac HOLCF_ss 1)
   29.71 -        ]);
   29.72 +Goal "ALL x. while`b`g`x = while`b`g`(iterate k (step`b`g) x)";
   29.73 +by (nat_ind_tac "k" 1);
   29.74 +by (simp_tac HOLCF_ss 1);
   29.75 +by (rtac allI 1);
   29.76 +by (rtac trans 1);
   29.77 +by (stac while_unfold 1);
   29.78 +by (rtac refl 2);
   29.79 +by (stac iterate_Suc2 1);
   29.80 +by (rtac trans 1);
   29.81 +by (etac spec 2);
   29.82 +by (stac step_def2 1);
   29.83 +by (res_inst_tac [("p","b`x")] trE 1);
   29.84 +by (asm_simp_tac HOLCF_ss 1);
   29.85 +by (stac while_unfold 1);
   29.86 +by (res_inst_tac [("s","UU"),("t","b`UU")]ssubst 1);
   29.87 +by (etac (flat_codom RS disjE) 1);
   29.88 +by (atac 1);
   29.89 +by (etac spec 1);
   29.90 +by (simp_tac HOLCF_ss 1);
   29.91 +by (asm_simp_tac HOLCF_ss 1);
   29.92 +by (asm_simp_tac HOLCF_ss 1);
   29.93 +by (stac while_unfold 1);
   29.94 +by (asm_simp_tac HOLCF_ss 1);
   29.95 +qed "while_unfold2";
   29.96  
   29.97 -val while_unfold3 = prove_goal Loop.thy 
   29.98 -        "while`b`g`x = while`b`g`(step`b`g`x)"
   29.99 - (fn prems =>
  29.100 -        [
  29.101 -        (res_inst_tac [("s",
  29.102 -                "while`b`g`(iterate (Suc 0) (step`b`g) x)")] trans 1),
  29.103 -        (rtac (while_unfold2 RS spec) 1),
  29.104 -        (Simp_tac 1)
  29.105 -        ]);
  29.106 +Goal "while`b`g`x = while`b`g`(step`b`g`x)";
  29.107 +by (res_inst_tac [("s", "while`b`g`(iterate (Suc 0) (step`b`g) x)")] trans 1);
  29.108 +by (rtac (while_unfold2 RS spec) 1);
  29.109 +by (Simp_tac 1);
  29.110 +qed "while_unfold3";
  29.111  
  29.112  
  29.113  (* ------------------------------------------------------------------------- *)
  29.114  (* properties of while and iterations                                        *)
  29.115  (* ------------------------------------------------------------------------- *)
  29.116  
  29.117 -val loop_lemma1 = prove_goal Loop.thy
  29.118 -    "[| EX y. b`y=FF; iterate k (step`b`g) x = UU |] \
  29.119 -\    ==>iterate(Suc k) (step`b`g) x=UU"
  29.120 - (fn prems =>
  29.121 -        [
  29.122 -        (cut_facts_tac prems 1),
  29.123 -        (Simp_tac 1),
  29.124 -        (rtac trans 1),
  29.125 -        (rtac step_def2 1),
  29.126 -        (asm_simp_tac HOLCF_ss 1),
  29.127 -        (etac exE 1),
  29.128 -        (etac (flat_codom RS disjE) 1),
  29.129 -        (asm_simp_tac HOLCF_ss 1),
  29.130 -        (asm_simp_tac HOLCF_ss 1)
  29.131 -        ]);
  29.132 +Goal "[| EX y. b`y=FF; iterate k (step`b`g) x = UU |] \
  29.133 +\    ==>iterate(Suc k) (step`b`g) x=UU";
  29.134 +by (Simp_tac 1);
  29.135 +by (rtac trans 1);
  29.136 +by (rtac step_def2 1);
  29.137 +by (asm_simp_tac HOLCF_ss 1);
  29.138 +by (etac exE 1);
  29.139 +by (etac (flat_codom RS disjE) 1);
  29.140 +by (asm_simp_tac HOLCF_ss 1);
  29.141 +by (asm_simp_tac HOLCF_ss 1);
  29.142 +qed "loop_lemma1";
  29.143 +
  29.144 +Goal "[|EX y. b`y=FF;iterate (Suc k) (step`b`g) x ~=UU |]==>\
  29.145 +\     iterate k (step`b`g) x ~=UU";
  29.146 +
  29.147 +by (blast_tac (claset() addIs [loop_lemma1]) 1);
  29.148 +qed "loop_lemma2";
  29.149  
  29.150 -val loop_lemma2 = prove_goal Loop.thy
  29.151 -"[|EX y. b`y=FF;iterate (Suc k) (step`b`g) x ~=UU |]==>\
  29.152 -\iterate k (step`b`g) x ~=UU"
  29.153 - (fn prems =>
  29.154 -        [
  29.155 -        (cut_facts_tac prems 1),
  29.156 -        (rtac contrapos 1),
  29.157 -        (etac  loop_lemma1 2),
  29.158 -        (atac 1),
  29.159 -        (atac 1)
  29.160 -        ]);
  29.161 +Goal "[| ALL x. INV x & b`x=TT & g`x~=UU --> INV (g`x);\
  29.162 +\        EX y. b`y=FF; INV x |] \
  29.163 +\     ==> iterate k (step`b`g) x ~=UU --> INV (iterate k (step`b`g) x)";
  29.164 +by (nat_ind_tac "k" 1);
  29.165 +by (Asm_simp_tac 1);
  29.166 +by (strip_tac 1);
  29.167 +by (simp_tac (simpset() addsimps [step_def2]) 1);
  29.168 +by (res_inst_tac [("p","b`(iterate k (step`b`g) x)")] trE 1);
  29.169 +by (etac notE 1);
  29.170 +by (asm_simp_tac (HOLCF_ss addsimps [step_def2] ) 1);
  29.171 +by (asm_simp_tac HOLCF_ss 1);
  29.172 +by (rtac mp 1);
  29.173 +by (etac spec 1);
  29.174 +by (asm_simp_tac (HOLCF_ss delsimps [iterate_Suc] addsimps [loop_lemma2] ) 1);
  29.175 +by (res_inst_tac [("s","iterate (Suc k) (step`b`g) x"),
  29.176 +                  ("t","g`(iterate k (step`b`g) x)")] ssubst 1);
  29.177 +by (atac 2);
  29.178 +by (asm_simp_tac (HOLCF_ss addsimps [step_def2] ) 1);
  29.179 +by (asm_simp_tac (HOLCF_ss delsimps [iterate_Suc] addsimps [loop_lemma2] ) 1);
  29.180 +qed_spec_mp "loop_lemma3";
  29.181  
  29.182 -val loop_lemma3 = prove_goal Loop.thy
  29.183 -"[| ALL x. INV x & b`x=TT & g`x~=UU --> INV (g`x);\
  29.184 -\   EX y. b`y=FF; INV x |] \
  29.185 -\==> iterate k (step`b`g) x ~=UU --> INV (iterate k (step`b`g) x)"
  29.186 - (fn prems =>
  29.187 -        [
  29.188 -        (cut_facts_tac prems 1),
  29.189 -        (nat_ind_tac "k" 1),
  29.190 -        (Asm_simp_tac 1),
  29.191 -        (strip_tac 1),
  29.192 -        (simp_tac (simpset() addsimps [step_def2]) 1),
  29.193 -        (res_inst_tac [("p","b`(iterate k (step`b`g) x)")] trE 1),
  29.194 -        (etac notE 1),
  29.195 -        (asm_simp_tac (HOLCF_ss addsimps [step_def2] ) 1),
  29.196 -        (asm_simp_tac HOLCF_ss 1),
  29.197 -        (rtac mp 1),
  29.198 -        (etac spec 1),
  29.199 -        (asm_simp_tac (HOLCF_ss delsimps [iterate_Suc]
  29.200 -                                addsimps [loop_lemma2] ) 1),
  29.201 -        (res_inst_tac [("s","iterate (Suc k) (step`b`g) x"),
  29.202 -                ("t","g`(iterate k (step`b`g) x)")] ssubst 1),
  29.203 -        (atac 2),
  29.204 -        (asm_simp_tac (HOLCF_ss addsimps [step_def2] ) 1),
  29.205 -        (asm_simp_tac (HOLCF_ss delsimps [iterate_Suc]
  29.206 -                                addsimps [loop_lemma2] ) 1)
  29.207 -        ]);
  29.208 +Goal "ALL x. b`(iterate k (step`b`g) x)=FF --> while`b`g`x= iterate k (step`b`g) x";
  29.209 +by (nat_ind_tac "k" 1);
  29.210 +by (Simp_tac 1);
  29.211 +by (strip_tac 1);
  29.212 +by (stac while_unfold 1);
  29.213 +by (asm_simp_tac HOLCF_ss 1);
  29.214 +by (rtac allI 1);
  29.215 +by (stac iterate_Suc2 1);
  29.216 +by (strip_tac 1);
  29.217 +by (rtac trans 1);
  29.218 +by (rtac while_unfold3 1);
  29.219 +by (Asm_simp_tac 1);
  29.220 +qed_spec_mp "loop_lemma4";
  29.221 +
  29.222 +Goal "ALL k. b`(iterate k (step`b`g) x) ~= FF ==>\
  29.223 +\ ALL m. while`b`g`(iterate m (step`b`g) x)=UU";
  29.224 +by (stac while_def2 1);
  29.225 +by (rtac fix_ind 1);
  29.226 +by (rtac (allI RS adm_all) 1);
  29.227 +by (rtac adm_eq 1);
  29.228 +by (cont_tacR 1);
  29.229 +by (Simp_tac  1);
  29.230 +by (rtac allI 1);
  29.231 +by (Simp_tac  1);
  29.232 +by (res_inst_tac [("p","b`(iterate m (step`b`g) x)")] trE 1);
  29.233 +by (Asm_simp_tac 1);
  29.234 +by (Asm_simp_tac 1);
  29.235 +by (res_inst_tac [("s","xa`(iterate (Suc m) (step`b`g) x)")] trans 1);
  29.236 +by (etac spec 2);
  29.237 +by (rtac cfun_arg_cong 1);
  29.238 +by (rtac trans 1);
  29.239 +by (rtac (iterate_Suc RS sym) 2);
  29.240 +by (asm_simp_tac (HOLCF_ss addsimps [step_def2]) 1);
  29.241 +by (Blast_tac 1);
  29.242 +qed_spec_mp "loop_lemma5";
  29.243  
  29.244  
  29.245 -val loop_lemma4 = prove_goal Loop.thy
  29.246 -"ALL x. b`(iterate k (step`b`g) x)=FF --> while`b`g`x= iterate k (step`b`g) x"
  29.247 - (fn prems =>
  29.248 -        [
  29.249 -        (nat_ind_tac "k" 1),
  29.250 -        (Simp_tac 1),
  29.251 -        (strip_tac 1),
  29.252 -        (stac while_unfold 1),
  29.253 -        (asm_simp_tac HOLCF_ss 1),
  29.254 -        (rtac allI 1),
  29.255 -        (stac iterate_Suc2 1),
  29.256 -        (strip_tac 1),
  29.257 -        (rtac trans 1),
  29.258 -        (rtac while_unfold3 1),
  29.259 -        (asm_simp_tac HOLCF_ss 1)
  29.260 -        ]);
  29.261 +Goal "ALL k. b`(iterate k (step`b`g) x) ~= FF ==> while`b`g`x=UU";
  29.262 +by (res_inst_tac [("t","x")] (iterate_0 RS subst) 1);
  29.263 +by (etac (loop_lemma5) 1);
  29.264 +qed "loop_lemma6";
  29.265  
  29.266 -val loop_lemma5 = prove_goal Loop.thy
  29.267 -"ALL k. b`(iterate k (step`b`g) x) ~= FF ==>\
  29.268 -\ ALL m. while`b`g`(iterate m (step`b`g) x)=UU"
  29.269 - (fn prems =>
  29.270 -        [
  29.271 -        (cut_facts_tac prems 1),
  29.272 -        (stac while_def2 1),
  29.273 -        (rtac fix_ind 1),
  29.274 -        (rtac (allI RS adm_all) 1),
  29.275 -        (rtac adm_eq 1),
  29.276 -        (cont_tacR 1),
  29.277 -        (Simp_tac  1),
  29.278 -        (rtac allI 1),
  29.279 -        (Simp_tac  1),
  29.280 -        (res_inst_tac [("p","b`(iterate m (step`b`g) x)")] trE 1),
  29.281 -        (asm_simp_tac HOLCF_ss 1),
  29.282 -        (asm_simp_tac HOLCF_ss 1),
  29.283 -        (res_inst_tac [("s","xa`(iterate (Suc m) (step`b`g) x)")] trans 1),
  29.284 -        (etac spec 2),
  29.285 -        (rtac cfun_arg_cong 1),
  29.286 -        (rtac trans 1),
  29.287 -        (rtac (iterate_Suc RS sym) 2),
  29.288 -        (asm_simp_tac (HOLCF_ss addsimps [step_def2]) 1),
  29.289 -        (dtac spec 1),
  29.290 -        (contr_tac 1)
  29.291 -        ]);
  29.292 -
  29.293 -
  29.294 -val loop_lemma6 = prove_goal Loop.thy
  29.295 -"ALL k. b`(iterate k (step`b`g) x) ~= FF ==> while`b`g`x=UU"
  29.296 - (fn prems =>
  29.297 -        [
  29.298 -        (res_inst_tac [("t","x")] (iterate_0 RS subst) 1),
  29.299 -        (rtac (loop_lemma5 RS spec) 1),
  29.300 -        (resolve_tac prems 1)
  29.301 -        ]);
  29.302 -
  29.303 -val loop_lemma7 = prove_goal Loop.thy
  29.304 -"while`b`g`x ~= UU ==> EX k. b`(iterate k (step`b`g) x) = FF"
  29.305 - (fn prems =>
  29.306 -        [
  29.307 -        (cut_facts_tac prems 1),
  29.308 -        (etac swap 1),
  29.309 -        (rtac loop_lemma6 1),
  29.310 -        (fast_tac HOL_cs 1)
  29.311 -        ]);
  29.312 -
  29.313 -val loop_lemma8 = prove_goal Loop.thy
  29.314 -"while`b`g`x ~= UU ==> EX y. b`y=FF"
  29.315 - (fn prems =>
  29.316 -        [
  29.317 -        (cut_facts_tac prems 1),
  29.318 -        (dtac loop_lemma7 1),
  29.319 -        (fast_tac HOL_cs 1)
  29.320 -        ]);
  29.321 +Goal "while`b`g`x ~= UU ==> EX k. b`(iterate k (step`b`g) x) = FF";
  29.322 +by (blast_tac (claset() addIs [loop_lemma6]) 1);
  29.323 +qed "loop_lemma7";
  29.324  
  29.325  
  29.326  (* ------------------------------------------------------------------------- *)
  29.327  (* an invariant rule for loops                                               *)
  29.328  (* ------------------------------------------------------------------------- *)
  29.329  
  29.330 -val loop_inv2 = prove_goal Loop.thy
  29.331 +Goal
  29.332  "[| (ALL y. INV y & b`y=TT & g`y ~= UU --> INV (g`y));\
  29.333  \   (ALL y. INV y & b`y=FF --> Q y);\
  29.334 -\   INV x; while`b`g`x~=UU |] ==> Q (while`b`g`x)"
  29.335 - (fn prems =>
  29.336 -        [
  29.337 -        (res_inst_tac [("P","%k. b`(iterate k (step`b`g) x)=FF")] exE 1),
  29.338 -        (rtac loop_lemma7 1),
  29.339 -        (resolve_tac prems 1),
  29.340 -        (stac (loop_lemma4 RS spec RS mp) 1),
  29.341 -        (atac 1),
  29.342 -        (rtac (nth_elem (1,prems) RS spec RS mp) 1),
  29.343 -        (rtac conjI 1),
  29.344 -        (atac 2),
  29.345 -        (rtac (loop_lemma3 RS mp) 1),
  29.346 -        (resolve_tac prems 1),
  29.347 -        (rtac loop_lemma8 1),
  29.348 -        (resolve_tac prems 1),
  29.349 -        (resolve_tac prems 1),
  29.350 -        (rtac notI2 1),
  29.351 -        (resolve_tac prems 1),
  29.352 -        (etac box_equals 1),
  29.353 -        (rtac (loop_lemma4 RS spec RS mp RS sym) 1),
  29.354 -        (atac 1),
  29.355 -        (rtac refl 1)
  29.356 -        ]);
  29.357 +\   INV x; while`b`g`x~=UU |] ==> Q (while`b`g`x)";
  29.358 +by (res_inst_tac [("P","%k. b`(iterate k (step`b`g) x)=FF")] exE 1);
  29.359 +by (etac loop_lemma7 1);
  29.360 +by (stac (loop_lemma4) 1);
  29.361 +by (atac 1);
  29.362 +by (dtac spec 1 THEN etac mp 1);
  29.363 +by (rtac conjI 1);
  29.364 +by (atac 2);
  29.365 +by (rtac (loop_lemma3) 1);
  29.366 +by (assume_tac 1);
  29.367 +by (blast_tac (claset() addIs [loop_lemma6]) 1);
  29.368 +by (assume_tac 1);
  29.369 +by (rotate_tac ~1 1);
  29.370 +by (asm_full_simp_tac (simpset() addsimps [loop_lemma4]) 1);
  29.371 +qed "loop_inv2";
  29.372  
  29.373 -val loop_inv3 = prove_goal Loop.thy
  29.374 -"[| !!y.[| INV y; b`y=TT; g`y~=UU|] ==> INV (g`y);\
  29.375 -\   !!y.[| INV y; b`y=FF|]==> Q y;\
  29.376 -\   INV x; while`b`g`x~=UU |] ==> Q (while`b`g`x)"
  29.377 - (fn prems =>
  29.378 -        [
  29.379 -        (rtac loop_inv2 1),
  29.380 -        (rtac allI 1),
  29.381 -        (rtac impI 1),
  29.382 -        (resolve_tac prems 1),
  29.383 -        (fast_tac HOL_cs 1),
  29.384 -        (fast_tac HOL_cs 1),
  29.385 -        (fast_tac HOL_cs 1),
  29.386 -        (rtac allI 1),
  29.387 -        (rtac impI 1),
  29.388 -        (resolve_tac prems 1),
  29.389 -        (fast_tac HOL_cs 1),
  29.390 -        (fast_tac HOL_cs 1),
  29.391 -        (resolve_tac prems 1),
  29.392 -        (resolve_tac prems 1)
  29.393 -        ]);
  29.394 -
  29.395 -val loop_inv = prove_goal Loop.thy
  29.396 -"[| P(x);\
  29.397 +val [premP,premI,premTT,premFF,premW] = Goal
  29.398 +"[| P(x); \
  29.399  \   !!y. P y ==> INV y;\
  29.400 -\   !!y.[| INV y; b`y=TT; g`y~=UU|] ==> INV (g`y);\
  29.401 -\   !!y.[| INV y; b`y=FF|]==> Q y;\
  29.402 -\   while`b`g`x ~= UU |] ==> Q (while`b`g`x)"
  29.403 - (fn prems =>
  29.404 -        [
  29.405 -        (rtac loop_inv3 1),
  29.406 -        (eresolve_tac prems 1),
  29.407 -        (atac 1),
  29.408 -        (atac 1),
  29.409 -        (resolve_tac prems 1),
  29.410 -        (atac 1),
  29.411 -        (atac 1),
  29.412 -        (resolve_tac prems 1),
  29.413 -        (resolve_tac prems 1),
  29.414 -        (resolve_tac prems 1)
  29.415 -        ]);
  29.416 +\   !!y. [| INV y; b`y=TT; g`y~=UU|] ==> INV (g`y);\
  29.417 +\   !!y. [| INV y; b`y=FF|] ==> Q y;\
  29.418 +\   while`b`g`x ~= UU |] ==> Q (while`b`g`x)";
  29.419 +by (rtac loop_inv2 1);
  29.420 +by (rtac (premP RS premI) 3);
  29.421 +by (rtac premW 3);
  29.422 +by (blast_tac (claset() addIs [premTT]) 1);
  29.423 +by (blast_tac (claset() addIs [premFF]) 1);
  29.424 +qed "loop_inv";
    30.1 --- a/src/HOLCF/ex/Stream.ML	Wed Jul 05 14:26:58 2000 +0200
    30.2 +++ b/src/HOLCF/ex/Stream.ML	Wed Jul 05 16:37:52 2000 +0200
    30.3 @@ -12,65 +12,60 @@
    30.4  
    30.5  val [stream_con_rew1,stream_con_rew2] = stream.con_rews;
    30.6  
    30.7 +Addsimps stream.take_rews;
    30.8 +Addsimps stream.when_rews;
    30.9 +Addsimps stream.sel_rews;
   30.10 +
   30.11  (* ----------------------------------------------------------------------- *)
   30.12  (* theorems about scons                                                    *)
   30.13  (* ----------------------------------------------------------------------- *)
   30.14  
   30.15  section "scons";
   30.16  
   30.17 -qed_goal "scons_eq_UU" thy "a && s = UU = (a = UU)" (fn _ => [
   30.18 -	safe_tac HOL_cs,
   30.19 -	etac contrapos2 1,
   30.20 -	safe_tac (HOL_cs addSIs stream.con_rews)]);
   30.21 +Goal "a && s = UU = (a = UU)";
   30.22 +by Safe_tac;
   30.23 +by (etac contrapos2 1);
   30.24 +by (safe_tac (claset() addSIs stream.con_rews));
   30.25 +qed "scons_eq_UU";
   30.26  
   30.27 -qed_goal "scons_not_empty" thy "[| a && x = UU; a ~= UU |] ==> R" 
   30.28 - (fn prems => [
   30.29 -	cut_facts_tac prems 1,
   30.30 -	dresolve_tac [stream_con_rew2] 1,
   30.31 -	contr_tac 1]);
   30.32 +Goal "[| a && x = UU; a ~= UU |] ==> R";
   30.33 +by (dresolve_tac [stream_con_rew2] 1);
   30.34 +by (contr_tac 1);
   30.35 +qed "scons_not_empty";
   30.36  
   30.37 -qed_goal "stream_exhaust_eq" thy "x ~= UU = (? a y. a ~= UU &  x = a && y)" 
   30.38 - (fn _ =>[
   30.39 -	cut_facts_tac [stream.exhaust] 1,
   30.40 -	safe_tac HOL_cs,
   30.41 -	   contr_tac 1,
   30.42 -	  fast_tac (HOL_cs addDs [stream_con_rew2]) 1,
   30.43 -	 fast_tac HOL_cs 1,
   30.44 -	fast_tac (HOL_cs addDs [stream_con_rew2]) 1]);
   30.45 +Goal "x ~= UU = (EX a y. a ~= UU &  x = a && y)";
   30.46 +by (cut_facts_tac [stream.exhaust] 1);
   30.47 +by (best_tac (claset() addDs [stream_con_rew2]) 1);
   30.48 +qed "stream_exhaust_eq";
   30.49  
   30.50 -qed_goal "stream_prefix" thy 
   30.51 -"[| a && s << t; a ~= UU  |] ==> ? b tt. t = b && tt &  b ~= UU &  s << tt" 
   30.52 - (fn prems => [
   30.53 -	cut_facts_tac prems 1,
   30.54 -	stream_case_tac "t" 1,
   30.55 -	 fast_tac (HOL_cs addDs [eq_UU_iff RS iffD2, stream_con_rew2]) 1,
   30.56 -	fast_tac (HOL_cs addDs stream.inverts) 1]);
   30.57 +Goal 
   30.58 +"[| a && s << t; a ~= UU  |] ==> EX b tt. t = b && tt &  b ~= UU &  s << tt";
   30.59 +by (stream_case_tac "t" 1);
   30.60 +by (fast_tac (claset() addDs [eq_UU_iff RS iffD2, stream_con_rew2]) 1);
   30.61 +by (fast_tac (claset() addDs stream.inverts) 1);
   30.62 +qed "stream_prefix";
   30.63  
   30.64 -qed_goal "stream_flat_prefix" thy 
   30.65 -"[| x && xs << y && ys; (x::'a::flat) ~= UU|] ==> x = y & xs << ys"
   30.66 -(fn prems=>[
   30.67 -	cut_facts_tac prems 1,
   30.68 -	(cut_facts_tac [read_instantiate[("x1","x::'a::flat"),
   30.69 -					 ("x","y::'a::flat")]
   30.70 -			(ax_flat RS spec RS spec)] 1),
   30.71 -	(forward_tac stream.inverts 1),
   30.72 -	(safe_tac HOL_cs),
   30.73 -	(dtac (hd stream.con_rews RS subst) 1),
   30.74 -	(fast_tac (HOL_cs addDs [eq_UU_iff RS iffD2, stream_con_rew2]) 1)]);
   30.75 +Goal "[| x && xs << y && ys; (x::'a::flat) ~= UU|] ==> x = y & xs << ys";
   30.76 +by (cut_inst_tac [("x1","x::'a::flat"), ("x","y::'a::flat")] 
   30.77 +                 (ax_flat RS spec RS spec) 1);
   30.78 +by (forward_tac stream.inverts 1);
   30.79 +by Safe_tac;
   30.80 +by (dtac (hd stream.con_rews RS subst) 1);
   30.81 +by (fast_tac (claset() addDs [eq_UU_iff RS iffD2, stream_con_rew2]) 1);
   30.82 +qed "stream_flat_prefix";
   30.83  
   30.84 -qed_goal "stream_prefix'" thy "b ~= UU ==> x << b && z = \
   30.85 -\(x = UU |  (? a y. x = a && y &  a ~= UU &  a << b &  y << z))" (fn prems => [
   30.86 -	cut_facts_tac prems 1,
   30.87 -	safe_tac HOL_cs,
   30.88 -	  stream_case_tac "x" 1,
   30.89 -	   safe_tac (HOL_cs addSDs stream.inverts 
   30.90 -			    addSIs [minimal, monofun_cfun, monofun_cfun_arg]),
   30.91 -	fast_tac HOL_cs 1]);
   30.92 +Goal "b ~= UU ==> x << b && z = \
   30.93 +\           (x = UU |  (EX a y. x = a && y &  a ~= UU &  a << b &  y << z))";
   30.94 +by Safe_tac;
   30.95 +by (stream_case_tac "x" 1);
   30.96 +by (safe_tac (claset() addSDs stream.inverts 
   30.97 +                addSIs [minimal, monofun_cfun, monofun_cfun_arg]));
   30.98 +by (Fast_tac 1);
   30.99 +qed "stream_prefix'";
  30.100  
  30.101 -qed_goal "stream_inject_eq" thy
  30.102 - "[| a ~= UU; b ~= UU |] ==> (a && s = b && t) = (a = b &  s = t)" (fn prems => [
  30.103 -	cut_facts_tac prems 1,
  30.104 -	safe_tac (HOL_cs addSEs stream.injects)]);	
  30.105 +Goal "[| a ~= UU; b ~= UU |] ==> (a && s = b && t) = (a = b &  s = t)";
  30.106 +by (best_tac (claset() addSEs stream.injects) 1);
  30.107 +qed "stream_inject_eq";	
  30.108  
  30.109  
  30.110  (* ----------------------------------------------------------------------- *)
  30.111 @@ -79,10 +74,10 @@
  30.112  
  30.113  section "stream_when";
  30.114  
  30.115 -qed_goal "stream_when_strictf" thy "stream_when`UU`s=UU" (fn _ => [
  30.116 -	stream_case_tac "s" 1,
  30.117 -	ALLGOALS(asm_simp_tac (HOL_ss addsimps strict_Rep_CFun1::stream.when_rews))
  30.118 -	]);
  30.119 +Goal "stream_when`UU`s=UU";
  30.120 +by (stream_case_tac "s" 1);
  30.121 +by (ALLGOALS(asm_simp_tac (simpset() addsimps [strict_Rep_CFun1])));
  30.122 +qed "stream_when_strictf";
  30.123  	
  30.124  
  30.125  (* ----------------------------------------------------------------------- *)
  30.126 @@ -92,39 +87,38 @@
  30.127  section "ft & rt";
  30.128  
  30.129  (*
  30.130 -qed_goal "stream_ft_lemma1" thy "ft`s=UU --> s=UU" (fn prems => [
  30.131 -	stream_case_tac "s" 1,
  30.132 -	REPEAT (asm_simp_tac (HOLCF_ss addsimps stream.rews) 1)]);
  30.133 +Goal "ft`s=UU --> s=UU";
  30.134 +by (stream_case_tac "s" 1);
  30.135 +by (REPEAT (asm_simp_tac (simpset() addsimps stream.rews) 1));
  30.136 +qed "stream_ft_lemma1";
  30.137  *)
  30.138  
  30.139 -qed_goal "ft_defin" thy "s~=UU ==> ft`s~=UU" (fn prems => [
  30.140 -	cut_facts_tac prems 1,
  30.141 -	stream_case_tac "s" 1,
  30.142 -	fast_tac HOL_cs 1,
  30.143 -	asm_simp_tac (HOLCF_ss addsimps stream.rews) 1]);
  30.144 +Goal "s~=UU ==> ft`s~=UU";
  30.145 +by (stream_case_tac "s" 1);
  30.146 +by (Blast_tac 1);
  30.147 +by (asm_simp_tac (simpset() addsimps stream.rews) 1);
  30.148 +qed "ft_defin";
  30.149  
  30.150 -qed_goal "rt_strict_rev" thy "rt`s~=UU ==> s~=UU" (fn prems => [
  30.151 -	cut_facts_tac prems 1,
  30.152 -	etac contrapos 1,
  30.153 -	asm_simp_tac (HOLCF_ss addsimps stream.sel_rews) 1]);
  30.154 +Goal "rt`s~=UU ==> s~=UU";
  30.155 +by Auto_tac;
  30.156 +qed "rt_strict_rev";
  30.157  
  30.158 -qed_goal "surjectiv_scons" thy "(ft`s)&&(rt`s)=s"
  30.159 - (fn prems =>
  30.160 -	[
  30.161 -	stream_case_tac "s" 1,
  30.162 -	REPEAT (asm_simp_tac (HOLCF_ss addsimps stream.rews) 1)
  30.163 -	]);
  30.164 +Goal "(ft`s)&&(rt`s)=s";
  30.165 +by (stream_case_tac "s" 1);
  30.166 +by (ALLGOALS (asm_simp_tac (simpset() addsimps stream.rews)));
  30.167 +qed "surjectiv_scons";
  30.168  
  30.169 -qed_goal_spec_mp "monofun_rt_mult" thy 
  30.170 -"!x s. x << s --> iterate i rt x << iterate i rt s" (fn _ => [
  30.171 -	nat_ind_tac "i" 1,
  30.172 -	simp_tac (HOLCF_ss addsimps stream.take_rews) 1,
  30.173 -	strip_tac 1,
  30.174 -	stream_case_tac "x" 1,
  30.175 -	rtac (minimal RS (monofun_iterate2 RS monofunE RS spec RS spec RS mp))1,
  30.176 -	dtac stream_prefix 1,
  30.177 -	 safe_tac HOL_cs,
  30.178 -	asm_simp_tac (HOL_ss addsimps iterate_Suc2::stream.rews) 1]);
  30.179 +Goal "ALL x s. x << s --> iterate i rt x << iterate i rt s";
  30.180 +by (induct_tac "i" 1);
  30.181 +by (Simp_tac 1);
  30.182 +by (strip_tac 1);
  30.183 +by (stream_case_tac "x" 1);
  30.184 +by (rtac (minimal RS (monofun_iterate2 RS monofunE RS spec RS spec RS mp))1);
  30.185 +by (dtac stream_prefix 1);
  30.186 +by Safe_tac;
  30.187 +by (asm_simp_tac (HOL_ss addsimps iterate_Suc2::stream.rews) 1);
  30.188 +qed_spec_mp "monofun_rt_mult";
  30.189 +
  30.190  			
  30.191  
  30.192  (* ----------------------------------------------------------------------- *)
  30.193 @@ -133,88 +127,84 @@
  30.194  
  30.195  section "stream_take";
  30.196  
  30.197 -qed_goal "stream_reach2" thy  "(LUB i. stream_take i`s) = s"
  30.198 - (fn prems =>
  30.199 -	[
  30.200 -	(res_inst_tac [("t","s")] (stream.reach RS subst) 1),
  30.201 -	(stac fix_def2 1),
  30.202 -	(rewrite_goals_tac [stream.take_def]),
  30.203 -	(stac contlub_cfun_fun 1),
  30.204 -	(rtac chain_iterate 1),
  30.205 -	(rtac refl 1)
  30.206 -	]);
  30.207 +Goal  "(LUB i. stream_take i`s) = s";
  30.208 +by (subgoal_tac "(LUB i. stream_take i`s) = fix`stream_copy`s" 1);
  30.209 +by (simp_tac (simpset() addsimps [fix_def2, stream.take_def,
  30.210 +                                  contlub_cfun_fun, chain_iterate]) 2);
  30.211 +by (asm_full_simp_tac (simpset() addsimps [stream.reach]) 1);
  30.212 +qed "stream_reach2";
  30.213  
  30.214 -qed_goal "chain_stream_take" thy "chain (%i. stream_take i`s)" (fn _ => [
  30.215 -	rtac chainI 1,
  30.216 -	subgoal_tac "!i s. stream_take i`s << stream_take (Suc i)`s" 1,
  30.217 -	fast_tac HOL_cs 1,
  30.218 -	rtac allI 1,
  30.219 -	nat_ind_tac "i" 1,
  30.220 -	 simp_tac (HOLCF_ss addsimps stream.take_rews) 1,
  30.221 -	rtac allI 1,
  30.222 -	stream_case_tac "s" 1,
  30.223 -	 simp_tac (HOLCF_ss addsimps stream.take_rews) 1,
  30.224 -	asm_simp_tac (HOLCF_ss addsimps monofun_cfun_arg::stream.take_rews) 1]);
  30.225 +Goal "chain (%i. stream_take i`s)";
  30.226 +by (rtac chainI 1);
  30.227 +by (subgoal_tac "ALL i s. stream_take i`s << stream_take (Suc i)`s" 1);
  30.228 +by (Fast_tac 1);
  30.229 +by (rtac allI 1);
  30.230 +by (induct_tac "ia" 1);
  30.231 +by (Simp_tac 1);
  30.232 +by (rtac allI 1);
  30.233 +by (stream_case_tac "s" 1);
  30.234 +by (Simp_tac 1);
  30.235 +by (asm_simp_tac (simpset() addsimps [monofun_cfun_arg]) 1);
  30.236 +qed "chain_stream_take";
  30.237  
  30.238 -qed_goalw "stream_take_more" thy [stream.take_def] 
  30.239 -	"stream_take n`x = x ==> stream_take (Suc n)`x = x" (fn prems => [
  30.240 -		cut_facts_tac prems 1,
  30.241 -		rtac antisym_less 1,
  30.242 -		rtac (stream.reach RS subst) 1, (* 1*back(); *)
  30.243 -		rtac monofun_cfun_fun 1,
  30.244 -		stac fix_def2 1,
  30.245 -		rtac is_ub_thelub 1,
  30.246 -		rtac chain_iterate 1,
  30.247 -		etac subst 1, (* 2*back(); *)
  30.248 -		rtac monofun_cfun_fun 1,
  30.249 -		rtac (rewrite_rule [chain] chain_iterate RS spec) 1]);
  30.250 +
  30.251 +Goalw [stream.take_def]
  30.252 +	"stream_take n`x = x ==> stream_take (Suc n)`x = x";
  30.253 +by (rtac antisym_less 1);
  30.254 +by (subgoal_tac "iterate (Suc n) stream_copy UU`x << fix`stream_copy`x" 1);
  30.255 +by (asm_full_simp_tac (simpset() addsimps [stream.reach]) 1);
  30.256 +by (rtac monofun_cfun_fun 1);
  30.257 +by (stac fix_def2 1);
  30.258 +by (rtac is_ub_thelub 1);
  30.259 +by (rtac chain_iterate 1);
  30.260 +by (etac subst 1 THEN rtac monofun_cfun_fun 1);
  30.261 +by (rtac (rewrite_rule [chain] chain_iterate RS spec) 1);
  30.262 +qed "stream_take_more";
  30.263  
  30.264  (*
  30.265 -val stream_take_lemma2 = prove_goal thy 
  30.266 - "! s2. stream_take n`s2 = s2 --> stream_take (Suc n)`s2=s2" (fn prems => [
  30.267 -	(nat_ind_tac "n" 1),
  30.268 -	(simp_tac (simpset() addsimps stream_rews) 1),
  30.269 -	(strip_tac 1),
  30.270 -	(hyp_subst_tac  1),
  30.271 -	(simp_tac (simpset() addsimps stream_rews) 1),
  30.272 -	(rtac allI 1),
  30.273 -	(res_inst_tac [("s","s2")] streamE 1),
  30.274 -	(asm_simp_tac (simpset() addsimps stream_rews) 1),
  30.275 -	(asm_simp_tac (simpset() addsimps stream_rews) 1),
  30.276 -	(strip_tac 1 ),
  30.277 -	(subgoal_tac "stream_take n1`xs = xs" 1),
  30.278 -	(rtac ((hd stream_inject) RS conjunct2) 2),
  30.279 -	(atac 4),
  30.280 -	(atac 2),
  30.281 -	(atac 2),
  30.282 -	(rtac cfun_arg_cong 1),
  30.283 -	(fast_tac HOL_cs 1)
  30.284 -	]);
  30.285 +Goal 
  30.286 + "ALL  s2. stream_take n`s2 = s2 --> stream_take (Suc n)`s2=s2";
  30.287 +by (induct_tac "n" 1);
  30.288 +by (simp_tac (simpset() addsimps stream_rews) 1);
  30.289 +by (strip_tac 1);
  30.290 +by (hyp_subst_tac  1);
  30.291 +by (simp_tac (simpset() addsimps stream_rews) 1);
  30.292 +by (rtac allI 1);
  30.293 +by (res_inst_tac [("s","s2")] streamE 1);
  30.294 +by (asm_simp_tac (simpset() addsimps stream_rews) 1);
  30.295 +by (asm_simp_tac (simpset() addsimps stream_rews) 1);
  30.296 +by (strip_tac 1 );
  30.297 +by (subgoal_tac "stream_take n1`xs = xs" 1);
  30.298 +by (rtac ((hd stream_inject) RS conjunct2) 2);
  30.299 +by (atac 4);
  30.300 +by (atac 2);
  30.301 +by (atac 2);
  30.302 +by (rtac cfun_arg_cong 1);
  30.303 +by (Blast_tac 1);
  30.304 +qed "stream_take_lemma2";
  30.305  *)
  30.306  
  30.307 -val stream_take_lemma3 = prove_goal thy 
  30.308 - "!x xs. x~=UU --> stream_take n`(x && xs) = x && xs --> stream_take n`xs=xs"
  30.309 - (fn prems => [
  30.310 -	(nat_ind_tac "n" 1),
  30.311 -	(asm_simp_tac (HOL_ss addsimps stream.take_rews) 1),
  30.312 -	(strip_tac 1),
  30.313 -	(res_inst_tac [("P","x && xs=UU")] notE 1),
  30.314 -	(eresolve_tac stream.con_rews 1),
  30.315 -	(etac sym 1),
  30.316 -	(strip_tac 1),
  30.317 -	(rtac stream_take_more 1),
  30.318 -	(res_inst_tac [("a1","x")] ((hd stream.injects) RS conjunct2) 1),
  30.319 -	(etac (hd(tl(tl(stream.take_rews))) RS subst) 1),
  30.320 -	(atac 1),
  30.321 -	(atac 1)]) RS spec RS spec RS mp RS mp;
  30.322 +Goal 
  30.323 + "ALL x xs. x~=UU --> stream_take n`(x && xs) = x && xs --> stream_take n`xs=xs";
  30.324 +by (induct_tac "n" 1);
  30.325 +by (Asm_simp_tac 1);
  30.326 +by (strip_tac 1);
  30.327 +by (res_inst_tac [("P","x && xs=UU")] notE 1);
  30.328 +by (eresolve_tac stream.con_rews 1);
  30.329 +by (etac sym 1);
  30.330 +by (strip_tac 1);
  30.331 +by (rtac stream_take_more 1);
  30.332 +by (res_inst_tac [("a1","x")] ((hd stream.injects) RS conjunct2) 1);
  30.333 +by (assume_tac 3);
  30.334 +by (etac (hd(tl(tl(stream.take_rews))) RS subst) 1);
  30.335 +by (atac 1);
  30.336 +qed_spec_mp "stream_take_lemma3";
  30.337  
  30.338 -val stream_take_lemma4 = prove_goal thy 
  30.339 - "!x xs. stream_take n`xs=xs --> stream_take (Suc n)`(x && xs) = x && xs"
  30.340 - (fn _ => [
  30.341 -	(nat_ind_tac "n" 1),
  30.342 -	(simp_tac (HOL_ss addsimps stream.take_rews) 1),
  30.343 -	(simp_tac (HOL_ss addsimps stream.take_rews) 1)
  30.344 -	]) RS spec RS spec RS mp;
  30.345 +Goal 
  30.346 + "ALL x xs. stream_take n`xs=xs --> stream_take (Suc n)`(x && xs) = x && xs";
  30.347 +by (induct_tac "n" 1);
  30.348 +by Auto_tac;  
  30.349 +qed_spec_mp "stream_take_lemma4";
  30.350  
  30.351  
  30.352  (* ------------------------------------------------------------------------- *)
  30.353 @@ -223,50 +213,58 @@
  30.354  
  30.355  section "induction";
  30.356  
  30.357 -qed_goalw "stream_finite_ind" thy [stream.finite_def] 
  30.358 - "[| stream_finite x; P UU; !!a s. [| a ~= UU; P s |] ==> P (a && s) |] ==> P x" 
  30.359 - (fn prems => [
  30.360 -	(cut_facts_tac prems 1),
  30.361 -	(etac exE 1),
  30.362 -	(etac subst 1),
  30.363 -	(rtac stream.finite_ind 1),
  30.364 -	(atac 1),
  30.365 -	(eresolve_tac prems 1),
  30.366 -	(atac 1)]);
  30.367  
  30.368 -qed_goal "stream_finite_ind2" thy
  30.369 +val prems = Goalw [stream.finite_def]
  30.370 + "[| stream_finite x;  \
  30.371 +\    P UU; \
  30.372 +\    !!a s. [| a ~= UU; P s |] \
  30.373 +\ ==> P (a && s) |] ==> P x";
  30.374 +by (cut_facts_tac prems 1);
  30.375 +by (etac exE 1);
  30.376 +by (etac subst 1);
  30.377 +by (rtac stream.finite_ind 1);
  30.378 +by (atac 1);
  30.379 +by (eresolve_tac prems 1);
  30.380 +by (atac 1);
  30.381 +qed "stream_finite_ind";
  30.382 +
  30.383 +val major::prems = Goal
  30.384  "[| P UU;\
  30.385  \   !! x    .    x ~= UU                  ==> P (x      && UU); \
  30.386  \   !! y z s. [| y ~= UU; z ~= UU; P s |] ==> P (y && z && s )  \
  30.387 -\   |] ==> !s. P (stream_take n`s)" (fn prems => [
  30.388 -	res_inst_tac [("n","n")] nat_induct2 1,
  30.389 -	  asm_simp_tac (HOL_ss addsimps (hd prems)::stream.take_rews) 1,
  30.390 -	 rtac allI 1,
  30.391 -	 stream_case_tac "s" 1,
  30.392 -	  asm_simp_tac (HOL_ss addsimps (hd prems)::stream.take_rews) 1,
  30.393 -	 asm_simp_tac (HOL_ss addsimps stream.take_rews addsimps prems) 1,
  30.394 -	rtac allI 1,
  30.395 -	stream_case_tac "s" 1,
  30.396 -	 asm_simp_tac (HOL_ss addsimps (hd prems)::stream.take_rews) 1,
  30.397 -	res_inst_tac [("x","sa")] stream.casedist 1,
  30.398 -	 asm_simp_tac (HOL_ss addsimps stream.take_rews addsimps prems) 1,
  30.399 -	asm_simp_tac (HOL_ss addsimps stream.take_rews addsimps prems) 1]);
  30.400 +\   |] ==> !s. P (stream_take n`s)";
  30.401 +by (res_inst_tac [("n","n")] nat_induct2 1);
  30.402 +by (asm_simp_tac (simpset() addsimps [major]) 1);
  30.403 +by (rtac allI 1);
  30.404 +by (stream_case_tac "s" 1);
  30.405 +by (asm_simp_tac (simpset() addsimps [major]) 1);
  30.406 +by (asm_simp_tac (simpset() addsimps prems) 1);
  30.407 +by (rtac allI 1);
  30.408 +by (stream_case_tac "s" 1);
  30.409 +by (asm_simp_tac (simpset() addsimps [major]) 1);
  30.410 +by (res_inst_tac [("x","sa")] stream.casedist 1);
  30.411 +by (asm_simp_tac (simpset() addsimps prems) 1);
  30.412 +by (asm_simp_tac (simpset() addsimps prems) 1);
  30.413 +qed "stream_finite_ind2";
  30.414  
  30.415  
  30.416 -qed_goal "stream_ind2" thy
  30.417 +val prems = Goal
  30.418  "[| adm P; P UU; !!a. a ~= UU ==> P (a && UU); \
  30.419  \   !!a b s. [| a ~= UU; b ~= UU; P s |] ==> P (a && b && s)\
  30.420 -\ |] ==> P x" (fn prems => [
  30.421 -	rtac (stream.reach RS subst) 1,
  30.422 -	rtac (adm_impl_admw RS wfix_ind) 1,
  30.423 -	rtac adm_subst 1,
  30.424 -	cont_tacR 1,
  30.425 -	resolve_tac prems 1,
  30.426 -	rtac allI 1,
  30.427 -	rtac (rewrite_rule [stream.take_def] stream_finite_ind2 RS spec) 1,
  30.428 -	resolve_tac prems 1,
  30.429 -	eresolve_tac prems 1,
  30.430 -	eresolve_tac prems 1, atac 1, atac 1]);
  30.431 +\ |] ==> P x";
  30.432 +by (rtac (stream.reach RS subst) 1);
  30.433 +by (rtac (adm_impl_admw RS wfix_ind) 1);
  30.434 +by (rtac adm_subst 1);
  30.435 +by (cont_tacR 1);
  30.436 +by (resolve_tac prems 1);
  30.437 +by (rtac allI 1);
  30.438 +by (rtac (rewrite_rule [stream.take_def] stream_finite_ind2 RS spec) 1);
  30.439 +by (resolve_tac prems 1);
  30.440 +by (eresolve_tac prems 1);
  30.441 +by (eresolve_tac prems 1);
  30.442 +by (atac 1);
  30.443 +by (atac 1);
  30.444 +qed "stream_ind2";
  30.445  
  30.446  
  30.447  (* ----------------------------------------------------------------------- *)
  30.448 @@ -275,41 +273,39 @@
  30.449  
  30.450  section "coinduction";
  30.451  
  30.452 -qed_goalw "stream_coind_lemma2" thy [stream.bisim_def]
  30.453 -"!s1 s2. R s1 s2 --> ft`s1 = ft`s2 &  R (rt`s1) (rt`s2) ==> stream_bisim R"
  30.454 - (fn prems =>
  30.455 -	[
  30.456 -	(cut_facts_tac prems 1),
  30.457 -	(strip_tac 1),
  30.458 -	(etac allE 1),
  30.459 -	(etac allE 1),
  30.460 -	(dtac mp 1),
  30.461 -	(atac 1),
  30.462 -	(etac conjE 1),
  30.463 -	(case_tac "x = UU & x' = UU" 1),
  30.464 -	(rtac disjI1 1),
  30.465 -	(fast_tac HOL_cs 1),
  30.466 -	(rtac disjI2 1),
  30.467 -	(rtac disjE 1),
  30.468 -	(etac (de_Morgan_conj RS subst) 1),
  30.469 -	(res_inst_tac [("x","ft`x")] exI 1),
  30.470 -	(res_inst_tac [("x","rt`x")] exI 1),
  30.471 -	(res_inst_tac [("x","rt`x'")] exI 1),
  30.472 -	(rtac conjI 1),
  30.473 -	(etac ft_defin 1),
  30.474 -	(asm_simp_tac (HOLCF_ss addsimps stream.rews addsimps [surjectiv_scons]) 1),
  30.475 -	(eres_inst_tac [("s","ft`x"),("t","ft`x'")] subst 1),
  30.476 -	(simp_tac (HOLCF_ss addsimps stream.rews addsimps [surjectiv_scons]) 1),
  30.477 -	(res_inst_tac [("x","ft`x'")] exI 1),
  30.478 -	(res_inst_tac [("x","rt`x")] exI 1),
  30.479 -	(res_inst_tac [("x","rt`x'")] exI 1),
  30.480 -	(rtac conjI 1),
  30.481 -	(etac ft_defin 1),
  30.482 -	(asm_simp_tac (HOLCF_ss addsimps stream.rews addsimps [surjectiv_scons]) 1),
  30.483 -	(res_inst_tac [("s","ft`x"),("t","ft`x'")] ssubst 1),
  30.484 -	(etac sym 1),
  30.485 -	(simp_tac (HOLCF_ss addsimps stream.rews addsimps [surjectiv_scons]) 1)
  30.486 -	]);
  30.487 +
  30.488 +Goalw [stream.bisim_def]
  30.489 +"!s1 s2. R s1 s2 --> ft`s1 = ft`s2 &  R (rt`s1) (rt`s2) ==> stream_bisim R";
  30.490 +by (strip_tac 1);
  30.491 +by (etac allE 1);
  30.492 +by (etac allE 1);
  30.493 +by (dtac mp 1);
  30.494 +by (atac 1);
  30.495 +by (etac conjE 1);
  30.496 +by (case_tac "x = UU & x' = UU" 1);
  30.497 +by (rtac disjI1 1);
  30.498 +by (Blast_tac 1);
  30.499 +by (rtac disjI2 1);
  30.500 +by (rtac disjE 1);
  30.501 +by (etac (de_Morgan_conj RS subst) 1);
  30.502 +by (res_inst_tac [("x","ft`x")] exI 1);
  30.503 +by (res_inst_tac [("x","rt`x")] exI 1);
  30.504 +by (res_inst_tac [("x","rt`x'")] exI 1);
  30.505 +by (rtac conjI 1);
  30.506 +by (etac ft_defin 1);
  30.507 +by (asm_simp_tac (simpset() addsimps stream.rews addsimps [surjectiv_scons]) 1);
  30.508 +by (eres_inst_tac [("s","ft`x"),("t","ft`x'")] subst 1);
  30.509 +by (simp_tac (simpset() addsimps stream.rews addsimps [surjectiv_scons]) 1);
  30.510 +by (res_inst_tac [("x","ft`x'")] exI 1);
  30.511 +by (res_inst_tac [("x","rt`x")] exI 1);
  30.512 +by (res_inst_tac [("x","rt`x'")] exI 1);
  30.513 +by (rtac conjI 1);
  30.514 +by (etac ft_defin 1);
  30.515 +by (asm_simp_tac (simpset() addsimps stream.rews addsimps [surjectiv_scons]) 1);
  30.516 +by (res_inst_tac [("s","ft`x"),("t","ft`x'")] ssubst 1);
  30.517 +by (etac sym 1);
  30.518 +by (simp_tac (simpset() addsimps stream.rews addsimps [surjectiv_scons]) 1);
  30.519 +qed "stream_coind_lemma2";
  30.520  
  30.521  (* ----------------------------------------------------------------------- *)
  30.522  (* theorems about stream_finite                                            *)
  30.523 @@ -317,59 +313,44 @@
  30.524  
  30.525  section "stream_finite";
  30.526  
  30.527 -qed_goalw "stream_finite_UU" thy [stream.finite_def] "stream_finite UU" 
  30.528 -	(fn prems => [
  30.529 -	(rtac exI 1),
  30.530 -	(simp_tac (HOLCF_ss addsimps stream.rews) 1)]);
  30.531 +
  30.532 +Goalw [stream.finite_def] "stream_finite UU";
  30.533 +by (rtac exI 1);
  30.534 +by (simp_tac (simpset() addsimps stream.rews) 1);
  30.535 +qed "stream_finite_UU";
  30.536  
  30.537 -qed_goal "stream_finite_UU_rev" thy  "~  stream_finite s ==> s ~= UU"  (fn prems =>
  30.538 -	[
  30.539 -	(cut_facts_tac prems 1),
  30.540 -	(etac contrapos 1),
  30.541 -	(hyp_subst_tac  1),
  30.542 -	(rtac stream_finite_UU 1)
  30.543 -	]);
  30.544 +Goal  "~  stream_finite s ==> s ~= UU";
  30.545 +by (blast_tac (claset() addIs [stream_finite_UU]) 1);
  30.546 +qed "stream_finite_UU_rev";
  30.547  
  30.548 -qed_goalw "stream_finite_lemma1" thy [stream.finite_def]
  30.549 - "stream_finite xs ==> stream_finite (x && xs)" (fn prems => [
  30.550 -	(cut_facts_tac prems 1),
  30.551 -	(etac exE 1),
  30.552 -	(rtac exI 1),
  30.553 -	(etac stream_take_lemma4 1)
  30.554 -	]);
  30.555 +Goalw [stream.finite_def] "stream_finite xs ==> stream_finite (x && xs)";
  30.556 +by (blast_tac (claset() addIs [stream_take_lemma4]) 1);
  30.557 +qed "stream_finite_lemma1";
  30.558 +
  30.559 +Goalw [stream.finite_def]
  30.560 + "[| x ~= UU; stream_finite (x && xs) |] ==> stream_finite xs";
  30.561 +by (blast_tac (claset() addIs [stream_take_lemma3]) 1);
  30.562 +qed "stream_finite_lemma2";
  30.563  
  30.564 -qed_goalw "stream_finite_lemma2" thy [stream.finite_def]
  30.565 - "[| x ~= UU; stream_finite (x && xs) |] ==> stream_finite xs" (fn prems =>
  30.566 -	[
  30.567 -	(cut_facts_tac prems 1),
  30.568 -	(etac exE 1),
  30.569 -	(rtac exI 1),
  30.570 -	(etac stream_take_lemma3 1),
  30.571 -	(atac 1)
  30.572 -	]);
  30.573 -
  30.574 -qed_goal "stream_finite_rt_eq" thy "stream_finite (rt`s) = stream_finite s"
  30.575 -	(fn _ => [
  30.576 -	stream_case_tac "s" 1,
  30.577 -	 simp_tac (HOL_ss addsimps stream_finite_UU::stream.sel_rews) 1,
  30.578 -	asm_simp_tac (HOL_ss addsimps stream.sel_rews) 1,
  30.579 -	fast_tac (HOL_cs addIs [stream_finite_lemma1] 
  30.580 -			 addDs [stream_finite_lemma2]) 1]);
  30.581 +Goal "stream_finite (rt`s) = stream_finite s";
  30.582 +by (stream_case_tac "s" 1);
  30.583 +by (simp_tac (simpset() addsimps [stream_finite_UU]) 1);
  30.584 +by (Asm_simp_tac 1);
  30.585 +by (fast_tac (claset() addIs [stream_finite_lemma1] 
  30.586 +                       addDs [stream_finite_lemma2]) 1);
  30.587 +qed "stream_finite_rt_eq";
  30.588  
  30.589 -qed_goal_spec_mp "stream_finite_less" thy 
  30.590 - "stream_finite s ==> !t. t<<s --> stream_finite t" (fn prems => [
  30.591 -	cut_facts_tac prems 1,
  30.592 -	eres_inst_tac [("x","s")] stream_finite_ind 1,
  30.593 -	 strip_tac 1, dtac UU_I 1,
  30.594 -	 asm_simp_tac (HOLCF_ss addsimps [stream_finite_UU]) 1,
  30.595 -	strip_tac 1,
  30.596 -	asm_full_simp_tac (HOL_ss addsimps [stream_prefix']) 1,
  30.597 -	fast_tac (HOL_cs addSIs [stream_finite_UU, stream_finite_lemma1]) 1]);
  30.598 +Goal "stream_finite s ==> !t. t<<s --> stream_finite t";
  30.599 +by (eres_inst_tac [("x","s")] stream_finite_ind 1);
  30.600 +by (strip_tac 1); 
  30.601 +by (dtac UU_I 1);
  30.602 +by (asm_simp_tac (simpset() addsimps [stream_finite_UU]) 1);
  30.603 +by (strip_tac 1);
  30.604 +by (asm_full_simp_tac (simpset() addsimps [stream_prefix']) 1);
  30.605 +by (fast_tac (claset() addSIs [stream_finite_UU, stream_finite_lemma1]) 1);
  30.606 +qed_spec_mp "stream_finite_less";
  30.607  
  30.608 -qed_goal "adm_not_stream_finite" thy "adm (%x. ~  stream_finite x)" (fn _ => [
  30.609 -	rtac admI2 1,
  30.610 -	dtac spec 1,
  30.611 -	etac contrapos 1,
  30.612 -	dtac stream_finite_less 1,
  30.613 -	 etac is_ub_thelub 1,
  30.614 -	atac 1]);
  30.615 +Goal "adm (%x. ~  stream_finite x)";
  30.616 +by (rtac admI2 1);
  30.617 +by (best_tac (claset() addIs [stream_finite_less, is_ub_thelub]) 1);
  30.618 +qed "adm_not_stream_finite";
    31.1 --- a/src/HOLCF/ex/loeckx.ML	Wed Jul 05 14:26:58 2000 +0200
    31.2 +++ b/src/HOLCF/ex/loeckx.ML	Wed Jul 05 16:37:52 2000 +0200
    31.3 @@ -2,20 +2,12 @@
    31.4  (* Elegant proof for continuity of fixed-point operator *)
    31.5  (* Loeckx & Sieber S.88                                 *)
    31.6  
    31.7 -val prems = goalw Fix.thy [Ifix_def]
    31.8 -"Ifix F= lub (range (%i.%G. iterate i G UU)) F";
    31.9 +Goalw [Ifix_def] "Ifix F= lub (range (%i.%G. iterate i G UU)) F";
   31.10  by (stac thelub_fun 1);
   31.11 -by (rtac ch2ch_fun 1);
   31.12 -back();
   31.13  by (rtac refl 2);
   31.14 -by (rtac chainI 1);
   31.15 -by (strip_tac 1);
   31.16 -by (rtac (less_fun RS iffD2) 1);
   31.17 -by (strip_tac 1);
   31.18 -by (rtac (less_fun RS iffD2) 1);
   31.19 -by (strip_tac 1);
   31.20 -by (rtac (chain_iterate RS chainE RS spec) 1);
   31.21 -val loeckx_sieber = result();
   31.22 +by (blast_tac (claset() addIs [ch2ch_fun, chainI, less_fun RS iffD2,
   31.23 +                               chain_iterate RS chainE]) 1); 
   31.24 +qed "loeckx_sieber";
   31.25  
   31.26  (* 
   31.27  
   31.28 @@ -46,7 +38,7 @@
   31.29  
   31.30  *)
   31.31  
   31.32 -val prems = goal Fix.thy  "cont(Ifix)";
   31.33 +Goal "cont(Ifix)";
   31.34  by (res_inst_tac 
   31.35   [("t","Ifix"),("s","(%f. lub(range(%j.(LAM f. iterate j f UU)`f)))")]
   31.36    ssubst 1);
   31.37 @@ -73,27 +65,20 @@
   31.38  by (stac beta_cfun 1);
   31.39  by (rtac  cont2cont_CF1L 1);
   31.40  by (rtac cont_iterate 1);
   31.41 -by (rtac (chain_iterate RS chainE RS spec) 1);
   31.42 -val cont_Ifix2 = result();
   31.43 +by (rtac (chain_iterate RS chainE) 1);
   31.44 +qed "cont_Ifix2";
   31.45  
   31.46  (* the proof in little steps *)
   31.47  
   31.48 -val prems = goal Fix.thy  
   31.49 -"(% i. iterate i f UU) = (%j.(LAM f. iterate j f UU)`f)";
   31.50 +Goal "(% i. iterate i f UU) = (%j.(LAM f. iterate j f UU)`f)";
   31.51  by (rtac ext 1);
   31.52 -by (stac beta_cfun 1);
   31.53 -by (rtac  cont2cont_CF1L 1);
   31.54 -by (rtac cont_iterate 1);
   31.55 -by (rtac refl 1);
   31.56 -val fix_lemma1 = result();
   31.57 +by (simp_tac (simpset() addsimps [beta_cfun, cont2cont_CF1L, cont_iterate]) 1);
   31.58 +qed "fix_lemma1";
   31.59  
   31.60 -val prems = goal Fix.thy  
   31.61 -" Ifix = (%f. lub(range(%j.(LAM f. iterate j f UU)`f)))";
   31.62 +Goal "Ifix = (%f. lub(range(%j.(LAM f. iterate j f UU)`f)))";
   31.63  by (rtac ext 1);
   31.64 -by (rewtac Ifix_def ); 
   31.65 -by (stac fix_lemma1 1);
   31.66 -by (rtac refl 1);
   31.67 -val fix_lemma2 = result();
   31.68 +by (simp_tac (simpset() addsimps [Ifix_def, fix_lemma1]) 1);
   31.69 +qed "fix_lemma2";
   31.70  
   31.71  (*
   31.72  - cont_lubcfun;
   31.73 @@ -101,11 +86,10 @@
   31.74  
   31.75  *)
   31.76  
   31.77 -val prems = goal Fix.thy "cont Ifix";
   31.78 +Goal "cont Ifix";
   31.79  by (stac fix_lemma2 1);
   31.80  by (rtac cont_lubcfun 1);
   31.81  by (rtac chainI 1);
   31.82 -by (strip_tac 1);
   31.83  by (rtac less_cfun2 1);
   31.84  by (stac beta_cfun 1);
   31.85  by (rtac  cont2cont_CF1L 1);
   31.86 @@ -113,6 +97,6 @@
   31.87  by (stac beta_cfun 1);
   31.88  by (rtac  cont2cont_CF1L 1);
   31.89  by (rtac cont_iterate 1);
   31.90 -by (rtac (chain_iterate RS chainE RS spec) 1);
   31.91 -val cont_Ifix2 = result();
   31.92 +by (rtac (chain_iterate RS chainE) 1);
   31.93 +qed "cont_Ifix2";
   31.94