3.1. \triangleright Let C\mathsf{C} be a category. Consider a structure Cop\mathsf{C}^{op} with

Show how to make this into a category (that is, define composition of morphisms in Cop\mathsf{C}^{op} and verify the properties listed in §3.1\S3.1 ).
Intuitively, the 'opposite' category Cop\mathsf{C}^{op} is simply obtained by 'reversing all the arrows' in C\mathsf{C}. [5.1,§VIII.1.1,§IX.1.2,IX.1.10]\left[5.1, \S \mathrm{VIII}.1.1, \S \mathrm{IX}.1.2, \mathrm{IX.1.10} \right]

Solution
First we'll define an identity morphism. Since C\mathsf{C} is a category, for every object AA of C\mathsf{C}, there exists an identity morphism 1AHomC(A,A)1_A \in \text{Hom}_\mathsf{C}(A, A). By our definition of Cop\mathsf{C}^{op} we have Obj(Cop)=Obj(C)\text{Obj}(\mathsf{C}^{op}) = \text{Obj}(\mathsf{C}) and HomCop(A,A)=HomC(A,A)\text{Hom}_{\mathsf{C}^{op}}(A, A) = \text{Hom}_\mathsf{C}(A, A), so we can just use 1A1_A as is for CopC^{op}.
Now for the heart of the matter, defining the composition of morphisms in Cop\mathsf{C}^{op} and verifying the properties of §3.1\S 3.1. Let A,BA, B be objects of Cop\mathsf{C}^{op} (which is the same as being an object of C\mathsf{C}), and let fHomCop(A,B)f \in \text{Hom}_{\mathsf{C}^{op}}(A, B) and gHomCop(B,C)g \in \text{Hom}_{\mathsf{C}^{op}}(B, C). By definition, we have fHomC(B,A)f \in \text{Hom}_{\mathsf{C}}(B, A) and gHomC(C,B)g \in \text{Hom}_{\mathsf{C}}(C, B). This gives us fgHomC(C,A)=HomCop(A,C)fg \in \text{Hom}_{\mathsf{C}}(C, A) = \text{Hom}_{\mathsf{C}^{op}}(A, C) by composition. Define gf=fggf = fg. This notation is a bit confusing because the LHS is composition in Cop\mathsf{C}^{op} and the RHS is composition in C\mathsf{C}. We proceed by verifying that this composition is associative and respects the identity.
Let fHomCop(A,B)f \in \text{Hom}_{\mathsf{C}^{op}}(A, B), gHomCop(B,C)g \in \text{Hom}_{\mathsf{C}^{op}}(B, C), and hHomCop(C,D)h \in \text{Hom}_{\mathsf{C}^{op}}(C, D). Then (hg)f=(gh)f(hg)f = (gh)f, where now on the RHS we are using composition in C\mathsf{C} in the parentheses. Applying the definition of composition in Cop\mathsf{C}^{op} again we get (hg)f=f(gh)(hg)f = f(gh). Now that on the RHS we are entirely in C\mathsf{C} we can use associativity in C\mathsf{C} to get (hg)f=(fg)h(hg)f = (fg)h. Then using the definition of composition in Cop\mathsf{C}^{op} twice we get (hg)f=(fg)h=(gf)h=h(gf)(hg)f = (fg)h = (gf)h = h(gf) proving associativity.
This is a bit unclear, so let me rewrite this denoting composition in Cop\mathsf{C}^{op} as \circ ' and composition in C\mathsf{C} as \circ. Then
(hg)f=(gh)f=f(gh)=(fg)h=(gf)h=h(gf).(h \circ' g) \circ' f = (g \circ h) \circ' f = f \circ (g \circ h) \\ = (f \circ g) \circ h = (g \circ' f) \circ h = h \circ' (g \circ' f).
It is pretty clear that the identity respects composition, let fHomCop(A,B)=HomC(B,A)f \in \text{Hom}_{\mathsf{C}^{op}}(A, B) = \text{Hom}_{\mathsf{C}}(B, A). Because the identity respects composition in C\mathsf{C} we have
f1B=f,1Af=ff \circ 1_B = f, \quad 1_A \circ f = f
So by the definition of composition in Cop\mathsf{C}^{op} and because the identities are the same in both C\mathsf{C} and Cop\mathsf{C}^{op}
1Bf=f,f1A=f;1_B \circ' f = f, \quad f \circ' 1_A = f;
which is exactly what we set out to show. \square


3.3. \triangleright Formulate precisely what it means to say that 1a1_a is an identity with respect to composition in Example 3.3, and prove this assertion. [§3.2]\left[\S 3.2\right]
Solution
In this example 1a1_a is the relation aaa \sim a which can also be viewed as the pair (a,a)(a, a), to show that it is the identity with respect to composition we need to show that for all fHom(a,b)f \in \text{Hom}(a, b) we have
f1a=f,1bf=ff1_a = f, \quad 1_bf = f
In our category the only element of Hom(a,b)\text{Hom}(a,b) is the pair (a,b)(a, b) representing the true statement aba \sim b, so the above is equivalent to
(a,b)(a,a)=(a,b),(b,b)(a,b)=(a,b);(a, b) (a, a) = (a, b), \quad (b, b)(a, b) = (a, b);
which follows directly from the definition of composition in the example. \square


3.5. \triangleright Explain in what sense Example 3.4 is an instance of the categories considered in Example 3.3. [§3.2]\left[\S 3.2\right]
Solution
Let A,B,CSA, B, C \subseteq S and define AB    ABA \sim B \iff A \subseteq B. Because ABA \subseteq B and BCB \subseteq C implies that ACA \subseteq C, \sim is transitive. Because AAA \subseteq A, \sim is reflective. Because P(S)\mathscr{P}(S) is a set and \sim is a reflexive and transitive relation on P(S)\mathscr{P}(S), Example 3.4 is an instance of the categories considered in Example 3.3. \square


3.6. \triangleright (Assuming some familiarity with linear algebra) Define a category V\mathsf{V} by taking Obj=N\text{Obj} = \N and letting HomV(n,m)=\text{Hom}_{\mathsf{V}}(n,m) = the set of m×nm \times n matrices with real entries, for all n,mNn, m \in \N. (I will leave the reader the task of making sense of a matrix with 00 rows or columns.) Use product of matrices to define composition. Does this category 'feel' familiar? [§VI.2.1,§VIII.1.3]\left[\S \mathrm{VI}.2.1, \S \mathrm{VIII}.1.3 \right]
Solution
It 'feels' like the category of finite dimensional vector spaces, as each object is a natural number (the dimension) and the morphisms correspond to linear transformations.


3.7. \triangleright Define carefully objects and morphisms in Example 3.7, and draw the diagram corresponding to composition. [§3.2]\left[\S 3.2\right]
Solution
Let C\mathsf{C} be a category and AObj(C)A \in \text{Obj}(\mathsf{C}). We define the co-slice category CA\mathsf{C}_A as follows:

A A Z Z A->Z   f

A A Z_1 Z 1 A->Z_1 f 1   Z_2 Z 2 A->Z_2   f 2

Then elements of HomCA(f1,f2)\text{Hom}_{\mathsf{C}_A}(f_1, f_2) are commutative diagrams like

A A Z_1 Z 1 A->Z_1 f 1 Z_2 Z 2 A->Z_2 f 2 Z_1->Z_2 σ    

And if we were to take two morphisms, σ:f1f2\sigma: f_1 \to f_2 and τ:f2f3\tau: f_2 \to f_3 pictured below

(1) A A Z_1 Z 1 A->Z_1 f 1 Z_2 Z 2 A->Z_2 f 2 Z_1->Z_2   σ      _A A _Z_2 Z 2 _A->_Z_2 f 2 _Z_3 Z 3 _A->_Z_3 f 3 _Z_2->_Z_3   τ    

we can define their composition by first putting the diagrams side-by-side

A A Z_1 Z 1 A->Z_1 f 1 Z_2 Z 2 A->Z_2 f 2 Z_3 Z 3 A->Z_3 f 3 Z_1->Z_2   σ     Z_2->Z_3   τ    

And then removing the middle and composing σ\sigma and τ\tau

A A Z_1 Z 1 A->Z_1 f 1 Z_3 Z 3 A->Z_3 f 3 Z_1->Z_3 τσ    

The above diagram commutes because
τσf1=τ(σf1)\tau \sigma f_1 = \tau (\sigma f_1)
because composition in categories is associative, and
τ(σf1)=τf2=f3\tau (\sigma f_1) = \tau f_2 = f_3
due to the commutative diagrams in (1).
Composition in CA\mathsf{C}_A is associative because (TODO: FIX THIS ARGUMENT) the following diagram commutes

A A Z_1 Z 1 A->Z_1 f 1 Z_2 Z 2 A->Z_2 f 2 Z_3 Z 3 A->Z_3 f 3 Z_4 Z 4 A->Z_4 f 4 Z_1->Z_2 σ    Z_2->Z_3 τ     Z_3->Z_4 ν    

so (στ)υ=σ(τυ)(\sigma \tau) \upsilon = \sigma (\tau \upsilon).
For every f:AZf: A \to Z in CA\mathsf{C}_A, the identity 1f1_f is the following commutative diagram

A A Z Z A->Z   f Z->Z   1 Z

which commutes because C\mathsf{C} is a category.
Finally, the identity is an identity with respect to our composition. To show this first take the diagram earlier for σ\sigma, representing an arbitrary morphism in CA\mathsf{C}_A, and put the identity diagram with it side-by-side

A A Z_1 Z 1 A->Z_1 f 1 Z_2 Z 2 A->Z_2 f 2 Z_1:start->Z_1:end   1 Z 1 Z_1->Z_2    σ    

then, as per the definition of composition in CA\mathsf{C}_A, we remove the middle and compose σ\sigma and 1Z11_{Z_1}

A A Z_1 Z 1 A->Z_1 f 1 Z_2 Z 2 A->Z_2 f 2 Z_1->Z_2 σ 1 Z 1

The diagram above is by definition σ1f1\sigma 1_{f_1}. Because C\mathsf{C} is a category σ1Z1=σ\sigma 1_{Z_1} = \sigma so σ1f1\sigma 1_{f_1} is equal to the below diagram

A A Z_1 Z 1 A->Z_1 f 1 Z_2 Z 2 A->Z_2 f 2 Z_1->Z_2       σ       

which is the original diagram for σ\sigma, so we can conclude that σ1f1=σ\sigma 1_{f_1} = \sigma. The argument that 1f2σ=σ1_{f_2}\sigma = \sigma is similar. \square


3.8. \triangleright A subcategory C\mathsf{C}' of a category C\mathsf{C} consists of a collection of objects of C\mathsf{C} with sets of morphisms HomC(A,B)HomC(A,B)\text{Hom}_{\mathsf{C}'}(A, B) \subseteq \text{Hom}_{\mathsf{C}}(A, B) for all objects A,BA, B in Obj(C)\text{Obj}(\mathsf{C}'), such that identities and compositions in C\mathsf{C} make C\mathsf{C'} into a category. A subcategory C\mathsf{C'} is full if HomC(A,B)=HomC(A,B)\text{Hom}_{\mathsf{C'}}(A,B) = \text{Hom}_{\mathsf{C}}(A,B) for all A,BA, B in Obj(C)\text{Obj}(\mathsf{C'}). Construct a category of infinite sets and explain how it may be viewed as a full subcategory of Set\mathsf{Set}. [4.4,§VI.1.1,§VIII.1.3]\left[4.4, \S \mathrm{VI}.1.1, \S \mathrm{VIII}.1.3\right]

Solution

Let C=Set\mathsf{C} = \mathsf{Set}. Then by the definition of Set\mathsf{Set},

Let Obj(C)=the class of all infinite sets\text{Obj}(\mathsf{C'}) = \text{the class of all infinite sets}. For A,BObj(C)A,B \in \text{Obj}(\mathsf{C'}), let HomC(A,B)=HomC(A,B)=BA\text{Hom}_{\mathsf{C'}}(A,B) = \text{Hom}_{\mathsf{C'}}(A,B) = B^A. We must show that identities and compositions in C\mathsf{C} make C\mathsf{C'} into a category. This is obvious as all of the properties are inherited from C\mathsf{C}. \quad \square


3.9. \triangleright An alternative to the notion of multiset introduced in §2.2\S 2.2 is obtained by considering sets endowed with equivalence relations; equivalent elements are taken to be multiple instances of elements 'of the same kind'. Define a notion of morphism between such enhanced sets, obtaining a category MSet\mathsf{MSet} containing (a 'copy' of) Set\mathsf{Set} as a full subcategory. (There may be more than one reasonable way to do this! This is intentionally an open-ended exercise.) Which objects in MSet\mathsf{MSet} determine the ordinary multisets as defined in §2.2\S2.2 and how? Spell out what a morphism of multisets would be from this point of view. (There are several natural notions of morphisms of multisets. Try to define morphisms in MSet\mathsf{MSet} so that the notion you obtain for ordinary multisets captures your intuitive understanding of these objects.) [§2.2,§3.2,4.5]\left[\S2.2, \S3.2, 4.5\right]

Solution

In MSet\mathsf{MSet} our objects are surjective projections that send aAa \in A to its equivalence class [a][a]_\sim,

▶︎
all
running...

and our morphisms are diagrams like

▶︎
all
running...

where ff takes an equivalence class [a][a]_\sim where aAa \in A as input and outputs an equivalence class [b][b]_{\sim'} where bBb\in B.

Given two morphisms f:A/B/f: A / \sim \, \to B /\sim' and g:B/C/g: B / \sim' \, \to C / \sim'', to combine them we stack them,

▶︎
all
running...

compose ff and gg to get gfg \circ f and remove the middle, as shown below.

▶︎
all
running...

the identity morphism is the diagram below,

▶︎
all
running...

where 11 is of course the identity on A/A / \sim. Since f1=ff \circ 1 = f this identity morphism is an identity with respect to composition, following the steps we first stack the diagrams for 11 and for ff,

▶︎
all
running...

compose f1=ff \circ 1 = f and remove the middle to get

▶︎
all
running...

which is the original morphism. This also works in the other direction: consider the right-sided identity morphism,

▶︎
all
running...

stack the morphism for ff on top of it,

▶︎
all
running...

remove the middle and compose 1f=f1 \circ f = f to get the original diagram for ff,

▶︎
all
running...

showing that indeed both indentity morphisms do function as identities with respect to composing morphisms.

Finally we need to show that with respect to morphisms we have associativity, for this we need a new morphism h:C/D/h: C / \sim'' \to D / \sim''' and to show that

(hg)f=h(gf).(hg)f = h(gf).

First we find hghg, which by definition involves first stacking gg and hh,

▶︎
all
running...

then removing the middle and composing gg and hh to get hgh \circ g

▶︎
all
running...

so to find the morphism (hg)f(hg)f we have to first stack the morphism for ff onto the above morphism for hghg,

▶︎
all
running...

then composing ff with hgh \circ g to get (hg)f=hgf(h \circ g) \circ f = h \circ g \circ f, and removing the middle to get the below diagram.

▶︎
all
running...

Now we need to show that the morphism h(gf)h(gf) is the above diagram. We start by taking the diagram for gfgf, which is by definition the below diagram,

▶︎
all
running...

and stack on the diagram for hh,

▶︎
all
running...

to get the following

▶︎
all
running...

and then remove the middle and compose gfg \circ f with hh to get h(gf)=hgfh \circ (g \circ f) = h \circ g \circ f,

▶︎
all
running...

and we have the desired diagram, so we have shown that the composition of our morphisms is associative.

We conclude that as defined MSet\mathsf{MSet} is indeed a category. It has Set\mathsf{Set} as a full subcategory by only considering objects of the type

▶︎
all
running...

Where == is the standard equivalence relation, that only elements of a set that are normally considered equal are considered equal. \quad \square


3.11. \triangleright Draw the relevant diagrams and define composition and identities for the category CA,B\mathsf{C}^{A, B} mentioned in Example 3.9. Do the same for the category Cα,β\mathsf{C}^{\alpha, \beta} mentioned in Example 3.10. [§5.5,5.12]\left[\S5.5, 5.12\right]

We define the category CA,B\mathsf{C}^{A,B} to have the following objects and morphisms

▶︎
all
running...

in C\mathsf{C}; and

▶︎
all
running...

Now let's look at another morphism.

▶︎
all
running...

To compose these two let's first put them side by side,

▶︎
all
running...

then remove the middle and compose σ\sigma and τ\tau.

▶︎
all
running...

Here's what an identity looks like

▶︎
all
running...

we can compose it with the following morphism

▶︎
all
running...

by first putting them side by side,

▶︎
all
running...

and then removing the middle part and composing 11 and σ\sigma to get σ1=σ\sigma \circ 1 = \sigma

▶︎
all
running...

we have another identity

▶︎
all
running...

we can compose it with the one above by first putting them side by side,

▶︎
all
running...

and then removing the middle and composing σ\sigma and 11 to get 1σ=σ1 \circ \sigma = \sigma,

▶︎
all
running...

and now we have shown that the identity works on both sides.

We define the category Cα,β\mathsf{C}^{\alpha,\beta} to have the following objects and morphisms

▶︎
all
running...

in C\mathsf{C}, and

▶︎
all
running...

here's another morphism

▶︎
all
running...

to compose them we first put them side by side,

▶︎
all
running...

then compose σ\sigma and τ\tau to get τσ\tau \circ \sigma and remove the middle.

▶︎
all
running...

Here's an identity,

▶︎
all
running...

we can compose it with the following morphism

▶︎
all
running...

by first putting the two side by side,

▶︎
all
running...

then removing the middle and composing 11 and σ\sigma to get σ1=σ\sigma \circ 1 = \sigma.

▶︎
all
running...

As you can see we get the original morphism, so the right-sided identy works. Our left-sided identity would be

▶︎
all
running...

we can compose it with the previous morphism by first putting them side by side,

▶︎
all
running...

and then removing the middle and composing σ\sigma and 11 to get 1σ=σ1 \circ \sigma = \sigma.

▶︎
all
running...

Clearly this is the original morphism, so the left-sided identity works as well. \quad \square

\\