eliminated aliases;
authorwenzelm
Thu Oct 30 22:45:19 2014 +0100 (2014-10-30)
changeset 58839ccda99401bc8
parent 58838 59203adfc33f
child 58840 f4bb3068d819
eliminated aliases;
src/HOL/Fun.thy
src/HOL/HOL.thy
src/HOL/Product_Type.thy
src/HOL/Set.thy
src/HOL/Tools/Function/function_lib.ML
src/HOL/Tools/Function/partial_function.ML
src/HOL/Tools/Meson/meson.ML
src/HOL/Tools/Meson/meson_clausify.ML
src/HOL/Tools/Metis/metis_reconstruct.ML
src/HOL/Tools/Metis/metis_tactic.ML
src/HOL/Tools/Old_Datatype/old_datatype_aux.ML
src/HOL/Tools/Old_Datatype/old_primrec.ML
src/HOL/Tools/Old_Datatype/old_rep_datatype.ML
src/HOL/Tools/cnf.ML
src/HOL/Tools/coinduction.ML
src/HOL/Tools/inductive.ML
src/HOL/Tools/inductive_set.ML
src/HOL/Tools/lin_arith.ML
src/HOL/Tools/sat.ML
src/HOL/Tools/set_comprehension_pointfree.ML
src/HOL/Tools/simpdata.ML
src/Provers/Arith/fast_lin_arith.ML
src/Provers/order.ML
src/Provers/quasi.ML
src/Provers/trancl.ML
src/Tools/coherent.ML
     1.1 --- a/src/HOL/Fun.thy	Thu Oct 30 16:55:29 2014 +0100
     1.2 +++ b/src/HOL/Fun.thy	Thu Oct 30 22:45:19 2014 +0100
     1.3 @@ -839,8 +839,8 @@
     1.4        | (T, SOME rhs) =>
     1.5            SOME (Goal.prove ctxt [] [] (Logic.mk_equals (t, rhs))
     1.6              (fn _ =>
     1.7 -              rtac eq_reflection 1 THEN
     1.8 -              rtac @{thm ext} 1 THEN
     1.9 +              resolve_tac [eq_reflection] 1 THEN
    1.10 +              resolve_tac @{thms ext} 1 THEN
    1.11                simp_tac (put_simpset ss ctxt) 1))
    1.12      end
    1.13  in proc end
     2.1 --- a/src/HOL/HOL.thy	Thu Oct 30 16:55:29 2014 +0100
     2.2 +++ b/src/HOL/HOL.thy	Thu Oct 30 22:45:19 2014 +0100
     2.3 @@ -905,7 +905,7 @@
     2.4  apply (rule ex1E [OF major])
     2.5  apply (rule prem)
     2.6  apply (tactic {* ares_tac @{thms allI} 1 *})+
     2.7 -apply (tactic {* etac (Classical.dup_elim @{thm allE}) 1 *})
     2.8 +apply (tactic {* eresolve_tac [Classical.dup_elim @{thm allE}] 1 *})
     2.9  apply iprover
    2.10  done
    2.11  
    2.12 @@ -1822,7 +1822,7 @@
    2.13  proof
    2.14    assume "PROP ?ofclass"
    2.15    show "PROP ?equal"
    2.16 -    by (tactic {* ALLGOALS (rtac (Thm.unconstrainT @{thm eq_equal})) *})
    2.17 +    by (tactic {* ALLGOALS (resolve_tac [Thm.unconstrainT @{thm eq_equal}]) *})
    2.18        (fact `PROP ?ofclass`)
    2.19  next
    2.20    assume "PROP ?equal"
    2.21 @@ -1921,7 +1921,10 @@
    2.22    let
    2.23      fun eval_tac ctxt =
    2.24        let val conv = Code_Runtime.dynamic_holds_conv ctxt
    2.25 -      in CONVERSION (Conv.params_conv ~1 (K (Conv.concl_conv ~1 conv)) ctxt) THEN' rtac TrueI end
    2.26 +      in
    2.27 +        CONVERSION (Conv.params_conv ~1 (K (Conv.concl_conv ~1 conv)) ctxt) THEN'
    2.28 +        resolve_tac [TrueI]
    2.29 +      end
    2.30    in
    2.31      Scan.succeed (SIMPLE_METHOD' o eval_tac)
    2.32    end
    2.33 @@ -1932,7 +1935,7 @@
    2.34      SIMPLE_METHOD'
    2.35        (CHANGED_PROP o
    2.36          (CONVERSION (Nbe.dynamic_conv ctxt)
    2.37 -          THEN_ALL_NEW (TRY o rtac TrueI))))
    2.38 +          THEN_ALL_NEW (TRY o resolve_tac [TrueI]))))
    2.39  *} "solve goal by normalization"
    2.40  
    2.41  
    2.42 @@ -1979,7 +1982,7 @@
    2.43      val filter_right = filter (not o wrong_prem o HOLogic.dest_Trueprop o hd o Thm.prems_of);
    2.44    in
    2.45      fun smp i = funpow i (fn m => filter_right ([spec] RL m)) ([mp]);
    2.46 -    fun smp_tac j = EVERY'[dresolve_tac (smp j), atac];
    2.47 +    fun smp_tac j = EVERY'[dresolve_tac (smp j), assume_tac];
    2.48    end;
    2.49  
    2.50    local
     3.1 --- a/src/HOL/Product_Type.thy	Thu Oct 30 16:55:29 2014 +0100
     3.2 +++ b/src/HOL/Product_Type.thy	Thu Oct 30 22:45:19 2014 +0100
     3.3 @@ -1324,9 +1324,10 @@
     3.4                        SOME (Goal.prove ctxt [] []
     3.5                          (Const (@{const_name Pure.eq}, T --> T --> propT) $ S $ S')
     3.6                          (K (EVERY
     3.7 -                          [rtac eq_reflection 1, rtac @{thm subset_antisym} 1,
     3.8 -                           rtac subsetI 1, dtac CollectD 1, simp,
     3.9 -                           rtac subsetI 1, rtac CollectI 1, simp])))
    3.10 +                          [resolve_tac [eq_reflection] 1,
    3.11 +                           resolve_tac @{thms subset_antisym} 1,
    3.12 +                           resolve_tac [subsetI] 1, dresolve_tac [CollectD] 1, simp,
    3.13 +                           resolve_tac [subsetI] 1, resolve_tac [CollectI] 1, simp])))
    3.14                      end
    3.15                    else NONE)
    3.16            | _ => NONE)
     4.1 --- a/src/HOL/Set.thy	Thu Oct 30 16:55:29 2014 +0100
     4.2 +++ b/src/HOL/Set.thy	Thu Oct 30 22:45:19 2014 +0100
     4.3 @@ -71,10 +71,11 @@
     4.4  simproc_setup defined_Collect ("{x. P x & Q x}") = {*
     4.5    fn _ => Quantifier1.rearrange_Collect
     4.6      (fn _ =>
     4.7 -      rtac @{thm Collect_cong} 1 THEN
     4.8 -      rtac @{thm iffI} 1 THEN
     4.9 +      resolve_tac @{thms Collect_cong} 1 THEN
    4.10 +      resolve_tac @{thms iffI} 1 THEN
    4.11        ALLGOALS
    4.12 -        (EVERY' [REPEAT_DETERM o etac @{thm conjE}, DEPTH_SOLVE_1 o ares_tac @{thms conjI}]))
    4.13 +        (EVERY' [REPEAT_DETERM o eresolve_tac @{thms conjE},
    4.14 +          DEPTH_SOLVE_1 o ares_tac @{thms conjI}]))
    4.15  *}
    4.16  
    4.17  lemmas CollectE = CollectD [elim_format]
    4.18 @@ -382,7 +383,7 @@
    4.19  
    4.20  setup {*
    4.21    map_theory_claset (fn ctxt =>
    4.22 -    ctxt addbefore ("bspec", fn _ => dtac @{thm bspec} THEN' assume_tac))
    4.23 +    ctxt addbefore ("bspec", fn _ => dresolve_tac @{thms bspec} THEN' assume_tac))
    4.24  *}
    4.25  
    4.26  ML {*
     5.1 --- a/src/HOL/Tools/Function/function_lib.ML	Thu Oct 30 16:55:29 2014 +0100
     5.2 +++ b/src/HOL/Tools/Function/function_lib.ML	Thu Oct 30 22:45:19 2014 +0100
     5.3 @@ -113,7 +113,7 @@
     5.4              then mk (foldr1 mk (map (nth xs) is), Const (neu, ty))
     5.5              else mk (foldr1 mk (map (nth xs) is), foldr1 mk (map (nth xs) js)))))
     5.6       (K (rewrite_goals_tac ctxt ac
     5.7 -         THEN rtac Drule.reflexive_thm 1))
     5.8 +         THEN resolve_tac [Drule.reflexive_thm] 1))
     5.9   end
    5.10  
    5.11  (* instance for unions *)
     6.1 --- a/src/HOL/Tools/Function/partial_function.ML	Thu Oct 30 16:55:29 2014 +0100
     6.2 +++ b/src/HOL/Tools/Function/partial_function.ML	Thu Oct 30 22:45:19 2014 +0100
     6.3 @@ -90,7 +90,7 @@
     6.4                if Term.is_open arg then no_tac
     6.5                else ((DETERM o strip_cases o Induct.cases_tac ctxt false [[SOME arg]] NONE [])
     6.6                  THEN_ALL_NEW (rewrite_with_asm_tac ctxt 0)
     6.7 -                THEN_ALL_NEW etac @{thm thin_rl}
     6.8 +                THEN_ALL_NEW eresolve_tac @{thms thin_rl}
     6.9                  THEN_ALL_NEW (CONVERSION
    6.10                    (params_conv ~1 (fn ctxt' =>
    6.11                      arg_conv (arg_conv (abs_conv (K conv) ctxt'))) ctxt))) i
    6.12 @@ -290,7 +290,7 @@
    6.13      val rec_rule = let open Conv in
    6.14        Goal.prove lthy' (map (fst o dest_Free) args) [] eqn (fn _ =>
    6.15          CONVERSION ((arg_conv o arg1_conv o head_conv o rewr_conv) (mk_meta_eq unfold)) 1
    6.16 -        THEN rtac @{thm refl} 1) end;
    6.17 +        THEN resolve_tac @{thms refl} 1) end;
    6.18    in
    6.19      lthy'
    6.20      |> Local_Theory.note (eq_abinding, [rec_rule])
     7.1 --- a/src/HOL/Tools/Meson/meson.ML	Thu Oct 30 16:55:29 2014 +0100
     7.2 +++ b/src/HOL/Tools/Meson/meson.ML	Thu Oct 30 22:45:19 2014 +0100
     7.3 @@ -167,19 +167,19 @@
     7.4            (rename_bound_vars_RS th rl handle THM _ => tryall rls)
     7.5    in  tryall rls  end;
     7.6  
     7.7 -(* Special version of "rtac" that works around an explosion in the unifier.
     7.8 +(* Special version of "resolve_tac" that works around an explosion in the unifier.
     7.9     If the goal has the form "?P c", the danger is that resolving it against a
    7.10     property of the form "... c ... c ... c ..." will lead to a huge unification
    7.11     problem, due to the (spurious) choices between projection and imitation. The
    7.12     workaround is to instantiate "?P := (%c. ... c ... c ... c ...)" manually. *)
    7.13 -fun quant_rtac th i st =
    7.14 +fun quant_resolve_tac th i st =
    7.15    case (concl_of st, prop_of th) of
    7.16      (@{const Trueprop} $ (Var _ $ (c as Free _)), @{const Trueprop} $ _) =>
    7.17      let
    7.18        val cc = cterm_of (theory_of_thm th) c
    7.19        val ct = Thm.dest_arg (cprop_of th)
    7.20 -    in rtac th i (Drule.instantiate' [] [SOME (Thm.lambda cc ct)] st) end
    7.21 -  | _ => rtac th i st
    7.22 +    in resolve_tac [th] i (Drule.instantiate' [] [SOME (Thm.lambda cc ct)] st) end
    7.23 +  | _ => resolve_tac [th] i st
    7.24  
    7.25  (*Permits forward proof from rules that discharge assumptions. The supplied proof state st,
    7.26    e.g. from conj_forward, should have the form
    7.27 @@ -187,7 +187,7 @@
    7.28    and the effect should be to instantiate ?P and ?Q with normalized versions of P' and Q'.*)
    7.29  fun forward_res ctxt nf st =
    7.30    let
    7.31 -    fun tacf [prem] = quant_rtac (nf prem) 1
    7.32 +    fun tacf [prem] = quant_resolve_tac (nf prem) 1
    7.33        | tacf prems =
    7.34          error (cat_lines
    7.35            ("Bad proof state in forward_res, please inform lcp@cl.cam.ac.uk:" ::
    7.36 @@ -288,7 +288,7 @@
    7.37  fun forward_res2 nf hyps st =
    7.38    case Seq.pull
    7.39          (REPEAT
    7.40 -         (Misc_Legacy.METAHYPS (fn major::minors => rtac (nf (minors@hyps) major) 1) 1)
    7.41 +         (Misc_Legacy.METAHYPS (fn major::minors => resolve_tac [nf (minors @ hyps) major] 1) 1)
    7.42           st)
    7.43    of SOME(th,_) => th
    7.44     | NONE => raise THM("forward_res2", 0, [st]);
    7.45 @@ -700,14 +700,14 @@
    7.46  fun gocls cls = name_thms "Goal#" (map make_goal (neg_clauses cls));
    7.47  
    7.48  fun skolemize_prems_tac ctxt prems =
    7.49 -  cut_facts_tac (maps (try_skolemize_etc ctxt) prems) THEN' REPEAT o etac exE
    7.50 +  cut_facts_tac (maps (try_skolemize_etc ctxt) prems) THEN' REPEAT o eresolve_tac [exE]
    7.51  
    7.52  (*Basis of all meson-tactics.  Supplies cltac with clauses: HOL disjunctions.
    7.53    Function mkcl converts theorems to clauses.*)
    7.54  fun MESON preskolem_tac mkcl cltac ctxt i st =
    7.55    SELECT_GOAL
    7.56      (EVERY [Object_Logic.atomize_prems_tac ctxt 1,
    7.57 -            rtac @{thm ccontr} 1,
    7.58 +            resolve_tac @{thms ccontr} 1,
    7.59              preskolem_tac,
    7.60              Subgoal.FOCUS (fn {context = ctxt', prems = negs, ...} =>
    7.61                        EVERY1 [skolemize_prems_tac ctxt negs,
     8.1 --- a/src/HOL/Tools/Meson/meson_clausify.ML	Thu Oct 30 16:55:29 2014 +0100
     8.2 +++ b/src/HOL/Tools/Meson/meson_clausify.ML	Thu Oct 30 22:45:19 2014 +0100
     8.3 @@ -208,8 +208,8 @@
     8.4        |> Drule.beta_conv cabs |> Thm.apply cTrueprop
     8.5      fun tacf [prem] =
     8.6        rewrite_goals_tac ctxt @{thms skolem_def [abs_def]}
     8.7 -      THEN rtac ((prem |> rewrite_rule ctxt @{thms skolem_def [abs_def]})
     8.8 -                 RS Global_Theory.get_thm thy "Hilbert_Choice.someI_ex") 1
     8.9 +      THEN resolve_tac [(prem |> rewrite_rule ctxt @{thms skolem_def [abs_def]})
    8.10 +                 RS Global_Theory.get_thm thy "Hilbert_Choice.someI_ex"] 1
    8.11    in
    8.12      Goal.prove_internal ctxt [ex_tm] conc tacf
    8.13      |> forall_intr_list frees
     9.1 --- a/src/HOL/Tools/Metis/metis_reconstruct.ML	Thu Oct 30 16:55:29 2014 +0100
     9.2 +++ b/src/HOL/Tools/Metis/metis_reconstruct.ML	Thu Oct 30 22:45:19 2014 +0100
     9.3 @@ -531,7 +531,7 @@
     9.4      if forall (curry (op =) 1) ns then all_tac else copy_prems_tac (rev ns) [] i
     9.5    | copy_prems_tac (1 :: ms) ns i = rotate_tac 1 i THEN copy_prems_tac ms (1 :: ns) i
     9.6    | copy_prems_tac (m :: ms) ns i =
     9.7 -    etac copy_prem i THEN copy_prems_tac ms (m div 2 :: (m + 1) div 2 :: ns) i
     9.8 +    eresolve_tac [copy_prem] i THEN copy_prems_tac ms (m div 2 :: (m + 1) div 2 :: ns) i
     9.9  
    9.10  (* Metis generates variables of the form _nnn. *)
    9.11  val is_metis_fresh_variable = String.isPrefix "_"
    9.12 @@ -578,10 +578,10 @@
    9.13          end
    9.14        | _ => raise Fail "expected a single non-zapped, non-Metis Var")
    9.15    in
    9.16 -    (DETERM (etac @{thm allE} i THEN rotate_tac ~1 i) THEN PRIMITIVE do_instantiate) st
    9.17 +    (DETERM (eresolve_tac @{thms allE} i THEN rotate_tac ~1 i) THEN PRIMITIVE do_instantiate) st
    9.18    end
    9.19  
    9.20 -fun fix_exists_tac t = etac exE THEN' rename_tac [t |> dest_Var |> fst |> fst]
    9.21 +fun fix_exists_tac t = eresolve_tac [exE] THEN' rename_tac [t |> dest_Var |> fst |> fst]
    9.22  
    9.23  fun release_quantifier_tac thy (skolem, t) =
    9.24    (if skolem then fix_exists_tac else instantiate_forall_tac thy) t
    9.25 @@ -730,7 +730,8 @@
    9.26                         cat_lines (map string_of_subst_info substs))
    9.27  *)
    9.28  
    9.29 -      fun cut_and_ex_tac axiom = cut_tac axiom 1 THEN TRY (REPEAT_ALL_NEW (etac @{thm exE}) 1)
    9.30 +      fun cut_and_ex_tac axiom =
    9.31 +        cut_tac axiom 1 THEN TRY (REPEAT_ALL_NEW (eresolve_tac @{thms exE}) 1)
    9.32        fun rotation_of_subgoal i =
    9.33          find_index (fn (_, (subgoal_no, _)) => subgoal_no = i) substs
    9.34  
    9.35 @@ -742,7 +743,7 @@
    9.36                THEN copy_prems_tac (map snd ax_counts) [] 1)
    9.37              THEN release_clusters_tac thy ax_counts substs ordered_clusters 1
    9.38              THEN match_tac [prems_imp_false] 1
    9.39 -            THEN ALLGOALS (fn i => rtac @{thm Meson.skolem_COMBK_I} i
    9.40 +            THEN ALLGOALS (fn i => resolve_tac @{thms Meson.skolem_COMBK_I} i
    9.41                THEN rotate_tac (rotation_of_subgoal i) i
    9.42                THEN PRIMITIVE (unify_first_prem_with_concl thy i)
    9.43                THEN assume_tac i
    10.1 --- a/src/HOL/Tools/Metis/metis_tactic.ML	Thu Oct 30 16:55:29 2014 +0100
    10.2 +++ b/src/HOL/Tools/Metis/metis_tactic.ML	Thu Oct 30 22:45:19 2014 +0100
    10.3 @@ -61,7 +61,7 @@
    10.4  fun lam_lifted_of_metis ctxt type_enc sym_tab concealed mth =
    10.5    let
    10.6      val thy = Proof_Context.theory_of ctxt
    10.7 -    val tac = rewrite_goals_tac ctxt @{thms lambda_def [abs_def]} THEN rtac refl 1
    10.8 +    val tac = rewrite_goals_tac ctxt @{thms lambda_def [abs_def]} THEN resolve_tac [refl] 1
    10.9      val t = hol_clause_of_metis ctxt type_enc sym_tab concealed mth
   10.10      val ct = cterm_of thy (HOLogic.mk_Trueprop t)
   10.11    in Goal.prove_internal ctxt [] ct (K tac) |> Meson.make_meta_clause end
   10.12 @@ -102,7 +102,7 @@
   10.13           so that "Thm.equal_elim" works below. *)
   10.14        val t0 $ _ $ t2 = prop_of eq_th
   10.15        val eq_ct = t0 $ prop_of th $ t2 |> cterm_of thy
   10.16 -      val eq_th' = Goal.prove_internal ctxt [] eq_ct (K (rtac eq_th 1))
   10.17 +      val eq_th' = Goal.prove_internal ctxt [] eq_ct (K (resolve_tac [eq_th] 1))
   10.18      in Thm.equal_elim eq_th' th end
   10.19  
   10.20  fun clause_params ordering =
    11.1 --- a/src/HOL/Tools/Old_Datatype/old_datatype_aux.ML	Thu Oct 30 16:55:29 2014 +0100
    11.2 +++ b/src/HOL/Tools/Old_Datatype/old_datatype_aux.ML	Thu Oct 30 22:45:19 2014 +0100
    11.3 @@ -150,7 +150,7 @@
    11.4            NONE => NONE
    11.5          | SOME u' => SOME (t |> getP |> snd |> head_of |> cert, cert u'))) (ts ~~ ts');
    11.6      val indrule' = cterm_instantiate insts indrule;
    11.7 -  in rtac indrule' i end);
    11.8 +  in resolve_tac [indrule'] i end);
    11.9  
   11.10  
   11.11  (* perform exhaustive case analysis on last parameter of subgoal i *)
    12.1 --- a/src/HOL/Tools/Old_Datatype/old_primrec.ML	Thu Oct 30 16:55:29 2014 +0100
    12.2 +++ b/src/HOL/Tools/Old_Datatype/old_primrec.ML	Thu Oct 30 22:45:19 2014 +0100
    12.3 @@ -247,7 +247,8 @@
    12.4          val rewrites = rec_rewrites' @ map (snd o snd) defs;
    12.5        in
    12.6          map (fn eq => Goal.prove ctxt frees [] eq
    12.7 -          (fn {context = ctxt', ...} => EVERY [rewrite_goals_tac ctxt' rewrites, rtac refl 1])) eqs
    12.8 +          (fn {context = ctxt', ...} =>
    12.9 +            EVERY [rewrite_goals_tac ctxt' rewrites, resolve_tac [refl] 1])) eqs
   12.10        end;
   12.11    in ((prefix, (fs, defs)), prove) end
   12.12    handle PrimrecError (msg, some_eqn) =>
    13.1 --- a/src/HOL/Tools/Old_Datatype/old_rep_datatype.ML	Thu Oct 30 16:55:29 2014 +0100
    13.2 +++ b/src/HOL/Tools/Old_Datatype/old_rep_datatype.ML	Thu Oct 30 22:45:19 2014 +0100
    13.3 @@ -57,10 +57,10 @@
    13.4            (Logic.strip_imp_concl t)
    13.5            (fn {prems, ...} =>
    13.6              EVERY
    13.7 -              [rtac induct' 1,
    13.8 -               REPEAT (rtac TrueI 1),
    13.9 -               REPEAT ((rtac impI 1) THEN (eresolve_tac prems 1)),
   13.10 -               REPEAT (rtac TrueI 1)])
   13.11 +              [resolve_tac [induct'] 1,
   13.12 +               REPEAT (resolve_tac [TrueI] 1),
   13.13 +               REPEAT ((resolve_tac [impI] 1) THEN (eresolve_tac prems 1)),
   13.14 +               REPEAT (resolve_tac [TrueI] 1)])
   13.15        end;
   13.16  
   13.17      val casedist_thms =
   13.18 @@ -176,16 +176,16 @@
   13.19            in
   13.20              (EVERY
   13.21                [DETERM tac,
   13.22 -                REPEAT (etac @{thm ex1E} 1), rtac @{thm ex1I} 1,
   13.23 +                REPEAT (eresolve_tac @{thms ex1E} 1), resolve_tac @{thms ex1I} 1,
   13.24                  DEPTH_SOLVE_1 (ares_tac [intr] 1),
   13.25 -                REPEAT_DETERM_N k (etac thin_rl 1 THEN rotate_tac 1 1),
   13.26 -                etac elim 1,
   13.27 +                REPEAT_DETERM_N k (eresolve_tac [thin_rl] 1 THEN rotate_tac 1 1),
   13.28 +                eresolve_tac [elim] 1,
   13.29                  REPEAT_DETERM_N j distinct_tac,
   13.30                  TRY (dresolve_tac inject 1),
   13.31 -                REPEAT (etac conjE 1), hyp_subst_tac ctxt 1,
   13.32 -                REPEAT (EVERY [etac allE 1, dtac mp 1, atac 1]),
   13.33 +                REPEAT (eresolve_tac [conjE] 1), hyp_subst_tac ctxt 1,
   13.34 +                REPEAT (EVERY [eresolve_tac [allE] 1, dresolve_tac [mp] 1, assume_tac 1]),
   13.35                  TRY (hyp_subst_tac ctxt 1),
   13.36 -                rtac refl 1,
   13.37 +                resolve_tac [refl] 1,
   13.38                  REPEAT_DETERM_N (n - j - 1) distinct_tac],
   13.39                intrs, j + 1)
   13.40            end;
   13.41 @@ -211,7 +211,7 @@
   13.42            (HOLogic.mk_Trueprop (Old_Datatype_Aux.mk_conj rec_unique_ts))
   13.43            (fn {context = ctxt, ...} =>
   13.44              #1 (fold (mk_unique_tac ctxt) (descr' ~~ rec_elims ~~ recTs ~~ rec_result_Ts)
   13.45 -              (((rtac induct' THEN_ALL_NEW Object_Logic.atomize_prems_tac ctxt) 1 THEN
   13.46 +              (((resolve_tac [induct'] THEN_ALL_NEW Object_Logic.atomize_prems_tac ctxt) 1 THEN
   13.47                    rewrite_goals_tac ctxt [mk_meta_eq @{thm choice_eq}], rec_intrs)))))
   13.48        end;
   13.49  
   13.50 @@ -254,10 +254,10 @@
   13.51          Goal.prove_sorry_global thy2 [] [] t
   13.52            (fn {context = ctxt, ...} => EVERY
   13.53              [rewrite_goals_tac ctxt reccomb_defs,
   13.54 -             rtac @{thm the1_equality} 1,
   13.55 +             resolve_tac @{thms the1_equality} 1,
   13.56               resolve_tac rec_unique_thms 1,
   13.57               resolve_tac rec_intrs 1,
   13.58 -             REPEAT (rtac allI 1 ORELSE resolve_tac rec_total_thms 1)]))
   13.59 +             REPEAT (resolve_tac [allI] 1 ORELSE resolve_tac rec_total_thms 1)]))
   13.60         (Old_Datatype_Prop.make_primrecs reccomb_names descr thy2);
   13.61    in
   13.62      thy2
   13.63 @@ -338,7 +338,8 @@
   13.64  
   13.65      fun prove_case t =
   13.66        Goal.prove_sorry_global thy2 [] [] t (fn {context = ctxt, ...} =>
   13.67 -        EVERY [rewrite_goals_tac ctxt (case_defs @ map mk_meta_eq primrec_thms), rtac refl 1]);
   13.68 +        EVERY [rewrite_goals_tac ctxt (case_defs @ map mk_meta_eq primrec_thms),
   13.69 +          resolve_tac [refl] 1]);
   13.70  
   13.71      fun prove_cases (Type (Tcon, _)) ts =
   13.72        (case Ctr_Sugar.ctr_sugar_of ctxt Tcon of
   13.73 @@ -379,7 +380,7 @@
   13.74          val _ $ (_ $ lhs $ _) = hd (Logic.strip_assums_hyp (hd (prems_of exhaustion)));
   13.75          val exhaustion' = cterm_instantiate [(cert lhs, cert (Free ("x", T)))] exhaustion;
   13.76          fun tac ctxt =
   13.77 -          EVERY [rtac exhaustion' 1,
   13.78 +          EVERY [resolve_tac [exhaustion'] 1,
   13.79              ALLGOALS (asm_simp_tac
   13.80                (put_simpset HOL_ss ctxt addsimps (dist_rewrites' @ inject @ case_thms')))];
   13.81        in
   13.82 @@ -405,7 +406,7 @@
   13.83    let
   13.84      fun prove_case_cong_weak t =
   13.85       Goal.prove_sorry_global thy [] (Logic.strip_imp_prems t) (Logic.strip_imp_concl t)
   13.86 -       (fn {prems, ...} => EVERY [rtac (hd prems RS arg_cong) 1]);
   13.87 +       (fn {prems, ...} => EVERY [resolve_tac [hd prems RS arg_cong] 1]);
   13.88  
   13.89      val case_cong_weaks =
   13.90        map prove_case_cong_weak (Old_Datatype_Prop.make_case_cong_weaks case_names descr thy);
   13.91 @@ -423,12 +424,13 @@
   13.92        let
   13.93          (* For goal i, select the correct disjunct to attack, then prove it *)
   13.94          fun tac ctxt i 0 =
   13.95 -              EVERY [TRY (rtac disjI1 i), hyp_subst_tac ctxt i, REPEAT (rtac exI i), rtac refl i]
   13.96 -          | tac ctxt i n = rtac disjI2 i THEN tac ctxt i (n - 1);
   13.97 +              EVERY [TRY (resolve_tac [disjI1] i), hyp_subst_tac ctxt i,
   13.98 +                REPEAT (resolve_tac [exI] i), resolve_tac [refl] i]
   13.99 +          | tac ctxt i n = resolve_tac [disjI2] i THEN tac ctxt i (n - 1);
  13.100        in
  13.101          Goal.prove_sorry_global thy [] [] t
  13.102            (fn {context = ctxt, ...} =>
  13.103 -            EVERY [rtac allI 1,
  13.104 +            EVERY [resolve_tac [allI] 1,
  13.105               Old_Datatype_Aux.exh_tac (K exhaustion) 1,
  13.106               ALLGOALS (fn i => tac ctxt i (i - 1))])
  13.107        end;
  13.108 @@ -457,8 +459,8 @@
  13.109                EVERY [
  13.110                  simp_tac (put_simpset HOL_ss ctxt addsimps [hd prems]) 1,
  13.111                  cut_tac nchotomy'' 1,
  13.112 -                REPEAT (etac disjE 1 THEN REPEAT (etac exE 1) THEN simplify 1),
  13.113 -                REPEAT (etac exE 1) THEN simplify 1 (* Get last disjunct *)]
  13.114 +                REPEAT (eresolve_tac [disjE] 1 THEN REPEAT (eresolve_tac [exE] 1) THEN simplify 1),
  13.115 +                REPEAT (eresolve_tac [exE] 1) THEN simplify 1 (* Get last disjunct *)]
  13.116              end)
  13.117        end;
  13.118  
    14.1 --- a/src/HOL/Tools/cnf.ML	Thu Oct 30 16:55:29 2014 +0100
    14.2 +++ b/src/HOL/Tools/cnf.ML	Thu Oct 30 22:45:19 2014 +0100
    14.3 @@ -141,7 +141,7 @@
    14.4        if i > nprems_of thm then
    14.5          thm
    14.6        else
    14.7 -        not_disj_to_prem (i+1) (Seq.hd (REPEAT_DETERM (rtac clause2raw_not_disj i) thm))
    14.8 +        not_disj_to_prem (i+1) (Seq.hd (REPEAT_DETERM (resolve_tac [clause2raw_not_disj] i) thm))
    14.9      (* moves all premises to hyps, i.e. "[...] |- A1 ==> ... ==> An ==> B" *)
   14.10      (* becomes "[..., A1, ..., An] |- B"                                   *)
   14.11      (* Thm.thm -> Thm.thm *)
   14.12 @@ -154,7 +154,7 @@
   14.13      (* [...] |- ~x1 ==> ... ==> ~xn ==> False *)
   14.14      |> not_disj_to_prem 1
   14.15      (* [...] |- x1' ==> ... ==> xn' ==> False *)
   14.16 -    |> Seq.hd o TRYALL (rtac clause2raw_not_not)
   14.17 +    |> Seq.hd o TRYALL (resolve_tac [clause2raw_not_not])
   14.18      (* [..., x1', ..., xn'] |- False *)
   14.19      |> prems_to_hyps
   14.20    end;
   14.21 @@ -529,7 +529,7 @@
   14.22  (* ------------------------------------------------------------------------- *)
   14.23  
   14.24  fun weakening_tac i =
   14.25 -  dtac weakening_thm i THEN atac (i+1);
   14.26 +  dresolve_tac [weakening_thm] i THEN assume_tac (i+1);
   14.27  
   14.28  (* ------------------------------------------------------------------------- *)
   14.29  (* cnf_rewrite_tac: converts all premises of the 'i'-th subgoal to CNF       *)
    15.1 --- a/src/HOL/Tools/coinduction.ML	Thu Oct 30 16:55:29 2014 +0100
    15.2 +++ b/src/HOL/Tools/coinduction.ML	Thu Oct 30 22:45:19 2014 +0100
    15.3 @@ -37,7 +37,7 @@
    15.4    let
    15.5      val n = nth (prems_of st) (i - 1) |> Logic.strip_assums_hyp |> length;
    15.6    in
    15.7 -    (THEN_ALL_NEW_SKIP skip tac (REPEAT_DETERM_N n o etac thin_rl)) i st
    15.8 +    (THEN_ALL_NEW_SKIP skip tac (REPEAT_DETERM_N n o eresolve_tac [thin_rl])) i st
    15.9    end;
   15.10  
   15.11  fun coinduction_tac ctxt raw_vars opt_raw_thm prems = HEADGOAL (SUBGOAL_CASES (fn (goal, _, _) =>
   15.12 @@ -87,13 +87,15 @@
   15.13            val e = length eqs;
   15.14            val p = length prems;
   15.15          in
   15.16 -          HEADGOAL (EVERY' [rtac thm,
   15.17 +          HEADGOAL (EVERY' [resolve_tac [thm],
   15.18              EVERY' (map (fn var =>
   15.19 -              rtac (cterm_instantiate_pos [NONE, SOME (certify ctxt var)] exI)) vars),
   15.20 -            if p = 0 then CONJ_WRAP' (K (rtac refl)) eqs
   15.21 -            else REPEAT_DETERM_N e o (rtac conjI THEN' rtac refl) THEN' CONJ_WRAP' rtac prems,
   15.22 +              resolve_tac [cterm_instantiate_pos [NONE, SOME (certify ctxt var)] exI]) vars),
   15.23 +            if p = 0 then CONJ_WRAP' (K (resolve_tac [refl])) eqs
   15.24 +            else
   15.25 +              REPEAT_DETERM_N e o (resolve_tac [conjI] THEN' resolve_tac [refl]) THEN'
   15.26 +              CONJ_WRAP' (resolve_tac o single) prems,
   15.27              K (ALLGOALS_SKIP skip
   15.28 -               (REPEAT_DETERM_N (length vars) o (etac exE THEN' rotate_tac ~1) THEN'
   15.29 +               (REPEAT_DETERM_N (length vars) o (eresolve_tac [exE] THEN' rotate_tac ~1) THEN'
   15.30                 DELETE_PREMS_AFTER 0 (Subgoal.FOCUS (fn {prems, params, context = ctxt, ...} =>
   15.31                   (case prems of
   15.32                     [] => all_tac
    16.1 --- a/src/HOL/Tools/inductive.ML	Thu Oct 30 16:55:29 2014 +0100
    16.2 +++ b/src/HOL/Tools/inductive.ML	Thu Oct 30 22:45:19 2014 +0100
    16.3 @@ -169,8 +169,8 @@
    16.4    | mk_names a n = map (fn i => a ^ string_of_int i) (1 upto n);
    16.5  
    16.6  fun select_disj 1 1 = []
    16.7 -  | select_disj _ 1 = [rtac disjI1]
    16.8 -  | select_disj n i = rtac disjI2 :: select_disj (n - 1) (i - 1);
    16.9 +  | select_disj _ 1 = [resolve_tac [disjI1]]
   16.10 +  | select_disj n i = resolve_tac [disjI2] :: select_disj (n - 1) (i - 1);
   16.11  
   16.12  
   16.13  
   16.14 @@ -378,12 +378,13 @@
   16.15      [] []
   16.16      (HOLogic.mk_Trueprop
   16.17        (Const (@{const_name Orderings.mono}, (predT --> predT) --> HOLogic.boolT) $ fp_fun))
   16.18 -    (fn _ => EVERY [rtac @{thm monoI} 1,
   16.19 +    (fn _ => EVERY [resolve_tac @{thms monoI} 1,
   16.20        REPEAT (resolve_tac [@{thm le_funI}, @{thm le_boolI'}] 1),
   16.21        REPEAT (FIRST
   16.22 -        [atac 1,
   16.23 +        [assume_tac 1,
   16.24           resolve_tac (map (mk_mono ctxt) monos @ get_monos ctxt) 1,
   16.25 -         etac @{thm le_funE} 1, dtac @{thm le_boolD} 1])]));
   16.26 +         eresolve_tac @{thms le_funE} 1,
   16.27 +         dresolve_tac @{thms le_boolD} 1])]));
   16.28  
   16.29  
   16.30  (* prove introduction rules *)
   16.31 @@ -401,7 +402,7 @@
   16.32      val intrs = map_index (fn (i, intr) =>
   16.33        Goal.prove_sorry ctxt [] [] intr (fn _ => EVERY
   16.34         [rewrite_goals_tac ctxt rec_preds_defs,
   16.35 -        rtac (unfold RS iffD2) 1,
   16.36 +        resolve_tac [unfold RS iffD2] 1,
   16.37          EVERY1 (select_disj (length intr_ts) (i + 1)),
   16.38          (*Not ares_tac, since refl must be tried before any equality assumptions;
   16.39            backtracking may occur if the premises have extra variables!*)
   16.40 @@ -447,7 +448,7 @@
   16.41            (fn {context = ctxt4, prems} => EVERY
   16.42              [cut_tac (hd prems) 1,
   16.43               rewrite_goals_tac ctxt4 rec_preds_defs,
   16.44 -             dtac (unfold RS iffD1) 1,
   16.45 +             dresolve_tac [unfold RS iffD1] 1,
   16.46               REPEAT (FIRSTGOAL (eresolve_tac rules1)),
   16.47               REPEAT (FIRSTGOAL (eresolve_tac rules2)),
   16.48               EVERY (map (fn prem =>
   16.49 @@ -494,37 +495,39 @@
   16.50          val eq = HOLogic.mk_Trueprop (HOLogic.mk_eq (lhs, rhs));
   16.51          fun prove_intr1 (i, _) = Subgoal.FOCUS_PREMS (fn {params, prems, ...} =>
   16.52              EVERY1 (select_disj (length c_intrs) (i + 1)) THEN
   16.53 -            EVERY (replicate (length params) (rtac @{thm exI} 1)) THEN
   16.54 -            (if null prems then rtac @{thm TrueI} 1
   16.55 +            EVERY (replicate (length params) (resolve_tac @{thms exI} 1)) THEN
   16.56 +            (if null prems then resolve_tac @{thms TrueI} 1
   16.57               else
   16.58                let
   16.59                  val (prems', last_prem) = split_last prems;
   16.60                in
   16.61 -                EVERY (map (fn prem => (rtac @{thm conjI} 1 THEN rtac prem 1)) prems') THEN
   16.62 -                rtac last_prem 1
   16.63 +                EVERY (map (fn prem =>
   16.64 +                  (resolve_tac @{thms conjI} 1 THEN resolve_tac [prem] 1)) prems') THEN
   16.65 +                resolve_tac [last_prem] 1
   16.66                end)) ctxt' 1;
   16.67          fun prove_intr2 (((_, _, us, _), ts, params'), intr) =
   16.68 -          EVERY (replicate (length params') (etac @{thm exE} 1)) THEN
   16.69 -          (if null ts andalso null us then rtac intr 1
   16.70 +          EVERY (replicate (length params') (eresolve_tac @{thms exE} 1)) THEN
   16.71 +          (if null ts andalso null us then resolve_tac [intr] 1
   16.72             else
   16.73 -            EVERY (replicate (length ts + length us - 1) (etac @{thm conjE} 1)) THEN
   16.74 +            EVERY (replicate (length ts + length us - 1) (eresolve_tac @{thms conjE} 1)) THEN
   16.75              Subgoal.FOCUS_PREMS (fn {context = ctxt'', params, prems, ...} =>
   16.76                let
   16.77                  val (eqs, prems') = chop (length us) prems;
   16.78                  val rew_thms = map (fn th => th RS @{thm eq_reflection}) eqs;
   16.79                in
   16.80                  rewrite_goal_tac ctxt'' rew_thms 1 THEN
   16.81 -                rtac intr 1 THEN
   16.82 -                EVERY (map (fn p => rtac p 1) prems')
   16.83 +                resolve_tac [intr] 1 THEN
   16.84 +                EVERY (map (fn p => resolve_tac [p] 1) prems')
   16.85                end) ctxt' 1);
   16.86        in
   16.87          Goal.prove_sorry ctxt' [] [] eq (fn _ =>
   16.88 -          rtac @{thm iffI} 1 THEN etac (#1 elim) 1 THEN
   16.89 +          resolve_tac @{thms iffI} 1 THEN
   16.90 +          eresolve_tac [#1 elim] 1 THEN
   16.91            EVERY (map_index prove_intr1 c_intrs) THEN
   16.92 -          (if null c_intrs then etac @{thm FalseE} 1
   16.93 +          (if null c_intrs then eresolve_tac @{thms FalseE} 1
   16.94             else
   16.95              let val (c_intrs', last_c_intr) = split_last c_intrs in
   16.96 -              EVERY (map (fn ci => etac @{thm disjE} 1 THEN prove_intr2 ci) c_intrs') THEN
   16.97 +              EVERY (map (fn ci => eresolve_tac @{thms disjE} 1 THEN prove_intr2 ci) c_intrs') THEN
   16.98                prove_intr2 last_c_intr
   16.99              end))
  16.100          |> rulify ctxt'
  16.101 @@ -729,16 +732,16 @@
  16.102      val induct = Goal.prove_sorry ctxt'' [] ind_prems ind_concl
  16.103        (fn {context = ctxt3, prems} => EVERY
  16.104          [rewrite_goals_tac ctxt3 [inductive_conj_def],
  16.105 -         DETERM (rtac raw_fp_induct 1),
  16.106 +         DETERM (resolve_tac [raw_fp_induct] 1),
  16.107           REPEAT (resolve_tac [@{thm le_funI}, @{thm le_boolI}] 1),
  16.108           rewrite_goals_tac ctxt3 simp_thms2,
  16.109           (*This disjE separates out the introduction rules*)
  16.110           REPEAT (FIRSTGOAL (eresolve_tac [disjE, exE, FalseE])),
  16.111           (*Now break down the individual cases.  No disjE here in case
  16.112             some premise involves disjunction.*)
  16.113 -         REPEAT (FIRSTGOAL (etac conjE ORELSE' bound_hyp_subst_tac ctxt3)),
  16.114 +         REPEAT (FIRSTGOAL (eresolve_tac [conjE] ORELSE' bound_hyp_subst_tac ctxt3)),
  16.115           REPEAT (FIRSTGOAL
  16.116 -           (resolve_tac [conjI, impI] ORELSE' (etac notE THEN' atac))),
  16.117 +           (resolve_tac [conjI, impI] ORELSE' (eresolve_tac [notE] THEN' assume_tac))),
  16.118           EVERY (map (fn prem => DEPTH_SOLVE_1 (ares_tac [rewrite_rule ctxt3
  16.119               (inductive_conj_def :: rec_preds_defs @ simp_thms2) prem,
  16.120             conjI, refl] 1)) prems)]);
  16.121 @@ -749,9 +752,9 @@
  16.122           REPEAT (EVERY
  16.123             [REPEAT (resolve_tac [conjI, impI] 1),
  16.124              REPEAT (eresolve_tac [@{thm le_funE}, @{thm le_boolE}] 1),
  16.125 -            atac 1,
  16.126 +            assume_tac 1,
  16.127              rewrite_goals_tac ctxt3 simp_thms1,
  16.128 -            atac 1])]);
  16.129 +            assume_tac 1])]);
  16.130  
  16.131    in singleton (Proof_Context.export ctxt'' ctxt''') (induct RS lemma) end;
  16.132  
    17.1 --- a/src/HOL/Tools/inductive_set.ML	Thu Oct 30 16:55:29 2014 +0100
    17.2 +++ b/src/HOL/Tools/inductive_set.ML	Thu Oct 30 22:45:19 2014 +0100
    17.3 @@ -75,11 +75,14 @@
    17.4                SOME (close (Goal.prove ctxt [] [])
    17.5                  (Logic.mk_equals (t, fold_rev Term.abs xs (m $ p $ (bop $ S $ S'))))
    17.6                  (K (EVERY
    17.7 -                  [rtac eq_reflection 1, REPEAT (rtac @{thm ext} 1), rtac iffI 1,
    17.8 -                   EVERY [etac conjE 1, rtac IntI 1, simp, simp,
    17.9 -                     etac IntE 1, rtac conjI 1, simp, simp] ORELSE
   17.10 -                   EVERY [etac disjE 1, rtac UnI1 1, simp, rtac UnI2 1, simp,
   17.11 -                     etac UnE 1, rtac disjI1 1, simp, rtac disjI2 1, simp]])))
   17.12 +                  [resolve_tac [eq_reflection] 1, REPEAT (resolve_tac @{thms ext} 1),
   17.13 +                   resolve_tac [iffI] 1,
   17.14 +                   EVERY [eresolve_tac [conjE] 1, resolve_tac [IntI] 1, simp, simp,
   17.15 +                     eresolve_tac [IntE] 1, resolve_tac [conjI] 1, simp, simp] ORELSE
   17.16 +                   EVERY [eresolve_tac [disjE] 1, resolve_tac [UnI1] 1, simp,
   17.17 +                     resolve_tac [UnI2] 1, simp,
   17.18 +                     eresolve_tac [UnE] 1, resolve_tac [disjI1] 1, simp,
   17.19 +                     resolve_tac [disjI2] 1, simp]])))
   17.20                  handle ERROR _ => NONE))
   17.21      in
   17.22        case strip_comb t of
   17.23 @@ -502,8 +505,9 @@
   17.24                 fold_rev (Term.abs o pair "x") Ts
   17.25                  (HOLogic.mk_mem (HOLogic.mk_ptuple fs U (map Bound (length fs downto 0)),
   17.26                    list_comb (c, params))))))
   17.27 -            (K (REPEAT (rtac @{thm ext} 1) THEN simp_tac (put_simpset HOL_basic_ss lthy addsimps
   17.28 -              [def, mem_Collect_eq, @{thm split_conv}]) 1))
   17.29 +            (K (REPEAT (resolve_tac @{thms ext} 1) THEN
   17.30 +              simp_tac (put_simpset HOL_basic_ss lthy addsimps
   17.31 +                [def, mem_Collect_eq, @{thm split_conv}]) 1))
   17.32          in
   17.33            lthy |> Local_Theory.note ((Binding.name (s ^ "p_" ^ s ^ "_eq"),
   17.34              [Attrib.internal (K pred_set_conv_att)]),
    18.1 --- a/src/HOL/Tools/lin_arith.ML	Thu Oct 30 16:55:29 2014 +0100
    18.2 +++ b/src/HOL/Tools/lin_arith.ML	Thu Oct 30 22:45:19 2014 +0100
    18.3 @@ -731,11 +731,11 @@
    18.4        end)
    18.5    in
    18.6      EVERY' [
    18.7 -      REPEAT_DETERM o etac rev_mp,
    18.8 +      REPEAT_DETERM o eresolve_tac [rev_mp],
    18.9        cond_split_tac,
   18.10 -      rtac @{thm ccontr},
   18.11 +      resolve_tac @{thms ccontr},
   18.12        prem_nnf_tac ctxt,
   18.13 -      TRY o REPEAT_ALL_NEW (DETERM o (eresolve_tac [conjE, exE] ORELSE' etac disjE))
   18.14 +      TRY o REPEAT_ALL_NEW (DETERM o (eresolve_tac [conjE, exE] ORELSE' eresolve_tac [disjE]))
   18.15      ]
   18.16    end;
   18.17  
   18.18 @@ -758,7 +758,7 @@
   18.19              THEN_ALL_NEW
   18.20                (CONVERSION Drule.beta_eta_conversion
   18.21                  THEN'
   18.22 -              (TRY o (etac notE THEN' eq_assume_tac)))
   18.23 +              (TRY o (eresolve_tac [notE] THEN' eq_assume_tac)))
   18.24          ) i
   18.25      )
   18.26    end;
   18.27 @@ -835,11 +835,12 @@
   18.28          REPEAT_DETERM
   18.29                (eresolve_tac [@{thm conjE}, @{thm exE}] 1 ORELSE
   18.30                 filter_prems_tac test 1 ORELSE
   18.31 -               etac @{thm disjE} 1) THEN
   18.32 -        (DETERM (etac @{thm notE} 1 THEN eq_assume_tac 1) ORELSE
   18.33 +               eresolve_tac @{thms disjE} 1) THEN
   18.34 +        (DETERM (eresolve_tac @{thms notE} 1 THEN eq_assume_tac 1) ORELSE
   18.35           ref_tac 1);
   18.36    in EVERY'[TRY o filter_prems_tac test,
   18.37 -            REPEAT_DETERM o etac @{thm rev_mp}, prep_tac, rtac @{thm ccontr}, prem_nnf_tac ctxt,
   18.38 +            REPEAT_DETERM o eresolve_tac @{thms rev_mp}, prep_tac,
   18.39 +              resolve_tac @{thms ccontr}, prem_nnf_tac ctxt,
   18.40              SELECT_GOAL (DEPTH_SOLVE refute_prems_tac)]
   18.41    end;
   18.42  
   18.43 @@ -872,7 +873,8 @@
   18.44  
   18.45  fun gen_tac ex ctxt =
   18.46    FIRST' [simple_tac ctxt,
   18.47 -    Object_Logic.full_atomize_tac ctxt THEN' (REPEAT_DETERM o rtac impI) THEN' raw_tac ctxt ex];
   18.48 +    Object_Logic.full_atomize_tac ctxt THEN'
   18.49 +    (REPEAT_DETERM o resolve_tac [impI]) THEN' raw_tac ctxt ex];
   18.50  
   18.51  val tac = gen_tac true;
   18.52  
    19.1 --- a/src/HOL/Tools/sat.ML	Thu Oct 30 16:55:29 2014 +0100
    19.2 +++ b/src/HOL/Tools/sat.ML	Thu Oct 30 22:45:19 2014 +0100
    19.3 @@ -406,7 +406,7 @@
    19.4  
    19.5  fun rawsat_tac ctxt i =
    19.6    Subgoal.FOCUS (fn {context = ctxt', prems, ...} =>
    19.7 -    rtac (rawsat_thm ctxt' (map cprop_of prems)) 1) ctxt i;
    19.8 +    resolve_tac [rawsat_thm ctxt' (map cprop_of prems)] 1) ctxt i;
    19.9  
   19.10  (* ------------------------------------------------------------------------- *)
   19.11  (* pre_cnf_tac: converts the i-th subgoal                                    *)
   19.12 @@ -421,7 +421,7 @@
   19.13  (* ------------------------------------------------------------------------- *)
   19.14  
   19.15  fun pre_cnf_tac ctxt =
   19.16 -  rtac @{thm ccontr} THEN'
   19.17 +  resolve_tac @{thms ccontr} THEN'
   19.18    Object_Logic.atomize_prems_tac ctxt THEN'
   19.19    CONVERSION Drule.beta_eta_conversion;
   19.20  
   19.21 @@ -433,7 +433,7 @@
   19.22  (* ------------------------------------------------------------------------- *)
   19.23  
   19.24  fun cnfsat_tac ctxt i =
   19.25 -  (etac FalseE i) ORELSE (REPEAT_DETERM (etac conjE i) THEN rawsat_tac ctxt i);
   19.26 +  (eresolve_tac [FalseE] i) ORELSE (REPEAT_DETERM (eresolve_tac [conjE] i) THEN rawsat_tac ctxt i);
   19.27  
   19.28  (* ------------------------------------------------------------------------- *)
   19.29  (* cnfxsat_tac: checks if the empty clause "False" occurs among the          *)
   19.30 @@ -443,8 +443,8 @@
   19.31  (* ------------------------------------------------------------------------- *)
   19.32  
   19.33  fun cnfxsat_tac ctxt i =
   19.34 -  (etac FalseE i) ORELSE
   19.35 -    (REPEAT_DETERM (etac conjE i ORELSE etac exE i) THEN rawsat_tac ctxt i);
   19.36 +  (eresolve_tac [FalseE] i) ORELSE
   19.37 +    (REPEAT_DETERM (eresolve_tac [conjE] i ORELSE eresolve_tac [exE] i) THEN rawsat_tac ctxt i);
   19.38  
   19.39  (* ------------------------------------------------------------------------- *)
   19.40  (* sat_tac: tactic for calling an external SAT solver, taking as input an    *)
    20.1 --- a/src/HOL/Tools/set_comprehension_pointfree.ML	Thu Oct 30 16:55:29 2014 +0100
    20.2 +++ b/src/HOL/Tools/set_comprehension_pointfree.ML	Thu Oct 30 22:45:19 2014 +0100
    20.3 @@ -314,95 +314,96 @@
    20.4  val collectI' = @{lemma "\<not> P a ==> a \<notin> {x. P x}" by auto}
    20.5  val collectE' = @{lemma "a \<notin> {x. P x} ==> (\<not> P a ==> Q) ==> Q" by auto}
    20.6  
    20.7 -fun elim_Collect_tac ctxt = dtac @{thm iffD1[OF mem_Collect_eq]}
    20.8 +fun elim_Collect_tac ctxt = dresolve_tac @{thms iffD1 [OF mem_Collect_eq]}
    20.9    THEN' (REPEAT_DETERM o (eresolve_tac @{thms exE}))
   20.10 -  THEN' REPEAT_DETERM o etac @{thm conjE}
   20.11 +  THEN' REPEAT_DETERM o eresolve_tac @{thms conjE}
   20.12    THEN' TRY o hyp_subst_tac ctxt;
   20.13  
   20.14 -fun intro_image_tac ctxt = rtac @{thm image_eqI}
   20.15 +fun intro_image_tac ctxt = resolve_tac @{thms image_eqI}
   20.16      THEN' (REPEAT_DETERM1 o
   20.17 -      (rtac @{thm refl}
   20.18 -      ORELSE' rtac
   20.19 -        @{thm arg_cong2[OF refl, where f="op =", OF prod.case, THEN iffD2]}
   20.20 +      (resolve_tac @{thms refl}
   20.21 +      ORELSE' resolve_tac @{thms arg_cong2 [OF refl, where f = "op =", OF prod.case, THEN iffD2]}
   20.22        ORELSE' CONVERSION (Conv.params_conv ~1 (K (Conv.concl_conv ~1
   20.23          (HOLogic.Trueprop_conv
   20.24            (HOLogic.eq_conv Conv.all_conv (Conv.rewr_conv (mk_meta_eq case_prod_distrib)))))) ctxt)))
   20.25  
   20.26 -fun elim_image_tac ctxt = etac @{thm imageE}
   20.27 +fun elim_image_tac ctxt = eresolve_tac @{thms imageE}
   20.28    THEN' REPEAT_DETERM o CHANGED o
   20.29      (TRY o full_simp_tac (put_simpset HOL_basic_ss ctxt addsimps @{thms split_paired_all prod.case})
   20.30 -    THEN' REPEAT_DETERM o etac @{thm Pair_inject}
   20.31 +    THEN' REPEAT_DETERM o eresolve_tac @{thms Pair_inject}
   20.32      THEN' TRY o hyp_subst_tac ctxt)
   20.33  
   20.34  fun tac1_of_formula ctxt (Int (fm1, fm2)) =
   20.35 -    TRY o etac @{thm conjE}
   20.36 -    THEN' rtac @{thm IntI}
   20.37 +    TRY o eresolve_tac @{thms conjE}
   20.38 +    THEN' resolve_tac @{thms IntI}
   20.39      THEN' (fn i => tac1_of_formula ctxt fm2 (i + 1))
   20.40      THEN' tac1_of_formula ctxt fm1
   20.41    | tac1_of_formula ctxt (Un (fm1, fm2)) =
   20.42 -    etac @{thm disjE} THEN' rtac @{thm UnI1}
   20.43 +    eresolve_tac @{thms disjE} THEN' resolve_tac @{thms UnI1}
   20.44      THEN' tac1_of_formula ctxt fm1
   20.45 -    THEN' rtac @{thm UnI2}
   20.46 +    THEN' resolve_tac @{thms UnI2}
   20.47      THEN' tac1_of_formula ctxt fm2
   20.48    | tac1_of_formula ctxt (Atom _) =
   20.49 -    REPEAT_DETERM1 o (atac
   20.50 -      ORELSE' rtac @{thm SigmaI}
   20.51 -      ORELSE' ((rtac @{thm CollectI} ORELSE' rtac collectI') THEN'
   20.52 +    REPEAT_DETERM1 o (assume_tac
   20.53 +      ORELSE' resolve_tac @{thms SigmaI}
   20.54 +      ORELSE' ((resolve_tac @{thms CollectI} ORELSE' resolve_tac [collectI']) THEN'
   20.55          TRY o simp_tac (put_simpset HOL_basic_ss ctxt addsimps [@{thm prod.case}]))
   20.56 -      ORELSE' ((rtac @{thm vimageI2} ORELSE' rtac vimageI2') THEN'
   20.57 +      ORELSE' ((resolve_tac @{thms vimageI2} ORELSE' resolve_tac [vimageI2']) THEN'
   20.58          TRY o simp_tac (put_simpset HOL_basic_ss ctxt addsimps [@{thm prod.case}]))
   20.59 -      ORELSE' (rtac @{thm image_eqI} THEN'
   20.60 +      ORELSE' (resolve_tac @{thms image_eqI} THEN'
   20.61      (REPEAT_DETERM o
   20.62 -      (rtac @{thm refl}
   20.63 -      ORELSE' rtac @{thm arg_cong2[OF refl, where f="op =", OF prod.case, THEN iffD2]})))
   20.64 -      ORELSE' rtac @{thm UNIV_I}
   20.65 -      ORELSE' rtac @{thm iffD2[OF Compl_iff]}
   20.66 -      ORELSE' atac)
   20.67 +      (resolve_tac @{thms refl}
   20.68 +      ORELSE' resolve_tac @{thms arg_cong2[OF refl, where f = "op =", OF prod.case, THEN iffD2]})))
   20.69 +      ORELSE' resolve_tac @{thms UNIV_I}
   20.70 +      ORELSE' resolve_tac @{thms iffD2[OF Compl_iff]}
   20.71 +      ORELSE' assume_tac)
   20.72  
   20.73  fun tac2_of_formula ctxt (Int (fm1, fm2)) =
   20.74 -    TRY o etac @{thm IntE}
   20.75 -    THEN' TRY o rtac @{thm conjI}
   20.76 +    TRY o eresolve_tac @{thms IntE}
   20.77 +    THEN' TRY o resolve_tac @{thms conjI}
   20.78      THEN' (fn i => tac2_of_formula ctxt fm2 (i + 1))
   20.79      THEN' tac2_of_formula ctxt fm1
   20.80    | tac2_of_formula ctxt (Un (fm1, fm2)) =
   20.81 -    etac @{thm UnE} THEN' rtac @{thm disjI1}
   20.82 +    eresolve_tac @{thms UnE} THEN' resolve_tac @{thms disjI1}
   20.83      THEN' tac2_of_formula ctxt fm1
   20.84 -    THEN' rtac @{thm disjI2}
   20.85 +    THEN' resolve_tac @{thms disjI2}
   20.86      THEN' tac2_of_formula ctxt fm2
   20.87    | tac2_of_formula ctxt (Atom _) =
   20.88      REPEAT_DETERM o
   20.89 -      (atac
   20.90 -       ORELSE' dtac @{thm iffD1[OF mem_Sigma_iff]}
   20.91 -       ORELSE' etac @{thm conjE}
   20.92 -       ORELSE' ((etac @{thm CollectE} ORELSE' etac collectE') THEN'
   20.93 +      (assume_tac
   20.94 +       ORELSE' dresolve_tac @{thms iffD1[OF mem_Sigma_iff]}
   20.95 +       ORELSE' eresolve_tac @{thms conjE}
   20.96 +       ORELSE' ((eresolve_tac @{thms CollectE} ORELSE' eresolve_tac [collectE']) THEN'
   20.97           TRY o full_simp_tac (put_simpset HOL_basic_ss ctxt addsimps [@{thm prod.case}]) THEN'
   20.98 -         REPEAT_DETERM o etac @{thm Pair_inject} THEN' TRY o hyp_subst_tac ctxt THEN' TRY o rtac @{thm refl})
   20.99 -       ORELSE' (etac @{thm imageE}
  20.100 +         REPEAT_DETERM o eresolve_tac @{thms Pair_inject} THEN' TRY o hyp_subst_tac ctxt THEN'
  20.101 +         TRY o resolve_tac @{thms refl})
  20.102 +       ORELSE' (eresolve_tac @{thms imageE}
  20.103           THEN' (REPEAT_DETERM o CHANGED o
  20.104           (TRY o full_simp_tac (put_simpset HOL_basic_ss ctxt addsimps @{thms split_paired_all prod.case})
  20.105 -         THEN' REPEAT_DETERM o etac @{thm Pair_inject}
  20.106 -         THEN' TRY o hyp_subst_tac ctxt THEN' TRY o rtac @{thm refl})))
  20.107 -       ORELSE' etac @{thm ComplE}
  20.108 -       ORELSE' ((etac @{thm vimageE} ORELSE' etac vimageE')
  20.109 +         THEN' REPEAT_DETERM o eresolve_tac @{thms Pair_inject}
  20.110 +         THEN' TRY o hyp_subst_tac ctxt THEN' TRY o resolve_tac @{thms refl})))
  20.111 +       ORELSE' eresolve_tac @{thms ComplE}
  20.112 +       ORELSE' ((eresolve_tac @{thms vimageE} ORELSE' eresolve_tac [vimageE'])
  20.113          THEN' TRY o full_simp_tac (put_simpset HOL_basic_ss ctxt addsimps [@{thm prod.case}])
  20.114 -        THEN' TRY o hyp_subst_tac ctxt THEN' TRY o rtac @{thm refl}))
  20.115 +        THEN' TRY o hyp_subst_tac ctxt THEN' TRY o resolve_tac @{thms refl}))
  20.116  
  20.117  fun tac ctxt fm =
  20.118    let
  20.119 -    val subset_tac1 = rtac @{thm subsetI}
  20.120 +    val subset_tac1 = resolve_tac @{thms subsetI}
  20.121        THEN' elim_Collect_tac ctxt
  20.122        THEN' intro_image_tac ctxt
  20.123        THEN' tac1_of_formula ctxt fm
  20.124 -    val subset_tac2 = rtac @{thm subsetI}
  20.125 +    val subset_tac2 = resolve_tac @{thms subsetI}
  20.126        THEN' elim_image_tac ctxt
  20.127 -      THEN' rtac @{thm iffD2[OF mem_Collect_eq]}
  20.128 +      THEN' resolve_tac @{thms iffD2[OF mem_Collect_eq]}
  20.129        THEN' REPEAT_DETERM o resolve_tac @{thms exI}
  20.130 -      THEN' (TRY o REPEAT_ALL_NEW (rtac @{thm conjI}))
  20.131 -      THEN' (K (TRY (FIRSTGOAL ((TRY o hyp_subst_tac ctxt) THEN' rtac @{thm refl}))))
  20.132 +      THEN' (TRY o REPEAT_ALL_NEW (resolve_tac @{thms conjI}))
  20.133 +      THEN' (K (TRY (FIRSTGOAL ((TRY o hyp_subst_tac ctxt) THEN' resolve_tac @{thms refl}))))
  20.134        THEN' (fn i => EVERY (rev (map_index (fn (j, f) =>
  20.135 -        REPEAT_DETERM (etac @{thm IntE} (i + j)) THEN tac2_of_formula ctxt f (i + j)) (strip_Int fm))))
  20.136 +        REPEAT_DETERM (eresolve_tac @{thms IntE} (i + j)) THEN
  20.137 +        tac2_of_formula ctxt f (i + j)) (strip_Int fm))))
  20.138    in
  20.139 -    rtac @{thm subset_antisym} THEN' subset_tac1 THEN' subset_tac2
  20.140 +    resolve_tac @{thms subset_antisym} THEN' subset_tac1 THEN' subset_tac2
  20.141    end;
  20.142  
  20.143  
  20.144 @@ -429,18 +430,18 @@
  20.145      fun is_eq th = is_some (try (HOLogic.dest_eq o HOLogic.dest_Trueprop) (prop_of th))
  20.146      val unfold_thms = @{thms split_paired_all mem_Collect_eq prod.case}
  20.147      fun tac ctxt = 
  20.148 -      rtac @{thm set_eqI}
  20.149 +      resolve_tac @{thms set_eqI}
  20.150        THEN' simp_tac (put_simpset HOL_basic_ss ctxt addsimps unfold_thms)
  20.151 -      THEN' rtac @{thm iffI}
  20.152 -      THEN' REPEAT_DETERM o rtac @{thm exI}
  20.153 -      THEN' rtac @{thm conjI} THEN' rtac @{thm refl} THEN' atac
  20.154 -      THEN' REPEAT_DETERM o etac @{thm exE}
  20.155 -      THEN' etac @{thm conjE}
  20.156 -      THEN' REPEAT_DETERM o etac @{thm Pair_inject}
  20.157 +      THEN' resolve_tac @{thms iffI}
  20.158 +      THEN' REPEAT_DETERM o resolve_tac @{thms exI}
  20.159 +      THEN' resolve_tac @{thms conjI} THEN' resolve_tac @{thms refl} THEN' assume_tac
  20.160 +      THEN' REPEAT_DETERM o eresolve_tac @{thms exE}
  20.161 +      THEN' eresolve_tac @{thms conjE}
  20.162 +      THEN' REPEAT_DETERM o eresolve_tac @{thms Pair_inject}
  20.163        THEN' Subgoal.FOCUS (fn {prems, ...} =>
  20.164          (* FIXME inner context!? *)
  20.165          simp_tac (put_simpset HOL_basic_ss ctxt addsimps (filter is_eq prems)) 1) ctxt
  20.166 -      THEN' TRY o atac
  20.167 +      THEN' TRY o assume_tac
  20.168    in
  20.169      case try mk_term (term_of ct) of
  20.170        NONE => Thm.reflexive ct
    21.1 --- a/src/HOL/Tools/simpdata.ML	Thu Oct 30 16:55:29 2014 +0100
    21.2 +++ b/src/HOL/Tools/simpdata.ML	Thu Oct 30 22:45:19 2014 +0100
    21.3 @@ -81,7 +81,7 @@
    21.4  (*Congruence rules for = (instead of ==)*)
    21.5  fun mk_meta_cong (_: Proof.context) rl = zero_var_indexes
    21.6    (let val rl' = Seq.hd (TRYALL (fn i => fn st =>
    21.7 -     rtac (lift_meta_eq_to_obj_eq i st) i st) rl)
    21.8 +     resolve_tac [lift_meta_eq_to_obj_eq i st] i st) rl)
    21.9     in mk_meta_eq rl' handle THM _ =>
   21.10       if can Logic.dest_equals (concl_of rl') then rl'
   21.11       else error "Conclusion of congruence rules must be =-equality"
   21.12 @@ -119,7 +119,7 @@
   21.13      val sol_thms =
   21.14        reflexive_thm :: @{thm TrueI} :: @{thm refl} :: Simplifier.prems_of ctxt;
   21.15      fun sol_tac i =
   21.16 -      FIRST [resolve_tac sol_thms i, atac i , etac @{thm FalseE} i] ORELSE
   21.17 +      FIRST [resolve_tac sol_thms i, assume_tac i , eresolve_tac @{thms FalseE} i] ORELSE
   21.18        (match_tac intros THEN_ALL_NEW sol_tac) i
   21.19    in
   21.20      (fn i => REPEAT_DETERM (match_tac @{thms simp_impliesI} i)) THEN' sol_tac
    22.1 --- a/src/Provers/Arith/fast_lin_arith.ML	Thu Oct 30 16:55:29 2014 +0100
    22.2 +++ b/src/Provers/Arith/fast_lin_arith.ML	Thu Oct 30 22:45:19 2014 +0100
    22.3 @@ -815,7 +815,7 @@
    22.4            all_tac) THEN
    22.5            PRIMITIVE (trace_thm ctxt ["State after neqE:"]) THEN
    22.6            (* use theorems generated from the actual justifications *)
    22.7 -          Subgoal.FOCUS (fn {prems, ...} => rtac (mkthm ctxt prems j) 1) ctxt i
    22.8 +          Subgoal.FOCUS (fn {prems, ...} => resolve_tac [mkthm ctxt prems j] 1) ctxt i
    22.9      in
   22.10        (* rewrite "[| A1; ...; An |] ==> B" to "[| A1; ...; An; ~B |] ==> False" *)
   22.11        DETERM (resolve_tac [LA_Logic.notI, LA_Logic.ccontr] i) THEN
    23.1 --- a/src/Provers/order.ML	Thu Oct 30 16:55:29 2014 +0100
    23.2 +++ b/src/Provers/order.ML	Thu Oct 30 22:45:19 2014 +0100
    23.3 @@ -1243,10 +1243,10 @@
    23.4    in
    23.5     Subgoal.FOCUS (fn {prems = asms, ...} =>
    23.6       let val thms = map (prove (prems @ asms)) prfs
    23.7 -     in rtac (prove thms prf) 1 end) ctxt n st
    23.8 +     in resolve_tac [prove thms prf] 1 end) ctxt n st
    23.9    end
   23.10    handle Contr p =>
   23.11 -      (Subgoal.FOCUS (fn {prems = asms, ...} => rtac (prove asms p) 1) ctxt n st
   23.12 +      (Subgoal.FOCUS (fn {prems = asms, ...} => resolve_tac [prove asms p] 1) ctxt n st
   23.13          handle General.Subscript => Seq.empty)
   23.14     | Cannot => Seq.empty
   23.15     | General.Subscript => Seq.empty)
    24.1 --- a/src/Provers/quasi.ML	Thu Oct 30 16:55:29 2014 +0100
    24.2 +++ b/src/Provers/quasi.ML	Thu Oct 30 22:45:19 2014 +0100
    24.3 @@ -565,9 +565,9 @@
    24.4   in
    24.5    Subgoal.FOCUS (fn {prems, ...} =>
    24.6      let val thms = map (prove prems) prfs
    24.7 -    in rtac (prove thms prf) 1 end) ctxt n st
    24.8 +    in resolve_tac [prove thms prf] 1 end) ctxt n st
    24.9   end
   24.10 - handle Contr p => Subgoal.FOCUS (fn {prems, ...} => rtac (prove prems p) 1) ctxt n st
   24.11 + handle Contr p => Subgoal.FOCUS (fn {prems, ...} => resolve_tac [prove prems p] 1) ctxt n st
   24.12    | Cannot  => Seq.empty);
   24.13  
   24.14  
   24.15 @@ -585,10 +585,10 @@
   24.16   in
   24.17    Subgoal.FOCUS (fn {prems, ...} =>
   24.18      let val thms = map (prove prems) prfs
   24.19 -    in rtac (prove thms prf) 1 end) ctxt n st
   24.20 +    in resolve_tac [prove thms prf] 1 end) ctxt n st
   24.21   end
   24.22   handle Contr p =>
   24.23 -    (Subgoal.FOCUS (fn {prems, ...} => rtac (prove prems p) 1) ctxt n st
   24.24 +    (Subgoal.FOCUS (fn {prems, ...} => resolve_tac [prove prems p] 1) ctxt n st
   24.25        handle General.Subscript => Seq.empty)
   24.26    | Cannot => Seq.empty
   24.27    | General.Subscript => Seq.empty);
    25.1 --- a/src/Provers/trancl.ML	Thu Oct 30 16:55:29 2014 +0100
    25.2 +++ b/src/Provers/trancl.ML	Thu Oct 30 22:45:19 2014 +0100
    25.3 @@ -545,7 +545,7 @@
    25.4      let
    25.5        val SOME (_, _, rel', _) = decomp (term_of concl);
    25.6        val thms = map (prove thy rel' prems) prfs
    25.7 -    in rtac (prove thy rel' thms prf) 1 end) ctxt n st
    25.8 +    in resolve_tac [prove thy rel' thms prf] 1 end) ctxt n st
    25.9   end
   25.10   handle Cannot => Seq.empty);
   25.11  
   25.12 @@ -564,7 +564,7 @@
   25.13      let
   25.14        val SOME (_, _, rel', _) = decomp (term_of concl);
   25.15        val thms = map (prove thy rel' prems) prfs
   25.16 -    in rtac (prove thy rel' thms prf) 1 end) ctxt n st
   25.17 +    in resolve_tac [prove thy rel' thms prf] 1 end) ctxt n st
   25.18   end
   25.19   handle Cannot => Seq.empty | General.Subscript => Seq.empty);
   25.20  
    26.1 --- a/src/Tools/coherent.ML	Thu Oct 30 16:55:29 2014 +0100
    26.2 +++ b/src/Tools/coherent.ML	Thu Oct 30 22:45:19 2014 +0100
    26.3 @@ -215,7 +215,7 @@
    26.4  (** external interface **)
    26.5  
    26.6  fun coherent_tac ctxt rules = SUBPROOF (fn {prems, concl, params, context = ctxt', ...} =>
    26.7 -  rtac (rulify_elim_conv ctxt' concl RS Drule.equal_elim_rule2) 1 THEN
    26.8 +  resolve_tac [rulify_elim_conv ctxt' concl RS Drule.equal_elim_rule2] 1 THEN
    26.9    SUBPROOF (fn {prems = prems', concl, context = ctxt'', ...} =>
   26.10      let
   26.11        val xs =
   26.12 @@ -227,7 +227,7 @@
   26.13          valid ctxt'' (map (mk_rule ctxt'') (prems' @ prems @ rules)) (term_of concl)
   26.14            (mk_dom xs) Net.empty 0 0 of
   26.15          NONE => no_tac
   26.16 -      | SOME prf => rtac (thm_of_cl_prf ctxt'' concl [] prf) 1)
   26.17 +      | SOME prf => resolve_tac [thm_of_cl_prf ctxt'' concl [] prf] 1)
   26.18      end) ctxt' 1) ctxt;
   26.19  
   26.20  val _ = Theory.setup