(** A memory area that contains a given value *)
Definition hasvalue (chunk: memory_chunk) (b: block) (ofs: Z) (v: val) : massert :=
contains chunk b ofs (fun v' => v' = v).

Lemma storev_rule':
forall chunk m b ofs v (spec1: val -> Prop) P,
m |= contains chunk b ofs spec1 ** P ->
exists m',
Mem.storev chunk m (Vptr b (Ptrofs.repr ofs)) v = Some m' /\ m' |= hasvalue chunk b ofs (Val.load_result chunk v) ** P.