Definition prefix s1 s2 :=
  forall n x, onth s1 n = some x -> onth s2 n = some x.

(* Specifications: *)
Lemma size_onth (s : seq A) n : n < size s -> exists x, onth s n = Some x.
Lemma onth_size (s : seq A) n x : onth s n = Some x -> n < size s.
Lemma prefix_refl s : prefix s s.
Lemma prefix_trans (s2 s1 s3 : seq A) : prefix s1 s2 -> prefix s2 s3 -> prefix s1 s3.
Lemma prefix_cons x s1 s2 : prefix (x :: s1) (x :: s2) <-> prefix s1 s2.
Lemma prefix_cons' x y s1 s2 : prefix (x :: s1) (y :: s2) -> x = y /\ prefix s1 s2.
Lemma prefix_size (s t : seq A) : prefix s t -> size s <= size t.
Lemma prefix_onth (s t : seq A) x : x < size s -> prefix s t -> onth s x = onth t x.