src/Pure/simplifier.ML
changeset 43597 b4a093e755db
parent 43596 78211f66cf8d
child 44058 ae85c5d64913
equal deleted inserted replaced
43596:78211f66cf8d 43597:b4a093e755db
    32   include BASIC_SIMPLIFIER
    32   include BASIC_SIMPLIFIER
    33   val map_simpset_global: (simpset -> simpset) -> theory -> theory
    33   val map_simpset_global: (simpset -> simpset) -> theory -> theory
    34   val pretty_ss: Proof.context -> simpset -> Pretty.T
    34   val pretty_ss: Proof.context -> simpset -> Pretty.T
    35   val clear_ss: simpset -> simpset
    35   val clear_ss: simpset -> simpset
    36   val debug_bounds: bool Unsynchronized.ref
    36   val debug_bounds: bool Unsynchronized.ref
       
    37   val prems_of: simpset -> thm list
    37   val add_simp: thm -> simpset -> simpset
    38   val add_simp: thm -> simpset -> simpset
    38   val del_simp: thm -> simpset -> simpset
    39   val del_simp: thm -> simpset -> simpset
    39   val add_prems: thm list -> simpset -> simpset
    40   val add_prems: thm list -> simpset -> simpset
    40   val inherit_context: simpset -> simpset -> simpset
    41   val inherit_context: simpset -> simpset -> simpset
    41   val the_context: simpset -> Proof.context
    42   val the_context: simpset -> Proof.context
   394 
   395 
   395 fun easy_setup reflect trivs = method_setup [] #> Context.theory_map (map_ss (fn _ =>
   396 fun easy_setup reflect trivs = method_setup [] #> Context.theory_map (map_ss (fn _ =>
   396   let
   397   let
   397     val trivialities = Drule.reflexive_thm :: trivs;
   398     val trivialities = Drule.reflexive_thm :: trivs;
   398 
   399 
   399     fun unsafe_solver_tac ss = FIRST' [resolve_tac (trivialities @ prems_of_ss ss), assume_tac];
   400     fun unsafe_solver_tac ss =
       
   401       FIRST' [resolve_tac (trivialities @ Raw_Simplifier.prems_of ss), assume_tac];
   400     val unsafe_solver = mk_solver "easy unsafe" unsafe_solver_tac;
   402     val unsafe_solver = mk_solver "easy unsafe" unsafe_solver_tac;
   401 
   403 
   402     (*no premature instantiation of variables during simplification*)
   404     (*no premature instantiation of variables during simplification*)
   403     fun safe_solver_tac ss = FIRST' [match_tac (trivialities @ prems_of_ss ss), eq_assume_tac];
   405     fun safe_solver_tac ss =
       
   406       FIRST' [match_tac (trivialities @ Raw_Simplifier.prems_of ss), eq_assume_tac];
   404     val safe_solver = mk_solver "easy safe" safe_solver_tac;
   407     val safe_solver = mk_solver "easy safe" safe_solver_tac;
   405 
   408 
   406     fun mk_eq thm =
   409     fun mk_eq thm =
   407       if can Logic.dest_equals (Thm.concl_of thm) then [thm]
   410       if can Logic.dest_equals (Thm.concl_of thm) then [thm]
   408       else [thm RS reflect] handle THM _ => [];
   411       else [thm RS reflect] handle THM _ => [];