Anna Williams 29 January 2026
\begin{code}
{-# OPTIONS --safe --without-K #-}
open import MLTT.Spartan hiding (id)
open import Categories.Wild
module Categories.Notation.Wild where
\end{code}
We define an object notation such that we can write obj W, obj P and obj C where
W, P and C are wild categories, precategories and categories respectively.
This works similarly to the method used in Notation.UnderlyingType.
\begin{code}
record OBJ {๐ค} {๐ฅ} (A : ๐ค ฬ ) (B : ๐ฅ ฬ ) : ๐ค โ ๐ฅ โบ ฬ where
field
obj : A โ B
open OBJ {{...}} public
instance
wildcatobj : {๐ค ๐ฅ : Universe} โ OBJ (WildCategory ๐ค ๐ฅ) (๐ค ฬ )
obj {{wildcatobj}} = WildCategory.obj
\end{code}
We now define some notation for categories. This way, if we are working with
wild categories C and D. We can simply write "open WildCategoryNotation C" and
"open WildCategoryNotation D" to have all operations available.
This works similarly to Notation.UnderlyingType, where we define records for
each different field. We then define instances of each of the fields we want
specific to the wild category used as input.
\begin{code}
module _ {๐ค ๐ฅ : Universe} (W : WildCategory ๐ค ๐ฅ) where
record HOM : ๐ฅ โบ โ ๐ค ฬ where
field
hom : obj W โ obj W โ ๐ฅ ฬ
open HOM {{...}} public
instance
defnhom : HOM
hom {{defnhom}} = WildCategory.hom W
record ID : ๐ฅ โบ โ ๐ค ฬ where
field
๐๐
: {a : obj W} โ hom a a
open ID {{...}} public
instance
defnid : ID
๐๐
{{defnid}} = WildCategory.๐๐
W
record COMP : ๐ค โ ๐ฅ ฬ where
field
_โ_ : {a b c : obj W}
โ hom b c
โ hom a b
โ hom a c
open COMP {{...}} public
instance
comp : COMP
_โ_ {{comp}} = WildCategory._โ_ W
record CATNotation : ๐ฅ โบ โ ๐ค ฬ where
field
๐๐
-is-left-neutral : {a b : obj W} (f : hom a b)
โ ๐๐
โ f ๏ผ f
๐๐
-is-right-neutral : {a b : obj W} (f : hom a b)
โ f โ ๐๐
๏ผ f
assoc : {a b c d : obj W}
(f : hom a b)
(g : hom b c)
(h : hom c d)
โ h โ (g โ f) ๏ผ (h โ g) โ f
inverse : {a b : obj W} (f : hom a b) โ ๐ฅ ฬ
โ_โ : {a b : obj W}
{f : hom a b}
โ inverse f
โ hom b a
at-most-one-inverse : {a b : obj W}
{f : hom a b}
(๐ ๐ : inverse f)
โ โ ๐ โ ๏ผ โ ๐ โ
โ_โ-is-left-inverse : {a b : obj W}
{f : hom a b}
(๐โปยน : inverse f)
โ โ ๐โปยน โ โ f ๏ผ ๐๐
โ_โ-is-right-inverse : {a b : obj W}
{f : hom a b}
(๐โปยน : inverse f)
โ f โ โ ๐โปยน โ ๏ผ ๐๐
_โ
_ : (a b : obj W) โ ๐ฅ ฬ
โ_โ : {a b : obj W}
โ a โ
b
โ hom a b
underlying-morphism-is-isomorphism : {a b : obj W}
(f : a โ
b)
โ ฮฃ fโปยน ๊ hom b a
, (fโปยน โ โ f โ ๏ผ ๐๐
)
ร (โ f โ โ fโปยน ๏ผ ๐๐
)
id-to-iso : (a b : obj W)
โ a ๏ผ b
โ a โ
b
open CATNotation {{...}} public
module WildCategoryNotation {๐ค ๐ฅ : Universe} (W : WildCategory ๐ค ๐ฅ) where
instance
wildcathomnotation : HOM W
hom {{wildcathomnotation}} = WildCategory.hom W
wildcatidnotation : ID W
๐๐
{{wildcatidnotation}} = WildCategory.๐๐
W
wildcatcompnotation : COMP W
_โ_ {{wildcatcompnotation}} = WildCategory._โ_ W
wildcatnotation : CATNotation W
๐๐
-is-left-neutral {{wildcatnotation}} = WildCategory.๐๐
-is-left-neutral W
๐๐
-is-right-neutral {{wildcatnotation}} = WildCategory.๐๐
-is-right-neutral W
assoc {{wildcatnotation}} = WildCategory.assoc W
inverse {{wildcatnotation}} = WildCategory.inverse W
โ_โ {{wildcatnotation}} = WildCategory.โ_โ W
โ_โ-is-left-inverse {{wildcatnotation}} = WildCategory.โ_โ-is-left-inverse W
โ_โ-is-right-inverse {{wildcatnotation}} = WildCategory.โ_โ-is-right-inverse W
at-most-one-inverse {{wildcatnotation}} = WildCategory.at-most-one-inverse W
_โ
_ {{wildcatnotation}} = WildCategory._โ
_ W
โ_โ {{wildcatnotation}} = WildCategory.โ_โ W
underlying-morphism-is-isomorphism {{wildcatnotation}} = WildCategory.underlying-morphism-is-isomorphism W
id-to-iso {{wildcatnotation}} = WildCategory.id-to-iso W
\end{code}