intros.
red in |- *.
intro.
simpl in |- *.
red in |- *.
intro i.
simpl in |- *.
auto with algebra.
Qed.
Definition func_group (A : Setoid) (B : group) : GROUP :=
Build_group
(Build_group_on (group_inverse_map:=func_inv A B)
(func_inv_is_r_inverse (A:=A) (B:=B))
(func_inv_is_l_inverse (A:=A) (B:=B))).

Lemma func_group_is_abelian :
forall (A : Setoid) (B : abelian_group), abelian_group_on (func_group A B).