I skimmed through books 1, 4, and 5 of my new batch and am currently skimming through 3; it seems I don’t have the mathematical prerequisites to get much out of 2. It will take me a long time to digest all of the interesting things I’ve learned, but I thought I’d discuss an interesting idea coming from Lawvere and Schanuel.
An important idea in mathematics is to reduce an object into its “connected components.” This has various meanings depending on context; it is perhaps clearest in the categories and , and also has a sensible meaning in, for example, for a group . Lawvere and Schanuel suggest the following way to understand several of the examples that occur in practice:
Let be a concrete category with a forgetful functor . If it exists, let be the left adjoint to . Then describes the “discrete” (i.e. “totally disconnected”) objects of , and, if it exists, the left adjoint to is a functor describing the “connected components” of an object in .
I think this is a nice illustration of a construction that is illuminated by the abstract approach, so I’ll briefly describe how this works for a few of my favorite categories.
The category of – for the sake of simplicity – undirected simple graphs has objects specified by a vertex set and a symmetric reflexive relation called adjacency. Morphisms are functions between vertex sets preserving the edge relation. Now, the intuitive definition of the connected components of a graph is as follows: two vertices of a graph are connected if there is a path between them, i.e. a sequence of edges and vertices satisfying the appropriate incidence relations. Connectedness is an equivalence relation, and the connected components are the equivalence classes of this relation.
From a categorical perspective, though, we want to do everything in terms of the morphisms in . So how should we accomplish this? One answer is surprisingly simple.
Proposition: Let be the graph consisting of two vertices and only self-loops. Then the number of connected components of a finite graph is the unique non-negative integer such that the number of morphisms is .
The conceptual content of the proof is that any such morphism must be locally constant, since otherwise it could not preserve adjacency, and every locally constant function is a morphism since there is no adjacency relation between distinct components. This construction, however, has the drawback that it only works for graphs with a finite number of components. A better statement that works for all graphs is that the functor sending a graph to the set of its connected components satisfies a natural equivalence
where is a two-element set in . (I know it’s not a great idea to use the same notation for objects in two categories, but I hope it is clear what this means.) In other words, should be left adjoint to the functor which sends a set to the graph with vertex set that set and with no nontrivial edges; this functor sends to .
Here’s how we “come up” with this functor. The “obvious” choice of forgetful functor sends a graph to its vertex set, and its left adjoint is ! Remember that this means there is a natural identification
since any function from to another graph automatically respects adjacency.
The category has objects the topological spaces and morphisms continuous functions between them. The definition of connectedness in this category is slightly less transparent than in the above two examples; the standard definition is that a topological space is connected if is not the disjoint union of two open subsets of . Again, there is an equivalence relation relating two points if they lie in a connected subset of , and the equivalence classes of this relation is the standard definition of connected component.
Now let’s talk about morphisms. The forgetful functor sends a topological space to its underlying set of points, and it has a left adjoint sending a set to itself in the discrete topology. Let be the discrete space on two points, i.e. the image of on the two-point set. The preimage of both points must be open and disjoint, and any (ordered) separation of into disjoint open sets gives rise to a continuous function . Again, the point here is that any continuous function into a discrete space must be locally constant. More generally, if has connected components, then the number of continuous functions is .
Even more generally, there is a natural identification
exactly as in the other cases.
Unfortunately, things get messy in spaces with infinitely many connected components (thanks to DT below for the correction). The issue is that connected components are always closed, but not always open (although they are open if there are finitely many connected components), and the
locally constant functions functions constant on each connected component are all continuous if and only if each connected component is clopen. For example, is totally disconnected, but its points aren’t open. According to Wikipedia, connected components are clopen if we pass either to the subcategory of topological spaces which are compact Hausdorff or to the subcategory of topological spaces which are also locally connected, and in these subcategories is a left adjoint to as expected. This is slightly unsatisfying, but the full category of topological spaces is messy like that.
One way to think about the above adjunction is that the image of in a category describes its subcategory of “discrete objects,” and then is universal for morphisms into discrete objects. Now, since is a right adjoint, it preserves products, in particular the empty product, so it sends the terminal object of to the terminal object of . Since has the special property that all of its elements are coproducts of the terminal object with itself, and since is also a left adjoint, hence preserves coproducts, it follows that we can describe the subcategory of “discrete objects” without any explicit reference to or : it is just the subcategory of all coproducts of the terminal object (assuming they exist).
This works nicely for all of our above examples. The coproduct in all of the categories above is the disjoint union and the terminal object is the singleton. More precisely, in it is the singleton with one self-loop, in it is the singleton with a trivial action of , and in it is the singleton with the only possible topology.
It would be nice if the connected components functor bore a relationship to the decomposition of, say, representations of a group into irreducible representations, but as stated this can’t work. In any category with a zero object, the coproduct of copies of the zero object is just the zero object again, so the zero object is the only discrete object; in other words, every object is “connected.”