Fixpoint lockRes_data_permission_add_execution U
U' tr tpi mi tpj mj tr' laddr rmapj b ofs
(Hres: lockRes tpi laddr = None)
(Hres': lockRes tpj laddr = Some rmapj)
(Hexec: multi_step (U, tr, tpi) mi (U', tr ++ tr', tpj) mj)
(Hperm': Mem.perm_order'' (rmapj.1 !! b ofs) (Some Readable)) {struct U}:
exists v ev,
nth_error tr' v = Some ev /\ action ev = Release /\
location ev = Some (laddr, lksize.LKSIZE_nat)
with
lockRes_data_permission_increase_execution U {struct U}:
forall U' tr tpi mi tpj mj tr' laddr rmapi rmapj b ofs
(Hres: lockRes tpi laddr = Some rmapi)
(Hres': lockRes tpj laddr = Some rmapj)
(Hexec: multi_step (U, tr, tpi) mi (U', tr ++ tr', tpj) mj)
(Hperm: ~ Mem.perm_order'' (rmapi.1 !! b ofs) (Some Readable))
(Hperm': Mem.perm_order'' (rmapj.1 !! b ofs) (Some Readable)),
exists v ev,
nth_error tr' v = Some ev /\ action ev = Release /\
location ev = Some (laddr, lksize.LKSIZE_nat).
Fixpoint lockRes_lock_permission_add_execution U
U' tr tpi mi tpj mj tr' laddr rmapj b ofs
(Hres: lockRes tpi laddr = None)
(Hres': lockRes tpj laddr = Some rmapj)
(Hexec: multi_step (U, tr, tpi) mi (U', tr ++ tr', tpj) mj)
(Hperm': Mem.perm_order'' (rmapj.2 !! b ofs) (Some Readable)) {struct U}:
exists v ev,
nth_error tr' v = Some ev /\ action ev = Release /\
location ev = Some (laddr, lksize.LKSIZE_nat)
with
lockRes_lock_permission_increase_execution U {struct U}:
forall U' tr tpi mi tpj mj tr' laddr rmapi rmapj b ofs
(Hres: lockRes tpi laddr = Some rmapi)
(Hres': lockRes tpj laddr = Some rmapj)
(Hexec: multi_step (U, tr, tpi) mi (U', tr ++ tr', tpj) mj)
(Hperm: ~ Mem.perm_order'' (rmapi.2 !! b ofs) (Some Readable))
(Hperm': Mem.perm_order'' (rmapj.2 !! b ofs) (Some Readable)),
exists v ev,
nth_error tr' v = Some ev /\ action ev = Release /\
location ev = Some (laddr, lksize.LKSIZE_nat).

Lemma thread_spawn_step:
forall U tr tp m U' tp' m' tr' tidn
(cnt: ~ containsThread tp tidn)
(cnt': containsThread tp' tidn)
(Hstep: MachStep (U, tr, tp) m (U', tr ++ tr', tp') m'),
exists ev,
tr' = [:: ev] /\ action ev = Spawn.