It looks like you're new here. If you want to get involved, click one of these buttons!

- All Categories 2.2K
- Applied Category Theory Course 323
- Applied Category Theory Exercises 149
- Applied Category Theory Discussion Groups 43
- Applied Category Theory Formula Examples 15
- Chat 468
- Azimuth Code Project 107
- News and Information 145
- Azimuth Blog 148
- Azimuth Forum 29
- Azimuth Project 190
- - Strategy 109
- - Conventions and Policies 21
- - Questions 43
- Azimuth Wiki 707
- - Latest Changes 699
- - - Action 14
- - - Biodiversity 8
- - - Books 2
- - - Carbon 9
- - - Computational methods 38
- - - Climate 53
- - - Earth science 23
- - - Ecology 43
- - - Energy 29
- - - Experiments 30
- - - Geoengineering 0
- - - Mathematical methods 69
- - - Meta 9
- - - Methodology 16
- - - Natural resources 7
- - - Oceans 4
- - - Organizations 34
- - - People 6
- - - Publishing 4
- - - Reports 3
- - - Software 20
- - - Statistical methods 2
- - - Sustainability 4
- - - Things to do 2
- - - Visualisation 1
- General 38

Options

Since the puzzles from last time were quite substantial, let me copy the nice solutions provided by Anindya Bhattyacharyya and Matthew Doty here. They add up to the proof of this:

**Theorem.** Suppose \(\mathcal{V}\) is a commutative quantale. Then there is a category \(\mathbf{Prof}_\mathcal{V}\) whose objects are \(\mathcal{V}\)-enriched categories and whose morphisms are \(\mathcal{V}\)-enriched profunctors, where the composite of \(\mathcal{V}\)-enriched profunctors \(\Phi \colon \mathcal{X} \nrightarrow \mathcal{Y} \) and \(\Psi \colon \mathcal{Y} \to \mathcal{Z}\) is defined by

$$ (\Psi\Phi)(x,z) = \bigvee_{y \in \mathrm{Ob}(\mathcal{Y})} \Phi(x,y) \otimes \Psi(y,z).$$
We'll break the proof into lots of lemmas. In all that follows, \(\mathcal{V}\) is a commutative quantale and \(\mathcal{W}, \mathcal{X}, \mathcal{Y}, \mathcal{Z}\) are \(\mathcal{V}\)-enriched categories. Letters like \(w,w',x,x',y,y',z,z'\) will always stand for objects in the enriched categories with the same letters as their names - and when I write inequalities involving these I mean they're true *for all choices* of these objects, unless I say otherwise.

First we check that the formula above really defines a \(\mathcal{V}\)-enriched profunctor!

**Lemma.** Suppose \(\Phi \colon \mathcal{X} \nrightarrow \mathcal{Y} \) and \(\Psi \colon \mathcal{Y} \to \mathcal{Z}\) are \(\mathcal{V}\)-enriched profunctors. Then the formula

$$ (\Psi\Phi)(x,z) = \bigvee_{y} \Phi(x,y) \otimes \Psi(y,z) $$ specifies a \(\mathcal{V}\)-enriched profunctor \(\Psi\Phi \colon \mathcal{X} \to \mathcal{Y}\).

**Proof.** We need to show that

$$ \Psi\Phi \colon \mathcal{X}^{\text{op}} \times \mathcal{Z} \to \mathcal{V} $$ is a \(\mathcal{V}\)-enriched functor, meaning

$$ (\mathcal{X}^\text{op}\times \mathcal{Z})((x, z), (x', z')) \leq \mathcal{V}(\Psi\Phi)(x, z), (\Psi\Phi)(x', z')) $$ or in other words

$$ \mathcal{X}(x', x) \otimes \mathcal{Z}(z, z') \leq (\Psi\Phi)(x, z)\multimap(\Psi\Phi)(x', z') .$$ Using the definitions this becomes

$$ \mathcal{X}(x', x) \otimes \left(\bigvee_y \Phi(x, y)\otimes\Psi(y, z)\right) \otimes\mathcal{Z}(z, z') \leq \bigvee_y \Phi(x', y)\otimes\Psi(y, z') $$ or since \(\otimes\) distributes over \(\bigvee\) in a quantale,

$$ \bigvee_y \mathcal{X}(x', x) \otimes \Phi(x, y)\otimes\Psi(y, z) \otimes\mathcal{Z}(z, z') \leq \bigvee_y \Phi(x', y)\otimes\Psi(y, z'). $$ This is true because

$$ \mathcal{X}(x', x) \otimes \Phi(x, y) \le \Phi(x',y) $$ and

$$ \Psi(y, z) \otimes\mathcal{Z}(z, z') \le \Phi(y,z') $$ by the following theorem. \( \qquad \blacksquare \)

This is a very handy tool:

**Theorem.** The following are equivalent:

\(\Phi : \mathcal{X} \nrightarrow \mathcal{Y}\) is a \(\mathcal{V}\)-enriched profunctor.

\(\mathcal{X}(x', x) \otimes \Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \Phi(x',y')\) for all \(x,x',y,y'\).

\(\mathcal{X}(x', x) \otimes \Phi(x, y) \leq \Phi(x', y)\) and \(\Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \Phi(x, y')\) for all \(x,x',y,y'\).

**Proof.** Item 1 is true iff \(\Phi : \mathcal{X}^\text{op} \times \mathcal{Y} \to \mathcal{V}\) is a \(\mathcal{V}\)-functor, which by definition is true iff

$$ (\mathcal{X}^\text{op} \times \mathcal{Y})((x, y), (x', y')) \leq \mathcal{V}(\Phi(x, y), \Phi(x',y')) $$ for all \(x,x',y,y'\). Using the definitions, this is equivalent to

$$ \mathcal{X}(x', x) \otimes \mathcal{Y}(y, y') \leq \Phi(x, y) \multimap \Phi(x', y') .$$ By the definition of\(\multimap\) this in turn is equivalent to

$$ \Phi(x, y) \otimes \mathcal{X}(x', x) \otimes \mathcal{Y}(y, y') \leq \Phi(x', y') $$ Because \(\otimes\) is commutative this is the same as item 2. Thus, 1 is equivalent to 2.

Next note that \(I \leq \mathcal{X}(x, x)\) and \(I \leq \mathcal{Y}(y, y)\) by the definition of a \(\mathcal{V}\)-category. Thus, given 2 we can set \(y' = y\) to get

$$ \mathcal{X}(x', x) \otimes \Phi(x, y) = \mathcal{X}(x', x) \otimes \Phi(x, y) \otimes I \leq \mathcal{X}(x', x) \otimes \Phi(x, y) \otimes \mathcal{Y}(y, y) \leq \Phi(x', y) $$ or we can set \(x' = x\) to get

$$ \Phi(x, y) \otimes \mathcal{Y}(y, y') = I \otimes \Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \mathcal{X}(x, x) \otimes \Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \Phi(x, y') $$ Thus, 2 implies 3. On the other hand, using 3 we can show 2:

$$ \mathcal{X}(x', x) \otimes \Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \Phi(x', y) \otimes \mathcal{Y}(y, y') \leq \Phi(a, b) $$ Thus, all three conditions are equivalent. \( \qquad \blacksquare \)

Next we check that composition is associative:

**Lemma.** Suppose \(\Theta \colon \mathcal{W} \nrightarrow \mathcal{X}, \Phi \colon \mathcal{X} \nrightarrow \mathcal{Y} \) and \(\Psi \colon \mathcal{Y} \to \mathcal{Z}\) are \(\mathcal{V}\)-enriched profunctors. Then

$$ (\Psi \Phi) \Theta = \Psi (\Phi \Theta) .$$
**Proof.** We need to show

$$ \bigvee_{x} \Theta(x,y) \otimes \left( \bigvee_{y} \Phi(x,y) \otimes \Psi(y,z) \right) = \bigvee_{y} \left( \bigvee_{x} \Theta(x,y) \otimes \Phi(x,y) \right) \otimes \Psi(y,z) .$$ Because \(\otimes\) distributes over \(\bigvee\), it's enough to show

$$ \bigvee_{x} \bigvee_{y} \Theta(x,y) \otimes \left( \Phi(x,y) \otimes \Psi(y,z) \right) = \bigvee_{y} \bigvee_{x} \Theta(x,y) \otimes \Phi(x,y) \otimes \Psi(y,z) .$$ Since \(\otimes\) is associative, and we always have \(\bigvee_{x} \bigvee_{y} = \bigvee_{y} \bigvee_{x} \) when the joins in question exist, this is true. \( \qquad \blacksquare \)

Next we show our would-be category \(\mathbf{Prof}_\mathcal{V}\) has identity morphisms.

**Lemma.** The \(\mathcal{V}\)-enriched functor \( \mathrm{hom} \colon \mathcal{X}^{\text{op}} \times \mathcal{X} \to \mathcal{V} \), defined by

$$ \mathrm{hom}(x,x') = \mathcal{X}(x,x') ,$$ corresponds to a \(\mathcal{V}\)-enriched profunctor

$$ 1_{\mathcal{X}} \colon \mathcal{X} \nrightarrow \mathcal{X} $$ that serves as an identity for composition.

**Proof.** We need to check the left and right unit laws, but they are very similar so we'll only do one:

$$ \Phi 1_{\mathcal{X}} = \Phi $$ for any \(\mathcal{V}\)-enriched profunctor \(\Phi \colon \mathcal{X} \to \mathcal{Y}\). This amounts to proving

$$ \bigvee_{x'} \mathcal{X}(x,x') \otimes \Phi(x',y) = \Phi(x,y) $$ First we'll show

$$ \Phi(x,y) \le \bigvee_{x'} \mathcal{X}(x,x') \otimes \Phi(x',y) $$ and then we'll show the reverse inequality. Since \(\mathcal{V}\) is a poset this will mean the two sides are equal.

For the inequality above it's enough to find one choice of \(x'\) that makes

$$ \Phi(x,y) \le \mathcal{X}(x,x') \otimes \Phi(x',y) . $$ The obvious guess is \(x' = x\); then we need

$$ \Phi(x,y) \le \mathcal{X}(x,x) \otimes \Phi(x,y) . $$ But the definition of enriched category says that \( I \le \mathcal{X}(x,x)\), so

$$ \Phi(x,y) = I \otimes \mathcal{\Phi}(x,y) \le \mathcal{X}(x,x) \otimes \Phi(x,y) $$ as desired. Next we show the reverse inequality:

$$ \bigvee_{x'} \mathcal{X}(x,x') \otimes \Phi(x',y) \le \Phi(x,y) .$$
For this it's enough to prove that for *all* \(x'\) we have

$$ \mathcal{X}(x,x') \otimes \Phi(x',y) \le \Phi(x,y) .$$ We've seen this in the theorem above, so we're done. \( \qquad \blacksquare \)

Whew - that was a good workout! #:-S

## Comments

The proofs are a bit more terse than I'd like; unfortunately there's a limit on the number of characters per post and I'm up against it, so I can't put in as many steps as I should!

The biggest holes are proving:

\(\otimes\) distributes over \(\bigvee\) in a commutative quantale.

\( \bigvee_x \bigvee_y v_{xy} = \bigvee_y \bigvee_x v_{xy} \) whenever \(v_{xy}\) is a doubly indexed collection of elements in a poset and the joins in question exist.

I proved most of item 1 in comment #2 on Lecture 63. Matthew proved 2 in comment #37 on that lecture, and Anindya gave a different proof in comment #9.

Both these are useful facts, but item 1 is so important that I went back and added a proof sketch to Lecture 63. More precisely, I sketched a proof of this stronger fact:

Theorem.If \(\mathcal{V}\) is a monoidal poset with all joins, \(\mathcal{V}\) is a quantale if and only if$$ a \otimes \left( \bigvee_{b\in B} b\right) = \bigvee_{b \in B} (a \otimes b) $$ for every element \(a\) and every subset \(B\) of \(\mathcal{V}\).

This theorem implies that a commutative quantale is a lot like a commutative ring: it has a commutative multiplication \(\otimes\) which distributes over \(\bigvee\) on

both sides. (Above we only get distributivity on the left, but if \(\otimes\) is commutative we get it on both sides!)Indeed, any commutative quantale is an example of a commutative rig, or 'ring without negatives', if we define multiplication by \(xy = x \otimes y\) and addition by \(x + y = x \vee y\). But it's much better than just a commutative rig, because we can add

infinitely manyelements using \(\bigvee\). In other words, we get a commutative rig whereall sums converge. This is why we can compose enriched profunctors using 'matrix multiplication' even when our matrices are infinite in size.Addition defined by \(x + y = x \vee y\) also has the curious but very nice property that \(x + x = x \). A rig obeying this property is called an

idempotent rigoridempotent semiring:Encyclopedia of Mathematics.These are important in 'idempotent analysis', a subject with lots of interesting applications:

Encyclopedia of Mathematics.`The proofs are a bit more terse than I'd like; unfortunately there's a limit on the number of characters per post and I'm up against it, so I can't put in as many steps as I should! The biggest holes are proving: 1. \\(\otimes\\) distributes over \\(\bigvee\\) in a commutative quantale. 2. \\( \bigvee_x \bigvee_y v_{xy} = \bigvee_y \bigvee_x v_{xy} \\) whenever \\(v_{xy}\\) is a doubly indexed collection of elements in a poset and the joins in question exist. I proved most of item 1 in [comment #2 on Lecture 63](https://forum.azimuthproject.org/discussion/comment/20227/#Comment_20227). Matthew proved 2 in [comment #37 on that lecture](https://forum.azimuthproject.org/discussion/comment/20237/#Comment_20237), and Anindya gave a different proof in [comment #9](https://forum.azimuthproject.org/discussion/comment/20243/#Comment_20243). Both these are useful facts, but item 1 is so important that I went back and added a proof sketch to [Lecture 63](https://forum.azimuthproject.org/discussion/2295/lecture-63-chapter-4-composing-enriched-profunctors/p1). More precisely, I sketched a proof of this stronger fact: **Theorem.** If \\(\mathcal{V}\\) is a monoidal poset with all joins, \\(\mathcal{V}\\) is a quantale if and only if \[ a \otimes \left( \bigvee\_{b\in B} b\right) = \bigvee\_{b \in B} (a \otimes b) \] for every element \\(a\\) and every subset \\(B\\) of \\(\mathcal{V}\\). This theorem implies that a commutative quantale is a lot like a commutative ring: it has a commutative multiplication \\(\otimes\\) which distributes over \\(\bigvee\\) on _both sides_. (Above we only get distributivity on the left, but if \\(\otimes\\) is commutative we get it on both sides!) Indeed, any commutative quantale is an example of a commutative [rig](https://en.wikipedia.org/wiki/Semiring), or 'ring without negatives', if we define multiplication by \\(xy = x \otimes y\\) and addition by \\(x + y = x \vee y\\). But it's much better than just a commutative rig, because we can add _infinitely many_ elements using \\(\bigvee\\). In other words, we get a commutative rig where _all sums converge_. This is why we can compose enriched profunctors using 'matrix multiplication' even when our matrices are infinite in size. Addition defined by \\(x + y = x \vee y\\) also has the curious but very nice property that \\(x + x = x \\). A rig obeying this property is called an **idempotent rig** or **idempotent semiring**: * [Idempotent semi-ring](https://www.encyclopediaofmath.org/index.php/Idempotent_semi-ring), _Encyclopedia of Mathematics_. These are important in 'idempotent analysis', a subject with lots of interesting applications: * [Idempotent analysis](https://www.encyclopediaofmath.org/index.php/Idempotent_analysis), _Encyclopedia of Mathematics_.`

Hey John,

I was thinking about Anindya's theorem from comment #12 of Lecture 63, which you reposted here.

I wanted to extend it:

Proof.Anindya already did most of the work back in his comment to Lecture 63.

It suffices to show that (3) is equivalent to (4). Since \(\mathcal{V}\) is a closed, commutative monoidal preorder, we have

$$ \mathcal{X}(x', x) \otimes \Phi(x, y) \leq \Phi(x', y) \iff \mathcal{X}^{\mathrm{op}}(x, x') \leq \Phi(x, y) \multimap \Phi(x', y) \tag(A) $$ and

$$ \Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \Phi(x, y') \iff \mathcal{Y}(y, y') \leq \Phi(x, y) \multimap \Phi(x, y'). \tag{B} $$ But we also have

$$ \Phi(x, y) \multimap \Phi(x', y) = \mathcal{V}(\Phi(-,y)(x), \Phi(-,y)(x')) \tag{C} $$ and similarly

$$ \Phi(x, y) \multimap \Phi(x, y') = \mathcal{V}(\Phi(x,-)(y), \Phi(x,-)(y')) \tag{D} $$ with (A) and (C) along with (B) and (D) we have (3) is equivalent to (4). \( \qquad \blacksquare \)

If we take a \(\mathcal{V}\)-category \(\mathcal{X}\), we know \(\mathbf{hom}_{\mathcal{X}}\) is the identity profunctor \(1_{\mathcal{X}}\). If \(\mathcal{V} = \mathbf{Set}\), then \(\mathbf{hom}_{\mathcal{X}}(-, y)\) and \(\mathbf{hom}_{\mathcal{X}}(x, -)\) are the contravariant and covariant Yoneda functors, respectively.

The Yoneda Lemma, which holds for \(\mathbf{Set}\)-enriched categories, states for any functor \(F\):

$$ \mathrm{Nat}(\mathbf{hom}_{\mathcal{X}}(A, -), F) \cong F(A) $$ It may be beyond the purview of this course, but I am rather curious what sort of enriched categories \(\mathcal{V}\) the Yoneda lemma generalizes to...

`Hey John, I was thinking about Anindya's theorem from [comment #12](https://forum.azimuthproject.org/discussion/comment/20252/#Comment_20252) of Lecture 63, which you reposted here. I wanted to extend it: > **Theorem.** In a commutative quantale \\(\mathcal{V}\\), the following are equivalent: > > 1. \\(\Phi : \mathcal{X} \nrightarrow \mathcal{Y}\\) is a \\(\mathcal{V}\\)-enriched profunctor. > > 2. \\(\mathcal{X}(x', x) \otimes \Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \Phi(x',y')\\) for all \\(x,x',y,y'\\). > > 3. \\(\mathcal{X}(x', x) \otimes \Phi(x, y) \leq \Phi(x', y)\\) and \\(\Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \Phi(x, y')\\) for all \\(x,x',y,y'\\). > > 4. \\(\Phi(-, y) : \mathcal{X}^{\mathrm{op}} \Rightarrow \mathcal{V}\\) and \\(\Phi(x, -) : \mathcal{Y} \Rightarrow \mathcal{V}\\) are both \\(\mathcal{V}\\)-profunctors for all \\(x,y\\) **Proof.** Anindya already did most of the work back in [his comment to Lecture 63](https://forum.azimuthproject.org/discussion/comment/20252/#Comment_20252). It suffices to show that (3) is equivalent to (4). Since \\(\mathcal{V}\\) is a closed, commutative monoidal preorder, we have \[ \mathcal{X}(x', x) \otimes \Phi(x, y) \leq \Phi(x', y) \iff \mathcal{X}^{\mathrm{op}}(x, x') \leq \Phi(x, y) \multimap \Phi(x', y) \tag(A) \] and \[ \Phi(x, y) \otimes \mathcal{Y}(y, y') \leq \Phi(x, y') \iff \mathcal{Y}(y, y') \leq \Phi(x, y) \multimap \Phi(x, y'). \tag{B} \] But we also have \[ \Phi(x, y) \multimap \Phi(x', y) = \mathcal{V}(\Phi(-,y)(x), \Phi(-,y)(x')) \tag{C} \] and similarly \[ \Phi(x, y) \multimap \Phi(x, y') = \mathcal{V}(\Phi(x,-)(y), \Phi(x,-)(y')) \tag{D} \] with (A) and (C) along with (B) and (D) we have (3) is equivalent to (4). \\( \qquad \blacksquare \\) If we take a \\(\mathcal{V}\\)-category \\(\mathcal{X}\\), we know \\(\mathbf{hom}\_{\mathcal{X}}\\) is the identity profunctor \\(1\_{\mathcal{X}}\\). If \\(\mathcal{V} = \mathbf{Set}\\), then \\(\mathbf{hom}\_{\mathcal{X}}(-, y)\\) and \\(\mathbf{hom}\_{\mathcal{X}}(x, -)\\) are the contravariant and covariant [Yoneda functors](https://en.wikipedia.org/wiki/Yoneda_lemma#The_Yoneda_embedding), respectively. The Yoneda Lemma, which holds for \\(\mathbf{Set}\\)-enriched categories, states for any functor \\(F\\): \[ \mathrm{Nat}(\mathbf{hom}\_{\mathcal{X}}(A, -), F) \cong F(A) \] It may be beyond the purview of this course, but I am rather curious what sort of enriched categories \\(\mathcal{V}\\) the Yoneda lemma generalizes to...`

Well, every \(\mathcal{V}\)-functor can be turned into a \(\mathcal{V}\)-profunctor. So I'm willing to bet we could prove a \(\mathcal{V}\)-profunctor version of the \(\mathcal{V}\)-enriched Yoneda lemma.

`Well, every \\(\mathcal{V}\\)-functor can be turned into a \\(\mathcal{V}\\)-profunctor. So I'm willing to bet we could prove a \\(\mathcal{V}\\)-profunctor version of the \\(\mathcal{V}\\)-enriched Yoneda lemma.`

What would that even state?

`What would that even state?`

I am not seeing how, Keith. Maybe you can give a proof?

`> Well, every \\(\mathcal{V}\\)-functor can be turned into a \\(\mathcal{V}\\)-profunctor. I am not seeing how, Keith. Maybe you can give a proof?`

For any \(\mathcal{V}\)-functor, \(F\), define a \(\mathcal{V}\)-profunctor \(\Phi\) in \(\mathcal{V}\) using it's closed structure,

\[ \Phi := x \multimap F(x) \]

I believe this defines a \(\mathcal{V}\)-profunctor.

`For any \\(\mathcal{V}\\)-functor, \\(F\\), define a \\(\mathcal{V}\\)-profunctor \\(\Phi\\) in \\(\mathcal{V}\\) using it's closed structure, \\[ \Phi := x \multimap F(x) \\] I believe this defines a \\(\mathcal{V}\\)-profunctor.`

I am still not seeing how this works, Keith.

For a \(\mathcal{V}\)-functor \(F : \mathcal{X} \rightarrow \mathcal{Y}\), we know from the definition that

$$\mathcal{X}(a,b) \leq \mathcal{Y}(F(a),F(b))$$ As far as I know, \(F\) acts like a function \(\mathrm{Obj}(\mathcal{X}) \to \mathrm{Obj}(\mathcal{Y})\), so we can't use it in an expression like \(x \multimap F(x)\) unless \(\mathrm{Obj}(\mathcal{X}) = \mathrm{Obj}(\mathcal{Y}) = \mathrm{Obj}(\mathcal{V})\).

Is there something I am missing?

`> For any \\(\mathcal{V}\\)-functor, \\(F\\), define a \\(\mathcal{V}\\)-profunctor \\(\Phi\\) in \\(\mathcal{V}\\) using it's closed structure, > >\[ \Phi := x \multimap F(x)\] > > I believe this defines a \\(\mathcal{V}\\)-profunctor. I am still not seeing how this works, Keith. For a \\(\mathcal{V}\\)-functor \\(F : \mathcal{X} \rightarrow \mathcal{Y}\\), we know from the definition that \[\mathcal{X}(a,b) \leq \mathcal{Y}(F(a),F(b))\] As far as I know, \\(F\\) acts like a function \\(\mathrm{Obj}(\mathcal{X}) \to \mathrm{Obj}(\mathcal{Y})\\), so we can't use it in an expression like \\(x \multimap F(x)\\) unless \\(\mathrm{Obj}(\mathcal{X}) = \mathrm{Obj}(\mathcal{Y}) = \mathrm{Obj}(\mathcal{V})\\). Is there something I am missing?`

Keith wrote:

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}\).

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

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.

`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. <img width = "100" src = "http://math.ucr.edu/home/baez/mathematical//warning_sign.jpg"> 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](http://www.math3ma.com/mathema/2017/9/6/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 <center>Profunctors are to functors as linear algebra is to set theory</center> 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.`

@Matthew – I think there's a typo in your (4):

because what you've proved is

fwiw the Yoneda lemma has always puzzled me because it seems to rely on some trick involving "special" properties of

Set(in particular the roleSetplays in defining "plain vanilla" categories). I once asked a category theoretician friend of mine what this "special" was exactly, and he replied "symmetric monoidal closed". Anyway, I think I'm getting reasonably close to understanding his answer, albeit over a decade later.`@Matthew – I think there's a typo in your (4): > 4: \\(\Phi(-, y) : \mathcal{X}^{\mathrm{op}} \Rightarrow \mathcal{V}\\) and \\(\Phi(x, -) : \mathcal{Y} \Rightarrow \mathcal{V}\\) are both \\(\mathcal{V}\\)-profunctors for all \\(x,y\\) because what you've proved is > 4: \\(\Phi(-, y) : \mathcal{X}^{\mathrm{op}} \rightarrow \mathcal{V}\\) and \\(\Phi(x, -) : \mathcal{Y} \rightarrow \mathcal{V}\\) are both \\(\mathcal{V}\\)-functors for all \\(x,y\\) fwiw the Yoneda lemma has always puzzled me because it seems to rely on some trick involving "special" properties of **Set** (in particular the role **Set** plays in defining "plain vanilla" categories). I once asked a category theoretician friend of mine what this "special" was exactly, and he replied "symmetric monoidal closed". Anyway, I think I'm getting reasonably close to understanding his answer, albeit over a decade later.`

@Anindya,

My bad! I started to use the notation \(\Rightarrow\) Hinze uses for functors in his paper Kan Extensions for Program Optimisation. I'll leave the typo there and just stop using that notation.

Regarding the enriched Yoneda lemma, Hinich (2016) proves the lemma for \(\mathcal{M}\)-enriched categories where \(\mathcal{M}\) is a monoidal category with colimits. I am not sure if this is stronger than the theorem your friend was alluding to, or there are just multiple conditions for enriched categories that entail the Yoneda lemma.

`@Anindya, My bad! I started to use the notation \\(\Rightarrow\\) Hinze uses for functors in his paper [Kan Extensions for Program Optimisation](https://www.cs.ox.ac.uk/ralf.hinze/Kan.pdf). I'll leave the typo there and just stop using that notation. Regarding the enriched Yoneda lemma, [Hinich (2016)](http://www.tac.mta.ca/tac/volumes/31/29/31-29.pdf) proves the lemma for \\(\mathcal{M}\\)-enriched categories where \\(\mathcal{M}\\) is a monoidal category with colimits. I am not sure if this is stronger than the theorem your friend was alluding to, or there are just multiple conditions for enriched categories that entail the Yoneda lemma.`

Anindya wrote:

That'll get you the weak version of the enriched Yoneda lemma stated here:

They write:

The strong form discussed on the nLab assumes also that \(\mathcal{V}\) has all (small) colimits. We can use those to define a

\(\mathcal{V}\)-objectof \(\mathcal{V}\)-enriched natural transformations \(\alpha: \mathcal{C} (c, -) \Rightarrow F\), and prove this is isomorphic to \(F(c)\).Clearly the strong version is nicer in that it moves further away from the world of sets and into the world of \(\mathcal{V}\): it gives you the object \(F(c)\) instead of merely its set of elements, which in general contains a lot less information.

`<img width = "100" src = "http://math.ucr.edu/home/baez/mathematical/warning_sign.jpg"> Anindya wrote: > I once asked a category theoretician friend of mine what this "special" was exactly, and he replied "symmetric monoidal closed". That'll get you the weak version of the enriched Yoneda lemma stated here: * nLab, [Enriched Yoneda Lemma](https://ncatlab.org/nlab/show/enriched+Yoneda+lemma). They write: > We discuss here two forms of the Yoneda lemma. > Let \\(\mathcal{V}\\) be a (locally small) closed symmetric monoidal category, so that \\(\mathcal{V}\\) is enriched in itself via its internal hom. > ### Weak form > A _weak form_ of the enriched Yoneda lemma says that given a \\(\mathcal{V}\\)-enriched functor \\(F: \mathcal{C} \to \mathcal{V}\\) and an object \\(c\\) of \\(\mathcal{C} \\), the _set_ of \\(\mathcal{V}\\)-enriched natural transformations \\(\alpha: \mathcal{C} (c, -) \Rightarrow F\\) is in natural bijection with the set of **elements** of (\\(F(c)\\), i.e., the set of morphisms \\(I \to F(c)\\). The strong form discussed on the nLab assumes also that \\(\mathcal{V}\\) has all (small) colimits. We can use those to define a _\\(\mathcal{V}\\)-object_ of \\(\mathcal{V}\\)-enriched natural transformations \\(\alpha: \mathcal{C} (c, -) \Rightarrow F\\), and prove this is isomorphic to \\(F(c)\\). Clearly the strong version is nicer in that it moves further away from the world of sets and into the world of \\(\mathcal{V}\\): it gives you the object \\(F(c)\\) instead of merely its set of elements, which in general contains a lot less information.`

Matthew wrote approximately:

I'm pretty sure with different assumptions on your 'base enrichment' (the thing I'm calling \(\mathcal{V}\)), you get different ways of stating the Yoneda idea, and different versions of the Yoneda lemma and Yoneda embedding.

It's surprising that Hinich's version doesn't assume \(\mathcal{V}\) is symmetric or closed, but his paper only dates back to 2016, and he makes a big deal about not needing these assumptions, so clearly it counts as a bit of a novelty to figure out how to even state the Yoneda idea in this generality. (He does however say it was already done by Garner and Shulman in another 2016 paper.)

For example, the Yoneda embedding is usually a functor from your \(\mathcal{V}\)-category \(\mathcal{C}\) into the 'presheaf category' \(\mathcal{V}^{\mathcal{C}^{\text{op}}}\), but we've seen \(\mathcal{C}^{\text{op}}\) isn't a \(\mathcal{V}\)-category unless \(\mathcal{V}\) is symmetric (or for us, commutative). I see that Hinich gets around this using the fact that \(\mathcal{C}^{\text{op}}\) is a \(\mathcal{V}^{\text{op}}\)-category!

However, it's important to know that all this is centipede mathematics. Usually people are happiest doing enriched category theory when \(\mathcal{V}\) is closed symmetric monoidal with colimits. Then you can do stuff without worrying too much... and most of the really important examples fit in this framework.

`<img width = "100" src = "http://math.ucr.edu/home/baez/mathematical/warning_sign.jpg"> Matthew wrote approximately: > Regarding the enriched Yoneda lemma, [Hinich (2016)](http://www.tac.mta.ca/tac/volumes/31/29/31-29.pdf) proves the lemma for \\(\mathcal{V}\\)-enriched categories where \\(\mathcal{V}\\) is a monoidal category with colimits. I am not sure if this is stronger than the theorem your friend was alluding to, or there are just multiple conditions for enriched categories that entail the Yoneda lemma. I'm pretty sure with different assumptions on your 'base enrichment' (the thing I'm calling \\(\mathcal{V}\\)), you get different ways of stating the Yoneda idea, and different versions of the Yoneda lemma and Yoneda embedding. It's surprising that Hinich's version doesn't assume \\(\mathcal{V}\\) is symmetric or closed, but his paper only dates back to 2016, and he makes a big deal about not needing these assumptions, so clearly it counts as a bit of a novelty to figure out how to even state the Yoneda idea in this generality. (He does however say it was already done by Garner and Shulman in another 2016 paper.) For example, the Yoneda embedding is usually a functor from your \\(\mathcal{V}\\)-category \\(\mathcal{C}\\) into the 'presheaf category' \\(\mathcal{V}^{\mathcal{C}^{\text{op}}}\\), but we've seen \\(\mathcal{C}^{\text{op}}\\) isn't a \\(\mathcal{V}\\)-category unless \\(\mathcal{V}\\) is symmetric (or for us, commutative). I see that Hinich gets around this using the fact that \\(\mathcal{C}^{\text{op}}\\) is a \\(\mathcal{V}^{\text{op}}\\)-category! However, it's important to know that all this is [centipede mathematics](https://en.wikipedia.org/wiki/Centipede_mathematics). Usually people are happiest doing enriched category theory when \\(\mathcal{V}\\) is closed symmetric monoidal with colimits. Then you can do stuff without worrying too much... and most of the really important examples fit in this framework.`

John, you wrote

in your proof of the last Lemma. Did you actually mean

$$ \Phi(x,y) = I \otimes \Phi(x,y) \le \mathcal{X}(x,x) \otimes \Phi(x,y) $$ or is there something I'm missing?

`John, you wrote > $$ \Phi(x,y) = I \otimes \mathcal{X}(x,x) \le \mathcal{X}(x,x) \otimes \Phi(x,y) $$ in your proof of the last Lemma. Did you actually mean $$ \Phi(x,y) = I \otimes \Phi(x,y) \le \mathcal{X}(x,x) \otimes \Phi(x,y) $$ or is there something I'm missing?`

Marius - you're right. Thanks for catching my mistake! I'll fix it.

I'm glad someone is actually reading this stuff

`Marius - you're right. Thanks for catching my mistake! I'll fix it. I'm glad someone is actually reading this stuff <img src = "http://math.ucr.edu/home/baez/emoticons/tongue2.gif">`