Definition tp_wd (f: memren) (tp : t) : Prop :=
forall i (cnti: containsThread tp i),
ctl_wd f (getThreadC cnti).

(* Specifications: *)
Lemma tp_wd_incr : forall f f' tp,
tp_wd f tp ->
ren_domain_incr f f' ->
tp_wd f' tp.
Lemma ctl_wd_domain:
forall f f' m (c : ctl),
ctl_wd f c ->
domain_memren f m ->
domain_memren f' m ->
ctl_wd f' c.
Lemma tp_wd_domain:
forall f f' m (tp : t),
tp_wd f tp ->
domain_memren f m ->
domain_memren f' m ->
tp_wd f' tp.
Lemma tp_wd_lockSet:
forall tp f addr rmap
(Htp_wd: tp_wd f tp),
tp_wd f (updLockSet tp addr rmap).
Lemma tp_wd_remLock :
forall (tp : t) (f : memren) (addr : address)
(Htp_wd: tp_wd f tp),
tp_wd f (remLockSet tp addr).
Lemma ctl_inj_id:
forall f c,
ctl_wd f c ->
(forall b1 b2, f b1 = Some b2 -> b1 = b2) ->
ctl_inj f c c.