src/HOL/Tools/BNF/bnf_fp_n2m.ML
changeset 58375 7b92932ffea5
parent 58352 37745650a3f4
child 58446 e89f57d1e46c
     1.1 --- a/src/HOL/Tools/BNF/bnf_fp_n2m.ML	Thu Sep 18 16:47:40 2014 +0200
     1.2 +++ b/src/HOL/Tools/BNF/bnf_fp_n2m.ML	Thu Sep 18 16:47:40 2014 +0200
     1.3 @@ -182,12 +182,13 @@
     1.4      val castAs = map2 (curry HOLogic.mk_comp) absAs fp_repAs;
     1.5      val castBs = map2 (curry HOLogic.mk_comp) absBs fp_repBs;
     1.6  
     1.7 -    val rel_eqs = no_refl (map rel_eq_of_bnf fp_or_nesting_bnfs);
     1.8 +    val fp_or_nesting_rel_eqs = no_refl (map rel_eq_of_bnf fp_or_nesting_bnfs);
     1.9 +    val fp_or_nesting_rel_monos = map rel_mono_of_bnf fp_or_nesting_bnfs;
    1.10  
    1.11      val rel_xtor_co_induct_thm =
    1.12        mk_rel_xtor_co_induct_thm fp (map3 cast castAs castBs pre_rels) pre_phis rels phis xs ys
    1.13          xtors xtor's (mk_rel_xtor_co_induct_tactic fp abs_inverses rel_xtor_co_inducts rel_defs
    1.14 -          rel_monos rel_eqs)
    1.15 +          rel_monos fp_or_nesting_rel_eqs fp_or_nesting_rel_monos)
    1.16          lthy;
    1.17  
    1.18      val map_id0s = no_refl (map map_id0_of_bnf bnfs);
    1.19 @@ -209,7 +210,8 @@
    1.20            in
    1.21              cterm_instantiate_pos cts rel_xtor_co_induct_thm
    1.22              |> singleton (Proof_Context.export names_lthy lthy)
    1.23 -            |> unfold_thms lthy (@{thms eq_le_Grp_id_iff all_simps(1,2)[symmetric]} @ rel_eqs)
    1.24 +            |> unfold_thms lthy (@{thms eq_le_Grp_id_iff all_simps(1,2)[symmetric]} @
    1.25 +                fp_or_nesting_rel_eqs)
    1.26              |> funpow n (fn thm => thm RS spec)
    1.27              |> unfold_thms lthy (@{thm eq_alt} :: map rel_Grp_of_bnf bnfs @ map_id0s)
    1.28              |> unfold_thms lthy (@{thms vimage2p_id vimage2p_comp comp_apply comp_id
    1.29 @@ -224,7 +226,8 @@
    1.30              val cts = NONE :: map (SOME o certify lthy) (map HOLogic.eq_const As);
    1.31            in
    1.32              cterm_instantiate_pos cts rel_xtor_co_induct_thm
    1.33 -            |> unfold_thms lthy (@{thms le_fun_def le_bool_def all_simps(1,2)[symmetric]} @ rel_eqs)
    1.34 +            |> unfold_thms lthy (@{thms le_fun_def le_bool_def all_simps(1,2)[symmetric]} @
    1.35 +                fp_or_nesting_rel_eqs)
    1.36              |> funpow (2 * n) (fn thm => thm RS spec)
    1.37              |> Conv.fconv_rule (Object_Logic.atomize lthy)
    1.38              |> funpow n (fn thm => thm RS mp)