Section NThredCompiled.
Notation hb0:= (Some 0%nat).
Notation hb n:= (Some n).
Variable U: seq.seq nat.
Notation C0:= (t_ (HybridMachine.ThreadPool hb0 Sems Semt)).
Notation C n:= (t_ (HybridMachine.ThreadPool (Some n) Sems Semt)).
Notation G:= (semG (HybridMachine.Sem hb0 Sems Semt)) .
(*Notation G n:= (semG (HybridMachine.Sem (hb n) Sems Semt)). *)
(*Need to make the data/order correct: that is a list of cds'*)
Inductive  Nconcur_match: forall n, list (option compiler_index) -> meminj -> C0 -> mem -> C n -> mem -> Prop :=
| ZeroOneSimulation:
forall st0 m0,
Nconcur_match 0 nil inject_id st0 m0 st0 m0
| ZeroNSimulation:
forall n ls_cd cd jn jn' st0 m0 stn mn stn' mn',
Nconcur_match n ls_cd jn st0 m0 stn mn ->
concur_match n cd jn' stn mn stn' mn' ->
Nconcur_match (S n) (cd::ls_cd) (compose_meminj jn jn') st0 m0 stn' mn'.
Parameter list_order: list compiler_index -> list compiler_index -> Prop.
Parameter option_list_order: list (option compiler_index) ->
list (option compiler_index) -> Prop.
Variable v:val.

Lemma N_compiled_thread_simulation:
forall n,
HybridMachine_simulation
Sems Semt hb0 (hb n) U genv
(list (option compiler_index)) option_list_order
(Nconcur_match n) v.