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 unchanged_on_perm: forall (P:block -> Z -> Prop) m m'
(Unch: Mem.unchanged_on P m m'),
Mem.unchanged_on (fun b z => P b z /\ Mem.perm m b z Max Nonempty) m m'.