Skip to content

Commit ca23f3d

Browse files
committed
Add notion of quotient groups
1 parent c5568ef commit ca23f3d

File tree

3 files changed

+288
-0
lines changed

3 files changed

+288
-0
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Quotient groups
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --safe --cubical-compatible #-}
8+
9+
open import Algebra.Bundles using (Group)
10+
open import Algebra.NormalSubgroup using (NormalSubgroup)
11+
12+
module Algebra.Construct.Quotient.Group {c ℓ c′ ℓ′} (G : Group c ℓ) (N : NormalSubgroup G c′ ℓ′) where
13+
14+
open Group G
15+
16+
import Algebra.Definitions as AlgDefs
17+
open import Algebra.Morphism.Structures
18+
open import Algebra.Properties.Group G
19+
open import Algebra.Structures using (IsGroup)
20+
open import Data.Product.Base
21+
open import Level using (_⊔_)
22+
open import Relation.Binary.Core using (_⇒_)
23+
open import Relation.Binary.Definitions using (Reflexive; Symmetric; Transitive)
24+
open import Relation.Binary.Structures using (IsEquivalence)
25+
open import Relation.Binary.Reasoning.Setoid setoid
26+
27+
open NormalSubgroup N
28+
29+
infix 0 _by_
30+
31+
data _≋_ (x y : Carrier) : Set (c ⊔ ℓ ⊔ c′) where
32+
_by_ : g x // y ≈ ι g x ≋ y
33+
34+
≋-refl : Reflexive _≋_
35+
≋-refl {x} = N.ε by begin
36+
x // x ≈⟨ inverseʳ x ⟩
37+
ε ≈⟨ ι.ε-homo ⟨
38+
ι N.ε ∎
39+
40+
≋-sym : Symmetric _≋_
41+
≋-sym {x} {y} (g by x//y≈ιg) = g N.⁻¹ by begin
42+
y // x ≈⟨ ⁻¹-anti-homo-// x y ⟨
43+
(x // y) ⁻¹ ≈⟨ ⁻¹-cong x//y≈ιg ⟩
44+
ι g ⁻¹ ≈⟨ ι.⁻¹-homo g ⟨
45+
ι (g N.⁻¹) ∎
46+
47+
48+
≋-trans : Transitive _≋_
49+
≋-trans {x} {y} {z} (g by x//y≈ιg) (h by y//z≈ιh) = g N.∙ h by begin
50+
x // z ≈⟨ ∙-congʳ (identityʳ x) ⟨
51+
x ∙ ε // z ≈⟨ ∙-congʳ (∙-congˡ (inverseˡ y)) ⟨
52+
x ∙ (y \\ y) // z ≈⟨ ∙-congʳ (assoc x (y ⁻¹) y) ⟨
53+
(x // y) ∙ y // z ≈⟨ assoc (x // y) y (z ⁻¹) ⟩
54+
(x // y) ∙ (y // z) ≈⟨ ∙-cong x//y≈ιg y//z≈ιh ⟩
55+
ι g ∙ ι h ≈⟨ ι.∙-homo g h ⟨
56+
ι (g N.∙ h) ∎
57+
58+
≋-isEquivalence : IsEquivalence _≋_
59+
≋-isEquivalence = record
60+
{ refl = ≋-refl
61+
; sym = ≋-sym
62+
; trans = ≋-trans
63+
}
64+
65+
≈⇒≋ : _≈_ ⇒ _≋_
66+
≈⇒≋ {x} {y} x≈y = N.ε by begin
67+
x // y ≈⟨ x≈y⇒x∙y⁻¹≈ε x≈y ⟩
68+
ε ≈⟨ ι.ε-homo ⟨
69+
ι N.ε ∎
70+
71+
open AlgDefs _≋_
72+
73+
≋-∙-cong : Congruent₂ _∙_
74+
≋-∙-cong {x} {y} {u} {v} (g by x//y≈ιg) (h by u//v≈ιh) = g N.∙ normal h y .proj₁ by begin
75+
x ∙ u // y ∙ v ≈⟨ ∙-congˡ (⁻¹-anti-homo-∙ y v) ⟩
76+
x ∙ u ∙ (v ⁻¹ ∙ y ⁻¹) ≈⟨ assoc (x ∙ u) (v ⁻¹) (y ⁻¹) ⟨
77+
(x ∙ u // v) // y ≈⟨ ∙-congʳ (assoc x u (v ⁻¹)) ⟩
78+
x ∙ (u // v) // y ≈⟨ ∙-congʳ (∙-congˡ u//v≈ιh) ⟩
79+
x ∙ ι h // y ≈⟨ ∙-congʳ (∙-congˡ (identityˡ (ι h))) ⟨
80+
x ∙ (ε ∙ ι h) // y ≈⟨ ∙-congʳ (∙-congˡ (∙-congʳ (inverseˡ y))) ⟨
81+
x ∙ ((y \\ y) ∙ ι h) // y ≈⟨ ∙-congʳ (∙-congˡ (assoc (y ⁻¹) y (ι h))) ⟩
82+
x ∙ (y \\ y ∙ ι h) // y ≈⟨ ∙-congʳ (assoc x (y ⁻¹) (y ∙ ι h)) ⟨
83+
(x // y) ∙ (y ∙ ι h) // y ≈⟨ assoc (x // y) (y ∙ ι h) (y ⁻¹) ⟩
84+
(x // y) ∙ (y ∙ ι h // y) ≈⟨ ∙-cong x//y≈ιg (proj₂ (normal h y)) ⟩
85+
ι g ∙ ι (normal h y .proj₁) ≈⟨ ι.∙-homo g (normal h y .proj₁) ⟨
86+
ι (g N.∙ normal h y .proj₁) ∎
87+
88+
≋-⁻¹-cong : Congruent₁ _⁻¹
89+
≋-⁻¹-cong {x} {y} (g by x//y≈ιg) = normal (g N.⁻¹) (y ⁻¹) .proj₁ by begin
90+
x ⁻¹ ∙ y ⁻¹ ⁻¹ ≈⟨ ∙-congʳ (identityˡ (x ⁻¹)) ⟨
91+
(ε ∙ x ⁻¹) ∙ y ⁻¹ ⁻¹ ≈⟨ ∙-congʳ (∙-congʳ (inverseʳ (y ⁻¹))) ⟨
92+
((y ⁻¹ ∙ y ⁻¹ ⁻¹) ∙ x ⁻¹) ∙ y ⁻¹ ⁻¹ ≈⟨ ∙-congʳ (assoc (y ⁻¹) ((y ⁻¹) ⁻¹) (x ⁻¹)) ⟩
93+
y ⁻¹ ∙ (y ⁻¹ ⁻¹ ∙ x ⁻¹) ∙ y ⁻¹ ⁻¹ ≈⟨ ∙-congʳ (∙-congˡ (⁻¹-anti-homo-∙ x (y ⁻¹))) ⟨
94+
y ⁻¹ ∙ (x ∙ y ⁻¹) ⁻¹ ∙ y ⁻¹ ⁻¹ ≈⟨ ∙-congʳ (∙-congˡ (⁻¹-cong x//y≈ιg)) ⟩
95+
y ⁻¹ ∙ ι g ⁻¹ ∙ y ⁻¹ ⁻¹ ≈⟨ ∙-congʳ (∙-congˡ (ι.⁻¹-homo g)) ⟨
96+
y ⁻¹ ∙ ι (g N.⁻¹) ∙ y ⁻¹ ⁻¹ ≈⟨ proj₂ (normal (g N.⁻¹) (y ⁻¹)) ⟩
97+
ι (normal (g N.⁻¹) (y ⁻¹) .proj₁) ∎
98+
99+
quotientIsGroup : IsGroup _≋_ _∙_ ε _⁻¹
100+
quotientIsGroup = record
101+
{ isMonoid = record
102+
{ isSemigroup = record
103+
{ isMagma = record
104+
{ isEquivalence = ≋-isEquivalence
105+
; ∙-cong = ≋-∙-cong
106+
}
107+
; assoc = λ x y z ≈⇒≋ (assoc x y z)
108+
}
109+
; identity = record
110+
{ fst = λ x ≈⇒≋ (identityˡ x)
111+
; snd = λ x ≈⇒≋ (identityʳ x)
112+
}
113+
}
114+
; inverse = record
115+
{ fst = λ x ≈⇒≋ (inverseˡ x)
116+
; snd = λ x ≈⇒≋ (inverseʳ x)
117+
}
118+
; ⁻¹-cong = ≋-⁻¹-cong
119+
}
120+
121+
quotientGroup : Group c (c ⊔ ℓ ⊔ c′)
122+
quotientGroup = record { isGroup = quotientIsGroup }
123+
124+
η : Group.Carrier G Group.Carrier quotientGroup
125+
η x = x -- because we do all the work in the relation
126+
127+
η-isHomomorphism : IsGroupHomomorphism rawGroup (Group.rawGroup quotientGroup) η
128+
η-isHomomorphism = record
129+
{ isMonoidHomomorphism = record
130+
{ isMagmaHomomorphism = record
131+
{ isRelHomomorphism = record
132+
{ cong = ≈⇒≋
133+
}
134+
; homo = λ _ _ ≋-refl
135+
}
136+
; ε-homo = ≋-refl
137+
}
138+
; ⁻¹-homo = λ _ ≋-refl
139+
}
140+

src/Algebra/NormalSubgroup.agda

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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; RawGroup)
10+
11+
module Algebra.NormalSubgroup {c ℓ} (G : Group c ℓ) where
12+
13+
open Group G
14+
15+
open import Algebra.Structures using (IsGroup)
16+
open import Algebra.Morphism.Structures
17+
import Algebra.Morphism.GroupMonomorphism as GM
18+
open import Data.Product.Base
19+
open import Level using (suc; _⊔_)
20+
21+
record NormalSubgroup c′ ℓ′ : Set (c ⊔ ℓ ⊔ suc (c′ ⊔ ℓ′)) where
22+
field
23+
-- N is a subgroup of G
24+
N : RawGroup c′ ℓ′
25+
ι : RawGroup.Carrier N Carrier
26+
ι-monomorphism : IsGroupMonomorphism N rawGroup ι
27+
-- every element of N commutes in G
28+
normal : n g ∃[ n′ ] g ∙ ι n ∙ g ⁻¹ ≈ ι n′
29+
30+
module N = RawGroup N
31+
module ι = IsGroupMonomorphism ι-monomorphism
32+
33+
N-isGroup : IsGroup N._≈_ N._∙_ N.ε N._⁻¹
34+
N-isGroup = GM.isGroup ι-monomorphism isGroup
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
------------------------------------------------------------------------
2+
-- The kernel of a group homomorphism is a normal subgroup
3+
--
4+
-- The Agda standard library
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --safe --cubical-compatible #-}
8+
9+
open import Algebra.Bundles
10+
open import Algebra.Morphism.Structures
11+
12+
module Algebra.NormalSubgroup.Construct.Kernel
13+
{c ℓ c′ ℓ′}
14+
{G : Group c ℓ}
15+
{H : Group c′ ℓ′}
16+
: Group.Carrier G Group.Carrier H)
17+
(homomorphism : IsGroupHomomorphism (Group.rawGroup G) (Group.rawGroup H) ρ)
18+
where
19+
20+
open import Algebra.NormalSubgroup
21+
open import Algebra.Properties.Group
22+
open import Data.Product.Base
23+
open import Function.Base
24+
open import Level
25+
open import Relation.Binary.Reasoning.MultiSetoid
26+
27+
private
28+
module G = Group G
29+
module H = Group H
30+
module ρ = IsGroupHomomorphism homomorphism
31+
32+
record Kernel : Set (c ⊔ ℓ′) where
33+
field
34+
element : G.Carrier
35+
inKernel : ρ element H.≈ H.ε
36+
37+
_∙ₖ_ : Kernel Kernel Kernel
38+
x ∙ₖ y = record
39+
{ element = X.element G.∙ Y.element
40+
; inKernel = begin⟨ H.setoid ⟩
41+
ρ (X.element G.∙ Y.element) ≈⟨ ρ.homo X.element Y.element ⟩
42+
ρ X.element H.∙ ρ Y.element ≈⟨ H.∙-cong X.inKernel Y.inKernel ⟩
43+
H.ε H.∙ H.ε ≈⟨ H.identityˡ H.ε ⟩
44+
H.ε ∎
45+
}
46+
where
47+
module X = Kernel x
48+
module Y = Kernel y
49+
50+
εₖ : Kernel
51+
εₖ = record
52+
{ element = G.ε
53+
; inKernel = ρ.ε-homo
54+
}
55+
56+
_⁻¹ₖ : Kernel Kernel
57+
x ⁻¹ₖ = record
58+
{ element = X.element G.⁻¹
59+
; inKernel = begin⟨ H.setoid ⟩
60+
ρ (X.element G.⁻¹) ≈⟨ ρ.⁻¹-homo X.element ⟩
61+
ρ X.element H.⁻¹ ≈⟨ H.⁻¹-cong X.inKernel ⟩
62+
H.ε H.⁻¹ ≈⟨ ε⁻¹≈ε H ⟩
63+
H.ε ∎
64+
}
65+
where
66+
module X = Kernel x
67+
68+
Kernel-rawGroup : RawGroup (c ⊔ ℓ′) ℓ
69+
Kernel-rawGroup = record
70+
{ Carrier = Kernel
71+
; _≈_ = G._≈_ on Kernel.element
72+
; _∙_ = _∙ₖ_
73+
; ε = εₖ
74+
; _⁻¹ = _⁻¹ₖ
75+
}
76+
77+
element-isGroupMonomorphism : IsGroupMonomorphism Kernel-rawGroup G.rawGroup Kernel.element
78+
element-isGroupMonomorphism = record
79+
{ isGroupHomomorphism = record
80+
{ isMonoidHomomorphism = record
81+
{ isMagmaHomomorphism = record
82+
{ isRelHomomorphism = record
83+
{ cong = λ p p
84+
}
85+
; homo = λ x y G.refl
86+
}
87+
; ε-homo = G.refl
88+
}
89+
; ⁻¹-homo = λ x G.refl
90+
}
91+
; injective = λ p p
92+
}
93+
94+
kernelNormalSubgroup : NormalSubgroup G (c ⊔ ℓ′) ℓ
95+
kernelNormalSubgroup = record
96+
{ N = Kernel-rawGroup
97+
; ι = Kernel.element
98+
; ι-monomorphism = element-isGroupMonomorphism
99+
; normal = λ n g let module N = Kernel n in record
100+
{ fst = record
101+
{ element = g G.∙ N.element G.∙ g G.⁻¹
102+
; inKernel = begin⟨ H.setoid ⟩
103+
ρ (g G.∙ N.element G.∙ g G.⁻¹) ≈⟨ ρ.homo (g G.∙ N.element) (g G.⁻¹) ⟩
104+
ρ (g G.∙ N.element) H.∙ ρ (g G.⁻¹) ≈⟨ H.∙-congʳ (ρ.homo g N.element) ⟩
105+
ρ g H.∙ ρ N.element H.∙ ρ (g G.⁻¹) ≈⟨ H.∙-congʳ (H.∙-congˡ N.inKernel) ⟩
106+
ρ g H.∙ H.ε H.∙ ρ (g G.⁻¹) ≈⟨ H.∙-congʳ (H.identityʳ (ρ g)) ⟩
107+
ρ g H.∙ ρ (g G.⁻¹) ≈⟨ ρ.homo g (g G.⁻¹) ⟨
108+
ρ (g G.∙ g G.⁻¹) ≈⟨ ρ.⟦⟧-cong (G.inverseʳ g) ⟩
109+
ρ G.ε ≈⟨ ρ.ε-homo ⟩
110+
H.ε ∎
111+
}
112+
; snd = G.refl
113+
}
114+
}

0 commit comments

Comments
 (0)