From 6ca9368891f8a4da36753b40efa77ef14c5efd74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Hangh=C3=B8j=20Iversen?= Date: Wed, 15 Nov 2017 21:51:10 +0100 Subject: [PATCH] Add the category of sets --- src/Category/Sets.agda | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/Category/Sets.agda diff --git a/src/Category/Sets.agda b/src/Category/Sets.agda new file mode 100644 index 0000000..fb2c332 --- /dev/null +++ b/src/Category/Sets.agda @@ -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 = {!!} + }