Remark in_norepet_unique:
forall id g (gl: list (ident * globdef F V)),
In (id, g) gl -> list_norepet (map fst gl) ->
exists gl1 gl2, gl = gl1 ++ (id, g) :: gl2 /\ ~In id (map fst gl2).

Lemma add_globals_norepet_ensures:
forall id g gl ge,
(forall ge id1 g1, P ge -> In (id1, g1) gl -> id1 <> id -> P (add_global ge (id1, g1))) ->
(forall ge, P (add_global ge (id, g))) ->
In (id, g) gl -> list_norepet (map fst gl) -> P (add_globals ge gl).