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_addThread: forall tp tp' v arg v' arg' pmap pmap', threadPool_erasure tp tp' -> val_erasure v v' -> val_erasure arg arg' -> threadPool_erasure (addThread tp v arg pmap) (addThread tp' v' arg' pmap').