Definition juicyRestrict {phi:rmap}{m:Mem.mem}(coh:access_cohere' m phi): Mem.mem:=
restrPermMap (juice2Perm_cohere coh).
Definition juicyRestrict_locks {phi:rmap}{m:Mem.mem}(coh:max_access_cohere m phi): Mem.mem:=
restrPermMap (juice2Perm_locks_cohere coh).

(* Specifications: *)
Lemma juicyRestrictContents: forall phi m (coh:access_cohere' m phi),
forall loc, contents_at m loc = contents_at (juicyRestrict coh) loc.
Lemma juicyRestrictMaxCoh: forall phi m (coh:access_cohere' m phi) (ccoh:max_access_cohere m phi),
max_access_cohere (juicyRestrict coh) phi.
Lemma juicyRestrictAllocCoh: forall phi m (coh:access_cohere' m phi) (ccoh:alloc_cohere m phi),
alloc_cohere (juicyRestrict coh) phi.
Lemma juicyRestrictCurEq:
forall (phi : rmap) (m : mem) (coh : access_cohere' m phi)
(loc : Address.address),
(access_at (juicyRestrict coh) loc) Cur = (perm_of_res (phi @ loc)).
Lemma juicyRestrictAccCoh: forall phi m (coh:access_cohere' m phi),
access_cohere (juicyRestrict coh) phi.
Lemma po_perm_of_res: forall r,
Mem.perm_order''  (perm_of_res' r) (perm_of_res r).
Lemma max_acc_coh_acc_coh: forall m phi,
max_access_cohere m phi -> access_cohere' m phi.
Lemma juicyRestrictContents: forall phi m (coh:access_cohere' m phi),
forall loc, contents_at m loc = contents_at (juicyRestrict coh) loc.
Lemma juicyRestrictMaxCoh: forall phi m (coh:access_cohere' m phi) (ccoh:max_access_cohere m phi),
max_access_cohere (juicyRestrict coh) phi.
Lemma juicyRestrictAllocCoh: forall phi m (coh:access_cohere' m phi) (ccoh:alloc_cohere m phi),
alloc_cohere (juicyRestrict coh) phi.
Lemma juicyRestrictCurEq:
forall (phi : rmap) (m : mem) (coh : access_cohere' m phi)
(loc : Address.address),
(access_at (juicyRestrict coh) loc) Cur = (perm_of_res (phi @ loc)).
Lemma juicyRestrictAccCoh: forall phi m (coh:access_cohere' m phi),
access_cohere (juicyRestrict coh) phi.
Lemma po_perm_of_res: forall r,
Mem.perm_order''  (perm_of_res' r) (perm_of_res r).
Lemma max_acc_coh_acc_coh: forall m phi,
max_access_cohere m phi -> access_cohere' m phi.