Keith wrote:

> Well, every \\(\mathcal{V}\\)-functor can be turned into a \\(\mathcal{V}\\)-profunctor.

Yes! But you didn't write down the correct formula, so let me do that: given a \\(\mathcal{V}\\)-enriched functor \\(F : \mathcal{X} \to \mathcal{Y} \\) we can define a \\(\mathcal{V}\\)-enriched profunctor \\(\Phi: \mathcal{X} \nrightarrow \mathcal{Y} \\), which is just the same as a \\(\mathcal{V}\\)-enriched functor

\[ \Phi : \mathcal{X}^{\text{op}} \times \mathcal{Y} \to \mathcal{V} \]

by this formula:

\[ \Phi(x,y) = \text{hom}(F(x),y) \]

where \\(\text{hom}: \mathcal{Y}^{\text{op}} \times \mathcal{Y} \to \mathcal{V} \\) is the hom-functor for \\(\mathcal{Y}\\).

> So I'm willing to bet we could prove a \\(\mathcal{V}\\)-profunctor version of the \\(\mathcal{V}\\)-enriched Yoneda lemma.

I don't think that's quite on the right track, but profunctors are indeed deeply connected to Yoneda Lemma, and that's worth talking about! Let me talk about the ordinary case, not the enriched case.

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}}} \\), and the [Yoneda embedding]( embeds \\(\mathcal{C} \\) in a full and faithful way in \\(\mathbf{Set}^{\mathcal{C}^{\text{op}}}\\). So, the Yoneda embedding can be seen as the door one walks through to enter the world of profunctors.

All this has an analogue for \\(\mathcal{V}\\)-enriched categories when \\(\mathcal{V}\\) is nice enough, but the most important thing to notice idea is that

Profunctors are to functors as linear algebra is to set theory

I've already said several times that profunctors look just like matrices, and composing profunctors looks just like matrix multiplication. But there's more to it than that!

Any function between sets \\(f: S \to T\\) gives a specially nice sort of linear map from the vector space with basis \\(S\\) to the vector space with basis \\(T\\): namely, the linear map sending each basis element \\(s\\) to the basis element \\(f(s)\\).

Similarly, any functor between categories \\(f: \mathcal{C} \to \mathcal{D}\\) gives a specially nice sort of colimit-preserving functor from \\( \mathbf{Set}^{\mathcal{C}^{\text{op}}}\\) to \\(\mathbf{Set}^{\mathcal{D}^{\text{op}}} \\). Colimits are analogous to linear combinations, so colimit-preserving functors are like linear maps. The embedding of a set in the vector space whose basis is that set is analogous to the Yoneda embedding.

But colimit-preserving functors from \\( \mathbf{Set}^{\mathcal{C}^{\text{op}}}\\) to \\(\mathbf{Set}^{\mathcal{D}^{\text{op}}} \\) are secretly the same as profunctors from \\(\mathcal{C}\\) to \\(\mathcal{D}\\). Thus, _working with profunctors let us apply tools of (categorified) linear algebra to category theory!_

This will be implicit when I begin talking about applications of profunctors in the next lecture. Mainly I'll start using profunctors to do stuff. The connection to linear algebra will be hiding in the background.