equal
deleted
inserted
replaced
55 let |
55 let |
56 val {thy, prop, maxidx, ...} = Thm.rep_thm thm; |
56 val {thy, prop, maxidx, ...} = Thm.rep_thm thm; |
57 val cparms = map (Thm.cterm_of thy) parms; |
57 val cparms = map (Thm.cterm_of thy) parms; |
58 |
58 |
59 val thm' = thm |
59 val thm' = thm |
60 |> Drule.implies_intr_goals cprops |
60 |> Drule.implies_intr_protected cprops |
61 |> Drule.forall_intr_list cparms |
61 |> Drule.forall_intr_list cparms |
62 |> Drule.forall_elim_vars (maxidx + 1); |
62 |> Drule.forall_elim_vars (maxidx + 1); |
63 val elim_tacs = replicate (length cprops) (Tactic.etac Drule.goalI); |
63 val elim_tacs = replicate (length cprops) (Tactic.etac Drule.protectI); |
64 |
64 |
65 val concl = Logic.strip_assums_concl prop; |
65 val concl = Logic.strip_assums_concl prop; |
66 val bads = parms inter (Term.term_frees concl); |
66 val bads = parms inter (Term.term_frees concl); |
67 in |
67 in |
68 if not (null bads) then |
68 if not (null bads) then |
232 Proof.fix_i (map (fn (x, T) => ([x], SOME T)) parms) |
232 Proof.fix_i (map (fn (x, T) => ([x], SOME T)) parms) |
233 #> Proof.assm_i (K (export_obtained state ts rule)) [(("", []), asms)] |
233 #> Proof.assm_i (K (export_obtained state ts rule)) [(("", []), asms)] |
234 #> Proof.add_binds_i AutoBind.no_facts |
234 #> Proof.add_binds_i AutoBind.no_facts |
235 end; |
235 end; |
236 |
236 |
237 val before_qed = SOME (Method.primitive_text (fn th => |
237 val before_qed = SOME (Method.primitive_text (Goal.conclude #> Goal.protect)); |
238 let val th' = Goal.conclude th |
|
239 in th' COMP Drule.incr_indexes_wrt [] [] [] [th'] Drule.goalI end)); |
|
240 fun after_qed _ [[res]] = |
238 fun after_qed _ [[res]] = |
241 (check_result res; Proof.end_block #> Seq.map (`Proof.the_fact #-> guess_context)); |
239 (check_result res; Proof.end_block #> Seq.map (`Proof.the_fact #-> guess_context)); |
242 in |
240 in |
243 state |
241 state |
244 |> Proof.enter_forward |
242 |> Proof.enter_forward |