Definition makeCurMax_map (mem_access:PMap.t (Z -> perm_kind -> option permission)):
PMap.t (Z -> perm_kind -> option permission):=
PMap.map (fun f => fun z k => f z Max) mem_access.
Definition makeCurMax (m:mem): mem.
apply (Mem.mkmem (Mem.mem_contents m)
(makeCurMax_map (Mem.mem_access m))
(Mem.nextblock m)).
- intros. unfold makeCurMax_map; simpl. rewrite PMap.gmap.
apply po_refl.
- intros. unfold makeCurMax_map; simpl. rewrite PMap.gmap.
apply Mem.nextblock_noaccess; assumption.
- intros; apply Mem.contents_default.
Defined.

Lemma makeCurMax_valid :
forall m b,
Mem.valid_block m b <-> Mem.valid_block (makeCurMax m) b.