promonoidal-category-of-optics

See also

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 ![protensor-and-prounit-of-optics](notes/pieces/protensor-and-prounit-of-optics.jpg) 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

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.