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').

Lemma extract_exists_pre {CS: compspecs} {Espec: OracleKind}:
forall  (A : Type) (P : A -> assert) c Delta (R: ret_assert),
(forall x, semax Espec Delta (P x) c R) ->
semax Espec Delta (fun rho => exp (fun x => P x rho)) c R.