equal
deleted
inserted
replaced
1288 |
1288 |
1289 fun intern_store_thm gen_output thyname thmname hth thy = |
1289 fun intern_store_thm gen_output thyname thmname hth thy = |
1290 let |
1290 let |
1291 val sg = sign_of thy |
1291 val sg = sign_of thy |
1292 val (hth' as HOLThm (args as (_,th))) = norm_hthm sg hth |
1292 val (hth' as HOLThm (args as (_,th))) = norm_hthm sg hth |
1293 val _ = if has_ren hth' then warning ("Theorem " ^ thmname ^ " needs variable-disambiguating") |
|
1294 else () |
|
1295 val rew = rewrite_hol4_term (concl_of th) thy |
1293 val rew = rewrite_hol4_term (concl_of th) thy |
1296 val th = equal_elim rew th |
1294 val th = equal_elim rew th |
1297 val thy' = add_hol4_pending thyname thmname args thy |
1295 val thy' = add_hol4_pending thyname thmname args thy |
|
1296 val th = Drule.disambiguate_frees th |
1298 val thy2 = if gen_output |
1297 val thy2 = if gen_output |
1299 then add_dump ("lemma " ^ (quotename thmname) ^ ": " ^ (smart_string_of_thm th) ^ "\n by (import " ^ thyname ^ " " ^ (quotename thmname) ^ ")") thy' |
1298 then add_dump ("lemma " ^ (quotename thmname) ^ ": " ^ |
|
1299 (smart_string_of_thm th) ^ "\n by (import " ^ |
|
1300 thyname ^ " " ^ (quotename thmname) ^ ")") thy' |
1300 else thy' |
1301 else thy' |
1301 in |
1302 in |
1302 (thy2,hth') |
1303 (thy2,hth') |
1303 end |
1304 end |
1304 |
1305 |