Definition after_alloc
(lo hi: Z) (b: block) (phi: rmap)(H: forall ofs, phi @ (b,ofs) = NO Share.bot bot_unreadable) : rmap :=
proj1_sig (make_rmap (after_alloc' lo hi b phi H) (ghost_of phi)
(level phi)
(after_alloc'_ok lo hi b phi H) (ghost_of_approx phi)).
Definition mod_after_alloc' (phi: rmap) (lo hi: Z) (b: block)
: address -> resource := fun loc =>
if adr_range_dec (b,lo) (hi-lo) loc
then YES Share.top readable_share_top (VAL Undef) NoneP
else core phi @ loc.

Lemma mod_after_alloc'_ok : forall phi lo hi b,
resource_fmap (approx (level phi)) (approx (level phi)) oo (mod_after_alloc'  phi lo hi b)
= mod_after_alloc' phi lo hi b.