let _, metasenv, _, _, _ = proof in
let _, context, _ = CicUtil.lookup_meta goal metasenv in
let index, ty = H.lookup_type metasenv context what in
+ let pattern = PET.conclusion_pattern (Some (C.Rel index)) in
let tac =
if check_type sorts metasenv context (S.lift index ty) then
- T.then_ ~start:(P.elim_intros_tac ~mk_fresh_name_callback (C.Rel index))
+ T.then_ ~start:(P.elim_intros_tac ~mk_fresh_name_callback pattern)
~continuation:(PESR.clear [what])
else
let msg = "unexported elim_clear: not an decomposable type" in
let elim_type_tac ?(mk_fresh_name_callback = F.mk_fresh_name ~subst:[]) ?depth
?using what
=
- let elim what =
- P.elim_intros_simpl_tac ?using ?depth ~mk_fresh_name_callback what
+ let elim =
+ P.elim_intros_simpl_tac ?using ?depth ~mk_fresh_name_callback
in
let elim_type_tac status =
+ let pattern = PET.conclusion_pattern (Some (C.Rel 1)) in
let tac =
- T.thens ~start: (P.cut_tac what) ~continuations:[elim (C.Rel 1); T.id_tac]
+ T.thens ~start: (P.cut_tac what) ~continuations:[elim pattern; T.id_tac]
in
PET.apply_tactic tac status
in