improved duplicate detection in "build_name_tables" by ensuring that the earliest occurrence of a duplicate (if it exists) gets picked as the canonical instance
authorblanchet
Tue, 15 Oct 2013 16:14:52 +0200
changeset 54115 2b7e063c7abc
parent 54114 84791e3fdcde
child 54116 ba709c934470
improved duplicate detection in "build_name_tables" by ensuring that the earliest occurrence of a duplicate (if it exists) gets picked as the canonical instance
src/HOL/Tools/Sledgehammer/sledgehammer_mash.ML
--- a/src/HOL/Tools/Sledgehammer/sledgehammer_mash.ML	Tue Oct 15 15:31:32 2013 +0200
+++ b/src/HOL/Tools/Sledgehammer/sledgehammer_mash.ML	Tue Oct 15 16:14:52 2013 +0200
@@ -1216,6 +1216,7 @@
     val facts =
       nearly_all_facts ctxt false fact_override Symtab.empty css chained []
                        @{prop True}
+      |> sort (crude_thm_ord o pairself snd o swap)
       |> (case max_facts of NONE => I | SOME n => take n)
     val num_facts = length facts
     val prover = hd provers