Part 2/2

Now, in the profunctor side of things, John starts with a [teaser](

> Sums, existential quantifiers, colimits and coends are all special cases of 'weighted colimits'. Basically they're all ways to think about *addition*.

And [here]( drops the bomb:

> Colimits are analogous to linear combinations, so colimit-preserving functors are like linear maps.

I think he means here weighted colimits but wants to help us to join the dots with Yoneda embedding theory.

We can recall how the reationals sit inside the real numbers, with the reals defined as limits of sequences of rationals. The reals are the (Cauchy) completion of the rationals, and constant sequences of rationals represent how they embed. In categories we have limits along diagrams, and dually colimits. Speaking about colimits, not all categories have all of them. The process of extending a category to a bigger one having all of them is called cocompletion. The [free cocompletion]( is a universal construction giving a *best* cocompletion in the sense of having a concrete universal property. The Yoneda Embedding explains that the original category embeds fully and faithfully in the free cocompletion (though it is bigger). The free cocompletion of a category \\(C\\) is its presheaf category, a functor category \\([C^{op}, \mathbf{Set}] = \mathbf{Set}^{C^{op}}\\). The Yoneda Embedding sends an object of \\(C\\) to a representable functor. As the rationals in the reals, a presheaf is the limit of a diagram of representable presheaves, that are images of the objects of \\(C\\) by the Yoneda embedding. This is standard category theory. A paragraph in the nLab entry says that this generalizes well to enriched categories, changing \\(\mathbf{Set}\\) for \\(\mathcal{V}\\).

One can view cocompletness as extra structure a category can have, with cocontinous functors between them preserving that structure and forming a category \\(\mathbf{Cocomp}\\).

There are size issues here. We cannot build functor categories with large category exponentials, so we are speaking about cocompleting only small categories.

In Mac Lane/Moerdijk, they say:

> The process of sending a category to its preseaf category is a functor from \\(\mathbf{Cat}\\), the (large) category of all small categories to \\(\mathbf{Cocomp}\\), the ("superlarge") category of "all" cocomplete categories, with morphisms all colimit preserving functors. This corollary states in effect that the Yoneda embedding provides universal arrows and so, like universal arrows generally, constitute the units of an adjunction (an adjunction in which forming the presheaf category is left adjoint to the forgetful functor \\(\mathbf{Cocomp}\\ \to \mathbf{Cat}\\) that forget cocompleteness. This suggestive formulation stumbles on the fact that cocomplete categories are hardly ever small [CWM, p. 110], so do not become small by forgetting the colimits!

So the cocompletion is a functor, and having an adjoint is suggestive but we have size issues.

In the quoted nLab entry John analyzes [this](, and concludes we're struck in recovering an adjunction, but cites a discarded draft from Fiore et al. that confronted the issue (!). I'm continuing ignoring this size issues as if an actual adjunction existed, hoping the problems are manageable somehow.

In the enriched case, the colimits considered are weighted. [Here]( in the nCafe John explains how categorical colimits are special weighted colimits, and even reduce to linear combinations in a specific case (the measure example).

The core of the analogy would be that the functor sending a small category \\(C\\) to the \\(\mathcal{V}\\)-enriched presheaf category \\(\mathcal{V}^{C^{op}}\\) (that puts a hat on \\(C\\)), making it enrichedly cocomplete (having all weighted colimits) is analogous to the free vector space functor, that takes a set and builds its linear span (the set of formal linear combinations).

For vector spaces, when I sent the basis vector of an space capriciously to another, I determined a linear map. For a \\(\mathcal{V}\\) enrichedly cocomplete category \\(C\\), if I have an enriched functor \\(F:C \to \mathcal{V}^{D^{op}}\\), the Yoneda extension lifts it to a weighted-colimit preserving \\(\mathcal{V}\\)-enriched functor \\(\hat{F}:\mathcal{V}^{C^{op}} \to \mathcal{V}^{D^{op}}\\)

I said:


\[ \Phi : X^{\text{op}} \times Y \to \mathbf{Bool} \]

we write \\( \Phi : X\nrightarrow Y \\) but nLab, Wikipedia and Borceaux write \\( \Phi : Y\nrightarrow X \\) (from the covariant to the contravariant argument).

And John [replied](

> I actually prefer the nLab, Wikipedia and Borceaux convention, because a \\(\mathcal{V}\\)-enriched functor from \\(\mathcal{X} \times \mathcal{Y}^{\text{op}}\\) to \\(\mathcal{V}\\) can be reinterpreted as a functor from \\(\mathcal{X}\\) to the so-called **presheaf category** \\(\mathcal{V}^{\mathcal{Y}^{\text{op}}}\\), and that's a good thing.

whose Yoneda extension as per before leads to:

> Profunctors \\(\Phi: \mathcal{C} \nrightarrow \mathcal{D}\\) between categories are secretly the same as colimit-preserving functors \\(F : \mathbf{Set}^{\mathcal{C}^{\text{op}}} \to \mathbf{Set}^{\mathcal{D}^{\text{op}}} \\)

So profunctors emerge by themselves as the suitable notion of map for cocomplete categories and cocompleteness preserving maps (in the enriched context) [EDIT: this could need a rethink]

Now, from [this](

> The embedding of a set in the vector space whose basis is that set is analogous to the Yoneda embedding.

The embedding of the basis in the space is the "insertion of generators", that is the unit of the free-forgetful adjunction between sets and vector spaces (CWM. pg. 87), and so is the unit of the vector space monad (as in [here]( Analogously, one wants that the would-be enriched cocompletion monad ("hat monad") had as unit the Yoneda embedding.

As for the "hat monad" product (natural transformation), I haven't worked any details and I'm running out of weekend, but it must boil down to the coend formula that Keith was [referring to](, while John tells us that we could track coends to weighted colimits.

So "the category of sets is to the category of vector spaces as the category of small categories is to the category of profunctors".

As final note, the Kleisli category of that informal hat monad is then that category of Urs I spoken of [before](, with categories as placeholder to enriched presheaf categories, and profunctors as morphisms. True that 2-morphisms don't enter here. I found fortunate anyhow that they came out, in that it could serve as honest motivation to approach to the doorstep of 2-categorical and higher stuff that can be difficult for non-pros to reach.