Section initial_mem.
Variables (m: mem) (w: rmap).
Definition initial_rmap_ok :=
forall loc, ((fst loc >= nextblock m)%positive -> core w @ loc = NO Share.bot bot_unreadable) /\
(match w @ loc with
| PURE _ _ => (fst loc < nextblock m)%positive /\
access_at m loc Cur = Some Nonempty /\
max_access_at m loc = Some Nonempty
| _ => True end).
Hypothesis IOK: initial_rmap_ok.
End initial_mem.
Definition empty_retainer (loc: address) := Share.bot.

(* Specifications: *)
Lemma perm_of_freeable: perm_of_sh Share.top = Some Freeable.
Lemma perm_of_writable:
forall sh, writable_share sh -> sh <> Share.top -> perm_of_sh sh = Some Writable.
Lemma perm_of_readable:
forall sh (rsh: readable_share sh), ~writable0_share sh -> perm_of_sh sh = Some Readable.
Lemma perm_of_nonempty:
forall sh, sh <> Share.bot -> ~readable_share sh -> perm_of_sh sh = Some Nonempty.
Lemma perm_of_empty:
perm_of_sh Share.bot = None.
Lemma perm_of_Ews: perm_of_sh Ews = Some Writable.
Lemma perm_of_Ers: perm_of_sh Ers = Some Readable.
Lemma extern_retainer_neq_bot: extern_retainer <> Share.bot.
Lemma perm_order''_trans: forall a b c, Mem.perm_order'' a b ->  Mem.perm_order'' b c ->
Mem.perm_order'' a c.