1
------------------------------------------------------------------------
2
-- The Agda standard library
4
-- Some derivable properties
5
------------------------------------------------------------------------
9
module Algebra.Properties.Group {g₁ g₂} (G : Group g₁ g₂) where
12
import Algebra.FunctionProperties as P; open P _≈_
13
import Relation.Binary.EqReasoning as EqR; open EqR setoid
15
open import Data.Product
17
⁻¹-involutive : ∀ x → x ⁻¹ ⁻¹ ≈ x
18
⁻¹-involutive x = begin
19
x ⁻¹ ⁻¹ ≈⟨ sym $ proj₂ identity _ ⟩
20
x ⁻¹ ⁻¹ ∙ ε ≈⟨ refl ⟨ ∙-cong ⟩ sym (proj₁ inverse _) ⟩
21
x ⁻¹ ⁻¹ ∙ (x ⁻¹ ∙ x) ≈⟨ sym $ assoc _ _ _ ⟩
22
x ⁻¹ ⁻¹ ∙ x ⁻¹ ∙ x ≈⟨ proj₁ inverse _ ⟨ ∙-cong ⟩ refl ⟩
23
ε ∙ x ≈⟨ proj₁ identity _ ⟩
28
left-helper : ∀ x y → x ≈ (x ∙ y) ∙ y ⁻¹
29
left-helper x y = begin
30
x ≈⟨ sym (proj₂ identity x) ⟩
31
x ∙ ε ≈⟨ refl ⟨ ∙-cong ⟩ sym (proj₂ inverse y) ⟩
32
x ∙ (y ∙ y ⁻¹) ≈⟨ sym (assoc x y (y ⁻¹)) ⟩
35
right-helper : ∀ x y → y ≈ x ⁻¹ ∙ (x ∙ y)
36
right-helper x y = begin
37
y ≈⟨ sym (proj₁ identity y) ⟩
38
ε ∙ y ≈⟨ sym (proj₁ inverse x) ⟨ ∙-cong ⟩ refl ⟩
39
(x ⁻¹ ∙ x) ∙ y ≈⟨ assoc (x ⁻¹) x y ⟩
42
left-identity-unique : ∀ x y → x ∙ y ≈ y → x ≈ ε
43
left-identity-unique x y eq = begin
44
x ≈⟨ left-helper x y ⟩
45
(x ∙ y) ∙ y ⁻¹ ≈⟨ eq ⟨ ∙-cong ⟩ refl ⟩
46
y ∙ y ⁻¹ ≈⟨ proj₂ inverse y ⟩
49
right-identity-unique : ∀ x y → x ∙ y ≈ x → y ≈ ε
50
right-identity-unique x y eq = begin
51
y ≈⟨ right-helper x y ⟩
52
x ⁻¹ ∙ (x ∙ y) ≈⟨ refl ⟨ ∙-cong ⟩ eq ⟩
53
x ⁻¹ ∙ x ≈⟨ proj₁ inverse x ⟩
56
identity-unique : ∀ {x} → Identity x _∙_ → x ≈ ε
57
identity-unique {x} id = left-identity-unique x x (proj₂ id x)
59
left-inverse-unique : ∀ x y → x ∙ y ≈ ε → x ≈ y ⁻¹
60
left-inverse-unique x y eq = begin
61
x ≈⟨ left-helper x y ⟩
62
(x ∙ y) ∙ y ⁻¹ ≈⟨ eq ⟨ ∙-cong ⟩ refl ⟩
63
ε ∙ y ⁻¹ ≈⟨ proj₁ identity (y ⁻¹) ⟩
66
right-inverse-unique : ∀ x y → x ∙ y ≈ ε → y ≈ x ⁻¹
67
right-inverse-unique x y eq = begin
68
y ≈⟨ sym (⁻¹-involutive y) ⟩
69
y ⁻¹ ⁻¹ ≈⟨ ⁻¹-cong (sym (left-inverse-unique x y eq)) ⟩