Ltac inv H := (apply join_YES_pfullshare1 in H || apply join_YES_pfullshare2 in H || idtac);
(inversion H; clear H; subst).
Definition empty_rmap' : rmap'.
set (f:= fun _: AV.address => NO).
assert (R.valid f).
red; unfold f; simpl.
apply AV.valid_empty.
exact (exist _ f H).
Defined.
Definition empty_rmap (n:nat) : rmap := R.squash (n, empty_rmap').

(* Specifications: *)
Lemma emp_empty_rmap: forall n, emp (empty_rmap n).
Lemma empty_rmap_level:
forall lev, level (empty_rmap lev) = lev.
Lemma approx_FF: forall n, approx n FF = FF.
Lemma resource_at_make_rmap: forall f V lev H, resource_at (proj1_sig (make_rmap f V lev H)) = f.
refine (fun f V lev H => match proj2_sig (make_rmap f V lev H) with
| conj _ RESOURCE_AT => RESOURCE_AT
end).