Definition isGlobalBlock {F V : Type} (ge : Genv.t F V) :=
  fun b => (fst (genv2blocksBool ge)) b || (snd (genv2blocksBool ge)) b.

Lemma after_external_meminj_preserves_globals: forall {F V} (ge: Genv.t F V) mu (WDmu : SM_wd mu) (PG: meminj_preserves_globals ge (extern_of mu) /\ (forall b, isGlobalBlock ge b = true -> frgnBlocksSrc mu b = true)) nu pubSrc' pubTgt' vals1 m1 (pubSrcHyp: pubSrc' = fun b => andb (locBlocksSrc mu b) (REACH m1 (exportedSrc mu vals1) b)) (Hnu: nu = replace_locals mu pubSrc' pubTgt') nu' (WDnu' : SM_wd nu') (INC: extern_incr nu nu') m2 (SMV: sm_valid mu m1 m2) (SEP: sm_inject_separated nu nu' m1 m2) frgnSrc' ret1 m1' (frgnSrcHyp: frgnSrc' = fun b => andb (DomSrc nu' b) (andb (negb (locBlocksSrc nu' b)) (REACH m1' (exportedSrc nu' (ret1::nil)) b))) frgnTgt' ret2 m2' (frgnTgtHyp: frgnTgt' = fun b => andb (DomTgt nu' b) (andb (negb (locBlocksTgt nu' b)) (REACH m2' (exportedTgt nu' (ret2::nil)) b))) mu' (Mu'Hyp: mu' = replace_externs nu' frgnSrc' frgnTgt'), meminj_preserves_globals ge (extern_of mu') /\ (forall b, isGlobalBlock ge b = true -> frgnBlocksSrc mu' b = true).