Opaque lockRes.

(** If the [invariant] holds for the DryConc machine then it also holds for the FineConc machine provided that the two machines are related by a renaming relation*)
Lemma invariant_project:
forall (tpc tpf : thread_pool) (mc mf : mem) f rmap1 b1 b2 ofs
i (pff : containsThread tpf i) (pfc : containsThread tpc i)
(HmemCompC : mem_compatible tpc mc)
(HmemCompF : mem_compatible tpf mf)
(Hcanonical: isCanonical rmap1.1)
(Hcanonical2: isCanonical rmap1.2)
virtue c cf
(HinvF: invariant tpf)
(Hf: f b1 = Some b2),
let tpc' := updLockSet
(updThread pfc c (computeMap (getThreadR pfc)#1 virtue#1,
computeMap (getThreadR pfc)#2 virtue#2))
(b1, ofs) rmap1 in
let tpf' := updLockSet (updThread pff cf
(computeMap (getThreadR pff).1
(projectAngel f virtue.1),
computeMap (getThreadR pff).2
(projectAngel f virtue.2))) (b2, ofs)
(projectMap f rmap1.1, projectMap f rmap1.2) in
forall
(HinvC': invariant tpc')
(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))
(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'.