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.

(*POPL-compcomp used the following lemma to prove mem_wd_load: Lemma decode_val_pointer_inv: forall chunk mvl b ofs, decode_val chunk mvl = Vptr b ofs -> chunk = Mint32 /\ mvl = inj_value Q32 (Vptr b ofs). A version of this lemma is in CompCert 2.3, Memdata.v, but missing from CompCert 2.4.  I'm not even sure it's true in CompCert 2.4.  -A.W.A.  In CompCert2.5, the proof of mem_wd_load uses the new load_ptr_is_fragment, recently added to mem_lemmas*)
Lemma mem_wd_load: forall m ch b ofs v
(LD: Mem.load ch m b ofs = Some v)
(WD : mem_wd m), val_valid v m.