Program Definition empty_genv (pub: list ident): t :=
  @mkgenv pub (PTree.empty _) (PTree.empty _) 1%positive _ _ _.Definition globalenv (p: program F V) :=
  add_globals (empty_genv p.(prog_public)) p.(prog_defs).

Lemma add_globals_preserves: forall gl ge, (forall ge id g, P ge -> In (id, g) gl -> P (add_global ge (id, g))) -> P ge -> P (add_globals ge gl).