(** * Validity of blocks and accesses *)

(** A block address is valid if it was previously allocated. It remains valid
  even after being freed. *)

Definition valid_block (m: mem) (b: block) := Plt b (nextblock m).

(* Specifications: *)
Theorem valid_not_valid_diff: forall m b b', valid_block m b -> ~(valid_block m b') -> b <> b'.
Theorem perm_implies: forall m b ofs k p1 p2, perm m b ofs k p1 -> perm_order p1 p2 -> perm m b ofs k p2.
Theorem perm_cur_max: forall m b ofs p, perm m b ofs Cur p -> perm m b ofs Max p.
Theorem perm_cur: forall m b ofs k p, perm m b ofs Cur p -> perm m b ofs k p.
Theorem perm_max: forall m b ofs k p, perm m b ofs k p -> perm m b ofs Max p.
Theorem perm_valid_block: forall m b ofs k p, perm m b ofs k p -> valid_block m b.