1674 (*register new codatatypes as BNFs*) |
1674 (*register new codatatypes as BNFs*) |
1675 val (timer, Jbnfs, (dtor_Jmap_o_thms, dtor_Jmap_thms), dtor_Jmap_unique_thm, dtor_Jset_thmss', |
1675 val (timer, Jbnfs, (dtor_Jmap_o_thms, dtor_Jmap_thms), dtor_Jmap_unique_thm, dtor_Jset_thmss', |
1676 dtor_Jrel_thms, Jrel_coinduct_thm, Jbnf_notes, dtor_Jset_induct_thms, lthy) = |
1676 dtor_Jrel_thms, Jrel_coinduct_thm, Jbnf_notes, dtor_Jset_induct_thms, lthy) = |
1677 if m = 0 then |
1677 if m = 0 then |
1678 (timer, replicate n DEADID_bnf, |
1678 (timer, replicate n DEADID_bnf, |
1679 map_split (`(mk_pointfree lthy)) (map2 mk_dtor_map_DEADID_thm dtor_inject_thms map_ids), |
1679 map_split (`(mk_pointfree2 lthy)) (map2 mk_dtor_map_DEADID_thm dtor_inject_thms map_ids), |
1680 mk_dtor_map_unique_DEADID_thm (), |
1680 mk_dtor_map_unique_DEADID_thm (), |
1681 replicate n [], |
1681 replicate n [], |
1682 map2 mk_dtor_Jrel_DEADID_thm dtor_inject_thms bnfs, |
1682 map2 mk_dtor_Jrel_DEADID_thm dtor_inject_thms bnfs, |
1683 mk_Jrel_DEADID_coinduct_thm (), [], [], lthy) |
1683 mk_Jrel_DEADID_coinduct_thm (), [], [], lthy) |
1684 else let |
1684 else let |
2530 lthy |
2530 lthy |
2531 |> mk_Frees "R" JphiTs |
2531 |> mk_Frees "R" JphiTs |
2532 ||>> mk_Frees "S" activephiTs; |
2532 ||>> mk_Frees "S" activephiTs; |
2533 |
2533 |
2534 val dtor_unfold_o_Jmap_thms = mk_xtor_co_iter_o_map_thms Greatest_FP false m |
2534 val dtor_unfold_o_Jmap_thms = mk_xtor_co_iter_o_map_thms Greatest_FP false m |
2535 dtor_unfold_unique_thm dtor_Jmap_o_thms (map (mk_pointfree lthy) dtor_unfold_thms) |
2535 dtor_unfold_unique_thm dtor_Jmap_o_thms (map (mk_pointfree2 lthy) dtor_unfold_thms) |
2536 sym_map_comps map_cong0s; |
2536 sym_map_comps map_cong0s; |
2537 |
2537 |
2538 val rels = map2 (fn Ds => mk_rel_of_bnf Ds allAs allBs') Dss bnfs; |
2538 val rels = map2 (fn Ds => mk_rel_of_bnf Ds allAs allBs') Dss bnfs; |
2539 val Jrels = if m = 0 then map HOLogic.eq_const Ts |
2539 val Jrels = if m = 0 then map HOLogic.eq_const Ts |
2540 else map (mk_rel_of_bnf deads passiveAs passiveBs) Jbnfs; |
2540 else map (mk_rel_of_bnf deads passiveAs passiveBs) Jbnfs; |