Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

April 17, 2023

Metric Spaces as Enriched Categories I

Posted by Simon Willerton

Last November I gave a talk entitled “Looking at metric spaces as enriched categories ” at the African Mathematics Seminar at the invitation of Café regular Bruce Bartlett. You may remember that John gave a seminar the month before me.

The talk was aimed at general pure mathematicians, with my main assumption being that the audience knew what a group action, a representation, a metric space and a category were.

My talk was in two halves, the first half was about enriched categories in general and how metric spaces can be viewed as enriched categories. The second half was about ‘applications’ of this that I’d been involved in, that was mainly an overview of the theory of magnitude of metric spaces and a little bit on directed tight spans because of the involvement of some African mathematicians.

I decided that I would write up the first half of the talk and that is what this post and the next post will be on. The definition of enriched category will come in the next post. Hopefully it is clear from the above that these two posts are likely to be rather basic as far as the regulars at the Café are concerned!

Some category theory background

Two general types of categories

As a mathematician you come across categories of various flavours; two general types of categories are the following.

Firstly there are the categories which consist of specific mathematical structures and structure preserving map. Here are some examples:

  • 𝒱ect{\mathbf{\mathcal{V}ect}}, vector spaces and linear maps;

  • 𝒮et{\mathbf{\mathcal{S}et}}, sets and function;

  • 𝒜b{\mathbf{\mathcal{A}b}}, abelian groups and group homomorphisms;

  • 𝒯op{\mathbf{\mathcal{T}op}}, topological spaces and continuous maps;

  • 𝒜ct G{\mathbf{\mathcal{A}ct}}_G, sets with right GG-actions and equivariant maps, for a finite groups GG;

  • ep A{\mathbf{\mathcal{R}ep}}_A, representations and intertwining maps for an algebra AA.

In this post, for concreteness, we will work with vector spaces over the complex numbers, so in particular, an algebra means a complex vector space with an associative unital product; a good example of such an algebra is the group algebra G\mathbb{C}G for a finite group GG.

Secondly, there are the categories that are themselves manifestations of standard mathematical structures. Here are some examples.

  • When GG is a finite group there is the one object category G{\mathbf{\mathcal{B}}}G with GG as its set of morphisms and with composition corresponding to multiplication in the group.

    BG

  • Similarly when AA is an algebra there is the one object category A{\mathbf{\mathcal{B}}}A with the underlying set of AA as its set of morphisms and with composition corresponding to multiplication in AA.

    BA

  • For (P,)(P, \le) a partially ordered set (poset) there is a category (also often called PP) whose objects are the elements of PP and where there is at most one morphism between each pair of objects and a unique morphism pqp\to q precisely when pqp \le q.

A poset

  • For TT a topological space there is the poset (𝒪 T,)({\mathbf{\mathcal{O}}}_T, \subseteq) of open sets in TT ordered by inclusion, and hence the corresponding category 𝒪 T{\mathbf{\mathcal{O}}}_T.

Certainly not all categories can necessarily be classified as one of these two types and the two types are very likely not disjoint, but highlighting these two types does give a perspective which can be helpful.

Constructing new categories from old

Given categories 𝒞{\mathbf{\mathcal{C}}} and 𝒟{\mathbf{\mathcal{D}}} you can form the product category 𝒞×𝒟{\mathbf{\mathcal{C}}}\times {\mathbf{\mathcal{D}}} where the objects of 𝒞×𝒟{\mathbf{\mathcal{C}}}\times {\mathbf{\mathcal{D}}} are pairs (c,d)(c, d) with c𝒞c \in {\mathbf{\mathcal{C}}} and d𝒟d \in {\mathbf{\mathcal{D}}}, and where each hom-set is simply the product of the appropriate hom-sets in 𝒞{\mathbf{\mathcal{C}}} and 𝒟{\mathbf{\mathcal{D}}}, i.e. Hom((c,d),(c,d))Hom(c,c)×Hom(d,d)\operatorname{Hom}((c, d), (c', d')) \coloneqq\operatorname{Hom}(c, c') \times \operatorname{Hom}(d, d'). The composition is given in the obvious way: (f,g)(f,g)(ff,gg)(f, g) \circ (f', g') \coloneqq(f\circ f', g \circ g').

You can also define the functor category [𝒞,𝒟][{\mathbf{\mathcal{C}}}, {\mathbf{\mathcal{D}}}] where the objects are the functors of the form F:𝒞𝒟F \colon {\mathbf{\mathcal{C}}}\to {\mathbf{\mathcal{D}}} and the morphisms are the natural transformations between such functors.

msaec_nat_trans.png

As usual, 𝒞 op{\mathbf{\mathcal{C}}}^{\mathrm{op}} denotes the opposite category of 𝒞{\mathbf{\mathcal{C}}}, and so the functor category [𝒞 op,𝒟][{\mathbf{\mathcal{C}}}^{\mathrm{op}}, {\mathbf{\mathcal{D}}}] can be thought of as the category of contravariant functors from 𝒞{\mathbf{\mathcal{C}}} to 𝒟{\mathbf{\mathcal{D}}}.

Scalar-valued functors, or presheaves

For a given category 𝒞{\mathbf{\mathcal{C}}} we can take the functor categories [𝒞,𝒟][{\mathbf{\mathcal{C}}}, {\mathbf{\mathcal{D}}}] and [𝒞 op,𝒟][{\mathbf{\mathcal{C}}}^\mathrm{op}, {\mathbf{\mathcal{D}}}] in the special case where 𝒟=𝒮et{\mathbf{\mathcal{D}}}={\mathbf{\mathcal{S}et}} and consider the categories

[𝒞,𝒮et]and[𝒞 op,𝒮et].[{\mathbf{\mathcal{C}}}, {\mathbf{\mathcal{S}et}}] \quad \text{and} \quad [{\mathbf{\mathcal{C}}}^\mathrm{op}, {\mathbf{\mathcal{S}et}}].

As we will see below, you can consider 𝒮et{\mathbf{\mathcal{S}et}} to be the ‘base category’ or ‘category of scalars’ of ordinary category theory, analogous to a base ring or base field in algebra; so these two categories can be thought of as categories of ‘scalar-valued functors’, analogous to spaces of scalar-valued functions on sets or spaces.

Category theorists will often call [𝒞 op,𝒮et][{\mathbf{\mathcal{C}}}^\mathrm{op}, {\mathbf{\mathcal{S}et}}] the category of presheaves on 𝒞{\mathbf{\mathcal{C}}} for reasons given below, and, by extension, will sometimes call [𝒞,𝒮et][{\mathbf{\mathcal{C}}}, {\mathbf{\mathcal{S}et}}] the category of co-presheaves on 𝒞{\mathbf{\mathcal{C}}}. However, this terminology does seem to obscure, in a slightly intimidating fashion, the fundamental nature of these objects.

Let’s have a look at a couple of examples.

  • For GG a finite group and 𝒞=G{\mathbf{\mathcal{C}}}= {\mathbf{\mathcal{B}}}G, the associated one-object category, we can obtain the category of of sets equipped with a right GG-action 𝒜ct G{\mathbf{\mathcal{A}ct}}_G and the category of of sets equipped with a left GG-action G𝒜ct{}_G{\mathbf{\mathcal{A}ct}} as functor categories: 𝒜ct G[G op,𝒮et], G𝒜ct[G,𝒮et].{\mathbf{\mathcal{A}ct}}_G\cong [{\mathbf{\mathcal{B}}}G^\mathrm{op}, {\mathbf{\mathcal{S}et}}], \quad {}_G{\mathbf{\mathcal{A}ct}}\cong [{\mathbf{\mathcal{B}}}G, {\mathbf{\mathcal{S}et}}] . For instance, if we have a functor ρ:G𝒮et\rho \colon {\mathbf{\mathcal{B}}}G \to {\mathbf{\mathcal{S}et}} then the single object G\bullet \in {\mathbf{\mathcal{B}}}G gets sent to a set Sρ()S\coloneqq \rho(\bullet) and the action is given by the functor on the level of hom-sets, ρ:G=Hom G(,)Hom 𝒮et(S,S)\rho \colon G = \mathrm{Hom}_{ {\mathbf{\mathcal{B}}}G}(\bullet, \bullet) \to \mathrm{Hom}_{{\mathbf{\mathcal{S}et}}}(S, S).

  • For XX a topological space, the category of presheaves is defined to be the contravariant functor category [𝒪 X op,𝒮et][{\mathbf{\mathcal{O}}}_X^\mathrm{op}, {\mathbf{\mathcal{S}et}}] and this is where the category theorists took the term ‘presheaf’ from.

The Yoneda embedding

The Yoneda Lemma is one of the most fundamental results in category theory and a corollary of it is that the functor, the Yoneda embedding, from a category into its category of contravariant functors,

y:𝒞[𝒞 op,𝒮et];y(c)(c)Hom 𝒞(c,c),y \colon {\mathbf{\mathcal{C}}}\hookrightarrow [{\mathbf{\mathcal{C}}}^\mathrm{op}, {\mathbf{\mathcal{S}et}}]; \quad y(c)(c') \coloneqq\operatorname{Hom}_{\mathbf{\mathcal{C}}}(c', c),

is bijective on the level of hom-sets, i.e., it is a fully faithful embedding.

Similarly, the contravariant version to the other category of functors is also fully faithful:

y¯:𝒞 op[𝒞,𝒮et];y¯(c)(c)Hom 𝒞(c,c).\overline{y} \colon {\mathbf{\mathcal{C}}}^\mathrm{op}\hookrightarrow [{\mathbf{\mathcal{C}}}, {\mathbf{\mathcal{S}et}}]; \quad \overline{y}(c)(c') \coloneqq\operatorname{Hom}_{\mathbf{\mathcal{C}}}(c, c').

One analogy that it might be useful to bear in mind is the embedding of a discrete set into its ring of functions via the ‘delta-function’:

δ:SFunctions(S,R);δ(x)(y){1 if x=y 0 otherwise,\delta\colon S\hookrightarrow \operatorname{Functions}(S, R); \quad \delta(x)(y) \coloneqq\begin{cases} 1 & \text{if }x=y \\ 0 & \text{otherwise}, \end{cases}

where RR could be any ring such as \mathbb{Z} or /2\mathbb{Z}/2\mathbb{Z}, acting as the base ring.

If we consider the Yoneda embedding when we take 𝒞=G{\mathbf{\mathcal{C}}}={\mathbf{\mathcal{B}}}G where GG is a finite group, then we should have a fully faithful embedding

y:G op[G,𝒮et]= G𝒜ct.y\colon {\mathbf{\mathcal{B}}}G^\mathrm{op} \hookrightarrow [{\mathbf{\mathcal{B}}}G, {\mathbf{\mathcal{S}et}}] = {}_G{\mathbf{\mathcal{A}ct}}.

By definition G{\mathbf{\mathcal{B}}}G has a single object \bullet with Hom G(,)=G\operatorname{Hom}_{{\mathbf{\mathcal{B}}}G}(\bullet, \bullet)=G. You can check that y()y(\bullet) is regG{}^\mathrm{reg}{G}, that is GG equipped with the left-regular GG-action. Then Hom G op(,)=G op\operatorname{Hom}_{{\mathbf{\mathcal{B}}}G^\mathrm{op}}(\bullet, \bullet)=G^\mathrm{op} should act on the left-regular action regG{}^\mathrm{reg}{G} by intertwining maps; this it does via the right regular action! The Yoneda embedding being fully faithful is then equivalent to having an isomorphism

G opHom G𝒜ct( regG, regG).G^\mathrm{op}\xrightarrow{\sim} \operatorname{Hom}_{{}_G{\mathbf{\mathcal{A}ct}}}\left({}^\mathrm{reg}{G}, {}^\mathrm{reg}{G}\right).

Alternative base categories

An important observation at this point is that it is not always correct to use 𝒮et{\mathbf{\mathcal{S}et}} as the ‘base category’. For instance, one feels that just as the category of GG-actions 𝒜ct G{\mathbf{\mathcal{A}ct}}_G is given by the functor category [G,𝒮et][{\mathbf{\mathcal{B}}}G, {\mathbf{\mathcal{S}et}}] so the representation category ep A{\mathbf{\mathcal{R}ep}}_A should be given a functor category like [A,𝒱ect][{\mathbf{\mathcal{B}}}A, {\mathbf{\mathcal{V}ect}}], however this does not quite work. You need to consider linear functors, thus taking into account the fact that both AA and Hom 𝒱ect(V,V)\operatorname{Hom}_{\mathbf{\mathcal{V}ect}}(V, V) should be thought of as vector spaces rather than just sets. One way to do this is to use the category of vector spaces as our base category and consider both A{\mathbf{\mathcal{B}}}A and 𝒱ect{\mathbf{\mathcal{V}ect}} as categories enriched over 𝒱ect{\mathbf{\mathcal{V}ect}} and to take [A,𝒱ect][{\mathbf{\mathcal{B}}}A, {\mathbf{\mathcal{V}ect}}] to be the 𝒱ect{\mathbf{\mathcal{V}ect}}-enriched category of 𝒱ect{\mathbf{\mathcal{V}ect}} enriched functors. We should see what that means!

We’re taking the perspective here that doing enriched category theory means doing category over a different base category, or category of scalars. This ‘enriching category’ needs certain basic structure, and if one insists on further structure then the theory becomes richer. (We’ll see this next time.) Anyway, the basic structure that is required is that of a monoidal category. A monoidal category (𝒱,,𝟙)({\mathbf{\mathcal{V}}}, {\otimes}, \mathbb{1}) consists of a category 𝒱{\mathbf{\mathcal{V}}}, a ‘monoidal product’ :𝒱×𝒱𝒱{\otimes} \colon {\mathbf{\mathcal{V}}}\times {\mathbf{\mathcal{V}}}\to {\mathbf{\mathcal{V}}} and a ‘monoidal unit’ object 𝟙𝒱\mathbb{1}\in {\mathbf{\mathcal{V}}}, and these satisfy associativity and unit conditions which we needn’t worry about here.

Let’s consider some pertinent examples.

  • (𝒮et,×,{*})({\mathbf{\mathcal{S}et}}, \times, \{\ast\}): this is the category of sets with the cartesian product and a chosen one object set as the unit object; this is the usual ‘base category’.

  • (𝒱ect,,)({\mathbf{\mathcal{V}ect}}, \otimes, \mathbb{C}): this is the category of complex vector spaces with the tensor product and the base field as the unit object.

  • (([0,],),+,0)\left(([0, \infty], \ge), +, 0\right): this is the partially ordered set of non-negative real numbers with infinity added, considered as a category, so there is a single morphism aba \to b precisely when aba \ge b; this is equipped with addition as the product, and zero as the unit object. We will denote this monoidal category with ¯ +\overline{\mathbb{R}}_{+}.

    If you picture the non-negative reals as going upwards then you can imagine the morphisms as allowing you to slide downwards, but not upwards.

The non-negative real numbers

Next time we will see the definition of enriched category.

Posted at April 17, 2023 12:33 PM UTC

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/3461

4 Comments & 0 Trackbacks

Re: Metric Spaces as Enriched Categories I

I am not seeing how the examples G\mathcal{B}G and A\mathcal{B}A differ. In particular, where does the latter get its vector space structure from? What am I missing?

Posted by: Fran Burstall on April 17, 2023 6:39 PM | Permalink | Reply to this

Re: Metric Spaces as Enriched Categories I

Thanks Fran. There is no vector space structure on A\mathcal{B} A yet. And there is no difference between A\mathcal{B} A and G\mathcal{B} G yet. (Well there is the fact that G\mathcal{B} G has a finite hom-set and A\mathcal{B} A has an infinite hom-set, but that’s not terribly important at this point.) They are both just one object categories.

I guess that’s not clear. Is there a place in particular where this confusion arises?

Posted by: Simon Willerton on April 17, 2023 8:31 PM | Permalink | Reply to this

Re: Metric Spaces as Enriched Categories I

Simon wrote:

And there is no difference between ℬA and ℬG yet.

Not yet. But someday, in the fullness of time, the fact that A is an algebra will make ℬA into a special sort of category called an algebroid with one object, and the fact that G is a group will make ℬG into a special sort of category called a groupoid with one object.

I guess you see a pattern: a thing gives a one-object thingoid. The fun really starts when you study general thingoids.

Posted by: John Baez on April 20, 2023 1:42 AM | Permalink | Reply to this

Mozibur Rahman

I got interested in magmas recently and I was pondering how we can get a many object magma - a magmoid. Then a magma ought to be a singleton magmoid. Since morphisms in categories are associative by definition, it seems to me that categories can’t do this, even if enriched over some other base category. But I see from NLab there is such a thing as a semicategory where the identity axiom is dropped. So why not also allow the associativity to be dropped?

I haven’t heard of such a thing but that doesn’t mean it can’t exist. Perhaps it is in hiding somewhere.

If we call such a category, a magmoid then a single object such category ought to be a magma. Personally, I think it ought to be called a magmatory as magmoids make me think of groupoids and all morphisms in groupoids are invertible. So a magmoid ought to be a magmatory where all morphisms are invertible. Usually we would need an identity to define inverses in magmas but I see again in NLab that there is such a thing as an invertible magma which doesn’t require identities to defined beforehand. I don’t see why this can’t be lifted to a magmatory. I expect similar non-associative structures like quasigroups and loops ought to fit into this framework.

Probably this is all wrong as I’m an amateur at this. Still its fun inventing neologisms ;-).

That leads me onto another question. Is there a more compact name for an associative magma? There is semigroup. And there is semi-monoid. But personally I think such a basic idea ought to have its own name rather than being semi something else.

Posted by: Mozibur Rahman Ullah on May 4, 2023 12:38 PM | Permalink | Reply to this

Post a New Comment