src/Pure/Isar/proof.ML
changeset 21687 f689f729afab
parent 21666 d5eb0720e45d
child 21727 5acd4f35d26f
equal deleted inserted replaced
21686:4f5f6c685ab4 21687:f689f729afab
   389   end;
   389   end;
   390 
   390 
   391 fun select_goals n meth state =
   391 fun select_goals n meth state =
   392   state
   392   state
   393   |> (#2 o #2 o get_goal)
   393   |> (#2 o #2 o get_goal)
   394   |> ALLGOALS Tactic.conjunction_tac
   394   |> ALLGOALS Goal.conjunction_tac
   395   |> Seq.maps (fn goal =>
   395   |> Seq.maps (fn goal =>
   396     state
   396     state
   397     |> Seq.lift set_goal (Goal.extract 1 n goal |> Seq.maps (Tactic.conjunction_tac 1))
   397     |> Seq.lift set_goal (Goal.extract 1 n goal |> Seq.maps (Goal.conjunction_tac 1))
   398     |> Seq.maps meth
   398     |> Seq.maps meth
   399     |> Seq.maps (fn state' => state'
   399     |> Seq.maps (fn state' => state'
   400       |> Seq.lift set_goal (Goal.retrofit 1 n (#2 (#2 (get_goal state'))) goal))
   400       |> Seq.lift set_goal (Goal.retrofit 1 n (#2 (#2 (get_goal state'))) goal))
   401     |> Seq.maps (apply_method true (K Method.succeed)));
   401     |> Seq.maps (apply_method true (K Method.succeed)));
   402 
   402 
   426 
   426 
   427 
   427 
   428 (* refine via sub-proof *)
   428 (* refine via sub-proof *)
   429 
   429 
   430 fun goal_tac rule =
   430 fun goal_tac rule =
   431   Tactic.norm_hhf_tac THEN' Tactic.rtac rule THEN_ALL_NEW
   431   Goal.norm_hhf_tac THEN' Tactic.rtac rule THEN_ALL_NEW
   432     (Tactic.norm_hhf_tac THEN' (SUBGOAL (fn (goal, i) =>
   432     (Goal.norm_hhf_tac THEN' (SUBGOAL (fn (goal, i) =>
   433       if can Logic.unprotect (Logic.strip_assums_concl goal) then
   433       if can Logic.unprotect (Logic.strip_assums_concl goal) then
   434         Tactic.etac Drule.protectI i
   434         Tactic.etac Drule.protectI i
   435       else all_tac)));
   435       else all_tac)));
   436 
   436 
   437 fun refine_goals print_rule inner raw_rules state =
   437 fun refine_goals print_rule inner raw_rules state =