--- a/src/Pure/library.ML Sat Jul 25 10:31:27 2009 +0200
+++ b/src/Pure/library.ML Sat Jul 25 12:43:45 2009 +0200
@@ -109,7 +109,6 @@
val split_list: ('a * 'b) list -> 'a list * 'b list
val map_product: ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
val fold_product: ('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c
- val multiply: 'a list -> 'a list list -> 'a list list
val separate: 'a -> 'a list -> 'a list
val surround: 'a -> 'a list -> 'a list
val replicate: int -> 'a -> 'a list
@@ -552,9 +551,6 @@
else rep (n, [])
end;
-(*multiply [a, b, c, ...] * [xs, ys, zs, ...]*)
-fun multiply [] _ = []
- | multiply (x :: xs) yss = map (cons x) yss @ multiply xs yss;
(* direct product *)
@@ -1138,5 +1134,5 @@
end;
-structure BasicLibrary: BASIC_LIBRARY = Library;
-open BasicLibrary;
+structure Basic_Library: BASIC_LIBRARY = Library;
+open Basic_Library;
--- a/src/Tools/induct.ML Sat Jul 25 10:31:27 2009 +0200
+++ b/src/Tools/induct.ML Sat Jul 25 12:43:45 2009 +0200
@@ -568,7 +568,7 @@
*)
fun get_inductT ctxt insts =
- fold_rev multiply (insts |> map
+ fold_rev (map_product cons) (insts |> map
((fn [] => NONE | ts => List.last ts) #>
(fn NONE => TVar (("'a", 0), []) | SOME t => Term.fastype_of t) #>
find_inductT ctxt)) [[]]