### Magnitude Homology Reading Seminar, II

#### Posted by Simon Willerton

*guest post by Scott Balchin*

Following on from Simon’s introductory post, this is the second installment regarding the reading group at Sheffield on magnitude homology, and the first installment which looks at the paper of Leinster and Shulman. In this post, we will be discussing the concept of magnitude for enriched categories.

The idea of magnitude is to capture the essence of *size* of a (finite) enriched category. By changing the ambient enrichment, this magnitude carries different meanings. For example, when we enrich over the monoidal category $[0,\infty ]$ we capture metric space invariants, while changing the enrichment to $\{ \text {true},\text {false}\}$ we capture poset invariants.

We will introduce the concept of magnitude via the use of zeta functions of enriched categories, which depend on the choice of a size function for the underlying enriching category. Then, we describe magnitude in a more general way using the theory of weightings. The latter will have the advantage that it is invariant under equivalence of categories, a highly desirable property.

What is presented here is taken almost verbatim from Section 2 of Leinster and Shulman’s Magnitude homology of enriched categories and metric spaces. It is, however, enhanced using comments from various other papers and, of course, multiple $n$-Café posts.

## Sizes on monoidal categories

Recall that:

- A
*symmetric monoidal category*consists of a triple $(\mathbf{V},\otimes ,I)$ where $\mathbf{V}$ is a category, and $\otimes$ is a symmetric bifunctor $\mathbf{V} \times \mathbf{V} \to \mathbf{V}$ with identity object $I$. - A
*semiring*(or*rig*) $\mathbb{K}$ is a ring without additive inverses.

**Definition:** A *size* is a function $\operatorname{\#} \colon \text {ob}(\mathbf{V}) \to \mathbb{K}$ such that:

- $\operatorname{\#}$ is invariant under isomorphism: $a \cong b \Rightarrow \operatorname{\#}a = \operatorname{\#}b$.
- $\operatorname{\#}$ is multiplicative: $\operatorname{\#}(I)=1$ and $\operatorname{\#}(a \otimes b) = \operatorname{\#}a \cdot \operatorname{\#}b$.

**Example:** Let $(\mathbf{V},{\otimes}, I)=(\text {FinSet},\times, \{\star\})$ and $\mathbb{K} = \mathbb{N}$. Then we can take $\operatorname{\#}$ to be the cardinality. Note that $\mathbb{N}$ is the initial object in the category of semirings, and therefore by defining a size on $\mathbb{N}$, we can define a size on any other semiring by taking the unique map $\phi \colon \mathbb{N} \to S$, $\phi (1) = 1_{S}$.

**Example:** Let $(\mathbf{V},{\otimes}, I)= ([0,\infty ], +, 0)$. Here $[0,\infty ]$ is the category whose objects are the non-negative reals together with $\infty$ where there is a morphism $a \to b$ if and only if $a \geq b$, and the monoidal structure is addition $+$. We take $\mathbb{K} = \mathbb{R}$ and set $\operatorname{\#}a = e^{-a}$. The choice of $e$ here is arbitrary, we could take any positive real number $q$, and note that we have $q^{a} = e^{-t a}$ for $t = \operatorname{ln}q$.

Let $\mathbf{V}$ be essentially small, and $\mathbb{K} = \mathbb{N}[\text {ob}(\mathbb{V})/\cong ]$ be the monoid semiring of the monoid of isomorphism classes of objects in $\mathbf{V}$. This is the univerval example in that any other size on $\mathbb{V}$ factors uniquely through it.

For example, if $\mathbf{V} = [0,\infty ]$ as before, then the elements of this universal semiring are formal $\mathbb{N}$-linear combinations of numbers in $[0,\infty ]$, and are therefore of the form

$a_{1}[\ell _{1}] + a_{2}[\ell _{2}] + \cdots + a_{n}[\ell _{n}].$

Since multiplication in $\mathbb{K}$ is defined via $[\ell _{1}] \cdot [\ell _{2}] = [\ell _{1} + \ell _{2}]$, it makes more sense to write $[\ell ]$ as $q^{\ell }$ for a formal variable $q$. Therefore we can see the elements of $\mathbb{K}$ represented as generalised polynomials

$a_{1}q^{\ell _{1}} + a_{2}q^{\ell _{2}} + \cdots + a_{n}q^{\ell _{n}}$

where the $\ell _{i} \in [0,\infty ]$. We write this semiring of generalised polynomials as $\mathbb{N}[q^{[0,\infty ]}]$.

We can now compare this universal size construction with the previous example of $\operatorname{\#}a = e^{-a}$. There is an **evaluation map** $\mathbb{N}[q^{[0,\infty ]}] \to \mathbb{R}$ that substitutes $e^{-1}$ (or any other positive real number) for $q$. Therefore, the universal size valued in $\mathbb{N}[q^{[0,\infty ]}]$ contains all of the information of the sizes $a\mapsto e^{-t a}$ for all values of $t$.

Here are some further examples of sizes associated to other symmetric monoidal categories. However, we will not be considering any of these in the rest of this post.

**Example:**

- $(\mathbf{V},\otimes ,I) = (\mathbf{sSet},\otimes ,\Delta [0])$. We can take $\operatorname{\#}$ to be the Euler characteristic of the realisation of the simplicial set.
- $(\mathbf{V},\otimes ,I) = (\mathbf{FDVect},\otimes ,\mathbb{C})$. We can take $\operatorname{\#}$ to be the cardinality of the vector space
- $(\mathbf{V},\otimes ,I) = ([0,\infty ],\text {max},0)$. This is the same category as above, however we have changed the monoidal structure to be the maximum instead of addition. Categories enriched over this are
**ultrametric spaces**, such as the $p$-adic numbers. In this case $\operatorname{\#}$ cannot be $e^{-a}$, instead, it needs to be some form of indicator function. We (arbitrarily) choose the interval $[0,1]$ and say that $\operatorname{\#}a = 1$ if $a \leq 1$, and $0$ otherwise.

## Enriched categories

Many people think that an enriched category is a category in which the hom-sets have extra structure. Whilst such a thing is usually an enriched category, the notion of *enriched category* is much more encompassing than that. The homs in an enriched category might not be sets, they might just be objects in some abstract category, so they might not even have elements, as we will see in the metric space example below.

**Definition:** For $(\mathbf{V},{\otimes},I)$ a monoidal category, a **category enriched over $\mathbf{V}$** – or, a **$\mathbf{V}$-category** – $X$ consists of a set of objects $\operatorname{ob}(X)$ such that the following hold:

- for each pair $a,b \in \operatorname{ob}(X)$ there is a specified obect $X(a,b)\in \mathbf{V}$ called the
**hom-object**; - for each triple $a,b,c \in \operatorname{ob}(X)$ there is a specified morphism $X(a,b)\otimes X(b,c)\to X(a,c)$ in $\mathbf{V}$ called
**composition**; - for each element $a \in \operatorname{ob}(X)$ there is a specified morphism $id_a\colon 1\to X(a,a)$ in $\mathbf{V}$ called the
**identity**.

These are required to satisfy assocativity and identity axioms which we won’t go into here; see the nLab for the details.

**Example:** If $(\mathbf{V},{\otimes}, I)=(\text {FinSet},\times, \{\star\})$ then a $\mathbf{V}$-category is precisely a small category with finite hom-sets.

**Example:** If $(\mathbf{V},{\otimes}, I)=([0,\infty ],+,1)$ then a $\mathbf{V}$-category is an **extended quasi-pseudo metric space** (in the sense of Lawvere). The various adjectives here mean the following:

- pseudo: $d(x,y)$ does not imply $x=y$.
- quasi: $d(x,y)$ is not necessarily equal to $d(y,x)$.
- extended: $d(x,y)$ is allowed to be $\infty$.

Why does this enrichment give us something like a metric space? For each pair of objects $x,y$, we will denote the hom $X_{[0,\infty ]}(x,y) \in \mathbb{R}^{+}$ as $d(x,y)$. Now, the identity axiom of the enrichment tells us that for each object $x \in X$ there is a morphism $0 \to d(x,x)$ in $[0,\infty ]$ which tells us that $0 \geq d(x,y) \geq 0$, and therefore $d(x,x) = 0$. Finally the composition tells us that for all triples of objects $x,y,z \in X$ we have a morphism $d(x,y) + d(y,z) \to d(x,z)$, and therefore $d(x,y) + d(y,z) \geq d(x,z)$ which gives us the triangle axiom.

## Magnitude of finite enriched categories

For us, a square matrix will be one whose rows and columns are indexed by the same finite set (this means that we do not impose an ordering on the rows and columns). In particular, there is a category whose objects are finite sets, and whose morphisms $A \to B$ are functions $A \times B \to \mathbb{K}$ with composition by matrix multiplication. The square matrices that we are interested in are the endomorphisms of this category. Note that this latter description illuminates what we mean by such a square matrix being invertible.

**Definition:** Let $X$ be a $\mathbf{V}$-category with finitely many objects, where we denote the hom-object by $X(x,y)$. Then its **zeta function** is the $\text {ob}(X) \times \text {ob}(X)$ matrix over $\mathbb{K}$ such that

$Z_{X,\mathbb{K}}(x,y) = \operatorname{\#}(X(x,y)).$

Our notation is slightly different here to the usual, in that we wish to explicitly keep track of the semiring $\mathbb{K}$.

**Definition:** We say that $X$ has **Möbius inversion** (with respect to $\mathbb{K}$ and $\operatorname{\#}$) if $Z_{X,\mathbb{K}}$ is invertible over $\mathbb{K}$. If $X$ has Möbius inversion, then we set its **magnitude**, $\operatorname{Mag}_{\mathbb{K}}(X)$, is the sum of all the entries of $Z_{X,\mathbb{K}}^{-1}$.

**Example:** Let $\mathbf{V} = \text {FinSet}$, $\mathbb{K} = \mathbb{Q}$ and $#$ be the cardinality. We take $X$ to be any finite category which is skeletal (i.e., isomorphic objects are necessarily equal) and contains no nonidentity endomorphisms. Then $X$ has Möbius inversion, and its magnitude is equal to the Euler characteristic of the geometric realisation of its nerve.

Note that if $X$ were not skeletal, then there would be two identical rows in $Z_{X,\mathbb{K}}$ and the determinant would be zero. This raises an observation that the magnitude of a category is not invariant under equivalence of categories.

Let us expand a bit on the last comment made in the example above. Let $X$ be a category of the above form. Let $a,b \in X$, we say that an **$n$-path** from $a$ to $b$ is a diagram

$a = a_{0} \to a_{1} \to \cdots \to a_{n} = b$

Such a path is a **circuit** if $a=b$, and non-degenerate if no $f_{i}$ is the identity. Then for our particular $X$, we have

$Z_{X,\mathbb{Q}}^{-1}(a,b) = \sum _{n \geq 0}(-1)^{n} | \{ \text{non-degenerate} \: n\text{-paths} \: \text{from} \: a \: \text{ to } \: b \} | \in \mathbb{Z}$

Now, we note that for our choice of $X$, the nerve contains only finitely many non-degenerate simplices and we get that

$\chi (|NX|) = \sum _{n \geq 0} (-1)^{n} |\{ \text{non-degenerate } \: n \:\text{-simplices} \: \text{in } \: NX\} |$

The claimed result then follows from this.

**Example:** Remember from above that if $\mathbf{V}=[0,\infty ]$ then a $\mathbf{V}$-category is an *extended quasi-pseudo metric space*. With the family of $\mathbb{R}$-valued size functions $e^{-t d}$, the resulting magnitude of an (extended quasi-pseudo-)metric space is an object of interest and has been studied extensively.

There is more probabilistic chance of a matrix being invertible over a field or a ring. Therefore if $\mathbb{K}$ is given as a semiring, it makes sense to universally complete it to a field or a ring. The universal semirings can be completed to rings by allowing integer coefficients as opposed to natural number coefficients. These rings need not be integral domains, in particular, $\mathbb{Z}(q^{[0,\infty ]})$ contains zero divisors

$q^{\infty }(1-q^{\infty }) = q^{\infty }- q^{\infty +\infty } = q^{\infty }- q^{\infty }= 0.$

However, by omitting $\infty$ (and only caring about quasi-psuedo metrics) we indeed do get an integral domain $\mathbb{Z}[q^{[0,\infty )}]$. Its field of rational fractions written $\mathbb{Q}[q^{[0,\infty ]}]$ (or more suggestively $\mathbb{Q}(q^{\mathbb{R}})$) consists of **generalised rational functions**

$\frac{a_{1}q^{\ell _{1}} + a_{2}q^{\ell _{2}} + \cdots + a_{n}q^{\ell _{n}}}{b_{1}q^{k_{1}} + b_{2}q^{k_{2}} + \cdots + b_{m}q^{k_{m}}}$ with $a_{i},b_{j} \in \mathbb{Q}$ and $\ell _{i},k_{j} \in \mathbb{R}$.

**Theorem:** Any finite quasi-metric space (i.e., a finite skeletal $[0,\infty )$-category) has Möbius inversion over $\mathbb{Q}(q^{\mathbb{R}})$.

To prove this we make the field $\mathbb{Q}(q^{\mathbb{R}})$ ordered by inheriting the order of $\mathbb{Q}$ and declaring the variable $q$ to be infinitesimal. Therefore we order the generalised polynomials lexicographically on their coefficients, starting with the most negative exponents of $q$.

The condition $d(x,x)=0$ of a metric space gives us that the diagonal entries of $Z_{X,\mathbb{Q}(q^{\mathbb{R}})}$ are all $q^{0} = 1$. The skeletal condition ($d(x,y) \gt 0$ if $x\neq y$) means that the off-diagonal entries are $q^{d(x,y)}$ which is infinitesimal as $d(x,y)\gt 0$. Therefore, we get that the determinant of $Z_{X,\mathbb{Q}(q^{\mathbb{R}})}$ is a sum of the diagonal terms (whose entries are $e^{d(x,x)}=e^{0}=1$) and a finite number of infinitesimals, which is necessarily positive and therefore non-zero. Therefore $Z_{X,\mathbb{Q}(q^{\mathbb{R}})}$ is indeed invertible, and the theorem is proved.

## Magnitudes via weightings

We now look at a way of generalising magnitudes using weightings. The advantage of this will be invariance under equivalence, a property highly desirable for any categorical invariant.

**Definition:** A **weighting** on a finite $\mathbf{V}$-category $X$ is a function $w \colon \text {ob}(X) \to \mathbb{K}$ such that $\sum _{y} \operatorname{\#}(X(x,y)) \cdot w(y) = 1$ for all $x \in X$. A *coweighting* on $X$ is a weighting on $X^{op}$.

Here are some simple examples.

**Example:**

- Consider the category (i.e., enriched over $\mathbf{FinSet}$) $b_{1} \leftarrow a \rightarrow b_{2}$. Then this category carries a unique weighting given by $w(a)=-1$ and $w(b_{i})=1$.
- It is possible for a category to have no weightings. For an instance of this see Example 1.11(c) of Leinster’s paper The Euler characteristic of a category.
- Consider a category with two objects and an isomorphism between them. A weighting is then given by a pair of rational numbers whose sum is 1. Therefore, there are infinitely many weightings on this category.

We can relate the notion of weighting to Möbius inversion in the following way.

**Theorem:** If $\mathbb{K}$ is a field, then a $\mathbf{V}$-category $X$ has Möbius inversion if and only if it has a unique weighting $w$, and if and only if it has a unique coweighting $v$, in which case $\operatorname{Mag}(X) = \sum _{x} w(x) = \sum _{x} v(x)$.

**Example:**

The category $b_{1} \leftarrow a \rightarrow b_{2}$ has zeta function given by $Z_{X,\mathbb{Q}}= \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$ This matrix has inverse $Z_{X,\mathbb{Q}}^{-1}= \begin{pmatrix} 1 & -1 & -1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$ and therefore its magnitude $\operatorname{Mag}(X) = 1+1+1-1-1=1$. We reconsider the weighting on $X$, and see that the sum of the weightings is $1+1-1=1$.

- The category $\bullet \cong \bullet$ has zeta function given by $Z_{X\mathbb{Q}}= \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$ which clearly has no inverse, and therefore the category has no magnitude.

**Theorem:** If a $\mathbf{V}$-category $X$ has both a weighting $w$ and a coweighting $v$ then $\sum _{x} w(x) = \sum _{x} v(x)$.

**Definition:** A $\mathbf{V}$-category has **magnitude** if it has both a weighting $w$ and a coweighting $v$, in which case its **magnitude** is the common value of $\sum _{x} w(x)$ and $\sum _{x} v(x)$.

This generalised notion of magnitude is that it is invariant under equivalence of $\mathbf{V}$-enriched categories unlike the definition involving Möbius inversions.

**Theorem:** If $X$ and $X'$ are equivalent $\mathbf{V}$-enriched categories, and $X$ has a weighting, a coweighting, or has magnitude, then so does $X'$.

We provide a brief explanation of why this is true. Let $F \colon X \to X'$ be an equivalence. Given $a \in X$, we write $C_{a}$ for the number of objects in the isoclass of $a$, and similarly $C_{a'}$ for $a' \in X'$. Take a weighting $l$ on $X'$, and set $k(a) = (C_{Fa}/C_{a})l(Fa)$. Then $k$ is a weighting on X.

**Theorem:** If $X$ and $X'$ are equivalent $\mathbf{V}$-enriched categories, and both have magnitude, then $\operatorname{Mag}(X) = \operatorname{Mag}(X')$.

Next time we will be looking at how Hochschild homology comes into the picture