(* The addition of ghost state means that there are rmaps that have only cores for ghost state, but are not cores themselves (since they have ghost state at all). An rmap of this sort is not emp, but is its own unit. *)
Definition cored: pred rmap := ALL P : pred rmap, ALL Q : pred rmap,
P && Q --> P * Q.
Program Definition is_w w: pred rmap := fun w' => necR w w'.
Next Obligation.

Lemma join_singleton_inv: forall k a b RA c v pp,
join a b (singleton k (existT _ RA (exist _ (core c) v), pp)) ->
a = singleton k (existT _ RA (exist _ (core c) v), pp) \/ b = singleton k (existT _ RA (exist _ (core c) v), pp).