面向实用形式元理论研究者的语法单子
Syntax Monads for the Working Formal Metatheorist
AI总结:
针对原始一阶语法表示缺乏范畴论支撑导致基础引理难复用的问题,本文提出Coq框架Tealeaves的核心抽象装饰可遍历单子的弦图解释,证明其表示定理并得到有穷树状数据类型递归组合子。
摘要:
使用证明助手形式化验证形式系统的性质,需要论证大量关于避免捕获替换的次要引理。尽管已有针对语法与变量绑定的范畴论解释研究,但许多从业者和编译器前端所采用的原始一阶语法表示法受到的关注相对较少。因此相关应用未能享受到范畴论的优势,尤其是在不同系统的实现之间复用已形式化的基础引理的潜力。我们的Coq框架Tealeaves为原始的局部无名称表示法提供可复用的基础库,且能以模块化方式扩展至其他表示法。本文给出了Tealeaves所实现的核心抽象——装饰可遍历单子(DTMs)的弦图式解释。我们将DTMs定义为结构化自函子的幺半群,随后证明了一个Kleisli风格的表示定理,得到了用于有穷树状数据类型的递归组合子。
英文摘要:
Formally verifying the properties of formal systems using a proof assistant requires justifying numerous minor lemmas about capture-avoiding substitution. Despite work on category-theoretic accounts of syntax and variable binding, raw, first-order representations of syntax, the kind considered by many practitioners and compiler frontends, have received relatively little attention. Therefore applications miss out on the benefits of category theory, most notably the promise of reusing formalized infrastructural lemmas between implementations of different systems. Our Coq framework Tealeaves provides libraries of reusable infrastructure for a raw, locally nameless representation and can be extended to other representations in a modular fashion. In this paper we give a string-diagrammatic account of decorated traversable monads (DTMs), the key abstraction implemented by Tealeaves. We define DTMs as monoids of structured endofunctors before proving a representation theorem a la Kleisli, yielding a recursion combinator for finitary tree-like datatypes.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。