match ty with
C.Cast (te,_) -> collect_context context howmany do_whd te
| C.Prod (n,s,t) ->
- let n' = mk_fresh_name metasenv context n ~typ:s in
+ let n' = mk_fresh_name metasenv context n ~typ:s in
let (context',ty,bo) =
- let ctx = (Some (n',(C.Decl s)))::context in
+ let entry = match n' with
+ | C.Name _ -> Some (n',(C.Decl s))
+ | C.Anonymous -> None
+ in
+ let ctx = entry :: context in
collect_context ctx (howmany - 1) do_whd t
in
(context',ty,C.Lambda(n',s,bo))
PET.mk_tactic (apply_tac ~term)
let intros_tac ?howmany ?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[]) ()=
- let intros_tac
- ?(mk_fresh_name_callback = (FreshNamesGenerator.mk_fresh_name ~subst:[])) ()
- (proof, goal)
+ let intros_tac (proof, goal)
=
let module C = Cic in
let module R = CicReduction in
in
(newproof, [newmeta])
in
- PET.mk_tactic (intros_tac ~mk_fresh_name_callback ())
+ PET.mk_tactic intros_tac
let cut_tac ?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[]) term =
let cut_tac
PET.mk_tactic elim_tac
;;
-let cases_intros_tac ?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[]) term =
+let cases_intros_tac ?(howmany=(-1)) ?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[]) term =
let cases_tac ~term (proof, goal) =
let module TC = CicTypeChecker in
let module U = UriManager in