(*Require Import VST.concurrency.cl_step_lemmas. Require Import VST.concurrency.resource_decay_lemmas. Require Import VST.concurrency.resource_decay_join.*)
Set Bullet Behavior "Strict Subproofs".
(* typically given by lock_coherence: *)

Lemma permMapLt_local_locks ge m i (tp : jstate ge) Phi b ofs ophi
(compat : mem_compatible_with tp m Phi)
(cnti : containsThread tp i)
(Efind : AMap.find (elt:=option rmap) (b, Ptrofs.unsigned ofs) (lset tp) = Some ophi) :
permMapLt
(setPermBlock (Some Writable) b (Ptrofs.intval ofs)
(juice2Perm_locks (getThreadR cnti) m) LKSIZE_nat)
(getMaxPerm m).