[論文レビュー] Profunctor optics and traversals
本稿は、Tambaraモジュールとコインダクチュラス計算を用いて、トランスバーサルを含む光学の統一的プロファンドラベースの枠組みを提示する。トランスバーサルは、形状-内容のコモノイドのコアルゲブラとして導出され、Pastro-Streetコモノイドを用いたプロファンドラ表現定理が確立され、Haskellの意味論を忠実にモデル化するには、明確な光学やモノイドの直和といった洗練された概念が必要であることが示されている。
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 structure called Tambara module. There exists a general definition of optic in terms of coends that, after some elementary application of the Yoneda lemma, particularizes in each one of the basic optics. Traversals used to be the exception; we show an elementary derivation of traversals and discuss some other new derivations for optics. We relate our characterization of traversals to the previous ones showing that the coalgebras of a comonad that represents and split into shape and contents are traversable functors. The representation of optics in terms of profunctors has many different proofs in the literature; we discuss two ways of proving it, generalizing both to the case of mixed optics for an arbitrary action. Categories of optics can be seen as Eilenberg-Moore categories for a monad described by Pastro and Street. This gives us two different approaches to composition between profunctor optics of different families: using distributive laws between the monads defining them, and using coproducts of monads. The second one is the one implicitly used in Haskell programming; but we show that a refinement of the notion of optic is required in order to model it faithfully. We provide experimental implementations of a library of optics in Haskell and partial Agda formalizations of the profunctor representation theorem.
研究の動機と目的
- プロファンドラとTambaraモジュールを用いた、光学の構成的で代数的な枠組みを提供すること。
- 形状-内容のコモノイドのコアルゲブラとしてトランスバーサルを導出することにより、それらを可換関手と関連付けること。
- コインダクチュラス計算とYoneda補題を用いて、光学のプロファンドラ表現定理を形式化すること。
- コモノイドの直和を用いた明確な光学の導入により、光学の合成におけるモジュラリティの問題を解決すること。
- 実験的Haskellライブラリと部分的Agda形式化を通じた理論の実装と検証。
提案手法
- 一般のコインダクチュラス定義から、コインダクチュラス計算とYoneda補題を用いて光学の標準形を導出する。
- 作用の整合性を符号化するTambaraモジュール構造を備えたプロファンドラとして光学を表現する。
- Pastro-Street構成を用いて、その代数がトランスバーサルに対応するコモノイドを定義する。
- 線形性と単位性がコアルゲブラの公理によって保証される形で、形状-内容コモノイドのコアルゲブラとしてトランスバーサルを特徴付ける。
- Haskellの光学を忠実にモデル化するために、コモノイドの直和を用いて合成を洗練させるために明確な光学を導入する。
- Kan拡張と右随伴を用いて、可換関手とcofree構成との間の随伴関係を確立する。
実験結果
リサーチクエスチョン
- RQ1コインダクチュラス計算を用いて、一般の光学定義からどのように系統的にトランスバーサルを導出できるか?
- RQ2コモノイドのコアルゲブラとしてのトランスバーサルの圏論的特徴付けとは何か?また、可換関手とどのように関係するか?
- RQ3分布則やモノイドの直和を用いて、異なる家族の光学をどのように合成できるか?
- RQ4Haskellのような関数型プログラミング言語における合成を忠実にモデル化するには、光学概念のどの程度の洗練が必要か?
- RQ5任意のモノイド作用を伴う混合光学へ、プロファンドラ表現定理を一般化できるか?
主な発見
- トランスバーサルは、線形性と単位性がコアルゲブラ公理から生じる形状-内容コモノイドのコアルゲブラとして特徴付けられる。
- Pastro-Streetコモノイドを用いたプロファンドラ表現定理の証明により、光学がTambaraモジュール構造を備えたプロファンドラに対応することが示された。
- 光学の圏はモノイドのEilenberg-Moore圏として現れ、合成の圏論的基盤が提供される。
- 特にコモノイドの直和の文脈において、Haskellの光学を忠実にモデル化するために、明確な光学が洗練された概念として導入された。
- Agdaでcofreeトランスバーサル構成が形式化され、$KH$ が $H$ に対するcofreeトランスバーサルであることが右Kan拡張を用いて示された。
- 随伴関係 $\mathbf{Trv}(T, KH) \cong [\mathbf{Sets}, \mathbf{Sets}]({\cal U}T, H)$ が確立され、$KH$ がcofreeであることが証明された。
より良い研究を、今すぐ始めましょう
論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。