src/HOL/simpdata.ML
author paulson
Thu Feb 28 17:46:46 2002 +0100 (2002-02-28)
changeset 12975 d796a2fd6c69
parent 12725 7ede865e1fe5
child 13462 56610e2ba220
permissions -rw-r--r--
fixing nat_combine_numerals simprocs (again)

Theorem eq_cong2 moved from Integ/int_arith1.ML to simpdata.ML, where it will
be available in all theories.

Function simplify_meta_eq now makes the meta-equality first so that eq_cong2
will work properly.
clasohm@1465
     1
(*  Title:      HOL/simpdata.ML
clasohm@923
     2
    ID:         $Id$
clasohm@1465
     3
    Author:     Tobias Nipkow
clasohm@923
     4
    Copyright   1991  University of Cambridge
clasohm@923
     5
oheimb@5304
     6
Instantiation of the generic simplifier for HOL.
clasohm@923
     7
*)
clasohm@923
     8
wenzelm@12281
     9
(* legacy ML bindings *)
paulson@3904
    10
wenzelm@12281
    11
val Eq_FalseI = thm "Eq_FalseI";
wenzelm@12281
    12
val Eq_TrueI = thm "Eq_TrueI";
wenzelm@12281
    13
val all_conj_distrib = thm "all_conj_distrib";
wenzelm@12281
    14
val all_simps = thms "all_simps";
wenzelm@12281
    15
val cases_simp = thm "cases_simp";
wenzelm@12281
    16
val conj_assoc = thm "conj_assoc";
wenzelm@12281
    17
val conj_comms = thms "conj_comms";
wenzelm@12281
    18
val conj_commute = thm "conj_commute";
wenzelm@12281
    19
val conj_cong = thm "conj_cong";
wenzelm@12281
    20
val conj_disj_distribL = thm "conj_disj_distribL";
wenzelm@12281
    21
val conj_disj_distribR = thm "conj_disj_distribR";
wenzelm@12281
    22
val conj_left_commute = thm "conj_left_commute";
wenzelm@12281
    23
val de_Morgan_conj = thm "de_Morgan_conj";
wenzelm@12281
    24
val de_Morgan_disj = thm "de_Morgan_disj";
wenzelm@12281
    25
val disj_assoc = thm "disj_assoc";
wenzelm@12281
    26
val disj_comms = thms "disj_comms";
wenzelm@12281
    27
val disj_commute = thm "disj_commute";
wenzelm@12281
    28
val disj_cong = thm "disj_cong";
wenzelm@12281
    29
val disj_conj_distribL = thm "disj_conj_distribL";
wenzelm@12281
    30
val disj_conj_distribR = thm "disj_conj_distribR";
wenzelm@12281
    31
val disj_left_commute = thm "disj_left_commute";
wenzelm@12281
    32
val disj_not1 = thm "disj_not1";
wenzelm@12281
    33
val disj_not2 = thm "disj_not2";
wenzelm@12281
    34
val eq_ac = thms "eq_ac";
wenzelm@12281
    35
val eq_assoc = thm "eq_assoc";
wenzelm@12281
    36
val eq_commute = thm "eq_commute";
wenzelm@12281
    37
val eq_left_commute = thm "eq_left_commute";
wenzelm@12281
    38
val eq_sym_conv = thm "eq_sym_conv";
wenzelm@12281
    39
val eta_contract_eq = thm "eta_contract_eq";
wenzelm@12281
    40
val ex_disj_distrib = thm "ex_disj_distrib";
wenzelm@12281
    41
val ex_simps = thms "ex_simps";
wenzelm@12281
    42
val if_False = thm "if_False";
wenzelm@12281
    43
val if_P = thm "if_P";
wenzelm@12281
    44
val if_True = thm "if_True";
wenzelm@12281
    45
val if_bool_eq_conj = thm "if_bool_eq_conj";
wenzelm@12281
    46
val if_bool_eq_disj = thm "if_bool_eq_disj";
wenzelm@12281
    47
val if_cancel = thm "if_cancel";
wenzelm@12281
    48
val if_def2 = thm "if_def2";
wenzelm@12281
    49
val if_eq_cancel = thm "if_eq_cancel";
wenzelm@12281
    50
val if_not_P = thm "if_not_P";
wenzelm@12281
    51
val if_splits = thms "if_splits";
wenzelm@12281
    52
val iff_conv_conj_imp = thm "iff_conv_conj_imp";
wenzelm@12281
    53
val imp_all = thm "imp_all";
wenzelm@12281
    54
val imp_cong = thm "imp_cong";
wenzelm@12281
    55
val imp_conjL = thm "imp_conjL";
wenzelm@12281
    56
val imp_conjR = thm "imp_conjR";
wenzelm@12281
    57
val imp_conv_disj = thm "imp_conv_disj";
wenzelm@12281
    58
val imp_disj1 = thm "imp_disj1";
wenzelm@12281
    59
val imp_disj2 = thm "imp_disj2";
wenzelm@12281
    60
val imp_disjL = thm "imp_disjL";
wenzelm@12281
    61
val imp_disj_not1 = thm "imp_disj_not1";
wenzelm@12281
    62
val imp_disj_not2 = thm "imp_disj_not2";
wenzelm@12281
    63
val imp_ex = thm "imp_ex";
wenzelm@12281
    64
val meta_eq_to_obj_eq = thm "meta_eq_to_obj_eq";
wenzelm@12281
    65
val neq_commute = thm "neq_commute";
wenzelm@12281
    66
val not_all = thm "not_all";
wenzelm@12281
    67
val not_ex = thm "not_ex";
wenzelm@12281
    68
val not_iff = thm "not_iff";
wenzelm@12281
    69
val not_imp = thm "not_imp";
wenzelm@12281
    70
val not_not = thm "not_not";
wenzelm@12281
    71
val rev_conj_cong = thm "rev_conj_cong";
wenzelm@12281
    72
val simp_thms = thms "simp_thms";
wenzelm@12281
    73
val split_if = thm "split_if";
wenzelm@12281
    74
val split_if_asm = thm "split_if_asm";
paulson@5278
    75
nipkow@2134
    76
nipkow@11232
    77
local
nipkow@11232
    78
val uncurry = prove_goal (the_context()) "P --> Q --> R ==> P & Q --> R"
nipkow@11232
    79
              (fn prems => [cut_facts_tac prems 1, Blast_tac 1]);
nipkow@11232
    80
nipkow@11232
    81
val iff_allI = allI RS
nipkow@11232
    82
    prove_goal (the_context()) "!x. P x = Q x ==> (!x. P x) = (!x. Q x)"
nipkow@11232
    83
               (fn prems => [cut_facts_tac prems 1, Blast_tac 1])
nipkow@12524
    84
val iff_exI = allI RS
nipkow@12524
    85
    prove_goal (the_context()) "!x. P x = Q x ==> (? x. P x) = (? x. Q x)"
nipkow@12524
    86
               (fn prems => [cut_facts_tac prems 1, Blast_tac 1])
nipkow@12524
    87
nipkow@12524
    88
val all_comm = prove_goal (the_context()) "(!x y. P x y) = (!y x. P x y)"
nipkow@12524
    89
               (fn _ => [Blast_tac 1])
nipkow@12524
    90
val ex_comm = prove_goal (the_context()) "(? x y. P x y) = (? y x. P x y)"
nipkow@12524
    91
               (fn _ => [Blast_tac 1])
nipkow@11232
    92
in
paulson@4351
    93
paulson@4351
    94
(*** make simplification procedures for quantifier elimination ***)
paulson@4351
    95
wenzelm@9851
    96
structure Quantifier1 = Quantifier1Fun
wenzelm@9851
    97
(struct
paulson@4351
    98
  (*abstract syntax*)
paulson@4351
    99
  fun dest_eq((c as Const("op =",_)) $ s $ t) = Some(c,s,t)
paulson@4351
   100
    | dest_eq _ = None;
paulson@4351
   101
  fun dest_conj((c as Const("op &",_)) $ s $ t) = Some(c,s,t)
paulson@4351
   102
    | dest_conj _ = None;
nipkow@11232
   103
  fun dest_imp((c as Const("op -->",_)) $ s $ t) = Some(c,s,t)
nipkow@11232
   104
    | dest_imp _ = None;
paulson@4351
   105
  val conj = HOLogic.conj
paulson@4351
   106
  val imp  = HOLogic.imp
paulson@4351
   107
  (*rules*)
paulson@4351
   108
  val iff_reflection = eq_reflection
paulson@4351
   109
  val iffI = iffI
nipkow@12524
   110
  val iff_trans = trans
paulson@4351
   111
  val conjI= conjI
paulson@4351
   112
  val conjE= conjE
paulson@4351
   113
  val impI = impI
paulson@4351
   114
  val mp   = mp
nipkow@11232
   115
  val uncurry = uncurry
paulson@4351
   116
  val exI  = exI
paulson@4351
   117
  val exE  = exE
nipkow@11232
   118
  val iff_allI = iff_allI
nipkow@12524
   119
  val iff_exI = iff_exI
nipkow@12524
   120
  val all_comm = all_comm
nipkow@12524
   121
  val ex_comm = ex_comm
paulson@4351
   122
end);
paulson@4351
   123
nipkow@11232
   124
end;
nipkow@11232
   125
nipkow@4320
   126
local
nipkow@11220
   127
val ex_pattern = Thm.read_cterm (Theory.sign_of (the_context ()))
nipkow@12524
   128
    ("EX x. P(x)",HOLogic.boolT)
nipkow@11220
   129
val all_pattern = Thm.read_cterm (Theory.sign_of (the_context ()))
nipkow@12524
   130
    ("ALL x. P(x)",HOLogic.boolT)
nipkow@4320
   131
in
nipkow@11220
   132
val defEX_regroup = mk_simproc "defined EX" [ex_pattern]
nipkow@11220
   133
      Quantifier1.rearrange_ex
nipkow@11220
   134
val defALL_regroup = mk_simproc "defined ALL" [all_pattern]
nipkow@11220
   135
      Quantifier1.rearrange_all
nipkow@4320
   136
end;
paulson@3913
   137
paulson@4351
   138
paulson@4351
   139
(*** Case splitting ***)
paulson@3913
   140
wenzelm@12278
   141
(*Make meta-equalities.  The operator below is Trueprop*)
wenzelm@12278
   142
wenzelm@12278
   143
fun mk_meta_eq r = r RS eq_reflection;
wenzelm@12278
   144
fun safe_mk_meta_eq r = mk_meta_eq r handle Thm.THM _ => r;
wenzelm@12278
   145
wenzelm@12278
   146
fun mk_eq th = case concl_of th of
wenzelm@12278
   147
        Const("==",_)$_$_       => th
wenzelm@12278
   148
    |   _$(Const("op =",_)$_$_) => mk_meta_eq th
wenzelm@12278
   149
    |   _$(Const("Not",_)$_)    => th RS Eq_FalseI
wenzelm@12278
   150
    |   _                       => th RS Eq_TrueI;
wenzelm@12278
   151
(* last 2 lines requires all formulae to be of the from Trueprop(.) *)
wenzelm@12278
   152
wenzelm@12278
   153
fun mk_eq_True r =
wenzelm@12278
   154
  Some (r RS meta_eq_to_obj_eq RS Eq_TrueI) handle Thm.THM _ => None;
wenzelm@12278
   155
wenzelm@12278
   156
(*Congruence rules for = (instead of ==)*)
wenzelm@12278
   157
fun mk_meta_cong rl =
wenzelm@12278
   158
  standard(mk_meta_eq(replicate (nprems_of rl) meta_eq_to_obj_eq MRS rl))
wenzelm@12278
   159
  handle THM _ =>
wenzelm@12278
   160
  error("Premises and conclusion of congruence rules must be =-equalities");
wenzelm@12278
   161
wenzelm@12278
   162
(* Elimination of True from asumptions: *)
wenzelm@12278
   163
wenzelm@12278
   164
local fun rd s = read_cterm (sign_of (the_context())) (s, propT);
wenzelm@12278
   165
in val True_implies_equals = standard' (equal_intr
wenzelm@12278
   166
  (implies_intr_hyps (implies_elim (assume (rd "True ==> PROP P")) TrueI))
wenzelm@12278
   167
  (implies_intr_hyps (implies_intr (rd "True") (assume (rd "PROP P")))));
wenzelm@12278
   168
end;
wenzelm@12278
   169
wenzelm@12278
   170
oheimb@5304
   171
structure SplitterData =
oheimb@5304
   172
  struct
oheimb@5304
   173
  structure Simplifier = Simplifier
oheimb@5552
   174
  val mk_eq          = mk_eq
oheimb@5304
   175
  val meta_eq_to_iff = meta_eq_to_obj_eq
oheimb@5304
   176
  val iffD           = iffD2
oheimb@5304
   177
  val disjE          = disjE
oheimb@5304
   178
  val conjE          = conjE
oheimb@5304
   179
  val exE            = exE
paulson@10231
   180
  val contrapos      = contrapos_nn
paulson@10231
   181
  val contrapos2     = contrapos_pp
oheimb@5304
   182
  val notnotD        = notnotD
oheimb@5304
   183
  end;
nipkow@4681
   184
oheimb@5304
   185
structure Splitter = SplitterFun(SplitterData);
oheimb@2263
   186
oheimb@5304
   187
val split_tac        = Splitter.split_tac;
oheimb@5304
   188
val split_inside_tac = Splitter.split_inside_tac;
oheimb@5304
   189
val split_asm_tac    = Splitter.split_asm_tac;
oheimb@5307
   190
val op addsplits     = Splitter.addsplits;
oheimb@5307
   191
val op delsplits     = Splitter.delsplits;
oheimb@5304
   192
val Addsplits        = Splitter.Addsplits;
oheimb@5304
   193
val Delsplits        = Splitter.Delsplits;
oheimb@4718
   194
nipkow@2134
   195
(*In general it seems wrong to add distributive laws by default: they
nipkow@2134
   196
  might cause exponential blow-up.  But imp_disjL has been in for a while
wenzelm@9713
   197
  and cannot be removed without affecting existing proofs.  Moreover,
nipkow@2134
   198
  rewriting by "(P|Q --> R) = ((P-->R)&(Q-->R))" might be justified on the
nipkow@2134
   199
  grounds that it allows simplification of R in the two cases.*)
nipkow@2134
   200
nipkow@2134
   201
val mksimps_pairs =
nipkow@2134
   202
  [("op -->", [mp]), ("op &", [conjunct1,conjunct2]),
nipkow@2134
   203
   ("All", [spec]), ("True", []), ("False", []),
paulson@4769
   204
   ("If", [if_bool_eq_conj RS iffD1])];
nipkow@1758
   205
oheimb@5552
   206
(* ###FIXME: move to Provers/simplifier.ML
oheimb@5304
   207
val mk_atomize:      (string * thm list) list -> thm -> thm list
oheimb@5304
   208
*)
oheimb@5552
   209
(* ###FIXME: move to Provers/simplifier.ML *)
oheimb@5304
   210
fun mk_atomize pairs =
oheimb@5304
   211
  let fun atoms th =
oheimb@5304
   212
        (case concl_of th of
oheimb@5304
   213
           Const("Trueprop",_) $ p =>
oheimb@5304
   214
             (case head_of p of
oheimb@5304
   215
                Const(a,_) =>
oheimb@5304
   216
                  (case assoc(pairs,a) of
oheimb@5304
   217
                     Some(rls) => flat (map atoms ([th] RL rls))
oheimb@5304
   218
                   | None => [th])
oheimb@5304
   219
              | _ => [th])
oheimb@5304
   220
         | _ => [th])
oheimb@5304
   221
  in atoms end;
oheimb@5304
   222
berghofe@11624
   223
fun mksimps pairs =
wenzelm@12725
   224
  (mapfilter (try mk_eq) o mk_atomize pairs o gen_all);
oheimb@5304
   225
nipkow@7570
   226
fun unsafe_solver_tac prems =
nipkow@7570
   227
  FIRST'[resolve_tac(reflexive_thm::TrueI::refl::prems), atac, etac FalseE];
nipkow@7570
   228
val unsafe_solver = mk_solver "HOL unsafe" unsafe_solver_tac;
nipkow@7570
   229
oheimb@2636
   230
(*No premature instantiation of variables during simplification*)
nipkow@7570
   231
fun safe_solver_tac prems =
nipkow@7570
   232
  FIRST'[match_tac(reflexive_thm::TrueI::refl::prems),
nipkow@7570
   233
         eq_assume_tac, ematch_tac [FalseE]];
nipkow@7570
   234
val safe_solver = mk_solver "HOL safe" safe_solver_tac;
oheimb@2443
   235
wenzelm@9713
   236
val HOL_basic_ss =
wenzelm@9713
   237
  empty_ss setsubgoaler asm_simp_tac
wenzelm@9713
   238
    setSSolver safe_solver
wenzelm@9713
   239
    setSolver unsafe_solver
wenzelm@9713
   240
    setmksimps (mksimps mksimps_pairs)
wenzelm@9713
   241
    setmkeqTrue mk_eq_True
wenzelm@9713
   242
    setmkcong mk_meta_cong;
oheimb@2443
   243
wenzelm@9713
   244
val HOL_ss =
wenzelm@9713
   245
    HOL_basic_ss addsimps
paulson@3446
   246
     ([triv_forall_equality, (* prunes params *)
nipkow@3654
   247
       True_implies_equals, (* prune asms `True' *)
oheimb@9023
   248
       eta_contract_eq, (* prunes eta-expansions *)
oheimb@4718
   249
       if_True, if_False, if_cancel, if_eq_cancel,
oheimb@5304
   250
       imp_disjL, conj_assoc, disj_assoc,
paulson@3904
   251
       de_Morgan_conj, de_Morgan_disj, imp_disj1, imp_disj2, not_imp,
paulson@11451
   252
       disj_not1, not_all, not_ex, cases_simp,
wenzelm@11434
   253
       thm "the_eq_trivial", the_sym_eq_trivial, thm "plus_ac0.zero", thm "plus_ac0_zero_right"]
paulson@3446
   254
     @ ex_simps @ all_simps @ simp_thms)
nipkow@4032
   255
     addsimprocs [defALL_regroup,defEX_regroup]
wenzelm@4744
   256
     addcongs [imp_cong]
nipkow@4830
   257
     addsplits [split_if];
paulson@2082
   258
wenzelm@11034
   259
fun hol_simplify rews = Simplifier.full_simplify (HOL_basic_ss addsimps rews);
wenzelm@11034
   260
wenzelm@11034
   261
paulson@6293
   262
(*Simplifies x assuming c and y assuming ~c*)
paulson@6293
   263
val prems = Goalw [if_def]
paulson@6293
   264
  "[| b=c; c ==> x=u; ~c ==> y=v |] ==> \
paulson@6293
   265
\  (if b then x else y) = (if c then u else v)";
paulson@6293
   266
by (asm_simp_tac (HOL_ss addsimps prems) 1);
paulson@6293
   267
qed "if_cong";
paulson@6293
   268
paulson@7127
   269
(*Prevents simplification of x and y: faster and allows the execution
paulson@7127
   270
  of functional programs. NOW THE DEFAULT.*)
paulson@7031
   271
Goal "b=c ==> (if b then x else y) = (if c then x else y)";
paulson@7031
   272
by (etac arg_cong 1);
paulson@7031
   273
qed "if_weak_cong";
paulson@6293
   274
paulson@6293
   275
(*Prevents simplification of t: much faster*)
paulson@7031
   276
Goal "a = b ==> (let x=a in t(x)) = (let x=b in t(x))";
paulson@7031
   277
by (etac arg_cong 1);
paulson@7031
   278
qed "let_weak_cong";
paulson@6293
   279
paulson@12975
   280
(*To tidy up the result of a simproc.  Only the RHS will be simplified.*)
paulson@12975
   281
Goal "u = u' ==> (t==u) == (t==u')";
paulson@12975
   282
by (asm_simp_tac HOL_ss 1);
paulson@12975
   283
qed "eq_cong2";
paulson@12975
   284
paulson@7031
   285
Goal "f(if c then x else y) = (if c then f x else f y)";
paulson@7031
   286
by (simp_tac (HOL_ss setloop (split_tac [split_if])) 1);
paulson@7031
   287
qed "if_distrib";
nipkow@1655
   288
paulson@4327
   289
(*For expand_case_tac*)
paulson@7584
   290
val prems = Goal "[| P ==> Q(True); ~P ==> Q(False) |] ==> Q(P)";
paulson@2948
   291
by (case_tac "P" 1);
paulson@2948
   292
by (ALLGOALS (asm_simp_tac (HOL_ss addsimps prems)));
paulson@7584
   293
qed "expand_case";
paulson@2948
   294
paulson@4327
   295
(*Used in Auth proofs.  Typically P contains Vars that become instantiated
paulson@4327
   296
  during unification.*)
paulson@2948
   297
fun expand_case_tac P i =
paulson@2948
   298
    res_inst_tac [("P",P)] expand_case i THEN
wenzelm@9713
   299
    Simp_tac (i+1) THEN
paulson@2948
   300
    Simp_tac i;
paulson@2948
   301
paulson@7584
   302
(*This lemma restricts the effect of the rewrite rule u=v to the left-hand
paulson@7584
   303
  side of an equality.  Used in {Integ,Real}/simproc.ML*)
paulson@7584
   304
Goal "x=y ==> (x=z) = (y=z)";
paulson@7584
   305
by (asm_simp_tac HOL_ss 1);
paulson@7584
   306
qed "restrict_to_left";
paulson@2948
   307
wenzelm@7357
   308
(* default simpset *)
wenzelm@9713
   309
val simpsetup =
wenzelm@9713
   310
  [fn thy => (simpset_ref_of thy := HOL_ss addcongs [if_weak_cong]; thy)];
berghofe@3615
   311
oheimb@4652
   312
wenzelm@5219
   313
(*** integration of simplifier with classical reasoner ***)
oheimb@2636
   314
wenzelm@5219
   315
structure Clasimp = ClasimpFun
wenzelm@8473
   316
 (structure Simplifier = Simplifier and Splitter = Splitter
wenzelm@9851
   317
  and Classical  = Classical and Blast = Blast
oheimb@11344
   318
  val iffD1 = iffD1 val iffD2 = iffD2 val notE = notE
wenzelm@9851
   319
  val cla_make_elim = cla_make_elim);
oheimb@4652
   320
open Clasimp;
oheimb@2636
   321
oheimb@2636
   322
val HOL_css = (HOL_cs, HOL_ss);
nipkow@5975
   323
nipkow@5975
   324
wenzelm@8641
   325
nipkow@5975
   326
(*** A general refutation procedure ***)
wenzelm@9713
   327
nipkow@5975
   328
(* Parameters:
nipkow@5975
   329
nipkow@5975
   330
   test: term -> bool
nipkow@5975
   331
   tests if a term is at all relevant to the refutation proof;
nipkow@5975
   332
   if not, then it can be discarded. Can improve performance,
nipkow@5975
   333
   esp. if disjunctions can be discarded (no case distinction needed!).
nipkow@5975
   334
nipkow@5975
   335
   prep_tac: int -> tactic
nipkow@5975
   336
   A preparation tactic to be applied to the goal once all relevant premises
nipkow@5975
   337
   have been moved to the conclusion.
nipkow@5975
   338
nipkow@5975
   339
   ref_tac: int -> tactic
nipkow@5975
   340
   the actual refutation tactic. Should be able to deal with goals
nipkow@5975
   341
   [| A1; ...; An |] ==> False
wenzelm@9876
   342
   where the Ai are atomic, i.e. no top-level &, | or EX
nipkow@5975
   343
*)
nipkow@5975
   344
nipkow@5975
   345
fun refute_tac test prep_tac ref_tac =
nipkow@5975
   346
  let val nnf_simps =
nipkow@5975
   347
        [imp_conv_disj,iff_conv_conj_imp,de_Morgan_disj,de_Morgan_conj,
nipkow@5975
   348
         not_all,not_ex,not_not];
nipkow@5975
   349
      val nnf_simpset =
nipkow@5975
   350
        empty_ss setmkeqTrue mk_eq_True
nipkow@5975
   351
                 setmksimps (mksimps mksimps_pairs)
nipkow@5975
   352
                 addsimps nnf_simps;
nipkow@5975
   353
      val prem_nnf_tac = full_simp_tac nnf_simpset;
nipkow@5975
   354
nipkow@5975
   355
      val refute_prems_tac =
nipkow@12475
   356
        REPEAT_DETERM
nipkow@12475
   357
              (eresolve_tac [conjE, exE] 1 ORELSE
nipkow@5975
   358
               filter_prems_tac test 1 ORELSE
paulson@6301
   359
               etac disjE 1) THEN
nipkow@11200
   360
        ((etac notE 1 THEN eq_assume_tac 1) ORELSE
nipkow@11200
   361
         ref_tac 1);
nipkow@5975
   362
  in EVERY'[TRY o filter_prems_tac test,
nipkow@12475
   363
            REPEAT_DETERM o etac rev_mp, prep_tac, rtac ccontr, prem_nnf_tac,
nipkow@5975
   364
            SELECT_GOAL (DEPTH_SOLVE refute_prems_tac)]
nipkow@5975
   365
  end;