Section MEMORY_CONSTRUCTION_II.
Variable j12 j23 j12' j23':meminj.
Variable m1 m1' m2 : mem.
Definition AccessMap_II_FUN (b2:block):
Z -> perm_kind -> option permission :=
if plt b2 (Mem.nextblock m2)
then (fun ofs2 k =>
match j23 b2 with
None => PMap.get b2 m2.(Mem.mem_access) ofs2 k
| Some (b3,d3) =>
match source j12 m1 b2 ofs2 with
Some(b1,ofs1) => PMap.get b1 m1'.(Mem.mem_access) ofs1 k
| None => PMap.get b2 m2.(Mem.mem_access) ofs2 k
end
end)
else (fun ofs2 k =>
match source j12' m1' b2 ofs2 with
Some(b1,ofs1) => PMap.get b1 m1'.(Mem.mem_access) ofs1 k
| None => None
end).

(* Specifications: *)
Lemma mkAccessMap_II_existsT: forall N
(VB : (Mem.nextblock m2 <= N)%positive)
(VBJ12': forall b1 b2 delta, j12' b1 = Some (b2,delta) ->
(b2 < N)%positive),
{ M : PMap.t (Z -> perm_kind -> option permission) |
fst M = (fun k ofs => None) /\
forall b, PMap.get b M = AccessMap_II_FUN b}.
Lemma mkAccessMap_II_existsT: forall N
(VB : (Mem.nextblock m2 <= N)%positive)
(VBJ12': forall b1 b2 delta, j12' b1 = Some (b2,delta) ->
(b2 < N)%positive),
{ M : PMap.t (Z -> perm_kind -> option permission) |
fst M = (fun k ofs => None) /\
forall b, PMap.get b M = AccessMap_II_FUN b}.