+ let is_in_scope_meta subst = function
+ | NCic.Meta (i,_) ->
+ (try
+ let tag, _, _, _ = NCicUtils.lookup_subst i subst in
+ tag = Some in_scope_tag
+ with NCicUtils.Subst_not_found _ -> false)
+ | _ -> false
+ in
+ let contains_in_scope subst t =
+ let rec aux _ () = function
+ | NCic.Meta _ as t ->
+ if is_in_scope_meta subst t then raise Found
+ else ()
+ | t ->
+ if is_in_scope_meta subst t then raise Found
+ else NCicUtils.fold (fun _ () -> ()) () aux () t
+ in
+ try aux () () t; false with Found -> true
+ in
+ let unify_list ~alpha in_scope =