(** *** Lemmas about invariants preserved by coresteps*)

(** [mem_compatible] is preserved by coresteps*)
Lemma corestep_compatible:
forall (tp : t)  (m m' : mem) i ev
(pf : containsThread tp i) (c c': semC)
(Hinv: invariant tp)
(Hcode: getThreadC pf = Krun c)
(Hcompatible : mem_compatible tp m)
(Hcorestep: ev_step semSem c (restrPermMap (DryHybridMachine.compat_th _ _ Hcompatible pf).1) ev c' m'),
mem_compatible (updThread pf (Krun c') (getCurPerm m', (getThreadR pf).2)) m'.