src/HOL/Tools/BNF/bnf_gfp_grec.ML
changeset 67710 cc2db3239932
parent 64674 ef0a5fd30f3b
child 69593 3dda49e08b9d
equal deleted inserted replaced
67709:3c9e0b4709e7 67710:cc2db3239932
  1150         flat_pointful_natural flat_flat Lam_pointful_natural eval_core_simps))
  1150         flat_pointful_natural flat_flat Lam_pointful_natural eval_core_simps))
  1151     |> Thm.close_derivation
  1151     |> Thm.close_derivation
  1152   end;
  1152   end;
  1153 
  1153 
  1154 fun derive_eval_thm ctxt dtor_inject dtor_unfold_thm eval_def =
  1154 fun derive_eval_thm ctxt dtor_inject dtor_unfold_thm eval_def =
  1155   (trans OF [iffD2 OF [dtor_inject, eval_def RS meta_eq_to_obj_eq RS fun_cong], dtor_unfold_thm])
  1155   (trans OF [iffD2 OF [dtor_inject, HOLogic.mk_obj_eq eval_def RS fun_cong], dtor_unfold_thm])
  1156   |> unfold_thms ctxt [o_apply, eval_def RS symmetric_thm];
  1156   |> unfold_thms ctxt [o_apply, eval_def RS symmetric_thm];
  1157 
  1157 
  1158 fun derive_eval_flat ctxt Y Z fpT ssig_T dead_ssig_map flat eval x dead_pre_map_comp0
  1158 fun derive_eval_flat ctxt Y Z fpT ssig_T dead_ssig_map flat eval x dead_pre_map_comp0
  1159     dtor_unfold_unique ssig_map_id ssig_map_comp flat_pointful_natural eval_core_pointful_natural
  1159     dtor_unfold_unique ssig_map_id ssig_map_comp flat_pointful_natural eval_core_pointful_natural
  1160     eval_core_flat eval_thm =
  1160     eval_core_flat eval_thm =
  1710     val Oper_pointful_natural = Oper_natural_pointful RS sym;
  1710     val Oper_pointful_natural = Oper_natural_pointful RS sym;
  1711     val flat_pointful_natural = mk_pointful ctxt flat_natural RS sym;
  1711     val flat_pointful_natural = mk_pointful ctxt flat_natural RS sym;
  1712     val Lam_natural_pointful = mk_pointful ctxt Lam_natural;
  1712     val Lam_natural_pointful = mk_pointful ctxt Lam_natural;
  1713     val Lam_pointful_natural = Lam_natural_pointful RS sym;
  1713     val Lam_pointful_natural = Lam_natural_pointful RS sym;
  1714     val eval_core_pointful_natural = mk_pointful ctxt eval_core_natural RS sym;
  1714     val eval_core_pointful_natural = mk_pointful ctxt eval_core_natural RS sym;
  1715     val cutSsig_def_pointful_natural = mk_pointful ctxt (cutSsig_def RS meta_eq_to_obj_eq) RS sym;
  1715     val cutSsig_def_pointful_natural = mk_pointful ctxt (HOLogic.mk_obj_eq cutSsig_def) RS sym;
  1716 
  1716 
  1717     val flat_VLeaf = derive_flat_VLeaf ctxt Y Z ssig_T x VLeaf dead_ssig_map flat ssig_induct
  1717     val flat_VLeaf = derive_flat_VLeaf ctxt Y Z ssig_T x VLeaf dead_ssig_map flat ssig_induct
  1718       fp_map_id sig_map_cong sig_map_ident sig_map_comp ssig_map_thms flat_simps;
  1718       fp_map_id sig_map_cong sig_map_ident sig_map_comp ssig_map_thms flat_simps;
  1719     val flat_flat = derive_flat_flat ctxt Y Z ssig_T x dead_ssig_map flat ssig_induct fp_map_id
  1719     val flat_flat = derive_flat_flat ctxt Y Z ssig_T x dead_ssig_map flat ssig_induct fp_map_id
  1720       sig_map_cong sig_map_comp ssig_map_thms flat_simps;
  1720       sig_map_cong sig_map_comp ssig_map_thms flat_simps;
  1995          mk_cong_rho, lthy) =
  1995          mk_cong_rho, lthy) =
  1996       derive_cong_general fp_b version fpT dead_ssig_bnf dead_pre_bnf eval Retr equivp_Retr
  1996       derive_cong_general fp_b version fpT dead_ssig_bnf dead_pre_bnf eval Retr equivp_Retr
  1997         Retr_coinduct eval_thm eval_core_transfer lthy;
  1997         Retr_coinduct eval_thm eval_core_transfer lthy;
  1998 
  1998 
  1999     val cong_alg_intro =
  1999     val cong_alg_intro =
  2000       k_as_ssig_transfer RS rel_funD RS mk_cong_rho (algrho_def RS meta_eq_to_obj_eq);
  2000       k_as_ssig_transfer RS rel_funD RS mk_cong_rho (HOLogic.mk_obj_eq algrho_def);
  2001 
  2001 
  2002     val gen_cong_emb =
  2002     val gen_cong_emb =
  2003       (@{thm gen_cong_emb} OF [old_cong_locale, cong_locale, eval_embL, embL_transfer])
  2003       (@{thm gen_cong_emb} OF [old_cong_locale, cong_locale, eval_embL, embL_transfer])
  2004       |> Local_Defs.fold lthy [old_cong_def, cong_def];
  2004       |> Local_Defs.fold lthy [old_cong_def, cong_def];
  2005 
  2005