arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1012.1010cs.LOmath.LO
收藏

Coq中高阶类型语法的初始语义

Initial Semantics for higher-order typed syntax in Coq

Benedikt Ahrens, Julianna Zsido

摘要:

初始语义学旨在将与签名相关联的语法表征为某个类别的初始对象。我们提出了一个初步的语义结果类型的高阶语法连同其形式化的Coq证明助手。主要定理在2010年第二作者的博士论文中首次在纸上证明,并在不久后正式验证。对于固定的对象类型集合T上的简单类型绑定签名S,我们将一个称为S的表示范畴的范畴联系起来。我们证明了这个范畴有一个初始对象Sigma(S)。从它的构造中可以清楚地看出,对象Sigma(S)值得与S相关联的名称抽象语法。通过大量使用依赖类型,我们的定理在证明助手Coq中实现并证明了正确性。通过单子的方法产生了一种语法实现,其中术语和变量都是固有类型的,即对象类型反映在元级别类型中。这篇文章被看作是一篇研究文章,而不是关于一个经典数学结果的形式化。我们的定理的性质-涉及冗长,技术证明和复杂的代数结构-使它特别有趣的形式化验证。我们的目标是促进使用计算机定理证明器作为研究工具,并因此,一种新的方式出版的数学成果:一个平行的描述定理及其形式化应允许验证正确转录的定义和声明到证明助手,和简单,但技术证明应该很好地隐藏在一个数字图书馆。我们认为,科克的丰富的类型论,结合其各种功能,如隐式参数,允许一个特别可读的形式化,因此非常适合数学交流。

英文摘要:

Initial Semantics aims at characterizing the syntax associated to a signature as the initial object of some category. We present an initial semantics result for typed higher-order syntax together with its formalization in the Coq proof assistant. The main theorem was first proved on paper in the second author's PhD thesis in 2010, and verified formally shortly afterwards. To a simply-typed binding signature S over a fixed set T of object types we associate a category called the category of representations of S. We show that this category has an initial object Sigma(S). From its construction it will be clear that the object Sigma(S) merits the name abstract syntax associated to S. Our theorem is implemented and proved correct in the proof assistant Coq through heavy use of dependent types. The approach through monads gives rise to an implementation of syntax where both terms and variables are intrinsically typed, i.e. where the object types are reflected in the meta-level types. This article is to be seen as a research article rather than about the formalization of a classical mathematical result. The nature of our theorem - involving lengthy, technical proofs and complicated algebraic structures - makes it particularly interesting for formal verification. Our goal is to promote the use of computer theorem provers as research tools, and, accordingly, a new way of publishing mathematical results: a parallel description of a theorem and its formalization should allow the verification of correct transcription of definitions and statements into the proof assistant, and straightforward but technical proofs should be well-hidden in a digital library. We argue that Coq's rich type theory, combined with its various features such as implicit arguments, allows a particularly readable formalization and is hence well-suited for communicating mathematics.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑