|
| 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.Construct.Sub.Group.Normal using (NormalSubgroup) |
| 11 | + |
| 12 | +module Algebra.Construct.Quotient.Group |
| 13 | + {c ℓ} (G : Group c ℓ) {c′ ℓ′} (N : NormalSubgroup G c′ ℓ′) where |
| 14 | + |
| 15 | +open import Algebra.Definitions using (Congruent₁; Congruent₂) |
| 16 | +open import Algebra.Morphism.Structures |
| 17 | + using (IsMagmaHomomorphism; IsMonoidHomomorphism; IsGroupHomomorphism) |
| 18 | +open import Data.Product.Base using (_,_) |
| 19 | +open import Function.Base using (_∘_) |
| 20 | +open import Function.Definitions using (Surjective) |
| 21 | +open import Level using (_⊔_) |
| 22 | +open import Relation.Binary.Core using (_⇒_) |
| 23 | +open import Relation.Binary.Definitions using (Reflexive; Symmetric; Transitive) |
| 24 | + |
| 25 | +private |
| 26 | + 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 |
| 33 | + open module N = NormalSubgroup N |
| 34 | + using (ι; module ι; conjugate; normal) |
| 35 | + |
| 36 | +infix 0 _by_ |
| 37 | + |
| 38 | +data _≋_ (x y : Carrier) : Set (c ⊔ ℓ ⊔ c′) where |
| 39 | + _by_ : ∀ g → ι g ∙ x ≈ y → x ≋ y |
| 40 | + |
| 41 | +≈⇒≋ : _≈_ ⇒ _≋_ |
| 42 | +≈⇒≋ x≈y = N.ε by trans (∙-cong ι.ε-homo x≈y) (identityˡ _) |
| 43 | + |
| 44 | +≋-refl : Reflexive _≋_ |
| 45 | +≋-refl = ≈⇒≋ refl |
| 46 | + |
| 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 ⟩ |
| 51 | + x ∎ |
| 52 | + |
| 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) ⟩ |
| 56 | + (ι h ∙ ι g) ∙ x ≈⟨ uv≈w⇒xu∙v≈xw ιg∙x≈y (ι h) ⟩ |
| 57 | + ι h ∙ y ≈⟨ ιh∙y≈z ⟩ |
| 58 | + z ∎ |
| 59 | + |
| 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′) ⟩ |
| 63 | + (ι 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 ⟩ |
| 65 | + y ∙ v ∎ |
| 66 | + where h′ = conjugate h x |
| 67 | + |
| 68 | +≋-⁻¹-cong : Congruent₁ _≋_ _⁻¹ |
| 69 | +≋-⁻¹-cong {x} {y} (g by ιg∙x≈y) = h by begin |
| 70 | + ι h ∙ x ⁻¹ ≈⟨ normal (g N.⁻¹) (x ⁻¹) ⟩ |
| 71 | + x ⁻¹ ∙ ι (g N.⁻¹) ≈⟨ ∙-congˡ (ι.⁻¹-homo g) ⟩ |
| 72 | + x ⁻¹ ∙ ι g ⁻¹ ≈⟨ ⁻¹-anti-homo-∙ (ι g) x ⟨ |
| 73 | + (ι g ∙ x) ⁻¹ ≈⟨ ⁻¹-cong ιg∙x≈y ⟩ |
| 74 | + y ⁻¹ ∎ |
| 75 | + where h = conjugate (g N.⁻¹) (x ⁻¹) |
| 76 | + |
| 77 | +quotientGroup : Group c (c ⊔ ℓ ⊔ c′) |
| 78 | +quotientGroup = record |
| 79 | + { isGroup = record |
| 80 | + { isMonoid = record |
| 81 | + { isSemigroup = record |
| 82 | + { isMagma = record |
| 83 | + { isEquivalence = record |
| 84 | + { refl = ≋-refl |
| 85 | + ; sym = ≋-sym |
| 86 | + ; trans = ≋-trans |
| 87 | + } |
| 88 | + ; ∙-cong = ≋-∙-cong |
| 89 | + } |
| 90 | + ; assoc = λ x y z → ≈⇒≋ (assoc x y z) |
| 91 | + } |
| 92 | + ; identity = ≈⇒≋ ∘ identityˡ , ≈⇒≋ ∘ identityʳ |
| 93 | + } |
| 94 | + ; inverse = ≈⇒≋ ∘ inverseˡ , ≈⇒≋ ∘ inverseʳ |
| 95 | + ; ⁻¹-cong = ≋-⁻¹-cong |
| 96 | + } |
| 97 | + } |
| 98 | + |
| 99 | +_/_ : Group c (c ⊔ ℓ ⊔ c′) |
| 100 | +_/_ = quotientGroup |
| 101 | + |
| 102 | +π : Group.Carrier G → Group.Carrier quotientGroup |
| 103 | +π x = x -- because we do all the work in the relation |
| 104 | + |
| 105 | +π-isMagmaHomomorphism : IsMagmaHomomorphism rawMagma (Group.rawMagma quotientGroup) π |
| 106 | +π-isMagmaHomomorphism = record |
| 107 | + { isRelHomomorphism = record |
| 108 | + { cong = ≈⇒≋ |
| 109 | + } |
| 110 | + ; homo = λ _ _ → ≋-refl |
| 111 | + } |
| 112 | + |
| 113 | +π-isMonoidHomomorphism : IsMonoidHomomorphism rawMonoid (Group.rawMonoid quotientGroup) π |
| 114 | +π-isMonoidHomomorphism = record |
| 115 | + { isMagmaHomomorphism = π-isMagmaHomomorphism |
| 116 | + ; ε-homo = ≋-refl |
| 117 | + } |
| 118 | + |
| 119 | +π-isGroupHomomorphism : IsGroupHomomorphism rawGroup (Group.rawGroup quotientGroup) π |
| 120 | +π-isGroupHomomorphism = record |
| 121 | + { isMonoidHomomorphism = π-isMonoidHomomorphism |
| 122 | + ; ⁻¹-homo = λ _ → ≋-refl |
| 123 | + } |
| 124 | + |
| 125 | +π-surjective : Surjective _≈_ _≋_ π |
| 126 | +π-surjective g = g , ≈⇒≋ |
0 commit comments