Add type-synonyms in functor
This commit is contained in:
parent
a57f45d93f
commit
852056cc44
|
@ -16,7 +16,7 @@ open import Cat.Category.Exponential
|
||||||
open import Cat.Equality
|
open import Cat.Equality
|
||||||
open Equality.Data.Product
|
open Equality.Data.Product
|
||||||
|
|
||||||
open Functor
|
open Functor using (func→ ; func*)
|
||||||
open Category using (Object ; 𝟙)
|
open Category using (Object ; 𝟙)
|
||||||
|
|
||||||
-- The category of categories
|
-- The category of categories
|
||||||
|
|
|
@ -7,7 +7,7 @@ open import Function
|
||||||
|
|
||||||
open import Cat.Category
|
open import Cat.Category
|
||||||
|
|
||||||
open Category hiding (_∘_ ; raw)
|
open Category hiding (_∘_ ; raw ; IsIdentity)
|
||||||
|
|
||||||
module _ {ℓc ℓc' ℓd ℓd'}
|
module _ {ℓc ℓc' ℓd ℓd'}
|
||||||
(ℂ : Category ℓc ℓc')
|
(ℂ : Category ℓc ℓc')
|
||||||
|
@ -23,12 +23,18 @@ module _ {ℓc ℓc' ℓd ℓd'}
|
||||||
func* : Object ℂ → Object 𝔻
|
func* : Object ℂ → Object 𝔻
|
||||||
func→ : ∀ {A B} → ℂ [ A , B ] → 𝔻 [ func* A , func* B ]
|
func→ : ∀ {A B} → ℂ [ A , B ] → 𝔻 [ func* A , func* B ]
|
||||||
|
|
||||||
|
IsIdentity : Set _
|
||||||
|
IsIdentity = {A : Object ℂ} → func→ (𝟙 ℂ {A}) ≡ 𝟙 𝔻 {func* A}
|
||||||
|
|
||||||
|
IsDistributive : Set _
|
||||||
|
IsDistributive = {A B C : Object ℂ} {f : ℂ [ A , B ]} {g : ℂ [ B , C ]}
|
||||||
|
→ func→ (ℂ [ g ∘ f ]) ≡ 𝔻 [ func→ g ∘ func→ f ]
|
||||||
|
|
||||||
record IsFunctor (F : RawFunctor) : 𝓤 where
|
record IsFunctor (F : RawFunctor) : 𝓤 where
|
||||||
open RawFunctor F public
|
open RawFunctor F public
|
||||||
field
|
field
|
||||||
ident : {c : Object ℂ} → func→ (𝟙 ℂ {c}) ≡ 𝟙 𝔻 {func* c}
|
ident : IsIdentity
|
||||||
distrib : {A B C : Object ℂ} {f : ℂ [ A , B ]} {g : ℂ [ B , C ]}
|
distrib : IsDistributive
|
||||||
→ func→ (ℂ [ g ∘ f ]) ≡ 𝔻 [ func→ g ∘ func→ f ]
|
|
||||||
|
|
||||||
record Functor : Set (ℓc ⊔ ℓc' ⊔ ℓd ⊔ ℓd') where
|
record Functor : Set (ℓc ⊔ ℓc' ⊔ ℓd ⊔ ℓd') where
|
||||||
field
|
field
|
||||||
|
|
Loading…
Reference in a new issue