Definition range_overlap (base1: address) (sz1: Z) (base2: address) (sz2: Z) : Prop :=
exists loc, adr_range base1 sz1 loc /\ adr_range base2 sz2 loc.
Definition adr_add (loc: address) (ofs: Z) : address := (fst loc, snd loc + ofs).
Definition val2adr (v: val) (l: address) : Prop :=
(*     match v with Vptr b ofs => l = (b, Int.unsigned ofs) | _ => False end.*)
match v with Vptr b ofs => l = (b, Ptrofs.unsigned ofs) | _ => False end.

(* Specifications: *)
Lemma adr_range_non_zero: forall l1 n l2, adr_range l1 n l2 -> n > 0.
Lemma adr_range_shift_1: forall bl ofs n l, adr_range (bl, ofs + 1) (Z.of_nat n) l -> adr_range (bl, ofs) (Z.of_nat (S n)) l.
Lemma adr_range_S_split: forall bl ofs n l, adr_range (bl, ofs) (Z.of_nat (S n)) l -> adr_range (bl, ofs + 1) (Z.of_nat n) l \/ l = (bl, ofs).