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

View file

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