Inductive valid_genv {F V:Type} (ge:Genv.t F V) (m:mem) : Type :=
mk_valid_genv :
(forall b, isGlobalBlock ge b=true -> val_valid (Vptr b Ptrofs.zero) m) ->
(forall b f, Genv.find_funct_ptr ge b = Some f -> val_valid (Vptr b Ptrofs.zero) m) ->
valid_genv ge m.

Lemma loadbytes_D: forall m b ofs n bytes
(LD: Mem.loadbytes m b ofs n = Some bytes),
Mem.range_perm m b ofs (ofs + n) Cur Readable /\
bytes = Mem.getN (nat_of_Z n) ofs (PMap.get b (Mem.mem_contents m)).