Definition FLIP mu :=
match mu with
Build_SM_Injection locBSrc locBTgt pSrc pTgt local extBSrc extBTgt fSrc fTgt extern =>
Build_SM_Injection extBSrc extBTgt fSrc fTgt extern locBSrc locBTgt pSrc pTgt local
end.
intros.
destruct mu; simpl in *.
destruct WD.
split; intros; simpl in *; try solve[auto].
destruct (disjoint_extern_local_Src b); intuition.
destruct (disjoint_extern_local_Tgt b); intuition.
apply (extern_DomRng _ _ _ H).
apply (local_DomRng _ _ _ H).
Qed.

Lemma RelyGuaranteeTgtPerm: forall mu Etgt Esrc m2 m2' (WD: SM_wd mu) m1
(TgtHyp: forall b ofs, Etgt b ofs = true ->
(Mem.valid_block m2 b /\
(locBlocksTgt mu b = false ->
exists b1 delta1, foreign_of mu b1 = Some(b,delta1) /\
Esrc b1 (ofs-delta1) = true /\ Mem.perm m1 b1 (ofs-delta1) Max Nonempty)))
(Unch2: Mem.unchanged_on (fun b z => Etgt b z = false) m2 m2')
(SrcHyp: forall b ofs, Esrc b ofs = true -> vis mu b = true)