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'.

(* Specifications: *)
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') .
Lemma syncstep_equal_halted:
forall b i tp m cnti cmpt tp' m' tr,
@syncStep b i tp m cnti cmpt tp' m' tr ->
forall j cnt cnt',
(@threadHalted j tp cnt) <->
(@threadHalted j tp' cnt').