(* From now on we recreate a kernel abstraction where substitutions are part of
* the calculus *)
+let lift metasenv subst n term =
+ (* TODO unwind's result is thrown away :-( *)
+ let (subst, _) = unwind_subst metasenv subst in
+ let term = apply_subst subst term in
+ try
+ CicSubstitution.lift n term
+ with e ->
+ raise (MetaSubstFailure ("Lift failure: " ^
+ Printexc.to_string e))
+
let whd metasenv subst context term =
(* TODO unwind's result is thrown away :-( *)
let (subst, _) = unwind_subst metasenv subst in