A wide variety of bidirectional data accessors, ranging from mixed optics to functor lenses, can be formalized within a unique framework--dependent optics. Starting from two indexed categories, which encode what maps are allowed in the forward and backward directions, we define a category of dependent optics and establish under what assumptions it has coproducts. Different choices of indexed categories correspond to different families of optics: we discuss dependent lenses and prisms, as well as closed dependent optics. We introduce the notion of Tambara representation and use it to classify contravariant functors from the category of optics, thus generalizing the profunctor encoding of optics to the dependent case.
翻译:多种双向数据存取器,从混合光学到真菌透镜,都可以在一个独特的、以框架为依存的光学框架内正式确定。从两种指数类别开始,其中编码了前向和后向允许的地图,我们界定了依赖光学的类别,并根据哪些假设其具有共同产品。不同的指数分类选择与不同的光学类别相对应:我们讨论依赖镜和棱镜以及封闭依赖光学。我们引入了坦巴拉代表的概念,并用它从光学类别中将反变真真菌分类,从而将光学的源代码编码概括到依赖案例。