+and guess_name subst ctx ty =
+ let aux initial = "#" ^ String.make 1 initial in
+ match ty with
+ | C.Const (NReference.Ref (u,_))
+ | C.Appl (C.Const (NReference.Ref (u,_)) :: _) ->
+ aux (String.sub (NUri.name_of_uri u) 0 1).[0]
+ | C.Prod _ -> aux 'f'
+ | C.Meta (n,lc) ->
+ (try
+ let _,_,t,_ = NCicUtils.lookup_subst n subst in
+ guess_name subst ctx (NCicSubstitution.subst_meta lc t)
+ with NCicUtils.Subst_not_found _ -> aux 'M')
+ | _ -> aux 'H'
+
+and eat_prods rdb ~localise force_ty metasenv subst context expty orig_t orig_he he ty_he args =