Definition force_ptr (v: val) : val :=
              match v with Vptr l ofs => v | _ => Vundef  end.Definition always {A B: Type} (b: B) (a: A) := b.Definition offset_val (ofs: Z) (v: val) : val :=
  match v with
  | Vptr b z => Vptr b (Ptrofs.add z (Ptrofs.repr ofs))
  | _ => Vundef
 end.Definition range_s32 (i: Z) : bool := 
   andb (Z.leb Int.min_signed i) (Z.leb i Int.max_signed).Definition range_s64 (i: Z) : bool := 
   andb (Z.leb Int64.min_signed i) (Z.leb i Int64.max_signed).Definition is_long (v: val) :=
 match v with Vlong i => True | _ => False end.Definition is_float (v: val) :=
 match v with Vfloat i => True | _ => False end.Definition is_single (v: val) :=
 match v with Vsingle i => True | _ => False end.Definition is_pointer_or_null (v: val) :=
 match v with
 | Vint i => if Archi.ptr64 then False else  i = Int.zero
 | Vlong i => if Archi.ptr64 then i=Int64.zero else False
 | Vptr _ _ => True
 | _ => False
 end.Definition is_pointer_or_integer (v: val) :=
 match v with
 | Vint i => if Archi.ptr64 then False else True
 | Vlong i => if Archi.ptr64 then True else False
 | Vptr _ _ => True
 | _ => False
 end.Definition isptr v :=
   match v with | Vptr _ _ => True | _ => False end.

Lemma two_p_neg: forall n, n<0 -> two_p n = 0.