(* The following is a slightly stronger result, proving [jmsafe] i.e. a safety that universally quantifies over all schedule each time a part of the schedule is consumed *)

(* Specifications: *)
Theorem jmsafe_initial_state sch n :
jmsafe (globalenv prog) n ((proj1_sig init_mem), (nil, sch, initial_machine_state n)).
(*  Goal Smallstep.initial_state (semantics2 prog) (initial_corestate).*)
Lemma initial_corestate_initial :
exists b, Genv.find_symbol (globalenv prog) (prog_main prog) = Some b /\
exists m', forall n,
initial_core (Clight_new.cl_core_sem (globalenv prog)) n (proj1_sig init_mem)
initial_corestate m' (Vptr b Ptrofs.zero) nil.
Lemma jmsafe_csafe n m tr sch s : jmsafe (globalenv prog) n (m, (tr, sch, s)) -> jm_csafe (sch, tr, s) m n.
(* [jmsafe] is an intermediate result, we can probably prove [csafe] directly *)
Theorem safety_initial_state (sch : schedule) (n : nat) :
jm_csafe (sch, nil, initial_machine_state n) (proj1_sig init_mem) n.