(* Lemmas that DO NOT depend on CompCert or Verifiable C *)
Definition Vector_0_is_nil (T : Type) (v : Vector.t T 0) : v = Vector.nil T :=
match v with Vector.nil => eq_refl end.

(* Specifications: *)
Lemma VectorToList_cons A n: forall (a:A) l,
Vector.to_list (Vector.cons A a n l) =
List.cons a (Vector.to_list l).
Lemma VectorToList_combine A n: forall (a:A) b v1 v2,
combine (Vector.to_list (Vector.cons A a n v1))
(Vector.to_list (Vector.cons A b n v2))
= (a,b) :: combine (Vector.to_list v1) (Vector.to_list v2).
Lemma Forall2_map {A B} (f:A -> B): forall l m,
Forall2 (fun x y => y = f x) l m -> map f l = m.
Lemma app_inv_length1 {A}: forall (l1 m1 l2 m2:list A),
l1++l2 = m1++m2 -> length l1 = length m1 -> l1=m1 /\ l2=m2.
Lemma app_inv_length2 {A}: forall (l1 m1 l2 m2:list A),
l1++l2 = m1++m2 -> length l2 = length m2 -> l1=m1 /\ l2=m2.
Lemma cons_inv {A}: forall (a1 a2:A) t1 t2, a1::t1 = a2::t2 -> a1=a2 /\ t1=t2.
intros. inversion H; split; trivial. Qed.
Lemma mod_exists a b c: a mod b = c -> b<> 0 -> exists k, k*b+c=a.
Lemma max_unsigned_modulus: Int.max_unsigned + 1 = Int.modulus.
Lemma skipn_list_repeat:
forall A k n (a: A),
(k <= n)%nat -> skipn k (list_repeat n a) = list_repeat (n-k) a.
Lemma skipn_length:
forall {A} n (al: list A),
(length al >= n)%nat ->
(length (skipn n al) = length al - n)%nat.
Lemma fold_left_cons {A B} (f: A -> B -> A) l b x:
fold_left f (x :: l) b = fold_left f l (f b x).