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 nonlock_permission_bytes_valid_pointer: forall sh b ofs n i,
0 <= ofs /\ ofs + n <= Ptrofs.modulus ->
0 <= i < n ->
nonidentity sh ->
nonlock_permission_bytes sh (b, ofs) n |-- valid_pointer (Vptr b (Ptrofs.repr (ofs + i))).