Fixpoint alloc_globals_rev {F V} (ge: Genv.t F V) (m: mem) (vl: list (ident * globdef F V))
                         {struct vl} : option mem :=
  match vl with
  | nil => Some m
  | v :: vl' =>
     match alloc_globals_rev ge m vl' with
     | Some m' => Genv.alloc_global ge m' v
     | None => None
     end
  end.

Lemma alloc_globals_app: forall F V (ge: Genv.t F V) m m2 vs vs', Genv.alloc_globals ge m (vs++vs') = Some m2 <-> exists m', Genv.alloc_globals ge m vs = Some m' /\ Genv.alloc_globals ge m' vs' = Some m2.