equal
deleted
inserted
replaced
330 |
330 |
331 val prems = foldr1 (common_prefix op aconv) (map (prems_of o #3) rec_rewrites'); |
331 val prems = foldr1 (common_prefix op aconv) (map (prems_of o #3) rec_rewrites'); |
332 val cprems = map cert prems; |
332 val cprems = map cert prems; |
333 val asms = map Thm.assume cprems; |
333 val asms = map Thm.assume cprems; |
334 val premss = map (fn (cargs, eprems, eqn) => |
334 val premss = map (fn (cargs, eprems, eqn) => |
335 map (fn t => list_all_free (cargs, Logic.list_implies (eprems, t))) |
335 map (fn t => fold_rev (Logic.all o Free) cargs (Logic.list_implies (eprems, t))) |
336 (List.drop (prems_of eqn, length prems))) rec_rewrites'; |
336 (List.drop (prems_of eqn, length prems))) rec_rewrites'; |
337 val cpremss = map (map cert) premss; |
337 val cpremss = map (map cert) premss; |
338 val asmss = map (map Thm.assume) cpremss; |
338 val asmss = map (map Thm.assume) cpremss; |
339 |
339 |
340 fun mk_eqn ((cargs, eprems, eqn), asms') = |
340 fun mk_eqn ((cargs, eprems, eqn), asms') = |
353 val rule_prems = cprems @ flat cpremss; |
353 val rule_prems = cprems @ flat cpremss; |
354 val rule = implies_intr_list rule_prems |
354 val rule = implies_intr_list rule_prems |
355 (Conjunction.intr_balanced (map mk_eqn (rec_rewrites' ~~ asmss))); |
355 (Conjunction.intr_balanced (map mk_eqn (rec_rewrites' ~~ asmss))); |
356 |
356 |
357 val goals = map (fn ((cargs, _, _), eqn) => |
357 val goals = map (fn ((cargs, _, _), eqn) => |
358 (list_all_free (cargs, eqn), [])) (rec_rewrites' ~~ eqns'); |
358 (fold_rev (Logic.all o Free) cargs eqn, [])) (rec_rewrites' ~~ eqns'); |
359 |
359 |
360 in |
360 in |
361 lthy' |> |
361 lthy' |> |
362 Variable.add_fixes (map fst lsrs) |> snd |> |
362 Variable.add_fixes (map fst lsrs) |> snd |> |
363 Proof.theorem NONE |
363 Proof.theorem NONE |