eliminate duplicate hypotheses (which can arise due to (un)clausification)
authorblanchet
Thu, 02 Oct 2014 15:24:51 +0200
changeset 58514 1fc93ea5136b
parent 58509 251fc4a51700
child 58515 6cf55e935a9d
eliminate duplicate hypotheses (which can arise due to (un)clausification)
src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML
--- a/src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML	Thu Oct 02 12:02:29 2014 +0200
+++ b/src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML	Thu Oct 02 15:24:51 2014 +0200
@@ -104,8 +104,9 @@
       val norm_t = normalize role t
       val is_duplicate =
         exists (fn (prev_name, prev_role, prev_t, _, _) =>
-            member (op =) deps prev_name andalso
-            Term.aconv_untyped (normalize prev_role prev_t, norm_t))
+            (prev_role = Hypothesis andalso prev_t aconv t) orelse
+            (member (op =) deps prev_name andalso
+             Term.aconv_untyped (normalize prev_role prev_t, norm_t)))
           res
 
       fun looks_boring () = t aconv @{prop False} orelse length deps < 2