Definition replace_locals (mu:SM_Injection) pSrc' pTgt': SM_Injection :=
  match mu with
    Build_SM_Injection locBSrc locBTgt pSrc pTgt local extBSrc extBTgt fSrc fTgt extern =>
    Build_SM_Injection locBSrc locBTgt pSrc' pTgt' local extBSrc extBTgt fSrc fTgt extern
  end.

Lemma replace_locals_wd: forall mu (WD: SM_wd mu) pSrc' pTgt' (SRC: forall b1, pSrc' b1 = true -> exists b2 d, local_of mu b1 = Some(b2,d) /\ pTgt' b2=true) (TGT: forall b, pTgt' b = true -> locBlocksTgt mu b = true), SM_wd (replace_locals mu pSrc' pTgt').