(* {{{ *) debug_print (lazy ("FO_UNIF_SUBST: " ^
CicMetaSubst.ppterm_in_context ~metasenv subst last context ^
" <==> " ^
- CicMetaSubst.ppterm_in_context ~metasenv subst t context));
+ CicMetaSubst.ppterm_in_context ~metasenv subst t context ^
+ "####" ^ CicMetaSubst.ppterm_in_context ~metasenv subst c
+ context));
debug_print (lazy ("FO_UNIF_SUBST: " ^
CicPp.ppterm last ^ " <==> " ^ CicPp.ppterm t)); (* }}} *)
let subst,metasenv,ugraph =
CicTypeChecker.type_of_aux' ~subst metasenv context c
CicUniv.empty_ugraph in
let _,metasenv,args,lastmeta =
- TermUtil.saturate_term freshmeta metasenv context ty arity in
+ TermUtil.saturate_term ~delta:false freshmeta metasenv context ty arity in
let irl =
CicMkImplicit.identity_relocation_list_for_metavariable context
in
(* hypothesis, a list of arguments for the new applications and the index of *)
(* the last new META introduced. The nth argument in the list of arguments is *)
(* just the nth new META. *)
-let saturate_term newmeta metasenv context ty goal_arity =
+let saturate_term ?(delta=true) newmeta metasenv context ty goal_arity =
let module C = Cic in
let module S = CicSubstitution in
assert (goal_arity >= 0);
lastmeta,prod_no + 1
| t ->
let head = CicReduction.normalize ~delta:false context t in
- match CicReduction.whd context head with
+ match CicReduction.whd context head ~delta with
C.Prod _ as head' -> aux newmeta head'
| _ -> head,[],[],newmeta,0
in
(* the last new META introduced. The nth argument in the list of arguments is *)
(* just the nth new META. *)
val saturate_term:
+ ?delta: bool -> (* default true *)
int -> Cic.metasenv -> Cic.context -> Cic.term -> int ->
Cic.term * Cic.metasenv * Cic.term list * int