Notation containsThreadF := (@containsThread DryHybridMachine.dryResources Sem OrdinalPool.OrdinalThreadPool).Notation containsThreadE := (@containsThread BareMachine.resources Sem OrdinalPool.OrdinalThreadPool).Definition ctl_erasure c c' : Prop :=
      match c, c' with
      | Kinit vf arg, Kinit vf' arg' =>
        val_erasure vf vf' /\ val_erasure arg arg'
      | Krun c, Krun c' =>
        core_erasure c c'
      | Kblocked c, Kblocked c' =>
        core_erasure c c'
      | Kresume c arg, Kresume c' arg' =>
        core_erasure c c' /\ arg = arg'
      (*we don't use this and our semantics are strange*)
      | _, _  => False
      end.Inductive threadPool_erasure tp tp' :=
    | ErasedPool :
        (forall i, containsThreadF tp i <-> containsThreadE tp' i) ->
        (forall i (cnti: containsThreadF tp i)
           (cnti': containsThreadE tp' i),
            ctl_erasure (getThreadC cnti) (getThreadC cnti')) ->
        threadPool_erasure tp tp'.Inductive threadPool_erasure tp tp' :=
    | ErasedPool :
        (forall i, containsThreadF tp i <-> containsThreadE tp' i) ->
        (forall i (cnti: containsThreadF tp i)
           (cnti': containsThreadE tp' i),
            ctl_erasure (getThreadC cnti) (getThreadC cnti')) ->
        threadPool_erasure tp tp'.

Lemma erased_updLockSet: forall tp tp' addr addr' rmap rmap', threadPool_erasure tp tp' -> threadPool_erasure (updLockSet tp addr rmap) (updLockSet tp' addr' rmap').