fixed detection of Skolem constants in type construction detection code
authorblanchet
Mon, 06 Jun 2011 20:36:35 +0200
changeset 43188 0c36ae874fcc
parent 43187 95bd1ef1331a
child 43189 0ab7265f659f
fixed detection of Skolem constants in type construction detection code
src/HOL/Tools/ATP/atp_translate.ML
--- a/src/HOL/Tools/ATP/atp_translate.ML	Mon Jun 06 20:36:35 2011 +0200
+++ b/src/HOL/Tools/ATP/atp_translate.ML	Mon Jun 06 20:36:35 2011 +0200
@@ -1374,15 +1374,11 @@
 (*Type constructors used to instantiate overloaded constants are the only ones needed.*)
 fun add_type_consts_in_term thy =
   let
-    fun add ((t as Const (s, _)) $ u) =
-        if s = @{const_name Meson.skolem} orelse
-           String.isPrefix skolem_const_prefix s then
-          I
-        else
-          add t #> add u
+    fun add (Const (@{const_name Meson.skolem}, _) $ _) = I
       | add (t $ u) = add t #> add u
-      | add (Const x) =
-        x |> Sign.const_typargs thy |> fold (fold_type_consts set_insert)
+      | add (Const (x as (s, _))) =
+        if String.isPrefix skolem_const_prefix s then I
+        else x |> Sign.const_typargs thy |> fold (fold_type_consts set_insert)
       | add (Abs (_, _, u)) = add u
       | add _ = I
   in add end