unfold cast_seq in |- *.
intros until H'.
case v; case v'.
simpl in |- *.
red in |- *.
simpl in |- *.
intros.
red in H0.
simpl in H0.
apply Trans with (Ap0 (cast_fin x (sym_eq H'))); auto with algebra.
Qed.
Hint Resolve cast_seq_comp: algebra.
Variable n n' : Nat.
Variable v : seq n A.

Lemma cast_seq_cast_fin :
forall (i : fin n) (H H' : n =' n' in _),
v i =' cast_seq v H (cast_fin i H') in _.