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
--- 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