arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2404.05459cs.PLcs.LO
收藏

一个用于教授指称语义的 Coq 集合库

A Coq Library of Sets for Teaching Denotational Semantics

Qinxiang Cao, Xiwei Wu, Yalun Liang

AI总结:

本文提出一个基于 Coq 类型类系统的集合与关系库,用标准数学记号改善指称语义教学中的可读性,同时保持零证明项开销。

摘要:

集合与关系是定义指称语义时非常有用的概念。在 Coq 证明助手(proof assistant)中,指向 Prop 的柯里化函数被用来表示集合和关系,例如 A -> Prop、A -> B -> Prop、A -> B -> C -> Prop 等。此外,隶属关系可以通过函数应用来编码,例如当 X: A -> Prop 时,X a 表示 a 属于 X。这对于专业用户开发形式化定义和证明非常方便,但会使命题对非专业用户(例如程序语义课程的学生)而言更难阅读。我们开发了一个小型的集合与关系 Coq 库,以便在教授简单命令式语言的指称语义时能够使用标准数学记号。该库使用 Coq 的类型类(type class)系统开发。与现有集合形式化相比,它带来的证明项开销为零。

英文摘要:

Sets and relations are very useful concepts for defining denotational semantics. In the Coq proof assistant, curried functions to Prop are used to represent sets and relations, e.g. A -> Prop, A -> B -> Prop, A -> B -> C -> Prop, etc. Further, the membership relation can be encoded by function applications, e.g. X a represents a in X if X: A -> Prop. This is very convenient for developing formal definitions and proofs for professional users, but it makes propositions more difficult to read for non-professional users, e.g. students of a program semantics course. We develop a small Coq library of sets and relations so that standard math notations can be used when teaching denotational semantics of simple imperative languages. This library is developed using Coq's type class system. It brings about zero proof-term overhead comparing with the existing formalization of sets.

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

↑