(** Boolean equality *)
Definition mbeq (m1 m2: amem) : bool :=
eq_aptr m1.(am_top) m2.(am_top)
&& eq_aptr m1.(am_nonstack) m2.(am_nonstack)
&& bbeq m1.(am_stack) m2.(am_stack)
&& PTree.beq bbeq m1.(am_glob) m2.(am_glob).

Lemma mbeq_sound:
forall m1 m2, mbeq m1 m2 = true -> forall m, mmatch m m1 <-> mmatch m m2.