2018-02-05 13:59:53 +00:00
|
|
|
|
module Cat.Category.Exponential where
|
2018-02-05 13:08:30 +00:00
|
|
|
|
|
2018-03-21 13:39:56 +00:00
|
|
|
|
open import Cat.Prelude hiding (_×_)
|
2018-02-05 13:08:30 +00:00
|
|
|
|
|
|
|
|
|
open import Cat.Category
|
2018-02-05 13:59:53 +00:00
|
|
|
|
open import Cat.Category.Product
|
2018-02-05 13:08:30 +00:00
|
|
|
|
|
|
|
|
|
module _ {ℓ ℓ'} (ℂ : Category ℓ ℓ') {{hasProducts : HasProducts ℂ}} where
|
2018-03-05 12:52:41 +00:00
|
|
|
|
open Category ℂ
|
|
|
|
|
open HasProducts hasProducts public
|
|
|
|
|
|
|
|
|
|
module _ (B C : Object) where
|
|
|
|
|
record IsExponential'
|
|
|
|
|
(Cᴮ : Object)
|
|
|
|
|
(eval : ℂ [ Cᴮ × B , C ]) : Set (ℓ ⊔ ℓ') where
|
|
|
|
|
field
|
|
|
|
|
uniq
|
|
|
|
|
: ∀ (A : Object) (f : ℂ [ A × B , C ])
|
|
|
|
|
→ ∃![ f~ ] (ℂ [ eval ∘ f~ |×| Category.𝟙 ℂ ] ≡ f)
|
|
|
|
|
|
|
|
|
|
IsExponential : (Cᴮ : Object) → ℂ [ Cᴮ × B , C ] → Set (ℓ ⊔ ℓ')
|
|
|
|
|
IsExponential Cᴮ eval = ∀ (A : Object) (f : ℂ [ A × B , C ])
|
2018-02-05 15:35:33 +00:00
|
|
|
|
→ ∃![ f~ ] (ℂ [ eval ∘ f~ |×| Category.𝟙 ℂ ] ≡ f)
|
2018-02-05 13:08:30 +00:00
|
|
|
|
|
|
|
|
|
record Exponential : Set (ℓ ⊔ ℓ') where
|
|
|
|
|
field
|
|
|
|
|
-- obj ≡ Cᴮ
|
2018-03-05 12:52:41 +00:00
|
|
|
|
obj : Object
|
|
|
|
|
eval : ℂ [ obj × B , C ]
|
2018-02-05 13:08:30 +00:00
|
|
|
|
{{isExponential}} : IsExponential obj eval
|
2018-03-05 12:52:41 +00:00
|
|
|
|
|
|
|
|
|
transpose : (A : Object) → ℂ [ A × B , C ] → ℂ [ A , obj ]
|
2018-02-05 13:08:30 +00:00
|
|
|
|
transpose A f = proj₁ (isExponential A f)
|
|
|
|
|
|
|
|
|
|
record HasExponentials {ℓ ℓ' : Level} (ℂ : Category ℓ ℓ') {{_ : HasProducts ℂ}} : Set (ℓ ⊔ ℓ') where
|
2018-03-05 12:52:41 +00:00
|
|
|
|
open Category ℂ
|
2018-02-23 09:53:11 +00:00
|
|
|
|
open Exponential public
|
2018-02-05 13:08:30 +00:00
|
|
|
|
field
|
2018-03-05 12:52:41 +00:00
|
|
|
|
exponent : (A B : Object) → Exponential ℂ A B
|
|
|
|
|
|
|
|
|
|
_⇑_ : (A B : Object) → Object
|
|
|
|
|
A ⇑ B = (exponent A B) .obj
|