Initial Semantics for higher-order typed syntax in Coq

被引:0
|
作者
Ahrens, Benedikt [1 ]
Zsido, Julianna [2 ]
机构
[1] Univ Nice, Sophia Antipolis, France
[2] Univ Montpellier II, Montpellier, France
来源
JOURNAL OF FORMALIZED REASONING | 2011年 / 4卷 / 01期
关键词
D O I
暂无
中图分类号
O1 [数学];
学科分类号
0701 ; 070101 ;
摘要
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 syntax with variable binding 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), i.e. an object Sigma(S) from which there is precisely one morphism i(R) : Sigma(S) -> R to any object R of this category. From its construction it will be clear that the object Sigma(S) merits the name abstract syntax associated to S: it is given by an inductive set - parametrized by a set of free variables and dependent on object types - the type of whose constructors are each given by the antics of the signature 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. Terms are implemented as a Coq data type - Coq types play the role of sets - dependent on an object type as well as on a type family of free variables. 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.
引用
收藏
页码:25 / 69
页数:45
相关论文
共 50 条
  • [1] A typed semantics of higher-order store and subtyping
    Schwinghammer, J
    [J]. THEORETICAL COMPUTER SCIENCE, PROCEEDINGS, 2005, 3701 : 390 - 405
  • [2] Typed operational semantics for higher-order subtyping
    Compagnoni, A
    Goguen, H
    [J]. INFORMATION AND COMPUTATION, 2003, 184 (02) : 242 - 297
  • [3] Hybrid: Reasoning with Higher-Order Abstract Syntax in Coq and Isabelle
    Felty, Amy P.
    [J]. MSFP 2010: PROCEEDINGS OF THE 2010 ACM SIGPLAN WORKSHOP ON MATHEMATICALLY STRUCTURED FUNCTIONAL PROGRAMMING, 2010, : 1 - 1
  • [4] Parametric higher-order abstract syntax for mechanized semantics
    Chlipala, Adam
    [J]. ACM SIGPLAN NOTICES, 2008, 43 (09) : 143 - 156
  • [5] Parametric Higher-Order Abstract Syntax for Mechanized Semantics
    Chlipala, Adam
    [J]. ICFP'08: PROCEEDINGS OF THE 2008 SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2008, : 143 - 156
  • [6] Combining de Bruijn indices and higher-order abstract syntax in Coq
    Capretta, Venanzio
    Felty, Amy P.
    [J]. TYPES FOR PROOFS AND PROGRAMS, 2007, 4502 : 63 - +
  • [7] Typed higher-order narrowing without higher-order strategies
    Antoy, S
    Tolmach, A
    [J]. FUNCTIONAL AND LOGIC PROGRAMMING, PROCEEDINGS, 1999, 1722 : 335 - 352
  • [8] A Weakly Initial Algebra for Higher-Order Abstract Syntax in Cedille
    Stump, Aaron
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2019, (307): : 55 - 67
  • [9] HIGHER-ORDER ABSTRACT SYNTAX
    PFENNING, F
    ELLIOTT, C
    [J]. SIGPLAN NOTICES, 1988, 23 (07): : 199 - 208
  • [10] Initiality for Typed Syntax and Semantics
    Ahrens, Benedikt
    [J]. JOURNAL OF FORMALIZED REASONING, 2015, 8 (02): : 1 - 155