(** The new semantics below makes internal (thread) and external (machine)
          steps explicit *)
    Inductive internal_step:
      schedule -> machine_state -> mem -> machine_state -> mem -> Prop :=
      | thread_step':
          forall tid U ms ms' m m' ev
            (HschedN: schedPeek U = Some tid)
            (Htid: containsThread ms tid)
            (Hcmpt: mem_compatible ms m)
            (Htstep: threadStep Htid Hcmpt ms' m' ev),
            internal_step U ms m ms' (diluteMem m').(** The new semantics below makes internal (thread) and external (machine)
          steps explicit *)
    Inductive internal_step:
      schedule -> machine_state -> mem -> machine_state -> mem -> Prop :=
      | thread_step':
          forall tid U ms ms' m m' ev
            (HschedN: schedPeek U = Some tid)
            (Htid: containsThread ms tid)
            (Hcmpt: mem_compatible ms m)
            (Htstep: threadStep Htid Hcmpt ms' m' ev),
            internal_step U ms m ms' (diluteMem m').

(* Specifications: *)
Lemma step_equivalence1: forall U tr st m U' tr' st' m', @machine_step U tr st m U' tr' st' m' -> (U' = yield U /\ @internal_step U st m st' m') \/ @external_step U tr st m U' tr' st' m'.
Lemma step_equivalence2: forall U st m st' m' tr, @internal_step U st m st' m' -> exists tr', @machine_step U tr st m (yield U) (tr ++ tr') st' m'.
Lemma step_equivalence3: forall U tr st m U' tr' st' m', @external_step U tr st m U' tr' st' m' -> exists tr1, tr' = tr ++ tr1 /\ @machine_step U tr st m U' tr' st' m'.