simple induction n.
intros.
unfold concat in |- *.
unfold nat_rect in |- *.
apply Refl.
intros.
(* Change =' to Map_eq *)
change (Map_eq (Map_embed (f ++ g)) (Map_embed f ++ Map_embed g)) in |- *.
red in |- *.
intros.
apply Trans with (hdtl (Map_embed (f ++ g)) x); auto with algebra.
case x; intro i; case i.
intro l.
unfold hdtl in |- *.
unfold head in |- *.
unfold concat in |- *.
unfold nat_rect in |- *.
simpl in |- *.
apply Refl.
intros.
unfold hdtl in |- *.
unfold head in |- *.
set (l := in_range_prf) in *.
apply Trans with (Seqtl (Map_embed (f ++ g)) (Build_finiteT (lt_S_n _ _ l)));
auto with algebra.
fold (n0 + m) in |- *.
apply Sym.
apply
Trans
with (Seqtl (Map_embed f ++ Map_embed g) (Build_finiteT (lt_S_n _ _ l))).
fold (n0 + m) in |- *.
apply Sym.
apply (Seqtl_to_seq (Map_embed f ++ Map_embed g)); auto with algebra.
apply Ap_comp; auto with algebra.
apply Trans with (Seqtl (Map_embed f) ++ Map_embed g); auto with algebra.
apply Trans with (Map_embed (Seqtl (f ++ g))).
2: apply (Map_embed_Seqtl (f ++ g)); auto with algebra.
apply Trans with (Map_embed (Seqtl f ++ g)).
2: apply Map_embed_comp; auto with algebra.
apply Trans with (Map_embed (Seqtl f) ++ Map_embed g).
apply
(concat_comp (f:=Seqtl (Map_embed f)) (f':=Map_embed (Seqtl f))
(g:=Map_embed g) (g':=Map_embed g)); auto with algebra.
apply Sym.
change
(Map_embed (Seqtl f ++ g) =' Map_embed (Seqtl f) ++ Map_embed g in seq _ _)
in |- *.
apply H; auto with algebra.
Qed.
Hint Resolve Map_embed_concat: algebra.

Lemma concat_Map_embed :
forall (E : Setoid) (A : part_set E) (n m : Nat) (f : seq n A) (g : seq m A),
Map_embed f ++ Map_embed g =' Map_embed (f ++ g) in seq _ _.