module Algebra.Group.Ab where
Abelian groups🔗
A very important class of groups (which includes most familiar examples of groups: the integers, all finite cyclic groups, etc) are those with a commutative group operation, that is, those for which . Accordingly, these have a name reflecting their importance and ubiquity: They are called commutative groups. Just kidding! They’re named abelian groups, named after a person, because nothing can have self-explicative names in mathematics. It’s the law.
This module does the usual algebraic structure dance to set up the category of Abelian groups.
record is-abelian-group (_*_ : G → G → G) : Type (level-of G) where
no-eta-equality
field
: is-group _*_
has-is-group : ∀ {x y} → x * y ≡ y * x
commutes open is-group has-is-group renaming (unit to 1g) public
record Abelian-group-on (T : Type ℓ) : Type ℓ where
no-eta-equality
field
_*_ : T → T → T
: is-abelian-group _*_
has-is-ab open is-abelian-group has-is-ab renaming (inverse to infixl 30 _⁻¹) public
: ∀ ℓ → Thin-structure ℓ Abelian-group-on
Abelian-group-structure .is-hom f G₁ G₂ ∣ =
∣ Abelian-group-structure ℓ (Abelian→Group-on G₁) (Abelian→Group-on G₂) f
is-group-hom .is-hom f G₁ G₂ .is-tr = hlevel 1
Abelian-group-structure ℓ .id-is-hom .is-group-hom.pres-⋆ x y = refl
Abelian-group-structure ℓ .∘-is-hom f g α β .is-group-hom.pres-⋆ x y =
Abelian-group-structure ℓ (β .is-group-hom.pres-⋆ x y) ∙ α .is-group-hom.pres-⋆ (g x) (g y)
ap f .id-hom-unique {s = s} {t} α _ = p where
Abelian-group-structure ℓ open Abelian-group-on
: s ≡ t
p ._*_ x y = α .is-group-hom.pres-⋆ x y i
p i .has-is-ab = is-prop→pathp
p i (λ i → hlevel {T = is-abelian-group (λ x y → p i ._*_ x y)} 1)
(s .has-is-ab) (t .has-is-ab) i
: ∀ ℓ → Precategory (lsuc ℓ) ℓ
Ab = Structured-objects (Abelian-group-structure ℓ)
Ab ℓ
module Ab {ℓ} = Cat.Reasoning (Ab ℓ)
The fundamental example of abelian group is the integers, , under addition. A type-theoretic interjection is necessary: the integers live on the zeroth universe, so to have an -sized group of integers, we must lift it.
: ∀ {ℓ} → Abelian-group ℓ
ℤ-ab = to-ab mk-ℤ where
ℤ-ab open make-abelian-group
: make-abelian-group (Lift _ Int)
mk-ℤ .ab-is-set = hlevel 2
mk-ℤ .mul (lift x) (lift y) = lift (x +ℤ y)
mk-ℤ .inv (lift x) = lift (negate x)
mk-ℤ .1g = lift 0
mk-ℤ .idl (lift x) = ap lift (+ℤ-zerol x)
mk-ℤ .assoc (lift x) (lift y) (lift z) = ap lift (+ℤ-associative x y z)
mk-ℤ .invl (lift x) = ap lift (+ℤ-inversel x)
mk-ℤ .comm (lift x) (lift y) = ap lift (+ℤ-commutative x y) mk-ℤ