new_fresh_meta,newmetasenvfragment,exp_named_subst',exp_named_subst_diff
;;
-let new_metasenv_and_unify_and_t newmeta' metasenv' context term' ty termty goal_arity =
+let new_metasenv_and_unify_and_t newmeta' metasenv' subst context term' ty termty goal_arity =
let (consthead,newmetasenv,arguments,_) =
TermUtil.saturate_term newmeta' metasenv' context termty
goal_arity in
let subst,newmetasenv',_ =
- CicUnification.fo_unif newmetasenv context consthead ty CicUniv.empty_ugraph
+ CicUnification.fo_unif_subst
+ subst context newmetasenv consthead ty CicUniv.empty_ugraph
in
let t =
if List.length arguments = 0 then term' else Cic.Appl (term'::arguments)
let subst,newmetasenv',t =
let rec add_one_argument n =
try
- new_metasenv_and_unify_and_t newmeta' metasenv' context term' ty
+ new_metasenv_and_unify_and_t newmeta' metasenv' subst context term' ty
termty n
with CicUnification.UnificationFailure _ when n > 0 ->
add_one_argument (n - 1)
ProofEngineHelpers.subst_meta_and_metasenv_in_proof proof metano subst_in
newmetasenv''
in
- let subst = ((metano,(context,bo',Cic.Implicit None))::subst) in
+ let subst = ((metano,(context,bo',ty))::subst) in
subst,
(newproof, List.map (function (i,_,_) -> i) new_uninstantiatedmetas),
max maxmeta (CicMkImplicit.new_meta newmetasenv''' subst)