Definition juicyRestrict':=
      fun phi m macoh => @juicyRestrict phi m (max_acc_coh_acc_coh macoh).

(* Specifications: *)
Lemma juicyRestrictAccCoh': forall phi m (coh:max_access_cohere m phi), access_cohere (juicyRestrict' coh) phi.
Lemma po_join_sub': forall r1 r2 : resource, join_sub r2 r1 -> Mem.perm_order'' (perm_of_res' r1) (perm_of_res' r2).
Lemma mem_access_coh_sub: forall phi1 phi2 m, max_access_cohere m phi1 -> join_sub phi2 phi1 -> max_access_cohere m phi2.
Lemma mem_cohere_sub: forall phi1 phi2 m, mem_cohere' m phi1 -> join_sub phi2 phi1 -> mem_cohere' m phi2.
Lemma compatible_threadRes_sub: forall js i (cnt:containsThread js i), forall all_juice, join_all js all_juice -> join_sub (getThreadR cnt) all_juice.
Lemma mem_compat_thread_max_cohere {tp m} (compat: mem_compatible tp m): forall {i} cnti, max_access_cohere m (@getThreadR _ _ _ i tp cnti).
Lemma thread_mem_compatible: forall tp m, mem_compatible tp m -> mem_thcohere tp m.
Lemma compatible_lockRes_sub: forall js l R phi, lockRes js l = Some (R, Some phi) -> forall all_juice, join_all js all_juice -> join_sub phi all_juice.
Lemma lock_mem_compatible: forall tp m, mem_compatible tp m -> mem_lock_cohere (lockGuts tp) m.
Lemma juicyRestrictAccCoh': forall phi m (coh:max_access_cohere m phi), access_cohere (juicyRestrict' coh) phi.
Lemma po_join_sub': forall r1 r2 : resource, join_sub r2 r1 -> Mem.perm_order'' (perm_of_res' r1) (perm_of_res' r2).
Lemma mem_access_coh_sub: forall phi1 phi2 m, max_access_cohere m phi1 -> join_sub phi2 phi1 -> max_access_cohere m phi2.
Lemma mem_cohere_sub: forall phi1 phi2 m, mem_cohere' m phi1 -> join_sub phi2 phi1 -> mem_cohere' m phi2.
Lemma compatible_threadRes_sub: forall js i (cnt:containsThread js i), forall all_juice, join_all js all_juice -> join_sub (getThreadR cnt) all_juice.
Lemma mem_compat_thread_max_cohere {tp m} (compat: mem_compatible tp m): forall {i} cnti, max_access_cohere m (@getThreadR _ _ _ i tp cnti).
Lemma thread_mem_compatible: forall tp m, mem_compatible tp m -> mem_thcohere tp m.
Lemma compatible_lockRes_sub: forall js l phi, lockRes js l = Some (Some phi) -> forall all_juice, join_all js all_juice -> join_sub phi all_juice.
Lemma lock_mem_compatible: forall tp m, mem_compatible tp m -> mem_lock_cohere (lockGuts tp) m.