Definition ptr_eq (v1 v2: val) : Prop :=
      match v1,v2 with
      | Vint n1, Vint n2 =>  Archi.ptr64 = false /\ Int.cmpu Ceq n1 n2 = true  /\ Int.cmpu Ceq n1 (Int.repr 0) = true
      | Vlong n1, Vlong n2 =>  Archi.ptr64 = true /\ Int64.cmpu Ceq n1 n2 = true  /\ Int64.cmpu Ceq n1 (Int64.repr 0) = true
      | Vptr b1 ofs1,  Vptr b2 ofs2  =>
            b1=b2 /\ Ptrofs.cmpu Ceq ofs1 ofs2 = true
      | _,_ => False
      end.Definition ptr_neq (v1 v2: val) := ~ ptr_eq v1 v2.

(* Specifications: *)
Lemma ptr_eq_e: forall v1 v2, ptr_eq v1 v2 -> v1=v2.
Lemma ptr_eq_True': forall p, isptr p -> ptr_eq p p = True.
Lemma ptr_eq_True: forall p, is_pointer_or_null p -> ptr_eq p p = True.
Lemma ptr_eq_is_pointer_or_null: forall x y, ptr_eq x y -> is_pointer_or_null x.
Lemma ptr_eq_sym: forall x y, ptr_eq x y -> ptr_eq y x.
Lemma ptr_eq_trans: forall x y z, ptr_eq x y -> ptr_eq y z -> ptr_eq x z.
Lemma isptr_offset_val_zero: forall v, isptr v -> offset_val 0 v = v.
Lemma isptr_offset_val: forall i p, isptr (offset_val i p) = isptr p.
Lemma isptr_force_ptr: forall v, isptr v -> force_ptr v = v.
Lemma isptr_force_ptr' : forall p, isptr (force_ptr p) = isptr p.