Notation val_inject:=Val.inject.
(*A value that is (if its a pointer) not dangling wrt m - a condition like this will probably be need to imposed on after-external return values (and thus also on the values returned by halted)*)
Definition val_valid (v:val) (m:mem):Prop :=
match v with Vptr b ofs => Mem.valid_block m b | _ => True
end.
(*memories that do not contain "dangling pointers"*)
Definition mem_wd m := Mem.inject_neutral (Mem.nextblock m) m.

Lemma mem_wd_inject_splitL: forall j m1 m2
(J:Mem.inject j m1 m2)  (WD: mem_wd m1),
Mem.inject (Mem.flat_inj (Mem.nextblock m1)) m1 m1
/\ j = compose_meminj (Mem.flat_inj (Mem.nextblock m1)) j.