Section GLOBALENV_PRINCIPLES.
Variable P: t -> Prop.

Lemma add_globals_unique_ensures:
forall gl1 id g gl2 ge,
(forall ge id1 g1, P ge -> In (id1, g1) gl2 -> id1 <> id -> P (add_global ge (id1, g1))) ->
(forall ge, P (add_global ge (id, g))) ->
~In id (map fst gl2) -> P (add_globals ge (gl1 ++ (id, g) :: gl2)).