destruct res; simpl; auto.
- apply perm_coh_empty_1.
- destruct k; try apply perm_coh_empty_1; simpl.
destruct (perm_of_sh (Share.glb Share.Rsh sh)) eqn: ?; auto.
destruct p0; auto.
eapply perm_of_glb_not_Freeable; eauto.
Qed.

(* Specifications: *)
Lemma perm_coh_joins:
forall a b, joins a b ->
perm_coh (perm_of_res a) (perm_of_res_lock b).
Lemma po_join_sub_lock:
forall r1 r2 ,
join_sub r2 r1 ->
Mem.perm_order'' (perm_of_res_lock r1) (perm_of_res_lock r2).