agda-gset/Category/Construction/GroupAsCategory.agda

27 lines
979 B
Agda
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}