Hint Resolve mem_erasure_idempotent mem_erasure_dilute_1
mem_erasure_restr: mem_erasure.
Record mem_erasure' (m m': mem) :=
{ perm_le':
forall b ofs k,
Mem.valid_block m b->
Mem.perm_order'' ((Mem.mem_access m')#b ofs k)
((Mem.mem_access m)#b ofs k);
erased_contents': forall b ofs,
memval_erasure (ZMap.get ofs ((Mem.mem_contents m) # b))
(ZMap.get ofs ((Mem.mem_contents m') # b));
erased_nb': Mem.nextblock m = Mem.nextblock m'
}.

(* Specifications: *)
Lemma mem_erasure'_erase:
forall m m',
mem_erasure' m m' ->
mem_erasure m (erasePerm m').
Lemma alloc_erasure':
forall m m' lo hi m2 m2' b b'
(Herased: mem_erasure m m')
(Halloc: Mem.alloc m lo hi = (m2, b))
(Halloc': Mem.alloc m' lo hi = (m2', b')),
mem_erasure' m2 m2' /\ b = b'.
Lemma mem_free_erasure':
forall m m' lo hi m2 b
(Herased: mem_erasure m m')
(Hfree: Mem.free m b lo hi = Some m2),
exists m2',
Mem.free m' b lo hi = Some m2' /\
mem_erasure' m2 m2'.
Lemma mem_store_erased':
forall chunk m m' b ofs v v' m2
(Hstore: Mem.store chunk m b ofs v = Some m2)
(Herased: mem_erasure' m m')
(Hval_erasure: val_erasure v v') ,
exists m2', Mem.store chunk m' b ofs v' = Some m2'
/\ mem_erasure' m2 m2'.
Lemma mem_storev_erased':
forall chunk m m' vptr v v' m2
(Hstore: Mem.storev chunk m vptr v = Some m2)
(Herased: mem_erasure' m m')
(Hval_erasure: val_erasure v v') ,
exists m2', Mem.storev chunk m' vptr v' = Some m2'
/\ mem_erasure' m2 m2'.
Lemma mem_loadv_erased' :
forall (chunk : memory_chunk) (m m' : mem) (vptr v : val)
(Hload: Mem.loadv chunk m vptr = Some v)
(Herased: mem_erasure' m m'),
exists v' : val, Mem.loadv chunk m' vptr = Some v' /\ val_erasure v v'.
Lemma mem_erasure_erasure':
forall m m',
mem_erasure m m' ->
mem_erasure' m m'.