src/Provers/splitter.ML
author nipkow
Thu Jan 14 13:20:02 1999 +0100 (1999-01-14 ago)
changeset 6130 30b84ad2131d
parent 5553 ae42b36a50c2
child 7672 c092e67d12f8
permissions -rw-r--r--
Fixed old bug: selection of constant to be split should depend not just on
the name but also on the type.
nipkow@4
     1
(*  Title:      Provers/splitter
nipkow@4
     2
    ID:         $Id$
nipkow@4
     3
    Author:     Tobias Nipkow
nipkow@1030
     4
    Copyright   1995  TU Munich
nipkow@4
     5
nipkow@4
     6
Generic case-splitter, suitable for most logics.
clasohm@0
     7
*)
clasohm@0
     8
oheimb@5304
     9
infix 4 addsplits delsplits;
oheimb@5304
    10
oheimb@5304
    11
signature SPLITTER_DATA =
oheimb@5304
    12
sig
oheimb@5304
    13
  structure Simplifier: SIMPLIFIER
oheimb@5553
    14
  val mk_eq         : thm -> thm
oheimb@5304
    15
  val meta_eq_to_iff: thm (* "x == y ==> x = y"                    *)
oheimb@5304
    16
  val iffD          : thm (* "[| P = Q; Q |] ==> P"                *)
oheimb@5304
    17
  val disjE         : thm (* "[| P | Q; P ==> R; Q ==> R |] ==> R" *)
oheimb@5304
    18
  val conjE         : thm (* "[| P & Q; [| P; Q |] ==> R |] ==> R" *)
oheimb@5304
    19
  val exE           : thm (* "[|  x. P x; !!x. P x ==> Q |] ==> Q" *)
oheimb@5304
    20
  val contrapos     : thm (* "[| ~ Q; P ==> Q |] ==> ~ P"          *)
oheimb@5304
    21
  val contrapos2    : thm (* "[| Q; ~ P ==> ~ Q |] ==> P"          *)
oheimb@5304
    22
  val notnotD       : thm (* "~ ~ P ==> P"                         *)
oheimb@5304
    23
end
oheimb@5304
    24
oheimb@5304
    25
signature SPLITTER =
oheimb@5304
    26
sig
oheimb@5304
    27
  type simpset
oheimb@5304
    28
  val split_tac       : thm list -> int -> tactic
oheimb@5304
    29
  val split_inside_tac: thm list -> int -> tactic
oheimb@5304
    30
  val split_asm_tac   : thm list -> int -> tactic
oheimb@5304
    31
  val addsplits       : simpset * thm list -> simpset
oheimb@5304
    32
  val delsplits       : simpset * thm list -> simpset
oheimb@5304
    33
  val Addsplits       : thm list -> unit
oheimb@5304
    34
  val Delsplits       : thm list -> unit
oheimb@5304
    35
end;
oheimb@5304
    36
oheimb@5304
    37
functor SplitterFun(Data: SPLITTER_DATA): SPLITTER =
oheimb@5304
    38
struct 
oheimb@5304
    39
oheimb@5304
    40
type simpset = Data.Simplifier.simpset;
oheimb@5304
    41
oheimb@5304
    42
val Const ("==>", _) $ (Const ("Trueprop", _) $
oheimb@5304
    43
         (Const (const_not, _) $ _    )) $ _ = #prop (rep_thm(Data.notnotD));
oheimb@5304
    44
oheimb@5304
    45
val Const ("==>", _) $ (Const ("Trueprop", _) $
oheimb@5304
    46
         (Const (const_or , _) $ _ $ _)) $ _ = #prop (rep_thm(Data.disjE));
berghofe@1721
    47
nipkow@4668
    48
fun split_format_err() = error("Wrong format for split rule");
nipkow@4668
    49
oheimb@5553
    50
fun split_thm_info thm = case concl_of (Data.mk_eq thm) of
oheimb@5304
    51
     Const("==", _)$(Var _$t)$c =>
oheimb@5304
    52
        (case strip_comb t of
oheimb@5304
    53
           (Const(a,_),_) => (a,case c of (Const(s,_)$_)=>s=const_not|_=> false)
oheimb@5304
    54
         | _              => split_format_err())
oheimb@5304
    55
   | _ => split_format_err();
oheimb@5304
    56
oheimb@5304
    57
fun mk_case_split_tac order =
clasohm@0
    58
let
clasohm@0
    59
berghofe@1686
    60
berghofe@1686
    61
(************************************************************
berghofe@1686
    62
   Create lift-theorem "trlift" :
berghofe@1686
    63
berghofe@1686
    64
   [| !! x. Q(x)==R(x) ; P(R) == C |] ==> P(Q)==C
berghofe@1686
    65
berghofe@1686
    66
*************************************************************)
oheimb@5304
    67
oheimb@5304
    68
val meta_iffD = Data.meta_eq_to_iff RS Data.iffD;
nipkow@943
    69
val lift =
oheimb@5304
    70
  let val ct = read_cterm (#sign(rep_thm Data.iffD))
nipkow@943
    71
           ("[| !!x::'b::logic. Q(x) == R(x) |] ==> \
wenzelm@3835
    72
            \P(%x. Q(x)) == P(%x. R(x))::'a::logic",propT)
nipkow@943
    73
  in prove_goalw_cterm [] ct
nipkow@943
    74
     (fn [prem] => [rewtac prem, rtac reflexive_thm 1])
nipkow@943
    75
  end;
nipkow@4
    76
clasohm@0
    77
val trlift = lift RS transitive_thm;
clasohm@0
    78
val _ $ (Var(P,PT)$_) $ _ = concl_of trlift;
clasohm@0
    79
clasohm@0
    80
berghofe@1686
    81
(************************************************************************ 
berghofe@1686
    82
   Set up term for instantiation of P in the lift-theorem
berghofe@1686
    83
   
berghofe@1686
    84
   Ts    : types of parameters (i.e. variables bound by meta-quantifiers)
berghofe@1686
    85
   t     : lefthand side of meta-equality in subgoal
berghofe@1686
    86
           the lift theorem is applied to (see select)
berghofe@1686
    87
   pos   : "path" leading to abstraction, coded as a list
berghofe@1686
    88
   T     : type of body of P(...)
berghofe@1686
    89
   maxi  : maximum index of Vars
berghofe@1686
    90
*************************************************************************)
berghofe@1686
    91
nipkow@1030
    92
fun mk_cntxt Ts t pos T maxi =
nipkow@1030
    93
  let fun var (t,i) = Var(("X",i),type_of1(Ts,t));
nipkow@1030
    94
      fun down [] t i = Bound 0
nipkow@1030
    95
        | down (p::ps) t i =
nipkow@1030
    96
            let val (h,ts) = strip_comb t
paulson@2266
    97
                val v1 = ListPair.map var (take(p,ts), i upto (i+p-1))
nipkow@1030
    98
                val u::us = drop(p,ts)
paulson@2266
    99
                val v2 = ListPair.map var (us, (i+p) upto (i+length(ts)-2))
nipkow@1030
   100
      in list_comb(h,v1@[down ps u (i+length ts)]@v2) end;
nipkow@1030
   101
  in Abs("", T, down (rev pos) t maxi) end;
nipkow@1030
   102
berghofe@1686
   103
berghofe@1686
   104
(************************************************************************ 
berghofe@1686
   105
   Set up term for instantiation of P in the split-theorem
berghofe@1686
   106
   P(...) == rhs
berghofe@1686
   107
berghofe@1686
   108
   t     : lefthand side of meta-equality in subgoal
berghofe@1686
   109
           the split theorem is applied to (see select)
berghofe@1686
   110
   T     : type of body of P(...)
berghofe@4232
   111
   tt    : the term  Const(key,..) $ ...
berghofe@1686
   112
*************************************************************************)
berghofe@1686
   113
berghofe@4232
   114
fun mk_cntxt_splitthm t tt T =
berghofe@4232
   115
  let fun repl lev t =
berghofe@4232
   116
    if incr_boundvars lev tt = t then Bound lev
berghofe@4232
   117
    else case t of
berghofe@4232
   118
        (Abs (v, T2, t)) => Abs (v, T2, repl (lev+1) t)
berghofe@4232
   119
      | (Bound i) => Bound (if i>=lev then i+1 else i)
berghofe@4232
   120
      | (t1 $ t2) => (repl lev t1) $ (repl lev t2)
berghofe@4232
   121
      | t => t
berghofe@4232
   122
  in Abs("", T, repl 0 t) end;
berghofe@1686
   123
berghofe@1686
   124
berghofe@1686
   125
(* add all loose bound variables in t to list is *)
nipkow@1030
   126
fun add_lbnos(is,t) = add_loose_bnos(t,0,is);
nipkow@1030
   127
nipkow@1064
   128
(* check if the innermost quantifier that needs to be removed
nipkow@1064
   129
   has a body of type T; otherwise the expansion thm will fail later on
nipkow@1064
   130
*)
nipkow@1064
   131
fun type_test(T,lbnos,apsns) =
paulson@2143
   132
  let val (_,U,_) = nth_elem(foldl Int.min (hd lbnos, tl lbnos), apsns)
nipkow@1064
   133
  in T=U end;
clasohm@0
   134
berghofe@1686
   135
(*************************************************************************
berghofe@1686
   136
   Create a "split_pack".
berghofe@1686
   137
berghofe@1686
   138
   thm   : the relevant split-theorem, i.e. P(...) == rhs , where P(...)
berghofe@1686
   139
           is of the form
berghofe@1686
   140
           P( Const(key,...) $ t_1 $ ... $ t_n )      (e.g. key = "if")
berghofe@1686
   141
   T     : type of P(...)
berghofe@1686
   142
   n     : number of arguments expected by Const(key,...)
berghofe@1686
   143
   ts    : list of arguments actually found
berghofe@1686
   144
   apsns : list of tuples of the form (T,U,pos), one tuple for each
berghofe@1686
   145
           abstraction that is encountered on the way to the position where 
berghofe@1686
   146
           Const(key, ...) $ ...  occurs, where
berghofe@1686
   147
           T   : type of the variable bound by the abstraction
berghofe@1686
   148
           U   : type of the abstraction's body
berghofe@1686
   149
           pos : "path" leading to the body of the abstraction
berghofe@1686
   150
   pos   : "path" leading to the position where Const(key, ...) $ ...  occurs.
berghofe@1686
   151
   TB    : type of  Const(key,...) $ t_1 $ ... $ t_n
berghofe@1721
   152
   t     : the term Const(key,...) $ t_1 $ ... $ t_n
berghofe@1686
   153
berghofe@1686
   154
   A split pack is a tuple of the form
berghofe@1686
   155
   (thm, apsns, pos, TB)
berghofe@1686
   156
   Note : apsns is reversed, so that the outermost quantifier's position
berghofe@1686
   157
          comes first ! If the terms in ts don't contain variables bound
berghofe@1686
   158
          by other than meta-quantifiers, apsns is empty, because no further
berghofe@1686
   159
          lifting is required before applying the split-theorem.
berghofe@1686
   160
******************************************************************************) 
berghofe@1686
   161
berghofe@1721
   162
fun mk_split_pack(thm,T,n,ts,apsns,pos,TB,t) =
nipkow@1064
   163
  if n > length ts then []
nipkow@1064
   164
  else let val lev = length apsns
nipkow@1030
   165
           val lbnos = foldl add_lbnos ([],take(n,ts))
nipkow@1030
   166
           val flbnos = filter (fn i => i < lev) lbnos
berghofe@4232
   167
           val tt = incr_boundvars (~lev) t
berghofe@1721
   168
       in if null flbnos then [(thm,[],pos,TB,tt)]
paulson@2143
   169
          else if type_test(T,flbnos,apsns) then [(thm, rev apsns,pos,TB,tt)] 
paulson@2143
   170
               else []
nipkow@1064
   171
       end;
clasohm@0
   172
berghofe@1686
   173
berghofe@1686
   174
(****************************************************************************
berghofe@1686
   175
   Recursively scans term for occurences of Const(key,...) $ ...
berghofe@1686
   176
   Returns a list of "split-packs" (one for each occurence of Const(key,...) )
berghofe@1686
   177
berghofe@1686
   178
   cmap : association list of split-theorems that should be tried.
berghofe@1686
   179
          The elements have the format (key,(thm,T,n)) , where
berghofe@1686
   180
          key : the theorem's key constant ( Const(key,...) $ ... )
berghofe@1686
   181
          thm : the theorem itself
berghofe@1686
   182
          T   : type of P( Const(key,...) $ ... )
berghofe@1686
   183
          n   : number of arguments expected by Const(key,...)
berghofe@1686
   184
   Ts   : types of parameters
berghofe@1686
   185
   t    : the term to be scanned
berghofe@1686
   186
******************************************************************************)
berghofe@1686
   187
nipkow@6130
   188
fun split_posns cmap sg Ts t =
nipkow@6130
   189
  let
nipkow@6130
   190
    fun posns Ts pos apsns (Abs(_,T,t)) =
nipkow@6130
   191
          let val U = fastype_of1(T::Ts,t)
nipkow@6130
   192
          in posns (T::Ts) (0::pos) ((T,U,pos)::apsns) t end
nipkow@6130
   193
      | posns Ts pos apsns t =
nipkow@6130
   194
          let
nipkow@6130
   195
            val (h,ts) = strip_comb t
nipkow@6130
   196
            fun iter((i,a),t) = (i+1, (posns Ts (i::pos) apsns t) @ a);
nipkow@6130
   197
            val a = case h of
nipkow@6130
   198
              Const(c,cT) =>
nipkow@6130
   199
                (case assoc(cmap,c) of
nipkow@6130
   200
                   Some(gcT, thm, T, n) =>
nipkow@6130
   201
                     if Type.typ_instance(Sign.tsig_of sg, cT, gcT)
nipkow@6130
   202
                     then
nipkow@6130
   203
                       let val t2 = list_comb (h, take (n, ts))
nipkow@6130
   204
                       in mk_split_pack(thm,T,n,ts,apsns,pos,type_of1(Ts, t2),t2)
nipkow@6130
   205
                       end
nipkow@6130
   206
                     else []
nipkow@6130
   207
                 | None => [])
nipkow@6130
   208
            | _ => []
nipkow@6130
   209
          in snd(foldl iter ((0,a),ts)) end
nipkow@1030
   210
  in posns Ts [] [] t end;
clasohm@0
   211
berghofe@1686
   212
clasohm@0
   213
fun nth_subgoal i thm = nth_elem(i-1,prems_of thm);
clasohm@0
   214
berghofe@1721
   215
fun shorter((_,ps,pos,_,_),(_,qs,qos,_,_)) =
wenzelm@4519
   216
  prod_ord (int_ord o pairself length) (order o pairself length)
wenzelm@4519
   217
    ((ps, pos), (qs, qos));
wenzelm@4519
   218
berghofe@1686
   219
berghofe@1686
   220
berghofe@1686
   221
(************************************************************
berghofe@1686
   222
   call split_posns with appropriate parameters
berghofe@1686
   223
*************************************************************)
clasohm@0
   224
nipkow@1030
   225
fun select cmap state i =
nipkow@6130
   226
  let val sg = #sign(rep_thm state)
nipkow@6130
   227
      val goali = nth_subgoal i state
nipkow@1030
   228
      val Ts = rev(map #2 (Logic.strip_params goali))
nipkow@1030
   229
      val _ $ t $ _ = Logic.strip_assums_concl goali;
nipkow@6130
   230
  in (Ts,t, sort shorter (split_posns cmap sg Ts t)) end;
nipkow@1030
   231
berghofe@1686
   232
berghofe@1686
   233
(*************************************************************
berghofe@1686
   234
   instantiate lift theorem
berghofe@1686
   235
berghofe@1686
   236
   if t is of the form
berghofe@1686
   237
   ... ( Const(...,...) $ Abs( .... ) ) ...
berghofe@1686
   238
   then
berghofe@1686
   239
   P = %a.  ... ( Const(...,...) $ a ) ...
berghofe@1686
   240
   where a has type T --> U
berghofe@1686
   241
berghofe@1686
   242
   Ts      : types of parameters
berghofe@1686
   243
   t       : lefthand side of meta-equality in subgoal
berghofe@1686
   244
             the split theorem is applied to (see cmap)
berghofe@1686
   245
   T,U,pos : see mk_split_pack
berghofe@1686
   246
   state   : current proof state
berghofe@1686
   247
   lift    : the lift theorem
berghofe@1686
   248
   i       : no. of subgoal
berghofe@1686
   249
**************************************************************)
berghofe@1686
   250
nipkow@1030
   251
fun inst_lift Ts t (T,U,pos) state lift i =
clasohm@0
   252
  let val sg = #sign(rep_thm state)
clasohm@0
   253
      val tsig = #tsig(Sign.rep_sg sg)
nipkow@1030
   254
      val cntxt = mk_cntxt Ts t pos (T-->U) (#maxidx(rep_thm lift))
lcp@231
   255
      val cu = cterm_of sg cntxt
lcp@231
   256
      val uT = #T(rep_cterm cu)
lcp@231
   257
      val cP' = cterm_of sg (Var(P,uT))
clasohm@0
   258
      val ixnTs = Type.typ_match tsig ([],(PT,uT));
lcp@231
   259
      val ixncTs = map (fn (x,y) => (x,ctyp_of sg y)) ixnTs;
clasohm@0
   260
  in instantiate (ixncTs, [(cP',cu)]) lift end;
clasohm@0
   261
clasohm@0
   262
berghofe@1686
   263
(*************************************************************
berghofe@1686
   264
   instantiate split theorem
berghofe@1686
   265
berghofe@1686
   266
   Ts    : types of parameters
berghofe@1686
   267
   t     : lefthand side of meta-equality in subgoal
berghofe@1686
   268
           the split theorem is applied to (see cmap)
berghofe@4232
   269
   tt    : the term  Const(key,..) $ ...
berghofe@1686
   270
   thm   : the split theorem
berghofe@1686
   271
   TB    : type of body of P(...)
berghofe@1686
   272
   state : current proof state
berghofe@4232
   273
   i     : number of subgoal
berghofe@1686
   274
**************************************************************)
berghofe@1686
   275
berghofe@4232
   276
fun inst_split Ts t tt thm TB state i =
berghofe@4232
   277
  let val _ $ ((Var (P2, PT2)) $ _) $ _ = concl_of thm;
berghofe@1686
   278
      val sg = #sign(rep_thm state)
berghofe@1686
   279
      val tsig = #tsig(Sign.rep_sg sg)
berghofe@4232
   280
      val cntxt = mk_cntxt_splitthm t tt TB;
berghofe@4236
   281
      val T = fastype_of1 (Ts, cntxt);
berghofe@4232
   282
      val ixnTs = Type.typ_match tsig ([],(PT2, T))
berghofe@4232
   283
      val abss = foldl (fn (t, T) => Abs ("", T, t))
berghofe@4232
   284
  in
berghofe@4232
   285
    term_lift_inst_rule (state, i, ixnTs, [((P2, T), abss (cntxt, Ts))], thm)
berghofe@4232
   286
  end;
berghofe@1686
   287
berghofe@1686
   288
(*****************************************************************************
berghofe@1686
   289
   The split-tactic
berghofe@1686
   290
   
berghofe@1686
   291
   splits : list of split-theorems to be tried
berghofe@1686
   292
   i      : number of subgoal the tactic should be applied to
berghofe@1686
   293
*****************************************************************************)
berghofe@1686
   294
clasohm@0
   295
fun split_tac [] i = no_tac
clasohm@0
   296
  | split_tac splits i =
oheimb@5553
   297
  let val splits = map Data.mk_eq splits;
oheimb@5304
   298
      fun const(thm) =
nipkow@3918
   299
            (case concl_of thm of _$(t as _$lhs)$_ =>
nipkow@6130
   300
               (case strip_comb lhs of (Const(a,aT),args) =>
nipkow@6130
   301
                  (a,(aT,thm,fastype_of t,length args))
nipkow@4668
   302
                | _ => split_format_err())
nipkow@4668
   303
             | _ => split_format_err())
clasohm@0
   304
      val cmap = map const splits;
paulson@3537
   305
      fun lift_tac Ts t p st = (rtac (inst_lift Ts t p st trlift i) i) st
paulson@3537
   306
      fun lift_split_tac st = st |>
paulson@3537
   307
            let val (Ts,t,splits) = select cmap st i
nipkow@1030
   308
            in case splits of
nipkow@1030
   309
                 [] => no_tac
berghofe@1721
   310
               | (thm,apsns,pos,TB,tt)::_ =>
nipkow@1030
   311
                   (case apsns of
paulson@3537
   312
                      [] => (fn state => state |>
berghofe@4232
   313
			           compose_tac (false, inst_split Ts t tt thm TB state i, 0) i)
paulson@3537
   314
                    | p::_ => EVERY[lift_tac Ts t p,
nipkow@1030
   315
                                    rtac reflexive_thm (i+1),
paulson@3537
   316
                                    lift_split_tac])
nipkow@1030
   317
            end
paulson@3537
   318
  in COND (has_fewer_prems i) no_tac 
oheimb@5304
   319
          (rtac meta_iffD i THEN lift_split_tac)
clasohm@0
   320
  end;
clasohm@0
   321
clasohm@0
   322
in split_tac end;
berghofe@1721
   323
oheimb@5304
   324
oheimb@5304
   325
val split_tac        = mk_case_split_tac              int_ord;
oheimb@4189
   326
oheimb@5304
   327
val split_inside_tac = mk_case_split_tac (rev_order o int_ord);
oheimb@5304
   328
oheimb@4189
   329
oheimb@4189
   330
(*****************************************************************************
oheimb@4189
   331
   The split-tactic for premises
oheimb@4189
   332
   
oheimb@4189
   333
   splits : list of split-theorems to be tried
oheimb@5304
   334
****************************************************************************)
oheimb@4202
   335
fun split_asm_tac []     = K no_tac
oheimb@4202
   336
  | split_asm_tac splits = 
oheimb@5304
   337
oheimb@4930
   338
  let val cname_list = map (fst o split_thm_info) splits;
oheimb@4189
   339
      fun is_case (a,_) = a mem cname_list;
oheimb@4189
   340
      fun tac (t,i) = 
oheimb@4189
   341
	  let val n = find_index (exists_Const is_case) 
oheimb@4189
   342
				 (Logic.strip_assums_hyp t);
oheimb@4189
   343
	      fun first_prem_is_disj (Const ("==>", _) $ (Const ("Trueprop", _)
oheimb@5304
   344
				 $ (Const (s, _) $ _ $ _ )) $ _ ) = (s=const_or)
oheimb@4202
   345
	      |   first_prem_is_disj (Const("all",_)$Abs(_,_,t)) = 
oheimb@4202
   346
					first_prem_is_disj t
oheimb@4189
   347
	      |   first_prem_is_disj _ = false;
oheimb@5437
   348
      (* does not work properly if the split variable is bound by a quantfier *)
oheimb@4202
   349
	      fun flat_prems_tac i = SUBGOAL (fn (t,i) => 
oheimb@5304
   350
			   (if first_prem_is_disj t
oheimb@5304
   351
			    then EVERY[etac Data.disjE i,rotate_tac ~1 i,
oheimb@5304
   352
				       rotate_tac ~1  (i+1),
oheimb@5304
   353
				       flat_prems_tac (i+1)]
oheimb@5304
   354
			    else all_tac) 
oheimb@5304
   355
			   THEN REPEAT (eresolve_tac [Data.conjE,Data.exE] i)
oheimb@5304
   356
			   THEN REPEAT (dresolve_tac [Data.notnotD]   i)) i;
oheimb@4189
   357
	  in if n<0 then no_tac else DETERM (EVERY'
oheimb@5304
   358
		[rotate_tac n, etac Data.contrapos2,
oheimb@4189
   359
		 split_tac splits, 
oheimb@5304
   360
		 rotate_tac ~1, etac Data.contrapos, rotate_tac ~1, 
oheimb@4202
   361
		 flat_prems_tac] i)
oheimb@4189
   362
	  end;
oheimb@4189
   363
  in SUBGOAL tac
oheimb@4189
   364
  end;
oheimb@4189
   365
oheimb@5304
   366
fun split_name name asm = "split " ^ name ^ (if asm then " asm" else "");
oheimb@4189
   367
oheimb@5304
   368
fun ss addsplits splits =
oheimb@5304
   369
  let fun addsplit (ss,split) =
oheimb@5304
   370
        let val (name,asm) = split_thm_info split
oheimb@5304
   371
        in Data.Simplifier.addloop(ss,(split_name name asm,
oheimb@5304
   372
		       (if asm then split_asm_tac else split_tac) [split])) end
oheimb@5304
   373
  in foldl addsplit (ss,splits) end;
berghofe@1721
   374
oheimb@5304
   375
fun ss delsplits splits =
oheimb@5304
   376
  let fun delsplit(ss,split) =
oheimb@5304
   377
        let val (name,asm) = split_thm_info split
oheimb@5304
   378
        in Data.Simplifier.delloop(ss,split_name name asm)
oheimb@5304
   379
  end in foldl delsplit (ss,splits) end;
berghofe@1721
   380
oheimb@5304
   381
fun Addsplits splits = (Data.Simplifier.simpset_ref() := 
oheimb@5304
   382
			Data.Simplifier.simpset() addsplits splits);
oheimb@5304
   383
fun Delsplits splits = (Data.Simplifier.simpset_ref() := 
oheimb@5304
   384
			Data.Simplifier.simpset() delsplits splits);
oheimb@4189
   385
berghofe@1721
   386
end;