(* $Id: TupleCGroups.v,v 1.6 2000/11/10 11:27:35 freek Exp $ *)

(* Obsolete but maintained *)

Require Export TupleCSetoids.

(* Defines tuples of semi-groups, monoids and groups *)

Section TupleCSemi_grps.
Variable csg : CSemi_grp.
Variable n : nat.

Definition Build_TupleCSemi_grp: CSemi_grp.
Apply (Build_CSemi_grp (Build_TupleCSetoid csg n) (!constVec ? n (Zero::csg))
       (Build_TupleCSetoid_bin_op ? (csg_op csg) n)).
Unfold Build_TupleCSetoid_bin_op.
Unfold is_CSemi_grp.
Simpl.
Apply tuple_assoc.
Apply plus_assoc.
Defined.

End TupleCSemi_grps.

Section TupleCMonoids.
Variable G : CMonoid.
Variable n : nat.

Definition Build_TupleCMonoid: CMonoid.
Apply (Build_CMonoid (Build_TupleCSemi_grp G n)).
Apply (Build_is_CMonoid (Build_TupleCSemi_grp G n));
  Unfold is_rht_unit commutes; Simpl; Unfold eqs map2f; Intros.
(* unit *)
Unfold constVec.
Apply cm_rht_unit_unfolded.
(* commutes *)
Apply cm_commutes_unfolded.
Defined.

End TupleCMonoids.

Section TupleCGroups.
Variable G : CGroup.
Variable n : nat.

Definition Build_TupleCGroup: CGroup.
Apply (Build_CGroup (Build_TupleCMonoid G n)
      (Build_TupleCSetoid_un_op G (cg_inv G) n)).
Red; Unfold Build_TupleCMonoid; Simpl; Unfold eqs.
Intros.
Unfold map2f mapf. Unfold constVec.
Apply cg_rht_inv_unfolded.
Defined.

End TupleCGroups.


