TY - GEN
T1 - Two applications of logic programming to Coq
AU - Manighetti, Matteo
AU - Miller, Dale
AU - Momigliano, Alberto
N1 - Publisher Copyright:
© Matteo Manighetti, Dale Miller, and Alberto Momigliano; licensed under Creative Commons License CC-BY 4.0 26th International Conference on Types for Proofs and Programs (TYPES 2020).
PY - 2021/6/1
Y1 - 2021/6/1
N2 - The logic programming paradigm provides a flexible setting for representing, manipulating, checking, and elaborating proof structures. This is particularly true when the logic programming language allows for bindings in terms and proofs. In this paper, we make use of two recent innovations at the intersection of logic programming and proof checking. One of these is the foundational proof certificate (FPC) framework which provides a flexible means of defining the semantics of a range of proof structures for classical and intuitionistic logic. A second innovation is the recently released Coq-Elpi plugin for Coq in which the Elpi implementation of λProlog can send and retrieve information to and from the Coq kernel. We illustrate the use of both this Coq plugin and FPCs with two example applications. First, we implement an FPC-driven sequent calculus for a fragment of the Calculus of Inductive Constructions and we package it into a tactic to perform property-based testing of inductive types corresponding to Horn clauses. Second, we implement in Elpi a proof checker for first-order intuitionistic logic and demonstrate how proof certificates can be supplied by external (to Coq) provers and then elaborated into the fully detailed proof terms that can be checked by the Coq kernel.
AB - The logic programming paradigm provides a flexible setting for representing, manipulating, checking, and elaborating proof structures. This is particularly true when the logic programming language allows for bindings in terms and proofs. In this paper, we make use of two recent innovations at the intersection of logic programming and proof checking. One of these is the foundational proof certificate (FPC) framework which provides a flexible means of defining the semantics of a range of proof structures for classical and intuitionistic logic. A second innovation is the recently released Coq-Elpi plugin for Coq in which the Elpi implementation of λProlog can send and retrieve information to and from the Coq kernel. We illustrate the use of both this Coq plugin and FPCs with two example applications. First, we implement an FPC-driven sequent calculus for a fragment of the Calculus of Inductive Constructions and we package it into a tactic to perform property-based testing of inductive types corresponding to Horn clauses. Second, we implement in Elpi a proof checker for first-order intuitionistic logic and demonstrate how proof certificates can be supplied by external (to Coq) provers and then elaborated into the fully detailed proof terms that can be checked by the Coq kernel.
KW - Coq
KW - Logic programming
KW - Proof assistants
KW - Property-based testing
KW - λProlog
UR - https://www.scopus.com/pages/publications/85108227773
U2 - 10.4230/LIPIcs.TYPES.2020.10
DO - 10.4230/LIPIcs.TYPES.2020.10
M3 - Conference contribution
AN - SCOPUS:85108227773
T3 - Leibniz International Proceedings in Informatics, LIPIcs
BT - 26th International Conference on Types for Proofs and Programs, TYPES 2020
A2 - de�Liguoro, Ugo
A2 - Berardi, Stefano
A2 - Altenkirch, Thorsten
PB - Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
T2 - 26th International Conference on Types for Proofs and Programs, TYPES 2020
Y2 - 2 March 2020 through 5 March 2020
ER -