Section GLOBALENV_PRINCIPLES.
Variable P: t -> Prop.
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).
End GLOBALENV_PRINCIPLES.
(** ** Properties of the operations over global environments *)
Definition advance_next (gl: list (ident * globdef F V)) (x: positive) :=
List.fold_left (fun n g => Pos.succ n) gl x.
Remark genv_next_add_globals:
forall gl ge,
genv_next (add_globals ge gl) = advance_next gl (genv_next ge).
Remark genv_public_add_globals:
forall gl ge,
genv_public (add_globals ge gl) = genv_public ge.

Theorem globalenv_public:
forall p, genv_public (globalenv p) = prog_public p.