(* A stronger version of mem_wd2. Adapted from sepcomp/mem_wd2.v. *)
Definition mem_wd2 m := forall b ofs, memval_inject (Mem.flat_inj (Mem.nextblock m))
(ZMap.get ofs (PMap.get b (Mem.mem_contents m))) (ZMap.get ofs (PMap.get b (Mem.mem_contents m))).
(* Lemma mem_wd2_storebytes: forall m b ofs m' bl (WDm: mem_wd2 m) (ST: Mem.storebytes m b ofs bl = Some m') (V: val_valid v m), mem_wd2 m'. *)
Definition mem_wd' m m' := forall b ofs, memval_inject (Mem.flat_inj (Mem.nextblock m))
(ZMap.get ofs (PMap.get b (Mem.mem_contents m'))) (ZMap.get ofs (PMap.get b (Mem.mem_contents m'))).

Lemma mem_wd'_alloc_global: forall  {F V} (ge: Genv.t F V) a m m0 m1
(GA: Genv.alloc_global ge m0 a = Some m1),
mem_wd' m m0 -> valid_genv ge m -> mem_wd' m m1.