Cic.Prod (n,s,t) -> 1 + count_prods (Some (n,Cic.Decl s)::context) t
| _ -> 0
-let apply_tac_verbose ~term (proof, goal) =
+let apply_tac_verbose_with_subst ~term (proof, goal) =
(* Assumption: The term "term" must be closed in the current context *)
let module T = CicTypeChecker in
let module R = CicReduction in
let (newproof, newmetasenv''') =
subst_meta_and_metasenv_in_proof proof metano subst_in newmetasenv''
in
- (subst_in,
- (newproof,
- List.map (function (i,_,_) -> i) new_uninstantiatedmetas))
+ (((metano,(context,bo',Cic.Implicit None))::subst)(* subst_in *), (* ALB *)
+ (newproof,
+ List.map (function (i,_,_) -> i) new_uninstantiatedmetas))
-let apply_tac ~term status = snd (apply_tac_verbose ~term status)
-let apply_tac_verbose ~term status =
+(* ALB *)
+let apply_tac_verbose_with_subst ~term status =
try
- apply_tac_verbose ~term status
+(* apply_tac_verbose ~term status *)
+ apply_tac_verbose_with_subst ~term status
(* TODO cacciare anche altre eccezioni? *)
with
| CicUnification.UnificationFailure _ as e ->
| CicTypeChecker.TypeCheckerFailure _ as e ->
raise (Fail (Printexc.to_string e))
+(* ALB *)
+let apply_tac_verbose ~term status =
+ let subst, status = apply_tac_verbose_with_subst ~term status in
+ (CicMetaSubst.apply_subst subst), status
+
+let apply_tac ~term status = snd (apply_tac_verbose ~term status)
+
(* TODO per implementare i tatticali e' necessario che tutte le tattiche
sollevino _solamente_ Fail *)
let apply_tac ~term =