src/Pure/raw_simplifier.ML
changeset 52037 837211662fb8
parent 51717 9e7d1c139569
child 52082 559e1398b70e
equal deleted inserted replaced
52036:1aa2e40df9ff 52037:837211662fb8
     4 Higher-order Simplification.
     4 Higher-order Simplification.
     5 *)
     5 *)
     6 
     6 
     7 infix 4
     7 infix 4
     8   addsimps delsimps addsimprocs delsimprocs
     8   addsimps delsimps addsimprocs delsimprocs
     9   setloop' setloop addloop addloop' delloop
     9   setloop addloop delloop
    10   setSSolver addSSolver setSolver addSolver;
    10   setSSolver addSSolver setSolver addSolver;
    11 
    11 
    12 signature BASIC_RAW_SIMPLIFIER =
    12 signature BASIC_RAW_SIMPLIFIER =
    13 sig
    13 sig
    14   val simp_depth_limit: int Config.T
    14   val simp_depth_limit: int Config.T
    47   val clear_simpset: Proof.context -> Proof.context
    47   val clear_simpset: Proof.context -> Proof.context
    48   val addsimps: Proof.context * thm list -> Proof.context
    48   val addsimps: Proof.context * thm list -> Proof.context
    49   val delsimps: Proof.context * thm list -> Proof.context
    49   val delsimps: Proof.context * thm list -> Proof.context
    50   val addsimprocs: Proof.context * simproc list -> Proof.context
    50   val addsimprocs: Proof.context * simproc list -> Proof.context
    51   val delsimprocs: Proof.context * simproc list -> Proof.context
    51   val delsimprocs: Proof.context * simproc list -> Proof.context
    52   val setloop': Proof.context * (Proof.context -> int -> tactic) -> Proof.context
    52   val setloop: Proof.context * (Proof.context -> int -> tactic) -> Proof.context
    53   val setloop: Proof.context * (int -> tactic) -> Proof.context
    53   val addloop: Proof.context * (string * (Proof.context -> int -> tactic)) -> Proof.context
    54   val addloop': Proof.context * (string * (Proof.context -> int -> tactic)) -> Proof.context
       
    55   val addloop: Proof.context * (string * (int -> tactic)) -> Proof.context
       
    56   val delloop: Proof.context * string -> Proof.context
    54   val delloop: Proof.context * string -> Proof.context
    57   val setSSolver: Proof.context * solver -> Proof.context
    55   val setSSolver: Proof.context * solver -> Proof.context
    58   val addSSolver: Proof.context * solver -> Proof.context
    56   val addSSolver: Proof.context * solver -> Proof.context
    59   val setSolver: Proof.context * solver -> Proof.context
    57   val setSolver: Proof.context * solver -> Proof.context
    60   val addSolver: Proof.context * solver -> Proof.context
    58   val addSolver: Proof.context * solver -> Proof.context
   819 
   817 
   820 fun set_subgoaler subgoal_tac =
   818 fun set_subgoaler subgoal_tac =
   821   map_simpset2 (fn (congs, procs, mk_rews, termless, _, loop_tacs, solvers) =>
   819   map_simpset2 (fn (congs, procs, mk_rews, termless, _, loop_tacs, solvers) =>
   822    (congs, procs, mk_rews, termless, subgoal_tac, loop_tacs, solvers));
   820    (congs, procs, mk_rews, termless, subgoal_tac, loop_tacs, solvers));
   823 
   821 
   824 fun ctxt setloop' tac = ctxt |>
   822 fun ctxt setloop tac = ctxt |>
   825   map_simpset2 (fn (congs, procs, mk_rews, termless, subgoal_tac, _, solvers) =>
   823   map_simpset2 (fn (congs, procs, mk_rews, termless, subgoal_tac, _, solvers) =>
   826    (congs, procs, mk_rews, termless, subgoal_tac, [("", tac)], solvers));
   824    (congs, procs, mk_rews, termless, subgoal_tac, [("", tac)], solvers));
   827 
   825 
   828 fun ctxt setloop tac = ctxt setloop' (K tac);
   826 fun ctxt addloop (name, tac) = ctxt |>
   829 
       
   830 fun ctxt addloop' (name, tac) = ctxt |>
       
   831   map_simpset2 (fn (congs, procs, mk_rews, termless, subgoal_tac, loop_tacs, solvers) =>
   827   map_simpset2 (fn (congs, procs, mk_rews, termless, subgoal_tac, loop_tacs, solvers) =>
   832     (congs, procs, mk_rews, termless, subgoal_tac,
   828     (congs, procs, mk_rews, termless, subgoal_tac,
   833      AList.update (op =) (name, tac) loop_tacs, solvers));
   829      AList.update (op =) (name, tac) loop_tacs, solvers));
   834 
       
   835 fun ctxt addloop (name, tac) = ctxt addloop' (name, K tac);
       
   836 
   830 
   837 fun ctxt delloop name = ctxt |>
   831 fun ctxt delloop name = ctxt |>
   838   map_simpset2 (fn (congs, procs, mk_rews, termless, subgoal_tac, loop_tacs, solvers) =>
   832   map_simpset2 (fn (congs, procs, mk_rews, termless, subgoal_tac, loop_tacs, solvers) =>
   839     (congs, procs, mk_rews, termless, subgoal_tac,
   833     (congs, procs, mk_rews, termless, subgoal_tac,
   840      (if AList.defined (op =) loop_tacs name then ()
   834      (if AList.defined (op =) loop_tacs name then ()