equal
deleted
inserted
replaced
1248 in |
1248 in |
1249 if not (idx = "") andalso u = "_" |
1249 if not (idx = "") andalso u = "_" |
1250 then SOME (newstr,valOf(Int.fromString idx)) |
1250 then SOME (newstr,valOf(Int.fromString idx)) |
1251 else NONE |
1251 else NONE |
1252 end |
1252 end |
1253 handle _ => NONE |
1253 handle _ => NONE (* FIXME avoid handle _ *) |
1254 |
1254 |
1255 fun rewrite_hol4_term t thy = |
1255 fun rewrite_hol4_term t thy = |
1256 let |
1256 let |
1257 val hol4rews1 = map (Thm.transfer thy) (HOL4Rewrites.get thy) |
1257 val hol4rews1 = map (Thm.transfer thy) (HOL4Rewrites.get thy) |
1258 val hol4ss = Simplifier.theory_context thy empty_ss |
1258 val hol4ss = Simplifier.theory_context thy empty_ss |
1281 let |
1281 let |
1282 val th1 = (SOME (PureThy.get_thm thy thmname) |
1282 val th1 = (SOME (PureThy.get_thm thy thmname) |
1283 handle ERROR _ => |
1283 handle ERROR _ => |
1284 (case split_name thmname of |
1284 (case split_name thmname of |
1285 SOME (listname,idx) => (SOME (List.nth(PureThy.get_thms thy listname,idx-1)) |
1285 SOME (listname,idx) => (SOME (List.nth(PureThy.get_thms thy listname,idx-1)) |
1286 handle _ => NONE) |
1286 handle _ => NONE) (* FIXME avoid handle _ *) |
1287 | NONE => NONE)) |
1287 | NONE => NONE)) |
1288 in |
1288 in |
1289 case th1 of |
1289 case th1 of |
1290 SOME th2 => |
1290 SOME th2 => |
1291 (case Shuffler.set_prop thy isaconc [(thmname,th2)] of |
1291 (case Shuffler.set_prop thy isaconc [(thmname,th2)] of |
1337 prin lhs) |
1337 prin lhs) |
1338 | _ => () |
1338 | _ => () |
1339 end |
1339 end |
1340 in |
1340 in |
1341 case b of |
1341 case b of |
1342 NONE => (warn () handle _ => (); (a,b)) |
1342 NONE => (warn () handle _ => (); (a,b)) (* FIXME avoid handle _ *) |
1343 | _ => (a, b) |
1343 | _ => (a, b) |
1344 end |
1344 end |
1345 |
1345 |
1346 fun get_thm thyname thmname thy = |
1346 fun get_thm thyname thmname thy = |
1347 case get_hol4_thm thyname thmname thy of |
1347 case get_hol4_thm thyname thmname thy of |