equal
deleted
inserted
replaced
264 fun result tac facts ctxt = |
264 fun result tac facts ctxt = |
265 let |
265 let |
266 val ((thesis_var, thesis), thesis_ctxt) = obtain_thesis ctxt; |
266 val ((thesis_var, thesis), thesis_ctxt) = obtain_thesis ctxt; |
267 val st = Goal.init (Thm.cterm_of ctxt thesis); |
267 val st = Goal.init (Thm.cterm_of ctxt thesis); |
268 val rule = |
268 val rule = |
269 (case SINGLE (Method.insert_tac facts 1 THEN tac thesis_ctxt) st of |
269 (case SINGLE (Method.insert_tac thesis_ctxt facts 1 THEN tac thesis_ctxt) st of |
270 NONE => raise THM ("Obtain.result: tactic failed", 0, facts) |
270 NONE => raise THM ("Obtain.result: tactic failed", 0, facts) |
271 | SOME th => |
271 | SOME th => |
272 check_result thesis_ctxt thesis (Raw_Simplifier.norm_hhf thesis_ctxt (Goal.conclude th))); |
272 check_result thesis_ctxt thesis (Raw_Simplifier.norm_hhf thesis_ctxt (Goal.conclude th))); |
273 |
273 |
274 val closed_rule = Thm.forall_intr (Thm.cterm_of ctxt (Free thesis_var)) rule; |
274 val closed_rule = Thm.forall_intr (Thm.cterm_of ctxt (Free thesis_var)) rule; |
411 |> Proof.chain_facts chain_facts |
411 |> Proof.chain_facts chain_facts |
412 |> Proof.internal_goal print_result Proof_Context.mode_schematic true "guess" |
412 |> Proof.internal_goal print_result Proof_Context.mode_schematic true "guess" |
413 (SOME before_qed) after_qed |
413 (SOME before_qed) after_qed |
414 [] [] [(Thm.empty_binding, [(Logic.mk_term goal, []), (goal, [])])] |
414 [] [] [(Thm.empty_binding, [(Logic.mk_term goal, []), (goal, [])])] |
415 |> snd |
415 |> snd |
416 |> Proof.refine (Method.primitive_text (fn _ => fn _ => |
416 |> Proof.refine_singleton |
417 Goal.init (Thm.cterm_of ctxt thesis))) |
417 (Method.primitive_text (fn _ => fn _ => Goal.init (Thm.cterm_of ctxt thesis))) |
418 |> Seq.hd |
|
419 end; |
418 end; |
420 |
419 |
421 in |
420 in |
422 |
421 |
423 val guess = gen_guess Proof_Context.cert_var; |
422 val guess = gen_guess Proof_Context.cert_var; |