Definition isSome {A} (o: option A) := match o with Some _ => True | None => False end.

(* Specifications: *)
Lemma nth_error_in_bounds: forall {A} (l: list A) i, (O <= i < length l)%nat -> exists x, nth_error l i = value x.
Lemma nth_error_app: forall {T} (al bl : list T) (j: nat), nth_error (al++bl) (length al + j) = nth_error bl j.
Lemma nth_error_app1: forall {T} (al bl : list T) (j: nat), (j < length al)%nat -> nth_error (al++bl) j = nth_error al j.
Lemma nth_error_None_iff: forall {A} (l: list A) n, nth_error l n = None <-> n >= length l.
Lemma Forall_rev: forall {A} (P: A -> Prop) (l: list A), Forall P (rev l) <-> Forall P l.