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 SEP_later_derives:
forall P Q P' Q',
P |-- |> P' ->
SEPx Q |-- |> SEPx Q' ->
SEPx (P::Q) |-- |> SEPx (P'::Q').