(** Boolean equality *)

Definition bbeq (ab1 ab2: ablock) : bool :=
  eq_aptr ab1.(ab_summary) ab2.(ab_summary) &&
  ZTree.beq (fun c1 c2 => proj_sumbool (eq_acontent c1 c2)) ab1.(ab_contents) ab2.(ab_contents).

(* Specifications: *)
Lemma bbeq_load: forall ab1 ab2, bbeq ab1 ab2 = true -> ab1.(ab_summary) = ab2.(ab_summary) /\ (forall chunk i, ablock_load chunk ab1 i = ablock_load chunk ab2 i).
Lemma bbeq_sound: forall ab1 ab2, bbeq ab1 ab2 = true -> forall m b, bmatch m b ab1 <-> bmatch m b ab2.