Section ALLOC.
Variable m1: mem.
Variables lo hi: Z.
Variable m2: mem.
Variable b: Values.block.
Hypothesis ALLOC: Mem.alloc m1 lo hi = (m2, b).
Transparent Mem.alloc.
Opaque Mem.alloc.
Definition alloc_right_sm (mu: SM_Injection) sp: SM_Injection :=
Build_SM_Injection (locBlocksSrc mu)
(fun b => eq_block b sp || locBlocksTgt mu b)
(pubBlocksSrc mu) (pubBlocksTgt mu)
(local_of mu)
(extBlocksSrc mu) (extBlocksTgt mu)
(frgnBlocksSrc mu) (frgnBlocksTgt mu) (extern_of mu).

(*New Lemma, based on (proof of) Mem.alloc_parallel_inject*)
Theorem alloc_parallel_intern:
forall mu m1 m2 lo1 hi1 m1' b1 lo2 hi2
(SMV: sm_valid mu m1 m2) (WD: SM_wd mu),
Mem.inject (as_inj mu) m1 m2 ->
Mem.alloc m1 lo1 hi1 = (m1', b1) ->
lo2 <= lo1 -> hi1 <= hi2 ->
exists mu', exists m2', exists b2,
Mem.alloc m2 lo2 hi2 = (m2', b2)
/\ Mem.inject (as_inj mu') m1' m2'
/\ intern_incr mu mu'
/\ as_inj mu' b1 = Some(b2, 0)
/\ (forall b, b <> b1 -> as_inj mu' b = as_inj mu b)
/\ sm_inject_separated mu mu' m1 m2
/\ sm_locally_allocated mu mu' m1 m2 m1' m2'
/\ SM_wd mu' /\ sm_valid mu' m1' m2' /\
(REACH_closed m1 (vis mu) -> REACH_closed m1' (vis mu')).