27 lines
979 B
Agda
27 lines
979 B
Agda
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
|
||
}
|