(* generate_composite (c2 (c1 s)) in the universe graph univ
* both living in the same context and metasenv *)
let generate_composite c1 c2 context metasenv univ arity last_lam_with_inn_arg =
- let module RT = RefinementTool in
let original_metasenv = metasenv in
let c1_ty,univ = CicTypeChecker.type_of_aux' metasenv context c1 univ in
let c2_ty,univ = CicTypeChecker.type_of_aux' metasenv context c2 univ in
in
let compose c1 nc1 c2 nc2 =
Cic.Lambda
- (Cic.Name "x", (Cic.Implicit None),
+ (Cic.Name "x", (Cic.Implicit (Some `Type)),
(Cic.Appl ( CicSubstitution.lift 1 c2 :: mk_implicits nc2 @
[ Cic.Appl ( CicSubstitution.lift 1 c1 :: mk_implicits nc1 @
[if last_lam_with_inn_arg then Cic.Rel 1 else Cic.Implicit None])
let body_metasenv, lambdas_metasenv =
split_metasenv metasenv (spline_len + List.length context)
in
+ let lambdas_metasenv =
+ List.filter
+ (fun (i,_,_) ->
+ List.for_all (fun (j,_,_) -> i <> j) original_metasenv)
+ lambdas_metasenv
+ in
let term = purge_unused_lambdas lambdas_metasenv term in
let metasenv =
List.filter