Tactic Notation "viewshift_SEP" constr(n) constr(R) :=
first [apply (replace_SEP'_bupd (nat_of_Z n) R) | apply (replace_SEP''_bupd (nat_of_Z n) R)];
unfold my_nth,replace_nth; simpl nat_of_Z;
repeat simpl_nat_of_P; cbv beta iota; cbv beta iota.
Tactic Notation "viewshift_SEP" constr(n) constr(R) "by" tactic1(t):=
first [apply (replace_SEP'_bupd (nat_of_Z n) R) | apply (replace_SEP''_bupd (nat_of_Z n) R)];
unfold my_nth,replace_nth; simpl nat_of_Z;
repeat simpl_nat_of_P; cbv beta iota; cbv beta iota; [ now t | ].
Ltac replace_in_pre S S' :=
match goal with |- @semax _ _ _ ?P _ _ =>
match P with context C[S] =>
let P' := context C[S'] in
apply semax_pre with P'; [ | ]
end
end.

(* Specifications: *)
Lemma semax_extract_PROP_True:
forall Espec {cs: compspecs} Delta (PP: Prop) P QR c Post,
PP ->
@semax cs Espec Delta (PROPx P QR) c Post ->
@semax cs Espec Delta (PROPx (PP::P) QR) c Post.
Lemma semax_extract_PROP:
forall Espec {cs: compspecs} Delta (PP: Prop) P QR c Post,
(PP -> @semax cs Espec Delta (PROPx P QR) c Post) ->
@semax cs Espec Delta (PROPx (PP::P) QR) c Post.
Lemma PROP_later_derives:
forall P QR QR', QR |-- |>QR' ->
PROPx P QR |-- |> PROPx P QR'.
Lemma LOCAL_later_derives:
forall Q R R', R |-- |>R' -> LOCALx Q R |-- |> LOCALx Q R'.
Lemma SEP_later_derives:
forall P Q P' Q',
P |-- |> P' ->
SEPx Q |-- |> SEPx Q' ->
SEPx (P::Q) |-- |> SEPx (P'::Q').