induction n.
intros.
apply False_ind; auto with algebra.
intros.
destruct i.
destruct i'.
destruct index as [| n0].
destruct index0 as [| n0].
apply split_hd_tl_equality; auto with algebra.
intro.
destruct x.
simpl in |- *.
apply Ap_comp; auto with algebra.
inversion H1.
destruct index0 as [| n1].
inversion H1.
unfold modify_seq in |- *.
unfold nat_rect in |- *.
apply cons_comp; auto with algebra.
unfold modify_seq in IHn.
apply IHn; auto with algebra.
change (Seqtl v =' Seqtl v' in _) in |- *.
apply Seqtl_comp; auto with algebra.
Qed.
Hint Resolve modify_comp: algebra.

Lemma modify_hd_hd :
forall (A : Setoid) (n : Nat) (v : seq (S n) A) (H : 0 < S n) (a : A),
head (modify_seq v (Build_finiteT H) a) =' a in _.