Related papers: Functor is to Lens as Applicative is to Biplate: I…
Delta lenses are a kind of morphism between categories which are used to model bidirectional transformations between systems. Classical state-based lenses, also known as very well-behaved lenses, are both algebras for a monad and coalgebras…
Lenses are a well-established structure for modelling bidirectional transformations, such as the interactions between a database and a view of it. Lenses may be symmetric or asymmetric, and may be composed, forming the morphisms of a…
It is well known that to give an oplax functor of bicategories $\mathbf{1}\to\mathscr{C}$ is to give a comonad in $\mathscr{C}$. Here we generalize this fact, replacing the terminal bicategory by any bicategory $\mathscr{A}$ for which the…
Lenses may be characterised as objects in the category of algebras over a monad, however they are often understood instead as morphisms, which propagate updates between systems. Working internally to a category with pullbacks, we define…
We establish a correspondence between modules and spans of algebras within a general monoidal 2-category $\mathfrak{C}$. Specifically, for an algebra $A$ in $\mathfrak{C}$, we construct a normalized lax 3-functor from the 2-category of…
Functional programmers have an established tradition of using traversals as a design pattern to work with recursive data structures. The technique is so prolific that a whole host of libraries have been designed to help in the task of…
Representation theorems relate seemingly complex objects to concrete, more tractable ones. In this paper, we take advantage of the abstraction power of category theory and provide a general representation theorem for a wide class of…
Structures where we have both a contravariant (pullback) and a covariant (pushforward) functoriality that satisfy base change can be encoded by functors out of ($\infty$-)categories of spans (or correspondences). In this paper we study the…
Optics are bidirectional accessors of data structures; they provide a powerful abstraction of many common data transformations. This abstraction is compositional thanks to a representation in terms of profunctors endowed with an algebraic…
We study polynomial comonads and polynomial bicomodules. Polynomial comonads amount to categories. Polynomial bicomodules between categories amount to parametric right adjoint functors between corresponding copresheaf categories. These may…
In this article we describe properties of the 2-functor from the 2-category of comonads to the 2-category of functors that sends a comonad to its forgetful functor. This allows us to describe contexts where algebras over a monad are…
It is well-known that pseudo functors from bicategories of spans are equivalent to Beck-Chevalley bifibrations, and therefore capture the relationships underlying the adjunctions suitable as semantics for existential quantification. This…
Software frequently converts data from one representation to another and vice versa. Naively specifying both conversion directions separately is error prone and introduces conceptual duplication. Instead, bidirectional programming…
A classical result of Tannaka duality is the fact that a coalgebra over a field can be reconstructed from its category of finite dimensional representations by using the forgetful functor which sends a representation to its underlying…
Bidirectional data accessors such as lenses, prisms and traversals are all instances of the same general 'optic' construction. We give a careful account of this construction and show that it extends to a functor from the category of…
Many recursive functions can be defined elegantly as the unique homomorphisms, between two algebras, two coalgebras, or one each, that are induced by some universal property of a distinguished structure. Besides the well-known applications…
Lenses, optics and dependent lenses (or equivalently morphisms of containers, or equivalently natural transformations of polynomial functors) are all widely used in applied category theory as models of bidirectional processes. From the…
McBride and Paterson introduced Applicative functors to Haskell, which are equivalent to the lax monoidal functors (with strength) of category theory. Applicative functors F are presented via idiomatic application $\_\circledast\_ : F (A…
The notion of the center of an algebra over a field k has a far reaching generalization to algebras in monoidal categories. The center then lives in the monoidal center of the original category. This generalization plays an important role…
Lenses have a rich history and have recently received a great deal of attention from applied category theorists. We generalize the notion of lens by defining a category $\mathsf{Lens}_F$ for any category $\mathcal{C}$ and functor $F\colon…