Section TrivialSimulations.
Definition lift_state {resources Sem1 Sem2}
(f: @semC Sem1 -> @semC Sem2):
@OrdinalPool.t resources Sem1 ->
@OrdinalPool.t resources Sem2.
intros X; inv X.
econstructor; eauto.
intros h; specialize (pool h).
inv pool; [econstructor 1|
econstructor 2|
econstructor 3|
econstructor 4]; eauto.
Defined.
Definition lift_c_state:
@OrdinalPool.t dryResources (@ClightMachine.DMS.DSem Clight_g) ->
@OrdinalPool.t dryResources (HybridSem (@Some nat O)).
Admitted.
Notation scheduler:=HybridMachineSig.HybridMachineSig.HybridCoarseMachine.scheduler.
Local Ltac cat_find_and_replace_nil:=
match goal with
| [H: ?t = ?t ++ ?x |- _ ] =>
eapply threads_lemmas.app_eq_refl_nil in H;
subst x; try rewrite app_nil_r in *
| [H: seq.cat ?t ?y = ?t ++ ?x |- _ ] =>
rewrite Coqlib3.cat_app in H;
apply app_inv_head in H; subst x
end.

Lemma unique_Krun_lift_c_state:
forall c i,
@HybridMachineSig.HybridMachineSig.unique_Krun _ _ OrdinalPool.OrdinalThreadPool c i <->
@HybridMachineSig.HybridMachineSig.unique_Krun _ _ (TP (@Some nat 0%nat)) (lift_c_state c) i.