按年被提到
20202020 · 2 次2026
数学、逻辑与理论›范畴论与逻辑·arXiv:2001.07488 · cs.PL

Profunctor Optics, a Categorical Update

Profunctor 光学:范畴论视角的更新
Bryce Clarke, Derek Elkins, Jeremy Gibbons, Fosco Loregian, Bartosz Milewski, Emily Pillmore, Mario Román · 2020

用丰富范畴与 Tambara 理论推广 profunctor optics,覆盖混合光学

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 4 人首次 2020-01-31 · 最近 2022-11-30
4不同的人
4活跃月份
4讨论串
31被引(OpenAlex)

光学(optics)是对子字段访问、容器遍历等数据变换模式的双向访问器,profunctor 表示支持模块化组合。论文指出此前研究只限于非丰富、非混合的设定,而函数式语言更适合用丰富范畴描述,并发现文献中的一些结构其实是访问方向落在不同范畴里的混合光学。作者推广了 Pastro 与 Street 关于 Tambara 理论的经典结果,用它描述混合的 V-丰富 profunctor 光学并赋予 V-范畴结构,给出一些原创的光学族和推导(包括遍历的初等推导),最后讨论了 Haskell 实现。

HN 为什么提它

HN 上的人把它当作把 Haskell 常用的 lens 模式形式化到范畴论里的出处,也有人引它的表格查阅较冷门的 optics,并用范畴论视角推广到其他容器。

奠基之作难度 5 / 5约 120 分钟经得起时间
读之前最好知道
1范畴论基础(函子、自然变换)
2Haskell 与函数式编程
3Lens 与 optics 的基本用法
4丰富范畴(enriched category)
5profunctor

学习路径

读这篇之前,按顺序读书架上的 3 篇 · 参考文献来自 OpenAlex,顺序和要点由 Claude Code 排出

先建立幺半范畴的背景,再看光学在博弈论中的来源和范畴定义,最后读 profunctor 光学的推广。

  1. 1
    Physics, Topology, Logic and Computation: A Rosetta Stone物理、拓扑、逻辑与计算:罗塞塔石碑 · 2009

    介绍幺半范畴语言和各领域的对应,是读范畴论文章的背景。

    读对称幺半范畴的基本概念与例子,不必深入物理部分。

  2. 2
    Compositional game theory组合博弈论 · 2016

    组合博弈论中用到了与光学(lens)相关的双向结构,是光学研究的来源之一。

    读开放博弈如何用双向结构组合。

  3. 3

    给出光学范畴的定义,目标论文推广的就是这一框架。

    读光学的范畴定义与它的组合方式。

  4. 4
    Profunctor Optics, a Categorical UpdateProfunctor 光学:范畴论视角的更新 · 2020 · 就是这篇

    目标论文:用丰富范畴和 Tambara 理论推广 profunctor 光学到混合情形。

    读profunctor 表示与光学的对应,再看混合光学与丰富范畴的推广。

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
引用dddbbb · 2020-02

“formalising a popular Haskell pattern in category theory:”

指出它用范畴论形式化了一种流行的 Haskell 模式
Math is an insurance policy原评论 ↗
引用hither_shores · 2022-06

“Page 10 of this paper has a table with references to some more exotic optics, though it's going to be hard to parse without some category theory: Profunctor Optics, a Categorical Update”

指出第 10 页有更多奇特 optics 的表格,但需范畴论基础才读得懂
引用rssoconnor · 2022-11

“Anyhow, the upshot of reframing this as a simple argument in Category Theory meant that, with the help of James Deikun, I was able go generalize the argument to other types of containers.”

借范畴论重新表述,把论证推广到其他类型的容器
Why I am learning category theory原评论 ↗
被提交为 story · 1 次