Definition mkinitial_SM (mu: SM_Injection) frgnS frgnT :=
match mu with
Build_SM_Injection locBSrc locBTgt pSrc pTgt local extBSrc extBTgt fSrc fTgt extern =>
Build_SM_Injection (fun b => false) (fun b => false) (fun b => false) (fun b => false) (fun b => None)
(DomSrc mu) (DomTgt mu) frgnS frgnT (as_inj mu)
end.

Lemma inject_shared_replace_locals m1 m2 mu vals1 vals2:
forall (RC : REACH_closed m1 (vis mu))
(WD : SM_wd mu)
(MINJ : Mem.inject (as_inj mu) m1 m2)
pubSrc' pubTgt'
(HPS: pubSrc' = (fun b => locBlocksSrc mu b && REACH m1 (exportedSrc mu vals1) b))
(HPT: pubTgt' = (fun b => locBlocksTgt mu b && REACH m2 (exportedTgt mu vals2) b))
nu (Hnu : nu = replace_locals mu pubSrc' pubTgt')
(WDnu: SM_wd nu),
Mem.inject (shared_of nu) m1 m2.