Algebra - 1

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:ABf: A \to B is factorized by x:ACx: A \to C, y:CBy: C \to B if yx=fy \circ x = f. In this case we call xx the left factor, and yy the right factor (yes, I know the composition is written the other way around).

If xx is not injective, then yxy \circ x cannot be injective. However, it is possible for yy to be non-injective and yxy \circ x to still be injective: precisely when y(c)=y(c)y(c) = y(c') with cImx(A)c \in \mathrm{Im}_x(A) and cImx(A)c' \notin \mathrm{Im}_x(A).

Similarly, if yy is not surjective, yxy \circ x cannot be surjective. However, it is possible for xx to be non-surjective, as long as Imy(Imx(A))=B\mathrm{Im}_y(\mathrm{Im}_x(A)) = B.

Thus, factorizations of injective and surjective maps may be represented by the diagrams below.

Commutative diagram
Commutative diagram

(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:

  1. f:ABf: A \to B is injective.
  2. There exists q:BAq: B \to A such that qf=idAq \circ f = \mathrm{id}_A.
  3. For any set CC and any maps u,v:CAu, v: C \to A, fu=fvf \circ u = f \circ v implies u=vu = 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.

(12)(1 \Rightarrow 2) Suppose ff is injective. Define qq by sending any bImf(A)b \in \mathrm{Im}_f(A) to the unique element of f1({b})f^{-1}(\{b\}), and any bImf(A)b \notin \mathrm{Im}_f(A) to an arbitrary fixed element of AA. Then q(f(a))=aq(f(a)) = a, since f(a)Imf(A)f(a) \in \mathrm{Im}_f(A) by definition.

(21)(2 \Rightarrow 1) Suppose ff has a left inverse qq. Suppose f(a)=f(a)f(a) = f(a'). Then q(f(a))=q(f(a))q(f(a)) = q(f(a')), therefore a=aa = a'. Thus ff is injective.

(13)(1 \Rightarrow 3) Suppose ff is injective, and fu=fvf \circ u = f \circ v. That is, for each cCc \in C, f(u(c))=f(v(c))f(u(c)) = f(v(c)), so by injectivity u(c)=v(c)u(c) = v(c), i.e. u=vu = v.

(31)(3 \Rightarrow 1) Suppose ff is such that for any u,v:CAu, v: C \to A, fu=fvf \circ u = f \circ v implies u=vu = v. Suppose toward contradiction that ff is not injective, so there exist a1a2Aa_1 \neq a_2 \in A with f(a1)=f(a2)f(a_1) = f(a_2).

Define u:AAu: A \to A by u(a)={aa{a1,a2}a1a{a1,a2}u(a) = \begin{cases} a & a \notin \{a_1, a_2\} \\ a_1 & a \in \{a_1, a_2\} \end{cases} and set v=idAv = \mathrm{id}_A.

Then fu=ff \circ u = f: for a{a1,a2}a \notin \{a_1,a_2\}, f(u(a))=f(a)f(u(a)) = f(a) trivially. And, f(u(a1))=f(a1)f(u(a_1)) = f(a_1), f(u(a2))=f(a1)=f(a2)f(u(a_2)) = f(a_1) = f(a_2) (using f(a1)=f(a2)f(a_1)=f(a_2)). So fu=f=fvf \circ u = f = f \circ v. But uvu \neq v, since u(a2)=a1a2=v(a2)u(a_2) = a_1 \neq a_2 = v(a_2). This contradicts our assumption, so ff is injective. \blacksquare

Theorem (Characterization of surjective maps): The following statements are equivalent:

  1. f:ABf: A \to B is surjective.
  2. There exists q:BAq: B \to A such that fq=idBf \circ q = \mathrm{id}_B.
  3. For any set CC and any maps u,v:BCu, v: B \to C, uf=vfu \circ f = v \circ f implies u=vu = v.

Proof.

(12)(1 \Rightarrow 2) Suppose ff is surjective. Then for any bBb \in B, we have f1({b})Af^{-1}(\{b\}) \subseteq A nonempty, with af1({b})a \in f^{-1}(\{b\}) implying f(a)=bf(a) = b. Construct a candidate q:BAq: B \to A by choosing (invoking the axiom of choice) some af1({b})a \in f^{-1}(\{b\}) for each bBb \in B. Then f(q(b))=bf(q(b)) = b for each bBb \in B, i.e. fq=idBf \circ q = \mathrm{id}_B.

(21)(2 \Rightarrow 1) Suppose qq is a right inverse of ff, i.e. fq=idBf \circ q = \mathrm{id}_B. Notice Imfq(B)Imf(A)\mathrm{Im}_{f\circ q}(B) \subseteq \mathrm{Im}_f(A), i.e. BImf(A)B \subseteq \mathrm{Im}_f(A). Thus Imf(A)=B\mathrm{Im}_f(A) = B.

(13)(1 \Rightarrow 3) Suppose ff is surjective, and uf=vfu \circ f = v \circ f. Then for each aAa \in A, u(f(a))=v(f(a))u(f(a)) = v(f(a)). But for any bBb \in B, there is some aAa \in A for which b=f(a)b = f(a), thus u(b)=v(b)u(b) = v(b) for every bBb \in B, hence u=vu = v.

(31)(3 \Rightarrow 1) Suppose ff is such that, for any set CC and any maps u,v:BCu, v: B \to C, uf=vfu \circ f = v \circ f implies u=vu = v. Suppose toward contradiction that ff is not surjective, so there exists bBb^* \in B for which there is no aAa \in A with f(a)=bf(a) = b^*.

Let C=BC = B, and choose u=idBu = \mathrm{id}_B and v(b)={bbbbb=bv(b) = \begin{cases} b & b \neq b^* \\ b' & b = b^* \end{cases} for any fixed bbb' \neq b^*.

Clearly u(f(a))=f(a)=v(f(a))u(f(a)) = f(a) = v(f(a)) for every aAa \in A, since f(a)bf(a) \neq b^* always (as bb^* has no preimage). So uf=vfu \circ f = v \circ f. But uvu \neq v, since u(b)=bb=v(b)u(b^*) = b^* \neq b' = v(b^*). This contradicts our assumption, so ff is surjective. \blacksquare

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\mathsf{C} consists of:

  • A class of objects Obj(C)\operatorname{Obj}(\mathsf{C}).
  • For any A,BObj(C)A,B \in \operatorname{Obj}(\mathsf{C}), a possibly empty set of morphisms HomC(A,B)\operatorname{Hom}_{\mathsf{C}}(A,B). The sets HomC(A,B)\operatorname{Hom}_{\mathsf{C}}(A,B) and HomC(C,D)\operatorname{Hom}_{\mathsf{C}}(C,D) are completely disjoint when (A,B)(C,D)(A,B) \neq (C,D), and equal when (A,B)=(C,D)(A,B)=(C,D).
  • For any A,B,CObj(C)A,B,C \in \operatorname{Obj}(\mathsf{C}), a function Hom(A,B)×Hom(B,C)Hom(A,C)\operatorname{Hom}(A,B) \times \operatorname{Hom}(B,C) \to \operatorname{Hom}(A,C) known as composition.
  • For any AObj(C)A \in \operatorname{Obj}(\mathsf{C}), an identity morphism 1AHom(A,A)1_A \in \operatorname{Hom}(A,A).

These satisfy the following axioms:

  • (Associativity) For any A,B,C,DObj(C)A,B,C,D \in \operatorname{Obj}(\mathsf{C}) and morphisms fHom(A,B)f \in \operatorname{Hom}(A,B), gHom(B,C)g \in \operatorname{Hom}(B,C), and hHom(C,D)h \in \operatorname{Hom}(C,D): h(gf)=(hg)fh \circ (g \circ f) = (h \circ g) \circ f

  • (Identity) For any A,BObj(C)A,B \in \operatorname{Obj}(\mathsf{C}) and fHom(A,B)f \in \operatorname{Hom}(A,B): f1A=f=1Bff \circ 1_A = f = 1_B \circ f

It is often painful to write out Hom\operatorname{Hom} and this and that, so we would rather just use arrows.

Definition (Monomorphism): Let C\mathsf{C} be a category. A morphism AfBA \overset{f}{\longrightarrow} B is a monomorphism if, for any object CC and any two morphisms CuAC \overset{u}{\longrightarrow} A and CvAC \overset{v}{\longrightarrow} A, we have that fu=fvf \circ u = f \circ v implies u=vu=v.

Definition (Epimorphism): Let C\mathsf{C} be a category. A morphism AfBA \overset{f}{\longrightarrow} B is an epimorphism if, for any object CC and any two morphisms BuCB \overset{u}{\longrightarrow} C and BvCB \overset{v}{\longrightarrow} C, we have that uf=vfu \circ f = v \circ f implies u=vu=v.

Theorem (Factoring monomorphisms and epimorphisms): For a morphism AfBA \overset{f}{\longrightarrow} B and any factorization f=yxf=y\circ x, if ff is an epimorphism, then yy is an epimorphism; if ff is a monomorphism, then xx is a monomorphism.

Proof: Let ff be an epimorphism, and let u,vu,v be morphisms from BB to the same target CC. Suppose uy=vyu \circ y=v\circ y. Then uyx=vyxu\circ y\circ x=v\circ y\circ x, i.e. uf=vfu\circ f=v\circ f. This means that u=vu=v, showing that yy is an epimorphism.

Now let ff be a monomorphism, and let u,vu,v be morphisms from the same domain CC to AA. Suppose xu=xvx\circ u=x\circ v. Then yxu=yxvy\circ x\circ u=y\circ x\circ v; that is, fu=fvf\circ u=f\circ v. This means that u=vu=v, showing that xx is a monomorphism. \square


3 - Images and Their Universal Property

Now, we shall try to lift the notion of the image of a function to categories.

Let f:ABf: A \to B. Then ff factors as

Af~Im(f)ιB,A \overset{\tilde f}{\longrightarrow} \operatorname{Im}(f) \overset{\iota}{\hookrightarrow} B,

where f~(a)=f(a)\tilde f(a) = f(a) and ι\iota is inclusion.

Moreover, Im(f)\operatorname{Im}(f) is the smallest subset of BB through which ff factors. Thus, for every

Im(f)BB,\operatorname{Im}(f) \subseteq B' \subseteq B,

there is a unique f~:AB\tilde f': A \to B' such that

f=ιB,Bf~.f = \iota_{B',B} \circ \tilde f'.

The inclusions themselves factor as

ιIm(f),B=ιB,BιIm(f),B.\iota_{\operatorname{Im}(f),B} = \iota_{B',B} \circ \iota_{\operatorname{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:ABf: A \to B be a function. We call a set CC, together with an injection y:CBy: C \to B, a photo of ff if there exists some x:ACx: A \to C for which f=yxf = y \circ x.

Moreover, a photo y:CBy^*: C^* \to B of ff is called canonical if, for any other photo y:CBy: C \to B, there exists a unique h:CCh: C^* \to C such that y=yhy^* = y \circ h.

The claim is that ι:Imf(A)B\iota: \mathrm{Im}_f(A) \hookrightarrow B is a canonical photo of ff, and further that any other canonical photo is isomorphic to it.

Commutative diagram

Proof. Let y:CBy: C \to B be any photo of ff. We will first show hh exists, then argue its uniqueness.

Since yy is injective, choose any left inverse yLy_L of yy (i.e. yLy=idCy_L \circ y = \mathrm{id}_C).

We claim that h=yLιh = y_L \circ \iota is such that ι=yh\iota = y \circ h. Let p=yh=yyLιp = y \circ h = y \circ y_L \circ \iota. Since yx=fy \circ x = f, it must be that Imf(A)Imy(C)\mathrm{Im}_f(A) \subseteq \mathrm{Im}_y(C). Now, p(b)=yyLι(b)=yyL(b)p(b) = y \circ y_L \circ \iota(b) = y \circ y_L(b) for each bImf(A)b \in \mathrm{Im}_f(A), and indeed any choice of yLy_L sends elements of Imf(A)\mathrm{Im}_f(A) to their unique preimage under yy, i.e. p(b)=bp(b) = b. Thus p=ιp = \iota.

The uniqueness of hh follows from the fact that yy is a monomorphism: if yh=yh=ιy \circ h = y \circ h' = \iota, then h=hh = h'.

Now we shall show the universal condition. Let y:CBy^*: C^* \to B be another canonical photo of ff. Then there exist unique h:Imf(A)Ch: \mathrm{Im}_f(A) \to C^* and k:CImf(A)k: C^* \to \mathrm{Im}_f(A) such that ι=yh\iota = y^* \circ h and y=ιky^* = \iota \circ k (since both are canonical photos).

Thus, we obtain ιidImf(A)=ι(kh)\iota \circ \mathrm{id}_{\mathrm{Im}_f(A)} = \iota \circ (k \circ h) and yidC=y(hk)y^* \circ \mathrm{id}_{C^*} = y^* \circ (h \circ k). Since y,ιy^*, \iota 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 kh=idImf(A)k \circ h = \mathrm{id}_{\mathrm{Im}_f(A)} and hk=idCh \circ k = \mathrm{id}_{C^*}. Hence CImf(A)C^* \cong \mathrm{Im}_f(A). \blacksquare

Universal Property of Co-images

Let f:ABf: A \to B be a function. A set CC, together with a surjection x:ACx: A \to C, is called a co-photo of ff if there exists some y:CBy: C \to B such that yx=fy \circ x = f.

Moreover, a co-photo x:ACx^*: A \to C^* is called canonical if, for every co-photo x:ACx: A \to C, there exists a unique h:CCh: C \to C^* such that x=hxx^* = h \circ x.

We claim that π:AA/\pi: A \to A/\sim, where aa    f(a)=f(a)a \sim a' \iff f(a) = f(a') and π(a)=[a]\pi(a)=[a], is a canonical co-photo of ff, and that any other canonical co-photo x:ACx^*:A\to C^* has CA/C^*\cong A/\sim.

Commutative diagram

Proof. First, we shall show that π:AA/\pi: A \to A/\sim is indeed a co-photo. Of course π\pi is surjective. The function f[]:[a]f(a)f_{[]}: [a] \mapsto f(a) is well defined, since no matter which representative a[a]a \in [a] you pick, they all share the same value f(a)f(a). And of course, the composition f[]π=ff_{[]} \circ \pi = f.

Now, let x:ACx: A \to C be any co-photo of ff. Since xx is surjective, it has a right inverse xRx_R (i.e. xxR=idCx \circ x_R = \mathrm{id}_C). We claim that h=πxRh = \pi \circ x_R is a candidate.

The central claim of this proof is that for each cCc \in C, xR(c)fibf(y(c))x_R(c) \in \mathrm{fib}_f(y(c)), where fibf\mathrm{fib}_f denotes the preimage of a single element. Equivalently, πxR(c)=fibf(y(c))\pi \circ x_R(c) = \mathrm{fib}_f(y(c)) (note that fibf(y(c))\mathrm{fib}_f(y(c)) is precisely the equivalence class in AA whose image under ff is y(c)y(c)).

Suppose xR(c)fibf(y(c))x_R(c) \notin \mathrm{fib}_f(y(c)), equivalently f(xR(c))y(c)f(x_R(c)) \neq y(c). But of course c=x(xR(c))c = x(x_R(c)), so f(xR(c))y(x(xR(c)))f(x_R(c)) \neq y(x(x_R(c))), contradicting the assumption that yx=fy \circ x = f.

Now, for each aAa \in A, hx(a)=πxRx(a)h \circ x(a) = \pi \circ x_R \circ x(a). But πxR(x(a))=fibf(y(x(a)))=fibf(f(a))=[a]\pi \circ x_R(x(a)) = \mathrm{fib}_f(y(x(a))) = \mathrm{fib}_f(f(a)) = [a]. Thus hx=πh \circ x = \pi.

We shall omit proving the uniqueness of hh and the universality of the co-image, as the argument is dual to the one for the image. \blacksquare

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 CC intuitively represents and looking for the most concise proof I could find once I understood it.

The intuition is this: CC can be thought of as taking each equivalence class [a][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/A/\sim.

Another way to see it: whatever yy does to some cCc \in C, that is, y(c)y(c), must be consistent with ff on the preimage x1({c})x^{-1}(\{c\}). Concretely, every ax1({c})a \in x^{-1}(\{c\}) must satisfy f(a)=y(c)f(a) = y(c), since yx=fy \circ x = f. But that means every such aa lands in the same equivalence class of A/A/\sim, namely the one whose image under ff is y(c)y(c), otherwise the identity yx=fy \circ x = f would break. So the preimage of cc under xx is entirely contained within a single equivalence class.

This is precisely what lets us define h:CA/h:C\to A/\sim: it simply records which equivalence class each cCc\in C “belongs to” by sending cc to the class containing x1({c})x^{-1}(\{c\}).


4 - Categorical Images and Co-images

Categorical definition of image: Let f:ABf: A \to B be a morphism. The image of ff is a monomorphism ι:Im(f)B\iota: \mathrm{Im}(f) \to B, together with a morphism f~:AIm(f)\tilde f: A \to \mathrm{Im}(f) satisfying ιf~=f\iota \circ \tilde f = f, such that for any monomorphism y:CBy: C \to B and morphism x:ACx: A \to C with yx=fy \circ x = f, there exists a unique h:Im(f)Ch: \mathrm{Im}(f) \to C with yh=ιy \circ h = \iota.

Categorical definition of co-image: Let f:ABf: A \to B be a morphism. The co-image of ff is an epimorphism π:ACoim(f)\pi: A \to \mathrm{Coim}(f), together with a morphism f[]:Coim(f)Bf_{[]}: \mathrm{Coim}(f) \to B satisfying f[]π=ff_{[]} \circ \pi = f, such that for any epimorphism x:ACx: A \to C and morphism y:CBy: C \to B with yx=fy \circ x = f, there exists a unique h:CCoim(f)h: C \to \mathrm{Coim}(f) with hx=πh \circ x = \pi.

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 ff through the smallest mono into BB, co-image factors ff through the largest epi out of AA, 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:ABf: A \to B be a function, and let \sim be the equivalence relation on AA given by aa    f(a)=f(a)a \sim a' \iff f(a) = f(a'). Then there is a canonical isomorphism A/    Imf(A)A/\sim \; \cong \; \mathrm{Im}_f(A), such that ff factors as

A π A/    Imf(A) ι B,A \xrightarrow{\ \pi\ } A/\sim \; \xrightarrow{\ \cong\ } \mathrm{Im}_f(A) \xhookrightarrow{\ \iota\ } B,

where π\pi is the canonical surjection a[a]a \mapsto [a] and ι\iota is the inclusion. That is, every function f:ABf: A \to B decomposes, uniquely up to this isomorphism, as a surjection followed by a bijection followed by an injection.

Commutative diagram

Proof. Imf(A)\mathrm{Im}_f(A), together with f~\tilde f and ι\iota, is a co-photo of ff. Since A/A/\sim is the canonical co-photo, we get a unique h:Imf(A)A/h: \mathrm{Im}_f(A) \to A/\sim with hf~=πh \circ \tilde f = \pi.

Symmetrically, A/A/\sim, together with π\pi and f[]f_{[]}, is a photo of ff. Since Imf(A)\mathrm{Im}_f(A) is the canonical photo, we get a unique h1:A/Imf(A)h^{-1}: A/\sim \to \mathrm{Im}_f(A) with ιh1=f[]\iota \circ h^{-1} = f_{[]}.

We check h,h1h, h^{-1} are mutually inverse. Notice ι(h1π)=f[]π=f=ιf~\iota \circ (h^{-1} \circ \pi) = f_{[]} \circ \pi = f = \iota \circ \tilde f, and ι\iota is mono, so h1π=f~h^{-1} \circ \pi = \tilde f. Then h1hf~=h1π=f~,h^{-1} \circ h \circ \tilde f = h^{-1} \circ \pi = \tilde f, and since f~\tilde f is epi, h1h=idImf(A)h^{-1} \circ h = \mathrm{id}_{\mathrm{Im}_f(A)}.

Dually (swapping the roles of f~\tilde f/epi and f[]f_{[]}/mono), hh1=idA/h \circ h^{-1} = \mathrm{id}_{A/\sim}.

Thus hh is an isomorphism, and A/    Imf(A)A/\sim \; \cong \; \mathrm{Im}_f(A). \blacksquare

This roughly covers Section 2 of Chapter 1 of Aluffi’s text. Most of the exercises in Section 2 are pretty chill.