Ltac unfold_app :=
change (@app mpred)
with (fix app (l m : list mpred) {struct l} : list mpred :=
match l with
| nil => m
| cons a l1 => cons a (app l1 m)
end);
change (@app Prop)
with (fix app (l m : list Prop) {struct l} : list Prop :=
match l with
| nil => m
| cons a l1 => cons a (app l1 m)
end);
cbv beta iota.
Ltac localize R_L :=
eapply (localize R_L); [prove_split_FRZ_in_SEP |];
let FR_L := fresh "RamL" in
let FR_G := fresh "RamG" in
intros FR_L FR_G;
eexists;
unfold_app.

Lemma unlocalize_triple: forall R_G2 Espec {cs: compspecs} Delta P Q R R_FR R_L1 R_G1 R_L2 c Post w,
split_FRZ_in_SEP R R_L2 (@FRZR R_L1 R_G1 w :: R_FR) ->
(exists (H: fold_right_sepcon R_G1 |-- fold_right_sepcon R_L1 * (fold_right_sepcon R_L2 -* fold_right_sepcon R_G2)), w = @Freezer.FRZRw_constr _ _ _ H) ->
(@abbreviate _ (fun _ _ => True) R_L1 R_G1 -> @semax cs Espec Delta (PROPx P (LOCALx Q (SEPx (R_G2 ++ R_FR)))) c Post) ->
@semax cs Espec Delta (PROPx P (LOCALx Q (SEPx R))) c Post.