Definition loop1y_ret_assert (Inv : environ -> mpred) :=
  {| RA_normal := Inv; RA_break := FF; RA_continue := Inv; RA_return := FF |}.Definition for_ret_assert (I: environ->mpred) (Post: ret_assert) :=
 match Post with 
  {| RA_normal := _; RA_break := _; RA_continue := _; RA_return := r |} =>
  {| RA_normal := I; RA_break := FF; RA_continue := I; RA_return := r |}
 end.Ltac simpl_ret_assert := 
 cbn [RA_normal RA_break RA_continue RA_return 
      normal_ret_assert overridePost loop1_ret_assert
      loop2_ret_assert function_body_ret_assert frame_ret_assert
      switch_ret_assert loop1x_ret_assert loop1y_ret_assert
      for_ret_assert loop_nocontinue_ret_assert].

(* Specifications: *)
Lemma RA_normal_loop2_ret_assert: (* MOVE TO assert_lemmas *) forall Inv R, RA_normal (loop2_ret_assert Inv R) = Inv.
Lemma overridePost_normal: forall P Q, overridePost P (normal_ret_assert Q) = normal_ret_assert P.
Lemma frame_normal: forall P F, frame_ret_assert (normal_ret_assert P) F = normal_ret_assert (P * F).
Lemma frame_for1: forall Q R F, frame_ret_assert (loop1_ret_assert Q R) F = loop1_ret_assert (Q * F) (frame_ret_assert R F).
Lemma frame_loop1: forall Q R F, frame_ret_assert (loop2_ret_assert Q R) F = loop2_ret_assert (Q * F) (frame_ret_assert R F).
Lemma overridePost_overridePost: forall P Q R, overridePost P (overridePost Q R) = overridePost P R.
Lemma overridePost_normal': forall P R, RA_normal (overridePost P R) = P.
Lemma liftx_id: forall {T} e, @liftx (Tarrow T (LiftEnviron T)) (fun v => v) e = e.
Lemma liftx3_liftx2: forall {A1 A2 A3 B} f (x: A1), @liftx (Tarrow A1 (Tarrow A2 (Tarrow A3 (LiftEnviron B)))) f (@liftx (LiftEnviron A1) x) = @liftx (Tarrow A2 (Tarrow A3 (LiftEnviron B))) (f x).
Lemma liftx2_liftx1: forall {A1 A2 B} f (x: A1), @liftx (Tarrow A1 (Tarrow A2 (LiftEnviron B))) f (@liftx (LiftEnviron A1) x) = @liftx (Tarrow A2 (LiftEnviron B)) (f x).
Lemma liftx1_liftx0: forall {A1 B} f (x: A1), @liftx (Tarrow A1 (LiftEnviron B)) f (@liftx (LiftEnviron A1) x) = @liftx (LiftEnviron B) (f x).
Lemma lift1_lift0: forall {A1 B} (f: A1 -> B) (x: A1), lift1 f (lift0 x) = lift0 (f x).
Lemma lift_identity: forall A f, `(fun v: A => v) f = f.
Lemma subst_TT {A}{NA: NatDed A}: forall i v, subst i v TT = TT.
Lemma subst_FF {A}{NA: NatDed A}: forall i v, subst i v FF = FF.
Lemma subst_sepcon: forall i v (P Q: environ->mpred), subst i v (P * Q) = (subst i v P * subst i v Q).
Lemma env_set_env_set: forall id v1 v2 rho, env_set (env_set rho id v1) id v2 = env_set rho id v2.
Lemma resubst_full: forall {A} i (v: environ -> val) v1 (e: environ -> A), subst i v1 (subst i v e) = subst i (subst i v1 v) e.
Lemma subst_ewand: forall i v (P Q: environ->mpred), subst i v (ewand P Q) = ewand (subst i v P) (subst i v Q).
Lemma subst_andp {A}{NA: NatDed A}: forall id v (P Q: environ-> A), subst id v (P && Q) = subst id v P && subst id v Q.
Lemma subst_prop {A}{NA: NatDed A}: forall i v P, subst i v (prop P) = prop P.
Lemma eval_expr_Econst_int: forall {cs: compspecs} i t, eval_expr (Econst_int i t) = `(Vint i).
Lemma subst_eval_var: forall id v id' t, subst id v (eval_var id' t) = eval_var id' t.
Lemma subst_local: forall id v P, subst id v (local P) = local (subst id v P).
Lemma eval_lvalue_Ederef: forall {cs: compspecs} e t, eval_lvalue (Ederef e t) = eval_expr e.
Lemma overridePost_EK_return: forall Q P, RA_return (overridePost Q P) = RA_return P.
Lemma frame_ret_assert_emp: forall P, frame_ret_assert P emp = P.
Lemma frame_ret_assert_EK_return: forall P Q vl, RA_return (frame_ret_assert P Q) vl = RA_return P vl * Q.
Lemma function_body_ret_assert_EK_return: forall t P vl, RA_return (function_body_ret_assert t P) vl = bind_ret vl t P.
Lemma normal_ret_assert_elim: forall P, RA_normal (normal_ret_assert P) = P.
Lemma overridePost_EK_break: forall P Q, RA_break (overridePost P Q) = RA_break Q.
Lemma loop1_ret_assert_EK_break: forall P Q, RA_break (loop1_ret_assert P Q) = RA_normal Q.
Lemma loop1_ret_assert_normal: forall P Q, RA_normal (loop1_ret_assert P Q) = P.
Lemma unfold_make_args': forall fsig args rho, make_args' fsig args rho = make_args (map (@fst _ _) (fst fsig)) (args rho) rho.
Lemma unfold_make_args_cons: forall i il v vl rho, make_args (i::il) (v::vl) rho = env_set (make_args il vl rho) i v.
Lemma unfold_make_args_nil: make_args nil nil = globals_only.
Qed. Lemma eval_make_args_other: forall {cs: compspecs} i j fsig t0 t t' tl (e: expr) el, i<>j ->