Definition ContentMap_EFF_ValidBlock_FUN b2 ofs2: memval :=
if locBlocksSrc nu23 b2
then if (pubBlocksSrc nu23 b2)
then match source (local_of nu12) m1 b2 ofs2 with
Some(b1,ofs1) =>
if pubBlocksSrc nu12 b1
then inject_memval j12'
(ZMap.get ofs1 (PMap.get b1 m1'.(Mem.mem_contents)))
else ZMap.get ofs2 (PMap.get b2 m2.(Mem.mem_contents))
| None => ZMap.get ofs2 (PMap.get b2 m2.(Mem.mem_contents))
end
else ZMap.get ofs2 (PMap.get b2 m2.(Mem.mem_contents))
else match source (as_inj nu12) m1 b2 ofs2 with
Some(b1,ofs1) => inject_memval j12'
(ZMap.get ofs1 (PMap.get b1 m1'.(Mem.mem_contents)))
| None => ZMap.get ofs2 (PMap.get b2 m2.(Mem.mem_contents))
end.
Definition ContentMap_EFF_InvalidBlock_FUN b2 ofs2: memval :=
match source j12' m1' b2 ofs2 with
None => Undef
| Some(b1,ofs1) => inject_memval j12'
(ZMap.get ofs1 (PMap.get b1 m1'.(Mem.mem_contents)))
end.
Definition ContentMap_EFF_Block_FUN b ofs : memval:=
if plt b (Mem.nextblock m2)
then ContentMap_EFF_ValidBlock_FUN b ofs
else ContentMap_EFF_InvalidBlock_FUN b ofs.
Variable MINMAX_Offset: block -> option (Z * Z).
Hypothesis MINMAX: forall b2 ,
match MINMAX_Offset b2 with
Some(mn,mx) =>
(forall ofs, ofs < mn \/ ofs > mx ->
Plt b2 (Mem.nextblock m2) ->
ZMap.get ofs (Mem.mem_contents m2)!!b2 = Undef) /\
forall b1 delta, as_inj nu12 b1 = Some(b2,delta) \/ j12' b1 = Some(b2,delta)->
forall z, z + delta < mn \/ z + delta > mx ->
ZMap.get z (Mem.mem_contents m1')!!b1 = Undef
| None =>
(Plt b2 (Mem.nextblock m2) ->
forall ofs, ZMap.get ofs (Mem.mem_contents m2)!!b2 = Undef)
/\
forall b1 delta, as_inj nu12 b1 = Some(b2,delta) \/ j12' b1 = Some(b2,delta)->
forall z, ZMap.get z (Mem.mem_contents m1')!!b1 = Undef
end.
Variable WDnu12: SM_wd nu12.

(* Specifications: *)
Lemma CM_block_EFF_existsT: forall b,
{ M : ZMap.t memval |
fst M = Undef /\
forall ofs, ZMap.get ofs M =
ContentMap_EFF_Block_FUN b ofs}.