Program Definition HO_pred_eq {T}{agT: ageable T}
(A: Type) (P: A -> pred T) (A': Type) (P': A' -> pred T) : pred nat :=
fun v => exists H: A=A',
match H in (_ = A) return (A -> pred T) -> Prop with
| refl_equal => fun (u3: A -> pred T) =>
forall x: A, (P x <=> u3 x) v
end P'.
Next Obligation.
intros; intro; intros.
destruct H0. exists x.
destruct x.
intros. specialize (H0 x). eapply pred_hereditary; eauto.
Qed.

Lemma semax_func_cons:
forall
fs id f cc (A: TypeTree) P Q NEP NEQ (V: varspecs) (G G': funspecs) {C: compspecs},
andb (id_in_list id (map (@fst _ _) G))
(andb (negb (id_in_list id (map (@fst ident fundef) fs)))
(semax_body_params_ok f)) = true ->
Forall
(fun it : ident * type =>
complete_type cenv_cs (snd it) =
true) (fn_vars f) ->
var_sizes_ok cenv_cs (f.(fn_vars)) ->
f.(fn_callconv) = cc ->
precondition_closed f P ->
semax_body V G f (id, mk_funspec (fn_funsig f) cc A P Q NEP NEQ) ->
semax_func V G fs G' ->
semax_func V G ((id, Internal f)::fs)
((id, mk_funspec (fn_funsig f) cc A P Q NEP NEQ)  :: G').