Notation corestepN := (corestepN (AsmContext.coarse_semantics initU)).

(* Specifications: *)
Lemma internal_step_wd: forall tp m tp' m' i (cnti: containsThread tp i) f fg (Hcomp: mem_compatible tp m) (Hmem_wd: valid_mem m) (Hdomain: domain_memren f m) (Htp_wd: tp_wd f tp) (Hge_wd: ge_wd fg the_ge) (Hfg_incr: ren_domain_incr fg f) (Hstep: internal_step cnti Hcomp tp' m'), valid_mem m' /\ (exists f' : memren, ren_domain_incr f f' /\ domain_memren f' m') /\ (forall f' : memren, domain_memren f' m' -> tp_wd f' tp').
Lemma suspend_tp_wd: forall m tpc tpc' (f : memren) i (pfc : containsThread tpc i) (Hsuspend: suspend_thread m pfc tpc') (Htp_wd: tp_wd f tpc), tp_wd f tpc'.
Lemma weak_obs_eq_restr : forall (m m' : Mem.mem) (f : memren) (weakObsEq: weak_mem_obs_eq f m m') (pf: permMapLt (getCurPerm m) (getMaxPerm m)) (pf': permMapLt (getCurPerm m') (getMaxPerm (setMaxPerm m'))), weak_mem_obs_eq f (restrPermMap pf) (restrPermMap pf').
Lemma mem_obs_eq_restr : forall (m m' : Mem.mem) (f : memren) (memObsEq: mem_obs_eq f m m') (pf: permMapLt (getCurPerm m) (getMaxPerm m)) (pf': permMapLt (getCurPerm m') (getMaxPerm (setMaxPerm m'))), mem_obs_eq f (restrPermMap pf) (restrPermMap pf').
Lemma weak_obs_eq_setMax: forall (f : memren) (m m' : mem), weak_mem_obs_eq f m m' <-> weak_mem_obs_eq f m (setMaxPerm m').
Lemma weak_mem_obs_eq_restrEq: forall f f' mc mf mc' mf' pmap pmapF (Hlt: permMapLt pmap (getMaxPerm mc)) (HltF: permMapLt pmapF (getMaxPerm mf)) (Hlt': permMapLt pmap (getMaxPerm mc')) (HltF': permMapLt pmapF (getMaxPerm mf')) (Hobs_eq: weak_mem_obs_eq f (restrPermMap Hlt) (restrPermMap HltF)) (Hobs_eq': weak_mem_obs_eq f' mc' mf') (Hincr: ren_incr f f') (Hsep: ren_separated f f' mc mf), weak_mem_obs_eq f' (restrPermMap Hlt') (restrPermMap HltF').
Lemma setMaxPerm_valid: forall m b, Mem.valid_block m b <-> Mem.valid_block (setMaxPerm m) b.
Lemma cmachine_step_invariant: forall tpc mc trc tpc' mc' trc' tpc'' trc'' mc'' U U' U'' n (HstepN: corestepN n (U, trc, tpc) mc (U', trc',tpc') mc') (Hstep: cmachine_step (U', trc', tpc') mc' (U'',trc'', tpc'') mc''), invariant tpc.
Lemma gssFP : forall tpc i f' (fp : fpool tpc) (cnti: containsThread tpc i), (updateFP cnti fp f') i cnti = f'.
Lemma gsoFP : forall tpc i j f' (fp : fpool tpc) (cnti: containsThread tpc i) (cntj: containsThread tpc j) (Hneq: i <> j), (updateFP cnti fp f') j cntj = fp j cntj.