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.

Lemma semax_if: forall x c1 c2 vars G (P: assert),
expcheck vars x = true ->
semax vars G (fun s => !!(eval x s <> 0) && P s) c1 ->
semax vars G (fun s => !! (eval x s = 0) && P s) c2 ->
semax vars G P (If x Then c1 Else c2).