intros.
simpl in |- *.
red in |- *.
intro.
red in H.
destruct x.
rename index into i.
generalize (H i); clear H; intro.
inversion_clear H.
inversion_clear H0.
inversion_clear H.
apply Trans with (v (Build_finiteT x)).
apply Ap_comp; auto with algebra; simpl in |- *; auto.
apply Trans with (w (Build_finiteT x0)); auto with algebra.
apply Ap_comp; auto with algebra; simpl in |- *; auto.
inversion_clear H0; (apply False_ind; auto with algebra).
apply (le_not_lt n i); auto with algebra.
Qed.
Hint Resolve seq_equal_map_equal: algebra.

(* Of course it's an equivalence relation: refl, symm, trans *)
Lemma seq_equal_refl :
forall (A : Setoid) (n : Nat) (v : seq n A), seq_equal v v.