Opaque lockRes.

Lemma invariant_freelock:
forall tpc tpf mc mf f c cf b1 b2 ofs pdata i
(Hf: f b1 = Some b2)
(pfc: containsThread tpc i)
(pff: containsThread tpf i),
let tpc' := remLockSet
(updThread pfc c
(setPermBlock_var pdata b1 ofs (getThreadR pfc)#1 lksize.LKSIZE_nat,
setPermBlock None b1 ofs
(getThreadR pfc)#2 lksize.LKSIZE_nat)) (b1,ofs) in
let tpf' := remLockSet (updThread pff cf
(setPermBlock_var pdata b2 ofs (getThreadR pff)#1 lksize.LKSIZE_nat,
setPermBlock None b2 ofs
(getThreadR pff)#2 lksize.LKSIZE_nat)) (b2, ofs) in
forall
(HinvF: invariant tpf)
(HinvC': invariant tpc')
(HmemCompC: mem_compatible tpc mc)
(HmemCompF: mem_compatible tpf mf)
(HsimWeak: forall tid (pfc0 : containsThread tpc tid)
(pff0 : containsThread tpf tid),
weak_tsim f pfc0 pff0 HmemCompC HmemCompF)
(Htsim: mem_obs_eq f (restrPermMap (compat_th _ _ HmemCompC pfc).1)
(restrPermMap (compat_th _ _ HmemCompF pff).1))
(HtsimL: mem_obs_eq f (restrPermMap (compat_th _ _ HmemCompC pfc).2)
(restrPermMap (compat_th _ _ HmemCompF pff).2))
(Hneq_perms: forall i,
(0 <= Z.of_nat i < lksize.LKSIZE)%Z ->
Mem.perm_order'' (pdata (S i)) (Some Writable)
)
(Hlocks: forall (bl2 : block) (ofs : Z),
lockRes tpf (bl2, ofs) ->
exists bl1 : block, f bl1 = Some bl2)
(HsimRes:
forall (bl1 bl2 : block) (ofs : Z)
rmap1 rmap2,
f bl1 = Some bl2 ->
forall (Hl1 : lockRes tpc (bl1, ofs) = Some rmap1)
(Hl2 : lockRes tpf (bl2, ofs) = Some rmap2),
strong_mem_obs_eq f
(restrPermMap (compat_lp _ _ HmemCompC (bl1, ofs) _ Hl1).1)
(restrPermMap (compat_lp _ _ HmemCompF (bl2, ofs) _ Hl2).1) /\
strong_mem_obs_eq f
(restrPermMap (compat_lp _ _ HmemCompC (bl1, ofs) _ Hl1).2)
(restrPermMap (compat_lp _ _ HmemCompF (bl2, ofs) _ Hl2).2))
(Hlock_if: forall (bl1 bl2 : block) (ofs : Z),
f bl1 = Some bl2 ->
lockRes tpc (bl1, ofs) <-> lockRes tpf (bl2, ofs))
(HnumThreads: forall i, containsThread tpc i <-> containsThread tpf i),
invariant tpf'.