equal
deleted
inserted
replaced
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 |