src/HOL/BNF/Tools/bnf_gfp_rec_sugar_tactics.ML
changeset 54843 7f30d569da08
parent 54842 a020f7d74fed
child 54844 630ba4d8a206
equal deleted inserted replaced
54842:a020f7d74fed 54843:7f30d569da08
   124     val (ms', f_ctrs') =
   124     val (ms', f_ctrs') =
   125       (case maybe_nchotomy of
   125       (case maybe_nchotomy of
   126         NONE => (ms, f_ctrs)
   126         NONE => (ms, f_ctrs)
   127       | SOME nchotomy =>
   127       | SOME nchotomy =>
   128         (ms |> split_last ||> K [n - 1] |> op @,
   128         (ms |> split_last ||> K [n - 1] |> op @,
   129          f_ctrs |> split_last ||> (fn thm => [rulify_nchotomy n nchotomy RS thm]) |> op @));
   129          f_ctrs
       
   130          |> split_last
       
   131          ||> unfold_thms ctxt @{thms atomize_conjL}
       
   132          ||> (fn thm => [rulify_nchotomy n nchotomy RS thm])
       
   133          |> op @));
   130   in
   134   in
   131     EVERY (map2 (mk_primcorec_raw_code_of_ctr_single_tac ctxt distincts discIs splits split_asms)
   135     EVERY (map2 (mk_primcorec_raw_code_of_ctr_single_tac ctxt distincts discIs splits split_asms)
   132       ms' f_ctrs') THEN
   136       ms' f_ctrs') THEN
   133     IF_UNSOLVED (unfold_thms_tac ctxt @{thms Code.abort_def} THEN
   137     IF_UNSOLVED (unfold_thms_tac ctxt @{thms Code.abort_def} THEN
   134       HEADGOAL (REPEAT_DETERM o resolve_tac (refl :: split_connectI)))
   138       HEADGOAL (REPEAT_DETERM o resolve_tac (refl :: split_connectI)))