Ltac process_one_globvar :=
first
[ simple eapply process_globvar_space;
[simpl; reflexivity | reflexivity | reflexivity | reflexivity | reflexivity | reflexivity | simpl; computable | ]
| simple eapply process_globvar';
[reflexivity | reflexivity | reflexivity | reflexivity | reflexivity | reflexivity
| reflexivity | compute; congruence | ]
| simple eapply process_globvar_array;
[reflexivity | reflexivity | reflexivity | reflexivity | reflexivity | reflexivity | apply Coq.Init.Logic.I
| compute; clear; congruence
| repeat eapply map_instantiate; symmetry; apply map_nil
| compute; split; clear; congruence |  ]
| simple eapply process_globvar_star';
[reflexivity | reflexivity | reflexivity | reflexivity
| reflexivity | compute; split; clear; congruence
| simpl gvar_info; simpl gvar_readonly; simpl readonly2share;
change (Share.lub extern_retainer Tsh) with Ews
]
| simple eapply halfprocess_globvar_star;
[reflexivity | reflexivity | reflexivity | reflexivity|
simpl; compute; split; clear; congruence | ]
];
change (Share.lub extern_retainer _) with Ews;
change (Share.lub extern_retainer _) with Ers;
try change (Vint oo _) with (Vint oo id);
fold_types;
rewrite ?Combinators.compose_id_right.

(* Lemma move_globfield_into_SEP'': forall {cs: compspecs}{Espec: OracleKind} Delta P Q R (i: ident) (v: val) (g: val -> mpred) (h: val -> val) (S2 S3 S4: environ -> mpred) c Post, In (gvar i v) Q -> semax Delta (PROPx P (LOCALx Q (SEPx ((g (h v))::R))) * S2 * S3 * S4) c Post -> semax Delta (PROPx P (LOCALx Q (SEPx R)) * ((EX x:val, local (locald_denote (gvar i x)) && `(g (h x))) * S2) * S3 * S4) c Post. *)
Lemma move_globfield_into_SEP0:
forall {cs: compspecs}{Espec: OracleKind} Delta
(S0 S3 S4: environ -> mpred) c Post,
semax Delta (S0 * S3 * S4) c Post ->
semax Delta (S0 * emp * S3 * S4) c Post.