src/Provers/simplifier.ML
author wenzelm
Fri, 10 Jan 1997 10:27:57 +0100
changeset 2503 7590fd5ce3c7
parent 1770 608050b43bee
child 2509 0a7169d89b7a
permissions -rw-r--r--
cleaned up (real changes next time);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1243
fa09705a5890 added global simpset
clasohm
parents: 983
diff changeset
     1
(*  Title:      Provers/simplifier.ML
1
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
     2
    ID:         $Id$
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
     3
    Author:     Tobias Nipkow
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
     4
    Copyright   1993  TU Munich
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
     5
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
     6
Generic simplifier, suitable for most logics.
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
     7
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
     8
TODO:
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
     9
  - stamps to identify funs / tacs
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    10
  - merge: fail if incompatible funs
1
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
    11
*)
1260
c76ac4a9dc2b renamed SS to Simpset; fixed bug in merge_ss
clasohm
parents: 1243
diff changeset
    12
1770
608050b43bee Added addsolver
nipkow
parents: 1676
diff changeset
    13
infix 4 addsimps addeqcongs addsolver delsimps
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    14
  setsolver setloop setmksimps setsubgoaler;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
signature SIMPLIFIER =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
sig
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
  type simpset
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    19
  val empty_ss: simpset
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    20
  val rep_ss: simpset -> {simps: thm list, congs: thm list}
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    21
  val prems_of_ss: simpset -> thm list
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    22
  val setloop: simpset * (int -> tactic) -> simpset
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    23
  val setsolver: simpset * (thm list -> int -> tactic) -> simpset
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    24
  val addsolver: simpset * (thm list -> int -> tactic) -> simpset
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    25
  val setsubgoaler: simpset * (simpset -> int -> tactic) -> simpset
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    26
  val setmksimps: simpset * (thm -> thm list) -> simpset
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
  val addsimps: simpset * thm list -> simpset
88
9df4dfedee01 added infix delsimps
nipkow
parents: 17
diff changeset
    28
  val delsimps: simpset * thm list -> simpset
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    29
  val addeqcongs: simpset * thm list -> simpset
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
  val merge_ss: simpset * simpset -> simpset
1243
fa09705a5890 added global simpset
clasohm
parents: 983
diff changeset
    31
  val simpset: simpset ref
fa09705a5890 added global simpset
clasohm
parents: 983
diff changeset
    32
  val Addsimps: thm list -> unit
fa09705a5890 added global simpset
clasohm
parents: 983
diff changeset
    33
  val Delsimps: thm list -> unit
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    34
  val          simp_tac: simpset -> int -> tactic
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    35
  val      asm_simp_tac: simpset -> int -> tactic
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    36
  val     full_simp_tac: simpset -> int -> tactic
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    37
  val asm_full_simp_tac: simpset -> int -> tactic
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    38
  val          Simp_tac: int -> tactic
1676
db29ab9c1490 *** empty log message ***
oheimb
parents: 1512
diff changeset
    39
  val      Asm_simp_tac: int -> tactic
db29ab9c1490 *** empty log message ***
oheimb
parents: 1512
diff changeset
    40
  val     Full_simp_tac: int -> tactic
1243
fa09705a5890 added global simpset
clasohm
parents: 983
diff changeset
    41
  val Asm_full_simp_tac: int -> tactic
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    44
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    45
structure Simplifier: SIMPLIFIER =
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
struct
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    47
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    48
(** simplification sets **)
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    49
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    50
(* type simpset *)
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    51
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
datatype simpset =
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    53
  Simpset of {
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    54
    mss: meta_simpset,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    55
    simps: thm list,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    56
    congs: thm list,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    57
    subgoal_tac: simpset -> int -> tactic,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    58
    finish_tac: thm list -> int -> tactic,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    59
    loop_tac: int -> tactic};
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    60
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    61
fun make_ss (mss, simps, congs, subgoal_tac, finish_tac, loop_tac) =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    62
  Simpset {mss = mss, simps = simps, congs = congs,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    63
    subgoal_tac = subgoal_tac, finish_tac = finish_tac,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    64
    loop_tac = loop_tac};
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    65
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    66
val empty_ss =
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    67
  make_ss (Thm.empty_mss, [], [], K (K no_tac), K (K no_tac), K no_tac);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    68
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    69
fun rep_ss (Simpset {simps, congs, ...}) = {simps = simps, congs = congs};
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    70
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    71
fun prems_of_ss (Simpset {mss, ...}) = Thm.prems_of_mss mss;
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    72
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    73
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    74
(* extend simpsets *)
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    75
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    76
fun (Simpset {mss, simps, congs, subgoal_tac, finish_tac, loop_tac = _})
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    77
    setloop loop_tac =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    78
  make_ss (mss, simps, congs, subgoal_tac, finish_tac, DETERM o loop_tac);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    79
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    80
fun (Simpset {mss, simps, congs, subgoal_tac, finish_tac = _, loop_tac})
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    81
    setsolver finish_tac =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    82
  make_ss (mss, simps, congs, subgoal_tac, finish_tac, loop_tac);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    83
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    84
fun (Simpset {mss, simps, congs, subgoal_tac, loop_tac, finish_tac})
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    85
    addsolver tac =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    86
  make_ss (mss, simps, congs, subgoal_tac,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    87
    fn hyps => finish_tac hyps ORELSE' tac hyps, loop_tac);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    88
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    89
fun (Simpset {mss, simps, congs, subgoal_tac = _, finish_tac, loop_tac})
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    90
    setsubgoaler subgoal_tac =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    91
  make_ss (mss, simps, congs, subgoal_tac, finish_tac, loop_tac);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    92
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    93
fun (Simpset {mss, simps, congs, subgoal_tac, finish_tac, loop_tac})
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    94
    setmksimps mk_simps =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    95
  make_ss (Thm.set_mk_rews (mss, mk_simps), simps, congs,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    96
    subgoal_tac, finish_tac, loop_tac);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    97
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    98
fun (Simpset {mss, simps, congs, subgoal_tac, finish_tac, loop_tac})
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
    99
    addsimps rews =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   100
  let val rews' = flat (map (Thm.mk_rews_of_mss mss) rews) in
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   101
    make_ss (Thm.add_simps (mss, rews'), rews' @ simps,
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   102
      congs, subgoal_tac, finish_tac, loop_tac)
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   103
  end;
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   104
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   105
fun (Simpset {mss, simps, congs, subgoal_tac, finish_tac, loop_tac})
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   106
    delsimps rews =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   107
  let val rews' = flat (map (Thm.mk_rews_of_mss mss) rews) in
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   108
    make_ss (Thm.del_simps (mss, rews'),
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   109
      foldl (gen_rem eq_thm) (simps, rews'),
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   110
      congs, subgoal_tac, finish_tac, loop_tac)
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   111
  end;
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   112
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   113
fun (Simpset {mss, simps, congs, subgoal_tac, finish_tac, loop_tac})
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   114
    addeqcongs newcongs =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   115
  make_ss (Thm.add_congs (mss, newcongs),
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   116
    simps, newcongs @ congs, subgoal_tac, finish_tac, loop_tac);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   117
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   118
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   119
(* merge simpsets *)
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   120
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   121
(*prefers first simpset*)
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   122
fun merge_ss (Simpset {mss, simps, congs, subgoal_tac, finish_tac, loop_tac},
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   123
    Simpset {simps = simps2, congs = congs2, ...}) =
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   124
  let
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   125
    val simps' = gen_union eq_thm (simps, simps2);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   126
    val congs' = gen_union eq_thm (congs, congs2);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   127
    val mss' = Thm.set_mk_rews (empty_mss, Thm.mk_rews_of_mss mss);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   128
    val mss' = Thm.add_simps (mss', simps');
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   129
    val mss' = Thm.add_congs (mss', congs');
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   130
  in
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   131
    make_ss (mss', simps', congs', subgoal_tac, finish_tac, loop_tac)
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   132
  end;
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   133
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   134
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   135
(* the current simpset *)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   136
1243
fa09705a5890 added global simpset
clasohm
parents: 983
diff changeset
   137
val simpset = ref empty_ss;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   138
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   139
fun Addsimps rews = (simpset := ! simpset addsimps rews);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   140
fun Delsimps rews = (simpset := ! simpset delsimps rews);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   141
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   142
1243
fa09705a5890 added global simpset
clasohm
parents: 983
diff changeset
   143
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   144
(** simplification tactics **)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   145
1
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
   146
fun NEWSUBGOALS tac tacf =
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   147
  STATE (fn state0 =>
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   148
    tac THEN STATE (fn state1 => tacf (nprems_of state1 - nprems_of state0)));
1
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
   149
217
c972c57e7762 got rid of METAHYPS due to the change of the basic simplification routines
nipkow
parents: 146
diff changeset
   150
fun gen_simp_tac mode =
1260
c76ac4a9dc2b renamed SS to Simpset; fixed bug in merge_ss
clasohm
parents: 1243
diff changeset
   151
  fn (Simpset{mss,simps,congs,subgoal_tac,finish_tac,loop_tac}) =>
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   152
  let fun solve_all_tac mss =
1260
c76ac4a9dc2b renamed SS to Simpset; fixed bug in merge_ss
clasohm
parents: 1243
diff changeset
   153
        let val ss = Simpset{mss=mss,simps=simps,congs=congs,
c76ac4a9dc2b renamed SS to Simpset; fixed bug in merge_ss
clasohm
parents: 1243
diff changeset
   154
                             subgoal_tac=subgoal_tac,
c76ac4a9dc2b renamed SS to Simpset; fixed bug in merge_ss
clasohm
parents: 1243
diff changeset
   155
                             finish_tac=finish_tac, loop_tac=loop_tac}
1
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
   156
            val solve1_tac =
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
   157
              NEWSUBGOALS (subgoal_tac ss 1)
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
   158
                          (fn n => if n<0 then all_tac else no_tac)
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
   159
        in DEPTH_SOLVE(solve1_tac) end
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   160
1512
ce37c64244c0 Elimination of fully-functorial style.
paulson
parents: 1260
diff changeset
   161
      fun simp_loop_tac i thm =
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   162
          (asm_rewrite_goal_tac mode solve_all_tac mss i THEN
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   163
           (finish_tac (prems_of_mss mss) i  ORELSE  looper i))  thm
1
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
   164
      and allsimp i n = EVERY(map (fn j => simp_loop_tac (i+j)) (n downto 0))
c6a6e3db5353 changed addcongs to addeqcongs in simplifier.ML
nipkow
parents: 0
diff changeset
   165
      and looper i = TRY(NEWSUBGOALS (loop_tac i) (allsimp i))
217
c972c57e7762 got rid of METAHYPS due to the change of the basic simplification routines
nipkow
parents: 146
diff changeset
   166
  in simp_loop_tac end;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   167
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   168
val          simp_tac = gen_simp_tac (false, false);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   169
val      asm_simp_tac = gen_simp_tac (false, true);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   170
val     full_simp_tac = gen_simp_tac (true,  false);
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   171
val asm_full_simp_tac = gen_simp_tac (true,  true);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   172
2503
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   173
fun          Simp_tac i =          simp_tac (! simpset) i;
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   174
fun      Asm_simp_tac i =      asm_simp_tac (! simpset) i;
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   175
fun     Full_simp_tac i =     full_simp_tac (! simpset) i;
7590fd5ce3c7 cleaned up (real changes next time);
wenzelm
parents: 1770
diff changeset
   176
fun Asm_full_simp_tac i = asm_full_simp_tac (! simpset) i;
406
4d4e0442b106 simpset is hidden in a functor now.
nipkow
parents: 217
diff changeset
   177
1243
fa09705a5890 added global simpset
clasohm
parents: 983
diff changeset
   178
end;