Module R := R0.
Hint Resolve (@subp_sepcon _ Join_rmap Perm_rmap Sep_rmap): contractive.

Lemma deallocate:
forall (phi: rmap) (f g : AV.address -> resource) a b,
(forall l, join  (f l) (g l) (phi@l)) -> join a b (ghost_of phi) ->
exists phi1, exists phi2,
join phi1 phi2 phi /\ resource_at phi1 = f /\ ghost_of phi1 = a.