Existing Instance scheduler.
Existing Instance DilMem.

(* Specifications: *)
Lemma updThread_twice : forall {res sem} (tp : @OrdinalPool.t res sem) i
(cnti : containsThread(ThreadPool := OrdinalPool.OrdinalThreadPool) tp i) c c' r r'
(cnti' : containsThread (updThread cnti c r) i),
updThread cnti' c' r' = updThread cnti c' r'.
Lemma mem_ext: forall m1 m2,
Mem.mem_contents m1 = Mem.mem_contents m2 ->
Mem.mem_access m1 = Mem.mem_access m2 ->
Mem.nextblock m1 = Mem.nextblock m2 ->
m1 = m2.
Lemma restrPermMap_twice: forall p1 p2 m Hlt1 Hlt2 Hlt',
@restrPermMap p2 (@restrPermMap p1 m Hlt1) Hlt2 = @restrPermMap p2 m Hlt'.
Lemma restrPermMap_compat: forall {Sem} (tp : t(ThreadPool:= OrdinalPool.OrdinalThreadPool(Sem:=Sem)))
m p Hlt, mem_compatible tp (@restrPermMap p m Hlt) -> mem_compatible tp m.
Lemma restrPerm_sub_map: forall m p Hlt,
sub_map (snd (getMaxPerm (@restrPermMap p m Hlt))) (snd (getMaxPerm m)).
Lemma csafe_restr: forall {Sem} n st m p' Hlt
(Hext: forall c m m' e, at_external (msem semSem) c m = Some e -> at_external (msem semSem) c m' = Some e),
@csafe _ Sem OrdinalPool.OrdinalThreadPool DryHybridMachineSig st (@restrPermMap p' m Hlt) n ->
@csafe _ Sem OrdinalPool.OrdinalThreadPool DryHybridMachineSig st m n.
Lemma restr_Cur: forall p m Hlt, p = getCurPerm m -> @restrPermMap p m Hlt = m.
Corollary csafe_restr': forall n st m p' Hlt,
csafe(ThreadPool:= OrdinalPool.OrdinalThreadPool(Sem:=ClightSem ge))
(machineSig:= HybridMachine.DryHybridMachine.DryHybridMachineSig) st m n ->
csafe(ThreadPool:= OrdinalPool.OrdinalThreadPool(Sem:=ClightSem ge))
(machineSig:= HybridMachine.DryHybridMachine.DryHybridMachineSig) st (@restrPermMap p' m Hlt) n.
Lemma invariant_updThreadC: forall (tp : t(ThreadPool:= OrdinalPool.OrdinalThreadPool(Sem:=ClightSem ge)))
tid c (cnti : containsThread tp tid),
invariant tp -> invariant (updThreadC cnti c).