src/HOL/Tools/BNF/bnf_gfp_grec_sugar_tactics.ML
changeset 64379 71f42dcaa1df
parent 63856 0db1481c1ec1
child 67710 cc2db3239932
equal deleted inserted replaced
64378:e9eb0b99a44c 64379:71f42dcaa1df
   116       |> maps (fn thm => [thm, thm RS @{thm subst[OF eq_commute, of "%e. e = z" for z]}]);
   116       |> maps (fn thm => [thm, thm RS @{thm subst[OF eq_commute, of "%e. e = z" for z]}]);
   117 
   117 
   118     val case_dtor' = unfold_thms ctxt shared_simps case_dtor;
   118     val case_dtor' = unfold_thms ctxt shared_simps case_dtor;
   119     val disc_sel_eq_cases' = map (mk_abs_def
   119     val disc_sel_eq_cases' = map (mk_abs_def
   120       o unfold_thms ctxt (case_dtor' :: ctr_defs @ shared_simps)) disc_sel_eq_cases;
   120       o unfold_thms ctxt (case_dtor' :: ctr_defs @ shared_simps)) disc_sel_eq_cases;
   121     val const_pointful_naturals' = map (unfold_thms ctxt shared_simps) const_pointful_naturals;
   121     val extra_naturals = Facts.retrieve (Context.Proof ctxt) (Proof_Context.facts_of ctxt)
       
   122       ("friend_of_corec_simps", Position.none) |> #thms;
       
   123     val const_pointful_naturals' = map (unfold_thms ctxt shared_simps)
       
   124       (extra_naturals @ const_pointful_naturals);
   122     val const_pointful_naturals_sym' = map (fn thm => thm RS sym) const_pointful_naturals';
   125     val const_pointful_naturals_sym' = map (fn thm => thm RS sym) const_pointful_naturals';
   123     val case_eq_ifs' = map mk_abs_def (@{thm sum.case_eq_if} :: case_eq_ifs);
   126     val case_eq_ifs' = map mk_abs_def (@{thm sum.case_eq_if} :: case_eq_ifs);
   124 
   127 
   125     val distrib_consts =
   128     val distrib_consts =
   126       abs :: rep :: ctor :: eval :: map apply_func (ssig_map :: fpsig_nesting_maps);
   129       abs :: rep :: ctor :: eval :: map apply_func (ssig_map :: fpsig_nesting_maps);