Section selectors.
Variable (j: juicy_mem).
Definition m_dry := match j with mkJuicyMem m _ _ _ _ _ => m end.
Definition m_phi := match j with mkJuicyMem _ phi _ _ _ _ => phi end.

Lemma writable_inv: forall phi loc, writable loc phi ->
exists sh, exists rsh, exists k, exists pp,
phi @ loc = YES sh rsh k pp /\
writable0_share sh /\
isVAL k.