Solutions to the exercises of Category Theory for Scientists, Chapter 2 (written for this wiki; the book has none): CTfS Chapter 2 Exercises. Index: Map of Content.
Solution 2.1.2.2
- a. A function : every photoreceptor connects to exactly one ganglion cell (so the assignment is total and single-valued), while a ganglion cell may receive many photoreceptors (so the reverse assignment is not single-valued). It is typically far from injective — this is convergence, information compression.
- b. Generally not. Neurons in the cortex have many outgoing and incoming connections, so a connection pattern between two areas is a Relation (a span of connections), not a function. The retina’s many-to-one wiring is special.
Sources: CTfS, Exercise 2.1.2.2; see Function, Map of Content.
Solution 2.1.2.5
A function is an independent choice of output for each input, so .
- a. .
- b. .
Sources: CTfS, Exercise 2.1.2.5; see Function, Map of Content.
Solution 2.1.2.10
- a. : an isomorphism is a bijection (a permutation); the image of the first element has choices, the second , and so on.
- b. Yes. For there is exactly one function , the empty function, and it is the identity, hence an isomorphism; and .
Sources: CTfS, Exercise 2.1.2.10; see Cardinality, Map of Content.
Solution 2.1.2.13
, any one-element set. A function is determined by the single element it picks out, so is a bijection . These functions are the global elements of . No other works: gives for every , and gives for .
Sources: CTfS, Exercise 2.1.2.13; see Global Element, Map of Content.
Solution 2.4.1.15
- a. To map into we need a map to and a map to ; take and . The universal property gives , i.e. .
- b. Yes. Let . Then and . The identity also satisfies these two equations, and by the uniqueness part of the universal property there is only one map with given components; hence . Symmetrically . See Product, Universal Property.
Sources: CTfS, Exercise 2.4.1.15; see Map of Content, Product.
Solution 2.4.2.13
Olog: a particlea particle or a wavea wave, where the middle box is the Coproduct . A photon, being both a particle and a wave, appears in twice — once as “a photon viewed as a particle” and once as “a photon viewed as a wave” — because the coproduct is a disjoint union. If one wants each physical object once, the right construction is the Pushout over a thing that is both a particle and a wave (with , labelled “is”), which glues the two copies of each photon together. The exercise illustrates that the coproduct is the right notion exactly when the two types are disjoint or when one wants to keep track of the viewpoint.
Sources: CTfS, Exercise 2.4.2.13; see Coproduct, Map of Content.
Solution 2.5.1.3
Take coloured and coloured .
- a. : the red pairs and the blue pairs — six elements, coloured by their common colour. Yellow contributes nothing because has no yellow element.
- b. In the grid (rows , columns ) mark the cells where row colour equals column colour:
| (b) | (r) | (b) | |
|---|---|---|---|
| (r) | ● | ||
| (r) | ● | ||
| (b) | ● | ● | |
| (y) | |||
| (b) | ● | ● |
In general , a sum of products of fiber sizes (Pullback).
Sources: CTfS, Exercise 2.5.1.3; see Map of Content, Pullback.
Solution 2.5.1.5
- a. It is empty: its elements are pairs with .
- b. It is (isomorphic to) the product : every pair satisfies since has only one element. So the product is the pullback over the Terminal Object (Finite Limits in Set).
Sources: CTfS, Exercise 2.5.1.5; see Finite Limits in Set, Map of Content.
Solution 2.5.1.6
- a. and .
- b. is the set of all space-time points at the place of MIT’s founding centre of mass, at every time — a world-line (in Aristotelian, absolute space). is all of space at the instant of the founding — a time-slice. See Finite Limits in Set, Fiber.
Sources: CTfS, Exercise 2.5.1.6; see Finite Limits in Set, Map of Content.
Solution 2.5.1.10
- a. Reasonable: the pullback consists of pairs (person, blue) with the person’s favourite colour equal to blue, i.e. persons whose favourite colour is blue.
- b. Reasonable, for the same reason: pairs (dog, woman) with the dog’s owner equal to that woman, i.e. dogs whose owner is a woman.
- c. Misleading. The pullback is the set of pairs (space, piece of furniture) of equal width. Equal width is neither necessary nor sufficient for a good fit (depth and height matter, and a piece narrower than the space may fit fine). A correct label is “a space in our house and a piece of furniture of the same width”. Labels of limits must describe exactly the set the construction produces (Pullback, Olog).
Sources: CTfS, Exercise 2.5.1.10; see Map of Content, Pullback.
Solution 2.5.3.3
Let be “a published author” and “a paper”, with “has as first paper” and “has as most recent paper”. The Equalizer is “an author whose first paper is their most recent paper”, i.e. an author with exactly one paper (assuming papers are totally ordered in time with no ties). Another example: for an experiment, “an input” with “yields as predicted output” and “yields as measured output”; the equalizer is “an input on which theory and experiment agree”.
Sources: CTfS, Exercise 2.5.3.3; see Equalizer, Map of Content.
Solution 2.6.1.3
None of the three in general. (a) Not everyone thinks a lot about themselves. (b) Unrequited attention is common: a fan thinks about a celebrity, not vice versa. (c) If thinks about and thinks about , need not think about . So is merely a Relation, far from an Equivalence Relation.
Sources: CTfS, Exercise 2.6.1.3; see Equivalence Relation, Map of Content.
Solution 2.6.1.5
Yes: ; ; and equality is transitive. Its classes are the nonempty fibers of .
- a. Yes. Given an equivalence relation , take , the quotient map ; then iff .
- b. Yes: the fibers of form a Partition of . Equivalence relations, partitions and surjections out of (up to isomorphism of the codomain) are three presentations of the same data (Quotient Set).
Sources: CTfS, Exercise 2.6.1.5; see Equivalence Relation, Map of Content.
Solution 2.6.1.10
- a. iff and are joined by a (possibly empty) path of edges, traversed in either direction: “being in the same connected component”.
- b. The set of connected components of the network (Equivalence Relation, Coequalizer).
Sources: CTfS, Exercise 2.6.1.10; see Equivalence Relation, Map of Content.
Solution 2.6.2.6
is a bijection from onto the negative integers . The pushout takes and identifies each with , so all negative integers are glued to the single point . Result: — “the non-negative integers with one extra point standing for all the negatives” (Pushout, Finite Colimits in Set).
Sources: CTfS, Exercise 2.6.2.6; see Finite Colimits in Set, Map of Content.
Solution 2.6.2.7
- a. The pushout is where is generated by identifying in the left copy with in the right copy whenever . Since is reflexive, every is identified with , so the two copies collapse into one; then the remaining identifications are exactly . The pushout is .
- b. In general the pushout is with for ; it need not glue the two copies together (e.g. gives ). Its relationship to the generated equivalence relation : the coequalizer of the two maps is exactly , and if is reflexive the pushout equals this coequalizer. See Equivalence Relation, Pushout.
Sources: CTfS, Exercise 2.6.2.7; see Equivalence Relation, Map of Content, Pushout.
Solution 2.6.3.2
The quotient , i.e. , which can be represented by with wrap-around: a circle. Every real number is identified with its fractional part (Coequalizer, Finite Colimits in Set).
Sources: CTfS, Exercise 2.6.3.2; see Finite Colimits in Set, Map of Content.
Solution 2.7.1.2
= “a US state”, = “a US city”, : “has as capital”, : “is located in”. Then : the capital of a state lies in that state. But : Boston ↦ Massachusetts ↦ Boston is fine, but Cambridge ↦ Massachusetts ↦ Boston Cambridge. So is a section (a Monomorphism) and a retraction (an Epimorphism), neither an isomorphism (Section and Retraction).
Sources: CTfS, Exercise 2.7.1.2; see Map of Content, Section and Retraction.
Solution 2.7.2.2
Yes. A function is an independent choice of an element of for each of the elements of . Edge cases: gives exactly one function (the empty function), and ; , gives no functions, and ; gives one function and (Arithmetic of Sets, Exponential Object).
Sources: CTfS, Exercise 2.7.2.2; see Arithmetic of Sets, Map of Content.
Solution 2.7.2.5
- a. Uncurrying a function gives . For this is .
- b. It evaluates a function at an argument. It is the counit of the adjunction and the universal arrow defining the Exponential Object: every factors uniquely as (Currying).
Sources: CTfS, Exercise 2.7.2.5; see Currying, Map of Content.
Solution 2.7.2.6
. Maps out of a coproduct are pairs of maps: . By Exercise 2.1.2.13, . Hence . Concretely, (Arithmetic of Sets, Currying).
Sources: CTfS, Exercise 2.7.2.6; see Arithmetic of Sets, Currying, Map of Content.
Solution 2.7.3.2
, which has exactly one element, the empty function (= ). So . The rule holds only for : if has an element, there is nowhere to send it (Arithmetic of Sets, Cardinality).
Sources: CTfS, Exercise 2.7.3.2; see Arithmetic of Sets, Cardinality, Map of Content.
Solution 2.7.3.3
Yes. If but and were both nonempty, pick , ; then , a contradiction. So or (Arithmetic of Sets). (In other categories this can fail: in the product of nonzero spaces is nonzero, but “zero divisors” appear e.g. for the tensor product of abelian groups, .)
Sources: CTfS, Exercise 2.7.3.3; see Arithmetic of Sets, Map of Content.
Solution 2.7.4.7
, , and for (the 2-simplex is omitted: the triangle is not filled in). This family is downward closed and contains all atoms (Simplicial Complex).
Sources: CTfS, Exercise 2.7.4.7; see Map of Content, Simplicial Complex.
Solution 2.7.4.12
- a. iff .
- b. , where swaps true and false. Complement of subsets corresponds to negation on the Subobject Classifier (Booleans, Power Set).
Sources: CTfS, Exercise 2.7.4.12; see Booleans, Map of Content.
Solution 2.7.5.6
Let be an epimorphism, any map, and form the pushout with , (so ). Claim: is an epimorphism. Suppose with . Then , and since is epi, . Now and agree after composing with both pushout injections and , so by the uniqueness in the universal property of the pushout, . (This is the formal dual of the pullback argument; in it also follows from epi = surjective, Epimorphism, Pushout.)
Sources: CTfS, Exercise 2.7.5.6; see Epimorphism, Map of Content.
Solution 2.7.6.4
Example: , , — the name has no instance.
- a. In a multiset every name has multiplicity ; a pseudo-multiset allows multiplicity .
- b. Pseudo-multisets are usually more useful: they are exactly the relative sets over , i.e. objects of the Slice Category , which has good categorical properties (limits, colimits; it is a Topos), and they model “bags over a fixed vocabulary”, like word counts, where most words occur 0 times (Multiset).
Sources: CTfS, Exercise 2.7.6.4; see Map of Content, Multiset.
Solution 2.7.6.5
- a. : , , . : , , .
- b. Choose ( ways); then each instance must go into the fiber of , which has 1 element over and 3 over . Name has two instances, so the count is mappings.
- c. Any and any : .
See Multiset.
Sources: CTfS, Exercise 2.7.6.5; see Map of Content, Multiset.
Solution 2.7.6.8
Yes: the composite function . It is a mapping over because — paste the two commuting triangles. Identities are identity functions. This makes relative sets over a category, the Slice Category (Multiset).
Sources: CTfS, Exercise 2.7.6.8; see Map of Content, Multiset.
Solution 2.7.6.9
- a. None, essentially: every set has exactly one function to , and every function commutes with these maps, so (Terminal Object).
- b. A function exists only if , so there is exactly one set over , namely , and is the terminal category (Multiset).
Sources: CTfS, Exercise 2.7.6.9; see Map of Content, Multiset.
Solution 2.7.6.14
They are equivalent: . An indexed set gives the relative set , ; a relative set gives the indexed set of fibers . Mappings correspond (families of fiberwise maps ↔ maps over ), and the two constructions are mutually inverse up to isomorphism. See Indexed Set, Dependent Type (-types vs type families).
Sources: CTfS, Exercise 2.7.6.14; see Dependent Type, Indexed Set, Map of Content.