@@ -13,8 +13,7 @@ module Algebra.Construct.Quotient.Group
1313 {c ℓ} (G : Group c ℓ) {c′ ℓ′} (N : NormalSubgroup G c′ ℓ′) where
1414
1515open import Algebra.Definitions using (Congruent₁; Congruent₂)
16- open import Algebra.Morphism.Structures
17- using (IsMagmaHomomorphism; IsMonoidHomomorphism; IsGroupHomomorphism)
16+ open import Algebra.Morphism.Structures using (IsGroupHomomorphism)
1817open import Data.Product.Base using (_,_)
1918open import Function.Base using (_∘_)
2019open import Function.Definitions using (Surjective)
@@ -24,103 +23,106 @@ open import Relation.Binary.Definitions using (Reflexive; Symmetric; Transitive)
2423
2524private
2625 open module G = Group G
27-
28- open import Algebra.Properties.Group G using (⁻¹-anti-homo-∙)
29- open import Algebra.Properties.Monoid monoid
30- open import Relation.Binary.Reasoning.Setoid setoid
31-
32- private
26+ using (_≈_; _∙_; ε; _⁻¹)
3327 open module N = NormalSubgroup N
3428 using (ι; module ι ; conjugate; normal)
3529
30+ open import Algebra.Properties.Group G using (⁻¹-anti-homo-∙)
31+ open import Algebra.Properties.Monoid G.monoid
32+ open import Relation.Binary.Reasoning.Setoid G.setoid
33+
3634infix 0 _by_
3735
38- data _≋_ (x y : Carrier) : Set (c ⊔ ℓ ⊔ c′) where
36+ data _≋_ (x y : G. Carrier) : Set (c ⊔ ℓ ⊔ c′) where
3937 _by_ : ∀ g → ι g ∙ x ≈ y → x ≋ y
4038
4139≈⇒≋ : _≈_ ⇒ _≋_
42- ≈⇒≋ x≈y = N.ε by trans (∙-cong ι.ε-homo x≈y) (identityˡ _)
40+ ≈⇒≋ x≈y = N.ε by G. trans (G. ∙-cong ι.ε-homo x≈y) (G. identityˡ _)
4341
44- ≋- refl : Reflexive _≋_
45- ≋- refl = ≈⇒≋ refl
42+ refl : Reflexive _≋_
43+ refl = ≈⇒≋ G. refl
4644
47- ≋- sym : Symmetric _≋_
48- ≋- sym {x} {y} (g by ιg∙x≈y) = g N.⁻¹ by begin
49- ι (g N.⁻¹) ∙ y ≈⟨ ∙-cong (ι.⁻¹-homo g) (sym ιg∙x≈y) ⟩
50- ι g ⁻¹ ∙ (ι g ∙ x) ≈⟨ cancelˡ (inverseˡ (ι g)) x ⟩
45+ sym : Symmetric _≋_
46+ sym {x} {y} (g by ιg∙x≈y) = g N.⁻¹ by begin
47+ ι (g N.⁻¹) ∙ y ≈⟨ G. ∙-cong (ι.⁻¹-homo g) (G. sym ιg∙x≈y) ⟩
48+ ι g ⁻¹ ∙ (ι g ∙ x) ≈⟨ cancelˡ (G. inverseˡ (ι g)) x ⟩
5149 x ∎
5250
53- ≋- trans : Transitive _≋_
54- ≋- trans {x} {y} {z} (g by ιg∙x≈y) (h by ιh∙y≈z) = h N.∙ g by begin
55- ι (h N.∙ g) ∙ x ≈⟨ ∙-congʳ (ι.∙-homo h g) ⟩
51+ trans : Transitive _≋_
52+ trans {x} {y} {z} (g by ιg∙x≈y) (h by ιh∙y≈z) = h N.∙ g by begin
53+ ι (h N.∙ g) ∙ x ≈⟨ G. ∙-congʳ (ι.∙-homo h g) ⟩
5654 (ι h ∙ ι g) ∙ x ≈⟨ uv≈w⇒xu∙v≈xw ιg∙x≈y (ι h) ⟩
5755 ι h ∙ y ≈⟨ ιh∙y≈z ⟩
5856 z ∎
5957
60- ≋- ∙-cong : Congruent₂ _≋_ _∙_
61- ≋- ∙-cong {x} {y} {u} {v} (g by ιg∙x≈y) (h by ιh∙u≈v) = g N.∙ h′ by begin
62- ι (g N.∙ h′) ∙ (x ∙ u) ≈⟨ ∙-congʳ (ι.∙-homo g h′) ⟩
58+ ∙-cong : Congruent₂ _≋_ _∙_
59+ ∙-cong {x} {y} {u} {v} (g by ιg∙x≈y) (h by ιh∙u≈v) = g N.∙ h′ by begin
60+ ι (g N.∙ h′) ∙ (x ∙ u) ≈⟨ G. ∙-congʳ (ι.∙-homo g h′) ⟩
6361 (ι g ∙ ι h′) ∙ (x ∙ u) ≈⟨ uv≈wx⇒yu∙vz≈yw∙xz (normal h x) (ι g) u ⟩
64- (ι g ∙ x) ∙ (ι h ∙ u) ≈⟨ ∙-cong ιg∙x≈y ιh∙u≈v ⟩
62+ (ι g ∙ x) ∙ (ι h ∙ u) ≈⟨ G. ∙-cong ιg∙x≈y ιh∙u≈v ⟩
6563 y ∙ v ∎
6664 where h′ = conjugate h x
6765
68- ≋- ⁻¹-cong : Congruent₁ _≋_ _⁻¹
69- ≋- ⁻¹-cong {x} {y} (g by ιg∙x≈y) = h by begin
66+ ⁻¹-cong : Congruent₁ _≋_ _⁻¹
67+ ⁻¹-cong {x} {y} (g by ιg∙x≈y) = h by begin
7068 ι h ∙ x ⁻¹ ≈⟨ normal (g N.⁻¹) (x ⁻¹) ⟩
71- x ⁻¹ ∙ ι (g N.⁻¹) ≈⟨ ∙-congˡ (ι.⁻¹-homo g) ⟩
69+ x ⁻¹ ∙ ι (g N.⁻¹) ≈⟨ G. ∙-congˡ (ι.⁻¹-homo g) ⟩
7270 x ⁻¹ ∙ ι g ⁻¹ ≈⟨ ⁻¹-anti-homo-∙ (ι g) x ⟨
73- (ι g ∙ x) ⁻¹ ≈⟨ ⁻¹-cong ιg∙x≈y ⟩
71+ (ι g ∙ x) ⁻¹ ≈⟨ G. ⁻¹-cong ιg∙x≈y ⟩
7472 y ⁻¹ ∎
7573 where h = conjugate (g N.⁻¹) (x ⁻¹)
7674
77- quotientGroup : Group c (c ⊔ ℓ ⊔ c′)
78- quotientGroup = record
75+ group : Group c (c ⊔ ℓ ⊔ c′)
76+ group = record
7977 { isGroup = record
8078 { isMonoid = record
8179 { isSemigroup = record
8280 { isMagma = record
8381 { isEquivalence = record
84- { refl = ≋- refl
85- ; sym = ≋- sym
86- ; trans = ≋- trans
82+ { refl = refl
83+ ; sym = sym
84+ ; trans = trans
8785 }
88- ; ∙-cong = ≋- ∙-cong
86+ ; ∙-cong = ∙-cong
8987 }
90- ; assoc = λ x y z → ≈⇒≋ (assoc x y z)
88+ ; assoc = λ x y z → ≈⇒≋ (G. assoc x y z)
9189 }
92- ; identity = ≈⇒≋ ∘ identityˡ , ≈⇒≋ ∘ identityʳ
90+ ; identity = ≈⇒≋ ∘ G. identityˡ , ≈⇒≋ ∘ G. identityʳ
9391 }
94- ; inverse = ≈⇒≋ ∘ inverseˡ , ≈⇒≋ ∘ inverseʳ
95- ; ⁻¹-cong = ≋- ⁻¹-cong
92+ ; inverse = ≈⇒≋ ∘ G. inverseˡ , ≈⇒≋ ∘ G. inverseʳ
93+ ; ⁻¹-cong = ⁻¹-cong
9694 }
9795 }
9896
99- _/_ : Group c (c ⊔ ℓ ⊔ c′)
100- _/_ = quotientGroup
97+ private module Q = Group group
10198
102- π : Group.Carrier G → Group.Carrier quotientGroup
103- π x = x -- because we do all the work in the relation
99+ -- Public re-exports
104100
105- π-isMagmaHomomorphism : IsMagmaHomomorphism rawMagma (Group.rawMagma quotientGroup) π
106- π-isMagmaHomomorphism = record
107- { isRelHomomorphism = record
108- { cong = ≈⇒≋
109- }
110- ; homo = λ _ _ → ≋-refl
111- }
101+ _/_ : Group c (c ⊔ ℓ ⊔ c′)
102+ _/_ = group
112103
113- π-isMonoidHomomorphism : IsMonoidHomomorphism rawMonoid (Group.rawMonoid quotientGroup) π
114- π-isMonoidHomomorphism = record
115- { isMagmaHomomorphism = π-isMagmaHomomorphism
116- ; ε-homo = ≋-refl
117- }
104+ π : G.Carrier → Q.Carrier
105+ π x = x -- because we do all the work in the relation _≋_
118106
119- π-isGroupHomomorphism : IsGroupHomomorphism rawGroup (Group.rawGroup quotientGroup) π
107+ π-surjective : Surjective _≈_ _≋_ π
108+ π-surjective g = g , ≈⇒≋
109+
110+ π-isGroupHomomorphism : IsGroupHomomorphism G.rawGroup Q.rawGroup π
120111π-isGroupHomomorphism = record
121- { isMonoidHomomorphism = π-isMonoidHomomorphism
122- ; ⁻¹-homo = λ _ → ≋-refl
112+ { isMonoidHomomorphism = record
113+ { isMagmaHomomorphism = record
114+ { isRelHomomorphism = record
115+ { cong = ≈⇒≋
116+ }
117+ ; homo = λ _ _ → refl
118+ }
119+ ; ε-homo = refl
120+ }
121+ ; ⁻¹-homo = λ _ → refl
123122 }
124123
125- π-surjective : Surjective _≈_ _≋_ π
126- π-surjective g = g , ≈⇒≋
124+ open IsGroupHomomorphism π-isGroupHomomorphism public
125+ using ()
126+ renaming (isMonoidHomomorphism to π-isMonoidHomomorphism
127+ ; isMagmaHomomorphism to π-isMagmaHomomorphism
128+ )
0 commit comments