(* Lemma Zmax_of_nat: forall n, Z_of_nat (nat_of_Z n) = Z.max n 0. *)

(* Lemma nonunit_readonly2share: forall v, nonunit (readonly2share (@gvar_readonly type v)). *)
(* Lemma readable_splice_extern: forall v, readable_share (Share.lub extern_retainer (readonly2share (@gvar_readonly type v))). *)
Lemma init_data_lem:
forall (ge: genv) (v : globvar type) (b : block) (m1 : mem')
(m3 m4 : Memory.mem) (phi0 : rmap) (a : init_data) (z : Z) (rho: environ)
(w1 wf : rmap),
load_store_init_data1 ge m3 b z a ->
contents_at m4 = contents_at m3 ->
join w1 wf (beyond_block b (inflate_initial_mem m4 phi0)) ->
(forall loc : address,
if adr_range_dec (b, z) (init_data_size a) loc
then identity (wf @ loc) /\ access_at m4 loc Cur = Some (Genv.perm_globvar v)
else identity (w1 @ loc)) ->
forall (Hg: noghost w1) (VOL:  gvar_volatile v = false)
(AL: initializer_aligned z a = true)
(LO:   0 <= z) (HI: z + init_data_size a < Ptrofs.modulus)
(RHO: ge_of rho = filter_genv ge),
(init_data2pred a  (readonly2share (gvar_readonly v))
(Vptr b (Ptrofs.repr z))) rho w1.