simple induction n.
intros.
simpl in |- *.
assumption.
(* the induction step *)
intros.
set (fg := f ++ g) in |- *.
set (fg' := f' ++ g') in |- *.
simpl in |- *.
red in |- *.
destruct x.
destruct index as [| n1].
unfold fg in |- *.
unfold fg' in |- *.
simpl in |- *.
auto with algebra.
(**)
apply Trans with ((Seqtl f ++ g) (Build_finiteT (lt_S_n _ _ in_range_prf)));
auto with algebra.
apply Trans with ((Seqtl f' ++ g') (Build_finiteT (lt_S_n _ _ in_range_prf)));
auto with algebra.
apply Ap_comp; auto with algebra.
apply (H _ (Seqtl f) (Seqtl f') g g'); auto with algebra.
change (Seqtl f =' Seqtl f' in _) in |- *.
apply Seqtl_comp; auto with algebra.
Qed.
Hint Resolve concat_comp: algebra.
Variable n m : Nat.

(* Specifications: *)
Lemma cons_concat :
forall (a a' : A) (v v' : seq n A) (w w' : seq m A),
a =' a' in _ ->
v =' v' in _ -> w =' w' in _ -> a;; v ++ w =' (a';; v') ++ w' in _.