Last time, we stopped with the first isomorphism theorem for groups. In this entry, we will encounter some categorification of set-and-function stuff.
0 - Factorizations of Functions
Definition. We say a function f:A→B is factorized by x:A→C, y:C→B if y∘x=f. In this case we call x the left factor, and y the right factor (yes, I know the composition is written the other way around).
If x is not injective, then y∘x cannot be injective. However, it is possible for y to be non-injective and y∘x to still be injective: precisely when y(c)=y(c′) with c∈Imx(A) and c′∈/Imx(A).
Similarly, if y is not surjective, y∘x cannot be surjective. However, it is possible for x to be non-surjective, as long as Imy(Imx(A))=B.
Thus, factorizations of injective and surjective maps may be represented by the diagrams below.
(We will use maps-to arrows for injections/monomorphisms, and double-arrow heads for surjections/epimorphisms.)
1 - Characterizing Injective and Surjective Maps
Theorem (Characterization of injective maps): The following statements are equivalent:
f:A→B is injective.
There exists q:B→A such that q∘f=idA.
For any set C and any maps u,v:C→A, f∘u=f∘v implies u=v. (This is the obvious candidate for categorification. Statement (2) seems fine too, but investigating this distinction is exactly what got me into this rabbit hole in the first place.)
Proof.
(1⇒2) Suppose f is injective. Define q by sending any b∈Imf(A) to the unique element of f−1({b}), and any b∈/Imf(A) to an arbitrary fixed element of A. Then q(f(a))=a, since f(a)∈Imf(A) by definition.
(2⇒1) Suppose f has a left inverse q. Suppose f(a)=f(a′). Then q(f(a))=q(f(a′)), therefore a=a′. Thus f is injective.
(1⇒3) Suppose f is injective, and f∘u=f∘v. That is, for each c∈C, f(u(c))=f(v(c)), so by injectivity u(c)=v(c), i.e. u=v.
(3⇒1) Suppose f is such that for any u,v:C→A, f∘u=f∘v implies u=v. Suppose toward contradiction that f is not injective, so there exist a1=a2∈A with f(a1)=f(a2).
Define u:A→A by
u(a)={aa1a∈/{a1,a2}a∈{a1,a2}
and set v=idA.
Then f∘u=f: for a∈/{a1,a2}, f(u(a))=f(a) trivially. And, f(u(a1))=f(a1), f(u(a2))=f(a1)=f(a2) (using f(a1)=f(a2)). So f∘u=f=f∘v. But u=v, since u(a2)=a1=a2=v(a2). This contradicts our assumption, so f is injective. ■
Theorem (Characterization of surjective maps): The following statements are equivalent:
f:A→B is surjective.
There exists q:B→A such that f∘q=idB.
For any set C and any maps u,v:B→C, u∘f=v∘f implies u=v.
Proof.
(1⇒2) Suppose f is surjective. Then for any b∈B, we have f−1({b})⊆A nonempty, with a∈f−1({b}) implying f(a)=b. Construct a candidate q:B→A by choosing (invoking the axiom of choice) some a∈f−1({b}) for each b∈B. Then f(q(b))=b for each b∈B, i.e. f∘q=idB.
(2⇒1) Suppose q is a right inverse of f, i.e. f∘q=idB. Notice Imf∘q(B)⊆Imf(A), i.e. B⊆Imf(A). Thus Imf(A)=B.
(1⇒3) Suppose f is surjective, and u∘f=v∘f. Then for each a∈A, u(f(a))=v(f(a)). But for any b∈B, there is some a∈A for which b=f(a), thus u(b)=v(b) for every b∈B, hence u=v.
(3⇒1) Suppose f is such that, for any set C and any maps u,v:B→C, u∘f=v∘f implies u=v. Suppose toward contradiction that f is not surjective, so there exists b∗∈B for which there is no a∈A with f(a)=b∗.
Let C=B, and choose u=idB and
v(b)={bb′b=b∗b=b∗
for any fixed b′=b∗.
Clearly u(f(a))=f(a)=v(f(a)) for every a∈A, since f(a)=b∗ always (as b∗ has no preimage). So u∘f=v∘f. But u=v, since u(b∗)=b∗=b′=v(b∗). This contradicts our assumption, so f is surjective. ■
Cool. It is quite evident that characterization (3) of injectivity and surjectivity is best suited to being lifted into categories.
2 - Categories, Monomorphisms, and Epimorphisms
Definition (Category): A category C consists of:
A class of objects Obj(C).
For any A,B∈Obj(C), a possibly empty set of morphisms HomC(A,B). The sets HomC(A,B) and HomC(C,D) are completely disjoint when (A,B)=(C,D), and equal when (A,B)=(C,D).
For any A,B,C∈Obj(C), a function Hom(A,B)×Hom(B,C)→Hom(A,C) known as composition.
For any A∈Obj(C), an identity morphism 1A∈Hom(A,A).
These satisfy the following axioms:
(Associativity) For any A,B,C,D∈Obj(C) and morphisms f∈Hom(A,B), g∈Hom(B,C), and h∈Hom(C,D):
h∘(g∘f)=(h∘g)∘f
(Identity) For any A,B∈Obj(C) and f∈Hom(A,B):
f∘1A=f=1B∘f
It is often painful to write out Hom and this and that, so we would rather just use arrows.
Definition (Monomorphism): Let C be a category. A morphism A⟶fB is a monomorphism if, for any object C and any two morphisms C⟶uA and C⟶vA, we have that f∘u=f∘v implies u=v.
Definition (Epimorphism): Let C be a category. A morphism A⟶fB is an epimorphism if, for any object C and any two morphisms B⟶uC and B⟶vC, we have that u∘f=v∘f implies u=v.
Theorem (Factoring monomorphisms and epimorphisms): For a morphism A⟶fB and any factorization f=y∘x, if f is an epimorphism, then y is an epimorphism; if f is a monomorphism, then x is a monomorphism.
Proof: Let f be an epimorphism, and let u,v be morphisms from B to the same target C. Suppose u∘y=v∘y. Then u∘y∘x=v∘y∘x, i.e. u∘f=v∘f. This means that u=v, showing that y is an epimorphism.
Now let f be a monomorphism, and let u,v be morphisms from the same domain C to A. Suppose x∘u=x∘v. Then y∘x∘u=y∘x∘v; that is, f∘u=f∘v. This means that u=v, showing that x is a monomorphism. □
3 - Images and Their Universal Property
Now, we shall try to lift the notion of the image of a function to categories.
Let f:A→B. Then f factors as
A⟶f~Im(f)↪ιB,
where f~(a)=f(a) and ι is inclusion.
Moreover, Im(f) is the smallest subset of B through which f factors. Thus, for every
Im(f)⊆B′⊆B,
there is a unique f~′:A→B′ such that
f=ιB′,B∘f~′.
The inclusions themselves factor as
ιIm(f),B=ιB′,B∘ιIm(f),B′.
Unfortunately, there isn’t really a notion of “subset” in categories, so, with just wishful thinking, we state the following theorem in terms of sets and functions.
Universal Property of Images
Let f:A→B be a function. We call a set C, together with an injection y:C→B, a photo of f if there exists some x:A→C for which f=y∘x.
Moreover, a photo y∗:C∗→B of f is called canonical if, for any other photo y:C→B, there exists a unique h:C∗→C such that y∗=y∘h.
The claim is that ι:Imf(A)↪B is a canonical photo of f, and further that any other canonical photo is isomorphic to it.
Proof. Let y:C→B be any photo of f. We will first show h exists, then argue its uniqueness.
Since y is injective, choose any left inverse yL of y (i.e. yL∘y=idC).
We claim that h=yL∘ι is such that ι=y∘h. Let p=y∘h=y∘yL∘ι. Since y∘x=f, it must be that Imf(A)⊆Imy(C). Now, p(b)=y∘yL∘ι(b)=y∘yL(b) for each b∈Imf(A), and indeed any choice of yL sends elements of Imf(A) to their unique preimage under y, i.e. p(b)=b. Thus p=ι.
The uniqueness of h follows from the fact that y is a monomorphism: if y∘h=y∘h′=ι, then h=h′.
Now we shall show the universal condition. Let y∗:C∗→B be another canonical photo of f. Then there exist unique h:Imf(A)→C∗ and k:C∗→Imf(A) such that ι=y∗∘h and y∗=ι∘k (since both are canonical photos).
Thus, we obtain ι∘idImf(A)=ι∘(k∘h) and y∗∘idC∗=y∗∘(h∘k). Since y∗,ι are monomorphisms (or, invoking the uniqueness that canonical photos enjoy as canonical photos of themselves, which is generally how such arguments go for universal properties), we get k∘h=idImf(A) and h∘k=idC∗. Hence C∗≅Imf(A). ■
Universal Property of Co-images
Let f:A→B be a function. A set C, together with a surjection x:A→C, is called a co-photo of f if there exists some y:C→B such that y∘x=f.
Moreover, a co-photo x∗:A→C∗ is called canonical if, for every co-photo x:A→C, there exists a unique h:C→C∗ such that x∗=h∘x.
We claim that π:A→A/∼, where a∼a′⟺f(a)=f(a′) and π(a)=[a], is a canonical co-photo of f, and that any other canonical co-photo x∗:A→C∗ has C∗≅A/∼.
Proof. First, we shall show that π:A→A/∼ is indeed a co-photo. Of course π is surjective. The function f[]:[a]↦f(a) is well defined, since no matter which representative a∈[a] you pick, they all share the same value f(a). And of course, the composition f[]∘π=f.
Now, let x:A→C be any co-photo of f. Since x is surjective, it has a right inverse xR (i.e. x∘xR=idC). We claim that h=π∘xR is a candidate.
The central claim of this proof is that for each c∈C, xR(c)∈fibf(y(c)), where fibf denotes the preimage of a single element. Equivalently, π∘xR(c)=fibf(y(c)) (note that fibf(y(c)) is precisely the equivalence class in A whose image under f is y(c)).
Suppose xR(c)∈/fibf(y(c)), equivalently f(xR(c))=y(c). But of course c=x(xR(c)), so f(xR(c))=y(x(xR(c))), contradicting the assumption that y∘x=f.
Now, for each a∈A, h∘x(a)=π∘xR∘x(a). But π∘xR(x(a))=fibf(y(x(a)))=fibf(f(a))=[a]. Thus h∘x=π.
We shall omit proving the uniqueness of h and the universality of the co-image, as the argument is dual to the one for the image. ■
A Note on the Proof
The above proof might seem to appear out of the blue. Partly, this is because I like to keep my writing compact. I spent an evening figuring out what C intuitively represents and looking for the most concise proof I could find once I understood it.
The intuition is this: C can be thought of as taking each equivalence class [a], picking out some subset of it, relabeling that subset, and possibly moving pieces of different classes around, a kind of coarser or rearranged partition sitting “underneath” A/∼.
Another way to see it: whatever y does to some c∈C, that is, y(c), must be consistent with f on the preimage x−1({c}). Concretely, every a∈x−1({c}) must satisfy f(a)=y(c), since y∘x=f. But that means every such a lands in the same equivalence class of A/∼, namely the one whose image under f is y(c), otherwise the identity y∘x=f would break. So the preimage of c under x is entirely contained within a single equivalence class.
This is precisely what lets us define h:C→A/∼: it simply records which equivalence class each c∈C “belongs to” by sending c to the class containing x−1({c}).
4 - Categorical Images and Co-images
Categorical definition of image: Let f:A→B be a morphism. The image of f is a monomorphism ι:Im(f)→B, together with a morphism f~:A→Im(f) satisfying ι∘f~=f, such that for any monomorphism y:C→B and morphism x:A→C with y∘x=f, there exists a unique h:Im(f)→C with y∘h=ι.
Categorical definition of co-image: Let f:A→B be a morphism. The co-image of f is an epimorphism π:A→Coim(f), together with a morphism f[]:Coim(f)→B satisfying f[]∘π=f, such that for any epimorphism x:A→C and morphism y:C→B with y∘x=f, there exists a unique h:C→Coim(f) with h∘x=π.
Both are unique up to isomorphism, being defined via universal properties. Notice both definitions are stated entirely in terms of morphisms and their composition, no reference to elements, subsets, or preimages, exactly the object-agnostic flavor we wanted from categorification. Image and co-image end up dual to each other: image factors f through the smallest mono into B, co-image factors f through the largest epi out of A, and one is obtained from the other by reversing all arrows. Also note that the other triangle in each of the diagrams can easily be shown to commute, and requires nothing about set theory to do so.
5 - Canonical Decomposition in Sets
Theorem (Canonical Decomposition). Let f:A→B be a function, and let ∼ be the equivalence relation on A given by a∼a′⟺f(a)=f(a′). Then there is a canonical isomorphism A/∼≅Imf(A), such that f factors as
AπA/∼≅Imf(A)ιB,
where π is the canonical surjection a↦[a] and ι is the inclusion. That is, every function f:A→B decomposes, uniquely up to this isomorphism, as a surjection followed by a bijection followed by an injection.
Proof.Imf(A), together with f~ and ι, is a co-photo of f. Since A/∼ is the canonical co-photo, we get a unique h:Imf(A)→A/∼ with h∘f~=π.
Symmetrically, A/∼, together with π and f[], is a photo of f. Since Imf(A) is the canonical photo, we get a unique h−1:A/∼→Imf(A) with ι∘h−1=f[].
We check h,h−1 are mutually inverse. Notice ι∘(h−1∘π)=f[]∘π=f=ι∘f~, and ι is mono, so h−1∘π=f~. Then
h−1∘h∘f~=h−1∘π=f~,
and since f~ is epi, h−1∘h=idImf(A).
Dually (swapping the roles of f~/epi and f[]/mono), h∘h−1=idA/∼.
Thus h is an isomorphism, and A/∼≅Imf(A). ■
This roughly covers Section 2 of Chapter 1 of Aluffi’s text. Most of the exercises in Section 2 are pretty chill.