(** * Globals separated *)
(** globals_separate is an invariant enforcing that newly allocated blocks are NOT mapped to global blocks. It is used to re-establish meminj_preserves_globals in the after external diagram. In that sense it replaces sm_inject_separated (jan 2015). *)
Definition globals_separate {F V:Type} (ge: Genv.t F V) mu nu :=
forall b1 b2 d, as_inj mu b1 = None ->
as_inj nu b1 =Some(b2,d) ->
isGlobalBlock ge b2 = false.
intros ? ? mu ge b1 b2 d map1 map2.
rewrite map1 in map2; discriminate.
Qed.

Lemma gsep_domain_eq:
forall {F1 F2 V1 V2} mu mu' (ge1: Genv.t F1 V1) (ge2: Genv.t F2 V2),
globals_separate ge1 mu mu' ->
genvs_domain_eq ge1 ge2 ->
globals_separate ge2 mu mu'.