Section MAIN.
Variable A : Setoid.
Variable n m : Nat.
Variable v : seq n A.
Variable w : seq m A.
(** - More facts about concatenation *)
induction n.
intros.
inversion Hi.
intro.
case i.
unfold concat in |- *.
unfold nat_rect in |- *.
simpl in |- *.
intros.
apply Ap_comp; auto with algebra.
intros.
apply Trans with (hdtl v (Build_finiteT Hi)).
apply Trans with ((hdtl v ++ w) (Build_finiteT Hi')).
apply concat_comp; auto with algebra.
2: apply Ap_comp; auto with algebra.
unfold hdtl in |- *.
apply Trans with ((head v;; Seqtl v ++ w) (Build_finiteT Hi'));
auto with algebra.
apply Trans with (Seqtl v (Build_finiteT (lt_S_n _ _ Hi))); auto with algebra.
apply Trans with ((Seqtl v ++ w) (Build_finiteT (lt_S_n _ _ Hi')));
auto with algebra.
Qed.
Hint Resolve concat_first_part: algebra.

Lemma concat_second_part :
forall (i : Nat) (Hi : i < m) (Hi' : n + i < n + m),
(v ++ w) (Build_finiteT Hi') =' w (Build_finiteT Hi) in _.