agda-gset/Category/Construction/GroupAsCategory.agda

28 lines
979 B
Agda
Raw Normal View History

2024-05-05 14:43:35 +02:00
open import Categories.Category.Core
open import Algebra.Group
open import Data.Unit.Polymorphic
open import Relation.Binary.PropositionalEquality as using (_≡_)
module Category.Construction.GroupAsCategory {} (G : Group ) where
open Group G
GroupAsCategory : Category
GroupAsCategory = record
{ Obj =
; _⇒_ = λ _ _ Carrier
; _≈_ = _≡_
; id = ε
; _∘_ = _∙_
; assoc = assoc
; sym-assoc = ≡.sym assoc
; identityˡ = idˡ
; identityʳ = idʳ
; identity² = idˡ
; equiv = record
{ refl = ≡.refl
; sym = ≡.sym
; trans = ≡.trans
}
; ∘-resp-≈ = ∙-resp
}