| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Consequences of a monomorphism between group-like structures |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
-- See Data.Nat.Binary.Properties for examples of how this and similar |
| 8 |
-- modules can be used to easily translate properties between types. |
| 9 |
|
| 10 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 11 |
|
| 12 |
open import Algebra.Bundles using (RawGroup) |
| 13 |
open import Algebra.Morphism.Structures |
| 14 |
using (IsGroupMonomorphism; IsMonoidMonomorphism) |
| 15 |
open import Function.Base using (_∘_) |
| 16 |
open import Level using (_⊔_) |
| 17 |
open import Relation.Binary.Core using (Rel) |
| 18 |
open import Relation.Binary.Structures using (IsEquivalence) |
| 19 |
|
| 20 |
module Algebra.Morphism.GroupMonomorphism |
| 21 |
{a b ℓ₁ ℓ₂} {G₁ : RawGroup a ℓ₁} {G₂ : RawGroup b ℓ₂} {⟦_⟧} |
| 22 |
(isGroupMonomorphism : IsGroupMonomorphism G₁ G₂ ⟦_⟧) |
| 23 |
where |
| 24 |
|
| 25 |
open IsGroupMonomorphism isGroupMonomorphism |
| 26 |
open RawGroup G₁ renaming |
| 27 |
(Carrier to A; _≈_ to _≈₁_; _∙_ to _∙_; _⁻¹ to _⁻¹₁; ε to ε₁) |
| 28 |
open RawGroup G₂ renaming |
| 29 |
(Carrier to B; _≈_ to _≈₂_; _∙_ to _◦_; _⁻¹ to _⁻¹₂; ε to ε₂) |
| 30 |
|
| 31 |
open import Algebra.Definitions |
| 32 |
using (Inverse; LeftInverse; RightInverse; Congruent₁) |
| 33 |
open import Algebra.Structures |
| 34 |
using (IsMagma; IsGroup; IsAbelianGroup) |
| 35 |
open import Data.Product.Base using (_,_) |
| 36 |
import Relation.Binary.Reasoning.Setoid as ≈-Reasoning |
| 37 |
|
| 38 |
------------------------------------------------------------------------ |
| 39 |
-- Re-export all properties of monoid monomorphisms |
| 40 |
|
| 41 |
open import Algebra.Morphism.MonoidMonomorphism |
| 42 |
isMonoidMonomorphism public |
| 43 |
|
| 44 |
------------------------------------------------------------------------ |
| 45 |
-- Properties |
| 46 |
|
| 47 |
module _ (◦-isMagma : IsMagma _≈₂_ _◦_) where |
| 48 |
|
| 49 |
open IsMagma ◦-isMagma renaming (∙-cong to ◦-cong) |
| 50 |
open ≈-Reasoning setoid |
| 51 |
|
| 52 |
inverseˡ : LeftInverse _≈₂_ ε₂ _⁻¹₂ _◦_ → LeftInverse _≈₁_ ε₁ _⁻¹₁ _∙_ |
| 53 |
inverseˡ invˡ x = injective (begin |
| 54 |
⟦ x ⁻¹₁ ∙ x ⟧ ≈⟨ ∙-homo (x ⁻¹₁ ) x ⟩ |
| 55 |
⟦ x ⁻¹₁ ⟧ ◦ ⟦ x ⟧ ≈⟨ ◦-cong (⁻¹-homo x) refl ⟩ |
| 56 |
⟦ x ⟧ ⁻¹₂ ◦ ⟦ x ⟧ ≈⟨ invˡ ⟦ x ⟧ ⟩ |
| 57 |
ε₂ ≈⟨ ε-homo ⟨ |
| 58 |
⟦ ε₁ ⟧ ∎) |
| 59 |
|
| 60 |
inverseʳ : RightInverse _≈₂_ ε₂ _⁻¹₂ _◦_ → RightInverse _≈₁_ ε₁ _⁻¹₁ _∙_ |
| 61 |
inverseʳ invʳ x = injective (begin |
| 62 |
⟦ x ∙ x ⁻¹₁ ⟧ ≈⟨ ∙-homo x (x ⁻¹₁) ⟩ |
| 63 |
⟦ x ⟧ ◦ ⟦ x ⁻¹₁ ⟧ ≈⟨ ◦-cong refl (⁻¹-homo x) ⟩ |
| 64 |
⟦ x ⟧ ◦ ⟦ x ⟧ ⁻¹₂ ≈⟨ invʳ ⟦ x ⟧ ⟩ |
| 65 |
ε₂ ≈⟨ ε-homo ⟨ |
| 66 |
⟦ ε₁ ⟧ ∎) |
| 67 |
|
| 68 |
inverse : Inverse _≈₂_ ε₂ _⁻¹₂ _◦_ → Inverse _≈₁_ ε₁ _⁻¹₁ _∙_ |
| 69 |
inverse (invˡ , invʳ) = inverseˡ invˡ , inverseʳ invʳ |
| 70 |
|
| 71 |
⁻¹-cong : Congruent₁ _≈₂_ _⁻¹₂ → Congruent₁ _≈₁_ _⁻¹₁ |
| 72 |
⁻¹-cong ⁻¹-cong {x} {y} x≈y = injective (begin |
| 73 |
⟦ x ⁻¹₁ ⟧ ≈⟨ ⁻¹-homo x ⟩ |
| 74 |
⟦ x ⟧ ⁻¹₂ ≈⟨ ⁻¹-cong (⟦⟧-cong x≈y) ⟩ |
| 75 |
⟦ y ⟧ ⁻¹₂ ≈⟨ ⁻¹-homo y ⟨ |
| 76 |
⟦ y ⁻¹₁ ⟧ ∎) |
| 77 |
|
| 78 |
module _ (◦-isAbelianGroup : IsAbelianGroup _≈₂_ _◦_ ε₂ _⁻¹₂) where |
| 79 |
|
| 80 |
open IsAbelianGroup ◦-isAbelianGroup renaming (∙-cong to ◦-cong; ⁻¹-cong to ⁻¹₂-cong) |
| 81 |
open ≈-Reasoning setoid |
| 82 |
|
| 83 |
⁻¹-distrib-∙ : (∀ x y → (x ◦ y) ⁻¹₂ ≈₂ (x ⁻¹₂) ◦ (y ⁻¹₂)) → (∀ x y → (x ∙ y) ⁻¹₁ ≈₁ (x ⁻¹₁) ∙ (y ⁻¹₁)) |
| 84 |
⁻¹-distrib-∙ ⁻¹-distrib-∙ x y = injective (begin |
| 85 |
⟦ (x ∙ y) ⁻¹₁ ⟧ ≈⟨ ⁻¹-homo (x ∙ y) ⟩ |
| 86 |
⟦ x ∙ y ⟧ ⁻¹₂ ≈⟨ ⁻¹₂-cong (∙-homo x y) ⟩ |
| 87 |
(⟦ x ⟧ ◦ ⟦ y ⟧) ⁻¹₂ ≈⟨ ⁻¹-distrib-∙ ⟦ x ⟧ ⟦ y ⟧ ⟩ |
| 88 |
⟦ x ⟧ ⁻¹₂ ◦ ⟦ y ⟧ ⁻¹₂ ≈⟨ sym (◦-cong (⁻¹-homo x) (⁻¹-homo y)) ⟩ |
| 89 |
⟦ x ⁻¹₁ ⟧ ◦ ⟦ y ⁻¹₁ ⟧ ≈⟨ sym (∙-homo (x ⁻¹₁) (y ⁻¹₁)) ⟩ |
| 90 |
⟦ (x ⁻¹₁) ∙ (y ⁻¹₁) ⟧ ∎) |
| 91 |
|
| 92 |
isGroup : IsGroup _≈₂_ _◦_ ε₂ _⁻¹₂ → IsGroup _≈₁_ _∙_ ε₁ _⁻¹₁ |
| 93 |
isGroup isGroup = record |
| 94 |
{ isMonoid = isMonoid G.isMonoid |
| 95 |
; inverse = inverse G.isMagma G.inverse |
| 96 |
; ⁻¹-cong = ⁻¹-cong G.isMagma G.⁻¹-cong |
| 97 |
} where module G = IsGroup isGroup |
| 98 |
|
| 99 |
isAbelianGroup : IsAbelianGroup _≈₂_ _◦_ ε₂ _⁻¹₂ → IsAbelianGroup _≈₁_ _∙_ ε₁ _⁻¹₁ |
| 100 |
isAbelianGroup isAbelianGroup = record |
| 101 |
{ isGroup = isGroup G.isGroup |
| 102 |
; comm = comm G.isMagma G.comm |
| 103 |
} where module G = IsAbelianGroup isAbelianGroup |