Metric Spaces as Enriched Categories II
Posted by Simon Willerton
In the previous post I set the scene a little for enriched category theory by implying that by working ‘over’ the category of sets is a bit like working ‘over’ the integers in algebra and sometimes it is more appropriate to have a different base category just as it is sometimes more appropriate to have a different base ring. Below, we’ll see with the case of metric spaces that changing the base category can seemingly change the flavour quite a lot.
An example which I was using for illustration in the last post was that whilst, on the one hand, you can encapsulate the group actions of a group via the functor category where is the one object category with as its set of morphisms, on the other hand, you cannot in ordinary category theory encapsulate the category of representations of , an algebra over the complex numbers, as a category of functors into the category of vector spaces as you might hope. Indeed in ordinary category theory you can’t really see the structure of a vector space lurking in the one-object category .
In this post I’ll explain what an enriched category is and how enriched category theory can, for example, allow a natural expression for a representatation category as a functor category. I’ll go on to show, following Lawvere’s insight, how metric spaces and much metric space theory can be seen to live within the realm of enriched category theory.
I’ll finish with an afterword on my experiences and thoughts on why enriched categories should be more appreciated but aren’t!
Enriched categories
We get the notion of an enriched category by first considering the following definition of category. (Actually, it’s a definition of locally small category as it requires that the morphisms between a pair of objects form a set rather than anything bigger.) Here we will switch notation for hom-sets, moving from to the category theorists’ .
Definition 1. A category consists of a collection of objects, , together with the following data which is required to satisfy the unit and associativity axioms:
(i) for all there is a specified set
(ii) for all there is a specified function between sets
(iii) for all there is a specified element which we can consider as a specified function
We obtain the defintion of enriched category by simply replacing the references to the monoidal category with references to the monoidal category that we are using as our base category.
Definition 2. A category enriched over , or simply a -category, consists of a collection of objects, , together with the following data which is required to satisfy unit and associativity axioms:
(i) for all there is a specified object
(ii) for all there is a specified morphism in
(iii) for all there is a specified morphism in
If you take to be the category of vector spaces then you see that a -category is like a category except the ‘hom-sets’ are actually vector spaces and the composition maps are bilinear. The identity morphism in is recovered by taking where means the unit complex number. For instance, for an algebra , there is the one-object -category and the -category of -representations.
There is an accompanying notion of -functor between -categories.
Definition 3. For -categories and , a -functor consists of a function and for each pair a specified morphism in . These are required to satisfy composition and unit axioms.
In particular, a -functor is required to be given by linear maps between the hom-spaces.
The nicer that the enriching category is, the nicer that the theory of -categories is. I won’t go into detail here, but in particular, we have the following.
If is so-called closed monoidal then you can make into a -category itself, analogous to how you can make a ring into a module over itself.
If is braided (in particular if it is symmetric) so that there are natural and coherent isomorphisms for , then for a pair of -categories and you can form the tensor product -category , analogous to how you can take tensor product of modules for commutative rings.
If has sufficiently many limits then for a pair of -categories and you can form the functor -category where the objects are -functors of the form . (There can be size issues here if is not sufficiently small.)
In many cases of interest the enriching category is braided closed monoidal with sufficiently many limits, so a small -category has a -category of scalar-valued functors, or presheafs, on .
For instance, for an algebra , the -category of representations of can be given as the functor category on :
This is what we were hoping for above.
Metric spaces as -categories
If we enrich over the monoidal category of extended non-negative real numbers then we can simplify the general definition a little and get the following.
Definition 4. An -category, consists of a collection of objects, , together with the following data:
(i) for all there is a specified number
(ii) for all there is an inequality
(iii) for all there is an equality
There are several things to note here. Firstly, because is a thin category, all diagrams commute so the associativity and unitality conditions are automatically satisfied and so do not need to be specified. Secondly, the “composition morphism” in (ii) is clearly a “triangle inequality”, so we can think of the hom-object as a “distance” from to . Thirdly, from the definition of enriched category the “zero self-distance” in (iii) would be written as but as we know that the hom-object is non-negative, we can conclude the inequality is actually an equality.
If, as indicated above, we think of the hom-objects as being distances then we can think of a -category as a kind of generalized metric space. The traditional notion of metric space was due to Fréchet: by contrast, -categories are sometimes known as Lawvere metric spaces; these differ from Fréchet metric spaces in the following three ways.
The distance is not necessarily symmetric, so we allow .
The distance between two points can be infinite.
The distance from one point to a different point can be zero.
We’ll see some examples illustrating these below.
From this generalized metric space perspective, an -functor is viewed as a short map or distance non-increasing function, so it is a function such that for all .
Here are the promised examples.
- We can equip with the structure of an -category. This is basically the fact that is a closed monoidal category. It is a slight abuse of notation to refer to the category and the -category as but it doesn’t usually cause confusion. Anyway we define the generalized metric as follows. The operation is sometimes referred to as truncated subtraction. If we think of the extended non-negative real numbers as standing going upwards, then for we can think of it being ‘free’ to descend from to , but having a ‘cost’ of associated with ascending from to .
As is sufficiently nice – it has all limits, which are given by suprema – if and are -categories then there is the functor -category consisting of short maps from to and the generalized metric given as follows:
This is a measurement of the furthest apart that and get. In particular, if we take then we can get the following generalized metric on scalar-valued short maps:
The Yoneda embedding is an distance preserving (ie. isometric) function: In the case of a classical metric space we have as the distance is symmetric and the embedding in sometimes known as the Kuratowski embedding.
We can see that this notion of generalized metric on function spaces is a refinement of the standard notion of ‘sup-metric’ on function spaces. If we look at all functions from the unit interval to the set then we can consider these as short maps from to where is the interval equipped with the discrete metric so that the distance is if and is otherwise. Then for functions we have that the sup-metric between them is a symmetrization of the enriched category metric:
Now we can see an example where even if we are just interested in classical metric spaces we naturally end up with an asymmetric metric, although it is usually symmetrized to obtain the Hausdorff metric! Given a classical metric space we can take the set of compact, non-empty subsets, . We can then define a generalized metric on this by
One way of thinking about is that it is measuring the furthest you would have to go if you were dropped at a random point in and wanted to take the shortest route to . Because we are considering compact sets we have the following simple characterization of zero-distance, which is telling us that the generalized metric is encoding the usual order on subsets: (If we hadn’t used compact subsets then we wouldn’t have had such a nice characterization.) This leads us to see that this generalized metric is naturally asymmetric even though we started with a symmetric metric on . The usual Hausdorff metric is obtained by symmetrizing this generalized metric: Clearly, however, the Hausdorff metric is losing information, such as the partial order, that was contained in the generalized metric.
This concludes the quick introduction to metric spaces as enriched categories. However, this perspective does allow other categorical techniques to be used with metric spaces, leading to some fruitful mathematics.
Afterword
It’s probably worth mentioning my experiences a little. As a Part III student at Cambridge, like many students before and after me, I attended Peter Johnstone’s Category Theory course, so I had familiarity with category theory, but, as I didn’t take the exam, I didn’t have a deep understanding. I then went on to do my PhD and later work on things related to algebraic topology and topological quantum field theory which both have strong categorical underpinnings. Coming back to the basics of category theory when I was involved in the Catsters with Eugenia Cheng I realised that various things didn’t chime with my experience of using categories and certain things seemed almost arcane to me, for example the importance put on things like monoids and functors into the category of sets.
It wasn’t until many, many years later that I started to understand that this cognitive dissonance was because in areas like algebraic topology, topological field theory, representation theory and algebraic geometry it is much more useful to consider that you’re not working over the category of sets but over some other category like vector space or abelian groups or chain complexes. As a ‘working mathematician’, rather than monoids and functors into the category of sets, I would have been much more familiar with algebras or rings and with functors into the category of vector spaces or abelian groups.
Although I was aware of the notion of enriched category theory, I didn’t get a thorough appreciation of quite what it meant until I’d spent a lot of time thinking about metric spaces in this context in particular via Lawvere’s rather wonderful paper Metric spaces, generalized logic and closed categories. I think one reason that enriched category is not more appreciated as a perspective is that the main text, Kelly’s Basic Concepts of Enriched Category Theory, is not particularly welcoming and only entered into by the brave! I could probably try to make the area more welcoming by polishing up my first attempt at a draft book on enriched categories, but with all of the other things I want to do, unfortunately I don’t see that happening too soon.
Re: Metric Spaces as Enriched Categories II
You liken enriched categories to working with k-algebras for k not necessarily the integers. Is there a notion of “base change” in the enriched category context?
Typos btw: definiton, cateogry.