Section Fn_vectors.
From Algebra Require Field_facts.
Export Sets Categories Parts Sgroup_cat Monoid_cat Group_cat Abelian_group_cat Ring_cat.
Export Field_facts.
From Algebra Require Ring_facts.
Export Ring_facts.
From Algebra Require Export Field_cat.
Require Export vecspaces_verybasic.
Require Export finite.
(**************************************)
(* In the beginning there was the set *)
(**************************************)
Definition Fn_set (F : Setoid) (n : Nat) : SET := seq n F.
(******************************************)
(* And Coq said, "let there be an sgroup" *)
(******************************************)
Let Fn_plus_fun :
forall (F : sgroup) (n : Nat), Fn_set F n -> Fn_set F n -> Fn_set F n.
intros F n x y.
simpl in |- *.
apply (Build_Map (Ap:=fun i : fin n => x i +' y i)).
red in |- *.
elim x.
elim y.
intros.
red in Map_compatible_prf.
red in Map_compatible_prf0.
apply SGROUP_comp; auto with algebra.
Defined.
Definition Fn_plus :
forall (F : sgroup) (n : Nat), law_of_composition (Fn_set F n).
intros F n.
apply (uncurry (f:=Fn_plus_fun (F:=F) (n:=n))).
red in |- *.
simpl in |- *.
intros.
red in |- *.
intro i.
simpl in |- *.
apply SGROUP_comp; auto with algebra.
Defined.

Lemma Fn_plus_associative :
forall (F : sgroup) (n : Nat), associative (Fn_plus F n).