intros.
red in H.
apply NNPP; intro.
assert (n < m \/ m < n).
apply nat_total_order; auto with algebra.
inversion_clear H1.
generalize (H n); clear H; intro.
inversion_clear H.
inversion_clear H1.
apply (lt_irrefl n); auto with algebra.
inversion_clear H1.
apply (lt_not_le n m); auto with algebra.
generalize (H m); clear H; intro.
inversion_clear H.
inversion_clear H1.
inversion_clear H.
apply (lt_irrefl m); auto with algebra.
inversion_clear H1.
apply (le_not_lt n m); auto with algebra.
Qed.
Hint Resolve seq_equal_length_equal: algebra.

Lemma seq_equal_equal_elements :
forall (A : Setoid) (n m : Nat) (v : seq n A) (w : seq m A),
seq_equal v w ->
forall (i : fin n) (j : fin m), index i = index j -> v i =' w j in _.