Local Open Scope pred.
Fixpoint match_globvars (gvs: list (ident * globvar type)) (V: varspecs) : bool :=
match V with
| nil => true
| (id,t)::V' => match gvs with
| nil => false
| (j,g)::gvs' => if eqb_ident id j
then andb (eqb_type t (gvar_info g)) (match_globvars gvs' V')
else match_globvars gvs' V
end
end.

Lemma typecheck_var_environ_i:
forall ge (vars : list (ident * type))
(ve' : env)
(m1 m2 : Memory.mem),
list_norepet (map fst vars) ->
alloc_variables ge empty_env m1 vars ve' m2 ->
typecheck_var_environ (make_venv ve') (make_tycontext_v vars).