more careful treatment of implicit context;
authorwenzelm
Wed, 07 Aug 2019 10:31:54 +0200
changeset 70664 94ed5be08e7f
parent 70663 90acc6ce5beb
child 70665 02d08d0ba896
more careful treatment of implicit context;
src/FOLP/simp.ML
--- a/src/FOLP/simp.ML	Wed Aug 07 09:28:32 2019 +0200
+++ b/src/FOLP/simp.ML	Wed Aug 07 10:31:54 2019 +0200
@@ -255,13 +255,13 @@
 val insert_thms = fold_rev insert_thm;
 
 fun addrew ctxt thm (SS{auto_tac,congs,cong_net,mk_simps,simps,simp_net}) =
-let val thms = mk_simps ctxt thm
+let val thms = map Thm.trim_context (mk_simps ctxt thm)
 in SS{auto_tac=auto_tac,congs=congs, cong_net=cong_net, mk_simps=mk_simps,
       simps = (thm,thms)::simps, simp_net = insert_thms thms simp_net}
 end;
 
 fun op addcongs(SS{auto_tac,congs,cong_net,mk_simps,simps,simp_net}, thms) =
-let val congs' = thms @ congs;
+let val congs' = map Thm.trim_context thms @ congs;
 in SS{auto_tac=auto_tac, congs= congs',
       cong_net= insert_thms (map mk_trans thms) cong_net,
       mk_simps = fn ctxt => normed_rews ctxt congs', simps=simps, simp_net=simp_net}