Fixpoint prog_funct' {F V} (l: list (ident * globdef F V)) : list (ident * F) :=
match l with nil => nil | (i,Gfun f)::r => (i,f):: prog_funct' r | _::r => prog_funct' r
end.
Definition prog_funct {F} (p: program F) := prog_funct' (prog_defs p).

Lemma find_symbol_add_globals':
forall {F V} i g id dl prog_pub,
match dl with
nil => forall p,
(Genv.find_symbol
(Genv.add_globals (Genv.empty_genv F V prog_pub) ((i, g) :: nil)) id =
Some p <-> (i = id /\ 1%positive = p))
| _ =>
~ In i (map fst dl) -> list_norepet (map fst dl) ->
(Genv.find_symbol
(Genv.add_globals (Genv.empty_genv F V prog_pub) (dl ++ (i, g) :: nil)) id =
Some (1 + (Z.to_pos (Zlength dl)))%positive <-> i = id)
end.