Definition canonicalPMap fn n m : Maps.PMap.t (Z -> perm_kind -> option permission) :=
    let l := mkBlockList n in
    (fun _ _ => None, canonicalPTree (PList fn l m)).Definition setMaxPerm (m : mem) : mem.

(* Specifications: *)
Lemma setMaxPerm_Max : forall m b ofs, (Mem.valid_block m b -> permission_at (setMaxPerm m) b ofs Max = Some Freeable) /\ (~Mem.valid_block m b -> permission_at (setMaxPerm m) b ofs Max = None).
Lemma setMaxPerm_MaxV : forall m b ofs, Mem.valid_block m b -> permission_at (setMaxPerm m) b ofs Max = Some Freeable.
Lemma setMaxPerm_MaxI : forall m b ofs, ~ Mem.valid_block m b -> permission_at (setMaxPerm m) b ofs Max = None.
Lemma setMaxPerm_Cur : forall m b ofs, permission_at (setMaxPerm m) b ofs Cur = permission_at m b ofs Cur.