Add the category of sets

This commit is contained in:
Frederik Hanghøj Iversen 2017-11-15 21:51:10 +01:00
parent fa5d380ee2
commit 6ca9368891

34
src/Category/Sets.agda Normal file
View file

@ -0,0 +1,34 @@
module Category.Sets where
open import Cubical.PathPrelude
open import Agda.Primitive
open import Category
-- Sets are built-in to Agda. The set of all small sets is called Set.
Fun : { : Level} ( T U : Set ) Set
Fun T U = T U
Sets : { : Level} Category {lsuc } {}
Sets {} = record
{ Object = Set
; Arrow = λ T U Fun {} T U
; 𝟙 = λ x x
; _⊕_ = λ g f x g ( f x )
; assoc = refl
; ident = funExt (λ x refl) , funExt (λ x refl)
}
module _ { ' : Level} { : Category {} {}} where
private
C-Obj = Object
_+_ = Arrow
RepFunctor : Functor Sets
RepFunctor =
record
{ F = λ A (B : C-Obj) Hom { = } A B
; f = λ { {c' = c'} f g {!HomFromArrow { = } c' g!}}
; ident = {!!}
; distrib = {!!}
}