by Jade Master
Let $ (R,+,*)$ be a ring equipped with a poset structure that is nice enough to enrich in. For concreteness say that R is a quantale. A quantale is a monoidal closed poset with all colimits (the coproduct is the + and the monoidal product is the $ *$)
This post will sketch a proof that there is an embedding of categories
$ i : \mathsf{Mat_R} \hookrightarrow \mathsf{RProf}$
The category $ \mathsf{Mat_R}$ has
The category $ \mathsf{RProf}$ has
The embedding i definitely isn't new. I am guessing that it was mentioned as an offhand remark by someone like Lawvere. Simon Wilerton wrote a blog post talking about it. Regardless, it is one of my favorite category theoretic facts, which isn't the most well-known, so I thought I would make a blog post fleshing out some of the details I haven't seen elsewhere.
the definition of i
A natural number n is sent to the discrete R-category on n elements i(n). This is the R-category whose objects are given by your favorite n-element set and whose hom objects are all given by 0 (the zero element of your ring).
A matrix $ M: n \to m$ is sent to a an R-profunctor
$ i(M) : i(n) \times i(m) \to R$
Note that because $ i(n)$ and $ i(m)$ are discrete, every function of this type on objects extends to a unique R-enriched functor. Also note that the opposite of a discrete R-category is itself, so there no need for an "op" in this profunctor. The values $ i(M)(x,y)$ are given by the matrix components $ M_{xy}$.
proof that i is a functor
The composite of a matrix $ M : n \to m$ with a matrix $ N: m \to l$ has components given by
$ (N \circ M)_{ij} = \sum_{k \leq m} N_{ik} * M_{kj}$
The composite of a R-profunctor $ A: X \to Y$ with an R-profunctor $ B: Y \to Z$ has values given by the coend formula
$ A \circ B (x,y) = \int_{k \in Y} A(x,k) * B(k,y)$
Because R is a poset, the coend turns into coproduct and
$ i(N) \circ i(M) (x,y) = \sum_{k \leq m} i(M)(x,k) * i(N)(k,y) = \sum_{k \leq m} N_{xk}*M_{ky}$
so i preserves composition. The identity matrix $ I: n \to n$ gets sent to the R-profunctor with values $ i(I)(x,y)$ given by 1 if x=y and 0 otherwise. For a profunctor $ A: i(n) \to C$ we have that
$ A \circ i(I) (x,y) = \sum_{k \leq n} A_{xk} * i(I)_{ky} = A_{xy}$
because all of the other entries in the sum are 0. Therefore i respects identities on the right and a similar argument holds for composition on the left.
proof that i is an embedding
By embedding I mean that i is fully faithful and injective on objects.
It remains to show that i is full. If $ D: i(n) \times i(m) \to R$ is an R-profunctor, then because i(n) and i(m) are discrete, D is uniquely determined by its value on objects i.e. by an underlying R-matrix.
Thank you for reading.