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 getN_aux: forall n p c B1 v B2, Mem.getN n p c = B1 ++ v::B2 ->
v = ZMap.get (p + Z.of_nat (length B1)) c.