mapsto and memory_block -maybe move the lemmas using them elsewhere?*)
Definition size_compatible {C: compspecs} t p :=
match p with
| Vptr b i_ofs => Ptrofs.unsigned i_ofs + sizeof t < Ptrofs.modulus
| _ => True
end.

Lemma mapsto_valid_pointer: forall {cs: compspecs} sh t p v i,
size_compatible t p ->
0 <= i < sizeof t ->
nonidentity sh ->
mapsto sh t p v |-- valid_pointer (offset_val i p).