End CompileNThreads.
Section CompileInftyThread.
Parameter lift_state: forall on, ThreadPool on -> forall on', ThreadPool on' -> Prop.
Inductive infty_match:
nth_index -> meminj ->
ThreadPool (Some 0) -> mem ->
ThreadPool None -> mem -> Prop:=
| Build_infty_match:
forall n cd j st0 m0 stn mn st,
match_state n cd j st0 m0 stn mn ->
lift_state (Some n) stn None st ->
infty_match cd j st0 m0 st mn.

Lemma infinite_machine_step_diagram:
forall (m : option mem) (sge tge : HybridMachineSig.G)
(U : list nat) (tr1 : HybridMachineSig.event_trace)
(st1 : ThreadPool (Some 0)) (m1 : mem) (U' : list nat)
(tr1' : HybridMachineSig.event_trace)
(st1' : ThreadPool (Some 0)) (m1' : mem),
machine_semantics.machine_step (HybConcSem (Some 0) m) sge U tr1
st1 m1 U' tr1' st1' m1' ->
forall (cd : nth_index) tr2 (st2 : ThreadPool None)
(mu : meminj) (m2 : mem),
infty_match cd mu st1 m1 st2 m2 ->
List.Forall2 (inject_mevent mu) tr1 tr2 ->
exists
tr2' (st2' : ThreadPool None) (m2' : mem) (cd' : nth_index)
(mu' : meminj),
infty_match cd' mu' st1' m1' st2' m2' /\
List.Forall2 (inject_mevent mu') tr1' tr2' /\
machine_semantics.machine_step (HybConcSem None m) tge U tr2 st2
m2 U' tr2' st2' m2'.