Section MAIN.
Variable A : Setoid.
Variable n : Nat.
intros.
simpl in |- *.
red in |- *.
split; intros.
simpl in H.
inversion_clear H.
destruct x0.
destruct index as [| n0].
simpl in |- *.
right; auto.
simpl in |- *.
left.
exists (Build_finiteT (lt_S_n n0 _ in_range_prf)).
auto.
simpl in H.
inversion_clear H.
inversion_clear H0.
simpl in |- *.
destruct x0.
exists (Build_finiteT (lt_n_S _ _ in_range_prf)).
apply Trans with (v (Build_finiteT in_range_prf)); auto with algebra.
simpl in |- *.
exists (Build_finiteT (lt_O_Sn n)).
auto.
Qed.

Lemma seq_set_concat_union :
forall (m : Nat) (v : seq n A) (w : seq m A),
seq_set (v ++ w) =' union (seq_set v) (seq_set w) in _.