Local Open Scope logic.
Class BupdSepLog (A N D: Type) {ND: NatDed A}{SL: SepLog A} := mkBSL {
bupd: A -> A;
own: forall {RA: Ghost}, N -> G -> D -> A;
bupd_intro: forall P, P |-- bupd P;
bupd_mono: forall P Q, P |-- Q -> bupd P |-- bupd Q;
bupd_trans: forall P, bupd (bupd P) |-- bupd P;
bupd_frame_r: forall P Q, bupd P * Q |-- bupd (P * Q);
own_alloc: forall {RA: Ghost} a pp, valid a ->
emp |-- bupd (EX g: N, own g a pp);
own_op: forall {RA: Ghost} g (a1 a2 a3: G) pp, join a1 a2 a3 ->
own g a3 pp = own g a1 pp * own g a2 pp;
own_valid_2: forall {RA: Ghost} g (a1 a2: G) pp,
own g a1 pp * own g a2 pp |-- !!valid_2 a1 a2;
own_update_ND: forall {RA: Ghost} g (a: G) B pp, fp_update_ND a B ->
own g a pp |-- bupd (EX b : _, !!(B b) && own g b pp);
own_dealloc: forall {RA: Ghost} g (a: G) pp,
own g a pp |-- bupd emp
}.
Notation "|==> P" := (bupd P) (at level 62): logic.

(* Specifications: *)
Lemma bupd_orp_r: forall `{BupdSepLog} (P Q: A), ((|==> P) || Q) |-- |==> P || Q.
Lemma bupd_orp_l: forall `{BupdSepLog} (P Q: A), (P || |==> Q) |-- |==> P || Q.
Lemma bupd_orp: forall `{BupdSepLog} (P Q: A), ((|==> P) || |==> Q) |-- |==> P || Q.
Lemma bupd_frame_l: forall `{BupdSepLog} (P Q: A), (P * |==> Q) |-- |==> P * Q.
Lemma bupd_sepcon: forall `{BupdSepLog} (P Q: A), ((|==> P) * |==> Q) |-- |==> P * Q.
Inductive Singleton {A} (x : A) : A -> Prop :=
| Singleton_I : Singleton x x.
Lemma own_update: forall `{BUPD: BupdSepLog} {RA: Ghost} g (a: G) b pp, fp_update a b ->
own g a pp |-- |==> (own g b pp).
Lemma own_valid: forall `{BupdSepLog} {RA: Ghost} g (a: G) pp,
own g a pp |-- !!valid a.
Lemma own_core: forall `{BupdSepLog} {RA: Ghost} g (a: G) pp,
own g a pp |-- |==> own g (core a) pp.