Module MemoryLemmas.
Global Notation "a # b" := (Maps.PMap.get b a) (at level 1).
Transparent Mem.store.
Transparent Mem.alloc.
Definition max_inv mf := forall b ofs, Mem.valid_block mf b ->
permission_at mf b ofs Max = Some Freeable.

Lemma max_inv_store:
forall m m' chunk b ofs v pmap
(Hlt: permMapLt pmap (getMaxPerm m))
(Hmax: max_inv m)
(Hstore: Mem.store chunk (restrPermMap Hlt) b ofs v = Some m'),
max_inv m'.