Record memstep_preserve (P:mem -> mem -> Prop) :=
{
preserve_trans: forall m1 m2 m3, P m1 m2 -> P m2 m3 -> P m1 m3;
preserve_mem: forall m m', mem_step m m' -> P m m'
}.

Theorem perm_preserve:
memstep_preserve (fun m m' =>  mem_forward m m' /\ forall b, Mem.valid_block m b -> forall ofs, Mem.perm m' b ofs Max Nonempty ->
forall k p, Mem.perm m b ofs k p <-> Mem.perm m' b ofs k p).