don't lose facts that were introduced to deal with a theory or some preprocessing in the prover (e.g. the definition of 'abs' in an SMT proof)
authorblanchet
Fri, 20 Jul 2018 22:19:42 +0200
changeset 68668 c9570658e8f1
parent 68667 96aae7c44bb2
child 68670 c51ede74c0b2
don't lose facts that were introduced to deal with a theory or some preprocessing in the prover (e.g. the definition of 'abs' in an SMT proof)
src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML
--- a/src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML	Fri Jul 20 10:09:59 2018 +0200
+++ b/src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML	Fri Jul 20 22:19:42 2018 +0200
@@ -424,8 +424,13 @@
                    (case isar_proof of
                      Proof (_, _, [Prove (_, _, _, _, _, (_, gfs), meth :: _, _)]) =>
                      let
-                       val used_facts' = filter (fn (s, (sc, _)) =>
-                         member (op =) gfs s andalso sc <> Chained) used_facts
+                       val used_facts' =
+                         map_filter (fn s =>
+                            if exists (fn (s', (sc, _)) => s' = s andalso sc = Chained)
+                                used_facts then
+                              NONE
+                            else
+                              SOME (s, (Global, General))) gfs
                      in
                        ((used_facts', (meth, play_outcome)), banner, subgoal, subgoal_count)
                      end)