Unifying Set-Based, Delta-Based and Edit-Based Lenses
Michael Johnson, Robert D. Rosebrugh · 2016
There are many dierent types of lenses, but largely they fall into the three classes of the title: set-based, delta-based and edit-based lenses. This paper develops some of the general relationships between those classes. The main results are that a category of set-based lenses is a full subcategory of a category of delta-based lenses determined by sending sets to codiscrete categories; that symmetric set-based lenses can similarly be seen as symmetric delta-based lenses; that symmetric editbased lenses are able to be represented as symmetric delta-based lenses, although not as a subcategory; and that symmetric edit-based lenses can also be seen as spans of a new notion of asymmetric edit-based lenses. The importance of the paper is that it provides a substantial unication with concrete inter-conversions developed among the three main approaches to lenses in both their symmetric and asymmetric forms.