(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* error ("The term is not well-typed in the environment of " ^ string_of_existential ev) in evar_define ev typed_c (evars_reset_evd sigma evd) (* vernac command Existential *) let instantiate_pf_com n com pfts = let gls = top_goal_of_pftreestate pfts in let sigma = gls.sigma in let (sp,evi) (* as evc *) = try List.nth (Evarutil.non_instantiated sigma) (n-1) with Failure _ -> error "not so many uninstantiated existential variables" in let env = Evd.evar_env evi in let rawc = Constrintern.intern_constr sigma env com in let evd = create_evar_defs sigma in let evd' = w_refine sp rawc evd in change_constraints_pftreestate (evars_of evd') pfts