expanded tabs
authorclasohm
Tue Jan 30 15:24:36 1996 +0100 (1996-01-30)
changeset 14655d7a7e439cec
parent 1464 a608f83e3421
child 1466 bf18d174e9f8
expanded tabs
src/HOL/Arith.ML
src/HOL/AxClasses/Group/Group.ML
src/HOL/AxClasses/Group/GroupDefs.ML
src/HOL/AxClasses/Lattice/CLattice.ML
src/HOL/AxClasses/Lattice/LatInsts.ML
src/HOL/AxClasses/Lattice/Lattice.ML
src/HOL/AxClasses/Lattice/OrdDefs.ML
src/HOL/AxClasses/Tutorial/Group.ML
src/HOL/Finite.ML
src/HOL/Fun.ML
src/HOL/Gfp.ML
src/HOL/HOL.ML
src/HOL/Hoare/Arith2.ML
src/HOL/Hoare/Examples.ML
src/HOL/Hoare/Hoare.ML
src/HOL/Hoare/ROOT.ML
src/HOL/IMP/Com.ML
src/HOL/IMP/Denotation.ML
src/HOL/IMP/Equiv.ML
src/HOL/IMP/Hoare.ML
src/HOL/IMP/Properties.ML
src/HOL/IMP/ROOT.ML
src/HOL/IMP/VC.ML
src/HOL/IOA/ABP/Check.ML
src/HOL/IOA/ABP/Correctness.ML
src/HOL/IOA/ABP/Lemmas.ML
src/HOL/IOA/NTP/Correctness.ML
src/HOL/IOA/NTP/Impl.ML
src/HOL/IOA/NTP/Lemmas.ML
src/HOL/IOA/NTP/Multiset.ML
src/HOL/IOA/meta_theory/Asig.ML
src/HOL/Inductive.ML
src/HOL/Integ/Equiv.ML
src/HOL/Integ/Integ.ML
src/HOL/Integ/ROOT.ML
src/HOL/Lambda/Commutation.ML
src/HOL/Lambda/Eta.ML
src/HOL/Lambda/Lambda.ML
src/HOL/Lambda/ParRed.ML
src/HOL/Lambda/ROOT.ML
src/HOL/Lex/Auto.ML
src/HOL/Lex/AutoChopper.ML
src/HOL/Lex/Prefix.ML
src/HOL/Lex/ROOT.ML
src/HOL/Lfp.ML
src/HOL/List.ML
src/HOL/MiniML/I.ML
src/HOL/MiniML/Type.ML
src/HOL/MiniML/W.ML
src/HOL/Nat.ML
src/HOL/Ord.ML
src/HOL/Prod.ML
src/HOL/Relation.ML
src/HOL/Set.ML
src/HOL/Sexp.ML
src/HOL/Subst/AList.ML
src/HOL/Subst/ROOT.ML
src/HOL/Subst/Setplus.ML
src/HOL/Subst/Subst.ML
src/HOL/Subst/UTLemmas.ML
src/HOL/Subst/UTerm.ML
src/HOL/Subst/Unifier.ML
src/HOL/Sum.ML
src/HOL/Trancl.ML
src/HOL/Univ.ML
src/HOL/WF.ML
src/HOL/add_ind_def.ML
src/HOL/datatype.ML
src/HOL/equalities.ML
src/HOL/ex/Acc.ML
src/HOL/ex/BT.ML
src/HOL/ex/InSort.ML
src/HOL/ex/LList.ML
src/HOL/ex/LexProd.ML
src/HOL/ex/MT.ML
src/HOL/ex/NatSum.ML
src/HOL/ex/Perm.ML
src/HOL/ex/PropLog.ML
src/HOL/ex/Puzzle.ML
src/HOL/ex/Qsort.ML
src/HOL/ex/ROOT.ML
src/HOL/ex/SList.ML
src/HOL/ex/Simult.ML
src/HOL/ex/Sorting.ML
src/HOL/ex/Term.ML
src/HOL/ex/cla.ML
src/HOL/ex/meson.ML
src/HOL/ex/mesontest.ML
src/HOL/ex/rel.ML
src/HOL/ex/set.ML
src/HOL/ex/unsolved.ML
src/HOL/ind_syntax.ML
src/HOL/indrule.ML
src/HOL/intr_elim.ML
src/HOL/mono.ML
src/HOL/simpdata.ML
src/HOL/subset.ML
src/HOL/thy_data.ML
src/HOL/thy_syntax.ML
     1.1 --- a/src/HOL/Arith.ML	Tue Jan 30 15:19:20 1996 +0100
     1.2 +++ b/src/HOL/Arith.ML	Tue Jan 30 15:24:36 1996 +0100
     1.3 @@ -1,6 +1,6 @@
     1.4 -(*  Title: 	HOL/Arith.ML
     1.5 +(*  Title:      HOL/Arith.ML
     1.6      ID:         $Id$
     1.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
     1.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     1.9      Copyright   1993  University of Cambridge
    1.10  
    1.11  Proofs about elementary arithmetic: addition, multiplication, etc.
    1.12 @@ -227,7 +227,7 @@
    1.13  by (case_tac "k<n" 1);
    1.14  by (ALLGOALS (asm_simp_tac(!simpset addsimps (add_ac @
    1.15                         [mod_less, mod_geq, div_less, div_geq,
    1.16 -	                add_diff_inverse, diff_less]))));
    1.17 +                        add_diff_inverse, diff_less]))));
    1.18  qed "mod_div_equality";
    1.19  
    1.20  
    1.21 @@ -322,20 +322,20 @@
    1.22  bind_thm ("trans_less_add2", le_add2 RSN (2,less_le_trans));
    1.23  
    1.24  goal Arith.thy "!!i. i+j < (k::nat) ==> i<k";
    1.25 -be rev_mp 1;
    1.26 +by (etac rev_mp 1);
    1.27  by(nat_ind_tac "j" 1);
    1.28  by (ALLGOALS Asm_simp_tac);
    1.29  by(fast_tac (HOL_cs addDs [Suc_lessD]) 1);
    1.30  qed "add_lessD1";
    1.31  
    1.32  goal Arith.thy "!!k::nat. m <= n ==> m <= n+k";
    1.33 -by (eresolve_tac [le_trans] 1);
    1.34 -by (resolve_tac [le_add1] 1);
    1.35 +by (etac le_trans 1);
    1.36 +by (rtac le_add1 1);
    1.37  qed "le_imp_add_le";
    1.38  
    1.39  goal Arith.thy "!!k::nat. m < n ==> m < n+k";
    1.40 -by (eresolve_tac [less_le_trans] 1);
    1.41 -by (resolve_tac [le_add1] 1);
    1.42 +by (etac less_le_trans 1);
    1.43 +by (rtac le_add1 1);
    1.44  qed "less_imp_add_less";
    1.45  
    1.46  goal Arith.thy "m+k<=n --> m<=(n::nat)";
    1.47 @@ -350,7 +350,7 @@
    1.48  by (asm_full_simp_tac
    1.49      (!simpset delsimps [add_Suc_right]
    1.50                  addsimps ([add_Suc_right RS sym, add_left_cancel] @add_ac)) 1);
    1.51 -by (eresolve_tac [subst] 1);
    1.52 +by (etac subst 1);
    1.53  by (simp_tac (!simpset addsimps [less_add_Suc1]) 1);
    1.54  qed "less_add_eq_less";
    1.55  
    1.56 @@ -375,8 +375,8 @@
    1.57  
    1.58  (*A [clumsy] way of lifting < monotonicity to <= monotonicity *)
    1.59  val [lt_mono,le] = goal Arith.thy
    1.60 -     "[| !!i j::nat. i<j ==> f(i) < f(j);	\
    1.61 -\        i <= j					\
    1.62 +     "[| !!i j::nat. i<j ==> f(i) < f(j);       \
    1.63 +\        i <= j                                 \
    1.64  \     |] ==> f(i) <= (f(j)::nat)";
    1.65  by (cut_facts_tac [le] 1);
    1.66  by (asm_full_simp_tac (!simpset addsimps [le_eq_less_or_eq]) 1);
    1.67 @@ -386,7 +386,7 @@
    1.68  (*non-strict, in 1st argument*)
    1.69  goal Arith.thy "!!i j k::nat. i<=j ==> i + k <= j + k";
    1.70  by (res_inst_tac [("f", "%j.j+k")] less_mono_imp_le_mono 1);
    1.71 -by (eresolve_tac [add_less_mono1] 1);
    1.72 +by (etac add_less_mono1 1);
    1.73  by (assume_tac 1);
    1.74  qed "add_le_mono1";
    1.75  
    1.76 @@ -395,5 +395,5 @@
    1.77  by (etac (add_le_mono1 RS le_trans) 1);
    1.78  by (simp_tac (!simpset addsimps [add_commute]) 1);
    1.79  (*j moves to the end because it is free while k, l are bound*)
    1.80 -by (eresolve_tac [add_le_mono1] 1);
    1.81 +by (etac add_le_mono1 1);
    1.82  qed "add_le_mono";
     2.1 --- a/src/HOL/AxClasses/Group/Group.ML	Tue Jan 30 15:19:20 1996 +0100
     2.2 +++ b/src/HOL/AxClasses/Group/Group.ML	Tue Jan 30 15:24:36 1996 +0100
     2.3 @@ -12,121 +12,121 @@
     2.4  
     2.5  
     2.6  goal thy "x * inv x = (1::'a::group)";
     2.7 -br (sub left_unit) 1;
     2.8 +by (rtac (sub left_unit) 1);
     2.9  back();
    2.10 -br (sub assoc) 1;
    2.11 -br (sub left_inv) 1;
    2.12 +by (rtac (sub assoc) 1);
    2.13 +by (rtac (sub left_inv) 1);
    2.14  back();
    2.15  back();
    2.16 -br (ssub assoc) 1;
    2.17 +by (rtac (ssub assoc) 1);
    2.18  back();
    2.19 -br (ssub left_inv) 1;
    2.20 -br (ssub assoc) 1;
    2.21 -br (ssub left_unit) 1;
    2.22 -br (ssub left_inv) 1;
    2.23 -br refl 1;
    2.24 +by (rtac (ssub left_inv) 1);
    2.25 +by (rtac (ssub assoc) 1);
    2.26 +by (rtac (ssub left_unit) 1);
    2.27 +by (rtac (ssub left_inv) 1);
    2.28 +by (rtac refl 1);
    2.29  qed "right_inv";
    2.30  
    2.31  
    2.32  goal thy "x * 1 = (x::'a::group)";
    2.33 -br (sub left_inv) 1;
    2.34 -br (sub assoc) 1;
    2.35 -br (ssub right_inv) 1;
    2.36 -br (ssub left_unit) 1;
    2.37 -br refl 1;
    2.38 +by (rtac (sub left_inv) 1);
    2.39 +by (rtac (sub assoc) 1);
    2.40 +by (rtac (ssub right_inv) 1);
    2.41 +by (rtac (ssub left_unit) 1);
    2.42 +by (rtac refl 1);
    2.43  qed "right_unit";
    2.44  
    2.45  
    2.46  goal thy "e * x = x --> e = (1::'a::group)";
    2.47 -br impI 1;
    2.48 -br (sub right_unit) 1;
    2.49 +by (rtac impI 1);
    2.50 +by (rtac (sub right_unit) 1);
    2.51  back();
    2.52  by (res_inst_tac [("x", "x")] (sub right_inv) 1);
    2.53 -br (sub assoc) 1;
    2.54 -br arg_cong 1;
    2.55 +by (rtac (sub assoc) 1);
    2.56 +by (rtac arg_cong 1);
    2.57  back();
    2.58 -ba 1;
    2.59 +by (assume_tac 1);
    2.60  qed "strong_one_unit";
    2.61  
    2.62  
    2.63  goal thy "EX! e. ALL x. e * x = (x::'a::group)";
    2.64 -br ex1I 1;
    2.65 -br allI 1;
    2.66 -br left_unit 1;
    2.67 -br mp 1;
    2.68 -br strong_one_unit 1;
    2.69 -be allE 1;
    2.70 -ba 1;
    2.71 +by (rtac ex1I 1);
    2.72 +by (rtac allI 1);
    2.73 +by (rtac left_unit 1);
    2.74 +by (rtac mp 1);
    2.75 +by (rtac strong_one_unit 1);
    2.76 +by (etac allE 1);
    2.77 +by (assume_tac 1);
    2.78  qed "ex1_unit";
    2.79  
    2.80  
    2.81  goal thy "ALL x. EX! e. e * x = (x::'a::group)";
    2.82 -br allI 1;
    2.83 -br ex1I 1;
    2.84 -br left_unit 1;
    2.85 -br (strong_one_unit RS mp) 1;
    2.86 -ba 1;
    2.87 +by (rtac allI 1);
    2.88 +by (rtac ex1I 1);
    2.89 +by (rtac left_unit 1);
    2.90 +by (rtac (strong_one_unit RS mp) 1);
    2.91 +by (assume_tac 1);
    2.92  qed "ex1_unit'";
    2.93  
    2.94  
    2.95  goal thy "inj (op * (x::'a::group))";
    2.96 -br injI 1;
    2.97 -br (sub left_unit) 1;
    2.98 +by (rtac injI 1);
    2.99 +by (rtac (sub left_unit) 1);
   2.100  back();
   2.101 -br (sub left_unit) 1;
   2.102 +by (rtac (sub left_unit) 1);
   2.103  by (res_inst_tac [("x", "x")] (sub left_inv) 1);
   2.104 -br (ssub assoc) 1;
   2.105 +by (rtac (ssub assoc) 1);
   2.106  back();
   2.107 -br (ssub assoc) 1;
   2.108 -br arg_cong 1;
   2.109 +by (rtac (ssub assoc) 1);
   2.110 +by (rtac arg_cong 1);
   2.111  back();
   2.112 -ba 1;
   2.113 +by (assume_tac 1);
   2.114  qed "inj_times";
   2.115  
   2.116  
   2.117  goal thy "y * x = 1 --> y = inv (x::'a::group)";
   2.118 -br impI 1;
   2.119 -br (sub right_unit) 1;
   2.120 +by (rtac impI 1);
   2.121 +by (rtac (sub right_unit) 1);
   2.122  back();
   2.123  back();
   2.124 -br (sub right_unit) 1;
   2.125 +by (rtac (sub right_unit) 1);
   2.126  by (res_inst_tac [("x", "x")] (sub right_inv) 1);
   2.127 -br (sub assoc) 1;
   2.128 -br (sub assoc) 1;
   2.129 -br arg_cong 1;
   2.130 +by (rtac (sub assoc) 1);
   2.131 +by (rtac (sub assoc) 1);
   2.132 +by (rtac arg_cong 1);
   2.133  back();
   2.134 -br (ssub left_inv) 1;
   2.135 -ba 1;
   2.136 +by (rtac (ssub left_inv) 1);
   2.137 +by (assume_tac 1);
   2.138  qed "one_inv";
   2.139  
   2.140  
   2.141  goal thy "ALL x. EX! y. y * x = (1::'a::group)";
   2.142 -br allI 1;
   2.143 -br ex1I 1;
   2.144 -br left_inv 1;
   2.145 -br mp 1;
   2.146 -br one_inv 1;
   2.147 -ba 1;
   2.148 +by (rtac allI 1);
   2.149 +by (rtac ex1I 1);
   2.150 +by (rtac left_inv 1);
   2.151 +by (rtac mp 1);
   2.152 +by (rtac one_inv 1);
   2.153 +by (assume_tac 1);
   2.154  qed "ex1_inv";
   2.155  
   2.156  
   2.157  goal thy "inv (x * y) = inv y * inv (x::'a::group)";
   2.158 -br sym 1;
   2.159 -br mp 1;
   2.160 -br one_inv 1;
   2.161 -br (ssub assoc) 1;
   2.162 -br (sub assoc) 1;
   2.163 +by (rtac sym 1);
   2.164 +by (rtac mp 1);
   2.165 +by (rtac one_inv 1);
   2.166 +by (rtac (ssub assoc) 1);
   2.167 +by (rtac (sub assoc) 1);
   2.168  back();
   2.169 -br (ssub left_inv) 1;
   2.170 -br (ssub left_unit) 1;
   2.171 -br (ssub left_inv) 1;
   2.172 -br refl 1;
   2.173 +by (rtac (ssub left_inv) 1);
   2.174 +by (rtac (ssub left_unit) 1);
   2.175 +by (rtac (ssub left_inv) 1);
   2.176 +by (rtac refl 1);
   2.177  qed "inv_times";
   2.178  
   2.179  
   2.180  goal thy "inv (inv x) = (x::'a::group)";
   2.181 -br sym 1;
   2.182 -br (one_inv RS mp) 1;
   2.183 -br (ssub right_inv) 1;
   2.184 -br refl 1;
   2.185 +by (rtac sym 1);
   2.186 +by (rtac (one_inv RS mp) 1);
   2.187 +by (rtac (ssub right_inv) 1);
   2.188 +by (rtac refl 1);
   2.189  qed "inv_inv";
     3.1 --- a/src/HOL/AxClasses/Group/GroupDefs.ML	Tue Jan 30 15:19:20 1996 +0100
     3.2 +++ b/src/HOL/AxClasses/Group/GroupDefs.ML	Tue Jan 30 15:24:36 1996 +0100
     3.3 @@ -37,12 +37,12 @@
     3.4  
     3.5  goalw thy [times_prod_def, one_prod_def] "1 * x = (x::'a::monoid*'b::monoid)";
     3.6  by (simp_tac (prod_ss addsimps [Monoid.left_unit]) 1);
     3.7 -br (surjective_pairing RS sym) 1;
     3.8 +by (rtac (surjective_pairing RS sym) 1);
     3.9  qed "prod_left_unit";
    3.10  
    3.11  goalw thy [times_prod_def, one_prod_def] "x * 1 = (x::'a::monoid*'b::monoid)";
    3.12  by (simp_tac (prod_ss addsimps [Monoid.right_unit]) 1);
    3.13 -br (surjective_pairing RS sym) 1;
    3.14 +by (rtac (surjective_pairing RS sym) 1);
    3.15  qed "prod_right_unit";
    3.16  
    3.17  goalw thy [times_prod_def, inv_prod_def, one_prod_def] "inv x * x = (1::'a::group*'b::group)";
    3.18 @@ -58,30 +58,30 @@
    3.19  
    3.20  goalw thy [times_fun_def] "(x * y) * z = x * (y * (z::'a => 'b::semigroup))";
    3.21  by (stac expand_fun_eq 1);
    3.22 -br allI 1;
    3.23 -br assoc 1;
    3.24 +by (rtac allI 1);
    3.25 +by (rtac assoc 1);
    3.26  qed "fun_assoc";
    3.27  
    3.28  goalw thy [times_fun_def, one_fun_def] "1 * x = (x::'a => 'b::monoid)";
    3.29  by (stac expand_fun_eq 1);
    3.30 -br allI 1;
    3.31 -br Monoid.left_unit 1;
    3.32 +by (rtac allI 1);
    3.33 +by (rtac Monoid.left_unit 1);
    3.34  qed "fun_left_unit";
    3.35  
    3.36  goalw thy [times_fun_def, one_fun_def] "x * 1 = (x::'a => 'b::monoid)";
    3.37  by (stac expand_fun_eq 1);
    3.38 -br allI 1;
    3.39 -br Monoid.right_unit 1;
    3.40 +by (rtac allI 1);
    3.41 +by (rtac Monoid.right_unit 1);
    3.42  qed "fun_right_unit";
    3.43  
    3.44  goalw thy [times_fun_def, inv_fun_def, one_fun_def] "inv x * x = (1::'a => 'b::group)";
    3.45  by (stac expand_fun_eq 1);
    3.46 -br allI 1;
    3.47 -br left_inv 1;
    3.48 +by (rtac allI 1);
    3.49 +by (rtac left_inv 1);
    3.50  qed "fun_left_inv";
    3.51  
    3.52  goalw thy [times_fun_def] "x * y = y * (x::'a => 'b::agroup)";
    3.53  by (stac expand_fun_eq 1);
    3.54 -br allI 1;
    3.55 -br commut 1;
    3.56 +by (rtac allI 1);
    3.57 +by (rtac commut 1);
    3.58  qed "fun_commut";
     4.1 --- a/src/HOL/AxClasses/Lattice/CLattice.ML	Tue Jan 30 15:19:20 1996 +0100
     4.2 +++ b/src/HOL/AxClasses/Lattice/CLattice.ML	Tue Jan 30 15:24:36 1996 +0100
     4.3 @@ -56,14 +56,14 @@
     4.4    by (cut_facts_tac prems 1);
     4.5    br selectI2 1;
     4.6    br Inf_is_Inf 1;
     4.7 -  by (rewrite_goals_tac [is_Inf_def]);
     4.8 +  by (rewtac is_Inf_def);
     4.9    by (fast_tac set_cs 1);
    4.10  qed "Inf_lb";
    4.11  
    4.12  val [prem] = goalw thy [Inf_def] "(!!x. x:A ==> z [= x) ==> z [= Inf A";
    4.13    br selectI2 1;
    4.14    br Inf_is_Inf 1;
    4.15 -  by (rewrite_goals_tac [is_Inf_def]);
    4.16 +  by (rewtac is_Inf_def);
    4.17    by (step_tac HOL_cs 1);
    4.18    by (step_tac HOL_cs 1);
    4.19    be mp 1;
    4.20 @@ -76,14 +76,14 @@
    4.21    by (cut_facts_tac prems 1);
    4.22    br selectI2 1;
    4.23    br Sup_is_Sup 1;
    4.24 -  by (rewrite_goals_tac [is_Sup_def]);
    4.25 +  by (rewtac is_Sup_def);
    4.26    by (fast_tac set_cs 1);
    4.27  qed "Sup_ub";
    4.28  
    4.29  val [prem] = goalw thy [Sup_def] "(!!x. x:A ==> x [= z) ==> Sup A [= z";
    4.30    br selectI2 1;
    4.31    br Sup_is_Sup 1;
    4.32 -  by (rewrite_goals_tac [is_Sup_def]);
    4.33 +  by (rewtac is_Sup_def);
    4.34    by (step_tac HOL_cs 1);
    4.35    by (step_tac HOL_cs 1);
    4.36    be mp 1;
    4.37 @@ -126,7 +126,7 @@
    4.38  goal thy "A <= B --> Inf B [= Inf A";
    4.39    br impI 1;
    4.40    by (stac le_Inf_eq 1);
    4.41 -  by (rewrite_goals_tac [Ball_def]);
    4.42 +  by (rewtac Ball_def);
    4.43    by (safe_tac set_cs);
    4.44    bd subsetD 1;
    4.45    ba 1;
    4.46 @@ -136,7 +136,7 @@
    4.47  goal thy "A <= B --> Sup A [= Sup B";
    4.48    br impI 1;
    4.49    by (stac ge_Sup_eq 1);
    4.50 -  by (rewrite_goals_tac [Ball_def]);
    4.51 +  by (rewtac Ball_def);
    4.52    by (safe_tac set_cs);
    4.53    bd subsetD 1;
    4.54    ba 1;
    4.55 @@ -148,7 +148,7 @@
    4.56  
    4.57  goal thy "Inf {x} = x";
    4.58    br (Inf_uniq RS mp) 1;
    4.59 -  by (rewrite_goals_tac [is_Inf_def]);
    4.60 +  by (rewtac is_Inf_def);
    4.61    by (safe_tac set_cs);
    4.62    br le_refl 1;
    4.63    by (fast_tac set_cs 1);
    4.64 @@ -156,7 +156,7 @@
    4.65  
    4.66  goal thy "Sup {x} = x";
    4.67    br (Sup_uniq RS mp) 1;
    4.68 -  by (rewrite_goals_tac [is_Sup_def]);
    4.69 +  by (rewtac is_Sup_def);
    4.70    by (safe_tac set_cs);
    4.71    br le_refl 1;
    4.72    by (fast_tac set_cs 1);
    4.73 @@ -165,7 +165,7 @@
    4.74  
    4.75  goal thy "Inf {} = Sup {x. True}";
    4.76    br (Inf_uniq RS mp) 1;
    4.77 -  by (rewrite_goals_tac [is_Inf_def]);
    4.78 +  by (rewtac is_Inf_def);
    4.79    by (safe_tac set_cs);
    4.80    br (sing_Sup_eq RS subst) 1;
    4.81    back();
    4.82 @@ -175,7 +175,7 @@
    4.83  
    4.84  goal thy "Sup {} = Inf {x. True}";
    4.85    br (Sup_uniq RS mp) 1;
    4.86 -  by (rewrite_goals_tac [is_Sup_def]);
    4.87 +  by (rewtac is_Sup_def);
    4.88    by (safe_tac set_cs);
    4.89    br (sing_Inf_eq RS subst) 1;
    4.90    br (Inf_subset_antimon RS mp) 1;
     5.1 --- a/src/HOL/AxClasses/Lattice/LatInsts.ML	Tue Jan 30 15:19:20 1996 +0100
     5.2 +++ b/src/HOL/AxClasses/Lattice/LatInsts.ML	Tue Jan 30 15:24:36 1996 +0100
     5.3 @@ -20,7 +20,7 @@
     5.4  
     5.5  goal thy "Inf (A Un B) = Inf A && Inf B";
     5.6    br (Inf_uniq RS mp) 1;
     5.7 -  by (rewrite_goals_tac [is_Inf_def]);
     5.8 +  by (rewtac is_Inf_def);
     5.9    by (safe_tac set_cs);
    5.10  
    5.11    br (conjI RS (le_trans RS mp)) 1;
    5.12 @@ -41,7 +41,7 @@
    5.13  
    5.14  goal thy "Inf (UN i:A. B i) = Inf {Inf (B i) |i. i:A}";
    5.15    br (Inf_uniq RS mp) 1;
    5.16 -  by (rewrite_goals_tac [is_Inf_def]);
    5.17 +  by (rewtac is_Inf_def);
    5.18    by (safe_tac set_cs);
    5.19    (*level 3*)
    5.20    br (conjI RS (le_trans RS mp)) 1;
    5.21 @@ -60,7 +60,7 @@
    5.22  
    5.23  goal thy "Sup (A Un B) = Sup A || Sup B";
    5.24    br (Sup_uniq RS mp) 1;
    5.25 -  by (rewrite_goals_tac [is_Sup_def]);
    5.26 +  by (rewtac is_Sup_def);
    5.27    by (safe_tac set_cs);
    5.28  
    5.29    br (conjI RS (le_trans RS mp)) 1;
    5.30 @@ -81,7 +81,7 @@
    5.31  
    5.32  goal thy "Sup (UN i:A. B i) = Sup {Sup (B i) |i. i:A}";
    5.33    br (Sup_uniq RS mp) 1;
    5.34 -  by (rewrite_goals_tac [is_Sup_def]);
    5.35 +  by (rewtac is_Sup_def);
    5.36    by (safe_tac set_cs);
    5.37    (*level 3*)
    5.38    br (conjI RS (le_trans RS mp)) 1;
     6.1 --- a/src/HOL/AxClasses/Lattice/Lattice.ML	Tue Jan 30 15:19:20 1996 +0100
     6.2 +++ b/src/HOL/AxClasses/Lattice/Lattice.ML	Tue Jan 30 15:24:36 1996 +0100
     6.3 @@ -102,7 +102,7 @@
     6.4      br inf_lb2 1;
     6.5    (*<==*)
     6.6      br (inf_uniq RS mp) 1;
     6.7 -    by (rewrite_goals_tac [is_inf_def]);
     6.8 +    by (rewtac is_inf_def);
     6.9      by (REPEAT_FIRST (rtac conjI));
    6.10      br le_refl 1;
    6.11      ba 1;
    6.12 @@ -116,7 +116,7 @@
    6.13      br sup_ub1 1;
    6.14    (*<==*)
    6.15      br (sup_uniq RS mp) 1;
    6.16 -    by (rewrite_goals_tac [is_sup_def]);
    6.17 +    by (rewtac is_sup_def);
    6.18      by (REPEAT_FIRST (rtac conjI));
    6.19      ba 1;
    6.20      br le_refl 1;
     7.1 --- a/src/HOL/AxClasses/Lattice/OrdDefs.ML	Tue Jan 30 15:19:20 1996 +0100
     7.2 +++ b/src/HOL/AxClasses/Lattice/OrdDefs.ML	Tue Jan 30 15:24:36 1996 +0100
     7.3 @@ -58,7 +58,7 @@
     7.4  (*"'a dual" is even an isotype*)
     7.5  goal thy "Rep_dual (Abs_dual y) = y";
     7.6    br Abs_dual_inverse 1;
     7.7 -  by (rewrite_goals_tac [dual_def]);
     7.8 +  by (rewtac dual_def);
     7.9    by (fast_tac set_cs 1);
    7.10  qed "Abs_dual_inverse'";
    7.11  
     8.1 --- a/src/HOL/AxClasses/Tutorial/Group.ML	Tue Jan 30 15:19:20 1996 +0100
     8.2 +++ b/src/HOL/AxClasses/Tutorial/Group.ML	Tue Jan 30 15:24:36 1996 +0100
     8.3 @@ -12,107 +12,107 @@
     8.4  
     8.5  
     8.6  goal Group.thy "x <*> inv x = (1::'a::group)";
     8.7 -br (sub left_unit) 1;
     8.8 +by (rtac (sub left_unit) 1);
     8.9  back();
    8.10 -br (sub assoc) 1;
    8.11 -br (sub left_inv) 1;
    8.12 +by (rtac (sub assoc) 1);
    8.13 +by (rtac (sub left_inv) 1);
    8.14  back();
    8.15  back();
    8.16 -br (ssub assoc) 1;
    8.17 +by (rtac (ssub assoc) 1);
    8.18  back();
    8.19 -br (ssub left_inv) 1;
    8.20 -br (ssub assoc) 1;
    8.21 -br (ssub left_unit) 1;
    8.22 -br (ssub left_inv) 1;
    8.23 -br refl 1;
    8.24 +by (rtac (ssub left_inv) 1);
    8.25 +by (rtac (ssub assoc) 1);
    8.26 +by (rtac (ssub left_unit) 1);
    8.27 +by (rtac (ssub left_inv) 1);
    8.28 +by (rtac refl 1);
    8.29  qed "right_inv";
    8.30  
    8.31  
    8.32  goal Group.thy "x <*> 1 = (x::'a::group)";
    8.33 -br (sub left_inv) 1;
    8.34 -br (sub assoc) 1;
    8.35 -br (ssub right_inv) 1;
    8.36 -br (ssub left_unit) 1;
    8.37 -br refl 1;
    8.38 +by (rtac (sub left_inv) 1);
    8.39 +by (rtac (sub assoc) 1);
    8.40 +by (rtac (ssub right_inv) 1);
    8.41 +by (rtac (ssub left_unit) 1);
    8.42 +by (rtac refl 1);
    8.43  qed "right_unit";
    8.44  
    8.45  
    8.46  goal Group.thy "e <*> x = x --> e = (1::'a::group)";
    8.47 -br impI 1;
    8.48 -br (sub right_unit) 1;
    8.49 +by (rtac impI 1);
    8.50 +by (rtac (sub right_unit) 1);
    8.51  back();
    8.52  by (res_inst_tac [("x", "x")] (sub right_inv) 1);
    8.53 -br (sub assoc) 1;
    8.54 -br arg_cong 1;
    8.55 +by (rtac (sub assoc) 1);
    8.56 +by (rtac arg_cong 1);
    8.57  back();
    8.58 -ba 1;
    8.59 +by (assume_tac 1);
    8.60  qed "strong_one_unit";
    8.61  
    8.62  
    8.63  goal Group.thy "EX! e. ALL x. e <*> x = (x::'a::group)";
    8.64 -br ex1I 1;
    8.65 -br allI 1;
    8.66 -br left_unit 1;
    8.67 -br mp 1;
    8.68 -br strong_one_unit 1;
    8.69 -be allE 1;
    8.70 -ba 1;
    8.71 +by (rtac ex1I 1);
    8.72 +by (rtac allI 1);
    8.73 +by (rtac left_unit 1);
    8.74 +by (rtac mp 1);
    8.75 +by (rtac strong_one_unit 1);
    8.76 +by (etac allE 1);
    8.77 +by (assume_tac 1);
    8.78  qed "ex1_unit";
    8.79  
    8.80  
    8.81  goal Group.thy "ALL x. EX! e. e <*> x = (x::'a::group)";
    8.82 -br allI 1;
    8.83 -br ex1I 1;
    8.84 -br left_unit 1;
    8.85 -br (strong_one_unit RS mp) 1;
    8.86 -ba 1;
    8.87 +by (rtac allI 1);
    8.88 +by (rtac ex1I 1);
    8.89 +by (rtac left_unit 1);
    8.90 +by (rtac (strong_one_unit RS mp) 1);
    8.91 +by (assume_tac 1);
    8.92  qed "ex1_unit'";
    8.93  
    8.94  
    8.95  goal Group.thy "y <*> x = 1 --> y = inv (x::'a::group)";
    8.96 -br impI 1;
    8.97 -br (sub right_unit) 1;
    8.98 +by (rtac impI 1);
    8.99 +by (rtac (sub right_unit) 1);
   8.100  back();
   8.101  back();
   8.102 -br (sub right_unit) 1;
   8.103 +by (rtac (sub right_unit) 1);
   8.104  by (res_inst_tac [("x", "x")] (sub right_inv) 1);
   8.105 -br (sub assoc) 1;
   8.106 -br (sub assoc) 1;
   8.107 -br arg_cong 1;
   8.108 +by (rtac (sub assoc) 1);
   8.109 +by (rtac (sub assoc) 1);
   8.110 +by (rtac arg_cong 1);
   8.111  back();
   8.112 -br (ssub left_inv) 1;
   8.113 -ba 1;
   8.114 +by (rtac (ssub left_inv) 1);
   8.115 +by (assume_tac 1);
   8.116  qed "one_inv";
   8.117  
   8.118  
   8.119  goal Group.thy "ALL x. EX! y. y <*> x = (1::'a::group)";
   8.120 -br allI 1;
   8.121 -br ex1I 1;
   8.122 -br left_inv 1;
   8.123 -br mp 1;
   8.124 -br one_inv 1;
   8.125 -ba 1;
   8.126 +by (rtac allI 1);
   8.127 +by (rtac ex1I 1);
   8.128 +by (rtac left_inv 1);
   8.129 +by (rtac mp 1);
   8.130 +by (rtac one_inv 1);
   8.131 +by (assume_tac 1);
   8.132  qed "ex1_inv";
   8.133  
   8.134  
   8.135  goal Group.thy "inv (x <*> y) = inv y <*> inv (x::'a::group)";
   8.136 -br sym 1;
   8.137 -br mp 1;
   8.138 -br one_inv 1;
   8.139 -br (ssub assoc) 1;
   8.140 -br (sub assoc) 1;
   8.141 +by (rtac sym 1);
   8.142 +by (rtac mp 1);
   8.143 +by (rtac one_inv 1);
   8.144 +by (rtac (ssub assoc) 1);
   8.145 +by (rtac (sub assoc) 1);
   8.146  back();
   8.147 -br (ssub left_inv) 1;
   8.148 -br (ssub left_unit) 1;
   8.149 -br (ssub left_inv) 1;
   8.150 -br refl 1;
   8.151 +by (rtac (ssub left_inv) 1);
   8.152 +by (rtac (ssub left_unit) 1);
   8.153 +by (rtac (ssub left_inv) 1);
   8.154 +by (rtac refl 1);
   8.155  qed "inv_product";
   8.156  
   8.157  
   8.158  goal Group.thy "inv (inv x) = (x::'a::group)";
   8.159 -br sym 1;
   8.160 -br (one_inv RS mp) 1;
   8.161 -br (ssub right_inv) 1;
   8.162 -br refl 1;
   8.163 +by (rtac sym 1);
   8.164 +by (rtac (one_inv RS mp) 1);
   8.165 +by (rtac (ssub right_inv) 1);
   8.166 +by (rtac refl 1);
   8.167  qed "inv_inv";
   8.168  
     9.1 --- a/src/HOL/Finite.ML	Tue Jan 30 15:19:20 1996 +0100
     9.2 +++ b/src/HOL/Finite.ML	Tue Jan 30 15:24:36 1996 +0100
     9.3 @@ -1,6 +1,6 @@
     9.4 -(*  Title: 	HOL/Finite.thy
     9.5 +(*  Title:      HOL/Finite.thy
     9.6      ID:         $Id$
     9.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
     9.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     9.9      Copyright   1994  University of Cambridge
    9.10  
    9.11  Finite powerset operator
    9.12 @@ -9,7 +9,7 @@
    9.13  open Finite;
    9.14  
    9.15  goalw Finite.thy Fin.defs "!!A B. A<=B ==> Fin(A) <= Fin(B)";
    9.16 -br lfp_mono 1;
    9.17 +by (rtac lfp_mono 1);
    9.18  by (REPEAT (ares_tac basic_monos 1));
    9.19  qed "Fin_mono";
    9.20  
    9.21 @@ -23,7 +23,7 @@
    9.22  (*Discharging ~ x:y entails extra work*)
    9.23  val major::prems = goal Finite.thy 
    9.24      "[| F:Fin(A);  P({}); \
    9.25 -\	!!F x. [| x:A;  F:Fin(A);  x~:F;  P(F) |] ==> P(insert x F) \
    9.26 +\       !!F x. [| x:A;  F:Fin(A);  x~:F;  P(F) |] ==> P(insert x F) \
    9.27  \    |] ==> P(F)";
    9.28  by (rtac (major RS Fin.induct) 1);
    9.29  by (excluded_middle_tac "a:b" 2);
    9.30 @@ -45,8 +45,8 @@
    9.31  (*Every subset of a finite set is finite*)
    9.32  val [subs,fin] = goal Finite.thy "[| A<=B;  B: Fin(M) |] ==> A: Fin(M)";
    9.33  by (EVERY1 [subgoal_tac "ALL C. C<=B --> C: Fin(M)",
    9.34 -	    rtac mp, etac spec,
    9.35 -	    rtac subs]);
    9.36 +            rtac mp, etac spec,
    9.37 +            rtac subs]);
    9.38  by (rtac (fin RS Fin_induct) 1);
    9.39  by (simp_tac (!simpset addsimps [subset_Un_eq]) 1);
    9.40  by (safe_tac (set_cs addSDs [subset_insert_iff RS iffD1]));
    9.41 @@ -64,8 +64,8 @@
    9.42  qed "Fin_imageI";
    9.43  
    9.44  val major::prems = goal Finite.thy 
    9.45 -    "[| c: Fin(A);  b: Fin(A);  				\
    9.46 -\       P(b);       						\
    9.47 +    "[| c: Fin(A);  b: Fin(A);                                  \
    9.48 +\       P(b);                                                   \
    9.49  \       !!(x::'a) y. [| x:A; y: Fin(A);  x:y;  P(y) |] ==> P(y-{x}) \
    9.50  \    |] ==> c<=b --> P(b-c)";
    9.51  by (rtac (major RS Fin_induct) 1);
    9.52 @@ -75,8 +75,8 @@
    9.53  qed "Fin_empty_induct_lemma";
    9.54  
    9.55  val prems = goal Finite.thy 
    9.56 -    "[| b: Fin(A);  						\
    9.57 -\       P(b);        						\
    9.58 +    "[| b: Fin(A);                                              \
    9.59 +\       P(b);                                                   \
    9.60  \       !!x y. [| x:A; y: Fin(A);  x:y;  P(y) |] ==> P(y-{x}) \
    9.61  \    |] ==> P({})";
    9.62  by (rtac (Diff_cancel RS subst) 1);
    10.1 --- a/src/HOL/Fun.ML	Tue Jan 30 15:19:20 1996 +0100
    10.2 +++ b/src/HOL/Fun.ML	Tue Jan 30 15:24:36 1996 +0100
    10.3 @@ -1,6 +1,6 @@
    10.4 -(*  Title: 	HOL/Fun
    10.5 +(*  Title:      HOL/Fun
    10.6      ID:         $Id$
    10.7 -    Author: 	Tobias Nipkow, Cambridge University Computer Laboratory
    10.8 +    Author:     Tobias Nipkow, Cambridge University Computer Laboratory
    10.9      Copyright   1993  University of Cambridge
   10.10  
   10.11  Lemmas about functions.
   10.12 @@ -166,7 +166,7 @@
   10.13      "[| inj(f);  A<=range(f) |] ==> inj_onto (Inv f) A";
   10.14  by (cut_facts_tac prems 1);
   10.15  by (fast_tac (HOL_cs addIs [inj_ontoI] 
   10.16 -		     addEs [Inv_injective,injD,subsetD]) 1);
   10.17 +                     addEs [Inv_injective,injD,subsetD]) 1);
   10.18  qed "inj_onto_Inv";
   10.19  
   10.20  
   10.21 @@ -174,12 +174,12 @@
   10.22  
   10.23  val set_cs = HOL_cs 
   10.24      addSIs [ballI, PowI, subsetI, InterI, INT_I, INT1_I, CollectI, 
   10.25 -	    ComplI, IntI, DiffI, UnCI, insertCI] 
   10.26 +            ComplI, IntI, DiffI, UnCI, insertCI] 
   10.27      addIs  [bexI, UnionI, UN_I, UN1_I, imageI, rangeI] 
   10.28      addSEs [bexE, make_elim PowD, UnionE, UN_E, UN1_E, DiffE,
   10.29 -	    CollectE, ComplE, IntE, UnE, insertE, imageE, rangeE, emptyE] 
   10.30 +            CollectE, ComplE, IntE, UnE, insertE, imageE, rangeE, emptyE] 
   10.31      addEs  [ballE, InterD, InterE, INT_D, INT_E, make_elim INT1_D,
   10.32 -	    subsetD, subsetCE];
   10.33 +            subsetD, subsetCE];
   10.34  
   10.35  fun cfast_tac prems = cut_facts_tac prems THEN' fast_tac set_cs;
   10.36  
    11.1 --- a/src/HOL/Gfp.ML	Tue Jan 30 15:19:20 1996 +0100
    11.2 +++ b/src/HOL/Gfp.ML	Tue Jan 30 15:24:36 1996 +0100
    11.3 @@ -1,6 +1,6 @@
    11.4 -(*  Title: 	HOL/gfp
    11.5 +(*  Title:      HOL/gfp
    11.6      ID:         $Id$
    11.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    11.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    11.9      Copyright   1993  University of Cambridge
   11.10  
   11.11  For gfp.thy.  The Knaster-Tarski Theorem for greatest fixed points.
   11.12 @@ -25,12 +25,12 @@
   11.13  
   11.14  val [mono] = goal Gfp.thy "mono(f) ==> gfp(f) <= f(gfp(f))";
   11.15  by (EVERY1 [rtac gfp_least, rtac subset_trans, atac,
   11.16 -	    rtac (mono RS monoD), rtac gfp_upperbound, atac]);
   11.17 +            rtac (mono RS monoD), rtac gfp_upperbound, atac]);
   11.18  qed "gfp_lemma2";
   11.19  
   11.20  val [mono] = goal Gfp.thy "mono(f) ==> f(gfp(f)) <= gfp(f)";
   11.21  by (EVERY1 [rtac gfp_upperbound, rtac (mono RS monoD), 
   11.22 -	    rtac gfp_lemma2, rtac mono]);
   11.23 +            rtac gfp_lemma2, rtac mono]);
   11.24  qed "gfp_lemma3";
   11.25  
   11.26  val [mono] = goal Gfp.thy "mono(f) ==> gfp(f) = f(gfp(f))";
   11.27 @@ -64,8 +64,8 @@
   11.28  
   11.29  val [mono,prem] = goal Gfp.thy
   11.30      "[| mono(f);  a: gfp(f) |] ==> a: f(X Un gfp(f))";
   11.31 -br (mono RS mono_Un RS subsetD) 1;
   11.32 -br (mono RS gfp_lemma2 RS subsetD RS UnI2) 1;
   11.33 +by (rtac (mono RS mono_Un RS subsetD) 1);
   11.34 +by (rtac (mono RS gfp_lemma2 RS subsetD RS UnI2) 1);
   11.35  by (rtac prem 1);
   11.36  qed "gfp_fun_UnI2";
   11.37  
   11.38 @@ -140,6 +140,6 @@
   11.39  
   11.40  (*Monotonicity of gfp!*)
   11.41  val [prem] = goal Gfp.thy "[| !!Z. f(Z)<=g(Z) |] ==> gfp(f) <= gfp(g)";
   11.42 -br (gfp_upperbound RS gfp_least) 1;
   11.43 -be (prem RSN (2,subset_trans)) 1;
   11.44 +by (rtac (gfp_upperbound RS gfp_least) 1);
   11.45 +by (etac (prem RSN (2,subset_trans)) 1);
   11.46  qed "gfp_mono";
    12.1 --- a/src/HOL/HOL.ML	Tue Jan 30 15:19:20 1996 +0100
    12.2 +++ b/src/HOL/HOL.ML	Tue Jan 30 15:24:36 1996 +0100
    12.3 @@ -1,9 +1,9 @@
    12.4 -(*  Title: 	HOL/HOL.ML
    12.5 +(*  Title:      HOL/HOL.ML
    12.6      ID:         $Id$
    12.7 -    Author: 	Tobias Nipkow
    12.8 +    Author:     Tobias Nipkow
    12.9      Copyright   1991  University of Cambridge
   12.10  
   12.11 -For hol.thy
   12.12 +For HOL.thy
   12.13  Derived rules from Appendix of Mike Gordons HOL Report, Cambridge TR 68 
   12.14  *)
   12.15  
   12.16 @@ -20,12 +20,12 @@
   12.17  
   12.18  qed_goal "trans" HOL.thy "[| r=s; s=t |] ==> r=t"
   12.19   (fn prems =>
   12.20 -	[rtac subst 1, resolve_tac prems 1, resolve_tac prems 1]);
   12.21 +        [rtac subst 1, resolve_tac prems 1, resolve_tac prems 1]);
   12.22  
   12.23  (*Useful with eresolve_tac for proving equalties from known equalities.
   12.24 -	a = b
   12.25 -	|   |
   12.26 -	c = d	*)
   12.27 +        a = b
   12.28 +        |   |
   12.29 +        c = d   *)
   12.30  qed_goal "box_equals" HOL.thy
   12.31      "[| a=b;  a=c;  b=d |] ==> c=d"  
   12.32   (fn prems=>
   12.33 @@ -57,7 +57,7 @@
   12.34  
   12.35  qed_goal "iffD2" HOL.thy "[| P=Q; Q |] ==> P"
   12.36   (fn prems =>
   12.37 -	[rtac ssubst 1, resolve_tac prems 1, resolve_tac prems 1]);
   12.38 +        [rtac ssubst 1, resolve_tac prems 1, resolve_tac prems 1]);
   12.39  
   12.40  val iffD1 = sym RS iffD2;
   12.41  
   12.42 @@ -160,8 +160,8 @@
   12.43  
   12.44  qed_goal "conjE" HOL.thy "[| P&Q;  [| P; Q |] ==> R |] ==> R"
   12.45   (fn prems =>
   12.46 -	 [cut_facts_tac prems 1, resolve_tac prems 1,
   12.47 -	  etac conjunct1 1, etac conjunct2 1]);
   12.48 +         [cut_facts_tac prems 1, resolve_tac prems 1,
   12.49 +          etac conjunct1 1, etac conjunct2 1]);
   12.50  
   12.51  (** Disjunction *)
   12.52  
   12.53 @@ -173,8 +173,8 @@
   12.54  
   12.55  qed_goalw "disjE" HOL.thy [or_def] "[| P | Q; P ==> R; Q ==> R |] ==> R"
   12.56   (fn [a1,a2,a3] =>
   12.57 -	[rtac (mp RS mp) 1, rtac spec 1, rtac a1 1,
   12.58 -	 rtac (a2 RS impI) 1, assume_tac 1, rtac (a3 RS impI) 1, assume_tac 1]);
   12.59 +        [rtac (mp RS mp) 1, rtac spec 1, rtac a1 1,
   12.60 +         rtac (a2 RS impI) 1, assume_tac 1, rtac (a3 RS impI) 1, assume_tac 1]);
   12.61  
   12.62  (** CCONTR -- classical logic **)
   12.63  
   12.64 @@ -211,13 +211,13 @@
   12.65  qed_goal "selectI2" HOL.thy
   12.66      "[| P(a);  !!x. P(x) ==> Q(x) |] ==> Q(@x.P(x))"
   12.67   (fn prems => [ resolve_tac prems 1, 
   12.68 -	        rtac selectI 1, 
   12.69 -		resolve_tac prems 1 ]);
   12.70 +                rtac selectI 1, 
   12.71 +                resolve_tac prems 1 ]);
   12.72  
   12.73  qed_goal "select_equality" HOL.thy
   12.74      "[| P(a);  !!x. P(x) ==> x=a |] ==> (@x.P(x)) = a"
   12.75   (fn prems => [ rtac selectI2 1, 
   12.76 -		REPEAT (ares_tac prems 1) ]);
   12.77 +                REPEAT (ares_tac prems 1) ]);
   12.78  
   12.79  
   12.80  (** Classical intro rules for disjunction and existential quantifiers *)
   12.81 @@ -247,7 +247,7 @@
   12.82   (fn major::prems =>
   12.83    [ (rtac (major RS iffE) 1),
   12.84      (REPEAT (DEPTH_SOLVE_1 
   12.85 -	(eresolve_tac ([asm_rl,impCE,notE]@prems) 1))) ]);
   12.86 +        (eresolve_tac ([asm_rl,impCE,notE]@prems) 1))) ]);
   12.87  
   12.88  qed_goal "exCI" HOL.thy "(! x. ~P(x) ==> P(a)) ==> ? x.P(x)"
   12.89   (fn prems=>
   12.90 @@ -292,10 +292,10 @@
   12.91  (*** Applying ClassicalFun to create a classical prover ***)
   12.92  structure Classical_Data = 
   12.93    struct
   12.94 -  val sizef	= size_of_thm
   12.95 -  val mp	= mp
   12.96 -  val not_elim	= notE
   12.97 -  val classical	= classical
   12.98 +  val sizef     = size_of_thm
   12.99 +  val mp        = mp
  12.100 +  val not_elim  = notE
  12.101 +  val classical = classical
  12.102    val hyp_subst_tacs=[hyp_subst_tac]
  12.103    end;
  12.104  
    13.1 --- a/src/HOL/Hoare/Arith2.ML	Tue Jan 30 15:19:20 1996 +0100
    13.2 +++ b/src/HOL/Hoare/Arith2.ML	Tue Jan 30 15:24:36 1996 +0100
    13.3 @@ -1,6 +1,6 @@
    13.4 -(*  Title: 	HOL/Hoare/Arith2.ML
    13.5 +(*  Title:      HOL/Hoare/Arith2.ML
    13.6      ID:         $Id$
    13.7 -    Author: 	Norbert Galm
    13.8 +    Author:     Norbert Galm
    13.9      Copyright   1995 TUM
   13.10  
   13.11  More arithmetic lemmas.
   13.12 @@ -30,16 +30,16 @@
   13.13  \       !!x y z. [| P x y z |] ==> P (Suc x) (Suc y) (Suc z)  \
   13.14  \    |] ==> P m n k";
   13.15  by (res_inst_tac [("x","m")] spec 1);
   13.16 -br diff_induct 1;
   13.17 -br allI 1;
   13.18 -br allI 2;
   13.19 +by (rtac diff_induct 1);
   13.20 +by (rtac allI 1);
   13.21 +by (rtac allI 2);
   13.22  by (res_inst_tac [("m","xa"),("n","x")] diff_induct 1);
   13.23  by (res_inst_tac [("m","x"),("n","Suc y")] diff_induct 4);
   13.24 -br allI 7;
   13.25 +by (rtac allI 7);
   13.26  by (nat_ind_tac "xa" 7);
   13.27  by (ALLGOALS (resolve_tac prems));
   13.28 -ba 1;
   13.29 -ba 1;
   13.30 +by (assume_tac 1);
   13.31 +by (assume_tac 1);
   13.32  by (fast_tac HOL_cs 1);
   13.33  by (fast_tac HOL_cs 1);
   13.34  qed "diff_induct3";
   13.35 @@ -48,33 +48,33 @@
   13.36  
   13.37  val prems=goal Arith.thy "~m<n+k ==> (m - n) - k = m - ((n + k)::nat)";
   13.38  by (cut_facts_tac prems 1);
   13.39 -br mp 1;
   13.40 -ba 2;
   13.41 +by (rtac mp 1);
   13.42 +by (assume_tac 2);
   13.43  by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
   13.44  by (ALLGOALS Asm_simp_tac);
   13.45  qed "diff_not_assoc";
   13.46  
   13.47  val prems=goal Arith.thy "[|~m<n; ~n<k|] ==> (m - n) + k = m - ((n - k)::nat)";
   13.48  by (cut_facts_tac prems 1);
   13.49 -bd conjI 1;
   13.50 -ba 1;
   13.51 +by (dtac conjI 1);
   13.52 +by (assume_tac 1);
   13.53  by (res_inst_tac [("P","~m<n & ~n<k")] mp 1);
   13.54 -ba 2;
   13.55 +by (assume_tac 2);
   13.56  by (res_inst_tac [("m","m"),("n","n"),("k","k")] diff_induct3 1);
   13.57  by (ALLGOALS Asm_simp_tac);
   13.58 -br impI 1;
   13.59 +by (rtac impI 1);
   13.60  by (dres_inst_tac [("P","~x<y")] conjE 1);
   13.61 -ba 2;
   13.62 -br (Suc_diff_n RS sym) 1;
   13.63 -br le_less_trans 1;
   13.64 -be (not_less_eq RS subst) 2;
   13.65 -br (hd ([diff_less_Suc RS lessD] RL [Suc_le_mono RS subst])) 1;
   13.66 +by (assume_tac 2);
   13.67 +by (rtac (Suc_diff_n RS sym) 1);
   13.68 +by (rtac le_less_trans 1);
   13.69 +by (etac (not_less_eq RS subst) 2);
   13.70 +by (rtac (hd ([diff_less_Suc RS lessD] RL [Suc_le_mono RS subst])) 1);
   13.71  qed "diff_add_not_assoc";
   13.72  
   13.73  val prems=goal Arith.thy "~n<k ==> (m + n) - k = m + ((n - k)::nat)";
   13.74  by (cut_facts_tac prems 1);
   13.75 -br mp 1;
   13.76 -ba 2;
   13.77 +by (rtac mp 1);
   13.78 +by (assume_tac 2);
   13.79  by (res_inst_tac [("m","n"),("n","k")] diff_induct 1);
   13.80  by (ALLGOALS Asm_simp_tac);
   13.81  qed "add_diff_assoc";
   13.82 @@ -82,12 +82,12 @@
   13.83  (*** more ***)
   13.84  
   13.85  val prems = goal Arith.thy "m~=(n::nat) = (m<n | n<m)";
   13.86 -br iffI 1;
   13.87 +by (rtac iffI 1);
   13.88  by (cut_inst_tac [("m","m"),("n","n")] less_linear 1);
   13.89  by (Asm_full_simp_tac 1);
   13.90 -be disjE 1;
   13.91 -be (less_not_refl2 RS not_sym) 1;
   13.92 -be less_not_refl2 1;
   13.93 +by (etac disjE 1);
   13.94 +by (etac (less_not_refl2 RS not_sym) 1);
   13.95 +by (etac less_not_refl2 1);
   13.96  qed "not_eq_eq_less_or_gr";
   13.97  
   13.98  val [prem] = goal Arith.thy "m<n ==> n-m~=0";
   13.99 @@ -115,7 +115,7 @@
  13.100  by (res_inst_tac [("n","k")] natE 1);
  13.101  by (ALLGOALS Asm_full_simp_tac);
  13.102  by (nat_ind_tac "x" 1);
  13.103 -be add_less_mono 2;
  13.104 +by (etac add_less_mono 2);
  13.105  by (ALLGOALS Asm_full_simp_tac);
  13.106  qed "mult_less_mono_r";
  13.107  
  13.108 @@ -124,8 +124,8 @@
  13.109  by (nat_ind_tac "k" 1);
  13.110  by (ALLGOALS Simp_tac);
  13.111  by (fold_goals_tac [le_def]);
  13.112 -be add_le_mono 1;
  13.113 -ba 1;
  13.114 +by (etac add_le_mono 1);
  13.115 +by (assume_tac 1);
  13.116  qed "mult_not_less_mono_r";
  13.117  
  13.118  val prems = goal Arith.thy "m=(n::nat) ==> m*k=n*k";
  13.119 @@ -137,10 +137,10 @@
  13.120  val prems = goal Arith.thy "[|0<k; m~=(n::nat)|] ==> m*k~=n*k";
  13.121  by (cut_facts_tac prems 1);
  13.122  by (res_inst_tac [("P","m<n"),("Q","n<m")] disjE 1);
  13.123 -br (less_not_refl2 RS not_sym) 2;
  13.124 -be mult_less_mono_r 2;
  13.125 -br less_not_refl2 3;
  13.126 -be mult_less_mono_r 3;
  13.127 +by (rtac (less_not_refl2 RS not_sym) 2);
  13.128 +by (etac mult_less_mono_r 2);
  13.129 +by (rtac less_not_refl2 3);
  13.130 +by (etac mult_less_mono_r 3);
  13.131  by (ALLGOALS (asm_full_simp_tac ((simpset_of "Arith") addsimps [not_eq_eq_less_or_gr])));
  13.132  qed "mult_not_eq_mono_r";
  13.133  
  13.134 @@ -149,18 +149,18 @@
  13.135  val prems = goal Arith.thy "(m - n)*k = (m*k) - ((n*k)::nat)";
  13.136  by (res_inst_tac [("P","m*k<n*k")] case_split_thm 1);
  13.137  by (forward_tac [mult_not_less_mono_r COMP not_imp_swap] 1);
  13.138 -bd (less_not_sym RS (not_less_eq RS iffD1) RS less_imp_diff_is_0) 1;
  13.139 -bd (less_not_sym RS (not_less_eq RS iffD1) RS less_imp_diff_is_0) 1;
  13.140 -br mp 2;
  13.141 -ba 3;
  13.142 +by (dtac (less_not_sym RS (not_less_eq RS iffD1) RS less_imp_diff_is_0) 1);
  13.143 +by (dtac (less_not_sym RS (not_less_eq RS iffD1) RS less_imp_diff_is_0) 1);
  13.144 +by (rtac mp 2);
  13.145 +by (assume_tac 3);
  13.146  by (res_inst_tac [("m","m"),("n","n")] diff_induct 2);
  13.147  by (ALLGOALS Asm_simp_tac);
  13.148 -br impI 1;
  13.149 -bd (refl RS iffD1) 1;
  13.150 +by (rtac impI 1);
  13.151 +by (dtac (refl RS iffD1) 1);
  13.152  by (dres_inst_tac [("k","k")] add_not_less_mono_l 1);
  13.153 -bd (refl RS iffD1) 1;
  13.154 -bd (refl RS iffD1) 1;
  13.155 -bd diff_not_assoc 1;
  13.156 +by (dtac (refl RS iffD1) 1);
  13.157 +by (dtac (refl RS iffD1) 1);
  13.158 +by (dtac diff_not_assoc 1);
  13.159  by (asm_full_simp_tac ((simpset_of "Arith") addsimps [diff_add_inverse]) 1);
  13.160  qed "diff_mult_distrib_r";
  13.161  
  13.162 @@ -178,29 +178,29 @@
  13.163  
  13.164  val prems=goal thy "0<n ==> n mod n = 0";
  13.165  by (cut_facts_tac prems 1);
  13.166 -br (mod_def RS wf_less_trans) 1;
  13.167 +by (rtac (mod_def RS wf_less_trans) 1);
  13.168  by (asm_full_simp_tac ((simpset_of "Arith") addsimps [diff_self_eq_0,cut_def,less_eq]) 1);
  13.169 -be mod_less 1;
  13.170 +by (etac mod_less 1);
  13.171  qed "mod_nn_is_0";
  13.172  
  13.173  val prems=goal thy "0<n ==> m mod n = (m+n) mod n";
  13.174  by (cut_facts_tac prems 1);
  13.175  by (res_inst_tac [("s","n+m"),("t","m+n")] subst 1);
  13.176 -br add_commute 1;
  13.177 +by (rtac add_commute 1);
  13.178  by (res_inst_tac [("s","n+m-n"),("P","%x.x mod n = (n + m) mod n")] subst 1);
  13.179 -br diff_add_inverse 1;
  13.180 -br sym 1;
  13.181 -be mod_geq 1;
  13.182 +by (rtac diff_add_inverse 1);
  13.183 +by (rtac sym 1);
  13.184 +by (etac mod_geq 1);
  13.185  by (res_inst_tac [("s","n<=n+m"),("t","~n+m<n")] subst 1);
  13.186  by (simp_tac ((simpset_of "Arith") addsimps [le_def]) 1);
  13.187 -br le_add1 1;
  13.188 +by (rtac le_add1 1);
  13.189  qed "mod_eq_add";
  13.190  
  13.191  val prems=goal thy "0<n ==> m*n mod n = 0";
  13.192  by (cut_facts_tac prems 1);
  13.193  by (nat_ind_tac "m" 1);
  13.194  by (Simp_tac 1);
  13.195 -be mod_less 1;
  13.196 +by (etac mod_less 1);
  13.197  by (dres_inst_tac [("n","n"),("m","m1*n")] mod_eq_add 1);
  13.198  by (asm_full_simp_tac ((simpset_of "Arith") addsimps [add_commute]) 1);
  13.199  qed "mod_prod_nn_is_0";
  13.200 @@ -208,25 +208,25 @@
  13.201  val prems=goal thy "[|0<x; m mod x = 0; n mod x = 0|] ==> (m+n) mod x = 0";
  13.202  by (cut_facts_tac prems 1);
  13.203  by (res_inst_tac [("s","m div x * x + m mod x"),("t","m")] subst 1);
  13.204 -be mod_div_equality 1;
  13.205 +by (etac mod_div_equality 1);
  13.206  by (res_inst_tac [("s","n div x * x + n mod x"),("t","n")] subst 1);
  13.207 -be mod_div_equality 1;
  13.208 +by (etac mod_div_equality 1);
  13.209  by (Asm_simp_tac 1);
  13.210  by (res_inst_tac [("s","(m div x + n div x) * x"),("t","m div x * x + n div x * x")] subst 1);
  13.211 -br add_mult_distrib 1;
  13.212 -be mod_prod_nn_is_0 1;
  13.213 +by (rtac add_mult_distrib 1);
  13.214 +by (etac mod_prod_nn_is_0 1);
  13.215  qed "mod0_sum";
  13.216  
  13.217  val prems=goal thy "[|0<x; m mod x = 0; n mod x = 0; n<=m|] ==> (m-n) mod x = 0";
  13.218  by (cut_facts_tac prems 1);
  13.219  by (res_inst_tac [("s","m div x * x + m mod x"),("t","m")] subst 1);
  13.220 -be mod_div_equality 1;
  13.221 +by (etac mod_div_equality 1);
  13.222  by (res_inst_tac [("s","n div x * x + n mod x"),("t","n")] subst 1);
  13.223 -be mod_div_equality 1;
  13.224 +by (etac mod_div_equality 1);
  13.225  by (Asm_simp_tac 1);
  13.226  by (res_inst_tac [("s","(m div x - n div x) * x"),("t","m div x * x - n div x * x")] subst 1);
  13.227 -br diff_mult_distrib_r 1;
  13.228 -be mod_prod_nn_is_0 1;
  13.229 +by (rtac diff_mult_distrib_r 1);
  13.230 +by (etac mod_prod_nn_is_0 1);
  13.231  qed "mod0_diff";
  13.232  
  13.233  
  13.234 @@ -234,11 +234,11 @@
  13.235  
  13.236  val prems = goal thy "0<n ==> m*n div n = m";
  13.237  by (cut_facts_tac prems 1);
  13.238 -br (mult_not_eq_mono_r RS not_imp_swap) 1;
  13.239 -ba 1;
  13.240 -ba 1;
  13.241 +by (rtac (mult_not_eq_mono_r RS not_imp_swap) 1);
  13.242 +by (assume_tac 1);
  13.243 +by (assume_tac 1);
  13.244  by (res_inst_tac [("P","%x.m*n div n * n = x")] (mod_div_equality RS subst) 1);
  13.245 -ba 1;
  13.246 +by (assume_tac 1);
  13.247  by (dres_inst_tac [("m","m")] mod_prod_nn_is_0 1);
  13.248  by (Asm_simp_tac 1);
  13.249  qed "div_prod_nn_is_m";
  13.250 @@ -254,32 +254,32 @@
  13.251  
  13.252  val prems=goalw thy [divides_def] "x divides n ==> x<=n";
  13.253  by (cut_facts_tac prems 1);
  13.254 -br ((mod_less COMP rev_contrapos) RS (le_def RS meta_eq_to_obj_eq RS iffD2)) 1;
  13.255 +by (rtac ((mod_less COMP rev_contrapos) RS (le_def RS meta_eq_to_obj_eq RS iffD2)) 1);
  13.256  by (Asm_simp_tac 1);
  13.257 -br (less_not_refl2 RS not_sym) 1;
  13.258 +by (rtac (less_not_refl2 RS not_sym) 1);
  13.259  by (Asm_simp_tac 1);
  13.260  qed "divides_le";
  13.261  
  13.262  val prems=goalw thy [divides_def] "[|x divides m; x divides n|] ==> x divides (m+n)";
  13.263  by (cut_facts_tac prems 1);
  13.264  by (REPEAT ((dtac conjE 1) THEN (atac 2)));
  13.265 -br conjI 1;
  13.266 +by (rtac conjI 1);
  13.267  by (dres_inst_tac [("m","0"),("n","m")] less_imp_add_less 1);
  13.268 -ba 1;
  13.269 -be conjI 1;
  13.270 -br mod0_sum 1;
  13.271 +by (assume_tac 1);
  13.272 +by (etac conjI 1);
  13.273 +by (rtac mod0_sum 1);
  13.274  by (ALLGOALS atac);
  13.275  qed "divides_sum";
  13.276  
  13.277  val prems=goalw thy [divides_def] "[|x divides m; x divides n; n<m|] ==> x divides (m-n)";
  13.278  by (cut_facts_tac prems 1);
  13.279  by (REPEAT ((dtac conjE 1) THEN (atac 2)));
  13.280 -br conjI 1;
  13.281 -be less_imp_diff_positive 1;
  13.282 -be conjI 1;
  13.283 -br mod0_diff 1;
  13.284 +by (rtac conjI 1);
  13.285 +by (etac less_imp_diff_positive 1);
  13.286 +by (etac conjI 1);
  13.287 +by (rtac mod0_diff 1);
  13.288  by (ALLGOALS (asm_simp_tac ((simpset_of "Arith") addsimps [le_def])));
  13.289 -be less_not_sym 1;
  13.290 +by (etac less_not_sym 1);
  13.291  qed "divides_diff";
  13.292  
  13.293  
  13.294 @@ -288,16 +288,16 @@
  13.295  
  13.296  val prems=goalw thy [cd_def] "0<n ==> cd n n n";
  13.297  by (cut_facts_tac prems 1);
  13.298 -bd divides_nn 1;
  13.299 +by (dtac divides_nn 1);
  13.300  by (Asm_simp_tac 1);
  13.301  qed "cd_nnn";
  13.302  
  13.303  val prems=goalw thy [cd_def] "cd x m n ==> x<=m & x<=n";
  13.304  by (cut_facts_tac prems 1);
  13.305 -bd conjE 1;
  13.306 -ba 2;
  13.307 -bd divides_le 1;
  13.308 -bd divides_le 1;
  13.309 +by (dtac conjE 1);
  13.310 +by (assume_tac 2);
  13.311 +by (dtac divides_le 1);
  13.312 +by (dtac divides_le 1);
  13.313  by (Asm_simp_tac 1);
  13.314  qed "cd_le";
  13.315  
  13.316 @@ -307,32 +307,32 @@
  13.317  
  13.318  val prems=goalw thy [cd_def] "n<m ==> cd x m n = cd x (m-n) n";
  13.319  by (cut_facts_tac prems 1);
  13.320 -br iffI 1;
  13.321 -bd conjE 1;
  13.322 -ba 2;
  13.323 -br conjI 1;
  13.324 -br divides_diff 1;
  13.325 -bd conjE 5;
  13.326 -ba 6;
  13.327 -br conjI 5;
  13.328 -bd less_not_sym 5;
  13.329 -bd add_diff_inverse 5;
  13.330 +by (rtac iffI 1);
  13.331 +by (dtac conjE 1);
  13.332 +by (assume_tac 2);
  13.333 +by (rtac conjI 1);
  13.334 +by (rtac divides_diff 1);
  13.335 +by (dtac conjE 5);
  13.336 +by (assume_tac 6);
  13.337 +by (rtac conjI 5);
  13.338 +by (dtac less_not_sym 5);
  13.339 +by (dtac add_diff_inverse 5);
  13.340  by (dres_inst_tac [("m","n"),("n","m-n")] divides_sum 5);
  13.341  by (ALLGOALS Asm_full_simp_tac);
  13.342  qed "cd_diff_l";
  13.343  
  13.344  val prems=goalw thy [cd_def] "m<n ==> cd x m n = cd x m (n-m)";
  13.345  by (cut_facts_tac prems 1);
  13.346 -br iffI 1;
  13.347 -bd conjE 1;
  13.348 -ba 2;
  13.349 -br conjI 1;
  13.350 -br divides_diff 2;
  13.351 -bd conjE 5;
  13.352 -ba 6;
  13.353 -br conjI 5;
  13.354 -bd less_not_sym 6;
  13.355 -bd add_diff_inverse 6;
  13.356 +by (rtac iffI 1);
  13.357 +by (dtac conjE 1);
  13.358 +by (assume_tac 2);
  13.359 +by (rtac conjI 1);
  13.360 +by (rtac divides_diff 2);
  13.361 +by (dtac conjE 5);
  13.362 +by (assume_tac 6);
  13.363 +by (rtac conjI 5);
  13.364 +by (dtac less_not_sym 6);
  13.365 +by (dtac add_diff_inverse 6);
  13.366  by (dres_inst_tac [("n","n-m")] divides_sum 6);
  13.367  by (ALLGOALS Asm_full_simp_tac);
  13.368  qed "cd_diff_r";
  13.369 @@ -342,15 +342,15 @@
  13.370  
  13.371  val prems = goalw thy [gcd_def] "0<n ==> n = gcd n n";
  13.372  by (cut_facts_tac prems 1);
  13.373 -bd cd_nnn 1;
  13.374 -br (select_equality RS sym) 1;
  13.375 -be conjI 1;
  13.376 -br allI 1;
  13.377 -br impI 1;
  13.378 -bd cd_le 1;
  13.379 -bd conjE 2;
  13.380 -ba 3;
  13.381 -br le_anti_sym 2;
  13.382 +by (dtac cd_nnn 1);
  13.383 +by (rtac (select_equality RS sym) 1);
  13.384 +by (etac conjI 1);
  13.385 +by (rtac allI 1);
  13.386 +by (rtac impI 1);
  13.387 +by (dtac cd_le 1);
  13.388 +by (dtac conjE 2);
  13.389 +by (assume_tac 3);
  13.390 +by (rtac le_anti_sym 2);
  13.391  by (dres_inst_tac [("x","x")] cd_le 2);
  13.392  by (dres_inst_tac [("x","n")] spec 3);
  13.393  by (ALLGOALS Asm_full_simp_tac);
  13.394 @@ -364,16 +364,16 @@
  13.395  by (cut_facts_tac prems 1);
  13.396  by (subgoal_tac "n<m ==> !x.cd x m n = cd x (m-n) n" 1);
  13.397  by (Asm_simp_tac 1);
  13.398 -br allI 1;
  13.399 -be cd_diff_l 1;
  13.400 +by (rtac allI 1);
  13.401 +by (etac cd_diff_l 1);
  13.402  qed "gcd_diff_l";
  13.403  
  13.404  val prems=goalw thy [gcd_def] "m<n ==> gcd m n = gcd m (n-m)";
  13.405  by (cut_facts_tac prems 1);
  13.406  by (subgoal_tac "m<n ==> !x.cd x m n = cd x m (n-m)" 1);
  13.407  by (Asm_simp_tac 1);
  13.408 -br allI 1;
  13.409 -be cd_diff_r 1;
  13.410 +by (rtac allI 1);
  13.411 +by (etac cd_diff_r 1);
  13.412  qed "gcd_diff_r";
  13.413  
  13.414  
  13.415 @@ -392,7 +392,7 @@
  13.416  by (nat_ind_tac "k" 1);
  13.417  by (ALLGOALS Asm_simp_tac);
  13.418  by (fold_goals_tac [pow_def]);
  13.419 -br (pow_add_reduce RS sym) 1;
  13.420 +by (rtac (pow_add_reduce RS sym) 1);
  13.421  qed "pow_pow_reduce";
  13.422  
  13.423  (*** fac ***)
    14.1 --- a/src/HOL/Hoare/Examples.ML	Tue Jan 30 15:19:20 1996 +0100
    14.2 +++ b/src/HOL/Hoare/Examples.ML	Tue Jan 30 15:24:36 1996 +0100
    14.3 @@ -1,6 +1,6 @@
    14.4 -(*  Title: 	HOL/Hoare/Examples.thy
    14.5 +(*  Title:      HOL/Hoare/Examples.thy
    14.6      ID:         $Id$
    14.7 -    Author: 	Norbert Galm
    14.8 +    Author:     Norbert Galm
    14.9      Copyright   1995 TUM
   14.10  
   14.11  Various arithmetic examples.
   14.12 @@ -38,15 +38,15 @@
   14.13  
   14.14  by (safe_tac HOL_cs);
   14.15  
   14.16 -be less_imp_diff_positive 1;
   14.17 -be gcd_diff_r 1;
   14.18 +by (etac less_imp_diff_positive 1);
   14.19 +by (etac gcd_diff_r 1);
   14.20  
   14.21  by (cut_facts_tac [less_linear] 1);
   14.22  by (cut_facts_tac [less_linear] 2);
   14.23 -br less_imp_diff_positive 1;
   14.24 -br gcd_diff_l 2;
   14.25 +by (rtac less_imp_diff_positive 1);
   14.26 +by (rtac gcd_diff_l 2);
   14.27  
   14.28 -bd gcd_nnn 3;
   14.29 +by (dtac gcd_nnn 3);
   14.30  
   14.31  by (ALLGOALS (fast_tac HOL_cs));
   14.32  
   14.33 @@ -78,7 +78,7 @@
   14.34  
   14.35  by (subgoal_tac "a*a=a pow 2" 1);
   14.36  by (Asm_simp_tac 1);
   14.37 -br (pow_pow_reduce RS ssubst) 1;
   14.38 +by (rtac (pow_pow_reduce RS ssubst) 1);
   14.39  
   14.40  by (subgoal_tac "(b div 2)*2=b" 1);
   14.41  by (subgoal_tac "0<2" 2);
   14.42 @@ -89,10 +89,10 @@
   14.43  by (subgoal_tac "b~=0" 1);
   14.44  by (res_inst_tac [("n","b")] natE 1);
   14.45  by (res_inst_tac [("Q","b mod 2 ~= 0")] not_imp_swap 3);
   14.46 -ba 4;
   14.47 +by (assume_tac 4);
   14.48  
   14.49  by (ALLGOALS (asm_full_simp_tac ((simpset_of "Arith") addsimps [pow_0,pow_Suc,mult_assoc])));
   14.50 -br mod_less 1;
   14.51 +by (rtac mod_less 1);
   14.52  by (Simp_tac 1);
   14.53  
   14.54  qed "power_by_mult";
    15.1 --- a/src/HOL/Hoare/Hoare.ML	Tue Jan 30 15:19:20 1996 +0100
    15.2 +++ b/src/HOL/Hoare/Hoare.ML	Tue Jan 30 15:24:36 1996 +0100
    15.3 @@ -1,6 +1,6 @@
    15.4 -(*  Title: 	HOL/Hoare/Hoare.ML
    15.5 +(*  Title:      HOL/Hoare/Hoare.ML
    15.6      ID:         $Id$
    15.7 -    Author: 	Norbert Galm & Tobias Nipkow
    15.8 +    Author:     Norbert Galm & Tobias Nipkow
    15.9      Copyright   1995 TUM
   15.10  
   15.11  The verification condition generation tactics.
   15.12 @@ -29,14 +29,14 @@
   15.13    (fn [prem1,prem2,prem3] =>
   15.14       [REPEAT (rtac allI 1),
   15.15        REPEAT (rtac impI 1),
   15.16 -      dresolve_tac [prem1] 1,
   15.17 +      dtac prem1 1,
   15.18        cut_facts_tac [prem2,prem3] 1,
   15.19        fast_tac (HOL_cs addIs [prem1]) 1]);
   15.20  
   15.21  val strenthen_pre = prove_goalw thy [SpecDef]
   15.22    "[| !!s. p s ==> p' s; Spec p' c q |] ==> Spec p c q"
   15.23    (fn [prem1,prem2] =>[cut_facts_tac [prem2] 1,
   15.24 -		       fast_tac (HOL_cs addIs [prem1]) 1]);
   15.25 +                       fast_tac (HOL_cs addIs [prem1]) 1]);
   15.26  
   15.27  val [iter_0,iter_Suc] = nat_recs IterDef;
   15.28  
   15.29 @@ -70,31 +70,31 @@
   15.30  (* rename_abs:term (von:string,nach:string,trm:term) benennt in trm alle Lambda-Abstraktionen
   15.31     mit Namen von in nach um *)
   15.32  
   15.33 -fun rename_abs (von,nach,Abs (s,t,trm))	=if von=s
   15.34 -						then Abs (nach,t,rename_abs (von,nach,trm))
   15.35 -						else Abs (s,t,rename_abs (von,nach,trm))
   15.36 -  | rename_abs (von,nach,trm1 $ trm2)	=rename_abs (von,nach,trm1) $ rename_abs (von,nach,trm2)
   15.37 -  | rename_abs (_,_,trm)		=trm;
   15.38 +fun rename_abs (von,nach,Abs (s,t,trm)) =if von=s
   15.39 +                                                then Abs (nach,t,rename_abs (von,nach,trm))
   15.40 +                                                else Abs (s,t,rename_abs (von,nach,trm))
   15.41 +  | rename_abs (von,nach,trm1 $ trm2)   =rename_abs (von,nach,trm1) $ rename_abs (von,nach,trm2)
   15.42 +  | rename_abs (_,_,trm)                =trm;
   15.43  
   15.44  (* ren_abs_thm:thm (von:string,nach:string,theorem:thm) benennt in theorem alle Lambda-Abstraktionen
   15.45     mit Namen von in nach um. Vorgehen:
   15.46 -	- Term t zu thoerem bestimmen
   15.47 -	- Term t' zu t durch Umbenennen der Namen generieren
   15.48 -	- Certified Term ct' zu t' erstellen
   15.49 -	- Thoerem ct'==ct' anlegen
   15.50 -	- Nach der Regel "[|P==Q; P|] ==> Q" wird aus "ct'==ct'" und theorem das Theorem zu ct'
   15.51 -	  abgeleitet (ist moeglich, da t' mit t unifiziert werden kann, da nur Umnbenennungen) *)
   15.52 +        - Term t zu thoerem bestimmen
   15.53 +        - Term t' zu t durch Umbenennen der Namen generieren
   15.54 +        - Certified Term ct' zu t' erstellen
   15.55 +        - Thoerem ct'==ct' anlegen
   15.56 +        - Nach der Regel "[|P==Q; P|] ==> Q" wird aus "ct'==ct'" und theorem das Theorem zu ct'
   15.57 +          abgeleitet (ist moeglich, da t' mit t unifiziert werden kann, da nur Umnbenennungen) *)
   15.58  
   15.59 -fun ren_abs_thm (von,nach,theorem)	=
   15.60 -	equal_elim
   15.61 -		(
   15.62 -			reflexive (
   15.63 -				cterm_of
   15.64 -					(#sign (rep_thm theorem))
   15.65 -					(rename_abs (von,nach,#prop (rep_thm theorem)))
   15.66 -			)
   15.67 -		)
   15.68 -		theorem;
   15.69 +fun ren_abs_thm (von,nach,theorem)      =
   15.70 +        equal_elim
   15.71 +                (
   15.72 +                        reflexive (
   15.73 +                                cterm_of
   15.74 +                                        (#sign (rep_thm theorem))
   15.75 +                                        (rename_abs (von,nach,#prop (rep_thm theorem)))
   15.76 +                        )
   15.77 +                )
   15.78 +                theorem;
   15.79  
   15.80  
   15.81  (**************************************************************************************************)
   15.82 @@ -107,15 +107,15 @@
   15.83  (* - rens:(string*string) list, d.h. es koennen verschiedene Lambda-Abstraktionen umbenannt werden
   15.84     - insts:(cterm*cterm) list, d.h. es koennen verschiedene Variablen instanziiert werden *)
   15.85  
   15.86 -fun comp_inst_ren_tac rens insts theorem i	=
   15.87 -	let
   15.88 -		fun compose_inst_ren_tac [] insts theorem i			=
   15.89 -			compose_tac (false,cterm_instantiate insts theorem,nprems_of theorem) i
   15.90 -		  | compose_inst_ren_tac ((von,nach)::rl) insts theorem i	=
   15.91 -			compose_inst_ren_tac rl insts (ren_abs_thm (von,nach,theorem)) i
   15.92 -	in
   15.93 -		compose_inst_ren_tac rens insts theorem i
   15.94 -	end;
   15.95 +fun comp_inst_ren_tac rens insts theorem i      =
   15.96 +        let
   15.97 +                fun compose_inst_ren_tac [] insts theorem i                     =
   15.98 +                        compose_tac (false,cterm_instantiate insts theorem,nprems_of theorem) i
   15.99 +                  | compose_inst_ren_tac ((von,nach)::rl) insts theorem i       =
  15.100 +                        compose_inst_ren_tac rl insts (ren_abs_thm (von,nach,theorem)) i
  15.101 +        in
  15.102 +                compose_inst_ren_tac rens insts theorem i
  15.103 +        end;
  15.104  
  15.105  
  15.106  (**************************************************************************************************)
  15.107 @@ -125,100 +125,100 @@
  15.108  
  15.109  (* pvars_of_term:term list (name:string,trm:term) gibt die Liste aller Programm-Variablen
  15.110     aus trm zurueck. name gibt dabei den Namen der Zustandsvariablen an.
  15.111 -	Bsp.: bei name="s" und dem Term "s(Suc(Suc(0)))=s(0)" (entspricht "c=a")
  15.112 -	      wird [0,Suc(Suc(0))] geliefert (Liste ist i.A. unsortiert) *)
  15.113 +        Bsp.: bei name="s" und dem Term "s(Suc(Suc(0)))=s(0)" (entspricht "c=a")
  15.114 +              wird [0,Suc(Suc(0))] geliefert (Liste ist i.A. unsortiert) *)
  15.115  
  15.116 -fun pvars_of_term (name,trm)	=
  15.117 -	let
  15.118 -		fun add_vars (name,Free (s,t) $ trm,vl)	=if name=s
  15.119 -								then if trm mem vl
  15.120 -									then vl
  15.121 -									else trm::vl
  15.122 -								else add_vars (name,trm,vl)
  15.123 -		  | add_vars (name,Abs (s,t,trm),vl)	=add_vars (name,trm,vl)
  15.124 -		  | add_vars (name,trm1 $ trm2,vl)	=add_vars (name,trm2,add_vars (name,trm1,vl))
  15.125 -		  | add_vars (_,_,vl)			=vl
  15.126 -	in
  15.127 -		add_vars (name,trm,[])
  15.128 -	end;
  15.129 +fun pvars_of_term (name,trm)    =
  15.130 +        let
  15.131 +                fun add_vars (name,Free (s,t) $ trm,vl) =if name=s
  15.132 +                                                                then if trm mem vl
  15.133 +                                                                        then vl
  15.134 +                                                                        else trm::vl
  15.135 +                                                                else add_vars (name,trm,vl)
  15.136 +                  | add_vars (name,Abs (s,t,trm),vl)    =add_vars (name,trm,vl)
  15.137 +                  | add_vars (name,trm1 $ trm2,vl)      =add_vars (name,trm2,add_vars (name,trm1,vl))
  15.138 +                  | add_vars (_,_,vl)                   =vl
  15.139 +        in
  15.140 +                add_vars (name,trm,[])
  15.141 +        end;
  15.142  
  15.143  (* VarsElimTac: Taktik zum Eliminieren von bestimmten Programmvariablen aus dem Subgoal i
  15.144 -   - v::vl:(term) list	Liste der zu eliminierenden Programmvariablen
  15.145 -   - meta_spec:thm	Theorem, welches zur Entfernung der Variablen benutzt wird
  15.146 -			z.B.: "(!!s x.PROP P(s,x)) ==> (!!s.PROP P(s,x(s)))"
  15.147 -   - namexAll:string	Name von    ^                                  (hier "x")
  15.148 -   - varx:term		Term zu                                      ^ (hier Var(("x",0),...))
  15.149 -   - varP:term		Term zu                                  ^     (hier Var(("P",0),...))
  15.150 -   - type_pvar:typ	Typ der Programmvariablen (d.h. 'a bei 'a prog, z.B.: nat, bool, ...)
  15.151 +   - v::vl:(term) list  Liste der zu eliminierenden Programmvariablen
  15.152 +   - meta_spec:thm      Theorem, welches zur Entfernung der Variablen benutzt wird
  15.153 +                        z.B.: "(!!s x.PROP P(s,x)) ==> (!!s.PROP P(s,x(s)))"
  15.154 +   - namexAll:string    Name von    ^                                  (hier "x")
  15.155 +   - varx:term          Term zu                                      ^ (hier Var(("x",0),...))
  15.156 +   - varP:term          Term zu                                  ^     (hier Var(("P",0),...))
  15.157 +   - type_pvar:typ      Typ der Programmvariablen (d.h. 'a bei 'a prog, z.B.: nat, bool, ...)
  15.158  
  15.159     Vorgehen:
  15.160 -	- eliminiere jede pvar durch Anwendung von comp_inst_ren_tac. Dazu:
  15.161 -	- Unbenennung in meta_spec: namexAll wird in den Namen der Prog.-Var. umbenannt
  15.162 -	  z.B.: fuer die Prog.-Var. mit Namen "a" ergibt sich
  15.163 -		meta_spec zu "(!! s a.PROP P(s,a)) ==> (!! s.PROP P(s,x(s)))"
  15.164 -	- Instanziierungen in meta_spec:
  15.165 -		varx wird mit "%s:(type_pvar) state.s(pvar)" instanziiert
  15.166 -		varP wird entsprechend instanziiert. Beispiel fuer Prog.-Var. "a":
  15.167 -		 -	zu Subgoal "!!s.s(Suc(0)) = s(0) ==> s(0) = 1" bestimme Term ohne "!!s.":
  15.168 -			trm0 = "s(Suc(0)) = s(0) ==> s(0) = 1" (s ist hier freie Variable)
  15.169 -		 -	substituiere alle Vorkommen von s(pvar) durch eine freie Var. xs:
  15.170 -			trm1 = "s(Suc(0)) = xs ==> xs = 1"
  15.171 -		 -	abstrahiere ueber xs:
  15.172 -			trm2 = "%xs.s(Suc(0)) = xs ==> xs = 1"
  15.173 -		 -	abstrahiere ueber restliche Vorkommen von s:
  15.174 -			trm3 = "%s xs.s(Suc(0)) = xs ==> xs = 1"
  15.175 -		 -	instanziiere varP mit trm3
  15.176 +        - eliminiere jede pvar durch Anwendung von comp_inst_ren_tac. Dazu:
  15.177 +        - Unbenennung in meta_spec: namexAll wird in den Namen der Prog.-Var. umbenannt
  15.178 +          z.B.: fuer die Prog.-Var. mit Namen "a" ergibt sich
  15.179 +                meta_spec zu "(!! s a.PROP P(s,a)) ==> (!! s.PROP P(s,x(s)))"
  15.180 +        - Instanziierungen in meta_spec:
  15.181 +                varx wird mit "%s:(type_pvar) state.s(pvar)" instanziiert
  15.182 +                varP wird entsprechend instanziiert. Beispiel fuer Prog.-Var. "a":
  15.183 +                 -      zu Subgoal "!!s.s(Suc(0)) = s(0) ==> s(0) = 1" bestimme Term ohne "!!s.":
  15.184 +                        trm0 = "s(Suc(0)) = s(0) ==> s(0) = 1" (s ist hier freie Variable)
  15.185 +                 -      substituiere alle Vorkommen von s(pvar) durch eine freie Var. xs:
  15.186 +                        trm1 = "s(Suc(0)) = xs ==> xs = 1"
  15.187 +                 -      abstrahiere ueber xs:
  15.188 +                        trm2 = "%xs.s(Suc(0)) = xs ==> xs = 1"
  15.189 +                 -      abstrahiere ueber restliche Vorkommen von s:
  15.190 +                        trm3 = "%s xs.s(Suc(0)) = xs ==> xs = 1"
  15.191 +                 -      instanziiere varP mit trm3
  15.192  *)
  15.193  
  15.194 -fun VarsElimTac ([],_,_,_,_,_) i					=all_tac
  15.195 -  | VarsElimTac (v::vl,meta_spec,namexAll,varx,varP,type_pvar) i	=
  15.196 -	STATE (
  15.197 -		fn state =>
  15.198 -		comp_inst_ren_tac
  15.199 -			[(namexAll,pvar2pvarID v)]
  15.200 -			[(
  15.201 -				cterm_of (#sign (rep_thm state)) varx,
  15.202 -				cterm_of (#sign (rep_thm state)) (
  15.203 -					Abs  ("s",Type ("nat",[]) --> type_pvar,Bound 0 $ v)
  15.204 -				)
  15.205 -			),(
  15.206 -				cterm_of (#sign (rep_thm state)) varP,
  15.207 -				cterm_of (#sign (rep_thm state)) (
  15.208 -					let
  15.209 -						val (_,_,_ $ Abs (_,_,trm),_) = dest_state (state,i);
  15.210 -						val (sname,trm0) = variant_abs ("s",dummyT,trm);
  15.211 -						val xsname = variant_name ("xs",trm0);
  15.212 -						val trm1 = subst_term (Free (sname,dummyT) $ v,Syntax.free xsname,trm0)
  15.213 -						val trm2 = Abs ("xs",type_pvar,abstract_over (Syntax.free xsname,trm1))
  15.214 -					in
  15.215 -						Abs ("s",Type ("nat",[]) --> type_pvar,abstract_over (Free (sname,dummyT),trm2))
  15.216 -					end
  15.217 -				)
  15.218 -			)]
  15.219 -			meta_spec i
  15.220 -	)
  15.221 -	THEN
  15.222 -	(VarsElimTac (vl,meta_spec,namexAll,varx,varP,type_pvar) i);
  15.223 +fun VarsElimTac ([],_,_,_,_,_) i                                        =all_tac
  15.224 +  | VarsElimTac (v::vl,meta_spec,namexAll,varx,varP,type_pvar) i        =
  15.225 +        STATE (
  15.226 +                fn state =>
  15.227 +                comp_inst_ren_tac
  15.228 +                        [(namexAll,pvar2pvarID v)]
  15.229 +                        [(
  15.230 +                                cterm_of (#sign (rep_thm state)) varx,
  15.231 +                                cterm_of (#sign (rep_thm state)) (
  15.232 +                                        Abs  ("s",Type ("nat",[]) --> type_pvar,Bound 0 $ v)
  15.233 +                                )
  15.234 +                        ),(
  15.235 +                                cterm_of (#sign (rep_thm state)) varP,
  15.236 +                                cterm_of (#sign (rep_thm state)) (
  15.237 +                                        let
  15.238 +                                                val (_,_,_ $ Abs (_,_,trm),_) = dest_state (state,i);
  15.239 +                                                val (sname,trm0) = variant_abs ("s",dummyT,trm);
  15.240 +                                                val xsname = variant_name ("xs",trm0);
  15.241 +                                                val trm1 = subst_term (Free (sname,dummyT) $ v,Syntax.free xsname,trm0)
  15.242 +                                                val trm2 = Abs ("xs",type_pvar,abstract_over (Syntax.free xsname,trm1))
  15.243 +                                        in
  15.244 +                                                Abs ("s",Type ("nat",[]) --> type_pvar,abstract_over (Free (sname,dummyT),trm2))
  15.245 +                                        end
  15.246 +                                )
  15.247 +                        )]
  15.248 +                        meta_spec i
  15.249 +        )
  15.250 +        THEN
  15.251 +        (VarsElimTac (vl,meta_spec,namexAll,varx,varP,type_pvar) i);
  15.252  
  15.253  (* StateElimTac: Taktik zum Eliminieren aller Programmvariablen aus dem Subgoal i
  15.254  
  15.255     zur Erinnerung:
  15.256 -    -	das Subgoal hat vor Anwendung dieser Taktik die Form "!!s:('a) state.P(s)",
  15.257 -	d.h. den Term Const("all",_) $ Abs ("s",pvar --> 'a,_)
  15.258 +    -   das Subgoal hat vor Anwendung dieser Taktik die Form "!!s:('a) state.P(s)",
  15.259 +        d.h. den Term Const("all",_) $ Abs ("s",pvar --> 'a,_)
  15.260      -   meta_spec hat die Form "(!!s x.PROP P(s,x)) ==> (!!s.PROP P(s,x(s)))"
  15.261  *)
  15.262  
  15.263 -fun StateElimTac i	=
  15.264 -	STATE (
  15.265 -		fn state =>
  15.266 -		let
  15.267 -			val (_,_,_ $ Abs (_,Type ("fun",[_,type_pvar]),trm),_) = dest_state (state,i);
  15.268 -			val _ $ (_ $ Abs (_,_,_ $ Abs (namexAll,_,_))) $
  15.269 -			        (_ $ Abs (_,_,varP $ _ $ (varx $ _))) = #prop (rep_thm meta_spec)
  15.270 -		in
  15.271 -			VarsElimTac (pvars_of_term (variant_abs ("s",dummyT,trm)),meta_spec,namexAll,varx,varP,type_pvar) i
  15.272 -		end
  15.273 -	);
  15.274 +fun StateElimTac i      =
  15.275 +        STATE (
  15.276 +                fn state =>
  15.277 +                let
  15.278 +                        val (_,_,_ $ Abs (_,Type ("fun",[_,type_pvar]),trm),_) = dest_state (state,i);
  15.279 +                        val _ $ (_ $ Abs (_,_,_ $ Abs (namexAll,_,_))) $
  15.280 +                                (_ $ Abs (_,_,varP $ _ $ (varx $ _))) = #prop (rep_thm meta_spec)
  15.281 +                in
  15.282 +                        VarsElimTac (pvars_of_term (variant_abs ("s",dummyT,trm)),meta_spec,namexAll,varx,varP,type_pvar) i
  15.283 +                end
  15.284 +        );
  15.285  
  15.286  
  15.287  
  15.288 @@ -232,20 +232,20 @@
  15.289  fun WlpTac i = (rtac SeqRule i) THEN (HoareRuleTac (i+1) false)
  15.290  and HoareRuleTac i pre_cond =
  15.291        STATE(fn state =>
  15.292 -		((WlpTac i) THEN (HoareRuleTac i pre_cond))
  15.293 +                ((WlpTac i) THEN (HoareRuleTac i pre_cond))
  15.294                  ORELSE
  15.295 -		(FIRST[rtac SkipRule i,
  15.296 -		       rtac AssignRule i,
  15.297 -		       EVERY[rtac IfRule i,
  15.298 +                (FIRST[rtac SkipRule i,
  15.299 +                       rtac AssignRule i,
  15.300 +                       EVERY[rtac IfRule i,
  15.301                               HoareRuleTac (i+2) false,
  15.302                               HoareRuleTac (i+1) false],
  15.303 -		       EVERY[rtac WhileRule i,
  15.304 +                       EVERY[rtac WhileRule i,
  15.305                               Asm_full_simp_tac (i+2),
  15.306                               HoareRuleTac (i+1) true]]
  15.307 -		 THEN
  15.308 +                 THEN
  15.309                   (if pre_cond then (Asm_full_simp_tac i) else (atac i))
  15.310 -		)
  15.311 -	);
  15.312 +                )
  15.313 +        );
  15.314  
  15.315  val HoareTac1 =
  15.316    EVERY[HoareRuleTac 1 true, ALLGOALS StateElimTac, prune_params_tac];
    16.1 --- a/src/HOL/Hoare/ROOT.ML	Tue Jan 30 15:19:20 1996 +0100
    16.2 +++ b/src/HOL/Hoare/ROOT.ML	Tue Jan 30 15:24:36 1996 +0100
    16.3 @@ -1,10 +1,10 @@
    16.4 -(*  Title: 	HOL/IMP/ROOT.ML
    16.5 +(*  Title:      HOL/IMP/ROOT.ML
    16.6      ID:         $Id$
    16.7 -    Author: 	Tobias Nipkow
    16.8 +    Author:     Tobias Nipkow
    16.9      Copyright   1995 TUM
   16.10  *)
   16.11  
   16.12 -HOL_build_completed;	(*Make examples fail if HOL did*)
   16.13 +HOL_build_completed;    (*Make examples fail if HOL did*)
   16.14  
   16.15  use_thy "Examples";
   16.16  use_thy "List_Examples";
    17.1 --- a/src/HOL/IMP/Com.ML	Tue Jan 30 15:19:20 1996 +0100
    17.2 +++ b/src/HOL/IMP/Com.ML	Tue Jan 30 15:24:36 1996 +0100
    17.3 @@ -1,6 +1,6 @@
    17.4 -(*  Title: 	HOL/IMP/Com.ML
    17.5 +(*  Title:      HOL/IMP/Com.ML
    17.6      ID:         $Id$
    17.7 -    Author: 	Heiko Loetzbeyer & Robert Sandner, TUM
    17.8 +    Author:     Heiko Loetzbeyer & Robert Sandner, TUM
    17.9      Copyright   1994 TUM
   17.10  *)
   17.11  
    18.1 --- a/src/HOL/IMP/Denotation.ML	Tue Jan 30 15:19:20 1996 +0100
    18.2 +++ b/src/HOL/IMP/Denotation.ML	Tue Jan 30 15:24:36 1996 +0100
    18.3 @@ -1,6 +1,6 @@
    18.4 -(*  Title: 	HOL/IMP/Denotation.ML
    18.5 +(*  Title:      HOL/IMP/Denotation.ML
    18.6      ID:         $Id$
    18.7 -    Author: 	Heiko Loetzbeyer & Robert Sandner, TUM
    18.8 +    Author:     Heiko Loetzbeyer & Robert Sandner, TUM
    18.9      Copyright   1994 TUM
   18.10  *)
   18.11  
   18.12 @@ -17,5 +17,5 @@
   18.13  (**** mono (Gamma(b,c)) ****)
   18.14  
   18.15  qed_goalw "Gamma_mono" Denotation.thy [mono_def,Gamma_def]
   18.16 -	"mono (Gamma b c)"
   18.17 +        "mono (Gamma b c)"
   18.18       (fn _ => [(best_tac comp_cs 1)]);
    19.1 --- a/src/HOL/IMP/Equiv.ML	Tue Jan 30 15:19:20 1996 +0100
    19.2 +++ b/src/HOL/IMP/Equiv.ML	Tue Jan 30 15:24:36 1996 +0100
    19.3 @@ -1,12 +1,12 @@
    19.4 -(*  Title: 	HOL/IMP/Equiv.ML
    19.5 +(*  Title:      HOL/IMP/Equiv.ML
    19.6      ID:         $Id$
    19.7 -    Author: 	Heiko Loetzbeyer & Robert Sandner, TUM
    19.8 +    Author:     Heiko Loetzbeyer & Robert Sandner, TUM
    19.9      Copyright   1994 TUM
   19.10  *)
   19.11  
   19.12  goal Equiv.thy "!n. (<a,s> -a-> n) = (n = A a s)";
   19.13 -by (aexp.induct_tac "a" 1);                		  (* struct. ind. *)
   19.14 -by (ALLGOALS Simp_tac); 	                          (* rewr. Den.   *)
   19.15 +by (aexp.induct_tac "a" 1);                               (* struct. ind. *)
   19.16 +by (ALLGOALS Simp_tac);                                   (* rewr. Den.   *)
   19.17  by (TRYALL (fast_tac (set_cs addSIs (evala.intrs@prems)
   19.18                               addSEs evala_elim_cases)));
   19.19  bind_thm("aexp_iff", result() RS spec);
   19.20 @@ -23,7 +23,7 @@
   19.21  goal Equiv.thy "!!c. <c,s> -c-> t ==> (s,t) : C(c)";
   19.22  
   19.23  (* start with rule induction *)
   19.24 -be (evalc.mutual_induct RS spec RS spec RS spec RSN (2,rev_mp)) 1;
   19.25 +by (etac (evalc.mutual_induct RS spec RS spec RS spec RSN (2,rev_mp)) 1);
   19.26  by (rewrite_tac (Gamma_def::C_simps));
   19.27    (* simplification with HOL_ss again too agressive *)
   19.28  (* skip *)
   19.29 @@ -52,7 +52,7 @@
   19.30  (* while *)
   19.31  by (strip_tac 1);
   19.32  by (etac (Gamma_mono RSN (2,induct)) 1);
   19.33 -by (rewrite_goals_tac [Gamma_def]);  
   19.34 +by (rewtac Gamma_def);  
   19.35  by (fast_tac equiv_cs 1);
   19.36  
   19.37  bind_thm("com2", result() RS spec RS spec RS mp);
    20.1 --- a/src/HOL/IMP/Hoare.ML	Tue Jan 30 15:19:20 1996 +0100
    20.2 +++ b/src/HOL/IMP/Hoare.ML	Tue Jan 30 15:24:36 1996 +0100
    20.3 @@ -1,6 +1,6 @@
    20.4 -(*  Title: 	HOL/IMP/Hoare.ML
    20.5 +(*  Title:      HOL/IMP/Hoare.ML
    20.6      ID:         $Id$
    20.7 -    Author: 	Tobias Nipkow
    20.8 +    Author:     Tobias Nipkow
    20.9      Copyright   1995 TUM
   20.10  
   20.11  Soundness of Hoare rules wrt denotational semantics
   20.12 @@ -9,16 +9,16 @@
   20.13  open Hoare;
   20.14  
   20.15  goalw Hoare.thy [spec_def] "!P c Q. ({{P}}c{{Q}}) --> spec P c Q";
   20.16 -br hoare.mutual_induct 1;
   20.17 +by (rtac hoare.mutual_induct 1);
   20.18      by(ALLGOALS Asm_simp_tac);
   20.19    by(fast_tac rel_cs 1);
   20.20   by(fast_tac HOL_cs 1);
   20.21 -br allI 1;
   20.22 -br allI 1;
   20.23 -br impI 1;
   20.24 -be induct2 1;
   20.25 +by (rtac allI 1);
   20.26 +by (rtac allI 1);
   20.27 +by (rtac impI 1);
   20.28 +by (etac induct2 1);
   20.29   br Gamma_mono 1;
   20.30 -by (rewrite_goals_tac [Gamma_def]);  
   20.31 +by (rewtac Gamma_def);  
   20.32  by(eres_inst_tac [("x","a")] allE 1);
   20.33  by (safe_tac comp_cs);
   20.34    by(ALLGOALS Asm_full_simp_tac);
    21.1 --- a/src/HOL/IMP/Properties.ML	Tue Jan 30 15:19:20 1996 +0100
    21.2 +++ b/src/HOL/IMP/Properties.ML	Tue Jan 30 15:24:36 1996 +0100
    21.3 @@ -1,6 +1,6 @@
    21.4 -(*  Title: 	HOL/IMP/Properties.ML
    21.5 +(*  Title:      HOL/IMP/Properties.ML
    21.6      ID:         $Id$
    21.7 -    Author: 	Tobias Nipkow, TUM
    21.8 +    Author:     Tobias Nipkow, TUM
    21.9      Copyright   1994 TUM
   21.10  
   21.11  IMP is deterministic.
   21.12 @@ -27,7 +27,7 @@
   21.13  (* evaluation of com is deterministic *)
   21.14  goal Com.thy "!!c. <c,s> -c-> t ==> !u. <c,s> -c-> u --> u=t";
   21.15  (* start with rule induction *)
   21.16 -be (evalc.mutual_induct RS spec RS spec RS spec RSN (2,rev_mp)) 1;
   21.17 +by (etac (evalc.mutual_induct RS spec RS spec RS spec RSN (2,rev_mp)) 1);
   21.18  by(fast_tac (set_cs addSEs evalc_elim_cases) 1);
   21.19  by(fast_tac (set_cs addSEs evalc_elim_cases addDs [aexp_detD]) 1);
   21.20  by(fast_tac (set_cs addSEs evalc_elim_cases) 1);
    22.1 --- a/src/HOL/IMP/ROOT.ML	Tue Jan 30 15:19:20 1996 +0100
    22.2 +++ b/src/HOL/IMP/ROOT.ML	Tue Jan 30 15:24:36 1996 +0100
    22.3 @@ -1,10 +1,10 @@
    22.4 -(*  Title: 	HOL/IMP/ROOT.ML
    22.5 +(*  Title:      HOL/IMP/ROOT.ML
    22.6      ID:         $Id$
    22.7 -    Author: 	Heiko Loetzbeyer, Robert Sandner, Tobias Nipkow
    22.8 +    Author:     Heiko Loetzbeyer, Robert Sandner, Tobias Nipkow
    22.9      Copyright   1995 TUM
   22.10  *)
   22.11  
   22.12 -HOL_build_completed;	(*Make examples fail if HOL did*)
   22.13 +HOL_build_completed;    (*Make examples fail if HOL did*)
   22.14  
   22.15  writeln"Root file for HOL/IMP";
   22.16  proof_timing := true;
    23.1 --- a/src/HOL/IMP/VC.ML	Tue Jan 30 15:19:20 1996 +0100
    23.2 +++ b/src/HOL/IMP/VC.ML	Tue Jan 30 15:24:36 1996 +0100
    23.3 @@ -1,6 +1,6 @@
    23.4 -(*  Title: 	HOL/IMP/VC.ML
    23.5 +(*  Title:      HOL/IMP/VC.ML
    23.6      ID:         $Id$
    23.7 -    Author: 	Tobias Nipkow
    23.8 +    Author:     Tobias Nipkow
    23.9      Copyright   1996 TUM
   23.10  
   23.11  Soundness and completeness of vc
   23.12 @@ -30,7 +30,7 @@
   23.13   by(fast_tac HOL_cs 1);
   23.14  (* while *)
   23.15  by(safe_tac HOL_cs);
   23.16 -brs hoare.intrs 1;
   23.17 +by (resolve_tac hoare.intrs 1);
   23.18    br lemma 1;
   23.19   brs hoare.intrs 1;
   23.20   brs hoare.intrs 1;
   23.21 @@ -57,7 +57,7 @@
   23.22  goal VC.thy
   23.23    "!P c Q. ({{P}}c{{Q}}) --> \
   23.24  \          (? ac. astrip ac = c & (!s. P s --> wp ac Q s) & (!s. vc ac Q s))";
   23.25 -br hoare.mutual_induct 1;
   23.26 +by (rtac hoare.mutual_induct 1);
   23.27       by(res_inst_tac [("x","Askip")] exI 1);
   23.28       by(Simp_tac 1);
   23.29      by(res_inst_tac [("x","Aass x a")] exI 1);
    24.1 --- a/src/HOL/IOA/ABP/Check.ML	Tue Jan 30 15:19:20 1996 +0100
    24.2 +++ b/src/HOL/IOA/ABP/Check.ML	Tue Jan 30 15:24:36 1996 +0100
    24.3 @@ -167,4 +167,4 @@
    24.4  
    24.5  fun nexts s A = [(s+1) mod 5];
    24.6  
    24.7 -*)
    24.8 \ No newline at end of file
    24.9 +*)
    25.1 --- a/src/HOL/IOA/ABP/Correctness.ML	Tue Jan 30 15:19:20 1996 +0100
    25.2 +++ b/src/HOL/IOA/ABP/Correctness.ML	Tue Jan 30 15:24:36 1996 +0100
    25.3 @@ -184,7 +184,7 @@
    25.4  by (rtac conjI 1);
    25.5  (* --------------  start states ----------------- *)
    25.6  by (Simp_tac 1);
    25.7 -br ballI 1;
    25.8 +by (rtac ballI 1);
    25.9  by (Asm_full_simp_tac 1);
   25.10  (* ---------------- main-part ------------------- *)
   25.11  by (REPEAT (rtac allI 1));
   25.12 @@ -229,7 +229,7 @@
   25.13  by (simp_tac (!simpset addsimps [Solve.is_weak_pmap_def]) 1);
   25.14  by (rtac conjI 1);
   25.15  (* start states *)
   25.16 -br ballI 1;
   25.17 +by (rtac ballI 1);
   25.18  by (Simp_tac 1);
   25.19  (* main-part *)
   25.20  by (REPEAT (rtac allI 1));
   25.21 @@ -245,7 +245,7 @@
   25.22  by (simp_tac (!simpset addsimps [Solve.is_weak_pmap_def]) 1);
   25.23  by (rtac conjI 1);
   25.24   (* start states *)
   25.25 -br ballI 1;
   25.26 +by (rtac ballI 1);
   25.27  by (Simp_tac 1);
   25.28  (* main-part *)
   25.29  by (REPEAT (rtac allI 1));
   25.30 @@ -260,7 +260,7 @@
   25.31  by (simp_tac (!simpset addsimps [Solve.is_weak_pmap_def]) 1);
   25.32  by (rtac conjI 1);
   25.33  (* start states *)
   25.34 -br ballI 1;
   25.35 +by (rtac ballI 1);
   25.36  by (Simp_tac 1);
   25.37  (* main-part *)
   25.38  by (REPEAT (rtac allI 1));
    26.1 --- a/src/HOL/IOA/ABP/Lemmas.ML	Tue Jan 30 15:19:20 1996 +0100
    26.2 +++ b/src/HOL/IOA/ABP/Lemmas.ML	Tue Jan 30 15:24:36 1996 +0100
    26.3 @@ -54,4 +54,4 @@
    26.4   by (List.list.induct_tac "l" 1);
    26.5   by (simp_tac list_ss 1);
    26.6   by (fast_tac HOL_cs 1);
    26.7 -qed"cons_not_nil";
    26.8 \ No newline at end of file
    26.9 +qed"cons_not_nil";
    27.1 --- a/src/HOL/IOA/NTP/Correctness.ML	Tue Jan 30 15:19:20 1996 +0100
    27.2 +++ b/src/HOL/IOA/NTP/Correctness.ML	Tue Jan 30 15:24:36 1996 +0100
    27.3 @@ -70,13 +70,13 @@
    27.4  by(simp_tac (!simpset addsimps 
    27.5      [Correctness.hom_def,
    27.6       cancel_restrict,externals_lemma]) 1);
    27.7 -br conjI 1;
    27.8 +by (rtac conjI 1);
    27.9  by(simp_tac ss' 1);
   27.10 -br ballI 1;
   27.11 -bd CollectD 1;
   27.12 +by (rtac ballI 1);
   27.13 +by (dtac CollectD 1);
   27.14  by(asm_simp_tac (!simpset addsimps sels) 1);
   27.15  by(REPEAT(rtac allI 1));
   27.16 -br imp_conj_lemma 1;   (* from lemmas.ML *)
   27.17 +by (rtac imp_conj_lemma 1);   (* from lemmas.ML *)
   27.18  
   27.19  by(Action.action.induct_tac "a"  1);
   27.20  by(asm_simp_tac (ss' setloop (split_tac [expand_if])) 1);
   27.21 @@ -94,13 +94,13 @@
   27.22  by(asm_simp_tac ss' 1);
   27.23  by(forward_tac [inv4] 1);
   27.24  by(forward_tac [inv2] 1);
   27.25 -be disjE 1;
   27.26 +by (etac disjE 1);
   27.27  by(Asm_simp_tac 1);
   27.28  by(asm_full_simp_tac (!simpset addsimps [imp_ex_equiv,neq_Nil_conv,ex_all_equiv]) 1);
   27.29  
   27.30  by(asm_simp_tac ss' 1);
   27.31  by(forward_tac [inv2] 1);
   27.32 -be disjE 1;
   27.33 +by (etac disjE 1);
   27.34  
   27.35  by(forward_tac [inv3] 1);
   27.36  by(case_tac "sq(sen(s))=[]" 1);
    28.1 --- a/src/HOL/IOA/NTP/Impl.ML	Tue Jan 30 15:19:20 1996 +0100
    28.2 +++ b/src/HOL/IOA/NTP/Impl.ML	Tue Jan 30 15:24:36 1996 +0100
    28.3 @@ -71,7 +71,7 @@
    28.4  (* INVARIANT 1 *)
    28.5  
    28.6  goalw Impl.thy impl_ioas "invariant impl_ioa inv1";
    28.7 -br invariantI 1;
    28.8 +by (rtac invariantI 1);
    28.9  by(asm_full_simp_tac (!simpset
   28.10     addsimps [inv1_def, hdr_sum_def, Sender.srcvd_def,
   28.11               Sender.ssent_def, Receiver.rsent_def,Receiver.rrcvd_def]) 1);
   28.12 @@ -84,7 +84,7 @@
   28.13  
   28.14  (* First half *)
   28.15  by(asm_full_simp_tac (!simpset addsimps [Impl.inv1_def]) 1);
   28.16 -br Action.action.induct 1;
   28.17 +by (rtac Action.action.induct 1);
   28.18  
   28.19  by (EVERY1[tac, tac, tac, tac]);
   28.20  by (tac 1);
   28.21 @@ -101,7 +101,7 @@
   28.22  
   28.23  (* Now the other half *)
   28.24  by(asm_full_simp_tac (!simpset addsimps [Impl.inv1_def]) 1);
   28.25 -br Action.action.induct 1;
   28.26 +by (rtac Action.action.induct 1);
   28.27  by(EVERY1[tac, tac]);
   28.28  
   28.29  (* detour 1 *)
   28.30 @@ -132,7 +132,7 @@
   28.31  by (rtac (pred_suc RS mp RS sym RS iffD2) 1);
   28.32  by (dtac less_le_trans 1);
   28.33  by (cut_facts_tac [rewrite_rule[Packet.hdr_def]
   28.34 -		   eq_packet_imp_eq_hdr RS countm_props] 1);;
   28.35 +                   eq_packet_imp_eq_hdr RS countm_props] 1);;
   28.36  by (assume_tac 1);
   28.37  by (assume_tac 1);
   28.38  
    29.1 --- a/src/HOL/IOA/NTP/Lemmas.ML	Tue Jan 30 15:19:20 1996 +0100
    29.2 +++ b/src/HOL/IOA/NTP/Lemmas.ML	Tue Jan 30 15:24:36 1996 +0100
    29.3 @@ -211,5 +211,4 @@
    29.4  qed "not_hd_append";
    29.5  
    29.6  
    29.7 -
    29.8 -Addsimps ([append_cons,not_hd_append,Suc_pred_lemma] @ set_lemmas);
    29.9 \ No newline at end of file
   29.10 +Addsimps ([append_cons,not_hd_append,Suc_pred_lemma] @ set_lemmas);
    30.1 --- a/src/HOL/IOA/NTP/Multiset.ML	Tue Jan 30 15:19:20 1996 +0100
    30.2 +++ b/src/HOL/IOA/NTP/Multiset.ML	Tue Jan 30 15:24:36 1996 +0100
    30.3 @@ -84,4 +84,4 @@
    30.4  
    30.5  Addsimps [count_addm_simp, count_delm_simp,
    30.6            Multiset.countm_empty_def, Multiset.delm_empty_def,
    30.7 -          count_empty];
    30.8 \ No newline at end of file
    30.9 +          count_empty];
    31.1 --- a/src/HOL/IOA/meta_theory/Asig.ML	Tue Jan 30 15:19:20 1996 +0100
    31.2 +++ b/src/HOL/IOA/meta_theory/Asig.ML	Tue Jan 30 15:24:36 1996 +0100
    31.3 @@ -16,4 +16,4 @@
    31.4  
    31.5  goal Asig.thy "!!a.[|a:externals(S)|] ==> a:actions(S)";
    31.6  by (asm_full_simp_tac (!simpset addsimps [externals_def,actions_def]) 1);
    31.7 -qed"ext_is_act";
    31.8 \ No newline at end of file
    31.9 +qed"ext_is_act";
    32.1 --- a/src/HOL/Inductive.ML	Tue Jan 30 15:19:20 1996 +0100
    32.2 +++ b/src/HOL/Inductive.ML	Tue Jan 30 15:24:36 1996 +0100
    32.3 @@ -1,6 +1,6 @@
    32.4 -(*  Title: 	HOL/inductive.ML
    32.5 +(*  Title:      HOL/inductive.ML
    32.6      ID:         $Id$
    32.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    32.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    32.9      Copyright   1993  University of Cambridge
   32.10  
   32.11  (Co)Inductive Definitions for HOL
   32.12 @@ -18,16 +18,16 @@
   32.13  
   32.14  structure Lfp_items =
   32.15    struct
   32.16 -  val oper	= gen_fp_oper "lfp"
   32.17 -  val Tarski	= def_lfp_Tarski
   32.18 -  val induct	= def_induct
   32.19 +  val oper      = gen_fp_oper "lfp"
   32.20 +  val Tarski    = def_lfp_Tarski
   32.21 +  val induct    = def_induct
   32.22    end;
   32.23  
   32.24  structure Gfp_items =
   32.25    struct
   32.26 -  val oper	= gen_fp_oper "gfp"
   32.27 -  val Tarski	= def_gfp_Tarski
   32.28 -  val induct	= def_Collect_coinduct
   32.29 +  val oper      = gen_fp_oper "gfp"
   32.30 +  val Tarski    = def_gfp_Tarski
   32.31 +  val induct    = def_Collect_coinduct
   32.32    end;
   32.33  
   32.34  
   32.35 @@ -35,18 +35,18 @@
   32.36    : sig include INTR_ELIM INDRULE end =
   32.37  let
   32.38    structure Intr_elim = Intr_elim_Fun(structure Inductive=Inductive and 
   32.39 -					  Fp=Lfp_items);
   32.40 +                                          Fp=Lfp_items);
   32.41  
   32.42    structure Indrule = Indrule_Fun
   32.43        (structure Inductive=Inductive and Intr_elim=Intr_elim);
   32.44  in 
   32.45     struct 
   32.46 -   val thy	= Intr_elim.thy
   32.47 -   val defs	= Intr_elim.defs
   32.48 -   val mono	= Intr_elim.mono
   32.49 -   val intrs	= Intr_elim.intrs
   32.50 -   val elim	= Intr_elim.elim
   32.51 -   val mk_cases	= Intr_elim.mk_cases
   32.52 +   val thy      = Intr_elim.thy
   32.53 +   val defs     = Intr_elim.defs
   32.54 +   val mono     = Intr_elim.mono
   32.55 +   val intrs    = Intr_elim.intrs
   32.56 +   val elim     = Intr_elim.elim
   32.57 +   val mk_cases = Intr_elim.mk_cases
   32.58     open Indrule 
   32.59     end
   32.60  end;
   32.61 @@ -57,9 +57,9 @@
   32.62  
   32.63  signature INDUCTIVE_STRING =
   32.64    sig
   32.65 -  val thy_name   : string 		(*name of the new theory*)
   32.66 -  val srec_tms   : string list		(*recursion terms*)
   32.67 -  val sintrs     : string list		(*desired introduction rules*)
   32.68 +  val thy_name   : string               (*name of the new theory*)
   32.69 +  val srec_tms   : string list          (*recursion terms*)
   32.70 +  val sintrs     : string list          (*desired introduction rules*)
   32.71    end;
   32.72  
   32.73  
    33.1 --- a/src/HOL/Integ/Equiv.ML	Tue Jan 30 15:19:20 1996 +0100
    33.2 +++ b/src/HOL/Integ/Equiv.ML	Tue Jan 30 15:24:36 1996 +0100
    33.3 @@ -1,7 +1,7 @@
    33.4 -(*  Title: 	Equiv.ML
    33.5 +(*  Title:      Equiv.ML
    33.6      ID:         $Id$
    33.7 -    Authors: 	Riccardo Mattolini, Dip. Sistemi e Informatica
    33.8 -        	Lawrence C Paulson, Cambridge University Computer Laboratory
    33.9 +    Authors:    Riccardo Mattolini, Dip. Sistemi e Informatica
   33.10 +                Lawrence C Paulson, Cambridge University Computer Laboratory
   33.11      Copyright   1994 Universita' di Firenze
   33.12      Copyright   1993  University of Cambridge
   33.13  
   33.14 @@ -118,7 +118,7 @@
   33.15  qed "quotientI";
   33.16  
   33.17  val [major,minor] = goalw Equiv.thy [quotient_def]
   33.18 -    "[| X:(A/r);  !!x. [| X = r^^{x};  x:A |] ==> P |] 	\
   33.19 +    "[| X:(A/r);  !!x. [| X = r^^{x};  x:A |] ==> P |]  \
   33.20  \    ==> P";
   33.21  by (resolve_tac [major RS UN_E] 1);
   33.22  by (rtac minor 1);
   33.23 @@ -173,8 +173,8 @@
   33.24  
   33.25  (*type checking of  UN x:r``{a}. b(x) *)
   33.26  val _::_::prems = goalw Equiv.thy [quotient_def]
   33.27 -    "[| equiv A r;  congruent r b;  X: A/r;	\
   33.28 -\	!!x.  x : A ==> b(x) : B |] 	\
   33.29 +    "[| equiv A r;  congruent r b;  X: A/r;     \
   33.30 +\       !!x.  x : A ==> b(x) : B |]     \
   33.31  \    ==> (UN x:X. b(x)) : B";
   33.32  by (cut_facts_tac prems 1);
   33.33  by (safe_tac rel_cs);
   33.34 @@ -188,7 +188,7 @@
   33.35  val _::_::prems = goalw Equiv.thy [quotient_def]
   33.36      "[| equiv A r;   congruent r b;  \
   33.37  \       (UN x:X. b(x))=(UN y:Y. b(y));  X: A/r;  Y: A/r;  \
   33.38 -\       !!x y. [| x:A; y:A; b(x)=b(y) |] ==> (x,y):r |] 	\
   33.39 +\       !!x y. [| x:A; y:A; b(x)=b(y) |] ==> (x,y):r |]         \
   33.40  \    ==> X=Y";
   33.41  by (cut_facts_tac prems 1);
   33.42  by (safe_tac rel_cs);
   33.43 @@ -215,7 +215,7 @@
   33.44  by (rtac (equivA RS equiv_type RS subsetD RS SigmaE2) 1);
   33.45  by (assume_tac 1);
   33.46  by (asm_simp_tac (!simpset addsimps [equivA RS UN_equiv_class,
   33.47 -				     congruent2_implies_congruent]) 1);
   33.48 +                                     congruent2_implies_congruent]) 1);
   33.49  by (rewrite_goals_tac [congruent2_def,equiv_def,refl_def]);
   33.50  by (fast_tac rel_cs 1);
   33.51  qed "congruent2_implies_congruent_UN";
   33.52 @@ -225,28 +225,28 @@
   33.53  \    ==> (UN x1:r^^{a1}. UN x2:r^^{a2}. b x1 x2) = b a1 a2";
   33.54  by (cut_facts_tac prems 1);
   33.55  by (asm_simp_tac (!simpset addsimps [equivA RS UN_equiv_class,
   33.56 -				     congruent2_implies_congruent,
   33.57 -				     congruent2_implies_congruent_UN]) 1);
   33.58 +                                     congruent2_implies_congruent,
   33.59 +                                     congruent2_implies_congruent_UN]) 1);
   33.60  qed "UN_equiv_class2";
   33.61  
   33.62  (*type checking*)
   33.63  val prems = goalw Equiv.thy [quotient_def]
   33.64      "[| equiv A r;  congruent2 r b;  \
   33.65 -\       X1: A/r;  X2: A/r;	\
   33.66 -\	!!x1 x2.  [| x1: A; x2: A |] ==> b x1 x2 : B |]    \
   33.67 +\       X1: A/r;  X2: A/r;      \
   33.68 +\       !!x1 x2.  [| x1: A; x2: A |] ==> b x1 x2 : B |]    \
   33.69  \    ==> (UN x1:X1. UN x2:X2. b x1 x2) : B";
   33.70  by (cut_facts_tac prems 1);
   33.71  by (safe_tac rel_cs);
   33.72  by (REPEAT (ares_tac (prems@[UN_equiv_class_type,
   33.73 -			     congruent2_implies_congruent_UN,
   33.74 -			     congruent2_implies_congruent, quotientI]) 1));
   33.75 +                             congruent2_implies_congruent_UN,
   33.76 +                             congruent2_implies_congruent, quotientI]) 1));
   33.77  qed "UN_equiv_class_type2";
   33.78  
   33.79  
   33.80  (*Suggested by John Harrison -- the two subproofs may be MUCH simpler
   33.81    than the direct proof*)
   33.82  val prems = goalw Equiv.thy [congruent2_def,equiv_def,refl_def]
   33.83 -    "[| equiv A r;	\
   33.84 +    "[| equiv A r;      \
   33.85  \       !! y z w. [| w: A;  (y,z) : r |] ==> b y w = b z w;      \
   33.86  \       !! y z w. [| w: A;  (y,z) : r |] ==> b w y = b w z       \
   33.87  \    |] ==> congruent2 r b";
   33.88 @@ -258,9 +258,9 @@
   33.89  qed "congruent2I";
   33.90  
   33.91  val [equivA,commute,congt] = goal Equiv.thy
   33.92 -    "[| equiv A r;	\
   33.93 +    "[| equiv A r;      \
   33.94  \       !! y z. [| y: A;  z: A |] ==> b y z = b z y;        \
   33.95 -\       !! y z w. [| w: A;  (y,z): r |] ==> b w y = b w z	\
   33.96 +\       !! y z w. [| w: A;  (y,z): r |] ==> b w y = b w z       \
   33.97  \    |] ==> congruent2 r b";
   33.98  by (resolve_tac [equivA RS congruent2I] 1);
   33.99  by (rtac (commute RS trans) 1);
    34.1 --- a/src/HOL/Integ/Integ.ML	Tue Jan 30 15:19:20 1996 +0100
    34.2 +++ b/src/HOL/Integ/Integ.ML	Tue Jan 30 15:24:36 1996 +0100
    34.3 @@ -1,7 +1,7 @@
    34.4 -(*  Title: 	Integ.ML
    34.5 +(*  Title:      Integ.ML
    34.6      ID:         $Id$
    34.7 -    Authors: 	Riccardo Mattolini, Dip. Sistemi e Informatica
    34.8 -        	Lawrence C Paulson, Cambridge University Computer Laboratory
    34.9 +    Authors:    Riccardo Mattolini, Dip. Sistemi e Informatica
   34.10 +                Lawrence C Paulson, Cambridge University Computer Laboratory
   34.11      Copyright   1994 Universita' di Firenze
   34.12      Copyright   1993  University of Cambridge
   34.13  
   34.14 @@ -84,7 +84,7 @@
   34.15  qed "inj_onto_Abs_Integ";
   34.16  
   34.17  Addsimps [equiv_intrel_iff, inj_onto_Abs_Integ RS inj_onto_iff,
   34.18 -	  intrel_iff, intrel_in_integ, Abs_Integ_inverse];
   34.19 +          intrel_iff, intrel_in_integ, Abs_Integ_inverse];
   34.20  
   34.21  goal Integ.thy "inj(Rep_Integ)";
   34.22  by (rtac inj_inverseI 1);
   34.23 @@ -213,8 +213,8 @@
   34.24  by (asm_simp_tac (!simpset addsimps [diff_add_inverse,diff_add_0]) 1);
   34.25  by (rtac impI 1);
   34.26  by (asm_simp_tac (!simpset addsimps
   34.27 -		  [diff_add_inverse, diff_add_0, diff_Suc_add_0,
   34.28 -		   diff_Suc_add_inverse]) 1);
   34.29 +                  [diff_add_inverse, diff_add_0, diff_Suc_add_0,
   34.30 +                   diff_Suc_add_inverse]) 1);
   34.31  qed "zmagnitude_congruent";
   34.32  
   34.33  (*Resolve th against the corresponding facts for zmagnitude*)
   34.34 @@ -328,8 +328,8 @@
   34.35  qed "zmult_congruent_lemma";
   34.36  
   34.37  goal Integ.thy 
   34.38 -    "congruent2 intrel (%p1 p2.  		\
   34.39 -\               split (%x1 y1. split (%x2 y2. 	\
   34.40 +    "congruent2 intrel (%p1 p2.                 \
   34.41 +\               split (%x1 y1. split (%x2 y2.   \
   34.42  \                   intrel^^{(x1*x2 + y1*y2, x1*y2 + y1*x2)}) p2) p1)";
   34.43  by (rtac (equiv_intrel RS congruent2_commuteI) 1);
   34.44  by (safe_tac intrel_cs);
   34.45 @@ -351,7 +351,7 @@
   34.46  val zmult_ize = RSLIST [equiv_intrel, zmult_congruent2];
   34.47  
   34.48  goalw Integ.thy [zmult_def]
   34.49 -   "Abs_Integ((intrel^^{(x1,y1)})) * Abs_Integ((intrel^^{(x2,y2)})) = 	\
   34.50 +   "Abs_Integ((intrel^^{(x1,y1)})) * Abs_Integ((intrel^^{(x2,y2)})) =   \
   34.51  \   Abs_Integ(intrel ^^ {(x1*x2 + y1*y2, x1*y2 + y1*x2)})";
   34.52  by (simp_tac (!simpset addsimps [zmult_ize UN_equiv_class2]) 1);
   34.53  qed "zmult";
   34.54 @@ -433,7 +433,7 @@
   34.55  val zminus_simps = [zminus_zminus, zminus_0, zminus_zadd_distrib];
   34.56  
   34.57  val zmult_simps = [zmult_0, zmult_1, zmult_0_right, zmult_1_right, 
   34.58 -		   zmult_zminus, zmult_zminus_right];
   34.59 +                   zmult_zminus, zmult_zminus_right];
   34.60  
   34.61  Addsimps (zadd_simps @ zminus_simps @ zmult_simps @ 
   34.62            [zmagnitude_znat, zmagnitude_zminus_znat]);
   34.63 @@ -700,12 +700,12 @@
   34.64  
   34.65  goal Integ.thy "!!i. [| i <= j; j <= k |] ==> i <= (k::int)";
   34.66  by (EVERY1 [dtac zle_imp_zless_or_eq, dtac zle_imp_zless_or_eq,
   34.67 -	    rtac zless_or_eq_imp_zle, fast_tac (HOL_cs addIs [zless_trans])]);
   34.68 +            rtac zless_or_eq_imp_zle, fast_tac (HOL_cs addIs [zless_trans])]);
   34.69  qed "zle_trans";
   34.70  
   34.71  goal Integ.thy "!!z. [| z <= w; w <= z |] ==> z = (w::int)";
   34.72  by (EVERY1 [dtac zle_imp_zless_or_eq, dtac zle_imp_zless_or_eq,
   34.73 -	    fast_tac (HOL_cs addEs [zless_anti_refl,zless_asym])]);
   34.74 +            fast_tac (HOL_cs addEs [zless_anti_refl,zless_asym])]);
   34.75  qed "zle_anti_sym";
   34.76  
   34.77  
    35.1 --- a/src/HOL/Integ/ROOT.ML	Tue Jan 30 15:19:20 1996 +0100
    35.2 +++ b/src/HOL/Integ/ROOT.ML	Tue Jan 30 15:24:36 1996 +0100
    35.3 @@ -1,6 +1,6 @@
    35.4 -(*  Title:  	HOL/Integ/ROOT
    35.5 +(*  Title:      HOL/Integ/ROOT
    35.6      ID:         $Id$
    35.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    35.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    35.9      Copyright   1995  University of Cambridge
   35.10  
   35.11  The Integers in HOL (ported from ZF by Riccardo Mattolini)
    36.1 --- a/src/HOL/Lambda/Commutation.ML	Tue Jan 30 15:19:20 1996 +0100
    36.2 +++ b/src/HOL/Lambda/Commutation.ML	Tue Jan 30 15:24:36 1996 +0100
    36.3 @@ -27,21 +27,21 @@
    36.4  goalw Commutation.thy [square_def]
    36.5    "!!R. square R S S T ==> square (R^*) S S (T^*)";
    36.6  by(strip_tac 1);
    36.7 -be rtrancl_induct 1;
    36.8 +by (etac rtrancl_induct 1);
    36.9  by(fast_tac trancl_cs 1);
   36.10  by(fast_tac (HOL_cs addSEs [rtrancl_into_rtrancl]) 1);
   36.11  qed "square_rtrancl";
   36.12  
   36.13  goalw Commutation.thy [commute_def]
   36.14   "!!R. square R S (S^*) (R^=) ==> commute (R^*) (S^*)";
   36.15 -bd square_reflcl 1;
   36.16 -br subsetI 1;
   36.17 -be r_into_rtrancl 1;
   36.18 -bd square_sym 1;
   36.19 -bd square_rtrancl 1;
   36.20 +by (dtac square_reflcl 1);
   36.21 +by (rtac subsetI 1);
   36.22 +by (etac r_into_rtrancl 1);
   36.23 +by (dtac square_sym 1);
   36.24 +by (dtac square_rtrancl 1);
   36.25  by(Asm_full_simp_tac 1);
   36.26 -bd square_sym 1;
   36.27 -bd square_rtrancl 1;
   36.28 +by (dtac square_sym 1);
   36.29 +by (dtac square_rtrancl 1);
   36.30  by(Asm_full_simp_tac 1);
   36.31  qed "square_rtrancl_reflcl_commute";
   36.32  
   36.33 @@ -68,7 +68,7 @@
   36.34  qed "diamond_Un";
   36.35  
   36.36  goalw Commutation.thy [diamond_def] "!!R. diamond R ==> confluent (R)";
   36.37 -be commute_rtrancl 1;
   36.38 +by (etac commute_rtrancl 1);
   36.39  qed "diamond_confluent";
   36.40  
   36.41  goalw Commutation.thy [diamond_def]
   36.42 @@ -94,12 +94,12 @@
   36.43  
   36.44  goalw Commutation.thy [square_def,commute_def,diamond_def,Church_Rosser_def]
   36.45    "Church_Rosser(R) = confluent(R)";
   36.46 -br iffI 1;
   36.47 +by (rtac iffI 1);
   36.48   by(fast_tac (HOL_cs addIs
   36.49        [Un_upper2 RS rtrancl_mono RS subsetD RS rtrancl_trans,
   36.50         rtrancl_converseI, converseI, Un_upper1 RS rtrancl_mono RS subsetD])1);
   36.51  by(safe_tac HOL_cs);
   36.52 -be rtrancl_induct 1;
   36.53 +by (etac rtrancl_induct 1);
   36.54   by(fast_tac trancl_cs 1);
   36.55  by(slow_tac (rel_cs addIs [r_into_rtrancl]
   36.56                      addEs [rtrancl_trans,r_into_rtrancl RS rtrancl_trans]) 1);
    37.1 --- a/src/HOL/Lambda/Eta.ML	Tue Jan 30 15:19:20 1996 +0100
    37.2 +++ b/src/HOL/Lambda/Eta.ML	Tue Jan 30 15:24:36 1996 +0100
    37.3 @@ -59,7 +59,7 @@
    37.4  by(ALLGOALS(asm_full_simp_tac (addsplit (!simpset) addcongs [conj_cong])));
    37.5  by(fast_tac HOL_cs 2);
    37.6  by(safe_tac (HOL_cs addSIs [iffI]));
    37.7 -bd Suc_mono 1;
    37.8 +by (dtac Suc_mono 1);
    37.9  by(ALLGOALS(Asm_full_simp_tac));
   37.10  by(dtac less_trans_Suc 1 THEN atac 1);
   37.11  by(dtac less_trans_Suc 2 THEN atac 2);
   37.12 @@ -77,7 +77,7 @@
   37.13  by(ALLGOALS(Asm_simp_tac));
   37.14  by(fast_tac (HOL_cs addEs [less_imp_not_pred_less RS notE]) 1);
   37.15  by(fast_tac (HOL_cs addDs [less_not_sym]) 1);
   37.16 -bd Suc_mono 1;
   37.17 +by (dtac Suc_mono 1);
   37.18  by(dtac less_interval1 1 THEN atac 1);
   37.19  by(asm_full_simp_tac (simpset_of "Nat" addsimps [eq_sym_conv]) 1);
   37.20  by(dtac less_trans_Suc 1 THEN atac 1);
   37.21 @@ -86,7 +86,7 @@
   37.22  Addsimps [free_subst];
   37.23  
   37.24  goal Eta.thy "!!s. s -e> t ==> !i. free t i = free s i";
   37.25 -be (eta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1;
   37.26 +by (etac (eta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1);
   37.27  by(ALLGOALS(asm_simp_tac (!simpset addsimps [decr_def] addcongs [conj_cong])));
   37.28  bind_thm("free_eta",result() RS spec);
   37.29  
   37.30 @@ -102,24 +102,24 @@
   37.31  bind_thm("subst_not_free", result() RS spec RS spec RS spec RS mp);
   37.32  
   37.33  goalw Eta.thy [decr_def] "!!s. ~free s i ==> s[t/i] = decr s i";
   37.34 -be subst_not_free 1;
   37.35 +by (etac subst_not_free 1);
   37.36  qed "subst_decr";
   37.37  
   37.38  goal Eta.thy "!!s. s -e> t ==> !u i. s[u/i] -e> t[u/i]";
   37.39 -be (eta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1;
   37.40 +by (etac (eta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1);
   37.41  by(ALLGOALS(asm_simp_tac (!simpset addsimps [subst_subst RS sym,decr_def])));
   37.42  by(asm_simp_tac (!simpset addsimps [subst_decr]) 1);
   37.43  bind_thm("eta_subst",result() RS spec RS spec);
   37.44  Addsimps [eta_subst];
   37.45  
   37.46  goalw Eta.thy [decr_def] "!!s. s -e> t ==> decr s i -e> decr t i";
   37.47 -be eta_subst 1;
   37.48 +by (etac eta_subst 1);
   37.49  qed "eta_decr";
   37.50  
   37.51  (*** Confluence of eta ***)
   37.52  
   37.53  goalw Eta.thy [square_def,id_def]  "square eta eta (eta^=) (eta^=)";
   37.54 -br eta.mutual_induct 1;
   37.55 +by (rtac eta.mutual_induct 1);
   37.56  by(ALLGOALS(fast_tac (eta_cs addSEs [eta_decr,not_free_eta] addss !simpset)));
   37.57  val lemma = result();
   37.58  
   37.59 @@ -130,17 +130,17 @@
   37.60  (*** Congruence rules for -e>> ***)
   37.61  
   37.62  goal Eta.thy "!!s. s -e>> s' ==> Fun s -e>> Fun s'";
   37.63 -be rtrancl_induct 1;
   37.64 +by (etac rtrancl_induct 1);
   37.65  by (ALLGOALS(fast_tac (eta_cs addIs [rtrancl_refl,rtrancl_into_rtrancl])));
   37.66  qed "rtrancl_eta_Fun";
   37.67  
   37.68  goal Eta.thy "!!s. s -e>> s' ==> s @ t -e>> s' @ t";
   37.69 -be rtrancl_induct 1;
   37.70 +by (etac rtrancl_induct 1);
   37.71  by (ALLGOALS(fast_tac (eta_cs addIs [rtrancl_refl,rtrancl_into_rtrancl])));
   37.72  qed "rtrancl_eta_AppL";
   37.73  
   37.74  goal Eta.thy "!!s. t -e>> t' ==> s @ t -e>> s @ t'";
   37.75 -be rtrancl_induct 1;
   37.76 +by (etac rtrancl_induct 1);
   37.77  by (ALLGOALS(fast_tac (eta_cs addIs [rtrancl_refl,rtrancl_into_rtrancl])));
   37.78  qed "rtrancl_eta_AppR";
   37.79  
   37.80 @@ -152,12 +152,12 @@
   37.81  (*** Commutation of beta and eta ***)
   37.82  
   37.83  goal Eta.thy "!s t. s -> t --> (!i. free t i --> free s i)";
   37.84 -br beta.mutual_induct 1;
   37.85 +by (rtac beta.mutual_induct 1);
   37.86  by(ALLGOALS(Asm_full_simp_tac));
   37.87  bind_thm("free_beta", result() RS spec RS spec RS mp RS spec RS mp);
   37.88  
   37.89  goalw Eta.thy [decr_def] "!s t. s -> t --> (!i. decr s i -> decr t i)";
   37.90 -br beta.mutual_induct 1;
   37.91 +by (rtac beta.mutual_induct 1);
   37.92  by(ALLGOALS(asm_full_simp_tac (!simpset addsimps [subst_subst RS sym])));
   37.93  bind_thm("beta_decr", result() RS spec RS spec RS mp RS spec);
   37.94  
   37.95 @@ -186,7 +186,7 @@
   37.96  Addsimps [decr_not_free];
   37.97  
   37.98  goal Eta.thy "!s t. s -e> t --> (!i. lift s i -e> lift t i)";
   37.99 -br eta.mutual_induct 1;
  37.100 +by (rtac eta.mutual_induct 1);
  37.101  by(ALLGOALS(asm_simp_tac (addsplit (!simpset) addsimps [decr_def])));
  37.102  by(asm_simp_tac (addsplit (!simpset) addsimps [subst_decr]) 1);
  37.103  bind_thm("eta_lift",result() RS spec RS spec RS mp RS spec);
  37.104 @@ -201,10 +201,10 @@
  37.105  bind_thm("rtrancl_eta_subst", result() RS spec RS spec RS spec RS mp);
  37.106  
  37.107  goalw Eta.thy [square_def] "square beta eta (eta^*) (beta^=)";
  37.108 -br beta.mutual_induct 1;
  37.109 +by (rtac beta.mutual_induct 1);
  37.110  by(strip_tac 1);
  37.111 -bes eta_cases 1;
  37.112 -bes eta_cases 1;
  37.113 +by (eresolve_tac eta_cases 1);
  37.114 +by (eresolve_tac eta_cases 1);
  37.115  by(fast_tac (eta_cs addss (!simpset addsimps [subst_decr])) 1);
  37.116  by(fast_tac (eta_cs addIs [r_into_rtrancl,eta_subst]) 1);
  37.117  by(fast_tac (eta_cs addIs [rtrancl_eta_subst]) 1);
    38.1 --- a/src/HOL/Lambda/Lambda.ML	Tue Jan 30 15:19:20 1996 +0100
    38.2 +++ b/src/HOL/Lambda/Lambda.ML	Tue Jan 30 15:24:36 1996 +0100
    38.3 @@ -12,33 +12,33 @@
    38.4  (*** Nat ***)
    38.5  
    38.6  goal Nat.thy "!!i. [| i < Suc j; j < k |] ==> i < k";
    38.7 -br le_less_trans 1;
    38.8 -ba 2;
    38.9 +by (rtac le_less_trans 1);
   38.10 +by (assume_tac 2);
   38.11  by(asm_full_simp_tac (!simpset addsimps [le_def]) 1);
   38.12  by(fast_tac (HOL_cs addEs [less_asym,less_anti_refl]) 1);
   38.13  qed "lt_trans1";
   38.14  
   38.15  goal Nat.thy "!!i. [| i < j; j < Suc(k) |] ==> i < k";
   38.16 -be less_le_trans 1;
   38.17 +by (etac less_le_trans 1);
   38.18  by(asm_full_simp_tac (!simpset addsimps [le_def]) 1);
   38.19  by(fast_tac (HOL_cs addEs [less_asym,less_anti_refl]) 1);
   38.20  qed "lt_trans2";
   38.21  
   38.22  val major::prems = goal Nat.thy
   38.23    "[| i < Suc j; i < j ==> P; i = j ==> P |] ==> P";
   38.24 -br (major RS lessE) 1;
   38.25 +by (rtac (major RS lessE) 1);
   38.26  by(ALLGOALS Asm_full_simp_tac);
   38.27  by(resolve_tac prems 1 THEN etac sym 1);
   38.28  by(fast_tac (HOL_cs addIs prems) 1);
   38.29  qed "leqE";
   38.30  
   38.31  goal Arith.thy "!!i. Suc i < j ==> i < pred j ";
   38.32 -by (resolve_tac [Suc_less_SucD] 1);
   38.33 +by (rtac Suc_less_SucD 1);
   38.34  by (Asm_simp_tac 1);
   38.35  qed "lt_pred";
   38.36  
   38.37  goal Arith.thy "!!i. [| i < Suc j; k < i |] ==> pred i < j ";
   38.38 -by (resolve_tac [Suc_less_SucD] 1);
   38.39 +by (rtac Suc_less_SucD 1);
   38.40  by (Asm_simp_tac 1);
   38.41  qed "gt_pred";
   38.42  
   38.43 @@ -56,17 +56,17 @@
   38.44  (*** Congruence rules for ->> ***)
   38.45  
   38.46  goal Lambda.thy "!!s. s ->> s' ==> Fun s ->> Fun s'";
   38.47 -be rtrancl_induct 1;
   38.48 +by (etac rtrancl_induct 1);
   38.49  by (ALLGOALS(fast_tac (lambda_cs addIs [rtrancl_refl,rtrancl_into_rtrancl])));
   38.50  qed "rtrancl_beta_Fun";
   38.51  
   38.52  goal Lambda.thy "!!s. s ->> s' ==> s @ t ->> s' @ t";
   38.53 -be rtrancl_induct 1;
   38.54 +by (etac rtrancl_induct 1);
   38.55  by (ALLGOALS(fast_tac (lambda_cs addIs [rtrancl_refl,rtrancl_into_rtrancl])));
   38.56  qed "rtrancl_beta_AppL";
   38.57  
   38.58  goal Lambda.thy "!!s. t ->> t' ==> s @ t ->> s @ t'";
   38.59 -be rtrancl_induct 1;
   38.60 +by (etac rtrancl_induct 1);
   38.61  by (ALLGOALS(fast_tac (lambda_cs addIs [rtrancl_refl,rtrancl_into_rtrancl])));
   38.62  qed "rtrancl_beta_AppR";
   38.63  
   38.64 @@ -157,7 +157,7 @@
   38.65  by (excluded_middle_tac "nat < Suc(Suc j)" 1);
   38.66  by(Asm_full_simp_tac 1);
   38.67  by (forward_tac [lessI RS less_trans] 1);
   38.68 -by (eresolve_tac [leqE] 1);
   38.69 +by (etac leqE 1);
   38.70  by (asm_simp_tac (!simpset addsimps [lt_pred]) 2);
   38.71  by (forward_tac [Suc_mono RS less_trans] 1 THEN assume_tac 1);
   38.72  by (forw_inst_tac [("i","i")] (lessI RS less_trans) 1);
    39.1 --- a/src/HOL/Lambda/ParRed.ML	Tue Jan 30 15:19:20 1996 +0100
    39.2 +++ b/src/HOL/Lambda/ParRed.ML	Tue Jan 30 15:24:36 1996 +0100
    39.3 @@ -31,16 +31,16 @@
    39.4  Addsimps [par_beta_refl];
    39.5  
    39.6  goal ParRed.thy "beta <= par_beta";
    39.7 -br subsetI 1;
    39.8 +by (rtac subsetI 1);
    39.9  by (split_all_tac 1);
   39.10 -be (beta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1;
   39.11 +by (etac (beta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1);
   39.12  by (ALLGOALS(fast_tac (parred_cs addSIs [par_beta_refl])));
   39.13  qed "beta_subset_par_beta";
   39.14  
   39.15  goal ParRed.thy "par_beta <= beta^*";
   39.16 -br subsetI 1;
   39.17 +by (rtac subsetI 1);
   39.18  by (split_all_tac 1);
   39.19 -be (par_beta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1;
   39.20 +by (etac (par_beta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1);
   39.21  by (ALLGOALS(fast_tac (parred_cs addIs
   39.22         [rtrancl_beta_Fun,rtrancl_beta_App,rtrancl_refl,
   39.23          rtrancl_into_rtrancl] addEs [rtrancl_trans])));
   39.24 @@ -70,7 +70,7 @@
   39.25  (*** Confluence (directly) ***)
   39.26  
   39.27  goalw ParRed.thy [diamond_def,commute_def,square_def] "diamond(par_beta)";
   39.28 -br par_beta.mutual_induct 1;
   39.29 +by (rtac par_beta.mutual_induct 1);
   39.30  by(ALLGOALS(fast_tac (parred_cs addSIs [par_beta_subst])));
   39.31  qed "diamond_par_beta";
   39.32  
    40.1 --- a/src/HOL/Lambda/ROOT.ML	Tue Jan 30 15:19:20 1996 +0100
    40.2 +++ b/src/HOL/Lambda/ROOT.ML	Tue Jan 30 15:24:36 1996 +0100
    40.3 @@ -1,10 +1,10 @@
    40.4 -(*  Title: 	HOL/Lambda/ROOT.ML
    40.5 +(*  Title:      HOL/Lambda/ROOT.ML
    40.6      ID:         $Id$
    40.7 -    Author: 	Tobias Nipkow
    40.8 +    Author:     Tobias Nipkow
    40.9      Copyright   1995 TUM
   40.10  *)
   40.11  
   40.12 -HOL_build_completed;	(*Make examples fail if HOL did*)
   40.13 +HOL_build_completed;    (*Make examples fail if HOL did*)
   40.14  
   40.15  writeln"Root file for HOL/Lambda";
   40.16  
    41.1 --- a/src/HOL/Lex/Auto.ML	Tue Jan 30 15:19:20 1996 +0100
    41.2 +++ b/src/HOL/Lex/Auto.ML	Tue Jan 30 15:24:36 1996 +0100
    41.3 @@ -1,6 +1,6 @@
    41.4 -(*  Title: 	HOL/Lex/Auto.ML
    41.5 +(*  Title:      HOL/Lex/Auto.ML
    41.6      ID:         $Id$
    41.7 -    Author: 	Richard Mayr & Tobias Nipkow
    41.8 +    Author:     Richard Mayr & Tobias Nipkow
    41.9      Copyright   1995 TUM
   41.10  *)
   41.11  
    42.1 --- a/src/HOL/Lex/AutoChopper.ML	Tue Jan 30 15:19:20 1996 +0100
    42.2 +++ b/src/HOL/Lex/AutoChopper.ML	Tue Jan 30 15:24:36 1996 +0100
    42.3 @@ -1,6 +1,6 @@
    42.4 -(*  Title: 	HOL/Lex/AutoChopper.ML
    42.5 +(*  Title:      HOL/Lex/AutoChopper.ML
    42.6      ID:         $Id$
    42.7 -    Author: 	Richard Mayr & Tobias Nipkow
    42.8 +    Author:     Richard Mayr & Tobias Nipkow
    42.9      Copyright   1995 TUM
   42.10  
   42.11  Main result: auto_chopper satisfies the is_auto_chopper specification.
   42.12 @@ -27,7 +27,7 @@
   42.13  by (simp_tac (!simpset addcongs [conj_cong]) 1);
   42.14  by (simp_tac (!simpset setloop (split_tac[expand_if])) 1);
   42.15  by (strip_tac 1);
   42.16 -br conjI 1;
   42.17 +by (rtac conjI 1);
   42.18  by (fast_tac HOL_cs 1);
   42.19  by(simp_tac (!simpset addsimps [prefix_Cons] addcongs [conj_cong]) 1);
   42.20  by (strip_tac 1);
   42.21 @@ -100,7 +100,7 @@
   42.22   by (fast_tac HOL_cs 1);
   42.23  by (asm_simp_tac (!simpset addcongs [conj_cong] setloop (split_tac [expand_if])) 1);
   42.24  by (strip_tac 1);
   42.25 -br conjI 1;
   42.26 +by (rtac conjI 1);
   42.27   by(res_inst_tac [("p","acc list (start A) [] [] ([],list) A")] PairE 1);
   42.28   by(rename_tac "vss lrst" 1);  
   42.29   by(Asm_simp_tac 1);
   42.30 @@ -155,11 +155,11 @@
   42.31   by (Asm_simp_tac 1);
   42.32   by (hyp_subst_tac 1);
   42.33   by (fast_tac (HOL_cs addSDs [no_acc]) 1);
   42.34 -be ((neq_Nil_conv RS iffD1) RS exE) 1;
   42.35 -be exE 1;
   42.36 +by (etac ((neq_Nil_conv RS iffD1) RS exE) 1);
   42.37 +by (etac exE 1);
   42.38  by (hyp_subst_tac 1);
   42.39  by (Simp_tac 1);
   42.40 -br trans 1;
   42.41 +by (rtac trans 1);
   42.42   be step2_a 1;
   42.43  by (simp_tac (!simpset setloop (split_tac [expand_if])) 1);
   42.44  val step2_d = (result() repeat_RS spec) RS mp;
   42.45 @@ -204,14 +204,14 @@
   42.46  by (Asm_simp_tac 1);
   42.47  by (strip_tac 1);
   42.48  by (res_inst_tac [("x","[a]")] exI 1);
   42.49 -br conjI 1;
   42.50 +by (rtac conjI 1);
   42.51   by (subgoal_tac "r @ [a] ~= []" 1);
   42.52    by (fast_tac HOL_cs 1);
   42.53   by (Simp_tac 1);
   42.54 -br list_cases 1;
   42.55 +by (rtac list_cases 1);
   42.56   by (Simp_tac 1);
   42.57  by (asm_full_simp_tac (!simpset addsimps [acc_prefix_def] addcongs[conj_cong]) 1);
   42.58 -be thin_rl 1; (* speed up *)
   42.59 +by (etac thin_rl 1); (* speed up *)
   42.60  by (fast_tac HOL_cs 1);
   42.61  val step2_e = (result() repeat_RS spec) RS mp;
   42.62  Addsimps[split_paired_All];
   42.63 @@ -223,18 +223,18 @@
   42.64   br mp 1;
   42.65    be step2_b 2;
   42.66   by (simp_tac (!simpset setloop (split_tac [expand_if])) 1);
   42.67 -br conjI 1;
   42.68 +by (rtac conjI 1);
   42.69   br mp 1;
   42.70    be step2_c 2;
   42.71   by (simp_tac (!simpset setloop (split_tac [expand_if])) 1);
   42.72   by (fast_tac HOL_cs 1);
   42.73 -br conjI 1;
   42.74 +by (rtac conjI 1);
   42.75   by (asm_simp_tac (!simpset addsimps [step2_a] setloop (split_tac [expand_if])) 1);
   42.76 -br conjI 1;
   42.77 +by (rtac conjI 1);
   42.78   br mp 1;
   42.79    be step2_d 2;
   42.80   by (simp_tac (!simpset setloop (split_tac [expand_if])) 1);
   42.81 -br mp 1;
   42.82 +by (rtac mp 1);
   42.83   be step2_e 2;
   42.84   by (simp_tac (!simpset setloop (split_tac [expand_if])) 1);
   42.85  by (fast_tac HOL_cs 1);
    43.1 --- a/src/HOL/Lex/Prefix.ML	Tue Jan 30 15:19:20 1996 +0100
    43.2 +++ b/src/HOL/Lex/Prefix.ML	Tue Jan 30 15:24:36 1996 +0100
    43.3 @@ -1,16 +1,16 @@
    43.4 -(*  Title: 	HOL/Lex/Prefix.thy
    43.5 +(*  Title:      HOL/Lex/Prefix.thy
    43.6      ID:         $Id$
    43.7 -    Author: 	Richard Mayr & Tobias Nipkow
    43.8 +    Author:     Richard Mayr & Tobias Nipkow
    43.9      Copyright   1995 TUM
   43.10  *)
   43.11  
   43.12  open Prefix;
   43.13  
   43.14  val [maj,min] = goal Prefix.thy "[| Q([]); !! y ys. Q(y#ys) |] ==> ! l.Q(l)";
   43.15 -br allI 1;
   43.16 +by (rtac allI 1);
   43.17  by (list.induct_tac "l" 1);
   43.18 -br maj 1;
   43.19 -br min 1;
   43.20 +by (rtac maj 1);
   43.21 +by (rtac min 1);
   43.22  val list_cases = result();
   43.23  
   43.24  goalw Prefix.thy [prefix_def] "[] <= xs";
    44.1 --- a/src/HOL/Lex/ROOT.ML	Tue Jan 30 15:19:20 1996 +0100
    44.2 +++ b/src/HOL/Lex/ROOT.ML	Tue Jan 30 15:24:36 1996 +0100
    44.3 @@ -1,9 +1,9 @@
    44.4 -(*  Title: 	HOL/Lex/ROOT.ML
    44.5 +(*  Title:      HOL/Lex/ROOT.ML
    44.6      ID:         $Id$
    44.7 -    Author: 	Tobias Nipkow
    44.8 +    Author:     Tobias Nipkow
    44.9      Copyright   1995 TUM
   44.10  *)
   44.11  
   44.12 -HOL_build_completed;	(*Make examples fail if HOL did*)
   44.13 +HOL_build_completed;    (*Make examples fail if HOL did*)
   44.14  
   44.15  use_thy"AutoChopper";
    45.1 --- a/src/HOL/Lfp.ML	Tue Jan 30 15:19:20 1996 +0100
    45.2 +++ b/src/HOL/Lfp.ML	Tue Jan 30 15:24:36 1996 +0100
    45.3 @@ -1,6 +1,6 @@
    45.4 -(*  Title: 	HOL/lfp.ML
    45.5 +(*  Title:      HOL/lfp.ML
    45.6      ID:         $Id$
    45.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    45.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    45.9      Copyright   1992  University of Cambridge
   45.10  
   45.11  For lfp.thy.  The Knaster-Tarski Theorem
   45.12 @@ -25,12 +25,12 @@
   45.13  
   45.14  val [mono] = goal Lfp.thy "mono(f) ==> f(lfp(f)) <= lfp(f)";
   45.15  by (EVERY1 [rtac lfp_greatest, rtac subset_trans,
   45.16 -	    rtac (mono RS monoD), rtac lfp_lowerbound, atac, atac]);
   45.17 +            rtac (mono RS monoD), rtac lfp_lowerbound, atac, atac]);
   45.18  qed "lfp_lemma2";
   45.19  
   45.20  val [mono] = goal Lfp.thy "mono(f) ==> lfp(f) <= f(lfp(f))";
   45.21  by (EVERY1 [rtac lfp_lowerbound, rtac (mono RS monoD), 
   45.22 -	    rtac lfp_lemma2, rtac mono]);
   45.23 +            rtac lfp_lemma2, rtac mono]);
   45.24  qed "lfp_lemma3";
   45.25  
   45.26  val [mono] = goal Lfp.thy "mono(f) ==> lfp(f) = f(lfp(f))";
   45.27 @@ -40,23 +40,23 @@
   45.28  (*** General induction rule for least fixed points ***)
   45.29  
   45.30  val [lfp,mono,indhyp] = goal Lfp.thy
   45.31 -    "[| a: lfp(f);  mono(f);  				\
   45.32 -\       !!x. [| x: f(lfp(f) Int {x.P(x)}) |] ==> P(x) 	\
   45.33 +    "[| a: lfp(f);  mono(f);                            \
   45.34 +\       !!x. [| x: f(lfp(f) Int {x.P(x)}) |] ==> P(x)   \
   45.35  \    |] ==> P(a)";
   45.36  by (res_inst_tac [("a","a")] (Int_lower2 RS subsetD RS CollectD) 1);
   45.37  by (rtac (lfp RSN (2, lfp_lowerbound RS subsetD)) 1);
   45.38  by (EVERY1 [rtac Int_greatest, rtac subset_trans, 
   45.39 -	    rtac (Int_lower1 RS (mono RS monoD)),
   45.40 -	    rtac (mono RS lfp_lemma2),
   45.41 -	    rtac (CollectI RS subsetI), rtac indhyp, atac]);
   45.42 +            rtac (Int_lower1 RS (mono RS monoD)),
   45.43 +            rtac (mono RS lfp_lemma2),
   45.44 +            rtac (CollectI RS subsetI), rtac indhyp, atac]);
   45.45  qed "induct";
   45.46  
   45.47  val major::prems = goal Lfp.thy
   45.48    "[| (a,b) : lfp f; mono f; \
   45.49  \     !!a b. (a,b) : f(lfp f Int Collect(split P)) ==> P a b |] ==> P a b";
   45.50  by(res_inst_tac [("c1","P")] (split RS subst) 1);
   45.51 -br (major RS induct) 1;
   45.52 -brs prems 1;
   45.53 +by (rtac (major RS induct) 1);
   45.54 +by (resolve_tac prems 1);
   45.55  by(res_inst_tac[("p","x")]PairE 1);
   45.56  by(hyp_subst_tac 1);
   45.57  by(asm_simp_tac (!simpset addsimps prems) 1);
   45.58 @@ -64,7 +64,7 @@
   45.59  
   45.60  (*** Fixpoint induction a la David Park ***)
   45.61  goal Lfp.thy "!!f. [| mono f; f A <= A |] ==> lfp(f) <= A";
   45.62 -br subsetI 1;
   45.63 +by (rtac subsetI 1);
   45.64  by(EVERY[etac induct 1, atac 1, etac subsetD 1, rtac subsetD 1,
   45.65                  atac 2, fast_tac (set_cs addSEs [monoD]) 1]);
   45.66  qed "Park_induct";
   45.67 @@ -77,15 +77,15 @@
   45.68  qed "def_lfp_Tarski";
   45.69  
   45.70  val rew::prems = goal Lfp.thy
   45.71 -    "[| A == lfp(f);  mono(f);   a:A;  			\
   45.72 -\       !!x. [| x: f(A Int {x.P(x)}) |] ==> P(x) 	\
   45.73 +    "[| A == lfp(f);  mono(f);   a:A;                   \
   45.74 +\       !!x. [| x: f(A Int {x.P(x)}) |] ==> P(x)        \
   45.75  \    |] ==> P(a)";
   45.76 -by (EVERY1 [rtac induct,	(*backtracking to force correct induction*)
   45.77 -	    REPEAT1 o (ares_tac (map (rewrite_rule [rew]) prems))]);
   45.78 +by (EVERY1 [rtac induct,        (*backtracking to force correct induction*)
   45.79 +            REPEAT1 o (ares_tac (map (rewrite_rule [rew]) prems))]);
   45.80  qed "def_induct";
   45.81  
   45.82  (*Monotonicity of lfp!*)
   45.83  val [prem] = goal Lfp.thy "[| !!Z. f(Z)<=g(Z) |] ==> lfp(f) <= lfp(g)";
   45.84 -br (lfp_lowerbound RS lfp_greatest) 1;
   45.85 -be (prem RS subset_trans) 1;
   45.86 +by (rtac (lfp_lowerbound RS lfp_greatest) 1);
   45.87 +by (etac (prem RS subset_trans) 1);
   45.88  qed "lfp_mono";
    46.1 --- a/src/HOL/List.ML	Tue Jan 30 15:19:20 1996 +0100
    46.2 +++ b/src/HOL/List.ML	Tue Jan 30 15:24:36 1996 +0100
    46.3 @@ -1,6 +1,6 @@
    46.4 -(*  Title: 	HOL/List
    46.5 +(*  Title:      HOL/List
    46.6      ID:         $Id$
    46.7 -    Author: 	Tobias Nipkow
    46.8 +    Author:     Tobias Nipkow
    46.9      Copyright   1994 TU Muenchen
   46.10  
   46.11  List lemmas
    47.1 --- a/src/HOL/MiniML/I.ML	Tue Jan 30 15:19:20 1996 +0100
    47.2 +++ b/src/HOL/MiniML/I.ML	Tue Jan 30 15:24:36 1996 +0100
    47.3 @@ -17,18 +17,18 @@
    47.4  (* case Abs e *)
    47.5  by (asm_full_simp_tac (!simpset setloop (split_tac [expand_bind])) 1);
    47.6  by (strip_tac 1);
    47.7 -br conjI 1;
    47.8 +by (rtac conjI 1);
    47.9  
   47.10  by (strip_tac 1);
   47.11  by (REPEAT (etac allE 1));
   47.12 -be impE 1;
   47.13 +by (etac impE 1);
   47.14  by (fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst])) 2);
   47.15  by (fast_tac (HOL_cs addIs [new_tv_Suc_list RS mp,new_tv_subst_le,
   47.16      less_imp_le,lessI]) 1); 
   47.17  
   47.18  by (strip_tac 1);
   47.19  by (REPEAT (etac allE 1));
   47.20 -be impE 1;
   47.21 +by (etac impE 1);
   47.22  by (fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst])) 2);
   47.23  by (fast_tac (HOL_cs addIs [new_tv_Suc_list RS mp,new_tv_subst_le,
   47.24      less_imp_le,lessI]) 1); 
   47.25 @@ -37,7 +37,7 @@
   47.26  by (simp_tac (!simpset setloop (split_tac [expand_bind])) 1);
   47.27  by (strip_tac 1);
   47.28  by (rename_tac "s1' t1 n1 s2' t2 n2 sa" 1);
   47.29 -br conjI 1;
   47.30 +by (rtac conjI 1);
   47.31  by (fast_tac (HOL_cs addss !simpset) 1);
   47.32  
   47.33  by (strip_tac 1);
   47.34 @@ -55,13 +55,13 @@
   47.35  by (eres_inst_tac [("x","t2")] allE 1);
   47.36  by (eres_inst_tac [("x","n2")] allE 1);
   47.37  
   47.38 -br conjI 1;
   47.39 +by (rtac conjI 1);
   47.40  by (strip_tac 1);
   47.41  by (mp_tac 1);
   47.42  by (mp_tac 1);
   47.43 -be exE 1;
   47.44 -be conjE 1;
   47.45 -be impE 1;
   47.46 +by (etac exE 1);
   47.47 +by (etac conjE 1);
   47.48 +by (etac impE 1);
   47.49  by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
   47.50  by ((dres_inst_tac [("xc","$ s a")] new_tv_W 1) THEN (atac 1));
   47.51  by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
   47.52 @@ -70,13 +70,13 @@
   47.53  
   47.54  by (strip_tac 1);
   47.55  by (rename_tac "s2 t2' n2'" 1);
   47.56 -br conjI 1;
   47.57 +by (rtac conjI 1);
   47.58  by (strip_tac 1);
   47.59  by (mp_tac 1);
   47.60  by (mp_tac 1);
   47.61 -be exE 1;
   47.62 -be conjE 1;
   47.63 -be impE 1;
   47.64 +by (etac exE 1);
   47.65 +by (etac conjE 1);
   47.66 +by (etac impE 1);
   47.67  by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
   47.68  by ((dres_inst_tac [("xc","$ s a")] new_tv_W 1) THEN (atac 1));
   47.69  by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
   47.70 @@ -86,9 +86,9 @@
   47.71  by (strip_tac 1);
   47.72  by (mp_tac 1);
   47.73  by (mp_tac 1);
   47.74 -be exE 1;
   47.75 -be conjE 1;
   47.76 -be impE 1;
   47.77 +by (etac exE 1);
   47.78 +by (etac conjE 1);
   47.79 +by (etac impE 1);
   47.80  by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
   47.81  by ((dres_inst_tac [("xc","$ s a")] new_tv_W 1) THEN (atac 1));
   47.82  by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
   47.83 @@ -99,7 +99,7 @@
   47.84  by (REPEAT 
   47.85      ((asm_full_simp_tac (!simpset addsimps [subst_comp_tel,subst_comp_te]) 1) THEN
   47.86       (REPEAT (etac conjE 1)) THEN (hyp_subst_tac 1) ));
   47.87 -br exI 1;
   47.88 +by (rtac exI 1);
   47.89  by (safe_tac HOL_cs);
   47.90  by (fast_tac HOL_cs 1);
   47.91  by (Simp_tac 2);
    48.1 --- a/src/HOL/MiniML/Type.ML	Tue Jan 30 15:19:20 1996 +0100
    48.2 +++ b/src/HOL/MiniML/Type.ML	Tue Jan 30 15:24:36 1996 +0100
    48.3 @@ -51,7 +51,7 @@
    48.4    "!!v. [| v : free_tv(s n); v~=n |] ==> v : cod s";
    48.5  by (Simp_tac 1);
    48.6  by (safe_tac (empty_cs addSIs [exI,conjI,notI]));
    48.7 -ba 2;
    48.8 +by (assume_tac 2);
    48.9  by (rotate_tac 1 1);
   48.10  by (Asm_full_simp_tac 1);
   48.11  qed "cod_app_subst";
   48.12 @@ -135,7 +135,7 @@
   48.13  
   48.14  goal thy 
   48.15    "new_tv n  = list_all (new_tv n)";
   48.16 -br ext 1;
   48.17 +by (rtac ext 1);
   48.18  by(list.induct_tac "x" 1);
   48.19  by(ALLGOALS Asm_simp_tac);
   48.20  qed "new_tv_list";
    49.1 --- a/src/HOL/MiniML/W.ML	Tue Jan 30 15:19:20 1996 +0100
    49.2 +++ b/src/HOL/MiniML/W.ML	Tue Jan 30 15:24:36 1996 +0100
    49.3 @@ -11,7 +11,7 @@
    49.4  
    49.5  (* stronger version of Suc_leD *)
    49.6  goalw Nat.thy [le_def] 
    49.7 -	"!!m. Suc m <= n ==> m < n";
    49.8 +        "!!m. Suc m <= n ==> m < n";
    49.9  by (Asm_full_simp_tac 1);
   49.10  by (cut_facts_tac [less_linear] 1);
   49.11  by (fast_tac HOL_cs 1);
   49.12 @@ -20,7 +20,7 @@
   49.13  
   49.14  (* correctness of W with respect to has_type *)
   49.15  goal thy
   49.16 -	"!a s t m n . Ok (s,t,m) = W e a n --> ($ s a |- e :: t)";
   49.17 +        "!a s t m n . Ok (s,t,m) = W e a n --> ($ s a |- e :: t)";
   49.18  by (expr.induct_tac "e" 1);
   49.19  (* case Var n *)
   49.20  by (asm_simp_tac (!simpset setloop (split_tac [expand_if])) 1);
   49.21 @@ -46,12 +46,12 @@
   49.22  qed "W_correct";
   49.23  
   49.24  val has_type_casesE = map(has_type.mk_cases expr.simps)
   49.25 -	[" s |- Var n :: t"," s |- Abs e :: t","s |- App e1 e2 ::t"];
   49.26 +        [" s |- Var n :: t"," s |- Abs e :: t","s |- App e1 e2 ::t"];
   49.27  
   49.28  
   49.29  (* the resulting type variable is always greater or equal than the given one *)
   49.30  goal thy
   49.31 -	"!a n s t m. W e a n  = Ok (s,t,m) --> n<=m";
   49.32 +        "!a n s t m. W e a n  = Ok (s,t,m) --> n<=m";
   49.33  by (expr.induct_tac "e" 1);
   49.34  (* case Var(n) *)
   49.35  by (fast_tac (HOL_cs addss (!simpset setloop (split_tac [expand_if]))) 1);
   49.36 @@ -83,7 +83,7 @@
   49.37  Addsimps [W_var_ge];
   49.38  
   49.39  goal thy
   49.40 -	"!! s. Ok (s,t,m) = W e a n ==> n<=m";
   49.41 +        "!! s. Ok (s,t,m) = W e a n ==> n<=m";
   49.42  by (asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 1);
   49.43  qed "W_var_geD";
   49.44  
   49.45 @@ -101,7 +101,7 @@
   49.46  by (expr.induct_tac "e" 1);
   49.47  (* case Var n *)
   49.48  by (fast_tac (HOL_cs addss (!simpset 
   49.49 -	addsimps [id_subst_def,list_all_nth,new_tv_list,new_tv_subst] 
   49.50 +        addsimps [id_subst_def,list_all_nth,new_tv_list,new_tv_subst] 
   49.51          setloop (split_tac [expand_if]))) 1);
   49.52  
   49.53  (* case Abs e *)
   49.54 @@ -111,7 +111,7 @@
   49.55  by (eres_inst_tac [("x","Suc n")] allE 1);
   49.56  by (eres_inst_tac [("x","(TVar n)#a")] allE 1);
   49.57  by (fast_tac (HOL_cs addss (!simpset
   49.58 -	      addsimps [new_tv_subst,new_tv_Suc_list])) 1);
   49.59 +              addsimps [new_tv_subst,new_tv_Suc_list])) 1);
   49.60  
   49.61  (* case App e1 e2 *)
   49.62  by (simp_tac (!simpset setloop (split_tac [expand_bind])) 1);
   49.63 @@ -139,15 +139,15 @@
   49.64  by (fast_tac (HOL_cs addDs [W_var_geD] addIs
   49.65       [new_tv_list_le,new_tv_subst_tel,lessI RS less_imp_le RS new_tv_subst_le])
   49.66      1);
   49.67 -be (sym RS mgu_new) 1;
   49.68 +by (etac (sym RS mgu_new) 1);
   49.69  by (fast_tac (HOL_cs addDs [W_var_geD] addIs [new_tv_subst_te,new_tv_list_le,
   49.70     new_tv_subst_tel,lessI RS less_imp_le RS new_tv_le,lessI RS less_imp_le RS 
   49.71     new_tv_subst_le,new_tv_le]) 1);
   49.72  by (fast_tac (HOL_cs addDs [W_var_geD] addIs
   49.73       [new_tv_list_le,new_tv_subst_tel,new_tv_le] 
   49.74 -	addss (!simpset)) 1);
   49.75 -br (lessI RS new_tv_subst_var) 1;
   49.76 -be (sym RS mgu_new) 1;
   49.77 +        addss (!simpset)) 1);
   49.78 +by (rtac (lessI RS new_tv_subst_var) 1);
   49.79 +by (etac (sym RS mgu_new) 1);
   49.80  by (fast_tac (HOL_cs addSIs [lessI RS less_imp_le RS new_tv_le,new_tv_subst_te]
   49.81     addDs [W_var_geD] addIs
   49.82     [new_tv_list_le,new_tv_subst_tel,lessI RS less_imp_le RS
   49.83 @@ -159,7 +159,7 @@
   49.84  
   49.85  
   49.86  goal thy
   49.87 -     "!n a s t m v. W e a n = Ok (s,t,m) -->    	\
   49.88 +     "!n a s t m v. W e a n = Ok (s,t,m) -->            \
   49.89  \         (v:free_tv s | v:free_tv t) --> v<n --> v:free_tv a";
   49.90  by (expr.induct_tac "e" 1);
   49.91  (* case Var n *)
   49.92 @@ -198,8 +198,8 @@
   49.93  by (eres_inst_tac [("x","v")] allE 1);
   49.94  by (safe_tac (empty_cs addSIs [conjI,impI] addSEs [conjE]) ); 
   49.95  by (asm_full_simp_tac (!simpset addsimps [rotate_Ok]) 1);
   49.96 -bd W_var_geD 1;
   49.97 -bd W_var_geD 1;
   49.98 +by (dtac W_var_geD 1);
   49.99 +by (dtac W_var_geD 1);
  49.100  by ( (forward_tac [less_le_trans] 1) THEN (assume_tac 1) );
  49.101  by (fast_tac (HOL_cs addDs [free_tv_comp_subst RS subsetD,sym RS mgu_free, 
  49.102      codD,free_tv_app_subst_te RS subsetD,free_tv_app_subst_tel RS subsetD,
  49.103 @@ -207,8 +207,8 @@
  49.104    addEs [UnE] 
  49.105    addss !simpset) 1);
  49.106  by (Asm_full_simp_tac 1); 
  49.107 -bd (sym RS W_var_geD) 1;
  49.108 -bd (sym RS W_var_geD) 1;
  49.109 +by (dtac (sym RS W_var_geD) 1);
  49.110 +by (dtac (sym RS W_var_geD) 1);
  49.111  by ( (forward_tac [less_le_trans] 1) THEN (assume_tac 1) );
  49.112  by (fast_tac (HOL_cs addDs [mgu_free, codD,free_tv_subst_var RS subsetD,
  49.113      free_tv_app_subst_te RS subsetD,free_tv_app_subst_tel RS subsetD,
  49.114 @@ -223,10 +223,10 @@
  49.115  
  49.116  (* Completeness of W w.r.t. has_type *)
  49.117  goal thy
  49.118 -	"!s' a t' n. ($ s' a |- e :: t') --> new_tv n a --> 	\
  49.119 -\		(? s t. (? m. W e a n = Ok (s,t,m) ) &	\
  49.120 -\		 (? r. $ s' a = $ r ($ s a) &	\
  49.121 -\		       t' = $ r t ) )";
  49.122 +        "!s' a t' n. ($ s' a |- e :: t') --> new_tv n a -->     \
  49.123 +\               (? s t. (? m. W e a n = Ok (s,t,m) ) &  \
  49.124 +\                (? r. $ s' a = $ r ($ s a) &   \
  49.125 +\                      t' = $ r t ) )";
  49.126  by (expr.induct_tac "e" 1);
  49.127  (* case Var n *)
  49.128  by (strip_tac 1);
  49.129 @@ -262,14 +262,14 @@
  49.130  by (eres_inst_tac [("x","$ s a")] allE 1);
  49.131  by (eres_inst_tac [("x","t2")] allE 1);
  49.132  by (eres_inst_tac [("x","m")] allE 1);
  49.133 -bd asm_rl 1;
  49.134 -bd asm_rl 1;
  49.135 -bd asm_rl 1;
  49.136 +by (dtac asm_rl 1);
  49.137 +by (dtac asm_rl 1);
  49.138 +by (dtac asm_rl 1);
  49.139  by (Asm_full_simp_tac 1);
  49.140  by (safe_tac HOL_cs);
  49.141  by (fast_tac HOL_cs 1);
  49.142  by (fast_tac (HOL_cs addIs [sym RS W_var_geD,new_tv_W RS
  49.143 -	conjunct1,new_tv_list_le,new_tv_subst_tel]) 1);
  49.144 +        conjunct1,new_tv_list_le,new_tv_subst_tel]) 1);
  49.145  
  49.146  by (subgoal_tac
  49.147    "$ (%x.if x=ma then t' else (if x:(free_tv t - free_tv sa) then r x \
  49.148 @@ -280,7 +280,7 @@
  49.149  \   (if x:(free_tv t - free_tv sa) then r x else ra x)) ($ sa t)"),
  49.150      ("s","($ ra ta) -> t'")] ssubst 2);
  49.151  by (asm_simp_tac (!simpset addsimps [subst_comp_te]) 2);
  49.152 -br eq_free_eq_subst_te 2;  
  49.153 +by (rtac eq_free_eq_subst_te 2);  
  49.154  by (strip_tac 2);
  49.155  by (subgoal_tac "na ~=ma" 2);
  49.156  by (fast_tac (HOL_cs addDs [new_tv_W,sym RS W_var_geD,
  49.157 @@ -291,7 +291,7 @@
  49.158      setloop (split_tac [expand_if])) 3);
  49.159  (* na : free_tv sa *)
  49.160  by (dres_inst_tac [("ts1","$ s a")] (subst_comp_tel RSN (2,trans)) 2);
  49.161 -bd eq_subst_tel_eq_free 2;
  49.162 +by (dtac eq_subst_tel_eq_free 2);
  49.163  by (fast_tac (HOL_cs addIs [free_tv_W,free_tv_le_new_tv] addDs [new_tv_W]) 2);
  49.164  by (Asm_simp_tac 2); 
  49.165  by (case_tac "na:dom sa" 2);
  49.166 @@ -299,12 +299,12 @@
  49.167  by (asm_full_simp_tac (!simpset addsimps [dom_def] 
  49.168      setloop (split_tac [expand_if])) 3);
  49.169  (* na : dom sa *)
  49.170 -br eq_free_eq_subst_te 2;
  49.171 +by (rtac eq_free_eq_subst_te 2);
  49.172  by (strip_tac 2);
  49.173  by (subgoal_tac "nb ~= ma" 2);
  49.174  by ((forward_tac [new_tv_W] 3) THEN (atac 3));
  49.175 -be conjE 3;
  49.176 -bd new_tv_subst_tel 3;
  49.177 +by (etac conjE 3);
  49.178 +by (dtac new_tv_subst_tel 3);
  49.179  by (fast_tac (HOL_cs addIs [new_tv_list_le] addDs [sym RS W_var_geD]) 3);
  49.180  by (fast_tac (set_cs addDs [new_tv_W,new_tv_not_free_tv] addss 
  49.181      (!simpset addsimps [cod_def,free_tv_subst])) 3);
  49.182 @@ -312,12 +312,12 @@
  49.183      setloop (split_tac [expand_if]))) 2);
  49.184  
  49.185  by (Simp_tac 2);  
  49.186 -br eq_free_eq_subst_te 2;
  49.187 +by (rtac eq_free_eq_subst_te 2);
  49.188  by (strip_tac 2 );
  49.189  by (subgoal_tac "na ~= ma" 2);
  49.190  by ((forward_tac [new_tv_W] 3) THEN (atac 3));
  49.191 -be conjE 3;
  49.192 -bd (sym RS W_var_geD) 3;
  49.193 +by (etac conjE 3);
  49.194 +by (dtac (sym RS W_var_geD) 3);
  49.195  by (fast_tac (HOL_cs addDs [new_tv_list_le,new_tv_subst_tel,new_tv_W,new_tv_not_free_tv]) 3);
  49.196  by (case_tac "na: free_tv t - free_tv sa" 2);
  49.197  (* case na ~: free_tv t - free_tv sa *)
  49.198 @@ -325,37 +325,37 @@
  49.199  (* case na : free_tv t - free_tv sa *)
  49.200  by( asm_full_simp_tac (!simpset setloop (split_tac [expand_if])) 2);
  49.201  by (dres_inst_tac [("ts1","$ s a")] (subst_comp_tel RSN (2,trans)) 2);
  49.202 -bd eq_subst_tel_eq_free 2;
  49.203 +by (dtac eq_subst_tel_eq_free 2);
  49.204  by (fast_tac (HOL_cs addIs [free_tv_W,free_tv_le_new_tv] addDs [new_tv_W]) 2);
  49.205  by (asm_full_simp_tac (!simpset addsimps [free_tv_subst,dom_def,not_disj]) 2);
  49.206  
  49.207  by (asm_simp_tac (!simpset setloop (split_tac [expand_bind])) 1); 
  49.208  by (safe_tac HOL_cs );
  49.209 -bd mgu_Ok 1;
  49.210 +by (dtac mgu_Ok 1);
  49.211  by( fast_tac (HOL_cs addss !simpset) 1);
  49.212  by (REPEAT (resolve_tac [exI,conjI] 1));
  49.213  by (fast_tac HOL_cs 1);
  49.214  by (fast_tac HOL_cs 1);
  49.215  by ((dtac mgu_mg 1) THEN (atac 1));
  49.216 -be exE 1;
  49.217 +by (etac exE 1);
  49.218  by (res_inst_tac [("x","rb")] exI 1);
  49.219 -br conjI 1;
  49.220 +by (rtac conjI 1);
  49.221  by (dres_inst_tac [("x","ma")] fun_cong 2);
  49.222  by( asm_full_simp_tac (!simpset addsimps [eq_sym_conv]) 2);
  49.223  by (simp_tac (!simpset addsimps [subst_comp_tel RS sym]) 1);
  49.224  by (res_inst_tac [("ts2","($ sa ($ s a))")] ((subst_comp_tel RS sym) RSN 
  49.225      (2,trans)) 1);
  49.226  by( asm_full_simp_tac (!simpset addsimps [o_def,eq_sym_conv]) 1);
  49.227 -br eq_free_eq_subst_tel 1;
  49.228 +by (rtac eq_free_eq_subst_tel 1);
  49.229  by( safe_tac HOL_cs );
  49.230  by (subgoal_tac "ma ~= na" 1);
  49.231  by ((forward_tac [new_tv_W] 2) THEN (atac 2));
  49.232 -be conjE 2;
  49.233 -bd new_tv_subst_tel 2;
  49.234 +by (etac conjE 2);
  49.235 +by (dtac new_tv_subst_tel 2);
  49.236  by (fast_tac (HOL_cs addIs [new_tv_list_le] addDs [sym RS W_var_geD]) 2);
  49.237  by (( forw_inst_tac [("xd","m")] (sym RSN (2,new_tv_W)) 2) THEN (atac 2));
  49.238 -be conjE 2;
  49.239 -bd (free_tv_app_subst_tel RS subsetD) 2;
  49.240 +by (etac conjE 2);
  49.241 +by (dtac (free_tv_app_subst_tel RS subsetD) 2);
  49.242  by (fast_tac (set_cs addDs [W_var_geD,new_tv_list_le,codD,
  49.243      new_tv_not_free_tv]) 2);
  49.244  by (case_tac "na: free_tv t - free_tv sa" 1);
  49.245 @@ -363,7 +363,7 @@
  49.246  by (asm_full_simp_tac (!simpset setloop (split_tac [expand_if])) 2);
  49.247  (* case na : free_tv t - free_tv sa *)
  49.248  by (asm_full_simp_tac (!simpset setloop (split_tac [expand_if])) 1);
  49.249 -bd (free_tv_app_subst_tel RS subsetD) 1;
  49.250 +by (dtac (free_tv_app_subst_tel RS subsetD) 1);
  49.251  by (fast_tac (set_cs addDs [codD,subst_comp_tel RSN (2,trans),
  49.252      eq_subst_tel_eq_free] addss ((!simpset addsimps 
  49.253      [not_disj,free_tv_subst,dom_def]))) 1);
    50.1 --- a/src/HOL/Nat.ML	Tue Jan 30 15:19:20 1996 +0100
    50.2 +++ b/src/HOL/Nat.ML	Tue Jan 30 15:24:36 1996 +0100
    50.3 @@ -1,6 +1,6 @@
    50.4 -(*  Title: 	HOL/nat
    50.5 +(*  Title:      HOL/nat
    50.6      ID:         $Id$
    50.7 -    Author: 	Tobias Nipkow, Cambridge University Computer Laboratory
    50.8 +    Author:     Tobias Nipkow, Cambridge University Computer Laboratory
    50.9      Copyright   1991  University of Cambridge
   50.10  
   50.11  For nat.thy.  Type nat is defined as a set (Nat) over the type ind.
   50.12 @@ -47,7 +47,7 @@
   50.13  (*Perform induction on n. *)
   50.14  fun nat_ind_tac a i = 
   50.15      EVERY [res_inst_tac [("n",a)] nat_induct i,
   50.16 -	   rename_last_tac a ["1"] (i+1)];
   50.17 +           rename_last_tac a ["1"] (i+1)];
   50.18  
   50.19  (*A special form of induction for reasoning about m<n and m-n*)
   50.20  val prems = goal Nat.thy
   50.21 @@ -133,7 +133,7 @@
   50.22  
   50.23  goalw Nat.thy [nat_case_def] "nat_case a f (Suc k) = f(k)";
   50.24  by (fast_tac (set_cs addIs [select_equality] 
   50.25 -	               addEs [make_elim Suc_inject, Suc_neq_Zero]) 1);
   50.26 +                       addEs [make_elim Suc_inject, Suc_neq_Zero]) 1);
   50.27  qed "nat_case_Suc";
   50.28  
   50.29  (** Introduction rules for 'pred_nat' **)
   50.30 @@ -153,7 +153,7 @@
   50.31  by (strip_tac 1);
   50.32  by (nat_ind_tac "x" 1);
   50.33  by (fast_tac (HOL_cs addSEs [mp, pred_natE, Pair_inject, 
   50.34 -			     make_elim Suc_inject]) 2);
   50.35 +                             make_elim Suc_inject]) 2);
   50.36  by (fast_tac (HOL_cs addSEs [mp, pred_natE, Pair_inject, Zero_neq_Suc]) 1);
   50.37  qed "wf_pred_nat";
   50.38  
   50.39 @@ -245,7 +245,7 @@
   50.40  \    |] ==> P";
   50.41  by (rtac (major RS tranclE) 1);
   50.42  by (REPEAT_FIRST (bound_hyp_subst_tac ORELSE'
   50.43 -		  eresolve_tac (prems@[pred_natE, Pair_inject])));
   50.44 +                  eresolve_tac (prems@[pred_natE, Pair_inject])));
   50.45  by (rtac refl 1);
   50.46  qed "lessE";
   50.47  
   50.48 @@ -271,7 +271,7 @@
   50.49  
   50.50  goal Nat.thy "(m < Suc(n)) = (m < n | m = n)";
   50.51  by (fast_tac (HOL_cs addSIs [lessI]
   50.52 -		     addEs  [less_trans, less_SucE]) 1);
   50.53 +                     addEs  [less_trans, less_SucE]) 1);
   50.54  qed "less_Suc_eq";
   50.55  
   50.56  val prems = goal Nat.thy "m<n ==> n ~= 0";
   50.57 @@ -289,8 +289,8 @@
   50.58  by (rtac impI 1);
   50.59  by (etac less_zeroE 1);
   50.60  by (fast_tac (HOL_cs addSIs [lessI RS less_SucI]
   50.61 -	 	     addSDs [Suc_inject]
   50.62 -		     addEs  [less_trans, lessE]) 1);
   50.63 +                     addSDs [Suc_inject]
   50.64 +                     addEs  [less_trans, lessE]) 1);
   50.65  qed "Suc_lessD";
   50.66  
   50.67  val [major,minor] = goal Nat.thy 
   50.68 @@ -315,8 +315,8 @@
   50.69  by (rtac impI 1);
   50.70  by (etac less_zeroE 1);
   50.71  by (fast_tac (HOL_cs addSIs [lessI]
   50.72 -	 	     addSDs [Suc_inject]
   50.73 -		     addEs  [less_trans, lessE]) 1);
   50.74 +                     addSDs [Suc_inject]
   50.75 +                     addEs  [less_trans, lessE]) 1);
   50.76  qed "Suc_mono";
   50.77  
   50.78  goal Nat.thy "(Suc(m) < Suc(n)) = (m<n)";
    51.1 --- a/src/HOL/Ord.ML	Tue Jan 30 15:19:20 1996 +0100
    51.2 +++ b/src/HOL/Ord.ML	Tue Jan 30 15:24:36 1996 +0100
    51.3 @@ -1,6 +1,6 @@
    51.4 -(*  Title: 	HOL/Ord.ML
    51.5 +(*  Title:      HOL/Ord.ML
    51.6      ID:         $Id$
    51.7 -    Author: 	Tobias Nipkow, Cambridge University Computer Laboratory
    51.8 +    Author:     Tobias Nipkow, Cambridge University Computer Laboratory
    51.9      Copyright   1993  University of Cambridge
   51.10  
   51.11  The type class for ordered types
    52.1 --- a/src/HOL/Prod.ML	Tue Jan 30 15:19:20 1996 +0100
    52.2 +++ b/src/HOL/Prod.ML	Tue Jan 30 15:24:36 1996 +0100
    52.3 @@ -1,6 +1,6 @@
    52.4 -(*  Title: 	HOL/prod
    52.5 +(*  Title:      HOL/prod
    52.6      ID:         $Id$
    52.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    52.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    52.9      Copyright   1991  University of Cambridge
   52.10  
   52.11  For prod.thy.  Ordered Pairs, the Cartesian product type, the unit type
   52.12 @@ -16,7 +16,7 @@
   52.13  val [major] = goalw Prod.thy [Pair_Rep_def]
   52.14      "Pair_Rep a b = Pair_Rep a' b' ==> a=a' & b=b'";
   52.15  by (EVERY1 [rtac (major RS fun_cong RS fun_cong RS subst), 
   52.16 -	    rtac conjI, rtac refl, rtac refl]);
   52.17 +            rtac conjI, rtac refl, rtac refl]);
   52.18  qed "Pair_Rep_inject";
   52.19  
   52.20  goal Prod.thy "inj_onto Abs_Prod Prod";
   52.21 @@ -45,7 +45,7 @@
   52.22  goalw Prod.thy [Pair_def] "? x y. p = (x,y)";
   52.23  by (rtac (rewrite_rule [Prod_def] Rep_Prod RS CollectE) 1);
   52.24  by (EVERY1[etac exE, etac exE, rtac exI, rtac exI,
   52.25 -	   rtac (Rep_Prod_inverse RS sym RS trans),  etac arg_cong]);
   52.26 +           rtac (Rep_Prod_inverse RS sym RS trans),  etac arg_cong]);
   52.27  qed "PairE_lemma";
   52.28  
   52.29  val [prem] = goal Prod.thy "[| !!x y. p = (x,y) ==> Q |] ==> Q";
   52.30 @@ -271,5 +271,5 @@
   52.31  val prod_cs = set_cs addSIs [SigmaI, splitI, splitI2, mem_splitI, mem_splitI2] 
   52.32                       addIs  [fst_imageI, snd_imageI, prod_fun_imageI]
   52.33                       addSEs [SigmaE2, SigmaE, splitE, mem_splitE, 
   52.34 -			     fst_imageE, snd_imageE, prod_fun_imageE,
   52.35 -			     Pair_inject];
   52.36 +                             fst_imageE, snd_imageE, prod_fun_imageE,
   52.37 +                             Pair_inject];
    53.1 --- a/src/HOL/Relation.ML	Tue Jan 30 15:19:20 1996 +0100
    53.2 +++ b/src/HOL/Relation.ML	Tue Jan 30 15:24:36 1996 +0100
    53.3 @@ -1,7 +1,7 @@
    53.4 -(*  Title: 	Relation.ML
    53.5 +(*  Title:      Relation.ML
    53.6      ID:         $Id$
    53.7 -    Authors: 	Riccardo Mattolini, Dip. Sistemi e Informatica
    53.8 -        	Lawrence C Paulson, Cambridge University Computer Laboratory
    53.9 +    Authors:    Riccardo Mattolini, Dip. Sistemi e Informatica
   53.10 +                Lawrence C Paulson, Cambridge University Computer Laboratory
   53.11      Copyright   1994 Universita' di Firenze
   53.12      Copyright   1993  University of Cambridge
   53.13  *)
   53.14 @@ -100,7 +100,7 @@
   53.15      (assume_tac 1) ]);
   53.16  
   53.17  val converse_cs = comp_cs addSIs [converseI] 
   53.18 -			  addSEs [converseD,converseE];
   53.19 +                          addSEs [converseD,converseE];
   53.20  
   53.21  (** Domain **)
   53.22  
   53.23 @@ -138,13 +138,13 @@
   53.24  qed_goal "Image_singleton_iff" Relation.thy
   53.25      "(b : r^^{a}) = ((a,b):r)"
   53.26   (fn _ => [ rtac (Image_iff RS trans) 1,
   53.27 -	    fast_tac comp_cs 1 ]);
   53.28 +            fast_tac comp_cs 1 ]);
   53.29  
   53.30  qed_goalw "ImageI" Relation.thy [Image_def]
   53.31      "!!a b r. [| (a,b): r;  a:A |] ==> b : r^^A"
   53.32   (fn _ => [ (REPEAT (ares_tac [CollectI,RangeI,bexI] 1)),
   53.33              (resolve_tac [conjI ] 1),
   53.34 -            (resolve_tac [RangeI] 1),
   53.35 +            (rtac RangeI 1),
   53.36              (REPEAT (fast_tac set_cs 1))]);
   53.37  
   53.38  qed_goalw "ImageE" Relation.thy [Image_def]
    54.1 --- a/src/HOL/Set.ML	Tue Jan 30 15:19:20 1996 +0100
    54.2 +++ b/src/HOL/Set.ML	Tue Jan 30 15:24:36 1996 +0100
    54.3 @@ -1,6 +1,6 @@
    54.4 -(*  Title: 	HOL/set
    54.5 +(*  Title:      HOL/set
    54.6      ID:         $Id$
    54.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    54.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    54.9      Copyright   1991  University of Cambridge
   54.10  
   54.11  For set.thy.  Set theory for higher-order logic.  A set is simply a predicate.
   54.12 @@ -339,7 +339,7 @@
   54.13  \    (UN x:A. C(x)) = (UN x:B. D(x))";
   54.14  by (REPEAT (etac UN_E 1
   54.15       ORELSE ares_tac ([UN_I,equalityI,subsetI] @ 
   54.16 -		      (prems RL [equalityD1,equalityD2] RL [subsetD])) 1));
   54.17 +                      (prems RL [equalityD1,equalityD2] RL [subsetD])) 1));
   54.18  qed "UN_cong";
   54.19  
   54.20  
    55.1 --- a/src/HOL/Sexp.ML	Tue Jan 30 15:19:20 1996 +0100
    55.2 +++ b/src/HOL/Sexp.ML	Tue Jan 30 15:24:36 1996 +0100
    55.3 @@ -1,6 +1,6 @@
    55.4 -(*  Title: 	HOL/Sexp
    55.5 +(*  Title:      HOL/Sexp
    55.6      ID:         $Id$
    55.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    55.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    55.9      Copyright   1994  University of Cambridge
   55.10  
   55.11  S-expressions, general binary trees for defining recursive data structures
   55.12 @@ -12,22 +12,22 @@
   55.13  
   55.14  val sexp_free_cs = 
   55.15      set_cs addSDs [Leaf_inject, Numb_inject, Scons_inject] 
   55.16 -	   addSEs [Leaf_neq_Scons, Leaf_neq_Numb,
   55.17 -		   Numb_neq_Scons, Numb_neq_Leaf,
   55.18 -		   Scons_neq_Leaf, Scons_neq_Numb];
   55.19 +           addSEs [Leaf_neq_Scons, Leaf_neq_Numb,
   55.20 +                   Numb_neq_Scons, Numb_neq_Leaf,
   55.21 +                   Scons_neq_Leaf, Scons_neq_Numb];
   55.22  
   55.23  goalw Sexp.thy [sexp_case_def] "sexp_case c d e (Leaf a) = c(a)";
   55.24 -by (resolve_tac [select_equality] 1);
   55.25 +by (rtac select_equality 1);
   55.26  by (ALLGOALS (fast_tac sexp_free_cs));
   55.27  qed "sexp_case_Leaf";
   55.28  
   55.29  goalw Sexp.thy [sexp_case_def] "sexp_case c d e (Numb k) = d(k)";
   55.30 -by (resolve_tac [select_equality] 1);
   55.31 +by (rtac select_equality 1);
   55.32  by (ALLGOALS (fast_tac sexp_free_cs));
   55.33  qed "sexp_case_Numb";
   55.34  
   55.35  goalw Sexp.thy [sexp_case_def] "sexp_case c d e (M$N) = e M N";
   55.36 -by (resolve_tac [select_equality] 1);
   55.37 +by (rtac select_equality 1);
   55.38  by (ALLGOALS (fast_tac sexp_free_cs));
   55.39  qed "sexp_case_Scons";
   55.40  
   55.41 @@ -88,7 +88,7 @@
   55.42  
   55.43  (*Proves goals of the form (M,N):pred_sexp^+ provided M,N:sexp*)
   55.44  Addsimps (sexp.intrs @ [pred_sexp_t1, pred_sexp_t2,
   55.45 -	                pred_sexp_trans1, pred_sexp_trans2, cut_apply]);
   55.46 +                        pred_sexp_trans1, pred_sexp_trans2, cut_apply]);
   55.47  
   55.48  val major::prems = goalw Sexp.thy [pred_sexp_def]
   55.49      "[| p : pred_sexp;  \
    56.1 --- a/src/HOL/Subst/AList.ML	Tue Jan 30 15:19:20 1996 +0100
    56.2 +++ b/src/HOL/Subst/AList.ML	Tue Jan 30 15:24:36 1996 +0100
    56.3 @@ -1,5 +1,5 @@
    56.4 -(*  Title: 	Substitutions/AList.ML
    56.5 -    Author: 	Martin Coen, Cambridge University Computer Laboratory
    56.6 +(*  Title:      Substitutions/AList.ML
    56.7 +    Author:     Martin Coen, Cambridge University Computer Laboratory
    56.8      Copyright   1993  University of Cambridge
    56.9  
   56.10  For AList.thy.
   56.11 @@ -30,4 +30,4 @@
   56.12  (*Perform induction on xs. *)
   56.13  fun alist_ind_tac a M = 
   56.14      EVERY [res_inst_tac [("l",a)] alist_induct M,
   56.15 -	   rename_last_tac a ["1"] (M+1)];
   56.16 +           rename_last_tac a ["1"] (M+1)];
    57.1 --- a/src/HOL/Subst/ROOT.ML	Tue Jan 30 15:19:20 1996 +0100
    57.2 +++ b/src/HOL/Subst/ROOT.ML	Tue Jan 30 15:24:36 1996 +0100
    57.3 @@ -1,6 +1,6 @@
    57.4 -(*  Title: 	HOL/Subst/ROOT.ML
    57.5 +(*  Title:      HOL/Subst/ROOT.ML
    57.6      ID:         $Id$
    57.7 -    Author: 	Martin Coen, Cambridge University Computer Laboratory
    57.8 +    Author:     Martin Coen, Cambridge University Computer Laboratory
    57.9      Copyright   1993  University of Cambridge
   57.10  
   57.11  Substitution and Unification in Higher-Order Logic. 
    58.1 --- a/src/HOL/Subst/Setplus.ML	Tue Jan 30 15:19:20 1996 +0100
    58.2 +++ b/src/HOL/Subst/Setplus.ML	Tue Jan 30 15:24:36 1996 +0100
    58.3 @@ -1,5 +1,5 @@
    58.4 -(*  Title: 	Substitutions/setplus.ML
    58.5 -    Author: 	Martin Coen, Cambridge University Computer Laboratory
    58.6 +(*  Title:      Substitutions/setplus.ML
    58.7 +    Author:     Martin Coen, Cambridge University Computer Laboratory
    58.8      Copyright   1993  University of Cambridge
    58.9  
   58.10  For setplus.thy.
    59.1 --- a/src/HOL/Subst/Subst.ML	Tue Jan 30 15:19:20 1996 +0100
    59.2 +++ b/src/HOL/Subst/Subst.ML	Tue Jan 30 15:24:36 1996 +0100
    59.3 @@ -1,6 +1,6 @@
    59.4 -(*  Title: 	HOL/Subst/subst.ML
    59.5 +(*  Title:      HOL/Subst/subst.ML
    59.6      ID:         $Id$
    59.7 -    Author: 	Martin Coen, Cambridge University Computer Laboratory
    59.8 +    Author:     Martin Coen, Cambridge University Computer Laboratory
    59.9      Copyright   1993  University of Cambridge
   59.10  
   59.11  For subst.thy.  
   59.12 @@ -124,7 +124,7 @@
   59.13  
   59.14  val [prem] = goal Subst.thy "q <> r =s= s ==>  t <| q <| r = t <| s";
   59.15  by (simp_tac (subst_ss addsimps [prem RS (subst_eq_iff RS iffD1),
   59.16 -				subst_comp RS sym]) 1);
   59.17 +                                subst_comp RS sym]) 1);
   59.18  qed "comp_subst_subst";
   59.19  
   59.20  (****  Domain and range of Substitutions ****)
    60.1 --- a/src/HOL/Subst/UTLemmas.ML	Tue Jan 30 15:19:20 1996 +0100
    60.2 +++ b/src/HOL/Subst/UTLemmas.ML	Tue Jan 30 15:24:36 1996 +0100
    60.3 @@ -1,6 +1,6 @@
    60.4 -(*  Title: 	HOL/Subst/UTLemmas.ML
    60.5 +(*  Title:      HOL/Subst/UTLemmas.ML
    60.6      ID:         $Id$
    60.7 -    Author: 	Martin Coen, Cambridge University Computer Laboratory
    60.8 +    Author:     Martin Coen, Cambridge University Computer Laboratory
    60.9      Copyright   1993  University of Cambridge
   60.10  
   60.11  For UTLemmas.thy.  
    61.1 --- a/src/HOL/Subst/UTerm.ML	Tue Jan 30 15:19:20 1996 +0100
    61.2 +++ b/src/HOL/Subst/UTerm.ML	Tue Jan 30 15:24:36 1996 +0100
    61.3 @@ -1,6 +1,6 @@
    61.4 -(*  Title: 	HOL/Subst/UTerm.ML
    61.5 +(*  Title:      HOL/Subst/UTerm.ML
    61.6      ID:         $Id$
    61.7 -    Author: 	Martin Coen, Cambridge University Computer Laboratory
    61.8 +    Author:     Martin Coen, Cambridge University Computer Laboratory
    61.9      Copyright   1993  University of Cambridge
   61.10  
   61.11  Simple term structure for unifiation.
   61.12 @@ -50,7 +50,7 @@
   61.13  (*Perform induction on xs. *)
   61.14  fun uterm_ind_tac a M = 
   61.15      EVERY [res_inst_tac [("t",a)] uterm_induct M,
   61.16 -	   rename_last_tac a ["1"] (M+1)];
   61.17 +           rename_last_tac a ["1"] (M+1)];
   61.18  
   61.19  
   61.20  (*** Isomorphisms ***)
   61.21 @@ -139,12 +139,12 @@
   61.22  
   61.23  (*For reasoning about abstract uterm constructors*)
   61.24  val uterm_cs = set_cs addIs uterm.intrs @ [Rep_uterm]
   61.25 -	              addSEs [CONST_neq_COMB,COMB_neq_VAR,VAR_neq_CONST,
   61.26 -			      COMB_neq_CONST,VAR_neq_COMB,CONST_neq_VAR,
   61.27 -			      COMB_inject]
   61.28 -		      addSDs [VAR_inject,CONST_inject,
   61.29 -			      inj_onto_Abs_uterm RS inj_ontoD,
   61.30 -			      inj_Rep_uterm RS injD, Leaf_inject];
   61.31 +                      addSEs [CONST_neq_COMB,COMB_neq_VAR,VAR_neq_CONST,
   61.32 +                              COMB_neq_CONST,VAR_neq_COMB,CONST_neq_VAR,
   61.33 +                              COMB_inject]
   61.34 +                      addSDs [VAR_inject,CONST_inject,
   61.35 +                              inj_onto_Abs_uterm RS inj_ontoD,
   61.36 +                              inj_Rep_uterm RS injD, Leaf_inject];
   61.37  
   61.38  goalw UTerm.thy [Var_def] "(Var(x)=Var(y)) = (x=y)";
   61.39  by (fast_tac uterm_cs 1);
   61.40 @@ -222,7 +222,7 @@
   61.41  qed "UTerm_rec_CONST";
   61.42  
   61.43  goalw UTerm.thy [COMB_def]
   61.44 -    "!!M N. [| M: sexp;  N: sexp |] ==> 	\
   61.45 +    "!!M N. [| M: sexp;  N: sexp |] ==>         \
   61.46  \           UTerm_rec (COMB M N) b c d = \
   61.47  \           d M N (UTerm_rec M b c d) (UTerm_rec N b c d)";
   61.48  by (rtac (UTerm_rec_unfold RS trans) 1);
    62.1 --- a/src/HOL/Subst/Unifier.ML	Tue Jan 30 15:19:20 1996 +0100
    62.2 +++ b/src/HOL/Subst/Unifier.ML	Tue Jan 30 15:24:36 1996 +0100
    62.3 @@ -1,6 +1,6 @@
    62.4 -(*  Title: 	HOL/Subst/unifier.ML
    62.5 +(*  Title:      HOL/Subst/unifier.ML
    62.6      ID:         $Id$
    62.7 -    Author: 	Martin Coen, Cambridge University Computer Laboratory
    62.8 +    Author:     Martin Coen, Cambridge University Computer Laboratory
    62.9      Copyright   1993  University of Cambridge
   62.10  
   62.11  For unifier.thy.
   62.12 @@ -95,13 +95,13 @@
   62.13  val [prem] = goalw Unifier.thy [Idem_def]
   62.14       "Idem(r) ==>  Unifier s (t <| r) (u <| r) --> Unifier (r <> s) (t <| r) (u <| r)";
   62.15  by (simp_tac (subst_ss addsimps 
   62.16 -	      [Unifier_iff,subst_comp,prem RS comp_subst_subst]) 1);
   62.17 +              [Unifier_iff,subst_comp,prem RS comp_subst_subst]) 1);
   62.18  val Unifier_Idem_subst  = store_thm("Unifier_Idem_subst", result() RS mp);
   62.19  
   62.20  val [prem] = goal Unifier.thy 
   62.21       "r <> s =s= s ==>  Unifier s t u --> Unifier s (t <| r) (u <| r)";
   62.22  by (simp_tac (subst_ss addsimps 
   62.23 -	      [Unifier_iff,subst_comp,prem RS comp_subst_subst]) 1);
   62.24 +              [Unifier_iff,subst_comp,prem RS comp_subst_subst]) 1);
   62.25  val Unifier_comp_subst  = store_thm("Unifier_comp_subst", result() RS mp);
   62.26  
   62.27  (*** The domain of a MGIU is a subset of the variables in the terms ***)
   62.28 @@ -120,7 +120,7 @@
   62.29  by (simp_tac (subst_ss addsimps [not_equal_iff]) 1);
   62.30  by (REPEAT (resolve_tac [impI,disjI2] 1));
   62.31  by(res_inst_tac [("x","x")] exI 1);
   62.32 -br conjI 1;
   62.33 +by (rtac conjI 1);
   62.34  by (asm_simp_tac (subst_ss addsimps [Var_elim,subst_comp,repl_invariance]) 1);
   62.35  by (asm_simp_tac (subst_ss addsimps [Var_subst]) 1);
   62.36  val MGIU_sdom_lemma = store_thm("MGIU_sdom_lemma", result() RS mp RS mp RS lemma_lemma RS notE);
   62.37 @@ -184,7 +184,7 @@
   62.38  
   62.39  goal Unifier.thy "MGIUnifier [] (Const n) (Const n)";
   62.40  by (simp_tac (subst_ss addsimps
   62.41 -	      [MGIU_iff,MGU_iff,Unifier_iff,subst_eq_iff,Idem_Nil]) 1);
   62.42 +              [MGIU_iff,MGU_iff,Unifier_iff,subst_eq_iff,Idem_Nil]) 1);
   62.43  qed "Unify1";
   62.44  
   62.45  goal Unifier.thy "~m=n --> (ALL l.~Unifier l (Const m) (Const n))";
   62.46 @@ -198,7 +198,7 @@
   62.47  
   62.48  val [prem] = goal Unifier.thy "Var(v) <: t ==> (ALL l.~Unifier l (Var v) t)";
   62.49  by (simp_tac (subst_ss addsimps
   62.50 -	      [Unifier_iff,prem RS subst_mono RS occs_irrefl2]) 1);
   62.51 +              [Unifier_iff,prem RS subst_mono RS occs_irrefl2]) 1);
   62.52  qed "Unify4";
   62.53  
   62.54  goal Unifier.thy "ALL l.~Unifier l (Const m) (Comb t u)";
   62.55 @@ -221,7 +221,7 @@
   62.56  \     (! q.Unifier q (t <| r) (u <| r) --> s <> q =s= q) |] ==> \
   62.57  \     Idem(r <> s)";
   62.58  by (cut_facts_tac [p1,
   62.59 -		   p2 RS (p1 RS Unifier_Idem_subst RS (p3 RS spec RS mp))] 1);
   62.60 +                   p2 RS (p1 RS Unifier_Idem_subst RS (p3 RS spec RS mp))] 1);
   62.61  by (REPEAT_SOME (etac rev_mp));
   62.62  by (simp_tac (subst_ss addsimps [raw_Idem_iff,subst_eq_iff,subst_comp]) 1);
   62.63  qed "Unify8_lemma1";
   62.64 @@ -232,7 +232,7 @@
   62.65  \   r <> s <> q =s= q";
   62.66  val pp = p1 RS (p3 RS spec RS mp);
   62.67  by (cut_facts_tac [pp,
   62.68 -		   p2 RS (pp RS Unifier_comp_subst) RS (p4 RS spec RS mp)] 1);
   62.69 +                   p2 RS (pp RS Unifier_comp_subst) RS (p4 RS spec RS mp)] 1);
   62.70  by (REPEAT_SOME (etac rev_mp));
   62.71  by (simp_tac (subst_ss addsimps [subst_eq_iff,subst_comp]) 1);
   62.72  qed "Unify8_lemma2";
   62.73 @@ -243,9 +243,9 @@
   62.74  by (safe_tac HOL_cs);
   62.75  by (REPEAT (etac rev_mp 2));
   62.76  by (simp_tac (subst_ss addsimps 
   62.77 -	      [Unifier_iff,MGIU_iff,subst_comp,comp_assoc]) 2);
   62.78 +              [Unifier_iff,MGIU_iff,subst_comp,comp_assoc]) 2);
   62.79  by (ALLGOALS (fast_tac (set_cs addEs 
   62.80 -			[Unifier_Comb,Unify8_lemma1,Unify8_lemma2])));
   62.81 +                        [Unifier_Comb,Unify8_lemma1,Unify8_lemma2])));
   62.82  qed "Unify8";
   62.83  
   62.84  
   62.85 @@ -268,7 +268,7 @@
   62.86  by (etac subset_trans 1);
   62.87  by (ALLGOALS (simp_tac (subst_ss addsimps [Var_intro,subset_iff])));
   62.88  by (ALLGOALS (fast_tac (set_cs addDs 
   62.89 -			[Var_intro,prem RS MGIU_srange RS subsetD])));
   62.90 +                        [Var_intro,prem RS MGIU_srange RS subsetD])));
   62.91  qed "UWFD2_lemma1";
   62.92  
   62.93  val [major,minor] = goal Unifier.thy 
    63.1 --- a/src/HOL/Sum.ML	Tue Jan 30 15:19:20 1996 +0100
    63.2 +++ b/src/HOL/Sum.ML	Tue Jan 30 15:24:36 1996 +0100
    63.3 @@ -1,6 +1,6 @@
    63.4 -(*  Title: 	HOL/Sum.ML
    63.5 +(*  Title:      HOL/Sum.ML
    63.6      ID:         $Id$
    63.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    63.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    63.9      Copyright   1991  University of Cambridge
   63.10  
   63.11  For Sum.thy.  The disjoint sum of two types
   63.12 @@ -28,9 +28,9 @@
   63.13  
   63.14  goalw Sum.thy [Inl_Rep_def, Inr_Rep_def] "Inl_Rep(a) ~= Inr_Rep(b)";
   63.15  by (EVERY1 [rtac notI,
   63.16 -	    etac (fun_cong RS fun_cong RS fun_cong RS iffE), 
   63.17 -	    rtac (notE RS ccontr),  etac (mp RS conjunct2), 
   63.18 -	    REPEAT o (ares_tac [refl,conjI]) ]);
   63.19 +            etac (fun_cong RS fun_cong RS fun_cong RS iffE), 
   63.20 +            rtac (notE RS ccontr),  etac (mp RS conjunct2), 
   63.21 +            REPEAT o (ares_tac [refl,conjI]) ]);
   63.22  qed "Inl_Rep_not_Inr_Rep";
   63.23  
   63.24  goalw Sum.thy [Inl_def,Inr_def] "Inl(a) ~= Inr(b)";
   63.25 @@ -136,14 +136,14 @@
   63.26  by (rtac (rewrite_rule [Sum_def] Rep_Sum RS CollectE) 1);
   63.27  by (REPEAT (eresolve_tac [disjE,exE] 1
   63.28       ORELSE EVERY1 [resolve_tac prems, 
   63.29 -		    etac subst,
   63.30 -		    rtac (Rep_Sum_inverse RS sym)]));
   63.31 +                    etac subst,
   63.32 +                    rtac (Rep_Sum_inverse RS sym)]));
   63.33  qed "sumE";
   63.34  
   63.35  goal Sum.thy "sum_case (%x::'a. f(Inl x)) (%y::'b. f(Inr y)) s = f(s)";
   63.36  by (EVERY1 [res_inst_tac [("s","s")] sumE, 
   63.37 -	    etac ssubst, rtac sum_case_Inl,
   63.38 -	    etac ssubst, rtac sum_case_Inr]);
   63.39 +            etac ssubst, rtac sum_case_Inl,
   63.40 +            etac ssubst, rtac sum_case_Inr]);
   63.41  qed "surjective_sum";
   63.42  
   63.43  goal Sum.thy "R(sum_case f g s) = \
    64.1 --- a/src/HOL/Trancl.ML	Tue Jan 30 15:19:20 1996 +0100
    64.2 +++ b/src/HOL/Trancl.ML	Tue Jan 30 15:24:36 1996 +0100
    64.3 @@ -1,6 +1,6 @@
    64.4 -(*  Title: 	HOL/trancl
    64.5 +(*  Title:      HOL/trancl
    64.6      ID:         $Id$
    64.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    64.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    64.9      Copyright   1992  University of Cambridge
   64.10  
   64.11  For trancl.thy.  Theorems about the transitive closure of a relation
   64.12 @@ -56,7 +56,7 @@
   64.13  val major::prems = goal Trancl.thy
   64.14      "[| (a::'a,b) : r^*;    \
   64.15  \       P(a); \
   64.16 -\	!!y z.[| (a,y) : r^*;  (y,z) : r;  P(y) |] ==> P(z) |]  \
   64.17 +\       !!y z.[| (a,y) : r^*;  (y,z) : r;  P(y) |] ==> P(z) |]  \
   64.18  \     ==> P(b)";
   64.19  (*by induction on this formula*)
   64.20  by (subgoal_tac "! y. (a::'a,b) = (a,y) --> P(y)" 1);
   64.21 @@ -76,8 +76,8 @@
   64.22  
   64.23  (*elimination of rtrancl -- by induction on a special formula*)
   64.24  val major::prems = goal Trancl.thy
   64.25 -    "[| (a::'a,b) : r^*;  (a = b) ==> P; 	\
   64.26 -\	!!y.[| (a,y) : r^*; (y,b) : r |] ==> P 	\
   64.27 +    "[| (a::'a,b) : r^*;  (a = b) ==> P;        \
   64.28 +\       !!y.[| (a,y) : r^*; (y,b) : r |] ==> P  \
   64.29  \    |] ==> P";
   64.30  by (subgoal_tac "(a::'a) = b  | (? y. (a,y) : r^* & (y,b) : r)" 1);
   64.31  by (rtac (major RS rtrancl_induct) 2);
   64.32 @@ -123,7 +123,7 @@
   64.33  val major::prems = goal Trancl.thy
   64.34      "[| (a::'a,b) : r^+;  \
   64.35  \       (a,b) : r ==> P; \
   64.36 -\	!!y.[| (a,y) : r^+;  (y,b) : r |] ==> P  \
   64.37 +\       !!y.[| (a,y) : r^+;  (y,b) : r |] ==> P  \
   64.38  \    |] ==> P";
   64.39  by (subgoal_tac "(a::'a,b) : r | (? y. (a,y) : r^+  &  (y,b) : r)" 1);
   64.40  by (REPEAT (eresolve_tac ([asm_rl,disjE,exE,conjE]@prems) 1));
   64.41 @@ -152,20 +152,20 @@
   64.42  (** More about r^* **)
   64.43  
   64.44  goal Trancl.thy "(r^*)^* = r^*";
   64.45 -br set_ext 1;
   64.46 +by (rtac set_ext 1);
   64.47  by(res_inst_tac [("p","x")] PairE 1);
   64.48  by(hyp_subst_tac 1);
   64.49 -br iffI 1;
   64.50 -be rtrancl_induct 1;
   64.51 -br rtrancl_refl 1;
   64.52 +by (rtac iffI 1);
   64.53 +by (etac rtrancl_induct 1);
   64.54 +by (rtac rtrancl_refl 1);
   64.55  by(fast_tac (HOL_cs addEs [rtrancl_trans]) 1);
   64.56 -be r_into_rtrancl 1;
   64.57 +by (etac r_into_rtrancl 1);
   64.58  qed "rtrancl_idemp";
   64.59  Addsimps [rtrancl_idemp];
   64.60  
   64.61  goal Trancl.thy "!!R. [| R <= S; S <= R^* |] ==> S^* = R^*";
   64.62 -bd rtrancl_mono 1;
   64.63 -bd rtrancl_mono 1;
   64.64 +by (dtac rtrancl_mono 1);
   64.65 +by (dtac rtrancl_mono 1);
   64.66  by(Asm_full_simp_tac 1);
   64.67  by(fast_tac eq_cs 1);
   64.68  qed "rtrancl_subset";
   64.69 @@ -181,16 +181,16 @@
   64.70  Addsimps [rtrancl_reflcl];
   64.71  
   64.72  goal Trancl.thy "!!r. (x,y) : (converse r)^* ==> (x,y) : converse(r^*)";
   64.73 -br converseI 1;
   64.74 -be rtrancl_induct 1;
   64.75 -br rtrancl_refl 1;
   64.76 +by (rtac converseI 1);
   64.77 +by (etac rtrancl_induct 1);
   64.78 +by (rtac rtrancl_refl 1);
   64.79  by(fast_tac (rel_cs addIs [r_into_rtrancl,rtrancl_trans]) 1);
   64.80  qed "rtrancl_converseD";
   64.81  
   64.82  goal Trancl.thy "!!r. (x,y) : converse(r^*) ==> (x,y) : (converse r)^*";
   64.83 -bd converseD 1;
   64.84 -be rtrancl_induct 1;
   64.85 -br rtrancl_refl 1;
   64.86 +by (dtac converseD 1);
   64.87 +by (etac rtrancl_induct 1);
   64.88 +by (rtac rtrancl_refl 1);
   64.89  by(fast_tac (rel_cs addIs [r_into_rtrancl,rtrancl_trans]) 1);
   64.90  qed "rtrancl_converseI";
   64.91  
   64.92 @@ -198,7 +198,7 @@
   64.93  by(safe_tac (rel_eq_cs addSIs [rtrancl_converseI]));
   64.94  by(res_inst_tac [("p","x")] PairE 1);
   64.95  by(hyp_subst_tac 1);
   64.96 -be rtrancl_converseD 1;
   64.97 +by (etac rtrancl_converseD 1);
   64.98  qed "rtrancl_converse";
   64.99  
  64.100  
    65.1 --- a/src/HOL/Univ.ML	Tue Jan 30 15:19:20 1996 +0100
    65.2 +++ b/src/HOL/Univ.ML	Tue Jan 30 15:24:36 1996 +0100
    65.3 @@ -1,6 +1,6 @@
    65.4 -(*  Title: 	HOL/univ
    65.5 +(*  Title:      HOL/univ
    65.6      ID:         $Id$
    65.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    65.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    65.9      Copyright   1991  University of Cambridge
   65.10  
   65.11  For univ.thy
   65.12 @@ -95,7 +95,7 @@
   65.13  (*** Isomorphisms ***)
   65.14  
   65.15  goal Univ.thy "inj(Rep_Node)";
   65.16 -by (rtac inj_inverseI 1);	(*cannot combine by RS: multiple unifiers*)
   65.17 +by (rtac inj_inverseI 1);       (*cannot combine by RS: multiple unifiers*)
   65.18  by (rtac Rep_Node_inverse 1);
   65.19  qed "inj_Rep_Node";
   65.20  
   65.21 @@ -128,7 +128,7 @@
   65.22  by (etac (equalityD2 RS subsetD RS UnE) 1);
   65.23  by (rtac singletonI 1);
   65.24  by (REPEAT (eresolve_tac [imageE, Abs_Node_inject RS apfst_convE, 
   65.25 -			  Pair_inject, sym RS Push_neq_K0] 1
   65.26 +                          Pair_inject, sym RS Push_neq_K0] 1
   65.27       ORELSE resolve_tac [Node_K0_I, Rep_Node RS Node_Push_I] 1));
   65.28  qed "Scons_not_Atom";
   65.29  bind_thm ("Atom_not_Scons", (Scons_not_Atom RS not_sym));
   65.30 @@ -183,13 +183,13 @@
   65.31  val [major] = goalw Univ.thy [Scons_def] "M$N <= M'$N' ==> M<=M'";
   65.32  by (cut_facts_tac [major] 1);
   65.33  by (fast_tac (set_cs addSDs [Suc_inject]
   65.34 -		     addSEs [Push_Node_inject, Zero_neq_Suc]) 1);
   65.35 +                     addSEs [Push_Node_inject, Zero_neq_Suc]) 1);
   65.36  qed "Scons_inject_lemma1";
   65.37  
   65.38  val [major] = goalw Univ.thy [Scons_def] "M$N <= M'$N' ==> N<=N'";
   65.39  by (cut_facts_tac [major] 1);
   65.40  by (fast_tac (set_cs addSDs [Suc_inject]
   65.41 -		     addSEs [Push_Node_inject, Suc_neq_Zero]) 1);
   65.42 +                     addSEs [Push_Node_inject, Suc_neq_Zero]) 1);
   65.43  qed "Scons_inject_lemma2";
   65.44  
   65.45  val [major] = goal Univ.thy "M$N = M'$N' ==> M=M'";
   65.46 @@ -274,7 +274,7 @@
   65.47  by (stac (Rep_Node RS Node_Push_I RS Abs_Node_inverse) 1);
   65.48  by (cut_facts_tac [rewrite_rule [Node_def] Rep_Node] 1);
   65.49  by (safe_tac set_cs);
   65.50 -be ssubst 1;  (*instantiates type variables!*)
   65.51 +by (etac ssubst 1);  (*instantiates type variables!*)
   65.52  by (Simp_tac 1);
   65.53  by (rtac Least_equality 1);
   65.54  by (rewtac Push_def);
   65.55 @@ -309,8 +309,8 @@
   65.56  by (safe_tac (set_cs addSIs [equalityI,imageI]));
   65.57  by (REPEAT (stac ndepth_Push_Node 3 THEN etac Suc_mono 3));
   65.58  by (REPEAT (rtac Suc_less_SucD 1 THEN 
   65.59 -	    rtac (ndepth_Push_Node RS subst) 1 THEN 
   65.60 -	    assume_tac 1));
   65.61 +            rtac (ndepth_Push_Node RS subst) 1 THEN 
   65.62 +            assume_tac 1));
   65.63  qed "ntrunc_Scons";
   65.64  
   65.65  (** Injection nodes **)
   65.66 @@ -413,7 +413,7 @@
   65.67  val [major] = goalw Univ.thy [ntrunc_def]
   65.68      "(!!k. ntrunc k M <= N) ==> M<=N";
   65.69  by (fast_tac (set_cs addIs [less_add_Suc1, less_add_Suc2, 
   65.70 -			    major RS subsetD]) 1);
   65.71 +                            major RS subsetD]) 1);
   65.72  qed "ntrunc_subsetD";
   65.73  
   65.74  (*A generalized form of the take-lemma*)
   65.75 @@ -462,12 +462,12 @@
   65.76  
   65.77  goalw Univ.thy [Case_def] "Case c d (In0 M) = c(M)";
   65.78  by (fast_tac (set_cs addIs [select_equality] 
   65.79 -		     addEs [make_elim In0_inject, In0_neq_In1]) 1);
   65.80 +                     addEs [make_elim In0_inject, In0_neq_In1]) 1);
   65.81  qed "Case_In0";
   65.82  
   65.83  goalw Univ.thy [Case_def] "Case c d (In1 N) = d(N)";
   65.84  by (fast_tac (set_cs addIs [select_equality] 
   65.85 -		     addEs [make_elim In1_inject, In1_neq_In0]) 1);
   65.86 +                     addEs [make_elim In1_inject, In1_neq_In0]) 1);
   65.87  qed "Case_In1";
   65.88  
   65.89  (**** UN x. B(x) rules ****)
   65.90 @@ -485,11 +485,11 @@
   65.91  qed "Scons_UN1_y";
   65.92  
   65.93  goalw Univ.thy [In0_def] "In0(UN x.f(x)) = (UN x. In0(f(x)))";
   65.94 -br Scons_UN1_y 1;
   65.95 +by (rtac Scons_UN1_y 1);
   65.96  qed "In0_UN1";
   65.97  
   65.98  goalw Univ.thy [In1_def] "In1(UN x.f(x)) = (UN x. In1(f(x)))";
   65.99 -br Scons_UN1_y 1;
  65.100 +by (rtac Scons_UN1_y 1);
  65.101  qed "In1_UN1";
  65.102  
  65.103  
  65.104 @@ -606,7 +606,7 @@
  65.105  
  65.106  goal Univ.thy "fst `` (r<++>s) = (fst``r) <+> (fst``s)";
  65.107  by (fast_tac (prod_cs addIs [equalityI, usum_In0I, usum_In1I, 
  65.108 -			     dsum_In0I, dsum_In1I]
  65.109 +                             dsum_In0I, dsum_In1I]
  65.110                       addSEs [usumE, dsumE]) 1);
  65.111  qed "fst_image_dsum";
  65.112  
    66.1 --- a/src/HOL/WF.ML	Tue Jan 30 15:19:20 1996 +0100
    66.2 +++ b/src/HOL/WF.ML	Tue Jan 30 15:24:36 1996 +0100
    66.3 @@ -1,9 +1,9 @@
    66.4 -(*  Title: 	HOL/wf.ML
    66.5 +(*  Title:      HOL/WF.ML
    66.6      ID:         $Id$
    66.7 -    Author: 	Tobias Nipkow
    66.8 +    Author:     Tobias Nipkow
    66.9      Copyright   1992  University of Cambridge
   66.10  
   66.11 -For wf.thy.  Well-founded Recursion
   66.12 +For WF.thy.  Well-founded Recursion
   66.13  *)
   66.14  
   66.15  open WF;
   66.16 @@ -33,8 +33,8 @@
   66.17  (*Perform induction on i, then prove the wf(r) subgoal using prems. *)
   66.18  fun wf_ind_tac a prems i = 
   66.19      EVERY [res_inst_tac [("a",a)] wf_induct i,
   66.20 -	   rename_last_tac a ["1"] (i+1),
   66.21 -	   ares_tac prems i];
   66.22 +           rename_last_tac a ["1"] (i+1),
   66.23 +           ares_tac prems i];
   66.24  
   66.25  val prems = goal WF.thy "[| wf(r);  (a,x):r;  (x,a):r |] ==> P";
   66.26  by (subgoal_tac "! x. (a,x):r --> (x,a):r --> P" 1);
   66.27 @@ -92,14 +92,14 @@
   66.28      ares_tac (TrueI::hyps) ORELSE' 
   66.29      (cut_facts_tac hyps THEN'
   66.30         DEPTH_SOLVE_1 o (ares_tac [TrueI] ORELSE'
   66.31 -		        eresolve_tac [transD, mp, allE]));
   66.32 +                        eresolve_tac [transD, mp, allE]));
   66.33  
   66.34  (*** NOTE! some simplifications need a different finish_tac!! ***)
   66.35  fun indhyp_tac hyps =
   66.36      resolve_tac (TrueI::refl::hyps) ORELSE' 
   66.37      (cut_facts_tac hyps THEN'
   66.38         DEPTH_SOLVE_1 o (ares_tac [TrueI] ORELSE'
   66.39 -		        eresolve_tac [transD, mp, allE]));
   66.40 +                        eresolve_tac [transD, mp, allE]));
   66.41  val wf_super_ss = !simpset setsolver indhyp_tac;
   66.42  
   66.43  val prems = goalw WF.thy [is_recfun_def,cut_def]
   66.44 @@ -167,14 +167,14 @@
   66.45      "!!r. [| wf(r);  trans(r) |] ==> \
   66.46  \    wftrec r a H = H a (cut (%x.wftrec r x H) r a)";
   66.47  by (EVERY1 [stac (rewrite_rule [is_recfun_def] unfold_the_recfun),
   66.48 -	    REPEAT o atac, rtac H_cong1]);
   66.49 +            REPEAT o atac, rtac H_cong1]);
   66.50  by (asm_simp_tac (!simpset addsimps [cut_cut_eq,the_recfun_cut]) 1);
   66.51  qed "wftrec";
   66.52  
   66.53  (*Unused but perhaps interesting*)
   66.54  val prems = goal WF.thy
   66.55      "[| wf(r);  trans(r);  !!f x. H x (cut f r x) = H x f |] ==> \
   66.56 -\		wftrec r a H = H a (%x.wftrec r x H)";
   66.57 +\               wftrec r a H = H a (%x.wftrec r x H)";
   66.58  by (rtac (wftrec RS trans) 1);
   66.59  by (REPEAT (resolve_tac prems 1));
   66.60  qed "wftrec2";
    67.1 --- a/src/HOL/add_ind_def.ML	Tue Jan 30 15:19:20 1996 +0100
    67.2 +++ b/src/HOL/add_ind_def.ML	Tue Jan 30 15:24:36 1996 +0100
    67.3 @@ -1,6 +1,6 @@
    67.4 -(*  Title: 	HOL/add_ind_def.ML
    67.5 +(*  Title:      HOL/add_ind_def.ML
    67.6      ID:         $Id$
    67.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    67.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    67.9      Copyright   1994  University of Cambridge
   67.10  
   67.11  Fixedpoint definition module -- for Inductive/Coinductive Definitions
   67.12 @@ -29,11 +29,11 @@
   67.13     ((a+(b+c))+(d+(e+f))) for 6
   67.14  *)
   67.15  
   67.16 -signature FP =		(** Description of a fixed point operator **)
   67.17 +signature FP =          (** Description of a fixed point operator **)
   67.18    sig
   67.19 -  val oper	: string * typ * term -> term	(*fixed point operator*)
   67.20 -  val Tarski	: thm			(*Tarski's fixed point theorem*)
   67.21 -  val induct	: thm			(*induction/coinduction rule*)
   67.22 +  val oper      : string * typ * term -> term   (*fixed point operator*)
   67.23 +  val Tarski    : thm                   (*Tarski's fixed point theorem*)
   67.24 +  val induct    : thm                   (*induction/coinduction rule*)
   67.25    end;
   67.26  
   67.27  
   67.28 @@ -58,8 +58,8 @@
   67.29      val rec_hds = map head_of rec_tms;
   67.30  
   67.31      val _ = assert_all is_Const rec_hds
   67.32 -	    (fn t => "Recursive set not previously declared as constant: " ^ 
   67.33 -	             Sign.string_of_term sign t);
   67.34 +            (fn t => "Recursive set not previously declared as constant: " ^ 
   67.35 +                     Sign.string_of_term sign t);
   67.36  
   67.37      (*Now we know they are all Consts, so get their names, type and params*)
   67.38      val rec_names = map (#1 o dest_Const) rec_hds
   67.39 @@ -71,16 +71,16 @@
   67.40      local (*Checking the introduction rules*)
   67.41        val intr_sets = map (#2 o rule_concl_msg sign) intr_tms;
   67.42        fun intr_ok set =
   67.43 -	  case head_of set of Const(a,_) => a mem rec_names | _ => false;
   67.44 +          case head_of set of Const(a,_) => a mem rec_names | _ => false;
   67.45      in
   67.46        val _ =  assert_all intr_ok intr_sets
   67.47 -	 (fn t => "Conclusion of rule does not name a recursive set: " ^ 
   67.48 -		  Sign.string_of_term sign t);
   67.49 +         (fn t => "Conclusion of rule does not name a recursive set: " ^ 
   67.50 +                  Sign.string_of_term sign t);
   67.51      end;
   67.52  
   67.53      val _ = assert_all is_Free rec_params
   67.54 -	(fn t => "Param in recursion term not a free variable: " ^
   67.55 -		 Sign.string_of_term sign t);
   67.56 +        (fn t => "Param in recursion term not a free variable: " ^
   67.57 +                 Sign.string_of_term sign t);
   67.58  
   67.59      (*** Construct the lfp definition ***)
   67.60      val mk_variant = variant (foldr add_term_names (intr_tms,[]));
   67.61 @@ -89,7 +89,7 @@
   67.62  
   67.63      (*Mutual recursion ?? *)
   67.64      val domTs = summands (dest_setT (body_type recT));
   67.65 -	        (*alternative defn: map (dest_setT o fastype_of) rec_tms *)
   67.66 +                (*alternative defn: map (dest_setT o fastype_of) rec_tms *)
   67.67      val dom_sumT = fold_bal mk_sum domTs;
   67.68      val dom_set  = mk_setT dom_sumT;
   67.69  
   67.70 @@ -99,35 +99,35 @@
   67.71  
   67.72      fun dest_tprop (Const("Trueprop",_) $ P) = P
   67.73        | dest_tprop Q = error ("Ill-formed premise of introduction rule: " ^ 
   67.74 -			      Sign.string_of_term sign Q);
   67.75 +                              Sign.string_of_term sign Q);
   67.76  
   67.77      (*Makes a disjunct from an introduction rule*)
   67.78      fun lfp_part intr = (*quantify over rule's free vars except parameters*)
   67.79        let val prems = map dest_tprop (Logic.strip_imp_prems intr)
   67.80 -	  val _ = seq (fn rec_hd => seq (chk_prem rec_hd) prems) rec_hds
   67.81 -	  val exfrees = term_frees intr \\ rec_params
   67.82 -	  val zeq = eq_const dom_sumT $ freez $ (#1 (rule_concl intr))
   67.83 +          val _ = seq (fn rec_hd => seq (chk_prem rec_hd) prems) rec_hds
   67.84 +          val exfrees = term_frees intr \\ rec_params
   67.85 +          val zeq = eq_const dom_sumT $ freez $ (#1 (rule_concl intr))
   67.86        in foldr mk_exists (exfrees, fold_bal (app conj) (zeq::prems)) end;
   67.87  
   67.88      (*The Part(A,h) terms -- compose injections to make h*)
   67.89 -    fun mk_Part (Bound 0, _) = freeX	(*no mutual rec, no Part needed*)
   67.90 +    fun mk_Part (Bound 0, _) = freeX    (*no mutual rec, no Part needed*)
   67.91        | mk_Part (h, domT)    = 
   67.92 -	  let val goodh = mend_sum_types (h, dom_sumT)
   67.93 +          let val goodh = mend_sum_types (h, dom_sumT)
   67.94                and Part_const = 
   67.95 -		  Const("Part", [dom_set, domT-->dom_sumT]---> dom_set)
   67.96 +                  Const("Part", [dom_set, domT-->dom_sumT]---> dom_set)
   67.97            in  Part_const $ freeX $ Abs(w,domT,goodh)  end;
   67.98  
   67.99      (*Access to balanced disjoint sums via injections*)
  67.100      val parts = map mk_Part
  67.101 -	        (accesses_bal (ap Inl, ap Inr, Bound 0) (length domTs) ~~
  67.102 -		 domTs);
  67.103 +                (accesses_bal (ap Inl, ap Inr, Bound 0) (length domTs) ~~
  67.104 +                 domTs);
  67.105  
  67.106      (*replace each set by the corresponding Part(A,h)*)
  67.107      val part_intrs = map (subst_free (rec_tms ~~ parts) o lfp_part) intr_tms;
  67.108  
  67.109      val lfp_rhs = Fp.oper(X, dom_sumT, 
  67.110 -			  mk_Collect(z, dom_sumT, 
  67.111 -				     fold_bal (app disj) part_intrs))
  67.112 +                          mk_Collect(z, dom_sumT, 
  67.113 +                                     fold_bal (app disj) part_intrs))
  67.114  
  67.115  
  67.116      (*** Make the new theory ***)
  67.117 @@ -142,18 +142,18 @@
  67.118  
  67.119      (*The individual sets must already be declared*)
  67.120      val axpairs = map mk_defpair 
  67.121 -	  ((big_rec_tm, lfp_rhs) ::
  67.122 -	   (case parts of 
  67.123 -	       [_] => [] 			(*no mutual recursion*)
  67.124 -	     | _ => rec_tms ~~		(*define the sets as Parts*)
  67.125 -		    map (subst_atomic [(freeX, big_rec_tm)]) parts));
  67.126 +          ((big_rec_tm, lfp_rhs) ::
  67.127 +           (case parts of 
  67.128 +               [_] => []                        (*no mutual recursion*)
  67.129 +             | _ => rec_tms ~~          (*define the sets as Parts*)
  67.130 +                    map (subst_atomic [(freeX, big_rec_tm)]) parts));
  67.131  
  67.132      val _ = seq (writeln o Sign.string_of_term sign o #2) axpairs
  67.133    
  67.134      (*Detect occurrences of operator, even with other types!*)
  67.135      val _ = (case rec_names inter (add_term_names (lfp_rhs,[])) of
  67.136 -	       [] => ()
  67.137 -	     | x::_ => error ("Illegal occurrence of recursion op: " ^ x ^
  67.138 +               [] => ()
  67.139 +             | x::_ => error ("Illegal occurrence of recursion op: " ^ x ^
  67.140                                 "\n\t*Consider adding type constraints*"))
  67.141  
  67.142    in  thy |> add_defs_i axpairs  end
  67.143 @@ -166,7 +166,7 @@
  67.144  fun add_constructs_def (rec_names, con_ty_lists) thy = 
  67.145  * let
  67.146  *   val _ = writeln"  Defining the constructor functions...";
  67.147 -*   val case_name = "f";		(*name for case variables*)
  67.148 +*   val case_name = "f";                (*name for case variables*)
  67.149  
  67.150  *   (** Define the constructors **)
  67.151  
  67.152 @@ -176,16 +176,16 @@
  67.153  
  67.154  *   fun mk_inject n k u = access_bal(ap Inl, ap Inr, u) n k;
  67.155  
  67.156 -*   val npart = length rec_names;	(*total # of mutually recursive parts*)
  67.157 +*   val npart = length rec_names;       (*total # of mutually recursive parts*)
  67.158  
  67.159  *   (*Make constructor definition; kpart is # of this mutually recursive part*)
  67.160  *   fun mk_con_defs (kpart, con_ty_list) = 
  67.161 -*     let val ncon = length con_ty_list	   (*number of constructors*)
  67.162 -	  fun mk_def (((id,T,syn), name, args, prems), kcon) =
  67.163 -		(*kcon is index of constructor*)
  67.164 -	      mk_defpair (list_comb (Const(name,T), args),
  67.165 -			  mk_inject npart kpart
  67.166 -			  (mk_inject ncon kcon (mk_tuple args)))
  67.167 +*     let val ncon = length con_ty_list    (*number of constructors*)
  67.168 +          fun mk_def (((id,T,syn), name, args, prems), kcon) =
  67.169 +                (*kcon is index of constructor*)
  67.170 +              mk_defpair (list_comb (Const(name,T), args),
  67.171 +                          mk_inject npart kpart
  67.172 +                          (mk_inject ncon kcon (mk_tuple args)))
  67.173  *     in  map mk_def (con_ty_list ~~ (1 upto ncon))  end;
  67.174  
  67.175  *   (** Define the case operator **)
  67.176 @@ -193,25 +193,25 @@
  67.177  *   (*Combine split terms using case; yields the case operator for one part*)
  67.178  *   fun call_case case_list = 
  67.179  *     let fun call_f (free,args) = 
  67.180 -	      ap_split T free (map (#2 o dest_Free) args)
  67.181 +              ap_split T free (map (#2 o dest_Free) args)
  67.182  *     in  fold_bal (app sum_case) (map call_f case_list)  end;
  67.183  
  67.184  *   (** Generating function variables for the case definition
  67.185 -	Non-identifiers (e.g. infixes) get a name of the form f_op_nnn. **)
  67.186 +        Non-identifiers (e.g. infixes) get a name of the form f_op_nnn. **)
  67.187  
  67.188  *   (*Treatment of a single constructor*)
  67.189  *   fun add_case (((id,T,syn), name, args, prems), (opno,cases)) =
  67.190 -	if Syntax.is_identifier id
  67.191 -	then (opno,   
  67.192 -	      (Free(case_name ^ "_" ^ id, T), args) :: cases)
  67.193 -	else (opno+1, 
  67.194 -	      (Free(case_name ^ "_op_" ^ string_of_int opno, T), args) :: 
  67.195 -	      cases)
  67.196 +        if Syntax.is_identifier id
  67.197 +        then (opno,   
  67.198 +              (Free(case_name ^ "_" ^ id, T), args) :: cases)
  67.199 +        else (opno+1, 
  67.200 +              (Free(case_name ^ "_op_" ^ string_of_int opno, T), args) :: 
  67.201 +              cases)
  67.202  
  67.203  *   (*Treatment of a list of constructors, for one part*)
  67.204  *   fun add_case_list (con_ty_list, (opno,case_lists)) =
  67.205 -	let val (opno',case_list) = foldr add_case (con_ty_list, (opno,[]))
  67.206 -	in (opno', case_list :: case_lists) end;
  67.207 +        let val (opno',case_list) = foldr add_case (con_ty_list, (opno,[]))
  67.208 +        in (opno', case_list :: case_lists) end;
  67.209  
  67.210  *   (*Treatment of all parts*)
  67.211  *   val (_, case_lists) = foldr add_case_list (con_ty_lists, (1,[]));
  67.212 @@ -226,18 +226,18 @@
  67.213  *   val big_case_args = flat (map (map #1) case_lists);
  67.214  
  67.215  *   val big_case_tm = 
  67.216 -	list_comb (Const(big_case_name, big_case_typ), big_case_args); 
  67.217 +        list_comb (Const(big_case_name, big_case_typ), big_case_args); 
  67.218  
  67.219  *   val big_case_def = mk_defpair  
  67.220 -	(big_case_tm, fold_bal (app sum_case) (map call_case case_lists)); 
  67.221 +        (big_case_tm, fold_bal (app sum_case) (map call_case case_lists)); 
  67.222  
  67.223  *   (** Build the new theory **)
  67.224  
  67.225  *   val const_decs =
  67.226 -	(big_case_name, big_case_typ, NoSyn) :: map #1 (flat con_ty_lists);
  67.227 +        (big_case_name, big_case_typ, NoSyn) :: map #1 (flat con_ty_lists);
  67.228  
  67.229  *   val axpairs =
  67.230 -	big_case_def :: flat (map mk_con_defs ((1 upto npart) ~~ con_ty_lists))
  67.231 +        big_case_def :: flat (map mk_con_defs ((1 upto npart) ~~ con_ty_lists))
  67.232  
  67.233  *   in  thy |> add_consts_i const_decs |> add_defs_i axpairs  end;
  67.234  ****************************************************************)
    68.1 --- a/src/HOL/datatype.ML	Tue Jan 30 15:19:20 1996 +0100
    68.2 +++ b/src/HOL/datatype.ML	Tue Jan 30 15:24:36 1996 +0100
    68.3 @@ -32,22 +32,22 @@
    68.4      let 
    68.5      fun subst (Abs(a,T,t)) = Abs(a,T,subst t)
    68.6        | subst (funct $ body) = 
    68.7 -	let val (f,b) = strip_comb (funct$body)
    68.8 -	in 
    68.9 -	  if is_Const f andalso fst(dest_Const f) = fname 
   68.10 -	    then 
   68.11 -	      let val (ls,rest) = (take(rpos,b), drop(rpos,b));
   68.12 -		val (xk,rs) = (hd rest,tl rest)
   68.13 -		  handle LIST _ => raise RecError "not enough arguments \
   68.14 -		   \ in recursive application on rhs"
   68.15 +        let val (f,b) = strip_comb (funct$body)
   68.16 +        in 
   68.17 +          if is_Const f andalso fst(dest_Const f) = fname 
   68.18 +            then 
   68.19 +              let val (ls,rest) = (take(rpos,b), drop(rpos,b));
   68.20 +                val (xk,rs) = (hd rest,tl rest)
   68.21 +                  handle LIST _ => raise RecError "not enough arguments \
   68.22 +                   \ in recursive application on rhs"
   68.23                in 
   68.24 -		(case assoc (pairs,xk) of 
   68.25 -		   None => raise RecError 
   68.26 -		     ("illegal occurence of " ^ fname ^ " on rhs")
   68.27 -		 | Some(U) => list_comb(U,map subst (ls @ rs)))
   68.28 -	      end
   68.29 -	  else list_comb(f, map subst b)
   68.30 -	end
   68.31 +                (case assoc (pairs,xk) of 
   68.32 +                   None => raise RecError 
   68.33 +                     ("illegal occurence of " ^ fname ^ " on rhs")
   68.34 +                 | Some(U) => list_comb(U,map subst (ls @ rs)))
   68.35 +              end
   68.36 +          else list_comb(f, map subst b)
   68.37 +        end
   68.38        | subst(t) = t
   68.39      in subst t end;
   68.40    
   68.41 @@ -55,11 +55,11 @@
   68.42  
   68.43  fun abst_rec (fname,rpos,tc,ls,cargs,rs,rhs) =       
   68.44    let val rargs = (map fst o 
   68.45 -		   (filter (fn (a,T) => is_dtRek T))) (cargs ~~ tc);
   68.46 +                   (filter (fn (a,T) => is_dtRek T))) (cargs ~~ tc);
   68.47        val subs = map (fn (s,T) => (s,dummyT))
   68.48 -	           (rev(rename_wrt_term rhs rargs));
   68.49 +                   (rev(rename_wrt_term rhs rargs));
   68.50        val subst_rhs = subst_apps (fname,rpos)
   68.51 -	                (map Free rargs ~~ map Free subs) rhs;
   68.52 +                        (map Free rargs ~~ map Free subs) rhs;
   68.53    in 
   68.54        list_abs_free (cargs @ subs @ ls @ rs, subst_rhs) 
   68.55    end;
   68.56 @@ -79,17 +79,17 @@
   68.57      val (c,cargs') = strip_comb (hd middle)
   68.58        handle LIST "hd" => raise RecError "constructor missing";
   68.59      val (ls,cargs,rs) = (map dest_Free ls', map dest_Free cargs'
   68.60 -			 , map dest_Free rs')
   68.61 +                         , map dest_Free rs')
   68.62        handle TERM ("dest_Free",_) => 
   68.63 -	  raise RecError "constructor has illegal argument in pattern";
   68.64 +          raise RecError "constructor has illegal argument in pattern";
   68.65    in 
   68.66      if length middle > 1 then 
   68.67        raise RecError "more than one non-variable in pattern"
   68.68      else if not(null(findrep (map fst (ls @ rs @ cargs)))) then 
   68.69        raise RecError "repeated variable name in pattern" 
   68.70 -	 else (fst(dest_Const name) handle TERM _ => 
   68.71 -	       raise RecError "function is not declared as constant in theory"
   68.72 -		 ,rpos,ls,fst( dest_Const c),cargs,rs,rhs)
   68.73 +         else (fst(dest_Const name) handle TERM _ => 
   68.74 +               raise RecError "function is not declared as constant in theory"
   68.75 +                 ,rpos,ls,fst( dest_Const c),cargs,rs,rhs)
   68.76    end; 
   68.77  
   68.78  (* check function specified for all constructors and sort function terms *)
   68.79 @@ -107,32 +107,32 @@
   68.80    | trans_recs thy cs' (eq1::eqs) = 
   68.81      let val (name1,rpos1,ls1,_,_,_,_) = dest_rec eq1
   68.82        handle RecError s =>
   68.83 -	error("Primrec definition error: " ^ s ^ ":\n" 
   68.84 -	      ^ "   " ^ Sign.string_of_term (sign_of thy) eq1);
   68.85 +        error("Primrec definition error: " ^ s ^ ":\n" 
   68.86 +              ^ "   " ^ Sign.string_of_term (sign_of thy) eq1);
   68.87        val tcs = map (fn (_,c,T,_,_) => (c,T)) cs';  
   68.88        val cs = map fst tcs;
   68.89        fun trans_recs' _ [] = []
   68.90          | trans_recs' cis (eq::eqs) = 
   68.91 -	  let val (name,rpos,ls,c,cargs,rs,rhs) = dest_rec eq; 
   68.92 -	    val tc = assoc(tcs,c);
   68.93 -	    val i = (1 + find (c,cs))  handle LIST "find" => 0; 
   68.94 -	  in
   68.95 -	  if name <> name1 then 
   68.96 -	    raise RecError "function names inconsistent"
   68.97 -	  else if rpos <> rpos1 then 
   68.98 -	    raise RecError "position of rec. argument inconsistent"
   68.99 -	  else if i = 0 then 
  68.100 -	    raise RecError "illegal argument in pattern" 
  68.101 -	  else if i mem cis then
  68.102 -	    raise RecError "constructor already occured as pattern "
  68.103 -	       else (i,abst_rec (name,rpos,the tc,ls,cargs,rs,rhs))
  68.104 -		     :: trans_recs' (i::cis) eqs 
  68.105 -	  end
  68.106 -	  handle RecError s =>
  68.107 -	        error("Primrec definition error\n" ^ s ^ "\n" 
  68.108 -		      ^ "   " ^ Sign.string_of_term (sign_of thy) eq);
  68.109 +          let val (name,rpos,ls,c,cargs,rs,rhs) = dest_rec eq; 
  68.110 +            val tc = assoc(tcs,c);
  68.111 +            val i = (1 + find (c,cs))  handle LIST "find" => 0; 
  68.112 +          in
  68.113 +          if name <> name1 then 
  68.114 +            raise RecError "function names inconsistent"
  68.115 +          else if rpos <> rpos1 then 
  68.116 +            raise RecError "position of rec. argument inconsistent"
  68.117 +          else if i = 0 then 
  68.118 +            raise RecError "illegal argument in pattern" 
  68.119 +          else if i mem cis then
  68.120 +            raise RecError "constructor already occured as pattern "
  68.121 +               else (i,abst_rec (name,rpos,the tc,ls,cargs,rs,rhs))
  68.122 +                     :: trans_recs' (i::cis) eqs 
  68.123 +          end
  68.124 +          handle RecError s =>
  68.125 +                error("Primrec definition error\n" ^ s ^ "\n" 
  68.126 +                      ^ "   " ^ Sign.string_of_term (sign_of thy) eq);
  68.127      in (  name1, ls1
  68.128 -	, check_and_sort (length cs, trans_recs' [] (eq1::eqs)))
  68.129 +        , check_and_sort (length cs, trans_recs' [] (eq1::eqs)))
  68.130      end ;
  68.131  
  68.132  in
  68.133 @@ -155,24 +155,24 @@
  68.134  
  68.135        (*search for free type variables and convert recursive *)
  68.136        fun analyse_types (cons, types, syn) =
  68.137 -	let fun analyse(t as dtVar v) =
  68.138 +        let fun analyse(t as dtVar v) =
  68.139                    if t mem typevars then t
  68.140                    else error ("Free type variable " ^ v ^ " on rhs.")
  68.141 -	      | analyse(dtTyp(typl,s)) =
  68.142 -		  if tname <> s then dtTyp(analyses typl, s)
  68.143 +              | analyse(dtTyp(typl,s)) =
  68.144 +                  if tname <> s then dtTyp(analyses typl, s)
  68.145                    else if typevars = typl then dtRek(typl, s)
  68.146                         else error (s ^ " used in different ways")
  68.147 -	      | analyse(dtRek _) = raise Impossible
  68.148 -	    and analyses ts = map analyse ts;
  68.149 -	in (cons, Syntax.const_name cons syn, analyses types,
  68.150 +              | analyse(dtRek _) = raise Impossible
  68.151 +            and analyses ts = map analyse ts;
  68.152 +        in (cons, Syntax.const_name cons syn, analyses types,
  68.153              mk_var_names types, syn)
  68.154          end;
  68.155  
  68.156       (*test if all elements are recursive, i.e. if the type is empty*)
  68.157        
  68.158        fun non_empty (cs : ('a * 'b * dt_type list * 'c *'d) list) = 
  68.159 -	not(forall (exists is_dtRek o #3) cs) orelse
  68.160 -	error("Empty datatype not allowed!");
  68.161 +        not(forall (exists is_dtRek o #3) cs) orelse
  68.162 +        error("Empty datatype not allowed!");
  68.163  
  68.164        val cons_list = map analyse_types cons_list';
  68.165        val dummy = non_empty cons_list;
  68.166 @@ -182,7 +182,7 @@
  68.167  
  68.168       (*generate 'var_n, ..., var_m'*)
  68.169        fun Args(var, delim, n, m) = 
  68.170 -	space_implode delim (map (fn n => var^string_of_int(n)) (n upto m));
  68.171 +        space_implode delim (map (fn n => var^string_of_int(n)) (n upto m));
  68.172  
  68.173        fun C_exp name vns = name ^ opt_parens(space_implode ") (" vns);
  68.174  
  68.175 @@ -195,85 +195,85 @@
  68.176         pp_typlist1: parentheses, pp_typlist2: brackets*)
  68.177        fun pp_typ (dtVar s) = "(" ^ s ^ "::term)"
  68.178          | pp_typ (dtTyp (typvars, id)) =
  68.179 -	  if null typvars then id else (pp_typlist1 typvars) ^ id
  68.180 +          if null typvars then id else (pp_typlist1 typvars) ^ id
  68.181          | pp_typ (dtRek (typvars, id)) = (pp_typlist1 typvars) ^ id
  68.182        and
  68.183 -	pp_typlist' ts = commas (map pp_typ ts)
  68.184 +        pp_typlist' ts = commas (map pp_typ ts)
  68.185        and
  68.186 -	pp_typlist1 ts = if null ts then "" else parens (pp_typlist' ts);
  68.187 +        pp_typlist1 ts = if null ts then "" else parens (pp_typlist' ts);
  68.188  
  68.189        fun pp_typlist2 ts = if null ts then "" else brackets (pp_typlist' ts);
  68.190  
  68.191       (* Generate syntax translation for case rules *)
  68.192        fun calc_xrules c_nr y_nr ((_, name, _, vns, _) :: cs) = 
  68.193 -	let val arity = length vns;
  68.194 -	  val body  = "z" ^ string_of_int(c_nr);
  68.195 -	  val args1 = if arity=0 then ""
  68.196 -		      else " " ^ Args ("y", " ", y_nr, y_nr+arity-1);
  68.197 -	  val args2 = if arity=0 then ""
  68.198 -		      else "(% " ^ Args ("y", " ", y_nr, y_nr+arity-1) 
  68.199 -			^ ". ";
  68.200 -	  val (rest1,rest2) = 
  68.201 -	    if null cs then ("","")
  68.202 -	    else let val (h1, h2) = calc_xrules (c_nr+1) (y_nr+arity) cs
  68.203 -	    in (" | " ^ h1, " " ^ h2) end;
  68.204 -	in (name ^ args1 ^ " => " ^ body ^ rest1,
  68.205 +        let val arity = length vns;
  68.206 +          val body  = "z" ^ string_of_int(c_nr);
  68.207 +          val args1 = if arity=0 then ""
  68.208 +                      else " " ^ Args ("y", " ", y_nr, y_nr+arity-1);
  68.209 +          val args2 = if arity=0 then ""
  68.210 +                      else "(% " ^ Args ("y", " ", y_nr, y_nr+arity-1) 
  68.211 +                        ^ ". ";
  68.212 +          val (rest1,rest2) = 
  68.213 +            if null cs then ("","")
  68.214 +            else let val (h1, h2) = calc_xrules (c_nr+1) (y_nr+arity) cs
  68.215 +            in (" | " ^ h1, " " ^ h2) end;
  68.216 +        in (name ^ args1 ^ " => " ^ body ^ rest1,
  68.217              args2 ^ body ^ (if args2 = "" then "" else ")") ^ rest2)
  68.218          end
  68.219          | calc_xrules _ _ [] = raise Impossible;
  68.220        
  68.221        val xrules =
  68.222 -	let val (first_part, scnd_part) = calc_xrules 1 1 cons_list
  68.223 -	in [("logic", "case x of " ^ first_part) <->
  68.224 -	     ("logic", tname ^ "_case " ^ scnd_part ^ " x")]
  68.225 -	end;
  68.226 +        let val (first_part, scnd_part) = calc_xrules 1 1 cons_list
  68.227 +        in [("logic", "case x of " ^ first_part) <->
  68.228 +             ("logic", tname ^ "_case " ^ scnd_part ^ " x")]
  68.229 +        end;
  68.230  
  68.231       (*type declarations for constructors*)
  68.232        fun const_type (id, _, typlist, _, syn) =
  68.233 -	(id,  
  68.234 -	 (if null typlist then "" else pp_typlist2 typlist ^ " => ") ^
  68.235 -	    pp_typlist1 typevars ^ tname, syn);
  68.236 +        (id,  
  68.237 +         (if null typlist then "" else pp_typlist2 typlist ^ " => ") ^
  68.238 +            pp_typlist1 typevars ^ tname, syn);
  68.239  
  68.240  
  68.241        fun assumpt (dtRek _ :: ts, v :: vs ,found) =
  68.242 -	let val h = if found then ";P(" ^ v ^ ")" else "[| P(" ^ v ^ ")"
  68.243 -	in h ^ (assumpt (ts, vs, true)) end
  68.244 +        let val h = if found then ";P(" ^ v ^ ")" else "[| P(" ^ v ^ ")"
  68.245 +        in h ^ (assumpt (ts, vs, true)) end
  68.246          | assumpt (t :: ts, v :: vs, found) = assumpt (ts, vs, found)
  68.247        | assumpt ([], [], found) = if found then "|] ==>" else ""
  68.248          | assumpt _ = raise Impossible;
  68.249  
  68.250        fun t_inducting ((_, name, types, vns, _) :: cs) =
  68.251 -	let
  68.252 -	  val h = if null types then " P(" ^ name ^ ")"
  68.253 -		  else " !!" ^ (space_implode " " vns) ^ "." ^
  68.254 -		    (assumpt (types, vns, false)) ^
  68.255 +        let
  68.256 +          val h = if null types then " P(" ^ name ^ ")"
  68.257 +                  else " !!" ^ (space_implode " " vns) ^ "." ^
  68.258 +                    (assumpt (types, vns, false)) ^
  68.259                      "P(" ^ C_exp name vns ^ ")";
  68.260 -	  val rest = t_inducting cs;
  68.261 -	in if rest = "" then h else h ^ "; " ^ rest end
  68.262 +          val rest = t_inducting cs;
  68.263 +        in if rest = "" then h else h ^ "; " ^ rest end
  68.264          | t_inducting [] = "";
  68.265  
  68.266        fun t_induct cl typ_name =
  68.267          "[|" ^ t_inducting cl ^ "|] ==> P(" ^ typ_name ^ ")";
  68.268  
  68.269        fun gen_typlist typevar f ((_, _, ts, _, _) :: cs) =
  68.270 -	let val h = if (length ts) > 0
  68.271 -		      then pp_typlist2(f ts) ^ "=>"
  68.272 -		    else ""
  68.273 -	in h ^ typevar ^  "," ^ (gen_typlist typevar f cs) end
  68.274 +        let val h = if (length ts) > 0
  68.275 +                      then pp_typlist2(f ts) ^ "=>"
  68.276 +                    else ""
  68.277 +        in h ^ typevar ^  "," ^ (gen_typlist typevar f cs) end
  68.278          | gen_typlist _ _ [] = "";
  68.279  
  68.280  
  68.281  (* -------------------------------------------------------------------- *)
  68.282 -(* The case constant and rules 	        				*)
  68.283 - 		
  68.284 +(* The case constant and rules                                          *)
  68.285 +                
  68.286        val t_case = tname ^ "_case";
  68.287  
  68.288        fun case_rule n (id, name, _, vns, _) =
  68.289 -	let val args = if vns = [] then "" else " " ^ space_implode " " vns
  68.290 -	in (t_case ^ "_" ^ id,
  68.291 -	    t_case ^ " " ^ Args("f", " ", 1, num_of_cons)
  68.292 -	    ^ " (" ^ name ^ args ^ ") = f"^string_of_int(n) ^ args)
  68.293 -	end
  68.294 +        let val args = if vns = [] then "" else " " ^ space_implode " " vns
  68.295 +        in (t_case ^ "_" ^ id,
  68.296 +            t_case ^ " " ^ Args("f", " ", 1, num_of_cons)
  68.297 +            ^ " (" ^ name ^ args ^ ") = f"^string_of_int(n) ^ args)
  68.298 +        end
  68.299  
  68.300        fun case_rules n (c :: cs) = case_rule n c :: case_rules(n+1) cs
  68.301          | case_rules _ [] = [];
  68.302 @@ -285,124 +285,124 @@
  68.303        val arities = 
  68.304          let val term_list = replicate datatype_arity termS;
  68.305          in [(tname, term_list, termS)] 
  68.306 -	end;
  68.307 +        end;
  68.308  
  68.309        val datatype_name = pp_typlist1 typevars ^ tname;
  68.310  
  68.311        val new_tvar_name = variant (map (fn dtVar s => s) typevars) "'z";
  68.312  
  68.313        val case_const =
  68.314 -	(t_case,
  68.315 -	 "[" ^ gen_typlist new_tvar_name I cons_list 
  68.316 -	 ^  pp_typlist1 typevars ^ tname ^ "] =>" ^ new_tvar_name^"::term",
  68.317 -	 NoSyn);
  68.318 +        (t_case,
  68.319 +         "[" ^ gen_typlist new_tvar_name I cons_list 
  68.320 +         ^  pp_typlist1 typevars ^ tname ^ "] =>" ^ new_tvar_name^"::term",
  68.321 +         NoSyn);
  68.322  
  68.323        val rules_case = case_rules 1 cons_list;
  68.324  
  68.325  (* -------------------------------------------------------------------- *)
  68.326 -(* The prim-rec combinator						*) 
  68.327 +(* The prim-rec combinator                                              *) 
  68.328  
  68.329        val t_rec = tname ^ "_rec"
  68.330  
  68.331  (* adding type variables for dtRek types to end of list of dt_types      *)   
  68.332  
  68.333        fun add_reks ts = 
  68.334 -	ts @ map (fn _ => dtVar new_tvar_name) (filter is_dtRek ts); 
  68.335 +        ts @ map (fn _ => dtVar new_tvar_name) (filter is_dtRek ts); 
  68.336  
  68.337  (* positions of the dtRek types in a list of dt_types, starting from 1  *)
  68.338        fun rek_vars ts vns = map snd (filter (is_dtRek o fst) (ts ~~ vns))
  68.339  
  68.340        fun rec_rule n (id,name,ts,vns,_) = 
  68.341 -	let val args = opt_parens(space_implode ") (" vns)
  68.342 -	  val fargs = opt_parens(Args("f", ") (", 1, num_of_cons))
  68.343 -	  fun rarg vn = t_rec ^ fargs ^ " (" ^ vn ^ ")"
  68.344 -	  val rargs = opt_parens(space_implode ") ("
  68.345 +        let val args = opt_parens(space_implode ") (" vns)
  68.346 +          val fargs = opt_parens(Args("f", ") (", 1, num_of_cons))
  68.347 +          fun rarg vn = t_rec ^ fargs ^ " (" ^ vn ^ ")"
  68.348 +          val rargs = opt_parens(space_implode ") ("
  68.349                                   (map rarg (rek_vars ts vns)))
  68.350 -	in
  68.351 -	  (t_rec ^ "_" ^ id,
  68.352 -	   t_rec ^ fargs ^ " (" ^ name ^ args ^ ") = f"
  68.353 -	   ^ string_of_int(n) ^ args ^ rargs)
  68.354 -	end
  68.355 +        in
  68.356 +          (t_rec ^ "_" ^ id,
  68.357 +           t_rec ^ fargs ^ " (" ^ name ^ args ^ ") = f"
  68.358 +           ^ string_of_int(n) ^ args ^ rargs)
  68.359 +        end
  68.360  
  68.361        fun rec_rules n (c::cs) = rec_rule n c :: rec_rules (n+1) cs 
  68.362 -	| rec_rules _ [] = [];
  68.363 +        | rec_rules _ [] = [];
  68.364  
  68.365        val rec_const =
  68.366 -	(t_rec,
  68.367 -	 "[" ^ (gen_typlist new_tvar_name add_reks cons_list) 
  68.368 -	 ^ (pp_typlist1 typevars) ^ tname ^ "] =>" ^ new_tvar_name^"::term",
  68.369 -	 NoSyn);
  68.370 +        (t_rec,
  68.371 +         "[" ^ (gen_typlist new_tvar_name add_reks cons_list) 
  68.372 +         ^ (pp_typlist1 typevars) ^ tname ^ "] =>" ^ new_tvar_name^"::term",
  68.373 +         NoSyn);
  68.374  
  68.375        val rules_rec = rec_rules 1 cons_list
  68.376  
  68.377  (* -------------------------------------------------------------------- *)
  68.378        val consts = 
  68.379 -	map const_type cons_list
  68.380 -	@ (if num_of_cons < dtK then []
  68.381 -	   else [(tname ^ "_ord", datatype_name ^ "=>nat", NoSyn)])
  68.382 -	@ [case_const,rec_const];
  68.383 +        map const_type cons_list
  68.384 +        @ (if num_of_cons < dtK then []
  68.385 +           else [(tname ^ "_ord", datatype_name ^ "=>nat", NoSyn)])
  68.386 +        @ [case_const,rec_const];
  68.387  
  68.388  
  68.389        fun Ci_ing ((id, name, _, vns, _) :: cs) =
  68.390 -	   if null vns then Ci_ing cs
  68.391 -	   else let val vns' = variantlist(vns,vns)
  68.392 +           if null vns then Ci_ing cs
  68.393 +           else let val vns' = variantlist(vns,vns)
  68.394                  in ("inject_" ^ id,
  68.395 -		    "(" ^ (C_exp name vns) ^ "=" ^ (C_exp name vns')
  68.396 -		    ^ ") = (" ^ (arg_eqs vns vns') ^ ")") :: (Ci_ing cs)
  68.397 +                    "(" ^ (C_exp name vns) ^ "=" ^ (C_exp name vns')
  68.398 +                    ^ ") = (" ^ (arg_eqs vns vns') ^ ")") :: (Ci_ing cs)
  68.399                  end
  68.400 -	| Ci_ing [] = [];
  68.401 +        | Ci_ing [] = [];
  68.402  
  68.403        fun Ci_negOne (id1,name1,_,vns1,_) (id2,name2,_,vns2,_) =
  68.404              let val vns2' = variantlist(vns2,vns1)
  68.405                  val ax = C_exp name1 vns1 ^ "~=" ^ C_exp name2 vns2'
  68.406 -	in (id1 ^ "_not_" ^ id2, ax) end;
  68.407 +        in (id1 ^ "_not_" ^ id2, ax) end;
  68.408  
  68.409        fun Ci_neg1 [] = []
  68.410 -	| Ci_neg1 (c1::cs) = (map (Ci_negOne c1) cs) @ Ci_neg1 cs;
  68.411 +        | Ci_neg1 (c1::cs) = (map (Ci_negOne c1) cs) @ Ci_neg1 cs;
  68.412  
  68.413        fun suc_expr n = 
  68.414 -	if n=0 then "0" else "Suc(" ^ suc_expr(n-1) ^ ")";
  68.415 +        if n=0 then "0" else "Suc(" ^ suc_expr(n-1) ^ ")";
  68.416  
  68.417        fun Ci_neg2() =
  68.418 -	let val ord_t = tname ^ "_ord";
  68.419 -	  val cis = cons_list ~~ (0 upto (num_of_cons - 1))
  68.420 -	  fun Ci_neg2equals ((id, name, _, vns, _), n) =
  68.421 -	    let val ax = ord_t ^ "(" ^ (C_exp name vns) ^ ") = " ^ (suc_expr n)
  68.422 -	    in (ord_t ^ "_" ^ id, ax) end
  68.423 -	in (ord_t ^ "_distinct", ord_t^"(x) ~= "^ord_t^"(y) ==> x ~= y") ::
  68.424 -	  (map Ci_neg2equals cis)
  68.425 -	end;
  68.426 +        let val ord_t = tname ^ "_ord";
  68.427 +          val cis = cons_list ~~ (0 upto (num_of_cons - 1))
  68.428 +          fun Ci_neg2equals ((id, name, _, vns, _), n) =
  68.429 +            let val ax = ord_t ^ "(" ^ (C_exp name vns) ^ ") = " ^ (suc_expr n)
  68.430 +            in (ord_t ^ "_" ^ id, ax) end
  68.431 +        in (ord_t ^ "_distinct", ord_t^"(x) ~= "^ord_t^"(y) ==> x ~= y") ::
  68.432 +          (map Ci_neg2equals cis)
  68.433 +        end;
  68.434  
  68.435        val rules_distinct = if num_of_cons < dtK then Ci_neg1 cons_list
  68.436 -			   else Ci_neg2();
  68.437 +                           else Ci_neg2();
  68.438  
  68.439        val rules_inject = Ci_ing cons_list;
  68.440  
  68.441        val rule_induct = (tname ^ "_induct", t_induct cons_list tname);
  68.442  
  68.443        val rules = rule_induct ::
  68.444 -	(rules_inject @ rules_distinct @ rules_case @ rules_rec);
  68.445 +        (rules_inject @ rules_distinct @ rules_case @ rules_rec);
  68.446  
  68.447        fun add_primrec eqns thy =
  68.448 -	let val rec_comb = Const(t_rec,dummyT)
  68.449 -	  val teqns = map (fn neq => snd(read_axm (sign_of thy) neq)) eqns
  68.450 -	  val (fname,ls,fns) = trans_recs thy cons_list teqns
  68.451 -	  val rhs = 
  68.452 -	    list_abs_free
  68.453 -	    (ls @ [(tname,dummyT)]
  68.454 -	     ,list_comb(rec_comb
  68.455 -			, fns @ map Bound (0 ::(length ls downto 1))));
  68.456 +        let val rec_comb = Const(t_rec,dummyT)
  68.457 +          val teqns = map (fn neq => snd(read_axm (sign_of thy) neq)) eqns
  68.458 +          val (fname,ls,fns) = trans_recs thy cons_list teqns
  68.459 +          val rhs = 
  68.460 +            list_abs_free
  68.461 +            (ls @ [(tname,dummyT)]
  68.462 +             ,list_comb(rec_comb
  68.463 +                        , fns @ map Bound (0 ::(length ls downto 1))));
  68.464            val sg = sign_of thy;
  68.465            val defpair =  mk_defpair (Const(fname,dummyT),rhs)
  68.466 -	  val defpairT as (_, _ $ Const(_,T) $ _ ) = inferT_axm sg defpair;
  68.467 -	  val varT = Type.varifyT T;
  68.468 +          val defpairT as (_, _ $ Const(_,T) $ _ ) = inferT_axm sg defpair;
  68.469 +          val varT = Type.varifyT T;
  68.470            val ftyp = the (Sign.const_type sg fname);
  68.471 -	in
  68.472 -	  if Type.typ_instance (#tsig(Sign.rep_sg sg), ftyp, varT)
  68.473 -	  then add_defs_i [defpairT] thy
  68.474 -	  else error("Primrec definition error: \ntype of " ^ fname 
  68.475 -		     ^ " is not instance of type deduced from equations")
  68.476 -	end;
  68.477 +        in
  68.478 +          if Type.typ_instance (#tsig(Sign.rep_sg sg), ftyp, varT)
  68.479 +          then add_defs_i [defpairT] thy
  68.480 +          else error("Primrec definition error: \ntype of " ^ fname 
  68.481 +                     ^ " is not instance of type deduced from equations")
  68.482 +        end;
  68.483  
  68.484      in
  68.485        datatypes := map (fn (x,_,_) => x) cons_list' @ (!datatypes);
  68.486 @@ -480,9 +480,9 @@
  68.487    order of parameters is corrected by setting the rhs equal to 
  68.488  
  68.489    list_abs_free
  68.490 -	    (ls @ [(tname,dummyT)]
  68.491 -	     ,list_comb(rec_comb
  68.492 -			, fns @ map Bound (0 ::(length ls downto 1))));
  68.493 +            (ls @ [(tname,dummyT)]
  68.494 +             ,list_comb(rec_comb
  68.495 +                        , fns @ map Bound (0 ::(length ls downto 1))));
  68.496  
  68.497    Note the de-Bruijn indices counting the number of lambdas between the
  68.498    variable and its binding. 
    69.1 --- a/src/HOL/equalities.ML	Tue Jan 30 15:19:20 1996 +0100
    69.2 +++ b/src/HOL/equalities.ML	Tue Jan 30 15:24:36 1996 +0100
    69.3 @@ -1,6 +1,6 @@
    69.4 -(*  Title: 	HOL/equalities
    69.5 +(*  Title:      HOL/equalities
    69.6      ID:         $Id$
    69.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    69.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    69.9      Copyright   1994  University of Cambridge
   69.10  
   69.11  Equalities involving union, intersection, inclusion, etc.
    70.1 --- a/src/HOL/ex/Acc.ML	Tue Jan 30 15:19:20 1996 +0100
    70.2 +++ b/src/HOL/ex/Acc.ML	Tue Jan 30 15:24:36 1996 +0100
    70.3 @@ -1,6 +1,6 @@
    70.4 -(*  Title: 	HOL/ex/Acc
    70.5 +(*  Title:      HOL/ex/Acc
    70.6      ID:         $Id$
    70.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    70.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    70.9      Copyright   1994  University of Cambridge
   70.10  
   70.11  Inductive definition of acc(r)
   70.12 @@ -15,7 +15,7 @@
   70.13  val prems = goal Acc.thy
   70.14      "[| !!b. (b,a):r ==> b: acc(r) |] ==> a: acc(r)";
   70.15  by (fast_tac (set_cs addIs (prems @ 
   70.16 -			    map (rewrite_rule [pred_def]) acc.intrs)) 1);
   70.17 +                            map (rewrite_rule [pred_def]) acc.intrs)) 1);
   70.18  qed "accI";
   70.19  
   70.20  goal Acc.thy "!!a b r. [| b: acc(r);  (a,b): r |] ==> a: acc(r)";
   70.21 @@ -25,8 +25,8 @@
   70.22  qed "acc_downward";
   70.23  
   70.24  val [major,indhyp] = goal Acc.thy
   70.25 -    "[| a : acc(r);						\
   70.26 -\       !!x. [| x: acc(r);  ALL y. (y,x):r --> P(y) |] ==> P(x)	\
   70.27 +    "[| a : acc(r);                                             \
   70.28 +\       !!x. [| x: acc(r);  ALL y. (y,x):r --> P(y) |] ==> P(x) \
   70.29  \    |] ==> P(a)";
   70.30  by (rtac (major RS acc.induct) 1);
   70.31  by (rtac indhyp 1);
   70.32 @@ -55,7 +55,7 @@
   70.33  by (rtac subsetI 1);
   70.34  by (res_inst_tac [("p", "x")] PairE 1);
   70.35  by (fast_tac (set_cs addSIs [SigmaI,
   70.36 -			     major RS acc_wfD_lemma RS spec RS mp]) 1);
   70.37 +                             major RS acc_wfD_lemma RS spec RS mp]) 1);
   70.38  qed "acc_wfD";
   70.39  
   70.40  goal Acc.thy "wf(r)  =  (r <= Sigma (acc r) (%u. acc(r)))";
    71.1 --- a/src/HOL/ex/BT.ML	Tue Jan 30 15:19:20 1996 +0100
    71.2 +++ b/src/HOL/ex/BT.ML	Tue Jan 30 15:24:36 1996 +0100
    71.3 @@ -1,6 +1,6 @@
    71.4 -(*  Title: 	HOL/ex/BT.ML
    71.5 +(*  Title:      HOL/ex/BT.ML
    71.6      ID:         $Id$
    71.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    71.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    71.9      Copyright   1995  University of Cambridge
   71.10  
   71.11  Datatype definition of binary trees
    72.1 --- a/src/HOL/ex/InSort.ML	Tue Jan 30 15:19:20 1996 +0100
    72.2 +++ b/src/HOL/ex/InSort.ML	Tue Jan 30 15:24:36 1996 +0100
    72.3 @@ -1,6 +1,6 @@
    72.4 -(*  Title: 	HOL/ex/insort.ML
    72.5 +(*  Title:      HOL/ex/insort.ML
    72.6      ID:         $Id$
    72.7 -    Author: 	Tobias Nipkow
    72.8 +    Author:     Tobias Nipkow
    72.9      Copyright   1994 TU Muenchen
   72.10  
   72.11  Correctness proof of insertion sort.
    73.1 --- a/src/HOL/ex/LList.ML	Tue Jan 30 15:19:20 1996 +0100
    73.2 +++ b/src/HOL/ex/LList.ML	Tue Jan 30 15:24:36 1996 +0100
    73.3 @@ -1,6 +1,6 @@
    73.4 -(*  Title: 	HOL/llist
    73.5 +(*  Title:      HOL/llist
    73.6      ID:         $Id$
    73.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    73.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    73.9      Copyright   1993  University of Cambridge
   73.10  
   73.11  SHOULD LListD_Fun_CONS_I, etc., be equations (for rewriting)?
   73.12 @@ -82,13 +82,13 @@
   73.13  qed "CONS_mono";
   73.14  
   73.15  Addsimps [LList_corec_fun_def RS def_nat_rec_0,
   73.16 -	  LList_corec_fun_def RS def_nat_rec_Suc];
   73.17 +          LList_corec_fun_def RS def_nat_rec_Suc];
   73.18  
   73.19  (** The directions of the equality are proved separately **)
   73.20  
   73.21  goalw LList.thy [LList_corec_def]
   73.22      "LList_corec a f <= sum_case (%u.NIL) \
   73.23 -\			   (split(%z w. CONS z (LList_corec w f))) (f a)";
   73.24 +\                          (split(%z w. CONS z (LList_corec w f))) (f a)";
   73.25  by (rtac UN1_least 1);
   73.26  by (res_inst_tac [("n","k")] natE 1);
   73.27  by (ALLGOALS (Asm_simp_tac));
   73.28 @@ -106,14 +106,14 @@
   73.29  (*the recursion equation for LList_corec -- NOT SUITABLE FOR REWRITING!*)
   73.30  goal LList.thy
   73.31      "LList_corec a f = sum_case (%u. NIL) \
   73.32 -\			    (split(%z w. CONS z (LList_corec w f))) (f a)";
   73.33 +\                           (split(%z w. CONS z (LList_corec w f))) (f a)";
   73.34  by (REPEAT (resolve_tac [equalityI, LList_corec_subset1, 
   73.35 -			 LList_corec_subset2] 1));
   73.36 +                         LList_corec_subset2] 1));
   73.37  qed "LList_corec";
   73.38  
   73.39  (*definitional version of same*)
   73.40  val [rew] = goal LList.thy
   73.41 -    "[| !!x. h(x) == LList_corec x f |] ==>	\
   73.42 +    "[| !!x. h(x) == LList_corec x f |] ==>     \
   73.43  \    h(a) = sum_case (%u.NIL) (split(%z w. CONS z (h w))) (f a)";
   73.44  by (rewtac rew);
   73.45  by (rtac LList_corec 1);
   73.46 @@ -183,7 +183,7 @@
   73.47  by (safe_tac HOL_cs);
   73.48  by (rtac diag_eqI 1);
   73.49  by (rtac (LListD_implies_ntrunc_equality RS spec RS spec RS mp RS 
   73.50 -	  ntrunc_equality) 1);
   73.51 +          ntrunc_equality) 1);
   73.52  by (assume_tac 1);
   73.53  by (etac (fst_imageI RS (fst_image_LListD RS subsetD)) 1);
   73.54  qed "LListD_subset_diag";
   73.55 @@ -225,12 +225,12 @@
   73.56  by (eresolve_tac [llist.elim] 1);
   73.57  by (ALLGOALS
   73.58      (asm_simp_tac (!simpset addsimps [diagI, LListD_Fun_NIL_I,
   73.59 -				      LListD_Fun_CONS_I])));
   73.60 +                                      LListD_Fun_CONS_I])));
   73.61  qed "diag_subset_LListD";
   73.62  
   73.63  goal LList.thy "LListD(diag(A)) = diag(llist(A))";
   73.64  by (REPEAT (resolve_tac [equalityI, LListD_subset_diag, 
   73.65 -			 diag_subset_LListD] 1));
   73.66 +                         diag_subset_LListD] 1));
   73.67  qed "LListD_eq_diag";
   73.68  
   73.69  goal LList.thy 
   73.70 @@ -264,14 +264,14 @@
   73.71  by (rtac ext 1);
   73.72  (*next step avoids an unknown (and flexflex pair) in simplification*)
   73.73  by (res_inst_tac [("A", "{u.True}"),
   73.74 -		  ("r", "range(%u. (h1(u),h2(u)))")] LList_equalityI 1);
   73.75 +                  ("r", "range(%u. (h1(u),h2(u)))")] LList_equalityI 1);
   73.76  by (rtac rangeI 1);
   73.77  by (safe_tac set_cs);
   73.78  by (stac prem1 1);
   73.79  by (stac prem2 1);
   73.80  by (simp_tac (!simpset addsimps [LListD_Fun_NIL_I,
   73.81 -				 CollectI RS LListD_Fun_CONS_I]
   73.82 -	               |> add_eqI) 1);
   73.83 +                                 CollectI RS LListD_Fun_CONS_I]
   73.84 +                       |> add_eqI) 1);
   73.85  qed "LList_corec_unique";
   73.86  
   73.87  val [prem] = goal LList.thy
   73.88 @@ -377,7 +377,7 @@
   73.89  goalw LList.thy [LCons_def]
   73.90      "Rep_llist(LCons x l) = CONS (Leaf x) (Rep_llist l)";
   73.91  by (REPEAT (resolve_tac [llist.CONS_I RS Abs_llist_inverse,
   73.92 -			 rangeI, Rep_llist] 1));
   73.93 +                         rangeI, Rep_llist] 1));
   73.94  qed "Rep_llist_LCons";
   73.95  
   73.96  (** Injectiveness of CONS and LCons **)
   73.97 @@ -391,9 +391,9 @@
   73.98  
   73.99  (*For reasoning about abstract llist constructors*)
  73.100  val llist_cs = set_cs addIs [Rep_llist]@llist.intrs
  73.101 -	              addSEs [CONS_neq_NIL,NIL_neq_CONS,CONS_inject]
  73.102 -		      addSDs [inj_onto_Abs_llist RS inj_ontoD,
  73.103 -			      inj_Rep_llist RS injD, Leaf_inject];
  73.104 +                      addSEs [CONS_neq_NIL,NIL_neq_CONS,CONS_inject]
  73.105 +                      addSDs [inj_onto_Abs_llist RS inj_ontoD,
  73.106 +                              inj_Rep_llist RS injD, Leaf_inject];
  73.107  
  73.108  goalw LList.thy [LCons_def] "(LCons x xs=LCons y ys) = (x=y & xs=ys)";
  73.109  by (fast_tac llist_cs 1);
  73.110 @@ -413,12 +413,12 @@
  73.111  
  73.112  (*A special case of list_equality for functions over lazy lists*)
  73.113  val [Mlist,gMlist,NILcase,CONScase] = goal LList.thy
  73.114 - "[| M: llist(A); g(NIL): llist(A); 				\
  73.115 -\    f(NIL)=g(NIL);						\
  73.116 -\    !!x l. [| x:A;  l: llist(A) |] ==>				\
  73.117 -\	    (f(CONS x l),g(CONS x l)) :				\
  73.118 + "[| M: llist(A); g(NIL): llist(A);                             \
  73.119 +\    f(NIL)=g(NIL);                                             \
  73.120 +\    !!x l. [| x:A;  l: llist(A) |] ==>                         \
  73.121 +\           (f(CONS x l),g(CONS x l)) :                         \
  73.122  \               LListD_Fun (diag A) ((%u.(f(u),g(u)))``llist(A) Un  \
  73.123 -\                                   diag(llist(A)))		\
  73.124 +\                                   diag(llist(A)))             \
  73.125  \ |] ==> f(M) = g(M)";
  73.126  by (rtac LList_equalityI 1);
  73.127  by (rtac (Mlist RS imageI) 1);
  73.128 @@ -454,7 +454,7 @@
  73.129  by (etac llist.elim 1);
  73.130  by (ALLGOALS (asm_simp_tac (!simpset addsimps [Lmap_NIL,Lmap_CONS])));
  73.131  by (REPEAT (ares_tac [list_Fun_NIL_I, list_Fun_CONS_I, 
  73.132 -		      minor, imageI, UnI1] 1));
  73.133 +                      minor, imageI, UnI1] 1));
  73.134  qed "Lmap_type";
  73.135  
  73.136  (*This type checking rule synthesises a sufficiently large set for f*)
  73.137 @@ -472,7 +472,7 @@
  73.138  by (etac llist.elim 1);
  73.139  by (ALLGOALS (asm_simp_tac (!simpset addsimps [Lmap_NIL,Lmap_CONS])));
  73.140  by (REPEAT (ares_tac [LListD_Fun_NIL_I, imageI, UnI1,
  73.141 -		      rangeI RS LListD_Fun_CONS_I] 1));
  73.142 +                      rangeI RS LListD_Fun_CONS_I] 1));
  73.143  qed "Lmap_compose";
  73.144  
  73.145  val [prem] = goal LList.thy "M: llist(A) ==> Lmap (%x.x) M = M";
  73.146 @@ -481,7 +481,7 @@
  73.147  by (etac llist.elim 1);
  73.148  by (ALLGOALS (asm_simp_tac (!simpset addsimps [Lmap_NIL,Lmap_CONS])));
  73.149  by (REPEAT (ares_tac [LListD_Fun_NIL_I, imageI RS UnI1,
  73.150 -		      rangeI RS LListD_Fun_CONS_I] 1));
  73.151 +                      rangeI RS LListD_Fun_CONS_I] 1));
  73.152  qed "Lmap_ident";
  73.153  
  73.154  
  73.155 @@ -505,7 +505,7 @@
  73.156  qed "Lappend_CONS";
  73.157  
  73.158  Addsimps [llist.NIL_I, Lappend_NIL_NIL, Lappend_NIL_CONS,
  73.159 -	  Lappend_CONS, LListD_Fun_CONS_I, range_eqI, image_eqI];
  73.160 +          Lappend_CONS, LListD_Fun_CONS_I, range_eqI, image_eqI];
  73.161  Delsimps [Pair_eq];
  73.162  
  73.163  goal LList.thy "!!M. M: llist(A) ==> Lappend NIL M = M";
  73.164 @@ -582,7 +582,7 @@
  73.165  
  73.166  goalw LList.thy [llist_corec_def,LNil_def,LCons_def]
  73.167      "llist_corec a f = sum_case (%u. LNil) \
  73.168 -\			    (split(%z w. LCons z (llist_corec w f))) (f a)";
  73.169 +\                           (split(%z w. LCons z (llist_corec w f))) (f a)";
  73.170  by (stac LList_corec 1);
  73.171  by (res_inst_tac [("s","f(a)")] sumE 1);
  73.172  by (asm_simp_tac (!simpset addsimps [LList_corec_type2]) 1);
  73.173 @@ -594,7 +594,7 @@
  73.174  
  73.175  (*definitional version of same*)
  73.176  val [rew] = goal LList.thy
  73.177 -    "[| !!x. h(x) == llist_corec x f |] ==>	\
  73.178 +    "[| !!x. h(x) == llist_corec x f |] ==>     \
  73.179  \    h(a) = sum_case (%u.LNil) (split(%z w. LCons z (h w))) (f a)";
  73.180  by (rewtac rew);
  73.181  by (rtac llist_corec 1);
  73.182 @@ -641,8 +641,8 @@
  73.183      "[| (l1,l2) : r;  r <= llistD_Fun(r Un range(%x.(x,x))) |] ==> l1=l2";
  73.184  by (rtac (inj_Rep_llist RS injD) 1);
  73.185  by (res_inst_tac [("r", "prod_fun Rep_llist Rep_llist ``r"),
  73.186 -		  ("A", "range(Leaf)")] 
  73.187 -	LList_equalityI 1);
  73.188 +                  ("A", "range(Leaf)")] 
  73.189 +        LList_equalityI 1);
  73.190  by (rtac (prem1 RS prod_fun_imageI) 1);
  73.191  by (rtac (prem2 RS image_mono RS subset_trans) 1);
  73.192  by (rtac (image_compose RS subst) 1);
  73.193 @@ -677,10 +677,10 @@
  73.194  
  73.195  (*A special case of list_equality for functions over lazy lists*)
  73.196  val [prem1,prem2] = goal LList.thy
  73.197 -    "[| f(LNil)=g(LNil);						\
  73.198 -\       !!x l. (f(LCons x l),g(LCons x l)) :				\
  73.199 -\              llistD_Fun(range(%u. (f(u),g(u))) Un range(%v. (v,v)))	\
  73.200 -\    |]	==> f(l) = (g(l :: 'a llist) :: 'b llist)";
  73.201 +    "[| f(LNil)=g(LNil);                                                \
  73.202 +\       !!x l. (f(LCons x l),g(LCons x l)) :                            \
  73.203 +\              llistD_Fun(range(%u. (f(u),g(u))) Un range(%v. (v,v)))   \
  73.204 +\    |] ==> f(l) = (g(l :: 'a llist) :: 'b llist)";
  73.205  by (res_inst_tac [("r", "range(%u. (f(u),g(u)))")] llist_equalityI 1);
  73.206  by (rtac rangeI 1);
  73.207  by (rtac subsetI 1);
  73.208 @@ -696,7 +696,7 @@
  73.209  
  73.210  (*simpset for llist bisimulations*)
  73.211  Addsimps [llist_case_LNil, llist_case_LCons, 
  73.212 -	  llistD_Fun_LNil_I, llistD_Fun_LCons_I];
  73.213 +          llistD_Fun_LNil_I, llistD_Fun_LCons_I];
  73.214  
  73.215  
  73.216  (*** The functional "lmap" ***)
  73.217 @@ -752,7 +752,7 @@
  73.218  (** Two lemmas about natrec n x (%m.g), which is essentially (g^n)(x) **)
  73.219  
  73.220  goal LList.thy
  73.221 -    "nat_rec n (LCons b l) (%m. lmap(f)) =	\
  73.222 +    "nat_rec n (LCons b l) (%m. lmap(f)) =      \
  73.223  \    LCons (nat_rec n b (%m. f)) (nat_rec n l (%m. lmap(f)))";
  73.224  by (nat_ind_tac "n" 1);
  73.225  by (ALLGOALS (asm_simp_tac (!simpset addsimps [lmap_LCons])));
    74.1 --- a/src/HOL/ex/LexProd.ML	Tue Jan 30 15:19:20 1996 +0100
    74.2 +++ b/src/HOL/ex/LexProd.ML	Tue Jan 30 15:24:36 1996 +0100
    74.3 @@ -1,6 +1,6 @@
    74.4 -(*  Title: 	HOL/ex/lex-prod.ML
    74.5 +(*  Title:      HOL/ex/lex-prod.ML
    74.6      ID:         $Id$
    74.7 -    Author: 	Tobias Nipkow, TU Munich
    74.8 +    Author:     Tobias Nipkow, TU Munich
    74.9      Copyright   1993  TU Munich
   74.10  
   74.11  For lex-prod.thy.
    75.1 --- a/src/HOL/ex/MT.ML	Tue Jan 30 15:19:20 1996 +0100
    75.2 +++ b/src/HOL/ex/MT.ML	Tue Jan 30 15:24:36 1996 +0100
    75.3 @@ -1,6 +1,6 @@
    75.4 -(*  Title: 	HOL/ex/MT.ML
    75.5 +(*  Title:      HOL/ex/MT.ML
    75.6      ID:         $Id$
    75.7 -    Author: 	Jacob Frost, Cambridge University Computer Laboratory
    75.8 +    Author:     Jacob Frost, Cambridge University Computer Laboratory
    75.9      Copyright   1993  University of Cambridge
   75.10  
   75.11  Based upon the article
   75.12 @@ -766,7 +766,7 @@
   75.13  by (safe_tac HOL_cs);
   75.14  by (DEPTH_SOLVE 
   75.15      (ares_tac [consistency_const, consistency_var, consistency_fn,
   75.16 -	       consistency_fix, consistency_app1, consistency_app2] 1));
   75.17 +               consistency_fix, consistency_app1, consistency_app2] 1));
   75.18  qed "consistency";
   75.19  
   75.20  (* ############################################################ *)
    76.1 --- a/src/HOL/ex/NatSum.ML	Tue Jan 30 15:19:20 1996 +0100
    76.2 +++ b/src/HOL/ex/NatSum.ML	Tue Jan 30 15:24:36 1996 +0100
    76.3 @@ -1,6 +1,6 @@
    76.4 -(*  Title: 	HOL/ex/natsum.ML
    76.5 +(*  Title:      HOL/ex/natsum.ML
    76.6      ID:         $Id$
    76.7 -    Author: 	Tobias Nipkow
    76.8 +    Author:     Tobias Nipkow
    76.9      Copyright   1994 TU Muenchen
   76.10  
   76.11  Summing natural numbers, squares and cubes. Could be continued...
    77.1 --- a/src/HOL/ex/Perm.ML	Tue Jan 30 15:19:20 1996 +0100
    77.2 +++ b/src/HOL/ex/Perm.ML	Tue Jan 30 15:24:36 1996 +0100
    77.3 @@ -1,6 +1,6 @@
    77.4 -(*  Title: 	HOL/ex/Perm.ML
    77.5 +(*  Title:      HOL/ex/Perm.ML
    77.6      ID:         $Id$
    77.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    77.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    77.9      Copyright   1995  University of Cambridge
   77.10  
   77.11  Permutations: example of an inductive definition
   77.12 @@ -74,7 +74,7 @@
   77.13  
   77.14  goal Perm.thy "a # xs <~~> xs @ [a]";
   77.15  by (rtac perm.trans 1);
   77.16 -br perm_append_swap 2;
   77.17 +by (rtac perm_append_swap 2);
   77.18  by (simp_tac (!simpset addsimps [perm_refl]) 1);
   77.19  qed "perm_append_single";
   77.20  
    78.1 --- a/src/HOL/ex/PropLog.ML	Tue Jan 30 15:19:20 1996 +0100
    78.2 +++ b/src/HOL/ex/PropLog.ML	Tue Jan 30 15:24:36 1996 +0100
    78.3 @@ -1,6 +1,6 @@
    78.4 -(*  Title: 	HOL/ex/pl.ML
    78.5 +(*  Title:      HOL/ex/pl.ML
    78.6      ID:         $Id$
    78.7 -    Author: 	Tobias Nipkow & Lawrence C Paulson
    78.8 +    Author:     Tobias Nipkow & Lawrence C Paulson
    78.9      Copyright   1994  TU Muenchen & University of Cambridge
   78.10  
   78.11  Soundness and completeness of propositional logic w.r.t. truth-tables.
   78.12 @@ -107,7 +107,7 @@
   78.13  by(PropLog.pl.induct_tac "p" 1);
   78.14  by (ALLGOALS (simp_tac (!simpset addsimps [thms_I, thms.H])));
   78.15  by (fast_tac (set_cs addIs [weaken_left_Un1, weaken_left_Un2, 
   78.16 -			   weaken_right, imp_false]
   78.17 +                           weaken_right, imp_false]
   78.18                      addSEs [false_imp]) 1);
   78.19  qed "hyps_thms_if";
   78.20  
    79.1 --- a/src/HOL/ex/Puzzle.ML	Tue Jan 30 15:19:20 1996 +0100
    79.2 +++ b/src/HOL/ex/Puzzle.ML	Tue Jan 30 15:24:36 1996 +0100
    79.3 @@ -1,6 +1,6 @@
    79.4 -(*  Title: 	HOL/ex/puzzle.ML
    79.5 +(*  Title:      HOL/ex/puzzle.ML
    79.6      ID:         $Id$
    79.7 -    Author: 	Tobias Nipkow
    79.8 +    Author:     Tobias Nipkow
    79.9      Copyright   1993 TU Muenchen
   79.10  
   79.11  For puzzle.thy.  A question from "Bundeswettbewerb Mathematik"
    80.1 --- a/src/HOL/ex/Qsort.ML	Tue Jan 30 15:19:20 1996 +0100
    80.2 +++ b/src/HOL/ex/Qsort.ML	Tue Jan 30 15:24:36 1996 +0100
    80.3 @@ -1,6 +1,6 @@
    80.4 -(*  Title: 	HOL/ex/qsort.ML
    80.5 +(*  Title:      HOL/ex/qsort.ML
    80.6      ID:         $Id$
    80.7 -    Author: 	Tobias Nipkow
    80.8 +    Author:     Tobias Nipkow
    80.9      Copyright   1994 TU Muenchen
   80.10  
   80.11  Two verifications of Quicksort
    81.1 --- a/src/HOL/ex/ROOT.ML	Tue Jan 30 15:19:20 1996 +0100
    81.2 +++ b/src/HOL/ex/ROOT.ML	Tue Jan 30 15:24:36 1996 +0100
    81.3 @@ -1,6 +1,6 @@
    81.4 -(*  Title:  	HOL/ex/ROOT
    81.5 +(*  Title:      HOL/ex/ROOT
    81.6      ID:         $Id$
    81.7 -    Author: 	Tobias Nipkow, Cambridge University Computer Laboratory
    81.8 +    Author:     Tobias Nipkow, Cambridge University Computer Laboratory
    81.9      Copyright   1991  University of Cambridge
   81.10  
   81.11  Executes miscellaneous examples for Higher-Order Logic. 
    82.1 --- a/src/HOL/ex/SList.ML	Tue Jan 30 15:19:20 1996 +0100
    82.2 +++ b/src/HOL/ex/SList.ML	Tue Jan 30 15:24:36 1996 +0100
    82.3 @@ -1,6 +1,6 @@
    82.4 -(*  Title: 	HOL/ex/SList.ML
    82.5 +(*  Title:      HOL/ex/SList.ML
    82.6      ID:         $Id$
    82.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    82.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    82.9      Copyright   1993  University of Cambridge
   82.10  
   82.11  Definition of type 'a list by a least fixed point
   82.12 @@ -45,7 +45,7 @@
   82.13  (*Perform induction on xs. *)
   82.14  fun list_ind_tac a M = 
   82.15      EVERY [res_inst_tac [("l",a)] list_induct2 M,
   82.16 -	   rename_last_tac a ["1"] (M+1)];
   82.17 +           rename_last_tac a ["1"] (M+1)];
   82.18  
   82.19  (*** Isomorphisms ***)
   82.20  
   82.21 @@ -89,9 +89,9 @@
   82.22  
   82.23  (*For reasoning about abstract list constructors*)
   82.24  val list_cs = set_cs addIs [Rep_list] @ list.intrs
   82.25 -	             addSEs [CONS_neq_NIL,NIL_neq_CONS,CONS_inject]
   82.26 -		     addSDs [inj_onto_Abs_list RS inj_ontoD,
   82.27 -			     inj_Rep_list RS injD, Leaf_inject];
   82.28 +                     addSEs [CONS_neq_NIL,NIL_neq_CONS,CONS_inject]
   82.29 +                     addSDs [inj_onto_Abs_list RS inj_ontoD,
   82.30 +                             inj_Rep_list RS injD, Leaf_inject];
   82.31  
   82.32  goalw SList.thy [Cons_def] "(x#xs=y#ys) = (x=y & xs=ys)";
   82.33  by (fast_tac list_cs 1);
   82.34 @@ -167,10 +167,10 @@
   82.35      "(CONS M1 M2, N) : pred_sexp^+ ==> \
   82.36  \    (M1,N) : pred_sexp^+ & (M2,N) : pred_sexp^+";
   82.37  by (rtac (prem RS (pred_sexp_subset_Sigma RS trancl_subset_Sigma RS 
   82.38 -		   subsetD RS SigmaE2)) 1);
   82.39 +                   subsetD RS SigmaE2)) 1);
   82.40  by (etac (sexp_CONS_D RS conjE) 1);
   82.41  by (REPEAT (ares_tac [conjI, pred_sexp_CONS_I1, pred_sexp_CONS_I2,
   82.42 -		      prem RSN (2, trans_trancl RS transD)] 1));
   82.43 +                      prem RSN (2, trans_trancl RS transD)] 1));
   82.44  qed "pred_sexp_CONS_D";
   82.45  
   82.46  (** Conversion rules for List_rec **)
   82.47 @@ -211,8 +211,8 @@
   82.48  
   82.49  (*Type checking.  Useful?*)
   82.50  val major::A_subset_sexp::prems = goal SList.thy
   82.51 -    "[| M: list(A);    	\
   82.52 -\       A<=sexp;      	\
   82.53 +    "[| M: list(A);     \
   82.54 +\       A<=sexp;        \
   82.55  \       c: C(NIL);      \
   82.56  \       !!x y r. [| x: A;  y: list(A);  r: C(y) |] ==> h x y r: C(CONS x y) \
   82.57  \    |] ==> List_rec M c h : C(M :: 'a item)";
   82.58 @@ -373,7 +373,7 @@
   82.59  qed "map_compose2";
   82.60  
   82.61  goal SList.thy "!!f. (!!x. f(x): sexp) ==> \
   82.62 -\	Abs_map g (Rep_map f xs) = map (%t. g(f(t))) xs";
   82.63 +\       Abs_map g (Rep_map f xs) = map (%t. g(f(t))) xs";
   82.64  by (list_ind_tac "xs" 1);
   82.65  by(ALLGOALS(asm_simp_tac(!simpset addsimps
   82.66         [Rep_map_type,list_sexp RS subsetD])));
    83.1 --- a/src/HOL/ex/Simult.ML	Tue Jan 30 15:19:20 1996 +0100
    83.2 +++ b/src/HOL/ex/Simult.ML	Tue Jan 30 15:24:36 1996 +0100
    83.3 @@ -1,6 +1,6 @@
    83.4 -(*  Title: 	HOL/ex/Simult.ML
    83.5 +(*  Title:      HOL/ex/Simult.ML
    83.6      ID:         $Id$
    83.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    83.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    83.9      Copyright   1993  University of Cambridge
   83.10  
   83.11  Primitives for simultaneous recursive type definitions
   83.12 @@ -18,7 +18,7 @@
   83.13  goal Simult.thy "mono(%Z.  A <*> Part Z In1 \
   83.14  \                      <+> ({Numb(0)} <+> Part Z In0 <*> Part Z In1))";
   83.15  by (REPEAT (ares_tac [monoI, subset_refl, usum_mono, uprod_mono,
   83.16 -		      Part_mono] 1));
   83.17 +                      Part_mono] 1));
   83.18  qed "TF_fun_mono";
   83.19  
   83.20  val TF_unfold = TF_fun_mono RS (TF_def RS def_lfp_Tarski);
   83.21 @@ -44,14 +44,14 @@
   83.22  
   83.23  val major::prems = goalw Simult.thy TF_Rep_defs
   83.24   "[| i: TF(A);  \
   83.25 -\    !!M N. [| M: A;  N: Part (TF A) In1;  R(N) |] ==> R(TCONS M N);	\
   83.26 -\    R(FNIL);        		\
   83.27 +\    !!M N. [| M: A;  N: Part (TF A) In1;  R(N) |] ==> R(TCONS M N);    \
   83.28 +\    R(FNIL);                   \
   83.29  \    !!M N. [| M:  Part (TF A) In0;  N: Part (TF A) In1;  R(M);  R(N) \
   83.30  \            |] ==> R(FCONS M N)    \
   83.31  \    |] ==> R(i)";
   83.32  by (rtac ([TF_def, TF_fun_mono, major] MRS def_induct) 1);
   83.33  by (fast_tac (set_cs addIs (prems@[PartI])
   83.34 -		       addEs [usumE, uprodE, PartE]) 1);
   83.35 +                       addEs [usumE, uprodE, PartE]) 1);
   83.36  qed "TF_induct";
   83.37  
   83.38  (*This lemma replaces a use of subgoal_tac to prove tree_forest_induct*)
   83.39 @@ -62,8 +62,8 @@
   83.40  qed "TF_induct_lemma";
   83.41  
   83.42  val uplus_cs = set_cs addSIs [PartI]
   83.43 -		      addSDs [In0_inject, In1_inject]
   83.44 -		      addSEs [In0_neq_In1, In1_neq_In0, PartE];
   83.45 +                      addSDs [In0_inject, In1_inject]
   83.46 +                      addSEs [In0_neq_In1, In1_neq_In0, PartE];
   83.47  
   83.48  (*Could prove  ~ TCONS M N : Part (TF A) In1  etc. *)
   83.49  
   83.50 @@ -84,20 +84,20 @@
   83.51  (*Induction for the abstract types 'a tree, 'a forest*)
   83.52  val prems = goalw Simult.thy [Tcons_def,Fnil_def,Fcons_def]
   83.53      "[| !!x ts. Q(ts) ==> P(Tcons x ts);     \
   83.54 -\	Q(Fnil);        \
   83.55 +\       Q(Fnil);        \
   83.56  \       !!t ts. [| P(t);  Q(ts) |] ==> Q(Fcons t ts)    \
   83.57  \    |] ==> (! t. P(t)) & (! ts. Q(ts))";
   83.58  by (res_inst_tac [("P1","%z.P(Abs_Tree(z))"),
   83.59 -		  ("Q1","%z.Q(Abs_Forest(z))")] 
   83.60 +                  ("Q1","%z.Q(Abs_Forest(z))")] 
   83.61      (Tree_Forest_induct RS conjE) 1);
   83.62  (*Instantiates ?A1 to range(Leaf). *)
   83.63  by (fast_tac (set_cs addSEs [Rep_Tree_inverse RS subst, 
   83.64 -			     Rep_Forest_inverse RS subst] 
   83.65 -	             addSIs [Rep_Tree,Rep_Forest]) 4);
   83.66 +                             Rep_Forest_inverse RS subst] 
   83.67 +                     addSIs [Rep_Tree,Rep_Forest]) 4);
   83.68  (*Cannot use simplifier: the rewrites work in the wrong direction!*)
   83.69  by (ALLGOALS (fast_tac (set_cs addSEs [Abs_Tree_inverse RS subst,
   83.70                            Abs_Forest_inverse RS subst] 
   83.71 -	             addSIs prems)));
   83.72 +                     addSIs prems)));
   83.73  qed "tree_forest_induct";
   83.74  
   83.75  
   83.76 @@ -132,7 +132,7 @@
   83.77  
   83.78  (*For reasoning about the representation*)
   83.79  val TF_Rep_cs = uplus_cs addIs [TF_I, uprodI, usum_In0I, usum_In1I]
   83.80 -	                 addSEs [Scons_inject];
   83.81 +                         addSEs [Scons_inject];
   83.82  
   83.83  val prems = goalw Simult.thy TF_Rep_defs
   83.84      "[| a: A;  M: Part (TF A) In1 |] ==> TCONS a M : Part (TF A) In0";
   83.85 @@ -195,14 +195,14 @@
   83.86  
   83.87  (*For reasoning about abstract constructors*)
   83.88  val TF_cs = set_cs addSIs [Rep_Tree, Rep_Forest, TCONS_I, FNIL_I, FCONS_I]
   83.89 -	           addSEs [TCONS_inject, FCONS_inject,
   83.90 -			   TCONS_neq_FNIL, FNIL_neq_TCONS,
   83.91 -			   FCONS_neq_FNIL, FNIL_neq_FCONS,
   83.92 -			   TCONS_neq_FCONS, FCONS_neq_TCONS]
   83.93 -		   addSDs [inj_onto_Abs_Tree RS inj_ontoD,
   83.94 -			   inj_onto_Abs_Forest RS inj_ontoD,
   83.95 -			   inj_Rep_Tree RS injD, inj_Rep_Forest RS injD,
   83.96 -			   Leaf_inject];
   83.97 +                   addSEs [TCONS_inject, FCONS_inject,
   83.98 +                           TCONS_neq_FNIL, FNIL_neq_TCONS,
   83.99 +                           FCONS_neq_FNIL, FNIL_neq_FCONS,
  83.100 +                           TCONS_neq_FCONS, FCONS_neq_TCONS]
  83.101 +                   addSDs [inj_onto_Abs_Tree RS inj_ontoD,
  83.102 +                           inj_onto_Abs_Forest RS inj_ontoD,
  83.103 +                           inj_Rep_Tree RS injD, inj_Rep_Forest RS injD,
  83.104 +                           Leaf_inject];
  83.105  
  83.106  goalw Simult.thy [Tcons_def] "(Tcons x xs=Tcons y ys) = (x=y & xs=ys)";
  83.107  by (fast_tac TF_cs 1);
  83.108 @@ -233,7 +233,7 @@
  83.109  (** conversion rules for TF_rec **)
  83.110  
  83.111  goalw Simult.thy [TCONS_def]
  83.112 -    "!!M N. [| M: sexp;  N: sexp |] ==> 	\
  83.113 +    "!!M N. [| M: sexp;  N: sexp |] ==>         \
  83.114  \           TF_rec (TCONS M N) b c d = b M N (TF_rec N b c d)";
  83.115  by (rtac (TF_rec_unfold RS trans) 1);
  83.116  by (simp_tac (!simpset addsimps [Case_In0, Split]) 1);
  83.117 @@ -246,7 +246,7 @@
  83.118  qed "TF_rec_FNIL";
  83.119  
  83.120  goalw Simult.thy [FCONS_def]
  83.121 - "!!M N. [| M: sexp;  N: sexp |] ==> 	\
  83.122 + "!!M N. [| M: sexp;  N: sexp |] ==>    \
  83.123  \        TF_rec (FCONS M N) b c d = d M N (TF_rec M b c d) (TF_rec N b c d)";
  83.124  by (rtac (TF_rec_unfold RS trans) 1);
  83.125  by (simp_tac (HOL_ss addsimps [Case_In1, List_case_CONS]) 1);
    84.1 --- a/src/HOL/ex/Sorting.ML	Tue Jan 30 15:19:20 1996 +0100
    84.2 +++ b/src/HOL/ex/Sorting.ML	Tue Jan 30 15:24:36 1996 +0100
    84.3 @@ -1,6 +1,6 @@
    84.4 -(*  Title: 	HOL/ex/sorting.ML
    84.5 +(*  Title:      HOL/ex/sorting.ML
    84.6      ID:         $Id$
    84.7 -    Author: 	Tobias Nipkow
    84.8 +    Author:     Tobias Nipkow
    84.9      Copyright   1994 TU Muenchen
   84.10  
   84.11  Some general lemmas
    85.1 --- a/src/HOL/ex/Term.ML	Tue Jan 30 15:19:20 1996 +0100
    85.2 +++ b/src/HOL/ex/Term.ML	Tue Jan 30 15:24:36 1996 +0100
    85.3 @@ -1,6 +1,6 @@
    85.4 -(*  Title: 	HOL/ex/Term
    85.5 +(*  Title:      HOL/ex/Term
    85.6      ID:         $Id$
    85.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    85.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    85.9      Copyright   1992  University of Cambridge
   85.10  
   85.11  Terms over a given alphabet -- function applications; illustrates list functor
   85.12 @@ -42,7 +42,7 @@
   85.13  \    |] ==> R(M)";
   85.14  by (rtac (major RS term.induct) 1);
   85.15  by (REPEAT (eresolve_tac ([minor] @
   85.16 - 		([Int_lower1,Int_lower2] RL [list_mono RS subsetD])) 1));
   85.17 +                ([Int_lower1,Int_lower2] RL [list_mono RS subsetD])) 1));
   85.18  (*Proof could also use  mono_Int RS subsetD RS IntE *)
   85.19  qed "Term_induct";
   85.20  
   85.21 @@ -74,7 +74,7 @@
   85.22      list_subset_sexp, range_Leaf_subset_sexp] 1
   85.23       ORELSE etac rev_subsetD 1));
   85.24  by (eres_inst_tac [("A1","term(?u)"), ("f1","Rep_term"), ("g1","Abs_term")]
   85.25 -    	(Abs_map_inverse RS subst) 1);
   85.26 +        (Abs_map_inverse RS subst) 1);
   85.27  by (rtac (range_Leaf_subset_sexp RS term_subset_sexp) 1);
   85.28  by (etac Abs_term_inverse 1);
   85.29  by (etac rangeE 1);
   85.30 @@ -104,7 +104,7 @@
   85.31  (*Perform induction on xs. *)
   85.32  fun term_ind2_tac a i = 
   85.33      EVERY [res_inst_tac [("t",a)] term_induct2 i,
   85.34 -	   rename_last_tac a ["1","s"] (i+1)];
   85.35 +           rename_last_tac a ["1","s"] (i+1)];
   85.36  
   85.37  
   85.38  
   85.39 @@ -155,7 +155,7 @@
   85.40  in
   85.41  
   85.42  val term_rec = prove_goalw Term.thy
   85.43 -	 [term_rec_def, App_def, Rep_Tlist_def, Abs_Tlist_def]
   85.44 +         [term_rec_def, App_def, Rep_Tlist_def, Abs_Tlist_def]
   85.45      "term_rec (App f ts) d = d f ts (map (%t. term_rec t d) ts)"
   85.46   (fn _ => [simp_tac term_rec_ss 1])
   85.47  
    86.1 --- a/src/HOL/ex/cla.ML	Tue Jan 30 15:19:20 1996 +0100
    86.2 +++ b/src/HOL/ex/cla.ML	Tue Jan 30 15:24:36 1996 +0100
    86.3 @@ -1,6 +1,6 @@
    86.4 -(*  Title: 	HOL/ex/cla
    86.5 +(*  Title:      HOL/ex/cla
    86.6      ID:         $Id$
    86.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    86.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    86.9      Copyright   1994  University of Cambridge
   86.10  
   86.11  Higher-Order Logic: predicate calculus problems
   86.12 @@ -217,8 +217,8 @@
   86.13  result();
   86.14  
   86.15  writeln"Problem 26";
   86.16 -goal HOL.thy "((? x. p(x)) = (? x. q(x))) &	\
   86.17 -\     (! x. ! y. p(x) & q(y) --> (r(x) = s(y)))	\
   86.18 +goal HOL.thy "((? x. p(x)) = (? x. q(x))) &     \
   86.19 +\     (! x. ! y. p(x) & q(y) --> (r(x) = s(y))) \
   86.20  \ --> ((! x. p(x)-->r(x)) = (! x. q(x)-->s(x)))";
   86.21  by (fast_tac HOL_cs 1);
   86.22  result();
   86.23 @@ -278,9 +278,9 @@
   86.24  
   86.25  writeln"Problem 34  AMENDED (TWICE!!)  NOT PROVED AUTOMATICALLY";
   86.26  (*Andrews's challenge*)
   86.27 -goal HOL.thy "((? x. ! y. p(x) = p(y))  =		\
   86.28 -\                   ((? x. q(x)) = (! y. p(y))))   =	\
   86.29 -\                  ((? x. ! y. q(x) = q(y))  =		\
   86.30 +goal HOL.thy "((? x. ! y. p(x) = p(y))  =               \
   86.31 +\                   ((? x. q(x)) = (! y. p(y))))   =    \
   86.32 +\                  ((? x. ! y. q(x) = q(y))  =          \
   86.33  \                   ((? x. p(x)) = (! y. q(y))))";
   86.34  by (deepen_tac HOL_cs 3 1);
   86.35  (*slower with smaller bounds*)
   86.36 @@ -294,7 +294,7 @@
   86.37  writeln"Problem 36";
   86.38  goal HOL.thy "(! x. ? y. J x y) & \
   86.39  \       (! x. ? y. G x y) & \
   86.40 -\       (! x y. J x y | G x y -->	\
   86.41 +\       (! x y. J x y | G x y -->       \
   86.42  \       (! z. J y z | G y z --> H x z))   \
   86.43  \   --> (! x. ? y. H x y)";
   86.44  by (fast_tac HOL_cs 1);
   86.45 @@ -311,10 +311,10 @@
   86.46  
   86.47  writeln"Problem 38";
   86.48  goal HOL.thy
   86.49 -    "(! x. p(a) & (p(x) --> (? y. p(y) & r x y)) -->		\
   86.50 -\          (? z. ? w. p(z) & r x w & r w z))  =			\
   86.51 -\    (! x. (~p(a) | p(x) | (? z. ? w. p(z) & r x w & r w z)) &	\
   86.52 -\          (~p(a) | ~(? y. p(y) & r x y) |				\
   86.53 +    "(! x. p(a) & (p(x) --> (? y. p(y) & r x y)) -->            \
   86.54 +\          (? z. ? w. p(z) & r x w & r w z))  =                 \
   86.55 +\    (! x. (~p(a) | p(x) | (? z. ? w. p(z) & r x w & r w z)) &  \
   86.56 +\          (~p(a) | ~(? y. p(y) & r x y) |                              \
   86.57  \           (? z. ? w. p(z) & r x w & r w z)))";
   86.58  
   86.59  writeln"Problem 39";
   86.60 @@ -329,7 +329,7 @@
   86.61  result();
   86.62  
   86.63  writeln"Problem 41";
   86.64 -goal HOL.thy "(! z. ? y. ! x. f x y = (f x z & ~ f x x))	\
   86.65 +goal HOL.thy "(! z. ? y. ! x. f x y = (f x z & ~ f x x))        \
   86.66  \              --> ~ (? z. ! x. f x z)";
   86.67  by (best_tac HOL_cs 1);
   86.68  result();
   86.69 @@ -341,25 +341,25 @@
   86.70  
   86.71  writeln"Problem 43  NOT PROVED AUTOMATICALLY";
   86.72  goal HOL.thy
   86.73 -    "(! x::'a. ! y::'a. q x y = (! z. p z x = (p z y::bool)))	\
   86.74 +    "(! x::'a. ! y::'a. q x y = (! z. p z x = (p z y::bool)))   \
   86.75  \ --> (! x. (! y. q x y = (q y x::bool)))";
   86.76  
   86.77  
   86.78  writeln"Problem 44";
   86.79 -goal HOL.thy "(! x. f(x) -->					\
   86.80 +goal HOL.thy "(! x. f(x) -->                                    \
   86.81  \             (? y. g(y) & h x y & (? y. g(y) & ~ h x y)))  &   \
   86.82 -\             (? x. j(x) & (! y. g(y) --> h x y))		\
   86.83 +\             (? x. j(x) & (! y. g(y) --> h x y))               \
   86.84  \             --> (? x. j(x) & ~f(x))";
   86.85  by (fast_tac HOL_cs 1);
   86.86  result();
   86.87  
   86.88  writeln"Problem 45";
   86.89  goal HOL.thy
   86.90 -    "(! x. f(x) & (! y. g(y) & h x y --> j x y)	\
   86.91 -\                     --> (! y. g(y) & h x y --> k(y))) &	\
   86.92 -\    ~ (? y. l(y) & k(y)) &					\
   86.93 -\    (? x. f(x) & (! y. h x y --> l(y))				\
   86.94 -\               & (! y. g(y) & h x y --> j x y))		\
   86.95 +    "(! x. f(x) & (! y. g(y) & h x y --> j x y) \
   86.96 +\                     --> (! y. g(y) & h x y --> k(y))) &       \
   86.97 +\    ~ (? y. l(y) & k(y)) &                                     \
   86.98 +\    (? x. f(x) & (! y. h x y --> l(y))                         \
   86.99 +\               & (! y. g(y) & h x y --> j x y))                \
  86.100  \     --> (? x. f(x) & ~ (? y. g(y) & h x y))";
  86.101  by (best_tac HOL_cs 1); 
  86.102  result();
  86.103 @@ -376,7 +376,7 @@
  86.104  (*Hard because it involves substitution for Vars;
  86.105    the type constraint ensures that x,y,z have the same type as a,b,u. *)
  86.106  goal HOL.thy "(? x y::'a. ! z. z=x | z=y) & P(a) & P(b) & (~a=b) \
  86.107 -\		--> (! u::'a.P(u))";
  86.108 +\               --> (! u::'a.P(u))";
  86.109  by (Classical.safe_tac HOL_cs);
  86.110  by (res_inst_tac [("x","a")] allE 1);
  86.111  by (assume_tac 1);
  86.112 @@ -454,8 +454,8 @@
  86.113  
  86.114  writeln"Problem 62 as corrected in AAR newletter #31";
  86.115  goal HOL.thy
  86.116 -    "(ALL x. p a & (p x --> p(f x)) --> p(f(f x)))  =	\
  86.117 -\    (ALL x. (~ p a | p x | p(f(f x))) &			\
  86.118 +    "(ALL x. p a & (p x --> p(f x)) --> p(f(f x)))  =   \
  86.119 +\    (ALL x. (~ p a | p x | p(f(f x))) &                        \
  86.120  \            (~ p a | ~ p(f x) | p(f(f x))))";
  86.121  by (fast_tac HOL_cs 1);
  86.122  result();
    87.1 --- a/src/HOL/ex/meson.ML	Tue Jan 30 15:19:20 1996 +0100
    87.2 +++ b/src/HOL/ex/meson.ML	Tue Jan 30 15:24:36 1996 +0100
    87.3 @@ -1,6 +1,6 @@
    87.4 -(*  Title: 	HOL/ex/meson
    87.5 +(*  Title:      HOL/ex/meson
    87.6      ID:         $Id$
    87.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    87.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    87.9      Copyright   1992  University of Cambridge
   87.10  
   87.11  The MESON resolution proof procedure for HOL
   87.12 @@ -13,7 +13,7 @@
   87.13  (*Prove theorems using fast_tac*)
   87.14  fun prove_fun s = 
   87.15      prove_goal HOL.thy s
   87.16 -	 (fn prems => [ cut_facts_tac prems 1, fast_tac HOL_cs 1 ]);
   87.17 +         (fn prems => [ cut_facts_tac prems 1, fast_tac HOL_cs 1 ]);
   87.18  
   87.19  (**** Negation Normal Form ****)
   87.20  
   87.21 @@ -160,38 +160,38 @@
   87.22  (*Permits forward proof from rules that discharge assumptions*)
   87.23  fun forward_res nf state =
   87.24    case Sequence.pull
   87.25 -	(tapply(ALLGOALS (METAHYPS (fn [prem] => rtac (nf prem) 1)), 
   87.26 -		state))
   87.27 +        (tapply(ALLGOALS (METAHYPS (fn [prem] => rtac (nf prem) 1)), 
   87.28 +                state))
   87.29    of Some(th,_) => th
   87.30     | None => raise THM("forward_res", 0, [state]);
   87.31  
   87.32  
   87.33  (*Negation Normal Form*)
   87.34  val nnf_rls = [imp_to_disjD, iff_to_disjD, not_conjD, not_disjD,
   87.35 -	       not_impD, not_iffD, not_allD, not_exD, not_notD];
   87.36 +               not_impD, not_iffD, not_allD, not_exD, not_notD];
   87.37  fun make_nnf th = make_nnf (tryres(th, nnf_rls))
   87.38      handle THM _ => 
   87.39 -	forward_res make_nnf
   87.40 -      	   (tryres(th, [conj_forward,disj_forward,all_forward,ex_forward]))
   87.41 +        forward_res make_nnf
   87.42 +           (tryres(th, [conj_forward,disj_forward,all_forward,ex_forward]))
   87.43      handle THM _ => th;
   87.44  
   87.45  
   87.46  (*Are any of the constants in "bs" present in the term?*)
   87.47  fun has_consts bs = 
   87.48    let fun has (Const(a,_)) = a mem bs
   87.49 -	| has (f$u) = has f orelse has u
   87.50 -	| has (Abs(_,_,t)) = has t
   87.51 -	| has _ = false
   87.52 +        | has (f$u) = has f orelse has u
   87.53 +        | has (Abs(_,_,t)) = has t
   87.54 +        | has _ = false
   87.55    in  has  end;
   87.56  
   87.57  (*Pull existential quantifiers (Skolemization)*)
   87.58  fun skolemize th = 
   87.59    if not (has_consts ["Ex"] (prop_of th)) then th
   87.60    else skolemize (tryres(th, [choice, conj_exD1, conj_exD2,
   87.61 -			  disj_exD, disj_exD1, disj_exD2]))
   87.62 +                          disj_exD, disj_exD1, disj_exD2]))
   87.63      handle THM _ => 
   87.64 -	skolemize (forward_res skolemize
   87.65 -		(tryres (th, [conj_forward, disj_forward, all_forward])))
   87.66 +        skolemize (forward_res skolemize
   87.67 +                (tryres (th, [conj_forward, disj_forward, all_forward])))
   87.68      handle THM _ => forward_res skolemize (th RS ex_forward);
   87.69  
   87.70  
   87.71 @@ -235,14 +235,14 @@
   87.72    else if not (has_consts ["All","op &"] (prop_of th))  then th::ths
   87.73    else (*conjunction?*)
   87.74          cnf_aux seen (th RS conjunct1, 
   87.75 -		      cnf_aux seen (th RS conjunct2, ths))
   87.76 +                      cnf_aux seen (th RS conjunct2, ths))
   87.77    handle THM _ => (*universal quant?*)
   87.78 -	cnf_aux  seen (freeze_spec th,  ths)
   87.79 +        cnf_aux  seen (freeze_spec th,  ths)
   87.80    handle THM _ => (*disjunction?*)
   87.81      let val tac = 
   87.82 -	(METAHYPS (resop (cnf_nil seen)) 1) THEN
   87.83 -	(STATE (fn st' => 
   87.84 -		METAHYPS (resop (cnf_nil (literals (concl_of st') @ seen))) 1))
   87.85 +        (METAHYPS (resop (cnf_nil seen)) 1) THEN
   87.86 +        (STATE (fn st' => 
   87.87 +                METAHYPS (resop (cnf_nil (literals (concl_of st') @ seen))) 1))
   87.88      in  Sequence.list_of_s (tapply(tac, th RS disj_forward))  @  ths
   87.89      end
   87.90  and cnf_nil seen th = cnf_aux seen (th,[]);
   87.91 @@ -268,9 +268,9 @@
   87.92  (*Forward proof, passing extra assumptions as theorems to the tactic*)
   87.93  fun forward_res2 nf hyps state =
   87.94    case Sequence.pull
   87.95 -	(tapply(REPEAT 
   87.96 -	   (METAHYPS (fn major::minors => rtac (nf (minors@hyps) major) 1) 1), 
   87.97 -	   state))
   87.98 +        (tapply(REPEAT 
   87.99 +           (METAHYPS (fn major::minors => rtac (nf (minors@hyps) major) 1) 1), 
  87.100 +           state))
  87.101    of Some(th,_) => th
  87.102     | None => raise THM("forward_res2", 0, [state]);
  87.103  
  87.104 @@ -279,7 +279,7 @@
  87.105  fun nodups_aux rls th = nodups_aux rls (th RS disj_assoc)
  87.106      handle THM _ => tryres(th,rls)
  87.107      handle THM _ => tryres(forward_res2 nodups_aux rls (th RS disj_forward2),
  87.108 -			   [disj_FalseD1, disj_FalseD2, asm_rl])
  87.109 +                           [disj_FalseD1, disj_FalseD2, asm_rl])
  87.110      handle THM _ => th;
  87.111  
  87.112  (*Remove duplicate literals, if there are any*)
  87.113 @@ -292,7 +292,7 @@
  87.114  
  87.115  (*Associate disjuctions to right -- make leftmost disjunct a LITERAL*)
  87.116  fun assoc_right th = assoc_right (th RS disj_assoc)
  87.117 -	handle THM _ => th;
  87.118 +        handle THM _ => th;
  87.119  
  87.120  (*Must check for negative literal first!*)
  87.121  val clause_rules = [disj_assoc, make_neg_rule, make_pos_rule];
  87.122 @@ -318,15 +318,15 @@
  87.123  
  87.124  (*Create a Horn clause*)
  87.125  fun make_horn crules th = make_horn crules (tryres(th,crules)) 
  87.126 -		          handle THM _ => th;
  87.127 +                          handle THM _ => th;
  87.128  
  87.129  (*Generate Horn clauses for all contrapositives of a clause*)
  87.130  fun add_contras crules (th,hcs) = 
  87.131    let fun rots (0,th) = hcs
  87.132 -	| rots (k,th) = zero_var_indexes (make_horn crules th) ::
  87.133 -			rots(k-1, assoc_right (th RS disj_comm))
  87.134 +        | rots (k,th) = zero_var_indexes (make_horn crules th) ::
  87.135 +                        rots(k-1, assoc_right (th RS disj_comm))
  87.136    in case nliterals(prop_of th) of
  87.137 -	1 => th::hcs
  87.138 +        1 => th::hcs
  87.139        | n => rots(n, assoc_right th)
  87.140    end;
  87.141  
  87.142 @@ -342,7 +342,7 @@
  87.143  (***** MESON PROOF PROCEDURE *****)
  87.144  
  87.145  fun rhyps (Const("==>",_) $ (Const("Trueprop",_) $ A) $ phi,
  87.146 -	   As) = rhyps(phi, A::As)
  87.147 +           As) = rhyps(phi, A::As)
  87.148    | rhyps (_, As) = As;
  87.149  
  87.150  (** Detecting repeated assumptions in a subgoal **)
  87.151 @@ -355,7 +355,7 @@
  87.152    | has_reps [_] = false
  87.153    | has_reps [t,u] = (t aconv u)
  87.154    | has_reps ts = (foldl ins_term (Net.empty, ts);  false)
  87.155 -    		  handle INSERT => true; 
  87.156 +                  handle INSERT => true; 
  87.157  
  87.158  (*Loop checking: FAIL if trying to prove the same thing twice
  87.159    -- repeated literals*)
  87.160 @@ -394,24 +394,24 @@
  87.161  
  87.162  fun MESON sko_tac = SELECT_GOAL
  87.163   (EVERY1 [rtac ccontr,
  87.164 -	  METAHYPS (fn negs =>
  87.165 -		    EVERY1 [skolemize_tac negs,
  87.166 -			    METAHYPS (sko_tac o make_clauses)])]);
  87.167 +          METAHYPS (fn negs =>
  87.168 +                    EVERY1 [skolemize_tac negs,
  87.169 +                            METAHYPS (sko_tac o make_clauses)])]);
  87.170  
  87.171  fun best_meson_tac sizef = 
  87.172    MESON (fn cls => 
  87.173 -	 resolve_tac (gocls cls) 1
  87.174 -	 THEN_BEST_FIRST 
  87.175 - 	 (has_fewer_prems 1, sizef,
  87.176 -	  prolog_step_tac (make_horns cls) 1));
  87.177 +         resolve_tac (gocls cls) 1
  87.178 +         THEN_BEST_FIRST 
  87.179 +         (has_fewer_prems 1, sizef,
  87.180 +          prolog_step_tac (make_horns cls) 1));
  87.181  
  87.182  (*First, breaks the goal into independent units*)
  87.183  val safe_meson_tac =
  87.184       SELECT_GOAL (TRY (safe_tac HOL_cs) THEN 
  87.185 -		  TRYALL (best_meson_tac size_of_subgoals));
  87.186 +                  TRYALL (best_meson_tac size_of_subgoals));
  87.187  
  87.188  val depth_meson_tac =
  87.189       MESON (fn cls => EVERY [resolve_tac (gocls cls) 1, 
  87.190 -			     depth_prolog_tac (make_horns cls)]);
  87.191 +                             depth_prolog_tac (make_horns cls)]);
  87.192  
  87.193  writeln"Reached end of file.";
    88.1 --- a/src/HOL/ex/mesontest.ML	Tue Jan 30 15:19:20 1996 +0100
    88.2 +++ b/src/HOL/ex/mesontest.ML	Tue Jan 30 15:24:36 1996 +0100
    88.3 @@ -1,6 +1,6 @@
    88.4 -(*  Title: 	HOL/ex/meson
    88.5 +(*  Title:      HOL/ex/meson
    88.6      ID:         $Id$
    88.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    88.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    88.9      Copyright   1992  University of Cambridge
   88.10  
   88.11  Test data for the MESON proof procedure
   88.12 @@ -14,7 +14,7 @@
   88.13  val xsko = skolemize nnf;
   88.14  by (cut_facts_tac [xsko] 1 THEN REPEAT (etac exE 1));
   88.15  val [_,sko] = gethyps 1;
   88.16 -val clauses = make_clauses [sko];	
   88.17 +val clauses = make_clauses [sko];       
   88.18  val horns = make_horns clauses;
   88.19  val go::_ = neg_clauses clauses;
   88.20  
   88.21 @@ -45,8 +45,8 @@
   88.22  val xsko25 = skolemize nnf25;
   88.23  by (cut_facts_tac [xsko25] 1 THEN REPEAT (etac exE 1));
   88.24  val [_,sko25] = gethyps 1;
   88.25 -val clauses25 = make_clauses [sko25];	(*7 clauses*)
   88.26 -val horns25 = make_horns clauses25;	(*16 Horn clauses*)
   88.27 +val clauses25 = make_clauses [sko25];   (*7 clauses*)
   88.28 +val horns25 = make_horns clauses25;     (*16 Horn clauses*)
   88.29  val go25::_ = neg_clauses clauses25;
   88.30  
   88.31  goal HOL.thy "False";
   88.32 @@ -55,8 +55,8 @@
   88.33  
   88.34  
   88.35  writeln"Problem 26";
   88.36 -goal HOL.thy "((? x. p(x)) = (? x. q(x))) &	\
   88.37 -\     (! x. ! y. p(x) & q(y) --> (r(x) = s(y)))	\
   88.38 +goal HOL.thy "((? x. p(x)) = (? x. q(x))) &     \
   88.39 +\     (! x. ! y. p(x) & q(y) --> (r(x) = s(y))) \
   88.40  \ --> ((! x. p(x)-->r(x)) = (! x. q(x)-->s(x)))";
   88.41  by (rtac ccontr 1);
   88.42  val [prem26] = gethyps 1;
   88.43 @@ -64,18 +64,18 @@
   88.44  val xsko26 = skolemize nnf26;
   88.45  by (cut_facts_tac [xsko26] 1 THEN REPEAT (etac exE 1));
   88.46  val [_,sko26] = gethyps 1;
   88.47 -val clauses26 = make_clauses [sko26];			(*9 clauses*)
   88.48 -val horns26 = make_horns clauses26;			(*24 Horn clauses*)
   88.49 +val clauses26 = make_clauses [sko26];                   (*9 clauses*)
   88.50 +val horns26 = make_horns clauses26;                     (*24 Horn clauses*)
   88.51  val go26::_ = neg_clauses clauses26;
   88.52  
   88.53  goal HOL.thy "False";
   88.54  by (rtac (make_goal go26) 1);
   88.55 -by (depth_prolog_tac horns26);	(*6 secs*)
   88.56 +by (depth_prolog_tac horns26);  (*6 secs*)
   88.57  
   88.58  
   88.59  
   88.60  writeln"Problem 43  NOW PROVED AUTOMATICALLY!!";
   88.61 -goal HOL.thy "(! x. ! y. q x y = (! z. p z x = (p z y::bool)))	\
   88.62 +goal HOL.thy "(! x. ! y. q x y = (! z. p z x = (p z y::bool)))  \
   88.63  \         --> (! x. (! y. q x y = (q y x::bool)))";
   88.64  by (rtac ccontr 1);
   88.65  val [prem43] = gethyps 1;
   88.66 @@ -83,8 +83,8 @@
   88.67  val xsko43 = skolemize nnf43;
   88.68  by (cut_facts_tac [xsko43] 1 THEN REPEAT (etac exE 1));
   88.69  val [_,sko43] = gethyps 1;
   88.70 -val clauses43 = make_clauses [sko43];	(*6*)
   88.71 -val horns43 = make_horns clauses43;	(*16*)
   88.72 +val clauses43 = make_clauses [sko43];   (*6*)
   88.73 +val horns43 = make_horns clauses43;     (*16*)
   88.74  val go43::_ = neg_clauses clauses43;
   88.75  
   88.76  goal HOL.thy "False";
   88.77 @@ -276,8 +276,8 @@
   88.78  result();
   88.79  
   88.80  writeln"Problem 26";
   88.81 -goal HOL.thy "((? x. p(x)) = (? x. q(x))) &	\
   88.82 -\     (! x. ! y. p(x) & q(y) --> (r(x) = s(y)))	\
   88.83 +goal HOL.thy "((? x. p(x)) = (? x. q(x))) &     \
   88.84 +\     (! x. ! y. p(x) & q(y) --> (r(x) = s(y))) \
   88.85  \ --> ((! x. p(x)-->r(x)) = (! x. q(x)-->s(x)))";
   88.86  by (safe_meson_tac 1); 
   88.87  result();
   88.88 @@ -303,7 +303,7 @@
   88.89  goal HOL.thy "(? x. F(x)) & (? y. G(y))  \
   88.90  \   --> ( ((! x. F(x)-->H(x)) & (! y. G(y)-->J(y)))  =   \
   88.91  \         (! x y. F(x) & G(y) --> H(x) & J(y)))";
   88.92 -by (safe_meson_tac 1);		(*5 secs*)
   88.93 +by (safe_meson_tac 1);          (*5 secs*)
   88.94  result();
   88.95  
   88.96  writeln"Problem 30";
   88.97 @@ -332,16 +332,16 @@
   88.98  writeln"Problem 33";
   88.99  goal HOL.thy "(! x. P(a) & (P(x)-->P(b))-->P(c))  =    \
  88.100  \    (! x. (~P(a) | P(x) | P(c)) & (~P(a) | ~P(b) | P(c)))";
  88.101 -by (safe_meson_tac 1);		(*5.6 secs*)
  88.102 +by (safe_meson_tac 1);          (*5.6 secs*)
  88.103  result();
  88.104  
  88.105  writeln"Problem 34  AMENDED (TWICE!!)";
  88.106  (*Andrews's challenge*)
  88.107 -goal HOL.thy "((? x. ! y. p(x) = p(y))  =		\
  88.108 -\              ((? x. q(x)) = (! y. p(y))))     =	\
  88.109 -\             ((? x. ! y. q(x) = q(y))  =		\
  88.110 +goal HOL.thy "((? x. ! y. p(x) = p(y))  =               \
  88.111 +\              ((? x. q(x)) = (! y. p(y))))     =       \
  88.112 +\             ((? x. ! y. q(x) = q(y))  =               \
  88.113  \              ((? x. p(x)) = (! y. q(y))))";
  88.114 -by (safe_meson_tac 1);  	(*90 secs*)
  88.115 +by (safe_meson_tac 1);          (*90 secs*)
  88.116  result();
  88.117  
  88.118  writeln"Problem 35";
  88.119 @@ -352,7 +352,7 @@
  88.120  writeln"Problem 36";
  88.121  goal HOL.thy "(! x. ? y. J x y) & \
  88.122  \       (! x. ? y. G x y) & \
  88.123 -\       (! x y. J x y | G x y -->	\
  88.124 +\       (! x y. J x y | G x y -->       \
  88.125  \       (! z. J y z | G y z --> H x z))   \
  88.126  \   --> (! x. ? y. H x y)";
  88.127  by (safe_meson_tac 1);
  88.128 @@ -369,12 +369,12 @@
  88.129  
  88.130  writeln"Problem 38";
  88.131  goal HOL.thy
  88.132 -    "(! x. p(a) & (p(x) --> (? y. p(y) & r x y)) -->		\
  88.133 -\          (? z. ? w. p(z) & r x w & r w z))  =			\
  88.134 -\    (! x. (~p(a) | p(x) | (? z. ? w. p(z) & r x w & r w z)) &	\
  88.135 -\          (~p(a) | ~(? y. p(y) & r x y) |			\
  88.136 +    "(! x. p(a) & (p(x) --> (? y. p(y) & r x y)) -->            \
  88.137 +\          (? z. ? w. p(z) & r x w & r w z))  =                 \
  88.138 +\    (! x. (~p(a) | p(x) | (? z. ? w. p(z) & r x w & r w z)) &  \
  88.139 +\          (~p(a) | ~(? y. p(y) & r x y) |                      \
  88.140  \           (? z. ? w. p(z) & r x w & r w z)))";
  88.141 -by (safe_meson_tac 1);		(*62 secs*)
  88.142 +by (safe_meson_tac 1);          (*62 secs*)
  88.143  result();
  88.144  
  88.145  writeln"Problem 39";
  88.146 @@ -389,7 +389,7 @@
  88.147  result();
  88.148  
  88.149  writeln"Problem 41";
  88.150 -goal HOL.thy "(! z. (? y. (! x. f x y = (f x z & ~ f x x))))	\
  88.151 +goal HOL.thy "(! z. (? y. (! x. f x y = (f x z & ~ f x x))))    \
  88.152  \              --> ~ (? z. ! x. f x z)";
  88.153  by (safe_meson_tac 1);
  88.154  result();
  88.155 @@ -400,54 +400,54 @@
  88.156  result();
  88.157  
  88.158  writeln"Problem 43  NOW PROVED AUTOMATICALLY!!";
  88.159 -goal HOL.thy "(! x. ! y. q x y = (! z. p z x = (p z y::bool)))	\
  88.160 +goal HOL.thy "(! x. ! y. q x y = (! z. p z x = (p z y::bool)))  \
  88.161  \         --> (! x. (! y. q x y = (q y x::bool)))";
  88.162  by (safe_meson_tac 1);
  88.163  result();
  88.164  
  88.165  writeln"Problem 44";
  88.166 -goal HOL.thy "(! x. f(x) -->					\
  88.167 -\             (? y. g(y) & h x y & (? y. g(y) & ~ h x y)))  &  	\
  88.168 -\             (? x. j(x) & (! y. g(y) --> h x y))		\
  88.169 +goal HOL.thy "(! x. f(x) -->                                    \
  88.170 +\             (? y. g(y) & h x y & (? y. g(y) & ~ h x y)))  &   \
  88.171 +\             (? x. j(x) & (! y. g(y) --> h x y))               \
  88.172  \             --> (? x. j(x) & ~f(x))";
  88.173  by (safe_meson_tac 1);
  88.174  result();
  88.175  
  88.176  writeln"Problem 45";
  88.177 -goal HOL.thy "(! x. f(x) & (! y. g(y) & h x y --> j x y)	\
  88.178 -\                     --> (! y. g(y) & h x y --> k(y))) &	\
  88.179 -\     ~ (? y. l(y) & k(y)) &					\
  88.180 -\     (? x. f(x) & (! y. h x y --> l(y))			\
  88.181 -\                  & (! y. g(y) & h x y --> j x y))		\
  88.182 +goal HOL.thy "(! x. f(x) & (! y. g(y) & h x y --> j x y)        \
  88.183 +\                     --> (! y. g(y) & h x y --> k(y))) &       \
  88.184 +\     ~ (? y. l(y) & k(y)) &                                    \
  88.185 +\     (? x. f(x) & (! y. h x y --> l(y))                        \
  88.186 +\                  & (! y. g(y) & h x y --> j x y))             \
  88.187  \     --> (? x. f(x) & ~ (? y. g(y) & h x y))";
  88.188 -by (safe_meson_tac 1);  	(*11 secs*)
  88.189 +by (safe_meson_tac 1);          (*11 secs*)
  88.190  result();
  88.191  
  88.192  writeln"Problem 46";
  88.193  goal HOL.thy
  88.194 -    "(! x. f(x) & (! y. f(y) & h y x --> g(y)) --> g(x)) &	\
  88.195 -\    ((? x.f(x) & ~g(x)) -->					\
  88.196 -\     (? x. f(x) & ~g(x) & (! y. f(y) & ~g(y) --> j x y))) &	\
  88.197 -\    (! x y. f(x) & f(y) & h x y --> ~j y x)			\
  88.198 +    "(! x. f(x) & (! y. f(y) & h y x --> g(y)) --> g(x)) &      \
  88.199 +\    ((? x.f(x) & ~g(x)) -->                                    \
  88.200 +\     (? x. f(x) & ~g(x) & (! y. f(y) & ~g(y) --> j x y))) &    \
  88.201 +\    (! x y. f(x) & f(y) & h x y --> ~j y x)                    \
  88.202  \     --> (! x. f(x) --> g(x))";
  88.203 -by (safe_meson_tac 1); 		(*11 secs*)
  88.204 +by (safe_meson_tac 1);          (*11 secs*)
  88.205  result();
  88.206  
  88.207  (*The Los problem?  Circulated by John Harrison*)
  88.208 -goal HOL.thy "(! x y z. P x y & P y z --> P x z) &	\
  88.209 -\      (! x y z. Q x y & Q y z --> Q x z) &	\
  88.210 -\      (! x y. P x y --> P y x) &	\
  88.211 -\      (! (x::'a) y. P x y | Q x y)	\
  88.212 +goal HOL.thy "(! x y z. P x y & P y z --> P x z) &      \
  88.213 +\      (! x y z. Q x y & Q y z --> Q x z) &     \
  88.214 +\      (! x y. P x y --> P y x) &       \
  88.215 +\      (! (x::'a) y. P x y | Q x y)     \
  88.216  \      --> (! x y. P x y) | (! x y. Q x y)";
  88.217  by (safe_meson_tac 1);
  88.218  result();
  88.219  
  88.220  (*A similar example, suggested by Johannes Schumann and credited to Pelletier*)
  88.221  goal HOL.thy "(!x y z. P x y --> P y z --> P x z) --> \
  88.222 -\	(!x y z. Q x y --> Q y z --> Q x z) --> \
  88.223 -\	(!x y.Q x y --> Q y x) -->  (!x y. P x y | Q x y) --> \
  88.224 -\	(!x y.P x y) | (!x y.Q x y)";
  88.225 -by (safe_meson_tac 1);		(*32 secs*)
  88.226 +\       (!x y z. Q x y --> Q y z --> Q x z) --> \
  88.227 +\       (!x y.Q x y --> Q y x) -->  (!x y. P x y | Q x y) --> \
  88.228 +\       (!x y.P x y) | (!x y.Q x y)";
  88.229 +by (safe_meson_tac 1);          (*32 secs*)
  88.230  result();
  88.231  
  88.232  writeln"Problem 50";  
  88.233 @@ -498,8 +498,8 @@
  88.234  
  88.235  writeln"Problem 62 as corrected in AAR newletter #31";
  88.236  goal HOL.thy
  88.237 -    "(ALL x. p a & (p x --> p(f x)) --> p(f(f x)))  =	\
  88.238 -\    (ALL x. (~ p a | p x | p(f(f x))) &			\
  88.239 +    "(ALL x. p a & (p x --> p(f x)) --> p(f(f x)))  =   \
  88.240 +\    (ALL x. (~ p a | p x | p(f(f x))) &                        \
  88.241  \            (~ p a | ~ p(f x) | p(f(f x))))";
  88.242  by (safe_meson_tac 1);
  88.243  result();
    89.1 --- a/src/HOL/ex/rel.ML	Tue Jan 30 15:19:20 1996 +0100
    89.2 +++ b/src/HOL/ex/rel.ML	Tue Jan 30 15:24:36 1996 +0100
    89.3 @@ -1,6 +1,6 @@
    89.4 -(*  Title: 	HOL/ex/rel
    89.5 +(*  Title:      HOL/ex/rel
    89.6      ID:         $Id$
    89.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    89.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    89.9      Copyright   1991  University of Cambridge
   89.10  
   89.11  Domain, range of a relation or function -- NOT YET WORKING
   89.12 @@ -11,9 +11,9 @@
   89.13  val thy = extend_theory Univ.thy "Rel"
   89.14  ([], [], [], [],
   89.15   [ 
   89.16 -  (["domain"],	"('a * 'b)set => 'a set"),
   89.17 -  (["range2"],	"('a * 'b)set => 'b set"),
   89.18 -  (["field"],	"('a * 'a)set => 'a set")
   89.19 +  (["domain"],  "('a * 'b)set => 'a set"),
   89.20 +  (["range2"],  "('a * 'b)set => 'b set"),
   89.21 +  (["field"],   "('a * 'a)set => 'a set")
   89.22   ],
   89.23   None)
   89.24   [
    90.1 --- a/src/HOL/ex/set.ML	Tue Jan 30 15:19:20 1996 +0100
    90.2 +++ b/src/HOL/ex/set.ML	Tue Jan 30 15:24:36 1996 +0100
    90.3 @@ -1,6 +1,6 @@
    90.4 -(*  Title: 	HOL/ex/set.ML
    90.5 +(*  Title:      HOL/ex/set.ML
    90.6      ID:         $Id$
    90.7 -    Author: 	Tobias Nipkow, Cambridge University Computer Laboratory
    90.8 +    Author:     Tobias Nipkow, Cambridge University Computer Laboratory
    90.9      Copyright   1991  University of Cambridge
   90.10  
   90.11  Cantor's Theorem; the Schroeder-Berstein Theorem.  
   90.12 @@ -62,8 +62,8 @@
   90.13  val [compl,fg,Xa] = goal Lfp.thy
   90.14      "[| Compl(f``X) = g``Compl(X);  f(a)=g(b);  a:X |] ==> b:X";
   90.15  by (EVERY1 [rtac (not_Compl RS subst), rtac contra_imageI,
   90.16 -	    rtac (compl RS subst), rtac (fg RS subst), stac not_Compl,
   90.17 -	    rtac imageI, rtac Xa]);
   90.18 +            rtac (compl RS subst), rtac (fg RS subst), stac not_Compl,
   90.19 +            rtac imageI, rtac Xa]);
   90.20  qed "disj_lemma";
   90.21  
   90.22  goal Lfp.thy "range(%z. if z:X then f(z) else g(z)) = f``X Un g``Compl(X)";
   90.23 @@ -122,11 +122,11 @@
   90.24  by (rtac exI 1);
   90.25  by (rtac bij_if_then_else 1);
   90.26  by (EVERY [rtac refl 4, rtac (injf RS inj_imp) 1,
   90.27 -	   rtac (injg RS inj_onto_Inv) 1]);
   90.28 +           rtac (injg RS inj_onto_Inv) 1]);
   90.29  by (EVERY1 [etac ssubst, stac double_complement, rtac subsetI,
   90.30 -	    etac imageE, etac ssubst, rtac rangeI]);
   90.31 +            etac imageE, etac ssubst, rtac rangeI]);
   90.32  by (EVERY1 [etac ssubst, stac double_complement, 
   90.33 -	    rtac (injg RS inv_image_comp RS sym)]);
   90.34 +            rtac (injg RS inv_image_comp RS sym)]);
   90.35  qed "schroeder_bernstein";
   90.36  
   90.37  writeln"Reached end of file.";
    91.1 --- a/src/HOL/ex/unsolved.ML	Tue Jan 30 15:19:20 1996 +0100
    91.2 +++ b/src/HOL/ex/unsolved.ML	Tue Jan 30 15:24:36 1996 +0100
    91.3 @@ -1,6 +1,6 @@
    91.4 -(*  Title: 	HOL/ex/unsolved
    91.5 +(*  Title:      HOL/ex/unsolved
    91.6      ID:         $Id$
    91.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    91.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    91.9      Copyright   1992  University of Cambridge
   91.10  
   91.11  Problems that currently defeat the MESON procedure as well as best_tac
   91.12 @@ -14,22 +14,22 @@
   91.13  
   91.14  writeln"Problem 47  Schubert's Steamroller";
   91.15  goal HOL.thy
   91.16 -    "(! x. P1(x) --> P0(x)) & (? x.P1(x)) &	\
   91.17 -\    (! x. P2(x) --> P0(x)) & (? x.P2(x)) &	\
   91.18 -\    (! x. P3(x) --> P0(x)) & (? x.P3(x)) &	\
   91.19 -\    (! x. P4(x) --> P0(x)) & (? x.P4(x)) &	\
   91.20 -\    (! x. P5(x) --> P0(x)) & (? x.P5(x)) &	\
   91.21 -\    (! x. Q1(x) --> Q0(x)) & (? x.Q1(x)) &	\
   91.22 -\    (! x. P0(x) --> ((! y.Q0(y)-->R(x,y)) | 	\
   91.23 -\		      (! y.P0(y) & S(y,x) & 	\
   91.24 -\		           (? z.Q0(z)&R(y,z)) --> R(x,y)))) &	\
   91.25 -\    (! x y. P3(y) & (P5(x)|P4(x)) --> S(x,y)) &	\
   91.26 -\    (! x y. P3(x) & P2(y) --> S(x,y)) &	\
   91.27 -\    (! x y. P2(x) & P1(y) --> S(x,y)) &	\
   91.28 -\    (! x y. P1(x) & (P2(y)|Q1(y)) --> ~R(x,y)) &	\
   91.29 -\    (! x y. P3(x) & P4(y) --> R(x,y)) &	\
   91.30 -\    (! x y. P3(x) & P5(y) --> ~R(x,y)) &	\
   91.31 -\    (! x. (P4(x)|P5(x)) --> (? y.Q0(y) & R(x,y)))	\
   91.32 +    "(! x. P1(x) --> P0(x)) & (? x.P1(x)) &     \
   91.33 +\    (! x. P2(x) --> P0(x)) & (? x.P2(x)) &     \
   91.34 +\    (! x. P3(x) --> P0(x)) & (? x.P3(x)) &     \
   91.35 +\    (! x. P4(x) --> P0(x)) & (? x.P4(x)) &     \
   91.36 +\    (! x. P5(x) --> P0(x)) & (? x.P5(x)) &     \
   91.37 +\    (! x. Q1(x) --> Q0(x)) & (? x.Q1(x)) &     \
   91.38 +\    (! x. P0(x) --> ((! y.Q0(y)-->R(x,y)) |    \
   91.39 +\                     (! y.P0(y) & S(y,x) &     \
   91.40 +\                          (? z.Q0(z)&R(y,z)) --> R(x,y)))) &   \
   91.41 +\    (! x y. P3(y) & (P5(x)|P4(x)) --> S(x,y)) &        \
   91.42 +\    (! x y. P3(x) & P2(y) --> S(x,y)) &        \
   91.43 +\    (! x y. P2(x) & P1(y) --> S(x,y)) &        \
   91.44 +\    (! x y. P1(x) & (P2(y)|Q1(y)) --> ~R(x,y)) &       \
   91.45 +\    (! x y. P3(x) & P4(y) --> R(x,y)) &        \
   91.46 +\    (! x y. P3(x) & P5(y) --> ~R(x,y)) &       \
   91.47 +\    (! x. (P4(x)|P5(x)) --> (? y.Q0(y) & R(x,y)))      \
   91.48  \    --> (? x y. P0(x) & P0(y) & (? z. Q1(z) & R(y,z) & R(x,y)))";
   91.49  
   91.50  
    92.1 --- a/src/HOL/ind_syntax.ML	Tue Jan 30 15:19:20 1996 +0100
    92.2 +++ b/src/HOL/ind_syntax.ML	Tue Jan 30 15:24:36 1996 +0100
    92.3 @@ -1,6 +1,6 @@
    92.4 -(*  Title: 	HOL/ind_syntax.ML
    92.5 +(*  Title:      HOL/ind_syntax.ML
    92.6      ID:         $Id$
    92.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    92.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    92.9      Copyright   1994  University of Cambridge
   92.10  
   92.11  Abstract Syntax functions for Inductive Definitions
   92.12 @@ -69,9 +69,9 @@
   92.13  (** Disjoint sum type **)
   92.14  
   92.15  fun mk_sum (T1,T2) = Type("+", [T1,T2]);
   92.16 -val Inl	= Const("Inl", dummyT)
   92.17 -and Inr	= Const("Inr", dummyT);		(*correct types added later!*)
   92.18 -(*val elim	= Const("case", [iT-->iT, iT-->iT, iT]--->iT)*)
   92.19 +val Inl = Const("Inl", dummyT)
   92.20 +and Inr = Const("Inr", dummyT);         (*correct types added later!*)
   92.21 +(*val elim      = Const("case", [iT-->iT, iT-->iT, iT]--->iT)*)
   92.22  
   92.23  fun summands (Type("+", [T1,T2])) = summands T1 @ summands T2
   92.24    | summands T                    = [T];
   92.25 @@ -79,32 +79,32 @@
   92.26  (*Given the destination type, fills in correct types of an Inl/Inr nest*)
   92.27  fun mend_sum_types (h,T) =
   92.28      (case (h,T) of
   92.29 -	 (Const("Inl",_) $ h1, Type("+", [T1,T2])) =>
   92.30 -	     Const("Inl", T1 --> T) $ (mend_sum_types (h1, T1))
   92.31 +         (Const("Inl",_) $ h1, Type("+", [T1,T2])) =>
   92.32 +             Const("Inl", T1 --> T) $ (mend_sum_types (h1, T1))
   92.33         | (Const("Inr",_) $ h2, Type("+", [T1,T2])) =>
   92.34 -	     Const("Inr", T2 --> T) $ (mend_sum_types (h2, T2))
   92.35 +             Const("Inr", T2 --> T) $ (mend_sum_types (h2, T2))
   92.36         | _ => h);
   92.37  
   92.38  
   92.39  
   92.40  (*simple error-checking in the premises of an inductive definition*)
   92.41  fun chk_prem rec_hd (Const("op &",_) $ _ $ _) =
   92.42 -	error"Premises may not be conjuctive"
   92.43 +        error"Premises may not be conjuctive"
   92.44    | chk_prem rec_hd (Const("op :",_) $ t $ X) = 
   92.45 -	deny (Logic.occs(rec_hd,t)) "Recursion term on left of member symbol"
   92.46 +        deny (Logic.occs(rec_hd,t)) "Recursion term on left of member symbol"
   92.47    | chk_prem rec_hd t = 
   92.48 -	deny (Logic.occs(rec_hd,t)) "Recursion term in side formula";
   92.49 +        deny (Logic.occs(rec_hd,t)) "Recursion term in side formula";
   92.50  
   92.51  (*Return the conclusion of a rule, of the form t:X*)
   92.52  fun rule_concl rl = 
   92.53      let val Const("Trueprop",_) $ (Const("op :",_) $ t $ X) = 
   92.54 -		Logic.strip_imp_concl rl
   92.55 +                Logic.strip_imp_concl rl
   92.56      in  (t,X)  end;
   92.57  
   92.58  (*As above, but return error message if bad*)
   92.59  fun rule_concl_msg sign rl = rule_concl rl
   92.60      handle Bind => error ("Ill-formed conclusion of introduction rule: " ^ 
   92.61 -			  Sign.string_of_term sign rl);
   92.62 +                          Sign.string_of_term sign rl);
   92.63  
   92.64  (*For simplifying the elimination rule*)
   92.65  val sumprod_free_SEs = 
   92.66 @@ -123,7 +123,7 @@
   92.67  
   92.68  (*Includes rules for Suc and Pair since they are common constructions*)
   92.69  val elim_rls = [asm_rl, FalseE, (*Suc_neq_Zero, Zero_neq_Suc,
   92.70 -		make_elim Suc_inject, *)
   92.71 -		refl_thin, conjE, exE, disjE];
   92.72 +                make_elim Suc_inject, *)
   92.73 +                refl_thin, conjE, exE, disjE];
   92.74  
   92.75  end;
    93.1 --- a/src/HOL/indrule.ML	Tue Jan 30 15:19:20 1996 +0100
    93.2 +++ b/src/HOL/indrule.ML	Tue Jan 30 15:24:36 1996 +0100
    93.3 @@ -1,6 +1,6 @@
    93.4 -(*  Title: 	HOL/indrule.ML
    93.5 +(*  Title:      HOL/indrule.ML
    93.6      ID:         $Id$
    93.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    93.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    93.9      Copyright   1994  University of Cambridge
   93.10  
   93.11  Induction rule module -- for Inductive/Coinductive Definitions
   93.12 @@ -10,14 +10,14 @@
   93.13  
   93.14  signature INDRULE =
   93.15    sig
   93.16 -  val induct        : thm			(*main induction rule*)
   93.17 -  val mutual_induct : thm			(*mutual induction rule*)
   93.18 +  val induct        : thm                       (*main induction rule*)
   93.19 +  val mutual_induct : thm                       (*mutual induction rule*)
   93.20    end;
   93.21  
   93.22  
   93.23  functor Indrule_Fun
   93.24      (structure Inductive: sig include INDUCTIVE_ARG INDUCTIVE_I end and
   93.25 -	 Intr_elim: sig include INTR_ELIM INTR_ELIM_AUX end) : INDRULE  =
   93.26 +         Intr_elim: sig include INTR_ELIM INTR_ELIM_AUX end) : INDRULE  =
   93.27  let
   93.28  
   93.29  val sign = sign_of Inductive.thy;
   93.30 @@ -32,7 +32,7 @@
   93.31  
   93.32  (*** Prove the main induction rule ***)
   93.33  
   93.34 -val pred_name = "P";		(*name for predicate variables*)
   93.35 +val pred_name = "P";            (*name for predicate variables*)
   93.36  
   93.37  val big_rec_def::part_rec_defs = Intr_elim.defs;
   93.38  
   93.39 @@ -40,25 +40,25 @@
   93.40     ind_alist = [(rec_tm1,pred1),...]  -- associates predicates with rec ops
   93.41     prem is a premise of an intr rule*)
   93.42  fun add_induct_prem ind_alist (prem as Const("Trueprop",_) $ 
   93.43 -		 (Const("op :",_)$t$X), iprems) =
   93.44 +                 (Const("op :",_)$t$X), iprems) =
   93.45       (case gen_assoc (op aconv) (ind_alist, X) of
   93.46 -	  Some pred => prem :: Ind_Syntax.mk_Trueprop (pred $ t) :: iprems
   93.47 -	| None => (*possibly membership in M(rec_tm), for M monotone*)
   93.48 -	    let fun mk_sb (rec_tm,pred) = 
   93.49 -		 (case binder_types (fastype_of pred) of
   93.50 -		      [T] => (rec_tm, 
   93.51 -			      Ind_Syntax.Int_const T $ rec_tm $ 
   93.52 -			        (Ind_Syntax.Collect_const T $ pred))
   93.53 -		    | _ => error 
   93.54 -		      "Bug: add_induct_prem called with non-unary predicate")
   93.55 -	    in  subst_free (map mk_sb ind_alist) prem :: iprems  end)
   93.56 +          Some pred => prem :: Ind_Syntax.mk_Trueprop (pred $ t) :: iprems
   93.57 +        | None => (*possibly membership in M(rec_tm), for M monotone*)
   93.58 +            let fun mk_sb (rec_tm,pred) = 
   93.59 +                 (case binder_types (fastype_of pred) of
   93.60 +                      [T] => (rec_tm, 
   93.61 +                              Ind_Syntax.Int_const T $ rec_tm $ 
   93.62 +                                (Ind_Syntax.Collect_const T $ pred))
   93.63 +                    | _ => error 
   93.64 +                      "Bug: add_induct_prem called with non-unary predicate")
   93.65 +            in  subst_free (map mk_sb ind_alist) prem :: iprems  end)
   93.66    | add_induct_prem ind_alist (prem,iprems) = prem :: iprems;
   93.67  
   93.68  (*Make a premise of the induction rule.*)
   93.69  fun induct_prem ind_alist intr =
   93.70    let val quantfrees = map dest_Free (term_frees intr \\ rec_params)
   93.71        val iprems = foldr (add_induct_prem ind_alist)
   93.72 -			 (Logic.strip_imp_prems intr,[])
   93.73 +                         (Logic.strip_imp_prems intr,[])
   93.74        val (t,X) = Ind_Syntax.rule_concl intr
   93.75        val (Some pred) = gen_assoc (op aconv) (ind_alist, X)
   93.76        val concl = Ind_Syntax.mk_Trueprop (pred $ t)
   93.77 @@ -68,8 +68,8 @@
   93.78  (*Avoids backtracking by delivering the correct premise to each goal*)
   93.79  fun ind_tac [] 0 = all_tac
   93.80    | ind_tac(prem::prems) i = 
   93.81 -	DEPTH_SOLVE_1 (ares_tac [Part_eqI, prem, refl] i) THEN
   93.82 -	ind_tac prems (i-1);
   93.83 +        DEPTH_SOLVE_1 (ares_tac [Part_eqI, prem, refl] i) THEN
   93.84 +        ind_tac prems (i-1);
   93.85  
   93.86  val pred = Free(pred_name, elem_type --> Ind_Syntax.boolT);
   93.87  
   93.88 @@ -85,15 +85,15 @@
   93.89      prove_goalw_cterm part_rec_defs 
   93.90        (cterm_of sign 
   93.91         (Logic.list_implies (ind_prems, 
   93.92 -			    Ind_Syntax.mk_Trueprop (Ind_Syntax.mk_all_imp 
   93.93 -						    (big_rec_tm,pred)))))
   93.94 +                            Ind_Syntax.mk_Trueprop (Ind_Syntax.mk_all_imp 
   93.95 +                                                    (big_rec_tm,pred)))))
   93.96        (fn prems =>
   93.97         [rtac (impI RS allI) 1,
   93.98 -	DETERM (etac Intr_elim.raw_induct 1),
   93.99 -	asm_full_simp_tac (!simpset addsimps [Part_Collect]) 1,
  93.100 -	REPEAT (FIRSTGOAL (eresolve_tac [IntE, CollectE, exE, conjE, disjE] 
  93.101 -			   ORELSE' hyp_subst_tac)),
  93.102 -	ind_tac (rev prems) (length prems)])
  93.103 +        DETERM (etac Intr_elim.raw_induct 1),
  93.104 +        asm_full_simp_tac (!simpset addsimps [Part_Collect]) 1,
  93.105 +        REPEAT (FIRSTGOAL (eresolve_tac [IntE, CollectE, exE, conjE, disjE] 
  93.106 +                           ORELSE' hyp_subst_tac)),
  93.107 +        ind_tac (rev prems) (length prems)])
  93.108      handle e => print_sign_exn sign e;
  93.109  
  93.110  (*** Prove the simultaneous induction rule ***)
  93.111 @@ -109,11 +109,11 @@
  93.112        val pfree = Free(pred_name ^ "_" ^ rec_name, T)
  93.113        val frees = mk_frees "za" (binder_types T)
  93.114        val qconcl = 
  93.115 -	foldr Ind_Syntax.mk_all 
  93.116 -	  (frees, 
  93.117 -	   Ind_Syntax.imp $ (Ind_Syntax.mk_mem 
  93.118 -			     (foldr1 Ind_Syntax.mk_Pair frees, rec_tm))
  93.119 -	        $ (list_comb (pfree,frees)))
  93.120 +        foldr Ind_Syntax.mk_all 
  93.121 +          (frees, 
  93.122 +           Ind_Syntax.imp $ (Ind_Syntax.mk_mem 
  93.123 +                             (foldr1 Ind_Syntax.mk_Pair frees, rec_tm))
  93.124 +                $ (list_comb (pfree,frees)))
  93.125    in  (Ind_Syntax.ap_split Ind_Syntax.boolT pfree (binder_types T), 
  93.126        qconcl)  
  93.127    end;
  93.128 @@ -129,21 +129,21 @@
  93.129      Ind_Syntax.mk_Trueprop
  93.130        (Ind_Syntax.mk_all_imp
  93.131         (big_rec_tm,
  93.132 -	Abs("z", elem_type, 
  93.133 -	    fold_bal (app Ind_Syntax.conj) 
  93.134 -	    (map mk_rec_imp (Inductive.rec_tms~~preds)))))
  93.135 +        Abs("z", elem_type, 
  93.136 +            fold_bal (app Ind_Syntax.conj) 
  93.137 +            (map mk_rec_imp (Inductive.rec_tms~~preds)))))
  93.138  and mutual_induct_concl = 
  93.139      Ind_Syntax.mk_Trueprop (fold_bal (app Ind_Syntax.conj) qconcls);
  93.140  
  93.141  val lemma = (*makes the link between the two induction rules*)
  93.142      prove_goalw_cterm part_rec_defs 
  93.143 -	  (cterm_of sign (Logic.mk_implies (induct_concl,
  93.144 -					    mutual_induct_concl)))
  93.145 -	  (fn prems =>
  93.146 -	   [cut_facts_tac prems 1,
  93.147 -	    REPEAT (eresolve_tac [asm_rl, conjE, PartE, mp] 1
  93.148 -	     ORELSE resolve_tac [allI, impI, conjI, Part_eqI, refl] 1
  93.149 -	     ORELSE dresolve_tac [spec, mp, splitD] 1)])
  93.150 +          (cterm_of sign (Logic.mk_implies (induct_concl,
  93.151 +                                            mutual_induct_concl)))
  93.152 +          (fn prems =>
  93.153 +           [cut_facts_tac prems 1,
  93.154 +            REPEAT (eresolve_tac [asm_rl, conjE, PartE, mp] 1
  93.155 +             ORELSE resolve_tac [allI, impI, conjI, Part_eqI, refl] 1
  93.156 +             ORELSE dresolve_tac [spec, mp, splitD] 1)])
  93.157      handle e => print_sign_exn sign e;
  93.158  
  93.159  (*Mutual induction follows by freeness of Inl/Inr.*)
  93.160 @@ -164,43 +164,43 @@
  93.161    | mutual_ind_tac(prem::prems) i = 
  93.162        DETERM
  93.163         (SELECT_GOAL 
  93.164 -	  (
  93.165 -	   (*Simplify the assumptions and goal by unfolding Part and
  93.166 -	     using freeness of the Sum constructors; proves all but one
  93.167 +          (
  93.168 +           (*Simplify the assumptions and goal by unfolding Part and
  93.169 +             using freeness of the Sum constructors; proves all but one
  93.170               conjunct by contradiction*)
  93.171 -	   rewrite_goals_tac all_defs  THEN
  93.172 -	   simp_tac (mut_ss addsimps [Part_def]) 1  THEN
  93.173 -	   IF_UNSOLVED (*simp_tac may have finished it off!*)
  93.174 -	     ((*simplify assumptions, but don't accept new rewrite rules!*)
  93.175 -	      asm_full_simp_tac (mut_ss setmksimps K[]) 1  THEN
  93.176 -	      (*unpackage and use "prem" in the corresponding place*)
  93.177 -	      REPEAT (rtac impI 1)  THEN
  93.178 -	      rtac (rewrite_rule all_defs prem) 1  THEN
  93.179 -	      (*prem must not be REPEATed below: could loop!*)
  93.180 -	      DEPTH_SOLVE (FIRSTGOAL (ares_tac [impI] ORELSE' 
  93.181 -				      eresolve_tac (conjE::mp::cmonos))))
  93.182 -	  ) i)
  93.183 +           rewrite_goals_tac all_defs  THEN
  93.184 +           simp_tac (mut_ss addsimps [Part_def]) 1  THEN
  93.185 +           IF_UNSOLVED (*simp_tac may have finished it off!*)
  93.186 +             ((*simplify assumptions, but don't accept new rewrite rules!*)
  93.187 +              asm_full_simp_tac (mut_ss setmksimps K[]) 1  THEN
  93.188 +              (*unpackage and use "prem" in the corresponding place*)
  93.189 +              REPEAT (rtac impI 1)  THEN
  93.190 +              rtac (rewrite_rule all_defs prem) 1  THEN
  93.191 +              (*prem must not be REPEATed below: could loop!*)
  93.192 +              DEPTH_SOLVE (FIRSTGOAL (ares_tac [impI] ORELSE' 
  93.193 +                                      eresolve_tac (conjE::mp::cmonos))))
  93.194 +          ) i)
  93.195         THEN mutual_ind_tac prems (i-1);
  93.196  
  93.197  val _ = writeln "  Proving the mutual induction rule...";
  93.198  
  93.199  val mutual_induct_split = 
  93.200      prove_goalw_cterm []
  93.201 -	  (cterm_of sign
  93.202 -	   (Logic.list_implies (map (induct_prem (Inductive.rec_tms ~~ preds)) 
  93.203 -			      Inductive.intr_tms,
  93.204 -			  mutual_induct_concl)))
  93.205 -	  (fn prems =>
  93.206 -	   [rtac (quant_induct RS lemma) 1,
  93.207 -	    mutual_ind_tac (rev prems) (length prems)])
  93.208 +          (cterm_of sign
  93.209 +           (Logic.list_implies (map (induct_prem (Inductive.rec_tms ~~ preds)) 
  93.210 +                              Inductive.intr_tms,
  93.211 +                          mutual_induct_concl)))
  93.212 +          (fn prems =>
  93.213 +           [rtac (quant_induct RS lemma) 1,
  93.214 +            mutual_ind_tac (rev prems) (length prems)])
  93.215      handle e => print_sign_exn sign e;
  93.216  
  93.217  (*Attempts to remove all occurrences of split*)
  93.218  val split_tac =
  93.219      REPEAT (SOMEGOAL (FIRST' [rtac splitI, 
  93.220 -			      dtac splitD,
  93.221 -			      etac splitE,
  93.222 -			      bound_hyp_subst_tac]))
  93.223 +                              dtac splitD,
  93.224 +                              etac splitE,
  93.225 +                              bound_hyp_subst_tac]))
  93.226      THEN prune_params_tac;
  93.227  
  93.228  in
  93.229 @@ -210,7 +210,7 @@
  93.230  
  93.231    val mutual_induct = 
  93.232        if length Intr_elim.rec_names > 1 orelse
  93.233 -	 length (Ind_Syntax.factors elem_type) > 1
  93.234 +         length (Ind_Syntax.factors elem_type) > 1
  93.235        then rule_by_tactic split_tac mutual_induct_split
  93.236        else TrueI;
  93.237    end
    94.1 --- a/src/HOL/intr_elim.ML	Tue Jan 30 15:19:20 1996 +0100
    94.2 +++ b/src/HOL/intr_elim.ML	Tue Jan 30 15:24:36 1996 +0100
    94.3 @@ -1,39 +1,39 @@
    94.4 -(*  Title: 	HOL/intr_elim.ML
    94.5 +(*  Title:      HOL/intr_elim.ML
    94.6      ID:         $Id$
    94.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    94.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    94.9      Copyright   1994  University of Cambridge
   94.10  
   94.11  Introduction/elimination rule module -- for Inductive/Coinductive Definitions
   94.12  *)
   94.13  
   94.14 -signature INDUCTIVE_ARG =	(** Description of a (co)inductive def **)
   94.15 +signature INDUCTIVE_ARG =       (** Description of a (co)inductive def **)
   94.16    sig
   94.17    val thy        : theory               (*new theory with inductive defs*)
   94.18 -  val monos      : thm list		(*monotonicity of each M operator*)
   94.19 -  val con_defs   : thm list		(*definitions of the constructors*)
   94.20 +  val monos      : thm list             (*monotonicity of each M operator*)
   94.21 +  val con_defs   : thm list             (*definitions of the constructors*)
   94.22    end;
   94.23  
   94.24  
   94.25 -signature INDUCTIVE_I =	(** Terms read from the theory section **)
   94.26 +signature INDUCTIVE_I = (** Terms read from the theory section **)
   94.27    sig
   94.28 -  val rec_tms    : term list		(*the recursive sets*)
   94.29 -  val intr_tms   : term list		(*terms for the introduction rules*)
   94.30 +  val rec_tms    : term list            (*the recursive sets*)
   94.31 +  val intr_tms   : term list            (*terms for the introduction rules*)
   94.32    end;
   94.33  
   94.34  signature INTR_ELIM =
   94.35    sig
   94.36    val thy        : theory               (*copy of input theory*)
   94.37 -  val defs	 : thm list		(*definitions made in thy*)
   94.38 -  val mono	 : thm			(*monotonicity for the lfp definition*)
   94.39 -  val intrs      : thm list		(*introduction rules*)
   94.40 -  val elim       : thm			(*case analysis theorem*)
   94.41 -  val mk_cases   : thm list -> string -> thm	(*generates case theorems*)
   94.42 +  val defs       : thm list             (*definitions made in thy*)
   94.43 +  val mono       : thm                  (*monotonicity for the lfp definition*)
   94.44 +  val intrs      : thm list             (*introduction rules*)
   94.45 +  val elim       : thm                  (*case analysis theorem*)
   94.46 +  val mk_cases   : thm list -> string -> thm    (*generates case theorems*)
   94.47    end;
   94.48  
   94.49 -signature INTR_ELIM_AUX =	(** Used to make induction rules **)
   94.50 +signature INTR_ELIM_AUX =       (** Used to make induction rules **)
   94.51    sig
   94.52 -  val raw_induct : thm			(*raw induction rule from Fp.induct*)
   94.53 -  val rec_names  : string list		(*names of recursive sets*)
   94.54 +  val raw_induct : thm                  (*raw induction rule from Fp.induct*)
   94.55 +  val rec_names  : string list          (*names of recursive sets*)
   94.56    end;
   94.57  
   94.58  (*prove intr/elim rules for a fixedpoint definition*)
   94.59 @@ -47,7 +47,7 @@
   94.60  
   94.61  val _ = deny (big_rec_name  mem  map ! (stamps_of_thy Inductive.thy))
   94.62               ("Definition " ^ big_rec_name ^ 
   94.63 -	      " would clash with the theory of the same name!");
   94.64 +              " would clash with the theory of the same name!");
   94.65  
   94.66  (*fetch fp definitions from the theory*)
   94.67  val big_rec_def::part_rec_defs = 
   94.68 @@ -69,10 +69,10 @@
   94.69  val mono = 
   94.70      prove_goalw_cterm [] 
   94.71        (cterm_of sign (Ind_Syntax.mk_Trueprop 
   94.72 -		      (Const("mono", monoT --> Ind_Syntax.boolT) $ fp_abs)))
   94.73 +                      (Const("mono", monoT --> Ind_Syntax.boolT) $ fp_abs)))
   94.74        (fn _ =>
   94.75         [rtac monoI 1,
   94.76 -	REPEAT (ares_tac (basic_monos @ Inductive.monos) 1)]);
   94.77 +        REPEAT (ares_tac (basic_monos @ Inductive.monos) 1)]);
   94.78  
   94.79  val unfold = standard (mono RS (big_rec_def RS Fp.Tarski));
   94.80  
   94.81 @@ -97,12 +97,12 @@
   94.82  (*combines disjI1 and disjI2 to access the corresponding nested disjunct...*)
   94.83  val mk_disj_rls = 
   94.84      let fun f rl = rl RS disjI1
   94.85 -	and g rl = rl RS disjI2
   94.86 +        and g rl = rl RS disjI2
   94.87      in  accesses_bal(f, g, asm_rl)  end;
   94.88  
   94.89  val intrs = map (uncurry (prove_goalw_cterm part_rec_defs))
   94.90              (map (cterm_of sign) Inductive.intr_tms ~~ 
   94.91 -	     map intro_tacsf (mk_disj_rls(length Inductive.intr_tms)));
   94.92 +             map intro_tacsf (mk_disj_rls(length Inductive.intr_tms)));
   94.93  
   94.94  (********)
   94.95  val _ = writeln "  Proving the elimination rule...";
   94.96 @@ -110,8 +110,8 @@
   94.97  (*Breaks down logical connectives in the monotonic function*)
   94.98  val basic_elim_tac =
   94.99      REPEAT (SOMEGOAL (eresolve_tac (Ind_Syntax.elim_rls @ 
  94.100 -				    Ind_Syntax.sumprod_free_SEs)
  94.101 -	      ORELSE' bound_hyp_subst_tac))
  94.102 +                                    Ind_Syntax.sumprod_free_SEs)
  94.103 +              ORELSE' bound_hyp_subst_tac))
  94.104      THEN prune_params_tac;
  94.105  
  94.106  (*Applies freeness of the given constructors, which *must* be unfolded by
  94.107 @@ -122,7 +122,7 @@
  94.108   *)
  94.109  fun con_elim_tac simps =
  94.110    let val elim_tac = REPEAT o (eresolve_tac (Ind_Syntax.elim_rls @ 
  94.111 -					     Ind_Syntax.sumprod_free_SEs))
  94.112 +                                             Ind_Syntax.sumprod_free_SEs))
  94.113    in ALLGOALS(EVERY'[elim_tac,
  94.114                       asm_full_simp_tac (simpset_of "Nat" addsimps simps),
  94.115                       elim_tac,
  94.116 @@ -144,7 +144,7 @@
  94.117    (*String s should have the form t:Si where Si is an inductive set*)
  94.118    fun mk_cases defs s = 
  94.119        rule_by_tactic (con_elim_tac defs)
  94.120 -	(assume_read Inductive.thy s  RS  elim);
  94.121 +        (assume_read Inductive.thy s  RS  elim);
  94.122  
  94.123    val raw_induct = standard ([big_rec_def, mono] MRS Fp.induct)
  94.124    and rec_names = rec_names
    95.1 --- a/src/HOL/mono.ML	Tue Jan 30 15:19:20 1996 +0100
    95.2 +++ b/src/HOL/mono.ML	Tue Jan 30 15:24:36 1996 +0100
    95.3 @@ -1,6 +1,6 @@
    95.4 -(*  Title: 	HOL/mono.ML
    95.5 +(*  Title:      HOL/mono.ML
    95.6      ID:         $Id$
    95.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    95.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    95.9      Copyright   1991  University of Cambridge
   95.10  
   95.11  Monotonicity of various operations
   95.12 @@ -119,5 +119,5 @@
   95.13  
   95.14  (*Used in intr_elim.ML and in individual datatype definitions*)
   95.15  val basic_monos = [subset_refl, imp_refl, disj_mono, conj_mono, 
   95.16 -		   ex_mono, Collect_mono, Part_mono, in_mono];
   95.17 +                   ex_mono, Collect_mono, Part_mono, in_mono];
   95.18  
    96.1 --- a/src/HOL/simpdata.ML	Tue Jan 30 15:19:20 1996 +0100
    96.2 +++ b/src/HOL/simpdata.ML	Tue Jan 30 15:24:36 1996 +0100
    96.3 @@ -1,6 +1,6 @@
    96.4 -(*  Title: 	HOL/simpdata.ML
    96.5 +(*  Title:      HOL/simpdata.ML
    96.6      ID:         $Id$
    96.7 -    Author: 	Tobias Nipkow
    96.8 +    Author:     Tobias Nipkow
    96.9      Copyright   1991  University of Cambridge
   96.10  
   96.11  Instantiation of the generic simplifier
   96.12 @@ -32,9 +32,9 @@
   96.13    in atoms end;
   96.14  
   96.15  fun mk_meta_eq r = case concl_of r of
   96.16 -	Const("==",_)$_$_ => r
   96.17 -    |	_$(Const("op =",_)$_$_) => r RS eq_reflection
   96.18 -    |	_$(Const("not",_)$_) => r RS not_P_imp_P_eq_False
   96.19 +        Const("==",_)$_$_ => r
   96.20 +    |   _$(Const("op =",_)$_$_) => r RS eq_reflection
   96.21 +    |   _$(Const("not",_)$_) => r RS not_P_imp_P_eq_False
   96.22      |   _ => r RS P_imp_P_eq_True;
   96.23  (* last 2 lines requires all formulae to be of the from Trueprop(.) *)
   96.24  
   96.25 @@ -42,7 +42,7 @@
   96.26  
   96.27  val imp_cong = impI RSN
   96.28      (2, prove_goal HOL.thy "(P=P')--> (P'--> (Q=Q'))--> ((P-->Q) = (P'-->Q'))"
   96.29 -	(fn _=> [fast_tac HOL_cs 1]) RS mp RS mp);
   96.30 +        (fn _=> [fast_tac HOL_cs 1]) RS mp RS mp);
   96.31  
   96.32  val o_apply = prove_goalw HOL.thy [o_def] "(f o g)(x) = f(g(x))"
   96.33   (fn _ => [rtac refl 1]);
   96.34 @@ -86,9 +86,9 @@
   96.35  val expand_if = prove_goal HOL.thy
   96.36      "P(if Q then x else y) = ((Q --> P(x)) & (~Q --> P(y)))"
   96.37   (fn _=> [ (res_inst_tac [("Q","Q")] (excluded_middle RS disjE) 1),
   96.38 -	 rtac (if_P RS ssubst) 2,
   96.39 -	 rtac (if_not_P RS ssubst) 1,
   96.40 -	 REPEAT(fast_tac HOL_cs 1) ]);
   96.41 +         rtac (if_P RS ssubst) 2,
   96.42 +         rtac (if_not_P RS ssubst) 1,
   96.43 +         REPEAT(fast_tac HOL_cs 1) ]);
   96.44  
   96.45  val if_bool_eq = prove_goal HOL.thy
   96.46                     "(if P then Q else R) = ((P-->Q) & (~P-->R))"
   96.47 @@ -141,7 +141,7 @@
   96.48  
   96.49  val conj_cong = impI RSN
   96.50      (2, prove_goal HOL.thy "(P=P')--> (P'--> (Q=Q'))--> ((P&Q) = (P'&Q'))"
   96.51 -	(fn _=> [fast_tac HOL_cs 1]) RS mp RS mp);
   96.52 +        (fn _=> [fast_tac HOL_cs 1]) RS mp RS mp);
   96.53  
   96.54  (** 'if' congruence rules: neither included by default! *)
   96.55  
    97.1 --- a/src/HOL/subset.ML	Tue Jan 30 15:19:20 1996 +0100
    97.2 +++ b/src/HOL/subset.ML	Tue Jan 30 15:24:36 1996 +0100
    97.3 @@ -1,6 +1,6 @@
    97.4 -(*  Title: 	HOL/subset
    97.5 +(*  Title:      HOL/subset
    97.6      ID:         $Id$
    97.7 -    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
    97.8 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    97.9      Copyright   1991  University of Cambridge
   97.10  
   97.11  Derived rules involving subsets
   97.12 @@ -21,7 +21,7 @@
   97.13  
   97.14  val [prem] = goal Set.thy
   97.15      "[| !!X. X:A ==> X<=C |] ==> Union(A) <= C";
   97.16 -br subsetI 1;
   97.17 +by (rtac subsetI 1);
   97.18  by (REPEAT (eresolve_tac [asm_rl, UnionE, prem RS subsetD] 1));
   97.19  qed "Union_least";
   97.20  
   97.21 @@ -34,7 +34,7 @@
   97.22  
   97.23  val [prem] = goal Set.thy
   97.24      "[| !!x. x:A ==> B(x)<=C |] ==> (UN x:A. B(x)) <= C";
   97.25 -br subsetI 1;
   97.26 +by (rtac subsetI 1);
   97.27  by (REPEAT (eresolve_tac [asm_rl, UN_E, prem RS subsetD] 1));
   97.28  qed "UN_least";
   97.29  
   97.30 @@ -43,7 +43,7 @@
   97.31  qed "UN1_upper";
   97.32  
   97.33  val [prem] = goal Set.thy "[| !!x. B(x)<=C |] ==> (UN x. B(x)) <= C";
   97.34 -br subsetI 1;
   97.35 +by (rtac subsetI 1);
   97.36  by (REPEAT (eresolve_tac [asm_rl, UN1_E, prem RS subsetD] 1));
   97.37  qed "UN1_least";
   97.38  
   97.39 @@ -51,35 +51,35 @@
   97.40  (*** Big Intersection -- greatest lower bound of a set ***)
   97.41  
   97.42  val prems = goal Set.thy "B:A ==> Inter(A) <= B";
   97.43 -br subsetI 1;
   97.44 +by (rtac subsetI 1);
   97.45  by (REPEAT (resolve_tac prems 1 ORELSE etac InterD 1));
   97.46  qed "Inter_lower";
   97.47  
   97.48  val [prem] = goal Set.thy
   97.49      "[| !!X. X:A ==> C<=X |] ==> C <= Inter(A)";
   97.50 -br (InterI RS subsetI) 1;
   97.51 +by (rtac (InterI RS subsetI) 1);
   97.52  by (REPEAT (eresolve_tac [asm_rl, prem RS subsetD] 1));
   97.53  qed "Inter_greatest";
   97.54  
   97.55  val prems = goal Set.thy "a:A ==> (INT x:A. B(x)) <= B(a)";
   97.56 -br subsetI 1;
   97.57 +by (rtac subsetI 1);
   97.58  by (REPEAT (resolve_tac prems 1 ORELSE etac INT_D 1));
   97.59  qed "INT_lower";
   97.60  
   97.61  val [prem] = goal Set.thy
   97.62      "[| !!x. x:A ==> C<=B(x) |] ==> C <= (INT x:A. B(x))";
   97.63 -br (INT_I RS subsetI) 1;
   97.64 +by (rtac (INT_I RS subsetI) 1);
   97.65  by (REPEAT (eresolve_tac [asm_rl, prem RS subsetD] 1));
   97.66  qed "INT_greatest";
   97.67  
   97.68  goal Set.thy "(INT x. B(x)) <= B(a)";
   97.69 -br subsetI 1;
   97.70 +by (rtac subsetI 1);
   97.71  by (REPEAT (resolve_tac prems 1 ORELSE etac INT1_D 1));
   97.72  qed "INT1_lower";
   97.73  
   97.74  val [prem] = goal Set.thy
   97.75      "[| !!x. C<=B(x) |] ==> C <= (INT x. B(x))";
   97.76 -br (INT1_I RS subsetI) 1;
   97.77 +by (rtac (INT1_I RS subsetI) 1);
   97.78  by (REPEAT (eresolve_tac [asm_rl, prem RS subsetD] 1));
   97.79  qed "INT1_greatest";
   97.80  
    98.1 --- a/src/HOL/thy_data.ML	Tue Jan 30 15:19:20 1996 +0100
    98.2 +++ b/src/HOL/thy_data.ML	Tue Jan 30 15:24:36 1996 +0100
    98.3 @@ -1,6 +1,6 @@
    98.4 -(*  Title: 	HOL/thy_data.ML
    98.5 +(*  Title:      HOL/thy_data.ML
    98.6      ID:         $Id$
    98.7 -    Author: 	Carsten Clasohm
    98.8 +    Author:     Carsten Clasohm
    98.9      Copyright   1995 TU Muenchen
   98.10  
   98.11  Definitions that have to be reread after init_thy_reader has been invoked
    99.1 --- a/src/HOL/thy_syntax.ML	Tue Jan 30 15:19:20 1996 +0100
    99.2 +++ b/src/HOL/thy_syntax.ML	Tue Jan 30 15:24:36 1996 +0100
    99.3 @@ -72,7 +72,7 @@
    99.4            \\t   val thy\t\t= thy\n\
    99.5            \\t   val monos\t\t= " ^ monos ^ "\n\
    99.6            \\t   val con_defs\t\t= " ^ con_defs ^ ");\n\n\
    99.7 -	  \ in\n\
    99.8 +          \ in\n\
    99.9            \  struct\n\
   99.10            \  val " ^ mk_list (map mk_intr_name ipairs) ^ " = Result.intrs;\n\
   99.11            \  open Result\n\