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 lockRes_permission_increase_execution:
forall U tr tpi mi U' 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) /\
Mem.perm_order'' (rmapj.1 !! b ofs) (Some Readable)) \/
(~ Mem.perm_order'' (rmapi.2 !! b ofs) (Some Readable) /\
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).