Anna Williams 3 February 2026
Notation for working with functors.
\begin{code}
{-# OPTIONS --safe --without-K #-}
open import MLTT.Spartan
open import Categories.Wild
open import Categories.Functor
open import Categories.Notation.Wild
module Categories.Notation.Functor where
\end{code}
We define some functor notation in the style of category notation. To
use this for some functor F, we write
`open FunctorNotation F renaming (functor-map to F')`
where F' is the name we want to use for the functor.
\begin{code}
record FUNCTORMAP {đ¤ đĽ : Universe} (A : đ¤ Ě ) (B : đĽ Ě ) : đ¤ â đĽ Ě where
field
gen-functor-map : A â B
open FUNCTORMAP {{...}} public
record FUNNOTATION {A : WildCategory đ¤ đĽ}
{B : WildCategory đŚ đŁ}
(F : Functor A B)
: đ¤ â đĽ â đŁ Ě where
open WildCategoryNotation A
open WildCategoryNotation B
field
id-preserved : (a : obj A) â Functor.Fâ F {a} đđ
ďź đđ
distributivity : {a b c : obj A}
(g : hom b c)
(f : hom a b)
â Functor.Fâ F (g â f)
ďź Functor.Fâ F g â Functor.Fâ F f
open FUNNOTATION {{...}} public
module FunctorNotation {A : WildCategory đ¤ đĽ}
{B : WildCategory đŚ đŁ}
(F : Functor A B) where
open WildCategoryNotation A
open WildCategoryNotation B
functor-map = gen-functor-map
instance
fobj : FUNCTORMAP (obj A) (obj B)
gen-functor-map {{fobj}} = Functor.Fâ F
instance
fhom : {a b : obj A}
â FUNCTORMAP (hom a b) (hom (functor-map a) (functor-map b))
gen-functor-map {{fhom}} = Functor.Fâ F
instance
functor-notation : FUNNOTATION F
id-preserved {{functor-notation}} = Functor.id-preserved F
distributivity {{functor-notation}} = Functor.distributivity F
\end{code}