# Internal lenses as functors and cofunctors

@inproceedings{Clarke2020InternalLA, title={Internal lenses as functors and cofunctors}, author={Bryce Clarke}, year={2020} }

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 lenses as simultaneously functors and cofunctors between categories. We show that lenses may be canonically represented as a particular commuting triangle of functors, and unify the classical state-based lenses with both c-lenses and d-lenses in this framework…

## 10 Citations

Limits and colimits in a category of lenses

- Mathematics
- 2021

Lenses are an important tool in applied category theory. While individual lenses have been widely used in applications, many of the mathematical properties of the corresponding categories of lenses…

A diagrammatic approach to symmetric lenses

- Mathematics
- 2021

Lenses are a mathematical structure for maintaining consistency between a pair of systems. In their ongoing research program, Johnson and Rosebrugh have sought to unify the treatment of symmetric…

Higher Lenses

- Mathematics2021 36th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)
- 2021

It is proved that higher lenses are equivalent to traditional ones for types that satisfy the principle of uniqueness of identity proofs, using a coinductive characterisation of coherently constant functions.

Lifting couplings in Wasserstein spaces

- MathematicsArXiv
- 2021

This paper makes mathematically precise the idea that conditional probabilities are analogous to path liftings in geometry, and shows that the weighted version of a lens is tightly connected to the notion of submetry in geometry.

Supervised categorical learning as change propagation with delta lenses

- Computer ScienceArXiv
- 2019

A notion of an asymmetric learning delta lens with amendment is defined, and how ala-lens can be organized into a symmetric monoidal category is shown, showing that sequential and parallel composition of well-behaved alA-lenses are also wb so that wb ala -lenses constitute a full sm-subcategory of ala.

Actegories for the Working Amthematician

- Mathematics
- 2022

. Actions of monoidal categories on categories, also known as actegories, have been familiar to category theorists for a long time, and yet a comprehensive overview of this topic seems to be missing…

The more legs the merrier: A new composition for symmetric (multi-)lenses

- Business
- 2021

This paper develops a new composition of symmetric lenses that preserves information which is important for implementing system interoperation. It includes a cut-down but realistic example of a…

Delta Lenses as Coalgebras for a Comonad

- MathematicsSTAF Workshops
- 2021

This short paper establishes that delta lenses are coalgebras for a comonad, through showing that the forgetful functor from the category of delta lenses over a base, to the categories of cofunctors over a Base, is comonadic.

General Supervised Learning as Change Propagation with Delta Lenses

- Computer ScienceFoSSaCS
- 2020

A notion of an asymmetric learning delta lens with amendment is defined (ala-lens), and how ala-lenses can be organized into a symmetric monoidal category (sm) is shown.

Internal split opfibrations and cofunctors

- Mathematics
- 2020

Split opfibrations are functors equipped with a suitable choice of opcartesian lifts. The purpose of this paper is to characterise internal split opfibrations through separating the structure of a…

## References

SHOWING 1-10 OF 22 REFERENCES

Lenses, fibrations and universal translations†

- MathematicsMathematical Structures in Computer Science
- 2011

A variation on the lens concept called a c-lens is introduced, and shown to correspond to the categorical notion of Grothendieck opfibration, which guarantees a universal solution to the view update problem for functorial update processes.

Relating Algebraic and Coalgebraic Descriptions of Lenses

- MathematicsElectron. Commun. Eur. Assoc. Softw. Sci. Technol.
- 2012

An equational proof of the coal algebra correspondence is presented, note that the algebra correspondence extends to arbitrary categories with products and that the coalgebra correspondence extended to arbitrary cartesian closed categories, and show that both correspondences extend to isomorphisms of categories.

Algebras and Update Strategies

- MathematicsJ. Univers. Comput. Sci.
- 2010

The classical (Bancilhon-Spyratos) correspondence between view update translations and views with a constant complement reappears more generally as the correspondence between update strategies and…

Handbook of Categorical Algebra

- Mathematics
- 1994

The Handbook of Categorical Algebra is intended to give, in three volumes, a rather detailed account of what, ideally, everybody working in category theory should know, whatever the specific topic of…

REVIEWS-Sketches of an elephant: A topos theory compendium

- Mathematics
- 2003

A1 Regular and Cartesian Closed Categories A2 Toposes - Basic Theory A3 Allegories A4 Geometric Morphisms - Basic Theory B1 Fibrations and Indexed Categories B2 Internal and Locally Internal…

Taking Updates Seriously

- Computer ScienceBX@ETAPS
- 2017

We show how “taking updates seriously” leads from state-based lenses
to update lenses and further; we witness a little hierarchy of types of
lens that arises in a systematic way. Lenses of each…

Categories for the Working Mathematician

- Mathematics
- 1971

I. Categories, Functors and Natural Transformations.- 1. Axioms for Categories.- 2. Categories.- 3. Functors.- 4. Natural Transformations.- 5. Monics, Epis, and Zeros.- 6. Foundations.- 7. Large…

Combinators for bidirectional tree transformations: A linguistic approach to the view-update problem

- Computer ScienceTOPL
- 2007

A novel approach to the view-update problem for tree-structured data: a domain-specific programming language in which all expressions denote bidirectional transformations on trees that map a concrete tree into a simplified abstract view and a modified abstract view to a correspondingly modified concrete tree.

Unifying Set-Based, Delta-Based and Edit-Based Lenses

- PhysicsBx@ETAPS
- 2016

A substantial unication with concrete inter-conversions developed among the three main approaches to lenses in both their symmetric and asymmetric forms is provided.