intros.
red in H.
destruct i.
rename index into i.
destruct j.
rename index into j.
simpl in H0.
case (H i); clear H; intros.
inversion_clear H.
inversion_clear H1.
apply Trans with (v (Build_finiteT x)); auto with algebra.
apply Trans with (w (Build_finiteT x0)); auto with algebra.
inversion_clear H.
apply False_ind.
apply (le_not_lt n i); auto with algebra.
Qed.
Hint Resolve seq_equal_equal_elements: algebra.

(** - The interplay with other operations *)
Lemma seq_equal_head :
forall (A : Setoid) (n m : Nat) (v : seq (S n) A) (w : seq (S m) A),
seq_equal v w -> head v =' head w in _.