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.

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.