The composite \(\mathcal{X}\overset{\phi;\psi}\nrightarrow \mathcal{Z}\) of two \(\mathcal{V}\) profunctors, \(\mathcal{X}\overset{\phi}\nrightarrow\mathcal{Y}\) and \(\mathcal{Y}\overset{\psi}\nrightarrow\mathcal{Z}\)
\((\phi;\psi)(x,z) = \bigvee_Y(\phi(x,y)\otimes\psi(y,z))\)
Need a formula for composing two feasibility relations in series.
Suppose \(P,Q,R\) are cities (preorders) and there are bridges (hence, feasibility matrices).
The feasibility matrices are:
\(\textcolor{blue}{\phi}\) | a | b | c | d | e |
---|---|---|---|---|---|
N | T | F | T | F | F |
E | T | F | T | F | T |
W | T | T | T | T | F |
S | T | T | T | T | T |
\(\textcolor{red}{\psi}\) | x | y |
---|---|---|
a | F | T |
b | T | T |
c | F | T |
d | T | T |
e | F | F |
Feasibility from \(P\) to \(R\) means there is a way-point in Q which is both reachable from \(p \in P\) and can reach \(r \in R\).
Composition is a union \((\phi;\psi)(p,r):= \bigvee_Q \phi(p,q)\land \psi(q,r)\).
But this is tantamount to matrix multiplication which gives us the result matrix:
\(\phi;\psi\) | x | y |
---|---|---|
N | F | T |
E | F | T |
W | T | T |
S | T | T |
Consider the following Cost profunctors \(\textcolor{blue}{\phi},\textcolor{red}{\psi}\) \[\begin{tikzcd}[ampersand replacement=\&] A \arrow[d, "3"', bend right] \& B \arrow[l, "2"', bend right] \arrow[d, "5", bend left] \arrow[r, "11", blue, dotted, bend left] \& x \arrow[rr, "3", bend left] \arrow[rd, "4", bend left] \& \& z \arrow[ld, "4", bend left] \arrow[r, "4", red,dotted, bend left] \arrow[rd, red, "4", dotted, bend right] \& p \arrow[r, "2", bend left] \& q \arrow[d, "2", bend left] \\ C \arrow[ru, "3"] \& D \arrow[l, "4", bend left] \arrow[rr, blue, "9", dotted, bend right] \& \& y \arrow[lu, "3", bend left] \arrow[rrr, red, "0", dotted, bend right=49] \& \& d \arrow[u, "1", bend left] \& r \arrow[l, "1", bend left] \end{tikzcd}\]
Fill in the matrix for the composite profunctor.
\(\phi;\psi\) | p | q | r | s |
---|---|---|---|---|
A | 23 | 25 | 21 | 22 |
B | 17 | 19 | 15 | 16 |
C | 20 | 22 | 18 | 19 |
D | 11 | 13 | 9 | 10 |
Because Feas is a category, we can describe feasibility relation using one-dimensional wiring diagrams:
\(\xrightarrow{a}\boxed{f}\xrightarrow{b}\boxed{g}\xrightarrow{c}\boxed{h}\xrightarrow{d}\)
We need more structure to talk about multi-input/output case.
This chapter restricts discussion to skeletal quantales, but it is not hard to extend to non-skeltal ones. Two ways:
Let morphisms of \(\mathbf{Prof}_\mathcal{V}\) be isomorphism classes of \(\mathcal{V}\) profunctors. (analogous to trick used when defining Cospan category.)
We could relax what we mean by category (requiring composition to be unital/associative ‘up to isomorphism’ ... this is known as bicategory theory).
The category \(\mathbf{Prof}_\mathcal{V}\), given a skeletal quantale \(\mathcal{V}\)
Objects: \(\mathcal{V}\) categories
Morphisms: \(\mathcal{V}\) profunctors, composed according to Definition 4.21
Identities are unit profunctors
The category Feas
Instantiate a \(\mathbf{Prof}_\mathcal{V}\) category with \(\mathcal{V}=\mathbf{Bool}\)
Due to skeletality, we need to show for all inputs that \(\phi \leq U_P;\phi\) and \(U_P;\phi \leq \phi\) (the second equality to show is done similarly).
Forward direction
\(\phi(p,q) = I \otimes \phi(p,q)\)
due to unitality of \(I\) in a symmetric monoidal preorder.
\(\leq P(p,p) \otimes \phi(p,q)\)
This is because \(\forall p \in P:\) \(I \leq P(p,p)\) (a constraint of a \(\mathcal{V}\) category), the reflexivity of \(\leq\) for \(\phi(p,q)\), and the monotonicity of \(\otimes\).
\(\leq \underset{p' \in P}\bigvee(P(p,p') \otimes \phi(p',q))\)
The join is a least upper bound, and the LHS is an element of the set being joined over (the case where \(p=p'\)).
\(= (U_P;\phi)(p,q)\)
This is the profunctor composition formula, subtituting in the unit profunctor definition explicitly.
Reverse direction
Need to show \(\underset{p' \in P}\bigvee(P(p,p')\otimes \phi(p',q)) \leq \phi(p,q)\)
Show that this property holds for each \(p' \in P\) - given the join is a least upper bound, it will also be less than or equal to \(\phi(p,q)\)
\(P(p,p')\otimes\phi(p',q) = P(p,p')\otimes\phi(p',q)\otimes I\)
due to unitality of \(I\) in a symmetric monoidal preorder.
\(\leq P(p,p')\otimes \phi(p',q)\otimes Q(q,q)\)
\(\forall p:\) \(I \leq P(p,p)\) (a constraint of a \(\mathcal{V}\) category) and the monotonicity of \(\otimes\).
\(\leq\phi(p,q)\)
This was shown in Exercise 4.9
The unit profunctor is unital, i.e. for any profunctor \(P \overset{\phi}\nrightarrow Q\): \(U_P;\phi = \phi = \phi; U_Q\)
Choose a nontrivial Cost-category \(\mathcal{X}\) and draw a bridge-style diagram of the unit profunctor \(\mathcal{X} \overset{U_\mathcal{X}}\nrightarrow \mathcal{X}\)
becomes
Justify all steps the proof of the unitality of unit profunctors.
In the case of \(\mathcal{V}=\mathbf{Bool}\) show each step in the forward direction is actually an equality. NOCARD
Done, see the proof
\(\forall p: P(p,p)=true\) for a Bool-enriched category, because that is the only option for \(I=true\leq P(p,p)\)
\(true \land x = x\)
If \(\phi(p,q)\):
then at least one element of the set being joined over is true (where \(p=p'\) such that \(P(p,p')\land \phi(p',q) = true\)), and the least upper bound of such a set is \(true\)
Else:
Then every element of that set is \(false\) such that the join is also \(false\).
If \(p\leq p'\), it fails because of the second conjunct (consider the constraint on profunctors: we are demanding equal or more resources than something we know fails)
If \(p \not \leq p'\), it fails because of the first conjunct. In a Bool-category \(P\), \(P(a,b)\) iff \(a \leq b\).
Prove that the serial composition of profunctors, \(\mathcal{X}\overset{\phi}\nrightarrow\mathcal{Y}\) and \(\mathcal{Y}\overset{\psi}\nrightarrow\mathcal{Z}\), is associative.
This is tantamount to the quantale matrix multiplication being associative, which was shown in Exercise 2.104.
The companion and conjoint of a \(\mathcal{V}\) functor, \(\mathcal{P}\xrightarrow{F}\mathcal{Q}\)
Companion, denoted \(\mathcal{P}\overset{\hat F}\nrightarrow \mathcal{Q}\), is defined \(\hat{F}(p,q):=\mathcal{Q}(F(p),q)\)
Conjoint, denoted \(\mathcal{Q}\overset{\check{F}}\nrightarrow\mathcal{P}\)
A \(\mathcal{V}\) adjunction.
A pair of \(\mathcal{V}\) functors, \(\mathcal{P}\overset{F}{\underset{G}\rightleftarrows} \mathcal{Q}\) such that: \(\forall p\in \mathcal{P}, q \in \mathcal{Q}: \mathcal{P}(p,G(q)) \cong \mathcal{Q}(F(p),q)\)
The collage of a \(\mathcal{V}\) profunctor, \(\mathcal{X}\overset{\phi}\nrightarrow \mathcal{Y}\)
A \(\mathcal{V}\) category, denoted \(\mathbf{Col}(\phi)\)
\(Ob(\mathbf{Col}(\phi)):=\)\(Ob(\mathcal{X})\sqcup Ob(\mathcal{Y})\)
\(\mathbf{Col}(\phi)(a,b) :=\) \(\begin{cases}\mathcal{X}(a,b) & a,b \in \mathcal{X} \\ \phi(a,b)& a \in \mathcal{X}, b \in \mathcal{Y} \\ \varnothing & a \in \mathcal{Y}, b \in \mathcal{X} \\ \mathcal{Y}(a,b) & a,b \in \mathcal{Y} \end{cases}\)
There are obvious functors \(\mathcal{X}\xrightarrow{i_\mathcal{X}}\mathbf{Col}(\phi)\) and \(\mathcal{Y}\xrightarrow{i_\mathcal{Y}}\mathbf{Col}(\phi)\) sending each object to “itself" called collage inclusions
For any preorder \(\mathcal{P}\), there is an identity functor \(\mathcal{P}\xrightarrow{id}\mathcal{P}\)
Its companion and conjoint agree: \(\hat{id}=\check{id}=\mathcal{P}\overset{U_\mathcal{P}}\nrightarrow \mathcal{P}\) equivalent to the unit profunctor.
Consider the addition function on real numbers.
It is monotonic, since \((a,b,c)\leq(a',b',c')\) means \(a+b+c\leq a'+b'+c'\)
Therefore it has a companion and a conjoint
The companion \(\mathbb{R}\times\mathbb{R}\times\mathbb{R}\overset{\hat +}\nrightarrow \mathbb{R}\) sends (a,b,c,d) to true iff \(a+b+c\leq d\).
TODO
Check that the companion \(\hat{id}\) of the identity functor is actually the unit profunctor.
TODO
Considering the addition example, what is the conjoint of this addition function?
TODO
Draw a Hasse diagram for the collage of the profunctor:
TODO