(* general list lemmas *)
Notation vint z := (Vint (Int.repr z)).Notation vptrofs z := (Vptrofs (Ptrofs.repr z)).

(* Specifications: *)
Lemma Forall_forall_Znth : forall {A}{d: Inhabitant A} (P : A -> Prop) l, Forall P l <-> forall i, 0 <= i < Zlength l -> P (Znth i l).
Lemma Zmod_smallish : forall x y, y <> 0 -> 0 <= x < 2 * y -> x mod y = x \/ x mod y = x - y.
Lemma Zmod_plus_inv : forall a b c d (Hc : c > 0) (Heq : (a + b) mod c = (d + b) mod c), a mod c = d mod c.
Lemma Znth_app : forall {A}{d: Inhabitant A} (l1 l2 : list A) i, Zlength l1 = i -> Znth i (l1 ++ l2) = Znth 0 l2.