Implement exponentials

This commit is contained in:
Frederik Hanghøj Iversen 2018-01-21 21:29:15 +01:00
parent 922570a5bd
commit 3fcdf828d8
2 changed files with 33 additions and 11 deletions

View file

@ -88,6 +88,13 @@ record Product { ' : Level} { : Category '} (A B : .Object)
proj₁ : .Arrow obj A proj₁ : .Arrow obj A
proj₂ : .Arrow obj B proj₂ : .Arrow obj B
{{isProduct}} : IsProduct proj₁ proj₂ {{isProduct}} : IsProduct proj₁ proj₂
arrowProduct : {X} (π₁ : Arrow X A) (π₂ : Arrow X B)
Arrow X obj
arrowProduct π₁ π₂ = fst (isProduct π₁ π₂)
record HasProducts { ' : Level} ( : Category ') : Set ( ') where
field
product : (A B : .Object) Product { = } A B
module _ { ' : Level} ( : Category ') where module _ { ' : Level} ( : Category ') where
Opposite : Category ' Opposite : Category '

View file

@ -49,17 +49,32 @@ epi-mono-is-not-iso f =
-} -}
module _ {a a' b b'} where module _ { '} ( : Category ') {{hasProducts : HasProducts }} (B C : .Category.Object) where
Exponential : Category a a' Category b b' Category {!!} {!!} open Category
Exponential A B = record open HasProducts hasProducts
{ Object = {!!} open Product
; Arrow = {!!} prod-obj : (A B : .Object) .Object
; 𝟙 = {!!} prod-obj A B = Product.obj (product A B)
; _⊕_ = {!!} -- The product mentioned in awodey in Def 6.1 is not the regular product of arrows.
; isCategory = {!!} -- It's a "parallel" product
} ×A : {A A' B B' : .Object} .Arrow A A' .Arrow B B'
.Arrow (prod-obj A B) (prod-obj A' B')
×A {A = A} {A' = A'} {B = B} {B' = B'} a b = arrowProduct (product A' B')
( ._⊕_ a ((product A B) .proj₁))
( ._⊕_ b ((product A B) .proj₂))
IsExponential : {Cᴮ : .Object} .Arrow (prod-obj Cᴮ B) C Set ( ')
IsExponential eval = (A : .Object) (f : .Arrow (prod-obj A B) C)
∃![ f~ ] ( ._⊕_ eval (×A f~ ( .𝟙)) f)
record Exponential : Set ( ') where
field
-- obj ≡ Cᴮ
obj : .Object
eval : .Arrow ( prod-obj obj B ) C
{{isExponential}} : IsExponential eval
_⇑_ = Exponential _⇑_ = Exponential
yoneda : { '} { : Category '} Functor (Sets (Opposite )) -- yoneda : ∀ { '} → { : Category '} → Functor (Sets ⇑ (Opposite ))
yoneda = {!!} -- yoneda = {!!}