Notation schedule := (seq nat).(** Internal steps are just thread coresteps or resume steps or start steps,
          they mimic fine-grained internal steps *)
      Definition internal_step {tid} {tp} m (cnt: containsThread tp tid)
                 (Hcomp: mem_compatible tp m) tp' m' :=
      (exists ev, threadStep cnt Hcomp tp' m' ev) \/
      (resume_thread m cnt tp' /\ m = m') \/
      (start_thread m cnt tp' m').

Lemma internal_step_det : forall tp tp' tp'' m m' m'' i (Hcnt: containsThread tp i) (Hcomp: mem_compatible tp m) (Hstep: internal_step Hcnt Hcomp tp' m') (Hstep': internal_step Hcnt Hcomp tp'' m''), tp' = tp'' /\ m' = m''.