(** Boolean-valued equality test *)

Definition nmem_beq (nm1 nm2: nmem) : bool :=
  match nm1, nm2 with
  | NMemDead, NMemDead => true
  | NMem stk1 gl1, NMem stk2 gl2 => ISet.beq stk1 stk2 && PTree.beq ISet.beq gl1 gl2
  | _, _ => false
  end.

(* Specifications: *)
Lemma nmem_beq_sound: forall nm1 nm2 b ofs, nmem_beq nm1 nm2 = true -> (nlive nm1 b ofs <-> nlive nm2 b ofs).