-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathGroup_cat.v
49 lines (41 loc) · 1.99 KB
/
Group_cat.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
(* This program is free software; you can redistribute it and/or *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1 *)
(* of the License, or (at your option) any later version. *)
(* *)
(* This program is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
(* GNU General Public License for more details. *)
(* *)
(* You should have received a copy of the GNU Lesser General Public *)
(* License along with this program; if not, write to the Free *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA *)
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Monoid_cat.
(** Title "The category of groups." *)
Section Inverse.
Variable G : SET.
Variable f : law_of_composition G.
Variable e : G.
Variable inv : MAP G G.
Definition inverse_r := forall x : G, Equal (f (couple x (inv x))) e.
Definition inverse_l := forall x : G, Equal (f (couple (inv x) x)) e.
End Inverse.
Record group_on (G : monoid) : Type :=
{group_inverse_map : Map G G;
group_inverse_r_prf :
inverse_r (sgroup_law_map G) (monoid_unit G) group_inverse_map;
group_inverse_l_prf :
inverse_l (sgroup_law_map G) (monoid_unit G) group_inverse_map}.
Record group : Type :=
{group_monoid :> monoid; group_on_def :> group_on group_monoid}.
Coercion Build_group : group_on >-> group.
Set Strict Implicit.
Unset Implicit Arguments.
Definition group_inverse (G : group) (x : G) := group_inverse_map G x.
Set Implicit Arguments.
Unset Strict Implicit.
Definition GROUP := full_subcat (C:=MONOID) (C':=group) group_monoid.