intros.
unfold CoreInitial; simpl.
unfold init_machine, JuicyMachineModule.THE_JUICY_MACHINE.JSEM.init_mach.
unfold semantics.initial_core.
unfold ErasureSafety.ErasureProof.JMS.the_sem.
unfold JuicyMachineModule.THE_JUICY_MACHINE.JSEM.ThreadPool.SEM.Sem.
rewrite JuicyMachineModule.THE_JUICY_MACHINE.SEM.CLN_msem.
simpl.
rewrite <- initial_equivalence_trivial.
subst r; simpl.
unfold initial_corestate.
unfold prog in *.
destruct spr as (b' & c' & e & SPR); simpl in *.
change semax_to_juicy_machine.prog with CSL_prog in *.
subst b'.
specialize (SPR n). destruct SPR as [jm [? [? [? _]]]].
unfold juicy_extspec.j_initial_core in H2.
unfold semantics.initial_core in H2. simpl in H2.
rewrite <- H in *.
destruct (Genv.find_funct_ptr g b) eqn:?H; [ | congruence].
inversion H3; clear H3; subst.
f_equal. f_equal. f_equal. f_equal. congruence.
Qed.

Lemma initial_equivalence': forall U n
(g:JuicyMachineModule.THE_JUICY_MACHINE.JSEM.ThreadPool.SEM.G),
genv_genv g = Genv.globalenv (Ctypes.program_of_program prog) ->
(semantics.initial_core (MachineSemantics U (Some (juicy_mem.m_phi (initial_jm CPROOF n)))))
0 g (proj1_sig (init_mem CPROOF))
(Vptr (projT1 ((spr CPROOF))) Integers.Int.zero) nil =
Some ((U, nil, initial_machine_state CPROOF n), None).