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.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.

(* Specifications: *)
Lemma initial_infty: forall (m : option mem) (s_mem s_mem' : mem) (main : val) (main_args : list val) (s_mach_state : ThreadPool (Some 0)) (r1 : option res), machine_semantics.initial_machine (HybConcSem (Some 0) m) r1 s_mem s_mach_state s_mem' main main_args -> exists (j : meminj) (cd : nth_index) (t_mach_state : ThreadPool None) (t_mem t_mem' : mem) (r2 : option res), machine_semantics.initial_machine (HybConcSem None m) r2 t_mem t_mach_state t_mem' main main_args /\ infty_match cd j s_mach_state s_mem' t_mach_state t_mem'.
Lemma infinite_step_diagram: forall (m : option mem) (sge tge : HybridMachineSig.G) (U : list nat) tr1 (st1 : ThreadPool (Some 0)) (m1 : mem) (st1' : ThreadPool (Some 0)) (m1' : mem), machine_semantics.thread_step (HybConcSem (Some 0) m) sge U st1 m1 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 (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_lemmas.thread_step_plus (HybConcSem None m) tge U st2 m2 st2' m2' \/ machine_semantics_lemmas.thread_step_star (HybConcSem None m) tge U st2 m2 st2' m2' /\ list_lt cd' cd).
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'.
Lemma infinite_halted: forall (m : option mem) (cd : nth_index) (mu : meminj) (U : list nat) (c1 : ThreadPool (Some 0)) (m1 : mem) (c2 : ThreadPool None) (m2 : mem) (v1 : val), infty_match cd mu c1 m1 c2 m2 -> machine_semantics.conc_halted (HybConcSem (Some 0) m) U c1 = Some v1 -> exists v2 : val, machine_semantics.conc_halted (HybConcSem None m) U c2 = Some v2.
Lemma infinite_running: forall (m : option mem) (cd : nth_index) (mu : meminj) (c1 : ThreadPool (Some 0)) (m1 : mem) (c2 : ThreadPool None) (m2 : mem), infty_match cd mu c1 m1 c2 m2 -> forall i : nat, machine_semantics.running_thread (HybConcSem (Some 0) m) c1 i <-> machine_semantics.running_thread (HybConcSem None m) c2 i.
Lemma compile_all_threads: forall m, HybridMachine_simulation.HybridMachine_simulation_properties (HybConcSem (Some 0) m) (HybConcSem None m) infty_match.
Lemma trivial_clight_simulation: (HybridMachine_simulation (ClightMachine.DMS.ClightConcurSem(ge:=Clight_g) (Genv.init_mem (Ctypes.program_of_program C_program))) (HybConcSem (Some 0) (Genv.init_mem (Ctypes.program_of_program C_program)))).
Lemma trivial_asm_simulation: (HybridMachine_simulation (HybConcSem None (Genv.init_mem Asm_program)) (X86Context.AsmConcurSem (the_program:=Asm_program) (Hsafe:=Asm_genv_safe) (Genv.init_mem Asm_program))).
Lemma HBSimulation_transitivity: forall G1 G2 G3 TID SCH C1 C2 C3 res, forall (Machine1 : @machine_semantics.ConcurSemantics G1 TID SCH _ C1 mem res) (Machine2 : @machine_semantics.ConcurSemantics G2 TID SCH _ C2 mem res) (Machine3 : @machine_semantics.ConcurSemantics G3 TID SCH _ C3 mem res), HybridMachine_simulation Machine1 Machine2 -> HybridMachine_simulation Machine2 Machine3 -> HybridMachine_simulation Machine1 Machine3.
Lemma initial_memories_are_equal: forall (p : Clight.program) (tp : Asm.program), Genv.init_mem tp = Genv.init_mem (Ctypes.program_of_program p).
Lemma ConcurrentCompilerCorrectness: forall (p:Clight.program) (tp:Asm.program), CC_correct.CompCert_compiler p = Some tp -> forall asm_genv_safety, ConcurrentCompilerCorrectness_specification (Clight.globalenv p) tp asm_genv_safety (Genv.init_mem (Ctypes.program_of_program p)) (Genv.init_mem tp) .