Instance EqDec_Z : EqDec Z := zeq.

(* Specifications: *)
Lemma advance_next_length: forall F V vl n, @Genv.advance_next F V vl n = (Pos.of_nat (S (length vl)) + n - 1)%positive.
Lemma Zpos_Posofnat: forall n, (n>0)%nat -> Z.pos (Pos.of_nat n) = Z.of_nat n.
Lemma add_globals_hack {F}: forall vl gev prog_pub, list_norepet (map fst vl) -> gev = Genv.add_globals (Genv.empty_genv (fundef F) type prog_pub) (rev vl) -> (forall id b, 0 <= Zpos b - 1 < Zlength vl -> (Genv.find_symbol gev id = Some b <-> nth_error (map (@fst _ _) vl) (length vl - Pos.to_nat b) = Some id)).
Lemma find_symbol_globalenv {F}: forall (prog: program F) i b, list_norepet (prog_defs_names prog) -> Genv.find_symbol (Genv.globalenv prog) i = Some b -> 0 < Z.pos b <= Z_of_nat (length (prog_defs prog)) /\ exists d, nth_error (prog_defs prog) (nat_of_Z (Z.pos b-1)) = Some (i,d).