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 PROP_later_derives:
forall P QR QR', QR |-- |>QR' ->
PROPx P QR |-- |> PROPx P QR'.