Definition StoreEffect (tv:val)(vl : list memval) (b:Values.block) (z:Z):bool :=
match tv with Vptr bb ofs => eq_block bb b &&
zle (Ptrofs.unsigned ofs) z && zlt z (Ptrofs.unsigned ofs + Z.of_nat (length vl))
| _ => false
end.

(* Specifications: *)
Lemma StoreEffect_Storev: forall m chunk tv tv' m'
(STORE : Mem.storev chunk m tv tv' = Some m'),
Mem.unchanged_on
(fun b ofs => StoreEffect tv (encode_val chunk tv') b ofs = false)
m m'.
Lemma StoreEffectD: forall vaddr v b ofs
(STE: StoreEffect vaddr v b ofs = true),
exists i, vaddr = Vptr b i /\
(Ptrofs.unsigned i) <= ofs < (Ptrofs.unsigned i + Z.of_nat (length v)).
Lemma free_curWR m sp lo hi m' (FR: Mem.free m sp lo hi = Some m')
b z (EFF: FreeEffect m lo hi sp b z = true):
Mem.perm m b z Cur Writable.
Lemma storev_curWR ch m vaddr v m' (ST:Mem.storev ch m vaddr v = Some m')
b z (EFF : StoreEffect vaddr (encode_val ch v) b z = true):
Mem.perm m b z Cur Writable.
Lemma freelist_curWR l: forall m m' (FR: Mem.free_list m l = Some m')
b z (EFF : FreelistEffect m l b z = true),
Mem.perm m b z Cur Writable.