paperbot · PL 论文追踪

全部论文 待读 收藏

P2 What’s the difference? a functional pearl on subtracting bijections

差在哪里?关于双射相减的函数式珍珠
ICFP 2(ICFP)2018匹配度 1/10 · 该论文属于函数式编程与组合数学中关于双射运算的理论构造,与用户关注的静态分析、Agentic 程序分析、浮点程序分析、贝叶斯程序分析以及 LLM 与程序分析交叉均无直接关系。虽然属于 PL 领域,但主题偏离核心研究方向。引用 0 inbox
Brent A. Yorgey, Kenneth Foner
crossref: 2026-09-10

AI 速览

一句话:提出一种从代数视角高层次构造双射之差的方法,避免逐点推理和分别构造正反方向,且不牺牲性能。

双射的“加法”是直接练习:在左和右两个和类型分支上分别运行两个双射,即可得到两个和类型之间的双射。但如何从一个双射中“减去”另一个却远不直观。组合数学中已有若干构造两个双射之“差”的计算原理。本文从计算与代数视角重新审视该问题,展示如何在高层次上构造此类双射,避免逐点推理,也无需被迫分别构造正向与反向映射,同时不牺牲性能。文章以 functional pearl 的形式呈现,强调代数结构在函数式编程中的表达力与实用性。

问题
如何对双射做“减法”:给定两个双射(或一个待减去的双射),构造它们在和类型上的差,而加法可直接通过和类型左右分支分别应用实现。
方法
从计算与代数视角给出高层次构造,避免逐点推理,也不分别构造正向和反向映射。
评估
作为 functional pearl,主要通过概念性构造与讨论展示方法并强调不牺牲性能;摘要未报告实验评估。
原文摘要(Abstract)

It is a straightforward exercise to write a program to "add" two bijections---resulting in a bijection between two sum types, which runs the first bijection on elements from the left summand and the second bijection on the right. It is much less obvious how to "subtract" one bijection from another. This problem has been studied in the context of combinatorics, with several computational principles known for producing the "difference" of two bijections. We consider the problem from a computational and algebraic perspective, showing how to construct such bijections at a high level, avoiding pointwise reasoning or being forced to construct the forward and backward directions separately---without sacrificing performance.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot284,
  title = {What’s the difference? a functional pearl on subtracting bijections},
  author = {Brent A. Yorgey and Kenneth Foner},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {2},
  number = {ICFP},
  year = {2018},
  doi = {10.1145/3236796}
}