src/HOL/List.ML
changeset 5129 99ffd3dfb180
parent 5122 229190f9f303
child 5132 24f992a25adc
     1.1 --- a/src/HOL/List.ML	Fri Jul 03 18:56:40 1998 +0200
     1.2 +++ b/src/HOL/List.ML	Mon Jul 06 14:03:25 1998 +0200
     1.3 @@ -8,15 +8,14 @@
     1.4  
     1.5  Goal "!x. xs ~= x#xs";
     1.6  by (induct_tac "xs" 1);
     1.7 -by (ALLGOALS Asm_simp_tac);
     1.8 +by (Auto_tac);
     1.9  qed_spec_mp "not_Cons_self";
    1.10  bind_thm("not_Cons_self2",not_Cons_self RS not_sym);
    1.11  Addsimps [not_Cons_self,not_Cons_self2];
    1.12  
    1.13  Goal "(xs ~= []) = (? y ys. xs = y#ys)";
    1.14  by (induct_tac "xs" 1);
    1.15 -by (Simp_tac 1);
    1.16 -by (Asm_simp_tac 1);
    1.17 +by (Auto_tac);
    1.18  qed "neq_Nil_conv";
    1.19  
    1.20  (* Induction over the length of a list: *)
    1.21 @@ -72,43 +71,43 @@
    1.22  
    1.23  Goal "length(xs@ys) = length(xs)+length(ys)";
    1.24  by (induct_tac "xs" 1);
    1.25 -by (ALLGOALS Asm_simp_tac);
    1.26 +by (Auto_tac);
    1.27  qed"length_append";
    1.28  Addsimps [length_append];
    1.29  
    1.30 -Goal "length (map f l) = length l";
    1.31 -by (induct_tac "l" 1);
    1.32 -by (ALLGOALS Simp_tac);
    1.33 +Goal "length (map f xs) = length xs";
    1.34 +by (induct_tac "xs" 1);
    1.35 +by (Auto_tac);
    1.36  qed "length_map";
    1.37  Addsimps [length_map];
    1.38  
    1.39  Goal "length(rev xs) = length(xs)";
    1.40  by (induct_tac "xs" 1);
    1.41 -by (ALLGOALS Asm_simp_tac);
    1.42 +by (Auto_tac);
    1.43  qed "length_rev";
    1.44  Addsimps [length_rev];
    1.45  
    1.46  Goal "xs ~= [] ==> length(tl xs) = (length xs) - 1";
    1.47  by (exhaust_tac "xs" 1);
    1.48 -by (ALLGOALS Asm_full_simp_tac);
    1.49 +by (Auto_tac);
    1.50  qed "length_tl";
    1.51  Addsimps [length_tl];
    1.52  
    1.53  Goal "(length xs = 0) = (xs = [])";
    1.54  by (induct_tac "xs" 1);
    1.55 -by (ALLGOALS Asm_simp_tac);
    1.56 +by (Auto_tac);
    1.57  qed "length_0_conv";
    1.58  AddIffs [length_0_conv];
    1.59  
    1.60  Goal "(0 = length xs) = (xs = [])";
    1.61  by (induct_tac "xs" 1);
    1.62 -by (ALLGOALS Asm_simp_tac);
    1.63 +by (Auto_tac);
    1.64  qed "zero_length_conv";
    1.65  AddIffs [zero_length_conv];
    1.66  
    1.67  Goal "(0 < length xs) = (xs ~= [])";
    1.68  by (induct_tac "xs" 1);
    1.69 -by (ALLGOALS Asm_simp_tac);
    1.70 +by (Auto_tac);
    1.71  qed "length_greater_0_conv";
    1.72  AddIffs [length_greater_0_conv];
    1.73  
    1.74 @@ -118,38 +117,36 @@
    1.75  
    1.76  Goal "(xs@ys)@zs = xs@(ys@zs)";
    1.77  by (induct_tac "xs" 1);
    1.78 -by (ALLGOALS Asm_simp_tac);
    1.79 +by (Auto_tac);
    1.80  qed "append_assoc";
    1.81  Addsimps [append_assoc];
    1.82  
    1.83  Goal "xs @ [] = xs";
    1.84  by (induct_tac "xs" 1);
    1.85 -by (ALLGOALS Asm_simp_tac);
    1.86 +by (Auto_tac);
    1.87  qed "append_Nil2";
    1.88  Addsimps [append_Nil2];
    1.89  
    1.90  Goal "(xs@ys = []) = (xs=[] & ys=[])";
    1.91  by (induct_tac "xs" 1);
    1.92 -by (ALLGOALS Asm_simp_tac);
    1.93 +by (Auto_tac);
    1.94  qed "append_is_Nil_conv";
    1.95  AddIffs [append_is_Nil_conv];
    1.96  
    1.97  Goal "([] = xs@ys) = (xs=[] & ys=[])";
    1.98  by (induct_tac "xs" 1);
    1.99 -by (ALLGOALS Asm_simp_tac);
   1.100 -by (Blast_tac 1);
   1.101 +by (Auto_tac);
   1.102  qed "Nil_is_append_conv";
   1.103  AddIffs [Nil_is_append_conv];
   1.104  
   1.105  Goal "(xs @ ys = xs) = (ys=[])";
   1.106  by (induct_tac "xs" 1);
   1.107 -by (ALLGOALS Asm_simp_tac);
   1.108 +by (Auto_tac);
   1.109  qed "append_self_conv";
   1.110  
   1.111  Goal "(xs = xs @ ys) = (ys=[])";
   1.112  by (induct_tac "xs" 1);
   1.113 -by (ALLGOALS Asm_simp_tac);
   1.114 -by (Blast_tac 1);
   1.115 +by (Auto_tac);
   1.116  qed "self_append_conv";
   1.117  AddIffs [append_self_conv,self_append_conv];
   1.118  
   1.119 @@ -188,7 +185,7 @@
   1.120  
   1.121  Goal "(xs @ ys = ys) = (xs=[])";
   1.122  by(cut_inst_tac [("zs","[]")] append_same_eq 1);
   1.123 -by(Asm_full_simp_tac 1);
   1.124 +by (Auto_tac);
   1.125  qed "append_self_conv2";
   1.126  
   1.127  Goal "(ys = xs @ ys) = (xs=[])";
   1.128 @@ -200,13 +197,13 @@
   1.129  
   1.130  Goal "xs ~= [] --> hd xs # tl xs = xs";
   1.131  by (induct_tac "xs" 1);
   1.132 -by (ALLGOALS Asm_simp_tac);
   1.133 +by (Auto_tac);
   1.134  qed_spec_mp "hd_Cons_tl";
   1.135  Addsimps [hd_Cons_tl];
   1.136  
   1.137  Goal "hd(xs@ys) = (if xs=[] then hd ys else hd xs)";
   1.138  by (induct_tac "xs" 1);
   1.139 -by (ALLGOALS Asm_simp_tac);
   1.140 +by (Auto_tac);
   1.141  qed "hd_append";
   1.142  
   1.143  Goal "xs ~= [] ==> hd(xs @ ys) = hd xs";
   1.144 @@ -233,31 +230,31 @@
   1.145  Goal
   1.146    "(!x. x : set xs --> f x = g x) --> map f xs = map g xs";
   1.147  by (induct_tac "xs" 1);
   1.148 -by (ALLGOALS Asm_simp_tac);
   1.149 +by (Auto_tac);
   1.150  bind_thm("map_ext", impI RS (allI RS (result() RS mp)));
   1.151  
   1.152  Goal "map (%x. x) = (%xs. xs)";
   1.153  by (rtac ext 1);
   1.154  by (induct_tac "xs" 1);
   1.155 -by (ALLGOALS Asm_simp_tac);
   1.156 +by (Auto_tac);
   1.157  qed "map_ident";
   1.158  Addsimps[map_ident];
   1.159  
   1.160  Goal "map f (xs@ys) = map f xs @ map f ys";
   1.161  by (induct_tac "xs" 1);
   1.162 -by (ALLGOALS Asm_simp_tac);
   1.163 +by (Auto_tac);
   1.164  qed "map_append";
   1.165  Addsimps[map_append];
   1.166  
   1.167  Goalw [o_def] "map (f o g) xs = map f (map g xs)";
   1.168  by (induct_tac "xs" 1);
   1.169 -by (ALLGOALS Asm_simp_tac);
   1.170 +by (Auto_tac);
   1.171  qed "map_compose";
   1.172  Addsimps[map_compose];
   1.173  
   1.174  Goal "rev(map f xs) = map f (rev xs)";
   1.175  by (induct_tac "xs" 1);
   1.176 -by (ALLGOALS Asm_simp_tac);
   1.177 +by (Auto_tac);
   1.178  qed "rev_map";
   1.179  
   1.180  (* a congruence rule for map: *)
   1.181 @@ -266,19 +263,19 @@
   1.182  by (rtac impI 1);
   1.183  by (hyp_subst_tac 1);
   1.184  by (induct_tac "ys" 1);
   1.185 -by (ALLGOALS Asm_simp_tac);
   1.186 +by (Auto_tac);
   1.187  val lemma = result();
   1.188  bind_thm("map_cong",impI RSN (2,allI RSN (2,lemma RS mp RS mp)));
   1.189  
   1.190  Goal "(map f xs = []) = (xs = [])";
   1.191  by (induct_tac "xs" 1);
   1.192 -by (ALLGOALS Asm_simp_tac);
   1.193 +by (Auto_tac);
   1.194  qed "map_is_Nil_conv";
   1.195  AddIffs [map_is_Nil_conv];
   1.196  
   1.197  Goal "([] = map f xs) = (xs = [])";
   1.198  by (induct_tac "xs" 1);
   1.199 -by (ALLGOALS Asm_simp_tac);
   1.200 +by (Auto_tac);
   1.201  qed "Nil_is_map_conv";
   1.202  AddIffs [Nil_is_map_conv];
   1.203  
   1.204 @@ -289,25 +286,25 @@
   1.205  
   1.206  Goal "rev(xs@ys) = rev(ys) @ rev(xs)";
   1.207  by (induct_tac "xs" 1);
   1.208 -by (ALLGOALS Asm_simp_tac);
   1.209 +by (Auto_tac);
   1.210  qed "rev_append";
   1.211  Addsimps[rev_append];
   1.212  
   1.213  Goal "rev(rev l) = l";
   1.214  by (induct_tac "l" 1);
   1.215 -by (ALLGOALS Asm_simp_tac);
   1.216 +by (Auto_tac);
   1.217  qed "rev_rev_ident";
   1.218  Addsimps[rev_rev_ident];
   1.219  
   1.220  Goal "(rev xs = []) = (xs = [])";
   1.221  by (induct_tac "xs" 1);
   1.222 -by (ALLGOALS Asm_simp_tac);
   1.223 +by (Auto_tac);
   1.224  qed "rev_is_Nil_conv";
   1.225  AddIffs [rev_is_Nil_conv];
   1.226  
   1.227  Goal "([] = rev xs) = (xs = [])";
   1.228  by (induct_tac "xs" 1);
   1.229 -by (ALLGOALS Asm_simp_tac);
   1.230 +by (Auto_tac);
   1.231  qed "Nil_is_rev_conv";
   1.232  AddIffs [Nil_is_rev_conv];
   1.233  
   1.234 @@ -321,7 +318,7 @@
   1.235  
   1.236  Goal  "(xs = [] --> P) -->  (!ys y. xs = ys@[y] --> P) --> P";
   1.237  by(res_inst_tac [("xs","xs")] rev_induct 1);
   1.238 -by(ALLGOALS Asm_simp_tac);
   1.239 +by(Auto_tac);
   1.240  bind_thm ("rev_exhaust",
   1.241    impI RSN (2,allI RSN (2,allI RSN (2,impI RS (result() RS mp RS mp)))));
   1.242  
   1.243 @@ -332,13 +329,13 @@
   1.244  
   1.245  Goal "x mem (xs@ys) = (x mem xs | x mem ys)";
   1.246  by (induct_tac "xs" 1);
   1.247 -by (ALLGOALS Asm_simp_tac);
   1.248 +by (Auto_tac);
   1.249  qed "mem_append";
   1.250  Addsimps[mem_append];
   1.251  
   1.252  Goal "x mem [x:xs. P(x)] = (x mem xs & P(x))";
   1.253  by (induct_tac "xs" 1);
   1.254 -by (ALLGOALS Asm_simp_tac);
   1.255 +by (Auto_tac);
   1.256  qed "mem_filter";
   1.257  Addsimps[mem_filter];
   1.258  
   1.259 @@ -348,43 +345,40 @@
   1.260  
   1.261  Goal "set (xs@ys) = (set xs Un set ys)";
   1.262  by (induct_tac "xs" 1);
   1.263 -by (ALLGOALS Asm_simp_tac);
   1.264 +by (Auto_tac);
   1.265  qed "set_append";
   1.266  Addsimps[set_append];
   1.267  
   1.268  Goal "(x mem xs) = (x: set xs)";
   1.269  by (induct_tac "xs" 1);
   1.270 -by (ALLGOALS Asm_simp_tac);
   1.271 -by (Blast_tac 1);
   1.272 +by (Auto_tac);
   1.273  qed "set_mem_eq";
   1.274  
   1.275  Goal "set l <= set (x#l)";
   1.276 -by (Simp_tac 1);
   1.277 -by (Blast_tac 1);
   1.278 +by (Auto_tac);
   1.279  qed "set_subset_Cons";
   1.280  
   1.281  Goal "(set xs = {}) = (xs = [])";
   1.282  by (induct_tac "xs" 1);
   1.283 -by (ALLGOALS Asm_simp_tac);
   1.284 +by (Auto_tac);
   1.285  qed "set_empty";
   1.286  Addsimps [set_empty];
   1.287  
   1.288  Goal "set(rev xs) = set(xs)";
   1.289  by (induct_tac "xs" 1);
   1.290 -by (ALLGOALS Asm_simp_tac);
   1.291 +by (Auto_tac);
   1.292  qed "set_rev";
   1.293  Addsimps [set_rev];
   1.294  
   1.295  Goal "set(map f xs) = f``(set xs)";
   1.296  by (induct_tac "xs" 1);
   1.297 -by (ALLGOALS Asm_simp_tac);
   1.298 +by (Auto_tac);
   1.299  qed "set_map";
   1.300  Addsimps [set_map];
   1.301  
   1.302  Goal "(x : set(filter P xs)) = (x : set xs & P x)";
   1.303  by (induct_tac "xs" 1);
   1.304 -by (ALLGOALS Asm_simp_tac);
   1.305 -by(Blast_tac 1);
   1.306 +by (Auto_tac);
   1.307  qed "in_set_filter";
   1.308  Addsimps [in_set_filter];
   1.309  
   1.310 @@ -395,20 +389,19 @@
   1.311  
   1.312  Goal "list_all (%x. True) xs = True";
   1.313  by (induct_tac "xs" 1);
   1.314 -by (ALLGOALS Asm_simp_tac);
   1.315 +by (Auto_tac);
   1.316  qed "list_all_True";
   1.317  Addsimps [list_all_True];
   1.318  
   1.319  Goal "list_all p (xs@ys) = (list_all p xs & list_all p ys)";
   1.320  by (induct_tac "xs" 1);
   1.321 -by (ALLGOALS Asm_simp_tac);
   1.322 +by (Auto_tac);
   1.323  qed "list_all_append";
   1.324  Addsimps [list_all_append];
   1.325  
   1.326  Goal "list_all P xs = (!x. x mem xs --> P(x))";
   1.327  by (induct_tac "xs" 1);
   1.328 -by (ALLGOALS Asm_simp_tac);
   1.329 -by (Blast_tac 1);
   1.330 +by (Auto_tac);
   1.331  qed "list_all_mem_conv";
   1.332  
   1.333  
   1.334 @@ -418,25 +411,25 @@
   1.335  
   1.336  Goal "filter P (xs@ys) = filter P xs @ filter P ys";
   1.337  by (induct_tac "xs" 1);
   1.338 -by (ALLGOALS Asm_simp_tac);
   1.339 +by (Auto_tac);
   1.340  qed "filter_append";
   1.341  Addsimps [filter_append];
   1.342  
   1.343  Goal "filter (%x. True) xs = xs";
   1.344  by (induct_tac "xs" 1);
   1.345 -by (ALLGOALS Asm_simp_tac);
   1.346 +by (Auto_tac);
   1.347  qed "filter_True";
   1.348  Addsimps [filter_True];
   1.349  
   1.350  Goal "filter (%x. False) xs = []";
   1.351  by (induct_tac "xs" 1);
   1.352 -by (ALLGOALS Asm_simp_tac);
   1.353 +by (Auto_tac);
   1.354  qed "filter_False";
   1.355  Addsimps [filter_False];
   1.356  
   1.357  Goal "length (filter P xs) <= length xs";
   1.358  by (induct_tac "xs" 1);
   1.359 -by (ALLGOALS Asm_simp_tac);
   1.360 +by (Auto_tac);
   1.361  qed "length_filter";
   1.362  
   1.363  
   1.364 @@ -446,41 +439,41 @@
   1.365  
   1.366  Goal  "concat(xs@ys) = concat(xs)@concat(ys)";
   1.367  by (induct_tac "xs" 1);
   1.368 -by (ALLGOALS Asm_simp_tac);
   1.369 +by (Auto_tac);
   1.370  qed"concat_append";
   1.371  Addsimps [concat_append];
   1.372  
   1.373  Goal "(concat xss = []) = (!xs:set xss. xs=[])";
   1.374  by (induct_tac "xss" 1);
   1.375 -by (ALLGOALS Asm_simp_tac);
   1.376 +by (Auto_tac);
   1.377  qed "concat_eq_Nil_conv";
   1.378  AddIffs [concat_eq_Nil_conv];
   1.379  
   1.380  Goal "([] = concat xss) = (!xs:set xss. xs=[])";
   1.381  by (induct_tac "xss" 1);
   1.382 -by (ALLGOALS Asm_simp_tac);
   1.383 +by (Auto_tac);
   1.384  qed "Nil_eq_concat_conv";
   1.385  AddIffs [Nil_eq_concat_conv];
   1.386  
   1.387  Goal  "set(concat xs) = Union(set `` set xs)";
   1.388  by (induct_tac "xs" 1);
   1.389 -by (ALLGOALS Asm_simp_tac);
   1.390 +by (Auto_tac);
   1.391  qed"set_concat";
   1.392  Addsimps [set_concat];
   1.393  
   1.394  Goal "map f (concat xs) = concat (map (map f) xs)"; 
   1.395  by (induct_tac "xs" 1);
   1.396 -by (ALLGOALS Asm_simp_tac);
   1.397 +by (Auto_tac);
   1.398  qed "map_concat";
   1.399  
   1.400  Goal "filter p (concat xs) = concat (map (filter p) xs)"; 
   1.401  by (induct_tac "xs" 1);
   1.402 -by (ALLGOALS Asm_simp_tac);
   1.403 +by (Auto_tac);
   1.404  qed"filter_concat"; 
   1.405  
   1.406  Goal "rev(concat xs) = concat (map rev (rev xs))";
   1.407  by (induct_tac "xs" 1);
   1.408 -by (ALLGOALS Asm_simp_tac);
   1.409 +by (Auto_tac);
   1.410  qed "rev_concat";
   1.411  
   1.412  (** nth **)
   1.413 @@ -493,7 +486,7 @@
   1.414   by (Asm_simp_tac 1);
   1.415   by (rtac allI 1);
   1.416   by (exhaust_tac "xs" 1);
   1.417 -  by (ALLGOALS Asm_simp_tac);
   1.418 +  by (Auto_tac);
   1.419  qed_spec_mp "nth_append";
   1.420  
   1.421  Goal "!n. n < length xs --> (map f xs)!n = f(xs!n)";
   1.422 @@ -503,7 +496,7 @@
   1.423  (* case x#xl *)
   1.424  by (rtac allI 1);
   1.425  by (nat_ind_tac "n" 1);
   1.426 -by (ALLGOALS Asm_full_simp_tac);
   1.427 +by (Auto_tac);
   1.428  qed_spec_mp "nth_map";
   1.429  Addsimps [nth_map];
   1.430  
   1.431 @@ -514,7 +507,7 @@
   1.432  (* case x#xl *)
   1.433  by (rtac allI 1);
   1.434  by (nat_ind_tac "n" 1);
   1.435 -by (ALLGOALS Asm_full_simp_tac);
   1.436 +by (Auto_tac);
   1.437  qed_spec_mp "list_all_nth";
   1.438  
   1.439  Goal "!n. n < length xs --> xs!n mem xs";
   1.440 @@ -547,31 +540,31 @@
   1.441  
   1.442  Goal "last(xs@[x]) = x";
   1.443  by (induct_tac "xs" 1);
   1.444 -by (ALLGOALS Asm_simp_tac);
   1.445 +by (Auto_tac);
   1.446  qed "last_snoc";
   1.447  Addsimps [last_snoc];
   1.448  
   1.449  Goal "butlast(xs@[x]) = xs";
   1.450  by (induct_tac "xs" 1);
   1.451 -by (ALLGOALS Asm_simp_tac);
   1.452 +by (Auto_tac);
   1.453  qed "butlast_snoc";
   1.454  Addsimps [butlast_snoc];
   1.455  
   1.456  Goal "length(butlast xs) = length xs - 1";
   1.457  by (res_inst_tac [("xs","xs")] rev_induct 1);
   1.458 -by (ALLGOALS Asm_simp_tac);
   1.459 +by (Auto_tac);
   1.460  qed "length_butlast";
   1.461  Addsimps [length_butlast];
   1.462  
   1.463  Goal
   1.464    "!ys. butlast (xs@ys) = (if ys=[] then butlast xs else xs@butlast ys)";
   1.465  by (induct_tac "xs" 1);
   1.466 -by (ALLGOALS Asm_simp_tac);
   1.467 +by (Auto_tac);
   1.468  qed_spec_mp "butlast_append";
   1.469  
   1.470  Goal "x:set(butlast xs) --> x:set xs";
   1.471  by (induct_tac "xs" 1);
   1.472 -by (ALLGOALS Asm_simp_tac);
   1.473 +by (Auto_tac);
   1.474  qed_spec_mp "in_set_butlastD";
   1.475  
   1.476  Goal "x:set(butlast xs) ==> x:set(butlast(xs@ys))";
   1.477 @@ -590,12 +583,12 @@
   1.478  
   1.479  Goal "take 0 xs = []";
   1.480  by (induct_tac "xs" 1);
   1.481 -by (ALLGOALS Asm_simp_tac);
   1.482 +by (Auto_tac);
   1.483  qed "take_0";
   1.484  
   1.485  Goal "drop 0 xs = xs";
   1.486  by (induct_tac "xs" 1);
   1.487 -by (ALLGOALS Asm_simp_tac);
   1.488 +by (Auto_tac);
   1.489  qed "drop_0";
   1.490  
   1.491  Goal "take (Suc n) (x#xs) = x # take n xs";
   1.492 @@ -611,117 +604,103 @@
   1.493  
   1.494  Goal "!xs. length(take n xs) = min (length xs) n";
   1.495  by (nat_ind_tac "n" 1);
   1.496 - by (ALLGOALS Asm_simp_tac);
   1.497 -by (rtac allI 1);
   1.498 + by (Auto_tac);
   1.499  by (exhaust_tac "xs" 1);
   1.500 - by (ALLGOALS Asm_simp_tac);
   1.501 + by (Auto_tac);
   1.502  qed_spec_mp "length_take";
   1.503  Addsimps [length_take];
   1.504  
   1.505  Goal "!xs. length(drop n xs) = (length xs - n)";
   1.506  by (nat_ind_tac "n" 1);
   1.507 - by (ALLGOALS Asm_simp_tac);
   1.508 -by (rtac allI 1);
   1.509 + by (Auto_tac);
   1.510  by (exhaust_tac "xs" 1);
   1.511 - by (ALLGOALS Asm_simp_tac);
   1.512 + by (Auto_tac);
   1.513  qed_spec_mp "length_drop";
   1.514  Addsimps [length_drop];
   1.515  
   1.516  Goal "!xs. length xs <= n --> take n xs = xs";
   1.517  by (nat_ind_tac "n" 1);
   1.518 - by (ALLGOALS Asm_simp_tac);
   1.519 -by (rtac allI 1);
   1.520 + by (Auto_tac);
   1.521  by (exhaust_tac "xs" 1);
   1.522 - by (ALLGOALS Asm_simp_tac);
   1.523 + by (Auto_tac);
   1.524  qed_spec_mp "take_all";
   1.525  
   1.526  Goal "!xs. length xs <= n --> drop n xs = []";
   1.527  by (nat_ind_tac "n" 1);
   1.528 - by (ALLGOALS Asm_simp_tac);
   1.529 -by (rtac allI 1);
   1.530 + by (Auto_tac);
   1.531  by (exhaust_tac "xs" 1);
   1.532 - by (ALLGOALS Asm_simp_tac);
   1.533 + by (Auto_tac);
   1.534  qed_spec_mp "drop_all";
   1.535  
   1.536  Goal 
   1.537    "!xs. take n (xs @ ys) = (take n xs @ take (n - length xs) ys)";
   1.538  by (nat_ind_tac "n" 1);
   1.539 - by (ALLGOALS Asm_simp_tac);
   1.540 -by (rtac allI 1);
   1.541 + by (Auto_tac);
   1.542  by (exhaust_tac "xs" 1);
   1.543 - by (ALLGOALS Asm_simp_tac);
   1.544 + by (Auto_tac);
   1.545  qed_spec_mp "take_append";
   1.546  Addsimps [take_append];
   1.547  
   1.548  Goal "!xs. drop n (xs@ys) = drop n xs @ drop (n - length xs) ys"; 
   1.549  by (nat_ind_tac "n" 1);
   1.550 - by (ALLGOALS Asm_simp_tac);
   1.551 -by (rtac allI 1);
   1.552 + by (Auto_tac);
   1.553  by (exhaust_tac "xs" 1);
   1.554 - by (ALLGOALS Asm_simp_tac);
   1.555 + by (Auto_tac);
   1.556  qed_spec_mp "drop_append";
   1.557  Addsimps [drop_append];
   1.558  
   1.559  Goal "!xs n. take n (take m xs) = take (min n m) xs"; 
   1.560  by (nat_ind_tac "m" 1);
   1.561 - by (ALLGOALS Asm_simp_tac);
   1.562 -by (rtac allI 1);
   1.563 + by (Auto_tac);
   1.564  by (exhaust_tac "xs" 1);
   1.565 - by (ALLGOALS Asm_simp_tac);
   1.566 -by (rtac allI 1);
   1.567 + by (Auto_tac);
   1.568  by (exhaust_tac "n" 1);
   1.569 - by (ALLGOALS Asm_simp_tac);
   1.570 + by (Auto_tac);
   1.571  qed_spec_mp "take_take";
   1.572  
   1.573  Goal "!xs. drop n (drop m xs) = drop (n + m) xs"; 
   1.574  by (nat_ind_tac "m" 1);
   1.575 - by (ALLGOALS Asm_simp_tac);
   1.576 -by (rtac allI 1);
   1.577 + by (Auto_tac);
   1.578  by (exhaust_tac "xs" 1);
   1.579 - by (ALLGOALS Asm_simp_tac);
   1.580 + by (Auto_tac);
   1.581  qed_spec_mp "drop_drop";
   1.582  
   1.583  Goal "!xs n. take n (drop m xs) = drop m (take (n + m) xs)"; 
   1.584  by (nat_ind_tac "m" 1);
   1.585 - by (ALLGOALS Asm_simp_tac);
   1.586 -by (rtac allI 1);
   1.587 + by (Auto_tac);
   1.588  by (exhaust_tac "xs" 1);
   1.589 - by (ALLGOALS Asm_simp_tac);
   1.590 + by (Auto_tac);
   1.591  qed_spec_mp "take_drop";
   1.592  
   1.593  Goal "!xs. take n (map f xs) = map f (take n xs)"; 
   1.594  by (nat_ind_tac "n" 1);
   1.595 -by (ALLGOALS Asm_simp_tac);
   1.596 -by (rtac allI 1);
   1.597 + by (Auto_tac);
   1.598  by (exhaust_tac "xs" 1);
   1.599 -by (ALLGOALS Asm_simp_tac);
   1.600 + by (Auto_tac);
   1.601  qed_spec_mp "take_map"; 
   1.602  
   1.603  Goal "!xs. drop n (map f xs) = map f (drop n xs)"; 
   1.604  by (nat_ind_tac "n" 1);
   1.605 -by (ALLGOALS Asm_simp_tac);
   1.606 -by (rtac allI 1);
   1.607 + by (Auto_tac);
   1.608  by (exhaust_tac "xs" 1);
   1.609 -by (ALLGOALS Asm_simp_tac);
   1.610 + by (Auto_tac);
   1.611  qed_spec_mp "drop_map";
   1.612  
   1.613  Goal "!n i. i < n --> (take n xs)!i = xs!i";
   1.614  by (induct_tac "xs" 1);
   1.615 - by (ALLGOALS Asm_simp_tac);
   1.616 -by (Clarify_tac 1);
   1.617 + by (Auto_tac);
   1.618  by (exhaust_tac "n" 1);
   1.619   by (Blast_tac 1);
   1.620  by (exhaust_tac "i" 1);
   1.621 -by (ALLGOALS Asm_full_simp_tac);
   1.622 + by (Auto_tac);
   1.623  qed_spec_mp "nth_take";
   1.624  Addsimps [nth_take];
   1.625  
   1.626  Goal  "!xs i. n + i <= length xs --> (drop n xs)!i = xs!(n+i)";
   1.627  by (nat_ind_tac "n" 1);
   1.628 - by (ALLGOALS Asm_simp_tac);
   1.629 -by (rtac allI 1);
   1.630 + by (Auto_tac);
   1.631  by (exhaust_tac "xs" 1);
   1.632 - by (ALLGOALS Asm_simp_tac);
   1.633 + by (Auto_tac);
   1.634  qed_spec_mp "nth_drop";
   1.635  Addsimps [nth_drop];
   1.636  
   1.637 @@ -731,39 +710,37 @@
   1.638  
   1.639  Goal "takeWhile P xs @ dropWhile P xs = xs";
   1.640  by (induct_tac "xs" 1);
   1.641 -by (ALLGOALS Asm_full_simp_tac);
   1.642 +by (Auto_tac);
   1.643  qed "takeWhile_dropWhile_id";
   1.644  Addsimps [takeWhile_dropWhile_id];
   1.645  
   1.646  Goal  "x:set xs & ~P(x) --> takeWhile P (xs @ ys) = takeWhile P xs";
   1.647  by (induct_tac "xs" 1);
   1.648 -by (ALLGOALS Asm_full_simp_tac);
   1.649 -by (Blast_tac 1);
   1.650 +by (Auto_tac);
   1.651  bind_thm("takeWhile_append1", conjI RS (result() RS mp));
   1.652  Addsimps [takeWhile_append1];
   1.653  
   1.654  Goal "(!x:set xs. P(x)) --> takeWhile P (xs @ ys) = xs @ takeWhile P ys";
   1.655  by (induct_tac "xs" 1);
   1.656 -by (ALLGOALS Asm_full_simp_tac);
   1.657 +by (Auto_tac);
   1.658  bind_thm("takeWhile_append2", ballI RS (result() RS mp));
   1.659  Addsimps [takeWhile_append2];
   1.660  
   1.661  Goal "x:set xs & ~P(x) --> dropWhile P (xs @ ys) = (dropWhile P xs)@ys";
   1.662  by (induct_tac "xs" 1);
   1.663 -by (ALLGOALS Asm_full_simp_tac);
   1.664 -by (Blast_tac 1);
   1.665 +by (Auto_tac);
   1.666  bind_thm("dropWhile_append1", conjI RS (result() RS mp));
   1.667  Addsimps [dropWhile_append1];
   1.668  
   1.669  Goal "(!x:set xs. P(x)) --> dropWhile P (xs @ ys) = dropWhile P ys";
   1.670  by (induct_tac "xs" 1);
   1.671 -by (ALLGOALS Asm_full_simp_tac);
   1.672 +by (Auto_tac);
   1.673  bind_thm("dropWhile_append2", ballI RS (result() RS mp));
   1.674  Addsimps [dropWhile_append2];
   1.675  
   1.676  Goal "x:set(takeWhile P xs) --> x:set xs & P x";
   1.677  by (induct_tac "xs" 1);
   1.678 -by (ALLGOALS Asm_full_simp_tac);
   1.679 +by (Auto_tac);
   1.680  qed_spec_mp"set_take_whileD";
   1.681  
   1.682  qed_goal "zip_Nil_Nil"   thy "zip []     []     = []" (K [Simp_tac 1]);
   1.683 @@ -782,12 +759,12 @@
   1.684  
   1.685  Goal "nodups(remdups xs)";
   1.686  by (induct_tac "xs" 1);
   1.687 -by (ALLGOALS Asm_full_simp_tac);
   1.688 +by (Auto_tac);
   1.689  qed "nodups_remdups";
   1.690  
   1.691  Goal "nodups xs --> nodups (filter P xs)";
   1.692  by (induct_tac "xs" 1);
   1.693 -by (ALLGOALS Asm_full_simp_tac);
   1.694 +by (Auto_tac);
   1.695  qed_spec_mp "nodups_filter";
   1.696  
   1.697  (** replicate **)
   1.698 @@ -795,7 +772,7 @@
   1.699  
   1.700  Goal "set(replicate (Suc n) x) = {x}";
   1.701  by (induct_tac "n" 1);
   1.702 -by (ALLGOALS Asm_full_simp_tac);
   1.703 +by (Auto_tac);
   1.704  val lemma = result();
   1.705  
   1.706  Goal "n ~= 0 ==> set(replicate n x) = {x}";