Fixpoint mkInjectionsN (N:nat)(n1 n2:block)(j k l: meminj)
:  meminj * meminj * block * block :=
match N with O => (j,k,n1,n2)
| S M => mkInjectionsN M (Pos.succ n1) (Pos.succ n2)
(fun b => if eq_block b n1
then Some (n2,0)
else j b)
(fun b => if eq_block b n2 then l n1 else k b)
l
end.
Definition mkInjections (m1 m1' m2:mem) (j k l: meminj)
:  meminj * meminj * block * block :=
if plt (Mem.nextblock m1) (Mem.nextblock m1')
then mkInjectionsN (Pos.to_nat (Mem.nextblock m1') - Pos.to_nat(Mem.nextblock m1))
(Mem.nextblock m1)
(Mem.nextblock m2) j k l
else (j,k,Mem.nextblock m1,Mem.nextblock m2).

Lemma J12'_no_overlap: forall m1 m2 j12
(MInj12 : Mem.inject j12 m1 m2) m1' (Fwd1: mem_forward m1 m1') j23 m3
(MInj23 : Mem.inject j23 m2 m3) j' j12' j23' n1' n2'
(HeqMKI: mkInjections m1 m1' m2 j12 j23 j' = (j12', j23',n1',n2')),
Mem.meminj_no_overlap j12' m1'.