Definition bmatch (m: mem) (b: block) (ab: ablock) : Prop :=
  smatch m b ab.(ab_summary) /\
  forall chunk ofs v, Mem.load chunk m b ofs = Some v -> vmatch v (ablock_load chunk ab ofs).

(* Specifications: *)
Lemma bmatch_ext: forall m b ab m', bmatch m b ab -> (forall ofs n bytes, Mem.loadbytes m' b ofs n = Some bytes -> n >= 0 -> Mem.loadbytes m b ofs n = Some bytes) -> bmatch m' b ab.
Lemma bmatch_inv: forall m b ab m', bmatch m b ab -> (forall ofs n, n >= 0 -> Mem.loadbytes m' b ofs n = Mem.loadbytes m b ofs n) -> bmatch m' b ab.
Lemma ablock_load_sound: forall chunk m b ofs v ab, Mem.load chunk m b ofs = Some v -> bmatch m b ab -> vmatch v (ablock_load chunk ab ofs).
Lemma ablock_load_anywhere_sound: forall chunk m b ofs v ab, Mem.load chunk m b ofs = Some v -> bmatch m b ab -> vmatch v (ablock_load_anywhere chunk ab).
Lemma ablock_init_sound: forall m b p, smatch m b p -> bmatch m b (ablock_init p).
Lemma ablock_store_anywhere_sound: forall chunk m b ofs v m' b' ab av, Mem.store chunk m b ofs v = Some m' -> bmatch m b' ab -> vmatch v av -> bmatch m' b' (ablock_store_anywhere chunk ab av).
Lemma max_size_chunk: forall chunk, size_chunk chunk <= 8.
Lemma chunk_compat_true: forall c c', chunk_compat c c' = true -> size_chunk c = size_chunk c' /\ align_chunk c <= align_chunk c' /\ type_of_chunk c = type_of_chunk c'.
Lemma ablock_store_sound: forall chunk m b ofs v m' ab av, Mem.store chunk m b ofs v = Some m' -> bmatch m b ab -> vmatch v av -> bmatch m' b (ablock_store chunk ab ofs av).
Lemma ablock_loadbytes_sound: forall m b ab b' ofs' q i n ofs bytes, Mem.loadbytes m b ofs n = Some bytes -> bmatch m b ab -> In (Fragment (Vptr b' ofs') q i) bytes -> pmatch b' ofs' (ablock_loadbytes ab).
Lemma ablock_storebytes_anywhere_sound: forall m b ofs bytes p m' b' ab, Mem.storebytes m b ofs bytes = Some m' -> (forall b' ofs' q i, In (Fragment (Vptr b' ofs') q i) bytes -> pmatch b' ofs' p) -> bmatch m b' ab -> bmatch m' b' (ablock_storebytes_anywhere ab p).
Lemma ablock_storebytes_sound: forall m b ofs bytes m' p ab sz, Mem.storebytes m b ofs bytes = Some m' -> length bytes = nat_of_Z sz -> (forall b' ofs' q i, In (Fragment (Vptr b' ofs') q i) bytes -> pmatch b' ofs' p) -> bmatch m b ab -> bmatch m' b (ablock_storebytes ab p ofs sz).