let module PT = PrimitiveTactics in
let _,metasenv,_,_ = proof in
let _,context,ty = CicUtil.lookup_meta goal metasenv in
- let ctxlen = List.length context in
let rec find n = function
| [] -> []
| hd::tl ->
let res =
(* we should check that the hypothesys has not been cleared *)
- if List.nth context (ctxlen - n) = None then
+ if List.nth context (n-1) = None then
None
else
try
*)
Some (subst,(proof, goal_list))
with
- PET.Fail _ -> None
+ PET.Fail _ -> None
in
(match res with
| Some res -> res::(find (n+1) tl)