Inductive threadHalted': forall {tid0 ms},
containsThread(resources:=LockInvsAndResources) ms tid0 -> Prop:=
| thread_halted':
forall tp c tid0 i
(cnt: containsThread tp tid0),
forall
(Hthread: getThreadC cnt = Krun c)
(Hcant: halted the_sem c i),
threadHalted' cnt.
Definition threadHalted: forall {tid0 ms},
containsThread ms tid0 -> Prop:= @threadHalted'.

Lemma threadHalt_update:
forall i j, i <> j ->
forall tp cnt cnti c' cnt',
(@threadHalted j tp cnt) <->
(@threadHalted j (@updThreadC _ _ _ i tp cnti c') cnt') .