Definition AccessMap_IE_Property  j12 j12' m1 m1' m2 m3'
(AM:ZMap.t (Z -> perm_kind -> option permission)):Prop :=
forall b2,
(Mem.valid_block m2 b2 -> forall k ofs2,
match source j12 m1 b2 ofs2 with
Some(b1,ofs1) =>  PMap.get b2 AM ofs2 k =
PMap.get b1 m1'.(Mem.mem_access) ofs1 k
| None => PMap.get b2 AM ofs2 k =
PMap.get b2 m2.(Mem.mem_access) ofs2 k
end)
/\ (~ Mem.valid_block m2 b2 -> forall k ofs2,
match source j12' m1' b2 ofs2 with
Some(b1,ofs1) => PMap.get b2 AM ofs2 k =
PMap.get b1 m1'.(Mem.mem_access) ofs1 k
| None => PMap.get b2 AM ofs2 k =
PMap.get b2 m3'.(Mem.mem_access) ofs2 k
end).
Definition Content_IE_Property j12 (m1 m1' m2 m3':Mem.mem)
(CM:ZMap.t (ZMap.t memval)):=
forall b2,
(Mem.valid_block m2 b2 -> forall ofs2,
match source j12 m1 b2 ofs2 with
Some(b1,ofs1) => ZMap.get ofs2 (PMap.get b2 CM) =
ZMap.get ofs2 (PMap.get b2 m3'.(Mem.mem_contents))
| None => ZMap.get ofs2 (PMap.get b2 CM) =
ZMap.get ofs2 (PMap.get b2 m2.(Mem.mem_contents))
end)
/\ (~ Mem.valid_block m2 b2 -> forall (HM3': Mem.valid_block m3' b2) ofs2,
ZMap.get ofs2 (PMap.get b2 CM) =
ZMap.get ofs2 (PMap.get b2 m3'.(Mem.mem_contents)))
/\ fst CM !! b2 = Undef.
Definition AccessMap_IE_FUN (j12 j12':meminj) (m1 m1' m2 m3':Mem.mem) (b2:block):
Z -> perm_kind -> option permission :=
if plt b2 (Mem.nextblock m2)
then (fun ofs2 k =>
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)
else (fun ofs2 k =>
match source j12' m1' b2 ofs2 with
Some(b1,ofs1) => PMap.get b1 m1'.(Mem.mem_access) ofs1 k
| None => PMap.get b2 m3'.(Mem.mem_access) ofs2 k
end).

Lemma mkAccessMap_IE_existsT: forall j12 j12'(m1 m1' m2 m3':Mem.mem)
(VB': forall b1 b3 delta, j12' b1 = Some (b3, delta) ->
(Mem.valid_block m1' b1 /\ Mem.valid_block m3' b3))
(VB : (Mem.nextblock m2 <= Mem.nextblock m3')%positive),
{ M : PMap.t (Z -> perm_kind -> option permission) |
fst M = (fun k ofs => None) /\
forall b, PMap.get b M = AccessMap_IE_FUN j12 j12' m1 m1' m2 m3' b}.