module Cat.Diagram.Colimit.Coequaliser {o h} (C : Precategory o h) where
We establish the correspondence between Coequaliser
and the Colimit
of a parallel
arrows diagram.
is-coequaliser→is-colimit: ∀ {e} (F : Functor ·⇉· C) {coequ : Hom (F .F₀ true) e}
→ (coeq : is-coequaliser C (forkl F) (forkr F) coequ)
→ is-colimit {C = C} F e (Cofork→Cocone F (is-coequaliser.coequal coeq))
{e} F {coequ} is-coeq =
is-coequaliser→is-colimit λ where
to-is-colimitp mc {true} → refl
{false} → refl
where
module is-coeq = is-coequaliser is-coeq
open make-is-colimit
: make-is-colimit F e
mc .ψ true = coequ
mc .ψ false = coequ ∘ forkl F
mc .commutes {true} {true} tt = elimr (F .F-id)
mc .commutes {false} {true} true = sym (is-coeq .coequal)
mc .commutes {false} {true} false = refl
mc .commutes {false} {false} tt = elimr (F .F-id)
mc .universal eta p =
mc .universal (p {false} {true} false ∙ sym (p {false} {true} true))
is-coeq.factors {true} eta p =
mc .factors
is-coeq.factors {false} eta p =
mc .factors ∙ p {false} {true} false
pulll is-coeq.unique eta p other q =
mc .unique (q true)
is-coeq
is-colimit→is-coequaliser: ∀ (F : Functor ·⇉· C) {K : Functor ⊤Cat C}
→ {eta : F => K F∘ !F}
→ is-lan !F F K eta
→ is-coequaliser C (forkl F) (forkr F) (eta .η true)
{K} {eta} colim = co where
is-colimit→is-coequaliser F module colim = is-colimit colim
parallel: ∀ {x} → Hom (F .F₀ true) x
→ (j : Bool) → Hom (F .F₀ j) x
= e'
parallel e' true = e' ∘ forkl F
parallel e' false
parallel-commutes: ∀ {x} {e' : Hom (F .F₀ true) x}
→ e' ∘ forkl F ≡ e' ∘ forkr F
→ ∀ i j → (h : ·⇉· .Precategory.Hom i j)
→ parallel e' j ∘ F .F₁ {i} {j} h ≡ parallel e' i
= elimr (F .F-id)
parallel-commutes p true true tt = sym p
parallel-commutes p false true true = refl
parallel-commutes p false true false = elimr (F .F-id)
parallel-commutes p false false tt
: is-coequaliser C (forkl F) (forkr F) (eta .η true)
co .coequal =
co .is-natural false true false ∙ sym (eta .is-natural false true true)
eta .universal {e' = e'} p =
co .universal (parallel e') (λ {i} {j} h → parallel-commutes p i j h)
colim.factors = colim.factors {j = true} _ _
co .unique {p = p} {colim = other} q =
co .unique _ _ _ λ where
colim→ q
true →
false (other ∘_) (introl (K .F-id) ∙ sym (eta .is-natural false true true))
ap
·· pulll q
·· sym p
: ∀ {F : Functor ·⇉· C} → Coequaliser C (forkl F) (forkr F) → Colimit F
Coequaliser→Colimit {F = F} coeq = to-colimit (is-coequaliser→is-colimit F (has-is-coeq coeq))
Coequaliser→Colimit
: ∀ {a b} {f g : Hom a b} → Colimit {C = C} (Fork f g) → Coequaliser C f g
Colimit→Coequaliser .coapex = _
Colimit→Coequaliser colim .coeq = _
Colimit→Coequaliser colim {f = f} {g} colim .has-is-coeq =
Colimit→Coequaliser (Fork f g) (Colimit.has-colimit colim) is-colimit→is-coequaliser