Proof with eauto with val_erasure erased.
intros.
inversion H.
pose proof (erasedPool_num_threads H) as Heq_threads.
constructor.
- unfold addThread; simpl.
unfold OrdinalPool.addThread, OrdinalPool.containsThread; simpl.
intros.
rewrite Heq_threads; auto.
split; now eauto.
- intros.
assert (cnti00 := cntAdd' _ _ _ cnti).
assert (cnti0'0 := cntAdd' _ _ _ cnti').
destruct cnti00 as [[cnti00 ?] | Heq];
destruct cnti0'0 as [[cnti0'0 ?] | ?].
+ erewrite gsoAddCode with (cntj := cnti00) by eauto.
erewrite gsoAddCode with (cntj := cnti0'0) by eauto.
eauto.
+ exfalso; subst; apply H4.
unfold latestThread. simpl.
unfold OrdinalPool.latestThread.
rewrite Heq_threads.
reflexivity.
+ exfalso; subst; apply H4.
unfold latestThread. simpl.
unfold OrdinalPool.latestThread.
rewrite Heq_threads.
reflexivity.
+ subst. erewrite! gssAddCode by eauto.
simpl; split...
Qed.

(* Specifications: *)
Lemma erased_remLockSet:
forall tp tp' addr addr',
threadPool_erasure tp tp' ->
threadPool_erasure (remLockSet tp addr)
(remLockSet tp' addr').