Definition isVAL (r : resource) :=
match r with
| YES _ _ (VAL _) _ => Logic.True
| _ => False
end.

Lemma juicyRestrict_ext  m phi phi' pr pr' :
(forall loc, perm_of_res (phi @ loc) = perm_of_res (phi' @ loc)) ->
@juicyRestrict phi m (acc_coh pr) = @juicyRestrict phi' m (acc_coh pr').