src/HOLCF/Cfun2.ML
changeset 9248 e1dee89de037
parent 9245 428385c4bc50
child 10834 a7897aebbffc
--- a/src/HOLCF/Cfun2.ML	Wed Jul 05 14:26:58 2000 +0200
+++ b/src/HOLCF/Cfun2.ML	Wed Jul 05 16:37:52 2000 +0200
@@ -7,7 +7,7 @@
 *)
 
 (* for compatibility with old HOLCF-Version *)
-val prems = goal thy "(op <<)=(%f1 f2. Rep_CFun f1 << Rep_CFun f2)";
+Goal "(op <<)=(%f1 f2. Rep_CFun f1 << Rep_CFun f2)";
 by (fold_goals_tac [less_cfun_def]);
 by (rtac refl 1);
 qed "inst_cfun_po";
@@ -16,7 +16,7 @@
 (* access to less_cfun in class po                                          *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy "( f1 << f2 ) = (Rep_CFun(f1) << Rep_CFun(f2))";
+Goal "( f1 << f2 ) = (Rep_CFun(f1) << Rep_CFun(f2))";
 by (simp_tac (simpset() addsimps [inst_cfun_po]) 1);
 qed "less_cfun";
 
@@ -24,7 +24,7 @@
 (* Type 'a ->'b  is pointed                                                 *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy "Abs_CFun(% x. UU) << f";
+Goal "Abs_CFun(% x. UU) << f";
 by (stac less_cfun 1);
 by (stac Abs_Cfun_inverse2 1);
 by (rtac cont_const 1);
@@ -33,7 +33,7 @@
 
 bind_thm ("UU_cfun_def",minimal_cfun RS minimal2UU RS sym);
 
-val prems = goal thy "? x::'a->'b::pcpo.!y. x<<y";
+Goal "? x::'a->'b::pcpo.!y. x<<y";
 by (res_inst_tac [("x","Abs_CFun(% x. UU)")] exI 1);
 by (rtac (minimal_cfun RS allI) 1);
 qed "least_cfun";
@@ -44,7 +44,7 @@
 (* cont_Rep_CFun2 ==> monofun_Rep_CFun2 & contlub_Rep_CFun2                            *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy "cont(Rep_CFun(fo))";
+Goal "cont(Rep_CFun(fo))";
 by (res_inst_tac [("P","cont")] CollectD 1);
 by (fold_goals_tac [CFun_def]);
 by (rtac Rep_Cfun 1);
@@ -73,7 +73,7 @@
 (* Rep_CFun is monotone in its 'first' argument                                 *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goalw thy [monofun] "monofun(Rep_CFun)";
+Goalw [monofun] "monofun(Rep_CFun)";
 by (strip_tac 1);
 by (etac (less_cfun RS subst) 1);
 qed "monofun_Rep_CFun1";
@@ -83,8 +83,7 @@
 (* monotonicity of application Rep_CFun in mixfix syntax [_]_                   *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy  "f1 << f2 ==> f1`x << f2`x";
-by (cut_facts_tac prems 1);
+Goal  "f1 << f2 ==> f1`x << f2`x";
 by (res_inst_tac [("x","x")] spec 1);
 by (rtac (less_fun RS subst) 1);
 by (etac (monofun_Rep_CFun1 RS monofunE RS spec RS spec RS mp) 1);
@@ -98,9 +97,7 @@
 (* monotonicity of Rep_CFun in both arguments in mixfix syntax [_]_             *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy
-        "[|f1<<f2;x1<<x2|] ==> f1`x1 << f2`x2";
-by (cut_facts_tac prems 1);
+Goal "[|f1<<f2;x1<<x2|] ==> f1`x1 << f2`x2";
 by (rtac trans_less 1);
 by (etac monofun_cfun_arg 1);
 by (etac monofun_cfun_fun 1);
@@ -119,9 +116,7 @@
 (* use MF2 lemmas from Cont.ML                                              *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy 
- "chain(Y) ==> chain(%i. f`(Y i))";
-by (cut_facts_tac prems 1);
+Goal "chain(Y) ==> chain(%i. f`(Y i))";
 by (etac (monofun_Rep_CFun2 RS ch2ch_MF2R) 1);
 qed "ch2ch_Rep_CFunR";
 
@@ -135,9 +130,7 @@
 (* use MF2 lemmas from Cont.ML                                              *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy 
-        "chain(F) ==> monofun(% x. lub(range(% j.(F j)`x)))";
-by (cut_facts_tac prems 1);
+Goal "chain(F) ==> monofun(% x. lub(range(% j.(F j)`x)))";
 by (rtac lub_MF2_mono 1);
 by (rtac monofun_Rep_CFun1 1);
 by (rtac (monofun_Rep_CFun2 RS allI) 1);
@@ -149,11 +142,9 @@
 (* use MF2 lemmas from Cont.ML                                              *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy
-        "[| chain(F); chain(Y) |] ==>\
+Goal "[| chain(F); chain(Y) |] ==>\
 \               lub(range(%j. lub(range(%i. F(j)`(Y i))))) =\
 \               lub(range(%i. lub(range(%j. F(j)`(Y i)))))";
-by (cut_facts_tac prems 1);
 by (rtac ex_lubMF2 1);
 by (rtac monofun_Rep_CFun1 1);
 by (rtac (monofun_Rep_CFun2 RS allI) 1);
@@ -165,9 +156,7 @@
 (* the lub of a chain of cont. functions is continuous                      *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy 
-        "chain(F) ==> cont(% x. lub(range(% j. F(j)`x)))";
-by (cut_facts_tac prems 1);
+Goal "chain(F) ==> cont(% x. lub(range(% j. F(j)`x)))";
 by (rtac monocontlub2cont 1);
 by (etac lub_cfun_mono 1);
 by (rtac contlubI 1);
@@ -182,23 +171,18 @@
 (* type 'a -> 'b is chain complete                                          *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy 
-  "chain(CCF) ==> range(CCF) <<| (LAM x. lub(range(% i. CCF(i)`x)))";
-by (cut_facts_tac prems 1);
+Goal "chain(CCF) ==> range(CCF) <<| (LAM x. lub(range(% i. CCF(i)`x)))";
 by (rtac is_lubI 1);
-by (rtac conjI 1);
 by (rtac ub_rangeI 1);
-by (rtac allI 1);
 by (stac less_cfun 1);
 by (stac Abs_Cfun_inverse2 1);
 by (etac cont_lubcfun 1);
-by (rtac (lub_fun RS is_lubE RS conjunct1 RS ub_rangeE RS spec) 1);
+by (rtac (lub_fun RS is_lubD1 RS ub_rangeD) 1);
 by (etac (monofun_Rep_CFun1 RS ch2ch_monofun) 1);
-by (strip_tac 1);
 by (stac less_cfun 1);
 by (stac Abs_Cfun_inverse2 1);
 by (etac cont_lubcfun 1);
-by (rtac (lub_fun RS is_lubE RS conjunct2 RS spec RS mp) 1);
+by (rtac (lub_fun RS is_lub_lub) 1);
 by (etac (monofun_Rep_CFun1 RS ch2ch_monofun) 1);
 by (etac (monofun_Rep_CFun1 RS ub2ub_monofun) 1);
 qed "lub_cfun";
@@ -208,9 +192,7 @@
 chain(?CCF1) ==>  lub (range ?CCF1) = (LAM x. lub (range (%i. ?CCF1 i`x)))
 *)
 
-val prems = goal thy 
-  "chain(CCF::nat=>('a->'b)) ==> ? x. range(CCF) <<| x";
-by (cut_facts_tac prems 1);
+Goal "chain(CCF::nat=>('a->'b)) ==> ? x. range(CCF) <<| x";
 by (rtac exI 1);
 by (etac lub_cfun 1);
 qed "cpo_cfun";
@@ -220,7 +202,7 @@
 (* Extensionality in 'a -> 'b                                               *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal Cfun1.thy "(!!x. f`x = g`x) ==> f = g";
+val prems = Goal "(!!x. f`x = g`x) ==> f = g";
 by (res_inst_tac [("t","f")] (Rep_Cfun_inverse RS subst) 1);
 by (res_inst_tac [("t","g")] (Rep_Cfun_inverse RS subst) 1);
 by (res_inst_tac [("f","Abs_CFun")] arg_cong 1);
@@ -232,21 +214,20 @@
 (* Monotonicity of Abs_CFun                                                     *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy 
-        "[|cont(f);cont(g);f<<g|]==>Abs_CFun(f)<<Abs_CFun(g)";
+Goal "[| cont(f); cont(g); f<<g|] ==> Abs_CFun(f)<<Abs_CFun(g)";
 by (rtac (less_cfun RS iffD2) 1);
 by (stac Abs_Cfun_inverse2 1);
-by (resolve_tac prems 1);
+by (assume_tac 1);
 by (stac Abs_Cfun_inverse2 1);
-by (resolve_tac prems 1);
-by (resolve_tac prems 1);
+by (assume_tac 1);
+by (assume_tac 1);
 qed "semi_monofun_Abs_CFun";
 
 (* ------------------------------------------------------------------------ *)
 (* Extenionality wrt. << in 'a -> 'b                                        *)
 (* ------------------------------------------------------------------------ *)
 
-val prems = goal thy "(!!x. f`x << g`x) ==> f << g";
+val prems = Goal "(!!x. f`x << g`x) ==> f << g";
 by (res_inst_tac [("t","f")] (Rep_Cfun_inverse RS subst) 1);
 by (res_inst_tac [("t","g")] (Rep_Cfun_inverse RS subst) 1);
 by (rtac semi_monofun_Abs_CFun 1);