(*****************The following variant is used in the linker***********)
Definition gvars_included {V1 V2} (gv1:option (globvar V1)) (gv2: option (globvar V2)): Prop :=
match gv1, gv2 with
None, None => True
| None, Some x2 => True
| Some x1, None => False
| Some x1, Some x2 => gvar_init x1 = gvar_init x2 /\
gvar_readonly x1 = gvar_readonly x2 /\
gvar_volatile x1 = gvar_volatile x2
end.

(* Specifications: *)
Lemma gvars_cohereD {F1 V1 F2 V2} (ge1:Genv.t F1 V1) (ge2:Genv.t F2 V2)
(HG: forall b, gvars_included (Genv.find_var_info ge1 b)
(Genv.find_var_info ge2 b))
b gv1 (GV: Genv.find_var_info ge1 b = Some gv1):
exists gv2, Genv.find_var_info ge2 b = Some gv2 /\
gvar_init gv1 = gvar_init gv2 /\
gvar_readonly gv1 = gvar_readonly gv2 /\
gvar_volatile gv1 = gvar_volatile gv2.