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 replace_locals_wd_AtExternal: forall mu vals1 vals2 m1 m2 (WD : SM_wd mu) (MINJ : Mem.inject (as_inj mu) m1 m2) (AINJ : Forall2 (val_inject (as_inj mu)) vals1 vals2), SM_wd (replace_locals mu (fun b => locBlocksSrc mu b && REACH m1 (exportedSrc mu vals1) b) (fun b => locBlocksTgt mu b && REACH m2 (exportedTgt mu vals2) b)).