Opaque lockRes.

Lemma invariant_spawn:
forall (tpc tpf : thread_pool) (mc mf : mem) f
i (pff : containsThread tpf i) (pfc : containsThread tpc i)
(HmemCompC : mem_compatible tpc mc)
(HmemCompF : mem_compatible tpf mf)
virtue1 virtue2  c cf vf vff arg arg',
let threadPerm' := (computeMap (getThreadR pfc).1 virtue1.1,
computeMap (getThreadR pfc).2 virtue1.2) in
let threadPermF' := (computeMap (getThreadR pff).1 (projectAngel f virtue1.1),
computeMap (getThreadR pff).2 (projectAngel f virtue1.2)) in
let newThreadPerm := (computeMap empty_map virtue2#1, computeMap empty_map virtue2#2) in
let newThreadPermF := (computeMap empty_map (projectAngel f virtue2#1),
computeMap empty_map (projectAngel f virtue2#2)) in
forall
(HinvF: invariant tpf)
(HinvC': invariant
(addThread
(updThread pfc c threadPerm') vf arg newThreadPerm))
(HsimWeak: forall tid (pfc0 : containsThread tpc tid)
(pff0 : containsThread tpf tid),
weak_tsim f pfc0 pff0 HmemCompC HmemCompF)
(Htsim_data: mem_obs_eq f (restrPermMap (compat_th _ _ HmemCompC pfc).1)
(restrPermMap (compat_th _ _ HmemCompF pff).1))
(Htsim_locks: mem_obs_eq f (restrPermMap (compat_th _ _ HmemCompC pfc).2)
(restrPermMap (compat_th _ _ HmemCompF pff).2))
(HnumThreads: forall i, containsThread tpc i <-> containsThread tpf i)
(Hlock_mapped: 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))
(Hunmapped_res: forall (bl : block) (ofsl : Z) rmap,
lockRes tpf (bl, ofsl) = Some rmap ->
forall b2 : block,
~ (exists b1 : block, f b1 = Some b2) ->
forall ofs : Z,
(rmap#1) # b2 ofs = None /\ (rmap#2) # b2 ofs = None)
(Hlock_if: forall (bl1 bl2 : block) (ofs : Z),
f bl1 = Some bl2 ->
lockRes tpc (bl1, ofs) <-> lockRes tpf (bl2, ofs)),
invariant
(addThread
(updThread pff cf threadPermF') vff arg'
newThreadPermF).