module Cat.Diagram.Coequaliser where
Coequalisersπ
The coequaliser of two maps (if it exists), represents the largest quotient object of that identifies and
record is-coequaliser {E} (f g : Hom A B) (coeq : Hom B E) : Type (o β β) where
field
: coeq β f β‘ coeq β g
coequal : β {F} {e' : Hom B F} (p : e' β f β‘ e' β g) β Hom E F
universal : β {F} {e' : Hom B F} {p : e' β f β‘ e' β g}
factors β universal p β coeq β‘ e'
: β {F} {e' : Hom B F} {p : e' β f β‘ e' β g} {colim : Hom E F}
unique β colim β coeq β‘ e'
β colim β‘ universal p
uniqueβ: β {F} {e' : Hom B F} {o1 o2 : Hom E F}
β (e' β f β‘ e' β g)
β o1 β coeq β‘ e'
β o2 β coeq β‘ e'
β o1 β‘ o2
= unique {p = p} q β sym (unique r)
uniqueβ p q r
: id β‘ universal coequal
id-coequalise = unique (idl _) id-coequalise
There is also a convenient bundling of an coequalising arrow together with its codomain:
record Coequaliser (f g : Hom A B) : Type (o β β) where
field
{coapex} : Ob
: Hom B coapex
coeq : is-coequaliser f g coeq
has-is-coeq
open is-coequaliser has-is-coeq public
Coequalisers are epicπ
Dually to the situation with equalisers, coequaliser arrows are always epic.
is-coequaliserβis-epic: β {E} (coequ : Hom A E)
β is-coequaliser C f g coequ
β is-epic coequ
{f = f} {g = g} equ equalises h i p =
is-coequaliserβis-epic
h β‘β¨ unique p β©(extendr coequal) β‘Λβ¨ unique refl β©
universal
i βwhere open is-coequaliser equalises
coequaliser-unique: β {E E'} {c1 : Hom A E} {c2 : Hom A E'}
β is-coequaliser C f g c1
β is-coequaliser C f g c2
β E β
E'
{c1 = c1} {c2} co1 co2 =
coequaliser-unique
make-iso(co1 .universal {e' = c2} (co2 .coequal))
(co2 .universal {e' = c1} (co1 .coequal))
(uniqueβ co2 (co2 .coequal) (pullr (co2 .factors) β co1 .factors) (idl _))
(uniqueβ co1 (co1 .coequal) (pullr (co1 .factors) β co2 .factors) (idl _))
where open is-coequaliser
Categories with all coequalisersπ
We also define a helper module for working with categories that have coequalisers of all parallel pairs of morphisms.
: β {o β} β Precategory o β β Type _
has-coequalisers = β {a b} (f g : Hom a b) β Coequaliser C f g
has-coequalisers C where open Precategory C
module Coequalisers
{o β}
(C : Precategory o β)
(all-coequalisers : has-coequalisers C)
where
open Cat.Reasoning C
module coequaliser {a b} (f g : Hom a b) = Coequaliser (all-coequalisers f g)
: β {a b} (f g : Hom a b) β Ob
Coequ = coequaliser.coapex Coequ