equal
deleted
inserted
replaced
416 fun smart_store _ (name, []) = |
416 fun smart_store _ (name, []) = |
417 error ("Cannot store empty list of theorems: " ^ quote name) |
417 error ("Cannot store empty list of theorems: " ^ quote name) |
418 | smart_store name_thm (name, [thm]) = |
418 | smart_store name_thm (name, [thm]) = |
419 fst (enter_thms (name_thm true) (name_thm false) I (name, [thm]) (Thm.theory_of_thm thm)) |
419 fst (enter_thms (name_thm true) (name_thm false) I (name, [thm]) (Thm.theory_of_thm thm)) |
420 | smart_store name_thm (name, thms) = |
420 | smart_store name_thm (name, thms) = |
421 let |
421 let val thy = Theory.merge_list (map Thm.theory_of_thm thms) |
422 fun merge th thy = Theory.merge (thy, Thm.theory_of_thm th) |
|
423 handle TERM (msg, _) => raise THM (msg, 0, [th]); |
|
424 val thy = fold merge (tl thms) (Thm.theory_of_thm (hd thms)); |
|
425 in fst (enter_thms (name_thm true) (name_thm false) I (name, thms) thy) end; |
422 in fst (enter_thms (name_thm true) (name_thm false) I (name, thms) thy) end; |
426 |
423 |
427 in |
424 in |
428 |
425 |
429 val smart_store_thms = smart_store name_thms; |
426 val smart_store_thms = smart_store name_thms; |