Add type-synonyms in functor

This commit is contained in:
Frederik Hanghøj Iversen 2018-02-23 12:41:15 +01:00
parent a57f45d93f
commit 852056cc44
2 changed files with 11 additions and 5 deletions

View file

@ -16,7 +16,7 @@ open import Cat.Category.Exponential
open import Cat.Equality
open Equality.Data.Product
open Functor
open Functor using (func→ ; func*)
open Category using (Object ; 𝟙)
-- The category of categories

View file

@ -7,7 +7,7 @@ open import Function
open import Cat.Category
open Category hiding (_∘_ ; raw)
open Category hiding (_∘_ ; raw ; IsIdentity)
module _ {c c' d d'}
( : Category c c')
@ -23,12 +23,18 @@ module _ {c c' d d'}
func* : Object Object 𝔻
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
open RawFunctor F public
field
ident : {c : Object } func→ (𝟙 {c}) 𝟙 𝔻 {func* c}
distrib : {A B C : Object } {f : [ A , B ]} {g : [ B , C ]}
func→ ( [ g f ]) 𝔻 [ func→ g func→ f ]
ident : IsIdentity
distrib : IsDistributive
record Functor : Set (c c' d d') where
field