(** ** Properties of specific stepss and executions *)

(** After a step that generates a [mklock] event at [address] addr, addr will be in the [lockRes] and thread i will have lock permission on addr*)
Lemma Mklock_lockRes:
forall i U tr tp m tp' m' addr
(Hstep: MachStep (i :: U, tr, tp) m
(U, tr ++ [:: external i (Events.mklock addr)], tp') m'),
lockRes tp' addr /\
forall (cnti': containsThread tp' i) ofs,
Intv.In ofs (addr.2, addr.2 + lksize.LKSIZE)%Z ->
((getThreadR cnti').2 !! (addr.1)) ofs = Some Writable.