Skip to content

Commit d4e36cd

Browse files
committed
refactor: alternative to agda#2852 and agda#2854
1 parent 645e8d6 commit d4e36cd

File tree

4 files changed

+117
-0
lines changed

4 files changed

+117
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ Deprecated names
7979
New modules
8080
-----------
8181

82+
* `Algebra.Construct.Quotient.{Abelian}Group` for the definition of quotient (Abelian) groups.
83+
84+
* `Algebra.Construct.Sub.{Abelian}Group` for the definition of sub-(Abelian)groups.
85+
86+
* `Algebra.Construct.Sub.Group.Normal` for the definition of normal subgroups.
87+
8288
* `Algebra.Properties.BooleanRing`.
8389

8490
* `Algebra.Properties.BooleanSemiring`.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Subgroups of Abelian groups: necessarily Normal
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --safe --cubical-compatible #-}
8+
9+
open import Algebra.Bundles using (AbelianGroup)
10+
11+
module Algebra.Construct.Sub.AbelianGroup {c ℓ} (G : AbelianGroup c ℓ) where
12+
13+
open import Algebra.Morphism.GroupMonomorphism using (isAbelianGroup)
14+
15+
private
16+
module G = AbelianGroup G
17+
18+
open import Algebra.Construct.Sub.Group.Normal G.group
19+
using (IsNormal; NormalSubgroup)
20+
21+
-- Re-export the notion of subgroup of the underlying Group
22+
23+
open import Algebra.Construct.Sub.Group G.group public
24+
using (Subgroup)
25+
26+
-- Then, for any such Subgroup:
27+
-- * it defines an AbelianGroup
28+
-- * and is, in fact, Normal
29+
30+
module _ {c′ ℓ′} (subgroup : Subgroup c′ ℓ′) where
31+
32+
open Subgroup subgroup public
33+
using (ι; ι-monomorphism)
34+
35+
abelianGroup : AbelianGroup c′ ℓ′
36+
abelianGroup = record
37+
{ isAbelianGroup = isAbelianGroup ι-monomorphism G.isAbelianGroup }
38+
39+
open AbelianGroup abelianGroup public
40+
41+
isNormal : IsNormal subgroup
42+
isNormal = record { normal = λ n G.comm (ι n) }
43+
44+
normalSubgroup : NormalSubgroup c′ ℓ′
45+
normalSubgroup = record { isNormal = isNormal }
46+
47+
open NormalSubgroup normalSubgroup public
48+
using (conjugate; normal)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Definition of subgroup via Group monomorphism
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --safe --cubical-compatible #-}
8+
9+
open import Algebra.Bundles using (Group; RawGroup)
10+
11+
module Algebra.Construct.Sub.Group {c ℓ} (G : Group c ℓ) where
12+
13+
open import Algebra.Morphism.Structures using (IsGroupMonomorphism)
14+
open import Algebra.Morphism.GroupMonomorphism using (isGroup)
15+
open import Level using (suc; _⊔_)
16+
17+
private
18+
module G = Group G
19+
20+
record Subgroup c′ ℓ′ : Set (c ⊔ ℓ ⊔ suc (c′ ⊔ ℓ′)) where
21+
field
22+
domain : RawGroup c′ ℓ′
23+
ι : _ G.Carrier
24+
ι-monomorphism : IsGroupMonomorphism domain G.rawGroup ι
25+
26+
module ι = IsGroupMonomorphism ι-monomorphism
27+
28+
group : Group _ _
29+
group = record { isGroup = isGroup ι-monomorphism G.isGroup }
30+
31+
open Group group public
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Definition of normal subgroups
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --safe --cubical-compatible #-}
8+
9+
open import Algebra.Bundles using (Group)
10+
11+
module Algebra.Construct.Sub.Group.Normal {c ℓ} (G : Group c ℓ) where
12+
13+
open import Algebra.Construct.Sub.Group G using (Subgroup)
14+
open import Level using (suc; _⊔_)
15+
16+
private
17+
module G = Group G
18+
19+
-- every element of the subgroup commutes in G
20+
record IsNormal {c′ ℓ′} (subgroup : Subgroup c′ ℓ′) : Set (c ⊔ ℓ ⊔ c′) where
21+
open Subgroup subgroup using (ι)
22+
field
23+
conjugate : n g _
24+
normal : n g ι (conjugate n g) G.∙ g G.≈ g G.∙ ι n
25+
26+
record NormalSubgroup c′ ℓ′ : Set (c ⊔ ℓ ⊔ suc (c′ ⊔ ℓ′)) where
27+
field
28+
subgroup : Subgroup c′ ℓ′
29+
isNormal : IsNormal subgroup
30+
31+
open Subgroup subgroup public
32+
open IsNormal isNormal public

0 commit comments

Comments
 (0)