intros.
assert (n =' m in _).
apply (seq_equal_length_equal (v:=v) (w:=w)); auto with algebra.
red in |- *.
intro.
destruct i as [| n0].
left.
exists (lt_O_Sn n).
exists (lt_O_Sn m).
simpl in |- *.
auto.
case (le_or_lt (S n) (S n0)).
intro.
right.
split; auto.
rewrite <- H1.
auto.
left.
exists H2.
assert (S n0 < S m).
rewrite <- H1.
auto.
exists H3.
simpl in |- *.
apply seq_equal_equal_elements; auto with algebra.
Qed.
Hint Resolve seq_equal_cons: algebra.

Lemma seq_equal_concat :
forall (A : Setoid) (n m p q : Nat) (v : seq n A)
(w : seq m A) (a : seq p A) (b : seq q A),
seq_equal v w -> seq_equal a b -> seq_equal (v ++ a) (w ++ b).