(** C allows pointers one past the last element of an array.  These are not valid according to the previously defined [valid_pointer]. The property [weak_valid_pointer m b ofs] holds if address [b, ofs] is a valid pointer in [m], or a pointer one past a valid block in [m].  *)
Definition weak_valid_pointer (m: mem) (b: block) (ofs: Z) :=
valid_pointer m b ofs || valid_pointer m b (ofs - 1).

(* Specifications: *)
Lemma weak_valid_pointer_spec:
forall m b ofs,
weak_valid_pointer m b ofs = true <->
valid_pointer m b ofs = true \/ valid_pointer m b (ofs - 1) = true.
Lemma valid_pointer_implies:
forall m b ofs,
valid_pointer m b ofs = true -> weak_valid_pointer m b ofs = true.
Axiom weak_valid_pointer_spec:
forall m b ofs,
weak_valid_pointer m b ofs = true <->
valid_pointer m b ofs = true \/ valid_pointer m b (ofs - 1) = true.
Axiom valid_pointer_implies:
forall m b ofs,
valid_pointer m b ofs = true -> weak_valid_pointer m b ofs = true.