take chained facts into consideration in tactic hammer (from Jasmin)
authordesharna
Tue, 25 Feb 2025 17:37:45 +0100
changeset 82203 c535cfba16db
parent 82202 a1f85f579a07
child 82204 c819ee4cdea9
take chained facts into consideration in tactic hammer (from Jasmin)
src/HOL/Tools/Sledgehammer/sledgehammer_prover_tactic.ML
--- a/src/HOL/Tools/Sledgehammer/sledgehammer_prover_tactic.ML	Tue Feb 25 17:37:41 2025 +0100
+++ b/src/HOL/Tools/Sledgehammer/sledgehammer_prover_tactic.ML	Tue Feb 25 17:37:45 2025 +0100
@@ -86,11 +86,14 @@
   let
     val (basic_slice, No_Slice) = slice
     val facts = facts_of_basic_slice basic_slice factss
+    val {facts = chained, ...} = Proof.goal state
     val ctxt = Proof.context_of state
 
     val (local_facts, global_facts) =
-      fold (fn fact => if fst (snd (fst fact)) = Global then apsnd (cons (snd fact))
-        else apfst (cons (snd fact))) facts ([], [])
+      ([], [])
+      |> fold (fn fact => if fst (snd (fst fact)) = Global then apsnd (cons (snd fact))
+        else apfst (cons (snd fact))) facts
+      |> apfst (append chained)
 
     val timer = Timer.startRealTimer ()