Definition ContentMap_EE_ValidBlock_FUN m1 m1' m2 b ofs: memval :=
if Mem.perm_dec m1 b ofs Max Nonempty
then ZMap.get ofs (PMap.get b m1'.(Mem.mem_contents))
else ZMap.get ofs (PMap.get b m2.(Mem.mem_contents)).
Definition ContentMap_EE_InvalidBlock_FUN m1' b ofs: memval:=
ZMap.get ofs (PMap.get b m1'.(Mem.mem_contents)).
Definition ContentMap_EE_Block_FUN m1 m1' m2 b ofs : memval:=
if plt b (Mem.nextblock m2)
then ContentMap_EE_ValidBlock_FUN m1 m1' m2 b ofs
else ContentMap_EE_InvalidBlock_FUN m1' b ofs.

(*The constructive version in TYPE below is actually more useful..*)
Lemma CM_block_EE_exists: forall (m1 m1' m2:Mem.mem) b,
exists M : ZMap.t memval,
fst M = Undef /\
forall ofs, ZMap.get ofs M =
ContentMap_EE_Block_FUN m1 m1' m2 b ofs.