+ | _, C.Meta (n,ctx), _ ->
+ (try
+ let _,_, term,_ = NCicUtils.lookup_subst n subst in
+ head_beta_reduce ~delta ~upto ~subst
+ (NCicSubstitution.subst_meta ctx term) l
+ with NCicUtils.Subst_not_found _ -> if l = [] then t else C.Appl (t::l))
+ | _, C.Appl (hd::tl), _ -> head_beta_reduce ~delta ~upto ~subst hd (tl @ l)