# Ends as a “cotrace” operation on profunctors

As mentioned here, there is a trace operation on the monoidal category of profunctors given by taking coends: for any profunctor $F : A\times X \nrightarrow B \times X$, there is a profunctor $Tr^X(F) : A \nrightarrow B$ defined by $$Tr^X(F)(a,b) = \int^x F((a,x),(b,x))$$ I am interested in the sort of dual operation, where we take an end rather than a coend: $$CoTr^X(F)(a,b) = \int_x F((a,x),(b,x))$$ Note that $CoTr^X(F)$ has the same type ($A \nrightarrow B$) as $Tr^X(F)$.

My question is,

To what extent can the operation $CoTr^X$ be seen as a "cotrace"?

I've found a bit of information googling on "cotraces", but nothing very comprehensive. Specifically, I'd like to know the following:

1. First of all, is there a commonly-accepted definition of "cotrace", and what is its relationship to the trace?
2. Is there a string-diagrammatic definition?
3. One way to view the operation $CoTr^X$ is as a limited form of closure for the "external monoidal" structure on profunctors, in the sense that $${\bf Prof}(G, CoTr^X F) = {\bf Prof}(G \times Hom_X, F)$$ holds naturally in $G : A \nrightarrow B$. That is, we can view $CoTr^X(F)$ as "$Hom_X \multimap F$". Is this part of the general definition of cotrace (assuming the answer to (1) is positive), or is it a special feature of this particular operation on Prof?
-

The comonad $CoTr^X$ is talked about in some depth in Doubles for Monoidal Categories by Pastro and Street. They also dig into the left adjoint of this construction, which is a monad on $Prof$, such that the "strong" profunctors are just its algebras. They talk a fair bit about point #3 as well, though as $Hom$ is the unit for profunctor composition, they can just fuse it away.