Local Open Scope pred.
(* This file contains two parts: 1. Proof of semax_conseq. 2. Deriving simpler and older version of consequence rules from semax_conseq. *)
(* Part 1: Proof of semax_conseq *)
Definition bupd_ret_assert (Q: ret_assert): ret_assert :=
{| RA_normal := fun rho => bupd (RA_normal Q rho);
RA_break := fun rho => bupd (RA_break Q rho);
RA_continue := fun rho => bupd (RA_continue Q rho);
RA_return := fun v rho => bupd (RA_return Q v rho) |}.
(* The following four lemmas is not now used. but after deep embedded hoare logic (SL_as_Logic) is ported, the frame does not need to be quantified in the semantic definition of semax. Then, these two lemmas can replace the other two afterwards. *)

Lemma assert_safe_bupd:
forall {Espec: OracleKind} gx vx tx rho (F P: environ -> pred rmap) Delta f k,
let PP1 := !! guard_environ Delta f rho in
let PP2 := funassert Delta rho in
PP1 && (F rho * P rho) && PP2 >=>
assert_safe Espec gx f vx tx k rho =
PP1 && (F rho * bupd (P rho)) && PP2 >=>
assert_safe Espec gx f vx tx k rho.