-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGroup.v
39 lines (30 loc) · 1.16 KB
/
Group.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
Require Import Notations.
Set Implicit Arguments.
Set Asymmetric Patterns.
Set Universe Polymorphism.
Delimit Scope group_elements_scope with group.
Delimit Scope groups_scope with groups.
Section Group.
Local Reserved Notation "'G'".
Local Reserved Notation "1".
Record Group :=
{
GroupObjects :> Type where "'G'" := GroupObjects;
GroupIdentity : G where "1" := GroupIdentity;
GroupOperation : G -> G -> G where "a * b" := (GroupOperation a b);
GroupInverse : G -> G where "i ⁻¹" := (GroupInverse i);
GroupLeftInverse : forall x, x ⁻¹ * x = 1;
GroupRightInverse : forall x, x * x ⁻¹ = 1;
GroupAssociativity : forall a b c, a * (b * c) = (a * b) * c;
GroupLeftIdentity : forall x, 1 * x = x;
GroupRightIdentity : forall x, x * 1 = x
}.
End Group.
Bind Scope groups_scope with Group.
Bind Scope group_elements_scope with GroupObjects.
Arguments GroupOperation {g%groups} _%group _%group.
Arguments GroupIdentity {g%groups}.
Arguments GroupInverse {g%groups} _%group.
Notation "1" := (@GroupIdentity _) : group.
Infix "*" := (@GroupOperation _) : group.
Notation "i ⁻¹" := (@GroupInverse _ i) : group.