Make argument to presheaf explicit

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-05 11:17:31 +01:00
parent 059c74b687
commit 5c3616bca5
2 changed files with 14 additions and 17 deletions

View file

@ -80,19 +80,20 @@ module _ { : Level} where
SetsHasProducts : HasProducts 𝓢 SetsHasProducts : HasProducts 𝓢
SetsHasProducts = record { product = product } SetsHasProducts = record { product = product }
module _ {a b : Level} where module _ {a b : Level} ( : Category a b) where
module _ ( : Category a b) where -- Covariant Presheaf
-- Covariant Presheaf Representable : Set (a lsuc b)
Representable : Set (a lsuc b) Representable = Functor (𝓢𝓮𝓽 b)
Representable = Functor (𝓢𝓮𝓽 b)
-- Contravariant Presheaf -- Contravariant Presheaf
Presheaf : Set (a lsuc b) Presheaf : Set (a lsuc b)
Presheaf = Functor (opposite ) (𝓢𝓮𝓽 b) Presheaf = Functor (opposite ) (𝓢𝓮𝓽 b)
open Category
-- The "co-yoneda" embedding. -- The "co-yoneda" embedding.
representable : { : Category a b} Category.Object Representable representable : Category.Object Representable
representable { = } A = record representable A = record
{ raw = record { raw = record
{ func* = λ B [ A , B ] , arrowsAreSets { func* = λ B [ A , B ] , arrowsAreSets
; func→ = [_∘_] ; func→ = [_∘_]
@ -102,12 +103,10 @@ module _ {a b : Level} where
; isDistributive = funExt λ x sym isAssociative ; isDistributive = funExt λ x sym isAssociative
} }
} }
where
open Category
-- Alternate name: `yoneda` -- Alternate name: `yoneda`
presheaf : { : Category a b} Category.Object (opposite ) Presheaf presheaf : Category.Object (opposite ) Presheaf
presheaf { = } B = record presheaf B = record
{ raw = record { raw = record
{ func* = λ A [ A , B ] , arrowsAreSets { func* = λ A [ A , B ] , arrowsAreSets
; func→ = λ f g [ g f ] ; func→ = λ f g [ g f ]
@ -117,5 +116,3 @@ module _ {a b : Level} where
; isDistributive = funExt λ x isAssociative ; isDistributive = funExt λ x isAssociative
} }
} }
where
open Category

View file

@ -26,7 +26,7 @@ module _ { : Level} { : Category } (unprovable : IsCategory (RawCat
open Fun (opposite ) 𝓢 open Fun (opposite ) 𝓢
Cat : Category _ _ Cat : Category _ _
Cat = Cat.Cat unprovable Cat = Cat.Cat unprovable
prshf = presheaf { = } prshf = presheaf
module = Category module = Category
_⇑_ : (A B : Category.Object Cat) Category.Object Cat _⇑_ : (A B : Category.Object Cat) Category.Object Cat