End InternalCall.
Section CORESTEPS.
Variable cenv : compilenv.
Variable sz : Z.
Variable f : Csharpminor.function.
Variable tfn : function.
Variable mu : SM_Injection.
Variable m tm : mem.
Variable e : Csharpminor.env.
Variable lenv : temp_env.
Variable te : env.
Variable sp lo hi: Values.block.
Variable cs : callstack.
Variable s : Csharpminor.stmt.
Variable k : Csharpminor.cont.
Variable tk : cont.
Variable xenv : exit_env.
Variable PRE: REACH_closed m (vis mu) /\
meminj_preserves_globals ge (as_inj mu) /\
(forall b, isGlobalBlock ge b = true -> frgnBlocksSrc mu b = true) /\
sm_valid mu m tm /\ SM_wd mu /\
Mem.inject (as_inj mu) m tm.
Variable TRF : transl_funbody cenv sz f = OK tfn.

Lemma Builtin_mem_inject:
forall vargs m1 t vres m2 f m1' vargs',
meminj_preserves_globals ge (restrict (as_inj mu) (vis mu)) ->
csharpmin_eff_sem vargs m1 t vres m2 ->
Mem.inject (restrict (as_inj mu) (vis mu)) m1 m1' ->
val_list_inject (restrict (as_inj mu) (vis mu)) vargs vargs' ->
exists mu', exists vres', exists m2',
cmin_eff_sem tge vargs' m1' t vres' m2'
/\ val_inject (restrict (as_inj mu') (vis mu')) vres vres'
/\ Mem.inject (restrict (as_inj mu') (vis mu')) m2 m2'
/\ Mem.unchanged_on (loc_unmapped (as_inj mu)) m1 m2
/\ Mem.unchanged_on (local_out_of_reach (as_inj mu) m1) m1' m2'
/\ intern_incr mu mu'
/\ sm_inject_separated mu mu' m1 m1'
/\ sm_locally_allocated mu mu' m1 m1' m2 m2' .