Definition mapsto_zeros (n: Z) (sh: share) (a: val) : mpred :=
match a with
| Vptr b z =>
!! (0 <= Ptrofs.unsigned z  /\ n + Ptrofs.unsigned z < Ptrofs.modulus)%Z &&
address_mapsto_zeros sh (nat_of_Z n) (b, Ptrofs.unsigned z)
| _ => FF
end.
Fixpoint memory_block' (sh: share) (n: nat) (b: block) (i: Z) : mpred :=
match n with
| O => emp
| S n' => mapsto_ sh (Tint I8 Unsigned noattr) (Vptr b (Ptrofs.repr i))
* memory_block' sh n' b (i+1)
end.
Definition memory_block'_alt (sh: share) (n: nat) (b: block) (ofs: Z) : mpred :=
if readable_share_dec sh
then VALspec_range (Z_of_nat n) sh (b, ofs)
else nonlock_permission_bytes sh (b,ofs) (Z.of_nat n).

Lemma memory_block'_eq:
forall sh n b i,
0 <= i ->
Z_of_nat n + i < Ptrofs.modulus ->
memory_block' sh n b i = memory_block'_alt sh n b i.