Definition semax'  := HORec semax_.Definition semax vars (G: funspecs) (P: assert) (k: control) : Prop :=
       typecheck vars k = true /\ forall n,  semax' (SemaxArg vars (fun s => P s && funassert G) k) n.Definition semax_func (G: funspecs) (p: program) (G': funspecs) :=
    match_specs p G' /\
    forall n, believe_all semax' G p G' n.

(* Specifications: *)
Lemma semax_func_nil: forall G, semax_func G nil nil.
Lemma semax_func_cons: forall fs id f vars P (G G': funspecs), inlist id (map (@fst adr (list var * control)) fs) = false -> list_nodups vars = true -> length vars = length (fst P) -> semax vars G (fun s => call P (map s vars)) f -> semax_func G fs G' -> semax_func G ((id, (vars,f))::fs) ((id, P) :: G').
Lemma semax_G: forall vars G P c, semax vars G (fun s => P s && funassert G) c -> semax vars G P c.
Lemma semax_go: forall vars G (P: funspec) x ys, typecheck vars (Go x ys) = true -> semax vars G (fun s => cont P (eval x s) && call P (eval_list ys s)) (Go x ys) .
Lemma semax_exp: forall {A} vars G (P: A -> assert) c, typecheck vars c = true -> (forall v:A, semax vars G (P v) c) -> semax vars G (fun s => EX v:A, (P v s)) c.
Lemma semax_exp': forall {A} (any: A) vars G (P: A -> assert) c, (forall v:A, semax vars G (P v) c) -> semax vars G (fun s => EX v:A, (P v s)) c.