I am told that the answer to the question in the title is a profunctor. However, below I sketch a different way that one could think about structure-preserving relations between categories. My questions are
Is the thing I define below the same thing as a profunctor (for small categories at least)? If so, how can I see the connection?
If not, does the thing I define have a name, and can it be satisfactorily defined in general, not just for small categories? And is it useful for anything?
Here's my definition:
Let $C$ and $D$ be small categories. Define a relator (for want of a better name) as a relation $\sim$ between ${\rm Ob}(C)$ and ${\rm Ob}(D)$ and a relation that I'll also denote $\sim$ between the morphisms of $C$ and the morphisms of $D,$ such that:
- For $P\in {\rm Ob}(C)$ and $X\in {\rm Ob}(D)$, if $P\sim X$ then ${\rm Id}_P \sim {\rm Id}_X$
- For morphisms $f:P\to Q$ in $C$ and $u:X\to Y$ in $D$, if $f\sim u$ then $P\sim X$ and $Q\sim Y$.
- For morphisms $f:P\to Q$ and $g:Q\to R$ in $C$, and $u:X\to Y$ and $v:Y\to Z$ in $D$, if $f\sim u$ and $g\sim v$, then $f;g \sim u;v$.
The point being that a functor is just a special case of this, in which every object in $C$ relates to exactly one object in $D$, and every morphism in $C$ relates to exactly one morphism in $D.$
I restricted it to small categories because a relation is a subset of the Cartesian product, which isn't defined for proper classes. I do not have a good idea about how it would generalise.
Your definition makes perfect sense, and in essence it's nothing else but a subcategory of $C\times D$.
Note, however, the composition of two such relations does not necessarily satisfy the given properties, as we can have $\alpha:a\to b$ and $\beta:c\to d$ in $C$ with different objects $a,b,c,d$, and $a\sim x,\ b\sim y,\ c\sim y,\ d\sim z,\ \alpha\sim\xi,\ \beta\sim\eta$ with $\xi:x\to y,\ \eta:y\to z$ in $D$, then in the composition $\sim^{op};\sim$ we should have $\xi;\eta$ with itself, which is not guaranteed.
However, every such relation indeed gives rise to a profunctor (actually, one in both directions), by formally adding an arrow $c\to d$ [resp. $d\to c$] to the disjoint union of $C$ and $D$, whenever $c\sim d$, and define formal compositions with these, such that whenever $\alpha\sim\gamma$, the corresponding square is made commutative.