src/HOL/Library/simps_case_conv.ML
changeset 60354 235d65be79c9
parent 59936 b8ffc3dc9e24
child 60355 ccafd7d193e7
equal deleted inserted replaced
60336:f0b2457bf68e 60354:235d65be79c9
   185 val atomize_meta_eq = forward_tac [meta_eq_to_obj_eq]
   185 val atomize_meta_eq = forward_tac [meta_eq_to_obj_eq]
   186 
   186 
   187 in
   187 in
   188 
   188 
   189 fun gen_to_simps ctxt splitthms thm =
   189 fun gen_to_simps ctxt splitthms thm =
   190   Seq.list_of ((TRY atomize_meta_eq
   190   let val splitthms' = filter (fn t => not (Thm.eq_thm (t, Drule.dummy_thm))) splitthms
   191                  THEN (REPEAT (FIRST (map (do_split ctxt) splitthms)))) thm)
   191   in
       
   192     Seq.list_of ((TRY atomize_meta_eq THEN (REPEAT (FIRST (map (do_split ctxt) splitthms')))) thm)
       
   193   end
   192 
   194 
   193 fun to_simps ctxt thm =
   195 fun to_simps ctxt thm =
   194   let
   196   let
   195     val T = thm |> strip_eq |> fst |> strip_comb |> fst |> fastype_of
   197     val T = thm |> strip_eq |> fst |> strip_comb |> fst |> fastype_of
   196     val splitthms = get_split_ths ctxt T
   198     val splitthms = get_split_ths ctxt T