---
tags: seminar, maths, blute, ottawa, Coalgebras over Lawvere metric spaces
---
[Part of a presentation on Coalgebras over Lawvere Metric Spaces](https://hackmd.io/@alexhkurz/HkzAdwlAF)
# Generalizing to Quantales
How far can we push the observation that the notions of behavioural equivalence can be generalised using enriched category theory?
As suggested by Rutten (1998) and Worrell (2000) a fruitful level of generality is coalgebras over the category of categories enriched over a quantale $\Omega$.
Lawvere metric spaces are one of the most interesting examples of categories enriched over a quantale.
## Lawvere Metric Spaces
[Metric Spaces, Generalized Logic, and Closed Categories](https://github.com/mattearnshaw/lawvere/blob/master/pdfs/1973-metric-spaces-generalized-logic-closed-categories.pdf):

Lawvere focusses in his paper on the quantale $[0,\infty]$ where $0$ is top and the quantale-multiplication is addition, but his ideas can be applied to any quantale.
For the remainder of this presentation we follow our article [Extending set functors to generalised metric spaces.](https://lmcs.episciences.org/5132/pdf), where all details and references can be found.
A **quantale** $\Omega$ is a complete lattice with an order-preserving 'multiplication' $\otimes$ and neutral element $e$ such that $v\otimes -$ and $-\otimes v$ have right adjoints for all $v\in\Omega$.
Intuitively, we may think of the order $v\le w$ as representing (i) logical impliciation, $w$ being closer to *truth* than $v$ or (ii) $v$ being a greater *distance* than $w$. In the latter case $\otimes$ is addition of distances and the internal hom $[v,w]$ is $e$ if $v\le w$ and, otherwise, how much further from truth $w$ is than $v$.
The paradigmatic example for the distance interpretation is the subset of real numbers $\Omega=[0,\infty]$ with addition as multiplication and truncated minus as internal hom.
The categories enriched over $[0,\infty]$ are known as **Lawvere metric spaces**. If one uses minimum instead of addition as tensor one obtains **Lawvere ultrametric spaces**.
The following shows an example with a non symmetric distance.
**Example:** Let $X$ be the set of finite and infinite words (strings) over the alphabet $A$. We define a distance on $X$ via $X(s,t)=0$ if $s$ is a prefix of $t$ and, otherwise, $X(s,t)=2^{-n}$ where $n$ is the position of the first letter where $s$ is different from $t$.
In this section we emphasised quantales as lattices of distances. On the other hand, not every quantale lends itself naturally to this interpretation. The next section offers a different interpretation.
## Relational Presheaves
Another way to look at categories enriched over a quantale is as relational presheaves. This point of view is equivalent to the metric point of view, but supports a rather different intutition.
Given a category $X$ enriched over quantale $\Omega$ we build a relational structure on the set $X$ by choosing one binary relation $R_v\subseteq X\times X$ for all $v\in\Omega$, $v\not=\bot$, satisfying
\begin{align}
(x,y) \in R_v & \ \Longleftrightarrow \ X(x,y)\le v
\end{align}
One can axiomatize those relational structures that arise in this way to obtain an equivalent, independent characterization of categories enriched over $\Omega$.
**Example:** Here are two quantales on the 3-element set:
$$
\begin{array}{|c||c|c|c|}
\hline
\otimes & 0 & 1 & 2 \\
\hline
\hline
0 & 0 & 0 & 0 \\
1 & 0 & 1 & 2 \\
2 & 0 & 2 & 2 \\
\hline
\end{array}
\quad\quad
\begin{array}{|c||c|c|c|c|}
\hline
[-,-] & 0 & 1 & 2 \\
\hline
\hline
0 & 2 & 2 & 2 \\
1 & 0 & 1 & 2 \\
2 & 0 & 0 & 2 \\
\hline
\end{array}
%
\quad\quad
\quad\quad
\quad\quad
%
\begin{array}{|c||c|c|c|}
\hline
\otimes & 0 & 1 & 2 \\
\hline
\hline
0 & 0 & 0 & 0 \\
1 & 0 & 1 & 1 \\
2 & 0 & 1 & 2 \\
\hline
\end{array}
\quad\quad
\begin{array}{|c||c|c|c|c|}
\hline
[-,-] & 0 & 1 & 2 \\
\hline
\hline
0 & 2 & 2 & 2 \\
1 & 0 & 2 & 2 \\
2 & 0 & 1 & 2 \\
\hline
\end{array}
$$
On the left hand side ($e=1$): The objects of an $\Omega$-category are events subject to a schedule, endowed with a preorder ${x\leq y}$ given by $R_1$ (with the interpretation that "$x$ happens no later than $y$") and a binary relation $x\prec y$ given by $R_2$ (which is intended to mean "$x$ happens strictly earlier than $y$"). $R_2\subseteq R_1$ says that strict precedence implies weak precedence, while the multiplication law $1\otimes 2=2$ accounts for the prosset-law that $x\le y \prec z \le w$ implies $x\prec w$.
On the right hand side ($e=2$): The relation $x<^ty$ given by $X_1$ is interpreted as "$x$ precedes $y$ in time" and the relation $x<^c y$ given by $R_2$ is interpreted as "$x$ causally precedes $y$". $R_2\subseteq X_1$ captures that causal precedence implies temporal precedence and the multiplication law $1\otimes 2=1$ reflects that $x<^t y <^c z <^t w$ implies $x<^t w$.
**Example:** Of course, one can also see Lawvere metric spaces in this way. This is closely related to uniformities.
**Thousands of more examples** are available in Jipsen and Galatos [RESIDUATED LATTICES OF SIZE UP TO 6](https://math.chapman.edu/~jipsen/finitestructures/rlattices/RLlist3.pdf).
## Summary
My longterm aim is to expand general coalgebraic methods to the quantale enriched setting. In the next section, we will look at one successful generalisation in more detail and the last section will look at one area in which many challenges still remain.
Here are some articles generalising set and order based coalgebra to the enriched setting.
- A Kurz, J Velebil: <b><a
href="papers/kv-relation-lifting.pdf">Relation lifting</a></b>. J. Log. Algebr. Meth. Program. 85(4): 475-499 (2016). Postfinal version with a typo corrected thanks to Uli Fahrenberg.
- M. Bilkova, A. Kurz, D. Petrisan, J. Velebil: <b><a
href="https://arxiv.org/pdf/1307.4682v3">Relation lifting, with an application to the many-valued cover modality</a></b>. Logical Methods in Computer Science, 2013.
- A. Kurz, J. Velebil: <b><a href="papers/Kurz-Velebil-2013.pdf">Enriched logical connections</a></b>. Appl. Categ. Structures, online first, 23 September 2011. <a href="papers/enriched-logical-connections.pdf">pdf</a>
- J. Velebil, A. Kurz: <b><a href="">Equational presentations of functors and monads </a></b>. Mathematical Structures in Computer Science (2011) 21(2):363-381. <b><a href="papers/velebil-kurz-mscs2011.pdf">pdf</a></b>
## Further References
The example of relational presheaves are due to:
- R. Casley, On the specification of concurrent systems. PhD thesis, Stanford University (1991)
- H. Gaifman and V. Pratt, Partial order models of concurrency and the computation of functions. In: LICS 1987, IEEE Computer Society Press, Ithaca, NY (1987), 72–85