Definition ints (n m:nat):list nat := seq n (m-n).

(* Specifications: *)
Lemma ints_length : ∀ n m, n ≤ m → length (ints n m) = m-n.
Lemma Forall_cons_iff {A:Type} (x:A) (xs:list A) (P:A→Prop): Forall P (x::xs) ↔ P x ∧ Forall P xs.
Lemma Forall_app_iff {A:Type} (P:A→Prop) l1 l2: Forall P (l1++l2) ↔ Forall P l1 ∧ Forall P l2.
Lemma Forall_flat_map {A B:Type} (P:B → Prop) (f:A → list B) l: Forall P (flat_map f l) ↔ Forall (λ x, Forall P (f x)) l.
Lemma app_length_eq {A:Type}: ∀ (l1 l2 l1' l2': list A), length l1 = length l1' → (l1++l2) = (l1'++l2') → l1 = l1' ∧ l2 = l2'.
Lemma Forall2_le_refl l: Forall2 le l l.
Lemma Forall2_app_inv {A B:Type} (P:A→B→Prop) la1 la2 lb1 lb2: length la1 = length lb1 → Forall2 P (la1++la2) (lb1++lb2) → Forall2 P la1 lb1 ∧ Forall2 P la2 lb2.
Lemma Forall2_firstn {A B:Type} (P:A→B→Prop) la lb n: Forall2 P la lb → Forall2 P (firstn n la) (firstn n lb).
Lemma Forall2_skipn {A B:Type} (P:A→B→Prop) la lb n: Forall2 P la lb → Forall2 P (skipn n la) (skipn n lb).
Lemma Forall2_firstn_skipn_iff {A B:Type} (P:A→B→Prop) la lb n: Forall2 P la lb ↔ Forall2 P (firstn n la) (firstn n lb) ∧ Forall2 P (skipn n la) (skipn n lb).
Lemma Forall2_tail {A B:Type} (P:A→B→Prop) la lb: Forall2 P la lb → Forall2 P (tl la) (tl lb).