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} {other : Hom E F}
unique → other ∘ coeq ≡ e'
→ other ≡ 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
coequ : is-coequaliser f g coequ
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 record for working with categories that have coequalisers of all parallel pairs of morphisms.
record Coequalisers {o ℓ} (C : Precategory o ℓ) : Type (o ⊔ ℓ) where
no-eta-equality
open Cat.Reasoning C
field
: ∀ {X Y} → Hom X Y → Hom X Y → Ob
Coequ : ∀ {X Y} → (f g : Hom X Y) → Hom Y (Coequ f g)
coequ : ∀ {X Y} {f g : Hom X Y} → coequ f g ∘ f ≡ coequ f g ∘ g
coequal
coequalise: ∀ {E X Y} {f g : Hom X Y}
→ (e' : Hom Y E)
→ e' ∘ f ≡ e' ∘ g
→ Hom (Coequ f g) E
coequalise∘coequ: ∀ {E X Y} {f g : Hom X Y}
→ {e : Hom Y E} {p : e ∘ f ≡ e ∘ g}
→ coequalise e p ∘ coequ f g ≡ e
coequalise-unique: ∀ {E X Y} {f g : Hom X Y}
→ {e : Hom Y E} {p : e ∘ f ≡ e ∘ g}
→ {other : Hom (Coequ f g) E}
→ other ∘ coequ f g ≡ e
→ other ≡ coequalise e p