Local Open Scope logic.
Require Export mc_reify.reify.
Require Export mc_reify.bool_funcs.
Require Export MirrorCore.RTac.Repeat.
Require Export MirrorCore.RTac.Try.
Require Export MirrorCore.RTac.First.
Require Export mc_reify.funcs.
Require Export mc_reify.reflexivity_tacs.
(************************************************  Lemmas for rtac version of hoist_later_in_pre  ************************************************)
Fixpoint rstrip_1_later_sep (R: expr typ func) : expr typ func :=
match R with
| Inj (inr (Data (fnil tympred))) => Inj (inr (Data (fnil tympred)))
| App (App (Inj (inr (Data (fcons tympred)))) hd) tl =>
match hd with
| App (Inj (inr (Smx flater))) hd0 => App (App (Inj (inr (Data (fcons tympred)))) hd0) (rstrip_1_later_sep tl)
| _ => App (App (Inj (inr (Data (fcons tympred)))) hd) (rstrip_1_later_sep tl)
end
| _ => R
end.

Lemma fold_right_sepcon_later_derives: forall P P' Q Q' R,
P |-- |> P' ->
fold_right sepcon emp Q |-- |> (fold_right sepcon emp Q') ->
(fold_right sepcon emp (P' :: Q')) = R ->
fold_right sepcon emp (P :: Q) |-- |> R.