src/Pure/Isar/proof.ML
changeset 21565 bd28361f4c5b
parent 21466 6ffb8f455b84
child 21666 d5eb0720e45d
equal deleted inserted replaced
21564:519ee3129ee1 21565:bd28361f4c5b
   774     goal_state
   774     goal_state
   775     |> map_context (Variable.set_body true)
   775     |> map_context (Variable.set_body true)
   776     |> put_goal (SOME (make_goal ((kind, propss'), [], goal, before_qed, after_qed')))
   776     |> put_goal (SOME (make_goal ((kind, propss'), [], goal, before_qed, after_qed')))
   777     |> map_context (ProofContext.add_cases false (AutoBind.cases thy props))
   777     |> map_context (ProofContext.add_cases false (AutoBind.cases thy props))
   778     |> map_context (ProofContext.auto_bind_goal props)
   778     |> map_context (ProofContext.auto_bind_goal props)
   779     |> K chaining ? (`the_facts #-> using_facts)
   779     |> chaining ? (`the_facts #-> using_facts)
   780     |> put_facts NONE
   780     |> put_facts NONE
   781     |> open_block
   781     |> open_block
   782     |> put_goal NONE
   782     |> put_goal NONE
   783     |> enter_backward
   783     |> enter_backward
   784     |> K (not (null vars)) ? refine_terms (length propss')
   784     |> not (null vars) ? refine_terms (length propss')
   785     |> K (null props) ? (refine (Method.Basic Method.assumption) #> Seq.hd)
   785     |> null props ? (refine (Method.Basic Method.assumption) #> Seq.hd)
   786   end;
   786   end;
   787 
   787 
   788 fun generic_qed state =
   788 fun generic_qed state =
   789   let
   789   let
   790     val (goal_ctxt, {statement = (_, stmt), using = _, goal, before_qed = _, after_qed}) =
   790     val (goal_ctxt, {statement = (_, stmt), using = _, goal, before_qed = _, after_qed}) =
   913       refine_goals print_rule (context_of state) (flat results)
   913       refine_goals print_rule (context_of state) (flat results)
   914       #> Seq.maps (after_qed results);
   914       #> Seq.maps (after_qed results);
   915   in
   915   in
   916     state
   916     state
   917     |> local_goal print_results prep_att prepp "show" before_qed after_qed' stmt
   917     |> local_goal print_results prep_att prepp "show" before_qed after_qed' stmt
   918     |> K int ? (fn goal_state =>
   918     |> int ? (fn goal_state =>
   919       (case test_proof goal_state of
   919       (case test_proof goal_state of
   920         Result (SOME _) => goal_state
   920         Result (SOME _) => goal_state
   921       | Result NONE => error (fail_msg (context_of goal_state))
   921       | Result NONE => error (fail_msg (context_of goal_state))
   922       | Exn Interrupt => raise Interrupt
   922       | Exn Interrupt => raise Interrupt
   923       | Exn exn => raise EXCEPTION (exn, fail_msg (context_of goal_state))))
   923       | Exn exn => raise EXCEPTION (exn, fail_msg (context_of goal_state))))