Remark inval_after_outside:
forall i lo hi c, i < lo \/ i > hi -> (inval_after lo hi c)##i = c##i.
Remark inval_after_contents:
forall chunk av i lo hi c,
(inval_after lo hi c)##i = Some (ACval chunk av) ->
c##i = Some (ACval chunk av) /\ (i < lo \/ i > hi).
Remark inval_before_outside:
forall i hi lo c, i < lo \/ i >= hi -> (inval_before hi lo c)##i = c##i.
Remark inval_before_contents_1:
forall i chunk av lo hi c,
lo <= i < hi -> (inval_before hi lo c)##i = Some(ACval chunk av) ->
c##i = Some(ACval chunk av) /\ i + size_chunk chunk <= hi.

(* Specifications: *)
Lemma max_size_chunk: forall chunk, size_chunk chunk <= 8.
Remark inval_before_contents:
forall i c chunk' av' j,
(inval_before i (i - 7) c)##j = Some (ACval chunk' av') ->
c##j = Some (ACval chunk' av') /\ (j + size_chunk chunk' <= i \/ i <= j).
Lemma ablock_store_contents:
forall chunk ab i av j chunk' av',
(ablock_store chunk ab i av).(ab_contents)##j = Some(ACval chunk' av') ->
(i = j /\ chunk' = chunk /\ av' = av)
\/ (ab.(ab_contents)##j = Some(ACval chunk' av')
/\ (j + size_chunk chunk' <= i \/ i + size_chunk chunk <= j)).
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_contents:
forall ab p i sz j chunk' av',
(ablock_storebytes ab p i sz).(ab_contents)##j = Some(ACval chunk' av') ->
ab.(ab_contents)##j = Some (ACval chunk' av')
/\ (j + size_chunk chunk' <= i \/ i + Z.max sz 0 <= j).
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).