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.
Definition lifted_refl_match :=
fun cd j st1 m1 st2 m2 =>
refl_match cd j (lift_c_state st1) m1 st2 m2.

Lemma trivial_clight_simulation:
(HybridMachine_simulation
(ClightMachine.DMS.ClightConcurSem
(ge:=Clight_g)
(Genv.init_mem (Ctypes.program_of_program C_program)))
(HybConcSem (Some 0)%nat (Genv.init_mem (Ctypes.program_of_program C_program)))).