Implement representable functors

This commit is contained in:
Frederik Hanghøj Iversen 2018-01-17 12:10:18 +01:00
parent 7090c2c6bf
commit 902b953ad0
2 changed files with 10 additions and 24 deletions

View file

@ -25,22 +25,8 @@ Sets {} = record
; ident = funExt (λ x refl) , funExt (λ x refl) ; ident = funExt (λ x refl) , funExt (λ x refl)
} }
module _ { ' : Level} { : Category {} {}} where representable : { ' : Level} { : Category {} {'}} Category.Object Functor (Sets {'})
private representable { = } A = record
C-Obj = Object
_+_ = Arrow
RepFunctor : Functor Sets
RepFunctor =
record
{ func* = λ A (B : C-Obj) Hom { = } A B
; func→ = λ { {c} {c'} f g {!HomFromArrow { = {!!}} c' g!} }
; ident = {!!}
; distrib = {!!}
}
Hom0 : { ' : Level} { : Category {} {'}} Category.Object Functor (Sets {'})
Hom0 { = } A = record
{ func* = λ B .Arrow A B { func* = λ B .Arrow A B
; func→ = λ f g f .⊕ g ; func→ = λ f g f .⊕ g
; ident = funExt λ _ snd .ident ; ident = funExt λ _ snd .ident
@ -49,12 +35,12 @@ Hom0 { = } A = record
where where
open module = Category open module = Category
Hom1 : { ' : Level} { : Category {} {'}} Category.Object Functor (Opposite ) (Sets {'}) coRepresentable : { ' : Level} { : Category {} {'}} Category.Object (Opposite ) Functor (Opposite ) (Sets {'})
Hom1 { = } B = record coRepresentable { = } B = record
{ func* = λ A .Arrow A B { func* = λ A .Arrow A B
; func→ = λ f g {!!} .⊕ {!!} ; func→ = λ f g g .⊕ f
; ident = {!!} ; ident = funExt λ x fst .ident
; distrib = {!!} ; distrib = funExt λ x .assoc
} }
where where
open module = Category open module = Category

View file

@ -128,8 +128,8 @@ Opposite =
where where
open module = Category open module = Category
Hom : { ' : Level} { : Category {} {'}} (A B : Object ) Set ' Hom : { ' : Level} ( : Category {} {'}) (A B : Object ) Set '
Hom { = } A B = Arrow A B Hom A B = Arrow A B
module _ { ' : Level} { : Category {} {'}} where module _ { ' : Level} { : Category {} {'}} where
private private
@ -138,5 +138,5 @@ module _ { ' : Level} { : Category {} {'}} where
_+_ = _⊕_ _+_ = _⊕_
HomFromArrow : (A : Obj) {B B' : Obj} (g : Arr B B') HomFromArrow : (A : Obj) {B B' : Obj} (g : Arr B B')
Hom { = } A B Hom { = } A B' Hom A B Hom A B'
HomFromArrow _A g = λ f g + f HomFromArrow _A g = λ f g + f