Solutions to the exercises of Category Theory for Scientists, Chapter 5 (written for this wiki; the book has none): CTfS Chapter 5 Exercises. Index: Map of Content.
Solution 5.1.1.3
is the unique monoid homomorphism extending : it sends a list to the product of the images of its entries. So (and ) (Free-Forgetful Adjunction, Free Monoid).
Sources: CTfS, Exercise 5.1.1.3; see Free-Forgetful Adjunction, Map of Content.
Solution 5.1.1.6
- Left adjoint : a set ↦ the discrete graph with vertex set and no arrows. A graph map is just a function , since there are no arrows to preserve.
- Right adjoint : ↦ the “complete” graph with vertices and exactly one arrow for every ordered pair, including a loop at each vertex, i.e. arrows with , . A graph map is just a function , because every arrow has a unique possible image.
So (Adjunction).
Sources: CTfS, Exercise 5.1.1.6; see Adjunction, Map of Content.
Solution 5.1.1.9
, the set of connected components: objects of modulo the equivalence relation generated by “there is a morphism “. A functor must send every morphism to an identity, so it is constant on connected components, i.e. a function . Hint check: functors are the 2 constant ones, and functions are 2 ✓ (the set of objects would give 4). So (Adjunction).
Sources: CTfS, Exercise 5.1.1.9; see Adjunction, Map of Content.
Solution 5.1.4.5
- a. One: must be a morphism in , and the only one is .
- b. : table 0 is with the single column , and table 1 is . So table 0 reads Am ↦ Verb, Baltimore ↦ Noun, Carla ↦ Noun, Develop ↦ Verb, Edward ↦ Noun, Foolish ↦ Adjective, Green ↦ Adjective, and table 1 is {Adjective, Noun, Verb}. The middle table (parts of speech) is dropped and the two foreign keys are composed (Data Migration Functor).
Sources: CTfS, Exercise 5.1.4.5; see Data Migration Functor, Map of Content.
Solution 5.1.4.8
- a. For example , , .
- b. is the colimit of over the fiber , a coproduct because the fibers are discrete. So (Data Migration Functor, Coproduct).
Sources: CTfS, Exercise 5.1.4.8; see Data Migration Functor, Map of Content.
Solution 5.1.4.11
- a. For example , , .
- b. : the limit over each discrete fiber is a product. If a fiber were empty, would put the empty product there, while would put (Data Migration Functor, Product).
Sources: CTfS, Exercise 5.1.4.11; see Data Migration Functor, Map of Content.
Solution 5.2.3.3
- a. Take the four open quadrant-ish squares , , , (open in ). The pairwise overlaps are (strips) and . All the triple overlaps and the 4-fold overlap equal the central square . The preorder has arrows from each overlap to the sets it lies in. Temperature bounds: and .
- b. For the restriction sends ; the bounds still hold on . “Value-assignment throughout ” is apt: an element is a choice of temperature at every point of , within the bounds. It even satisfies the sheaf condition, because compatible local assignments glue uniquely.
- c. Yes: the inclusions commute with restriction (the restriction of a continuous function is continuous), so they form a natural transformation. is a sub-presheaf, in fact a sub-sheaf, since continuity is local. See Sheaf, Presheaf.
Sources: CTfS, Exercise 5.2.3.3; see Map of Content, Sheaf.
Solution 5.3.2.5
is the coproduct inclusion, meaning “return a value, no exception”. is the identity on and on the inner copy of , and sends the outer copy of to identically. Both copies of the exceptions merge: an exception raised at either stage is reported. The unit laws hold because and are both the identity of . Associativity holds because both ways of flattening merge all three copies of . This is Haskell’s Either e. Kleisli composition short-circuits on the first exception (Maybe Monad, Monad).
Sources: CTfS, Exercise 5.3.2.5; see Map of Content, Maybe Monad.
Solution 5.3.3.5
- a. . Conversely a relation gives . These are inverse bijections .
- b. They agree: , so iff there exists with and , the relational composite. The identities are the diagonal relations. Hence (Power Set Monad, Category of Relations).
Sources: CTfS, Exercise 5.3.3.5; see Map of Content, Power Set Monad.
Solution 5.3.3.6
The disjoint union , not the Cartesian product. The projections are the relations and that are the identity on the matching summand and empty on the other. A pair of relations , corresponds to exactly one relation , namely their union. Since via transposition, this is the dual of the coproduct statement (Power Set Monad).
Sources: CTfS, Exercise 5.3.3.6; see Map of Content, Power Set Monad.
Solution 5.3.3.7
Also , with the inclusions (as relations) as injections. A relation out of is a pair of relations out of and out of . Products and coproducts coincide, so has biproducts, as matrices over the Booleans do (Power Set Monad, Coproduct).
Sources: CTfS, Exercise 5.3.3.7; see Map of Content, Power Set Monad.
Solution 5.4.1.4
-
a. : inside a big triangle, place two small disjoint circles near the bottom corners and a small square near the top vertex, none overlapping.
-
b. One way to factor it is with the following pieces:
- places two small circles side by side in a square;
- ;
- places a wide square along the bottom and a small square at the top.
Composition substitutes into the first square of (after rescaling), which puts the two circles in the bottom region of the triangle and leaves the top square alone. That is a positioning of the shape of . So the three morphisms , and compose to . Composition is associative because nested substitution is (Operad).
Sources: CTfS, Exercise 5.4.1.4; see Map of Content, Operad.