src/Provers/simplifier.ML
changeset 7177 6bb7ad30f3da
parent 7132 5c31d06ead04
child 7214 381d6987f68d
equal deleted inserted replaced
7176:a329a37ed91a 7177:6bb7ad30f3da
    89   val simp_del_global: theory attribute
    89   val simp_del_global: theory attribute
    90   val simp_only_global: theory attribute
    90   val simp_only_global: theory attribute
    91   val simp_add_local: Proof.context attribute
    91   val simp_add_local: Proof.context attribute
    92   val simp_del_local: Proof.context attribute
    92   val simp_del_local: Proof.context attribute
    93   val simp_only_local: Proof.context attribute
    93   val simp_only_local: Proof.context attribute
       
    94   val change_simpset_of: (simpset * 'a -> simpset) -> 'a -> theory -> theory
    94   val simp_modifiers: (Args.T list -> (Proof.context attribute * Args.T list)) list
    95   val simp_modifiers: (Args.T list -> (Proof.context attribute * Args.T list)) list
    95   val setup: (theory -> theory) list
    96   val setup: (theory -> theory) list
    96 end;
    97 end;
    97 
    98 
    98 structure Simplifier: SIMPLIFIER =
    99 structure Simplifier: SIMPLIFIER =
   291 val simpset_ref = simpset_ref_of_sg o Theory.sign_of o Context.the_context;
   292 val simpset_ref = simpset_ref_of_sg o Theory.sign_of o Context.the_context;
   292 
   293 
   293 
   294 
   294 (* change global simpset *)
   295 (* change global simpset *)
   295 
   296 
   296 fun change_simpset f x = simpset_ref () := (f (simpset (), x));
   297 fun change_simpset_of f x thy =
       
   298   let val r = simpset_ref_of thy
       
   299   in r := f (! r, x); thy end;
       
   300 
       
   301 fun change_simpset f x = (change_simpset_of f x (Context.the_context ()); ());
   297 
   302 
   298 val Addsimps = change_simpset (op addsimps);
   303 val Addsimps = change_simpset (op addsimps);
   299 val Delsimps = change_simpset (op delsimps);
   304 val Delsimps = change_simpset (op delsimps);
   300 val Addsimprocs = change_simpset (op addsimprocs);
   305 val Addsimprocs = change_simpset (op addsimprocs);
   301 val Delsimprocs = change_simpset (op delsimprocs);
   306 val Delsimprocs = change_simpset (op delsimprocs);