fixed inverted logic and improve precision when handling monotonic types in polymorphic encodings
authorblanchet
Fri, 26 Aug 2011 00:05:45 +0200
changeset 44504 6f29df8d2007
parent 44503 97ec9abd3253
child 44505 2c1fc7b29c9c
fixed inverted logic and improve precision when handling monotonic types in polymorphic encodings
src/HOL/Tools/ATP/atp_translate.ML
--- a/src/HOL/Tools/ATP/atp_translate.ML	Thu Aug 25 23:55:21 2011 +0200
+++ b/src/HOL/Tools/ATP/atp_translate.ML	Fri Aug 26 00:05:45 2011 +0200
@@ -1889,9 +1889,8 @@
   let
     val level = level_of_type_enc type_enc
     val should_encode = should_encode_type ctxt mono level
-    fun add_type T = should_encode T ? insert_type ctxt I T
-    fun add_term (tm as IApp (tm1, tm2)) =
-        add_type (ityp_of tm) #> add_term tm1 #> add_term tm2
+    fun add_type T = not (should_encode T) ? insert_type ctxt I T
+    fun add_term (tm as IApp (_, tm2)) = add_type (ityp_of tm) #> add_term tm2
       | add_term tm = add_type (ityp_of tm)
   in formula_fold NONE (K add_term) end
 fun add_fact_monotonic_types ctxt mono type_enc =