(** [mem_compatible] is preserved by [resume_thread]*)
    Corollary resume_compatible :
      forall (tp tp' : t) m (i : nat) (pf : containsThread tp i)
        (Hcompatible: mem_compatible tp m)
        (Hresume: resume_thread m pf tp'),
        mem_compatible tp' m.(** [mem_compatible] is preserved by [start_thread]*)
    Corollary start_compatible :
      forall (tp tp' : t) m m' (i : nat) (pf : containsThread tp i)
        (Hcompatible: mem_compatible tp m)
        (Hstart: start_thread m pf tp' m'),
        mem_compatible tp' m'.(** [mem_compatible] is preserved by [internal_step]*)
    Corollary internal_step_compatible :
      forall (tp tp' : t) m m' (i : nat) (pf : containsThread tp i)
        (Hcompatible: mem_compatible tp m)
        (Hstep: internal_step pf Hcompatible tp' m'),
        mem_compatible tp' m'.

Lemma updThread_internal_step: forall tp tp' m m' i j c pmap (Hneq: i <> j) (cnti: containsThread tp i) (cnti': containsThread tp' i) (cntj: containsThread tp j) (cntj': containsThread (updThread cnti c pmap) j) (Hcomp: mem_compatible tp m) (Hcomp': mem_compatible (updThread cnti c pmap) m) (Hinv': invariant (updThread cnti c pmap)) (Hstep: internal_step cntj Hcomp tp' m'), internal_step cntj' Hcomp' (updThread cnti' c pmap) m'.