Space-time tradeoffs of lenses and optics via higher category theory

by   Bruno GavranoviΔ‡, et al.

Optics and lenses are abstract categorical gadgets that model systems with bidirectional data flow. In this paper we observe that the denotational definition of optics - identifying two optics as equivalent by observing their behaviour from the outside - is not suitable for operational, software oriented approaches where optics are not merely observed, but built with their internal setups in mind. We identify operational differences between denotationally isomorphic categories of cartesian optics and lenses: their different composition rule and corresponding space-time tradeoffs, positioning them at two opposite ends of a spectrum. With these motivations we lift the existing categorical constructions and their relationships to the 2-categorical level, showing that the relevant operational concerns become visible. We define the 2-category 2-Optic(π’ž) whose 2-cells explicitly track optics' internal configuration. We show that the 1-category Optic(π’ž) arises by locally quotienting out the connected components of this 2-category. We show that the embedding of lenses into cartesian optics gets weakened from a functor to an oplax functor whose oplaxator now detects the different composition rule. We determine the difficulties in showing this functor forms a part of an adjunction in any of the standard 2-categories. We establish a conjecture that the well-known isomorphism between cartesian lenses and optics arises out of the lax 2-adjunction between their double-categorical counterparts. In addition to presenting new research, this paper is also meant to be an accessible introduction to the topic.


page 1

page 2

page 3

page 4

βˆ™ 05/08/2022

Dynamic categories, dynamic operads: From deep learning to prediction markets

Natural organized systems adapt to internal and external pressures and t...
βˆ™ 02/01/2019

Categorical Operational Physics

Many insights into the quantum world can be found by studying it from am...
βˆ™ 07/02/2018

Rule Algebras for Adhesive Categories

We show that every adhesive category gives rise to an associative algebr...
βˆ™ 05/26/2023

Protocol Choice and Iteration for the Free Cornering

We extend the free cornering of a symmetric monoidal category, a double ...
βˆ™ 02/28/2019

Homunculus' Brain and Categorical Logic

The interaction between syntax (formal language) and its semantics (mean...
βˆ™ 01/26/2021

Cyber Kittens, or Some First Steps Towards Categorical Cybernetics

We define a categorical notion of cybernetic system as a dynamical reali...
βˆ™ 11/30/2020

The costructure-cosemantics adjunction for comodels for computational effects

It is well established that equational algebraic theories, and the monad...

Please sign up or login with your details

Forgot password? Click here to reset