src/HOL/Codatatype/Tools/bnf_fp_sugar_tactics.ML
changeset 49149 166f19b4677b
parent 49147 0da8120bd2aa
child 49160 056d6010b6d2
equal deleted inserted replaced
49148:93f281430e77 49149:166f19b4677b
    29 
    29 
    30 fun mk_exhaust_tac ctxt n ms ctr_defs fld_iff_unf sumEN' =
    30 fun mk_exhaust_tac ctxt n ms ctr_defs fld_iff_unf sumEN' =
    31   Local_Defs.unfold_tac ctxt (fld_iff_unf :: ctr_defs) THEN rtac sumEN' 1 THEN
    31   Local_Defs.unfold_tac ctxt (fld_iff_unf :: ctr_defs) THEN rtac sumEN' 1 THEN
    32   Local_Defs.unfold_tac ctxt @{thms all_prod_eq} THEN
    32   Local_Defs.unfold_tac ctxt @{thms all_prod_eq} THEN
    33   EVERY' (map2 (fn k => fn m =>
    33   EVERY' (map2 (fn k => fn m =>
    34     select_prem_tac n (REPEAT_DETERM_N m o dtac @{thm meta_spec} THEN' rotate_tac ~1 THEN'
    34     select_prem_tac k (REPEAT_DETERM_N m o dtac @{thm meta_spec} THEN' rotate_tac ~1 THEN'
    35       etac @{thm meta_mp}) k THEN' atac) (1 upto n) ms) 1;
    35       etac @{thm meta_mp}) k THEN' atac) (1 upto n) ms) 1;
    36 
    36 
    37 fun mk_fld_iff_unf_tac ctxt cTs cfld cunf fld_unf unf_fld =
    37 fun mk_fld_iff_unf_tac ctxt cTs cfld cunf fld_unf unf_fld =
    38   (rtac iffI THEN'
    38   (rtac iffI THEN'
    39    EVERY' (map3 (fn cTs => fn cx => fn th =>
    39    EVERY' (map3 (fn cTs => fn cx => fn th =>