| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Some derivable properties |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
open import Algebra.Bundles |
| 10 |
|
| 11 |
module Algebra.Properties.Group {g₁ g₂} (G : Group g₁ g₂) where |
| 12 |
|
| 13 |
import Algebra.Properties.Loop as LoopProperties |
| 14 |
import Algebra.Properties.Quasigroup as QuasigroupProperties |
| 15 |
open import Data.Product.Base using (_,_) |
| 16 |
open import Function.Base using (_$_) |
| 17 |
open import Function.Definitions using (Injective) |
| 18 |
|
| 19 |
open Group G |
| 20 |
open import Algebra.Consequences.Setoid setoid |
| 21 |
open import Algebra.Definitions _≈_ |
| 22 |
open import Algebra.Structures _≈_ using (IsLoop; IsQuasigroup) |
| 23 |
open import Relation.Binary.Reasoning.Setoid setoid |
| 24 |
|
| 25 |
\\-cong₂ : Congruent₂ _\\_ |
| 26 |
\\-cong₂ x≈y u≈v = ∙-cong (⁻¹-cong x≈y) u≈v |
| 27 |
|
| 28 |
//-cong₂ : Congruent₂ _//_ |
| 29 |
//-cong₂ x≈y u≈v = ∙-cong x≈y (⁻¹-cong u≈v) |
| 30 |
|
| 31 |
------------------------------------------------------------------------ |
| 32 |
-- Groups are quasi-groups |
| 33 |
|
| 34 |
\\-leftDividesˡ : LeftDividesˡ _∙_ _\\_ |
| 35 |
\\-leftDividesˡ x y = begin |
| 36 |
x ∙ (x \\ y) ≈⟨ assoc x (x ⁻¹) y ⟨ |
| 37 |
x ∙ x ⁻¹ ∙ y ≈⟨ ∙-congʳ (inverseʳ x) ⟩ |
| 38 |
ε ∙ y ≈⟨ identityˡ y ⟩ |
| 39 |
y ∎ |
| 40 |
|
| 41 |
\\-leftDividesʳ : LeftDividesʳ _∙_ _\\_ |
| 42 |
\\-leftDividesʳ x y = begin |
| 43 |
x \\ x ∙ y ≈⟨ assoc (x ⁻¹) x y ⟨ |
| 44 |
x ⁻¹ ∙ x ∙ y ≈⟨ ∙-congʳ (inverseˡ x) ⟩ |
| 45 |
ε ∙ y ≈⟨ identityˡ y ⟩ |
| 46 |
y ∎ |
| 47 |
|
| 48 |
|
| 49 |
\\-leftDivides : LeftDivides _∙_ _\\_ |
| 50 |
\\-leftDivides = \\-leftDividesˡ , \\-leftDividesʳ |
| 51 |
|
| 52 |
//-rightDividesˡ : RightDividesˡ _∙_ _//_ |
| 53 |
//-rightDividesˡ x y = begin |
| 54 |
(y // x) ∙ x ≈⟨ assoc y (x ⁻¹) x ⟩ |
| 55 |
y ∙ (x ⁻¹ ∙ x) ≈⟨ ∙-congˡ (inverseˡ x) ⟩ |
| 56 |
y ∙ ε ≈⟨ identityʳ y ⟩ |
| 57 |
y ∎ |
| 58 |
|
| 59 |
//-rightDividesʳ : RightDividesʳ _∙_ _//_ |
| 60 |
//-rightDividesʳ x y = begin |
| 61 |
y ∙ x // x ≈⟨ assoc y x (x ⁻¹) ⟩ |
| 62 |
y ∙ (x // x) ≈⟨ ∙-congˡ (inverseʳ x) ⟩ |
| 63 |
y ∙ ε ≈⟨ identityʳ y ⟩ |
| 64 |
y ∎ |
| 65 |
|
| 66 |
//-rightDivides : RightDivides _∙_ _//_ |
| 67 |
//-rightDivides = //-rightDividesˡ , //-rightDividesʳ |
| 68 |
|
| 69 |
isQuasigroup : IsQuasigroup _∙_ _\\_ _//_ |
| 70 |
isQuasigroup = record |
| 71 |
{ isMagma = isMagma |
| 72 |
; \\-cong = \\-cong₂ |
| 73 |
; //-cong = //-cong₂ |
| 74 |
; leftDivides = \\-leftDivides |
| 75 |
; rightDivides = //-rightDivides |
| 76 |
} |
| 77 |
|
| 78 |
quasigroup : Quasigroup _ _ |
| 79 |
quasigroup = record { isQuasigroup = isQuasigroup } |
| 80 |
|
| 81 |
open QuasigroupProperties quasigroup public |
| 82 |
using (x≈z//y; y≈x\\z) |
| 83 |
renaming (cancelˡ to ∙-cancelˡ; cancelʳ to ∙-cancelʳ; cancel to ∙-cancel) |
| 84 |
|
| 85 |
------------------------------------------------------------------------ |
| 86 |
-- Groups are loops |
| 87 |
|
| 88 |
isLoop : IsLoop _∙_ _\\_ _//_ ε |
| 89 |
isLoop = record { isQuasigroup = isQuasigroup ; identity = identity } |
| 90 |
|
| 91 |
loop : Loop _ _ |
| 92 |
loop = record { isLoop = isLoop } |
| 93 |
|
| 94 |
open LoopProperties loop public |
| 95 |
using (identityˡ-unique; identityʳ-unique; identity-unique) |
| 96 |
|
| 97 |
------------------------------------------------------------------------ |
| 98 |
-- Other properties |
| 99 |
|
| 100 |
inverseˡ-unique : ∀ x y → x ∙ y ≈ ε → x ≈ y ⁻¹ |
| 101 |
inverseˡ-unique x y eq = trans (x≈z//y x y ε eq) (identityˡ _) |
| 102 |
|
| 103 |
inverseʳ-unique : ∀ x y → x ∙ y ≈ ε → y ≈ x ⁻¹ |
| 104 |
inverseʳ-unique x y eq = trans (y≈x\\z x y ε eq) (identityʳ _) |
| 105 |
|
| 106 |
ε⁻¹≈ε : ε ⁻¹ ≈ ε |
| 107 |
ε⁻¹≈ε = sym $ inverseˡ-unique _ _ (identityˡ ε) |
| 108 |
|
| 109 |
⁻¹-selfInverse : SelfInverse _⁻¹ |
| 110 |
⁻¹-selfInverse {x} {y} eq = sym $ inverseˡ-unique x y $ begin |
| 111 |
x ∙ y ≈⟨ ∙-congˡ eq ⟨ |
| 112 |
x ∙ x ⁻¹ ≈⟨ inverseʳ x ⟩ |
| 113 |
ε ∎ |
| 114 |
|
| 115 |
⁻¹-involutive : Involutive _⁻¹ |
| 116 |
⁻¹-involutive = selfInverse⇒involutive ⁻¹-selfInverse |
| 117 |
|
| 118 |
x∙y⁻¹≈ε⇒x≈y : ∀ x y → (x ∙ y ⁻¹) ≈ ε → x ≈ y |
| 119 |
x∙y⁻¹≈ε⇒x≈y x y x∙y⁻¹≈ε = begin |
| 120 |
x ≈⟨ inverseˡ-unique x (y ⁻¹) x∙y⁻¹≈ε ⟩ |
| 121 |
y ⁻¹ ⁻¹ ≈⟨ ⁻¹-involutive y ⟩ |
| 122 |
y ∎ |
| 123 |
|
| 124 |
x≈y⇒x∙y⁻¹≈ε : ∀ {x y} → x ≈ y → (x ∙ y ⁻¹) ≈ ε |
| 125 |
x≈y⇒x∙y⁻¹≈ε {x} {y} x≈y = begin |
| 126 |
x ∙ y ⁻¹ ≈⟨ ∙-congʳ x≈y ⟩ |
| 127 |
y ∙ y ⁻¹ ≈⟨ inverseʳ y ⟩ |
| 128 |
ε ∎ |
| 129 |
|
| 130 |
⁻¹-injective : Injective _≈_ _≈_ _⁻¹ |
| 131 |
⁻¹-injective = selfInverse⇒injective ⁻¹-selfInverse |
| 132 |
|
| 133 |
⁻¹-anti-homo-∙ : ∀ x y → (x ∙ y) ⁻¹ ≈ y ⁻¹ ∙ x ⁻¹ |
| 134 |
⁻¹-anti-homo-∙ x y = ∙-cancelˡ _ _ _ $ begin |
| 135 |
x ∙ y ∙ (x ∙ y) ⁻¹ ≈⟨ inverseʳ _ ⟩ |
| 136 |
ε ≈⟨ inverseʳ _ ⟨ |
| 137 |
x ∙ x ⁻¹ ≈⟨ ∙-congʳ (//-rightDividesʳ y x) ⟨ |
| 138 |
(x ∙ y) ∙ y ⁻¹ ∙ x ⁻¹ ≈⟨ assoc (x ∙ y) (y ⁻¹) (x ⁻¹) ⟩ |
| 139 |
x ∙ y ∙ (y ⁻¹ ∙ x ⁻¹) ∎ |
| 140 |
|
| 141 |
⁻¹-anti-homo-// : ∀ x y → (x // y) ⁻¹ ≈ y // x |
| 142 |
⁻¹-anti-homo-// x y = begin |
| 143 |
(x // y) ⁻¹ ≡⟨⟩ |
| 144 |
(x ∙ y ⁻¹) ⁻¹ ≈⟨ ⁻¹-anti-homo-∙ x (y ⁻¹) ⟩ |
| 145 |
(y ⁻¹) ⁻¹ ∙ x ⁻¹ ≈⟨ ∙-congʳ (⁻¹-involutive y) ⟩ |
| 146 |
y ∙ x ⁻¹ ≡⟨⟩ |
| 147 |
y // x ∎ |
| 148 |
|
| 149 |
⁻¹-anti-homo-\\ : ∀ x y → (x \\ y) ⁻¹ ≈ y \\ x |
| 150 |
⁻¹-anti-homo-\\ x y = begin |
| 151 |
(x \\ y) ⁻¹ ≡⟨⟩ |
| 152 |
(x ⁻¹ ∙ y) ⁻¹ ≈⟨ ⁻¹-anti-homo-∙ (x ⁻¹) y ⟩ |
| 153 |
y ⁻¹ ∙ (x ⁻¹) ⁻¹ ≈⟨ ∙-congˡ (⁻¹-involutive x) ⟩ |
| 154 |
y ⁻¹ ∙ x ≡⟨⟩ |
| 155 |
y \\ x ∎ |
| 156 |
|
| 157 |
\\≗flip-//⇒comm : (∀ x y → x \\ y ≈ y // x) → Commutative _∙_ |
| 158 |
\\≗flip-//⇒comm \\≗//ᵒ x y = begin |
| 159 |
x ∙ y ≈⟨ ∙-congˡ (//-rightDividesˡ x y) ⟨ |
| 160 |
x ∙ ((y // x) ∙ x) ≈⟨ ∙-congˡ (∙-congʳ (\\≗//ᵒ x y)) ⟨ |
| 161 |
x ∙ ((x \\ y) ∙ x) ≈⟨ assoc x (x \\ y) x ⟨ |
| 162 |
x ∙ (x \\ y) ∙ x ≈⟨ ∙-congʳ (\\-leftDividesˡ x y) ⟩ |
| 163 |
y ∙ x ∎ |
| 164 |
|
| 165 |
comm⇒\\≗flip-// : Commutative _∙_ → ∀ x y → x \\ y ≈ y // x |
| 166 |
comm⇒\\≗flip-// comm x y = begin |
| 167 |
x \\ y ≡⟨⟩ |
| 168 |
x ⁻¹ ∙ y ≈⟨ comm _ _ ⟩ |
| 169 |
y ∙ x ⁻¹ ≡⟨⟩ |
| 170 |
y // x ∎ |