src/HOL/List.ML
changeset 1264 3eb91524b938
parent 1202 968cd786a748
child 1301 42782316d510
--- a/src/HOL/List.ML	Wed Oct 04 13:01:05 1995 +0100
+++ b/src/HOL/List.ML	Wed Oct 04 13:10:03 1995 +0100
@@ -15,53 +15,39 @@
 
 bind_thm("Cons_inject", (hd list.inject) RS iffD1 RS conjE);
 
-val list_ss = HOL_ss addsimps list.simps;
-
 goal List.thy "!x. xs ~= x#xs";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "not_Cons_self";
 
 goal List.thy "(xs ~= []) = (? y ys. xs = y#ys)";
 by (list.induct_tac "xs" 1);
-by (simp_tac list_ss 1);
-by (asm_simp_tac list_ss 1);
+by (Simp_tac 1);
+by (Asm_simp_tac 1);
 by (REPEAT(resolve_tac [exI,refl,conjI] 1));
 qed "neq_Nil_conv";
 
-val list_ss = arith_ss addsimps list.simps @
-  [null_Nil, null_Cons, hd_Cons, tl_Cons, ttl_Nil, ttl_Cons,
-   mem_Nil, mem_Cons,
-   append_Nil, append_Cons,
-   rev_Nil, rev_Cons,
-   map_Nil, map_Cons,
-   flat_Nil, flat_Cons,
-   list_all_Nil, list_all_Cons,
-   filter_Nil, filter_Cons,
-   foldl_Nil, foldl_Cons,
-   length_Nil, length_Cons];
-
 
 (** @ - append **)
 
 goal List.thy "(xs@ys)@zs = xs@(ys@zs)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "append_assoc";
 
 goal List.thy "xs @ [] = xs";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "append_Nil2";
 
 goal List.thy "(xs@ys = []) = (xs=[] & ys=[])";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "append_is_Nil";
 
 goal List.thy "(xs @ ys = xs @ zs) = (ys=zs)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "same_append_eq";
 
 
@@ -69,12 +55,12 @@
 
 goal List.thy "rev(xs@ys) = rev(ys) @ rev(xs)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [append_Nil2,append_assoc])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [append_Nil2,append_assoc])));
 qed "rev_append";
 
 goal List.thy "rev(rev l) = l";
 by (list.induct_tac "l" 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [rev_append])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [rev_append])));
 qed "rev_rev_ident";
 
 
@@ -82,29 +68,29 @@
 
 goal List.thy "x mem (xs@ys) = (x mem xs | x mem ys)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (list_ss setloop (split_tac [expand_if]))));
+by (ALLGOALS (asm_simp_tac (!simpset setloop (split_tac [expand_if]))));
 qed "mem_append";
 
 goal List.thy "x mem [x:xs.P(x)] = (x mem xs & P(x))";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (list_ss setloop (split_tac [expand_if]))));
+by (ALLGOALS (asm_simp_tac (!simpset setloop (split_tac [expand_if]))));
 qed "mem_filter";
 
 (** list_all **)
 
 goal List.thy "(Alls x:xs.True) = True";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "list_all_True";
 
 goal List.thy "list_all p (xs@ys) = (list_all p xs & list_all p ys)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "list_all_conj";
 
 goal List.thy "(Alls x:xs.P(x)) = (!x. x mem xs --> P(x))";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (list_ss setloop (split_tac [expand_if]))));
+by (ALLGOALS (asm_simp_tac (!simpset setloop (split_tac [expand_if]))));
 by (fast_tac HOL_cs 1);
 qed "list_all_mem_conv";
 
@@ -115,7 +101,7 @@
  "P(list_case a f xs) = ((xs=[] --> P(a)) & \
 \                         (!y ys. xs=y#ys --> P(f y ys)))";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 by (fast_tac HOL_cs 1);
 qed "expand_list_case";
 
@@ -130,19 +116,19 @@
 
 goal List.thy  "flat(xs@ys) = flat(xs)@flat(ys)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [append_assoc])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [append_assoc])));
 qed"flat_append";
 
 (** length **)
 
 goal List.thy "length(xs@ys) = length(xs)+length(ys)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed"length_append";
 
 goal List.thy "length(rev xs) = length(xs)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [length_append])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [length_append])));
 qed "length_rev";
 
 (** nth **)
@@ -156,31 +142,31 @@
 goal List.thy "map (%x.x) = (%xs.xs)";
 by (rtac ext 1);
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "map_ident";
 
 goal List.thy "map f (xs@ys) = map f xs @ map f ys";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "map_append";
 
 goalw List.thy [o_def] "map (f o g) xs = map f (map g xs)";
 by (list.induct_tac "xs" 1);
-by (ALLGOALS (asm_simp_tac list_ss));
+by (ALLGOALS Asm_simp_tac);
 qed "map_compose";
 
 goal List.thy "rev(map f l) = map f (rev l)";
 by (list.induct_tac "l" 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps [map_append])));
+by (ALLGOALS (asm_simp_tac (!simpset addsimps [map_append])));
 qed "rev_map_distrib";
 
 goal List.thy "rev(flat ls) = flat (map rev (rev ls))";
 by (list.induct_tac "ls" 1);
-by (ALLGOALS (asm_simp_tac (list_ss addsimps 
+by (ALLGOALS (asm_simp_tac (!simpset addsimps 
        [map_append, flat_append, rev_append, append_Nil2])));
 qed "rev_flat";
 
-val list_ss = list_ss addsimps
+Addsimps
   [not_Cons_self, append_assoc, append_Nil2, append_is_Nil, same_append_eq,
    mem_append, mem_filter,
    rev_append, rev_rev_ident,