Dan wrote:

> Are there any available online resources on this topic?

The relevant buzzword is [Day convolution](https://ncatlab.org/nlab/show/Day+convolution) but I'm afraid it will be a rather demanding project to extract the information you want from the much more general work that people have done on this.

> Is it true that given a quantale \\(\mathcal{V}\\) and two \\(\mathcal{V}\\)-enriched categories \\(\mathcal{X}\\) and \\(\mathcal{Y}\\) then their matrix multiplication \\(\mathcal{X}\*\mathcal{Y}\\) is also a \\(\mathcal{V}\\)-enriched category?

That seems unlikely, but I could be mixed up. Take \\(\mathcal{X}\\) and \\(\mathcal{Y}\\) to be two \\(\mathbf{Bool}\\)-categories for example. These are preorders. How would you make \\(\mathcal{X} \ast \mathcal{Y}\\) into a \\(\mathbf{Bool}\\)-category again? Questions like this are usually not very subtle. There's usually either an obvious way to proceed, which usually works - or no obvious way, and no way at all. (Of course, "obvious" means "obvious after you have a clear mental picture of what's going on".)

> I see that in section 2.5.3 of the book the repeated matrix multiplication is used to obtain the desired quantale-enriched categories.

Yes, _repeated_ matrix multiplication is key here. If \\(\mathcal{X}\\) is \\(\mathcal{V}\\)-weighted graph then we build up a \\(\mathcal{V}\\)-category by iterated matrix multiplication.

The easiest way to understand this is to take \\(\mathcal{V} = \mathbf{Bool}\\). Then a \\(\mathcal{V}\\)-weighted graph \\(\mathcal{X}\\) is just a graph: for each pair of nodes you have an edge ("true") or not ("false"). Then we want to build up a preorder where \\(x \le y\\) iff there's a path from \\(x\\) to \\(y\\) in our graph.

\\(\mathcal{X}\\) has the paths of length 1, \\(\mathcal{X} \ast \mathcal{X}\\) has the paths of length 2, and so on. We need to go on forever, in a certain clever way, to get all paths!

And we need all paths to ensure that our preorder obeys the transitive law. For example, if there's a path of length 2 from \\(x\\) to \\(y\\) and a path of length 3 from \\(y\\) to \\(z\\), we know there's a path of length 5 from \\(x\\) to \\(z\\). But if we quit at \\(\mathcal{X} \ast \mathcal{X} \ast \mathcal{X} \ast \mathcal{X}\\) we wouldn't get that path.

This makes me feel it's unlikely that \\(\mathcal{X} \ast \mathcal{Y}\\) would be a preorder even if \\(\mathcal{X}\\) and \\(\mathcal{Y}\\) are already preorders. How are you going to get transitivity?

The book also discusses the case \\(\mathcal{V} = \mathbf{Cost}\\). That's much more fun! The idea is someone tells you the prices of all direct flights between cities, and you have to work out the cost of the cheapest route between cities, by looking through one-step flights, two-step flights, etc. Again we need to go on forever.

> Are there any available online resources on this topic?

The relevant buzzword is [Day convolution](https://ncatlab.org/nlab/show/Day+convolution) but I'm afraid it will be a rather demanding project to extract the information you want from the much more general work that people have done on this.

> Is it true that given a quantale \\(\mathcal{V}\\) and two \\(\mathcal{V}\\)-enriched categories \\(\mathcal{X}\\) and \\(\mathcal{Y}\\) then their matrix multiplication \\(\mathcal{X}\*\mathcal{Y}\\) is also a \\(\mathcal{V}\\)-enriched category?

That seems unlikely, but I could be mixed up. Take \\(\mathcal{X}\\) and \\(\mathcal{Y}\\) to be two \\(\mathbf{Bool}\\)-categories for example. These are preorders. How would you make \\(\mathcal{X} \ast \mathcal{Y}\\) into a \\(\mathbf{Bool}\\)-category again? Questions like this are usually not very subtle. There's usually either an obvious way to proceed, which usually works - or no obvious way, and no way at all. (Of course, "obvious" means "obvious after you have a clear mental picture of what's going on".)

> I see that in section 2.5.3 of the book the repeated matrix multiplication is used to obtain the desired quantale-enriched categories.

Yes, _repeated_ matrix multiplication is key here. If \\(\mathcal{X}\\) is \\(\mathcal{V}\\)-weighted graph then we build up a \\(\mathcal{V}\\)-category by iterated matrix multiplication.

The easiest way to understand this is to take \\(\mathcal{V} = \mathbf{Bool}\\). Then a \\(\mathcal{V}\\)-weighted graph \\(\mathcal{X}\\) is just a graph: for each pair of nodes you have an edge ("true") or not ("false"). Then we want to build up a preorder where \\(x \le y\\) iff there's a path from \\(x\\) to \\(y\\) in our graph.

\\(\mathcal{X}\\) has the paths of length 1, \\(\mathcal{X} \ast \mathcal{X}\\) has the paths of length 2, and so on. We need to go on forever, in a certain clever way, to get all paths!

And we need all paths to ensure that our preorder obeys the transitive law. For example, if there's a path of length 2 from \\(x\\) to \\(y\\) and a path of length 3 from \\(y\\) to \\(z\\), we know there's a path of length 5 from \\(x\\) to \\(z\\). But if we quit at \\(\mathcal{X} \ast \mathcal{X} \ast \mathcal{X} \ast \mathcal{X}\\) we wouldn't get that path.

This makes me feel it's unlikely that \\(\mathcal{X} \ast \mathcal{Y}\\) would be a preorder even if \\(\mathcal{X}\\) and \\(\mathcal{Y}\\) are already preorders. How are you going to get transitivity?

The book also discusses the case \\(\mathcal{V} = \mathbf{Cost}\\). That's much more fun! The idea is someone tells you the prices of all direct flights between cities, and you have to work out the cost of the cheapest route between cities, by looking through one-step flights, two-step flights, etc. Again we need to go on forever.