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

(** [invariant] is preserved by a corestep *)
Lemma corestep_invariant:
forall (tp : t)  (m : mem) (i : nat)
(pf : containsThread tp i) c m1 m1' c'
(Hinv: invariant tp)
(Hcompatible: mem_compatible tp m)
(Hrestrict_pmap: restrPermMap (DryHybridMachine.compat_th _ _ Hcompatible pf).1 = m1)
(Hcorestep: corestep semSem c m1 c' m1')
(Hcore: getThreadC pf = Krun c),
invariant (updThread pf (Krun c') (getCurPerm m1', (getThreadR pf).2)).