Implement category of presheaves

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-05 14:50:53 +01:00
parent ce4dd83969
commit bb379fa196

View file

@ -62,9 +62,7 @@ module Fun {c c' d d' : Level} ( : Category c c') (𝔻 : C
_h⊕g_ = NT[_∘_] {B} {C} {D} _h⊕g_ = NT[_∘_] {B} {C} {D}
:isAssociative: : L R :isAssociative: : L R
:isAssociative: = lemSig (naturalIsProp {F = A} {D}) :isAssociative: = lemSig (naturalIsProp {F = A} {D})
L R (funExt (λ x isAssociative)) L R (funExt (λ x 𝔻.isAssociative))
where
open Category 𝔻
private private
module _ {A B : Functor 𝔻} {f : NaturalTransformation A B} where module _ {A B : Functor 𝔻} {f : NaturalTransformation A B} where
@ -107,14 +105,22 @@ module Fun {c c' d d' : Level} ( : Category c c') (𝔻 : C
Category.raw Fun = RawFun Category.raw Fun = RawFun
module _ { ' : Level} ( : Category ') where module _ { ' : Level} ( : Category ') where
private
open import Cat.Categories.Sets open import Cat.Categories.Sets
open NaturalTransformation (opposite ) (𝓢𝓮𝓽 ') open NaturalTransformation (opposite ) (𝓢𝓮𝓽 ')
-- Restrict the functors to Presheafs. -- Restrict the functors to Presheafs.
RawPresh : RawCategory ( lsuc ') ( ') rawPresh : RawCategory ( lsuc ') ( ')
RawPresh = record rawPresh = record
{ Object = Presheaf { Object = Presheaf
; Arrow = NaturalTransformation ; Arrow = NaturalTransformation
; 𝟙 = λ {F} identity F ; 𝟙 = λ {F} identity F
; _∘_ = λ {F G H} NT[_∘_] {F = F} {G = G} {H = H} ; _∘_ = λ {F G H} NT[_∘_] {F = F} {G = G} {H = H}
} }
instance
isCategory : IsCategory rawPresh
isCategory = Fun.:isCategory: _ _
Presh : Category ( lsuc ') ( ')
Category.raw Presh = rawPresh
Category.isCategory Presh = isCategory