src/HOL/Tools/BNF/bnf_fp_def_sugar_tactics.ML
changeset 59580 cbc38731d42f
parent 59498 50b60f501b05
child 59582 0fbed69ff081
equal deleted inserted replaced
59579:d8fff0b94c53 59580:cbc38731d42f
    95 fun co_induct_inst_as_projs ctxt k thm =
    95 fun co_induct_inst_as_projs ctxt k thm =
    96   let
    96   let
    97     val fs = Term.add_vars (prop_of thm) []
    97     val fs = Term.add_vars (prop_of thm) []
    98       |> filter (fn (_, Type (@{type_name fun}, [_, T'])) => T' <> HOLogic.boolT | _ => false);
    98       |> filter (fn (_, Type (@{type_name fun}, [_, T'])) => T' <> HOLogic.boolT | _ => false);
    99     fun mk_cfp (f as (_, T)) =
    99     fun mk_cfp (f as (_, T)) =
   100       (certify ctxt (Var f), certify ctxt (mk_proj T (num_binder_types T) k));
   100       (Proof_Context.cterm_of ctxt (Var f), Proof_Context.cterm_of ctxt (mk_proj T (num_binder_types T) k));
   101     val cfps = map mk_cfp fs;
   101     val cfps = map mk_cfp fs;
   102   in
   102   in
   103     Drule.cterm_instantiate cfps thm
   103     Drule.cterm_instantiate cfps thm
   104   end;
   104   end;
   105 
   105