module Algebra.Group.Cat.Base where
private variable
: Level
β open Cat.Displayed.Univalence.Thin public
open Functor
import Cat.Reasoning as CR
The category of groupsπ
The category of groups, as the name implies, has its objects the
Groups
, with the
morphisms between them the group homomorphisms
.
open Group-on
open is-group-hom
: β β β Thin-structure β Group-on
Group-structure .is-hom f G G' = el! (is-group-hom G G' f)
Group-structure β
.id-is-hom .pres-β x y = refl
Group-structure β .β-is-hom f g Ξ± Ξ² .pres-β x y =
Group-structure β (Ξ² .pres-β x y) β Ξ± .pres-β _ _
ap f
.id-hom-unique {s = s} {t = t} Ξ± Ξ² i =
Group-structure β record
{ _β_ = Ξ» x y β Ξ± .pres-β x y i
; has-is-group =
(Ξ» i β is-group-is-prop {_*_ = Ξ» x y β Ξ± .pres-β x y i})
is-propβpathp (s .has-is-group)
(t .has-is-group)
i}
: β β β Precategory (lsuc β) β
Groups = Structured-objects (Group-structure β)
Groups β
: β {β} β is-category (Groups β)
Groups-is-category = Structured-objects-is-category (Group-structure _)
Groups-is-category
instance
: β {β} β is-equational (Group-structure β)
Groups-equational .is-equational.invert-id-hom x .pres-β a b = sym (x .pres-β a b)
Groups-equational
module Groups {β} = Cat (Groups β)
: β β β Type (lsuc β)
Group _ = Groups.Ob
Group
: β {β} {A : Type β} β make-group A β Group β
to-group {A = A} mg = el A (mg .make-group.group-is-set) , (to-group-on mg) to-group
: β {β} β' β Group β β Group (β β β')
LiftGroup {β} β' G = G' where
LiftGroup module G = Group-on (G .snd)
open is-group
open is-monoid
open is-semigroup
open is-magma
: Group (β β β')
G' .fst = el! (Lift β' β G β)
G' .snd ._β_ (lift x) (lift y) = lift (x G.β y)
G' .snd .has-is-group .unit = lift G.unit
G' .snd .has-is-group .inverse (lift x) = lift (G.inverse x)
G' .snd .has-is-group .has-is-monoid .has-is-semigroup .has-is-magma .has-is-set = hlevel 2
G' .snd .has-is-group .has-is-monoid .has-is-semigroup .associative = ap lift G.associative
G' .snd .has-is-group .has-is-monoid .idl = ap lift G.idl
G' .snd .has-is-group .has-is-monoid .idr = ap lift G.idr
G' .snd .has-is-group .inversel = ap lift G.inversel
G' .snd .has-is-group .inverser = ap lift G.inverser
G'
: β {β} (G : Group β) β Groups.Hom G (LiftGroup lzero G)
GβLiftG .hom = lift
GβLiftG G .preserves .pres-β _ _ = refl GβLiftG G
The underlying setπ
The category of groups admits a faithful
functor into the category of
sets, written
which projects out the underlying set of the group. Faithfulness of this
functor says, in more specific words, that equality of group
homomorphisms can be tested by comparing the underlying morphisms of
sets.
: Functor (Groups β) (Sets β)
GrpβͺSets = Forget-structure (Group-structure _)
GrpβͺSets
: is-faithful (GrpβͺSets {β})
GrpβͺSets-is-faithful = Structured-hom-path (Group-structure _) GrpβͺSets-is-faithful