Section SemaxContext.
Hint Resolve @age_laterR : core.
(* Lemma funassert_orig_resource: forall Delta rho a a' (Hl: level a = level a') (Hr: resource_at a = resource_at a'), funassert Delta rho a -> funassert Delta rho a'. Lemma funassert_resource: forall Delta rho a a' (Hl: level a = level a') (Hr: resource_at a = resource_at a'), funassert Delta rho a -> funassert Delta rho a'.  Lemma cl_corestep_fun: forall ge m q m1 q1 m2 q2, cl_step ge q m q1 m1 -> cl_step ge q m q2 m2 -> (q1,m1)=(q2,m2).  Lemma jsafeN_local_step: forall {Espec: OracleKind} ge ora s1 m s2, cl_step  ge s1 (m_dry m) s2 (m_dry m) -> (forall m', age m m' -> jsafeN (@OK_spec Espec) ge (level m') ora s2 m') -> jsafeN (@OK_spec Espec) ge (level m) ora s1 m.  Lemma derives_skip: forall {CS: compspecs} {Espec: OracleKind} p Delta (R: ret_assert), (forall rho, p rho |-- proj_ret_assert R EK_normal None rho) -> semax Espec Delta p Clight.Sskip R.  (* Lemma jsafe_corestep_forward: forall {Espec: OracleKind} ge c m c' m' n z, jstep (cl_core_sem ge) c m c' m' -> jsafeN (@OK_spec Espec) ge (S n) z c m -> jm_bupd z (jsafeN (@OK_spec Espec) ge n z c') m'. *)
Fixpoint list_drop (A: Type) (n: nat) (l: list A) {struct n} : list A :=
match n with O => l | S i => match l with nil => nil | _ :: l' => list_drop A i l' end end.
Arguments list_drop [A] _ _.
Definition straightline (c: Clight.statement) :=
forall ge f ve te k m f' ve' te' c' k' m',
cl_step ge (State f c k ve te) m (State f' c' k' ve' te') m' ->  (c'=Sskip /\ k=k').
Definition G0: funspecs := nil.
Definition empty_genv prog_pub cenv: Clight.genv :=
Build_genv (Genv.globalenv (AST.mkprogram (F:=Clight.fundef)(V:=type) nil prog_pub (1%positive))) cenv.
Definition all_assertions_computable  :=
forall (Espec: OracleKind) psi f tx vx (Q: assert),
exists k,  assert_safe Espec psi f tx vx k = Q.
(* This is not generally true, but could be made true by adding an "assert" operator to the programming language *)

Lemma subp_derives' {A}{agA: ageable A}:
forall P Q: pred A, (forall n, (P >=> Q) n) -> P |-- Q.