Definition funsig_of_funspec (fs: funspec) : funsig :=
 match fs with mk_funspec fsig _ _ _ _ _ _ => fsig end.Definition params_of_funspec (fs: funspec) : list (ident * type) :=
  fst (funsig_of_funspec fs).Definition return_of_funspec (fs: funspec) : type :=
  snd (funsig_of_funspec fs).Definition funsig_tycontext (fs: funsig) : tycontext :=
  make_tycontext (fst fs) nil nil (snd fs) nil nil nil.Definition funsig_of_function (f: function) : funsig :=
  (fn_params f, fn_return f).Definition is_NDfunspec (fs: funspec) :=
 match fs with
 | mk_funspec _ _ (rmaps.ConstType A) P Q _ _ =>
    (forall ts, P ts = P nil /\ Q ts = Q nil)
 | _ => False
 end.

Lemma NDsubsume_subsume: forall f1 f2, is_NDfunspec f2 -> NDsubsume_funspec f1 f2 -> subsume_funspec f1 f2.