definition example theorem proof
The coequalizer of a parallel pair is the Colimit of the diagram : an object with a coequalizing morphism such that , universal: any with factors uniquely as .
Kittenlab’s definition: the coequalizer is a representing object for ; the proposition that a representative comes with a coequalizing morphism (corresponding to ) and conversely, is “much less data to lug around than a whole natural isomorphism”. “If coproducts allow you to add objects, coequalizers allow you to squish them.”
Sources: Kittenlab Lecture 9 (quotient group ), 11 (“Adding and squishing”: angles); DaoFP §9.5 (“Coequalizers”), Exercise 9.5.2; 7 Sketches §6.2.4 (finite colimits in ), §1.2.1 (Quotient Set); CTfS Definition 2.6.3.1, Exercises 2.6.3.2–2.6.3.3, 3.1.2.4, 3.3.1.10
Examples
- Angles (Kittenlab): a program taking an angle should agree on and ; the functor (functions of period ) is represented by , by (convenient for pendulums), and by the circle with . In all three are isomorphic; in only works, since “jumps” — the coequalizer depends on the category.
- In : where is the Equivalence Relation generated by ; ” is a copy of in which elements produced from the same have been identified” — bucketizing (DaoFP): coequalizing on pairs of integers of equal parity gives
Boolwithq n = even n, and any parity-onlyq'factors ash q' . q(DaoFP Exercise 9.5.2). - The clock (CTfS Exercises 2.6.3.2, 3.1.2.4): coequalizing gives the circle ; with it gives the clock face , and the universal property is exactly what makes “advance the clock by hours” a well-defined map — an action of the monoid on the clock (Monoid Action).
- Graphs (CTfS Exercise 3.3.1.10): a graph is a parallel pair ; its coequalizer is the set of connected components (its Equalizer is the set of loops).
- Quotient groups (Kittenlab Lecture 9): in , the coequalizer of the inclusion and the zero map is — “declaring by fiat every element of to be “.
- Matrices (Kittenlab Lecture 11): in , the coequalizer of is , with coequalizing matrix whose rows are an orthonormal basis of the orthogonal complement of the range of : , and any with factors through .
- A Pushout is a coequalizer of the two injections into a coproduct; every Colimit is a coequalizer of coproducts.
Docs: FinSets · Limits & colimits — Kittenlab Lecture 9, Lecture 11
using Catlab
p = FinFunction([1, 3], 4); q = FinFunction([2, 3], 4) # identify 1~2 (and 3~3)
C = coequalizer(p, q)
apex(C), collect(proj(C)) # FinSet(3), [1, 1, 2, 3]
# Kittenlab Lecture 11: the coequalizer of M and 0 in Mat via an orthonormal complement
using LinearAlgebra
function coequalizer_mat(M)
m, k = size(M, 1), rank(M)
Q = Matrix(qr(hcat(M, Matrix{Float64}(I, m, m))).Q) # extend an orthonormal basis of range(M)
Q[:, k+1:m]' # rows v_{k+1}..v_m
end
M = [1.0 0; 0 0; 1 0]; E = coequalizer_mat(M); norm(E * M) < 1e-12 # true#check CategoryTheory.Limits.coequalizer -- coequalizer f g with coequalizer.π and coequalizer.desc
#check CategoryTheory.Limits.coequalizer.condition
#check CategoryTheory.Limits.Types.coequalizerIso -- a quotient by the generated relation-- DaoFP §9.5: coequalizing fst, snd on same-parity pairs gives Bool
q :: Int -> Bool
q n = n `mod` 2 == 0
h :: (Int -> a) -> Bool -> a -- the unique factorization of a parity-only q'
h q' True = q' 0
h q' False = q' 1
-- for q' insensitive to the pair components: h q' . q == q'