Qed.
(* Here we build the [rmap]s that correspond to [store]s, [alloc]s and [free]s on the dry memory. *)
Section inflate.
Variables (m: mem) (phi: rmap).
Definition inflate_initial_mem' (w: rmap) (loc: address) :=
match access_at m loc Cur with
| Some Freeable => YES Share.top readable_share_top (VAL (contents_at m loc)) NoneP
| Some Writable => YES Ews (writable_readable writable_Ews) (VAL (contents_at m loc)) NoneP
| Some Readable => YES Ers readable_Ers (VAL (contents_at m loc)) NoneP
| Some Nonempty =>
match w @ loc with PURE _ _ => w @ loc | _ => NO _ nonreadable_extern_retainer end
| None =>  NO Share.bot bot_unreadable
end.

(* Specifications: *)
Lemma inflate_initial_mem'_fmap:
forall w, resource_fmap (approx (level w)) (approx (level w)) oo inflate_initial_mem' w =
inflate_initial_mem' w.