See also
- Doubles for Monoidal Categories (Pastro and Street, 2008)
- Open Diagrams via Coend Calculus (RomΓ‘n, 2020)
- optics
- Monoidal contexts
Definition
Let be a monoidal category. The multicategory - promonoidal category of optics is a category with the same objects as and with morphisms given by
\operatorname{Optic}(π)\left( \binom{X}{X'};\binom{Y}{Y'} \right) = β«^{A \in π} π(Y; A β X) Γ π(A β X'; Y'). $$ The promonoidal structure is given by \operatorname{Optic}(π)\left(
\binom{X}{X'},\binom{Y}{Y'};\binom{Z}{Z'}
\right) =
β«^{A \in π} π(Z; X β A) Γ π(A β X; B β Y) Γ π(Y β B' ; Z'),
$$ \operatorname{Optic}(π)\left(
\binom{X}{X'}
\right) = π(X,X').$$
## Protensor and prounit of optics

The promonoidal structure of optics is determined by two profunctors $ππ(\bullet)$ and $ππ(\bullet,\bullet;\bullet)$. The actions of optics on these two profunctors determine multiple possible insertions of optics and transformations on the context that an optic determines.
The **prounit** of optics becomes a profunctor, $(ππ(\bullet), <)$, with optic evaluation,
(<)οΉ ππ\left( \begin{matrix} X \ Xβ \end{matrix} \right) Γ ππ\left( \begin{matrix} X \ Xβ \end{matrix}; \begin{matrix} Y \ Yβ \end{matrix} \right) β ππ\left( \begin{matrix} Y \ Yβ \end{matrix} \right),
defined by $f < \langle g_0 \mid g_1 \rangle = g_0 β¨Ύ (id β f) β¨Ύ g_1$. The **protensor** of optics becomes a profunctor, $(ππ(\bullet,\bullet;\bullet),>_l,>_r,<)$, with the two possible optic insertions and evaluation,(>_l)οΉ ππ\left( \begin{matrix} X \ Xβ \end{matrix}; \begin{matrix} A \ Aβ \end{matrix} \right) Γ ππ\left( \begin{matrix} A \ Aβ \end{matrix}, \begin{matrix} Y \ Yβ \end{matrix} ; \begin{matrix} Z \ Zβ \end{matrix}\right) β ππ\left( \begin{matrix} X \ Xβ \end{matrix}, \begin{matrix} Y \ Yβ \end{matrix} ; \begin{matrix} Z \ Zβ \end{matrix}\right),
(>_r)οΉ ππ\left( \begin{matrix} Y \ Yβ \end{matrix}; \begin{matrix} A \ Aβ \end{matrix} \right) Γ ππ\left( \begin{matrix} X \ Xβ \end{matrix}, \begin{matrix} A \ Aβ \end{matrix} ; \begin{matrix} Z \ Zβ \end{matrix}\right) β ππ\left( \begin{matrix} X \ Xβ \end{matrix}, \begin{matrix} Y \ Yβ \end{matrix} ; \begin{matrix} Z \ Zβ \end{matrix}\right),
(<)οΉ ππ\left( \begin{matrix} X \ Xβ \end{matrix}, \begin{matrix} A \ Aβ \end{matrix} ; \begin{matrix} A \ Aβ \end{matrix}\right) Γ ππ\left( \begin{matrix} A \ Aβ \end{matrix}; \begin{matrix} Z \ Zβ \end{matrix} \right) β ππ\left( \begin{matrix} X \ Xβ \end{matrix}, \begin{matrix} Y \ Yβ \end{matrix} ; \begin{matrix} Z \ Zβ \end{matrix}\right),
which are defined by $$\langle gβ \mid gβ \rangle \mathbin{>_l}\langle fβ \mid fβ \mid fβ \rangle = \langle fβ β¨Ύ (id β gβ) \mid (id β gβ) β¨Ύ fβ \mid fβ \rangle,$$ $$\langle hβ \mid hβ \rangle \mathbin{>_r}\langle fβ \mid fβ \mid fβ \rangle = \langle fβ \mid fβ β¨Ύ (id β hβ) \mid (id β hβ) β¨Ύ fβ \rangle,$$\langle fβ \mid fβ \mid fβ \rangle \mathbin{<} \langle tβ \mid tβ \rangle = \langle tβ β¨Ύ (id β fβ) \mid (id β fβ) \mid (id β fβ) β¨Ύ tβ \rangle.$$
Procoherence for optics
The unitors may be constructed via coend calculus, using the units of the monoidal category.
The associators are finally constructed via coend calculus, by noticing that three-part data accessors have a common representation, independent of that how we get to them.