tuned;
authorwenzelm
Tue, 11 Apr 2023 20:52:38 +0200
changeset 77826 e3db27e3b0c6
parent 77825 61f652dd955a
child 77827 cd5d56abda10
tuned;
src/Pure/proofterm.ML
--- a/src/Pure/proofterm.ML	Tue Apr 11 20:32:04 2023 +0200
+++ b/src/Pure/proofterm.ML	Tue Apr 11 20:52:38 2023 +0200
@@ -42,7 +42,6 @@
   type thm = serial * thm_node
   type thms = thm_node PThms.table
   val union_thms: thms * thms -> thms
-  val unions_thms: thms list -> thms
   exception MIN_PROOF of unit
   val proof_of: proof_body -> proof
   val join_proof: proof_body future -> proof
@@ -238,7 +237,6 @@
 
 type thms = thm_node PThms.table;
 val union_thms: thms * thms -> thms = PThms.merge (K true);
-val unions_thms: thms list -> thms = PThms.merges (K true);
 
 exception MIN_PROOF of unit;
 
@@ -1994,13 +1992,8 @@
     val _ = consolidate_bodies (map #2 ps @ [body0]);
     val PBody {oracles = oracles0, thms = thms0, proof = proof0} = body0;
     val oracles =
-      Oracles.merges
-        (fold (fn (_, PBody {oracles, ...}) => not (Oracles.is_empty oracles) ? cons oracles)
-          ps [oracles0]);
-    val thms =
-      unions_thms
-        (fold (fn (_, PBody {thms, ...}) => not (PThms.is_empty thms) ? cons thms)
-          ps [thms0]);
+      fold (fn (_, PBody {oracles, ...}) => fn acc => Oracles.merge (acc, oracles)) ps oracles0;
+    val thms = fold (fn (_, PBody {thms, ...}) => fn acc => union_thms (acc, thms)) ps thms0;
     val proof = rew_proof thy proof0;
   in PBody {oracles = oracles, thms = thms, proof = proof} end;