Coq Modulo Theory - Short Paper (original) (raw)

The Coq Proof Assistant A Tutorial

Rapport Technique

C OQ is a Proof Assistant for a Logical Framework known as the Calculus of Induc- tive Constructions. It allows the interactive construction of formal proofs, and also the manipulation of functional programs consistently with ...

A Tutorial on (Co)Inductive Types in Coq

2007

This document1 is an introduction to the definition and use of inductive and co-inductive types in the Coq proof environment. It explains how types like natural numbers and infinite streams are defined in Coq, and the kind of proof techniques that can be used to reason about them (case analysis, induc- tion, inversion of predicates, co-induction, etc). Each technique is illustrated through an executable and self-contained Coq script.

A reflection-based proof tactic for lattices in Coq

2010

Coq is a proof assistant featuring a tactic-based interactive theorem prover. The latest incarnation comes with over 150 tactics that assist the user in developing a formal proof. These tactics range from the simple and mundane to the 'allpowerful'. Some examples from the latter category are the omega tactic, which solves a goal in Presburger arithmetic, and the ring and field tactics, which solve identities modulo associativity and commutativity in ring and field structures.

Formalizing a SAT Proof Checker in Coq

The title of this article refers to Werner's "Set in Types, Types in Sets" [13]. Our initial goal was to build formally a model of the Calculus of Inductive Constructions (CIC), the formalism of Coq. In [3], we formalized the syntactic metatheory of CIC and type-checking algorithms, under the assumption that our presentation enjoys the strong normalization property, which is the non-elementary step in proving the consistency of CIC. The present work can be viewed as a first step towards the formalization of the semantics of CIC, concluding to strong normalization and consistency. Of course, due to Gödel's second incompleteness theorem, this can be fulfilled only under some assumptions that strengthen Coq's theory (unless the formalism is inconsistent). This approach is similar to Harrison's work about verifying HOL Light [8]. It is well-known that the Calculus of Constructions (CC, [4]) admits a finite model that is both classical and proof-irrelevant. The only requirement on such a model is to include booleans and to be closed by arrow type (non-dependent product). No infinite set is involved so we should be able to build a model of CC in the theory of hereditarily finite sets. However simple this description may seem, actually building a model for the common presentation of CC reveals technical traps as illustrated in [10]. The focus will be on the product fragment and on universes of CIC. A complete formalization of inductive types requires a lot of work. To show that our model construction can cope with inductive types, we have built a simple, yet recursive, inductive type: Peano's natural numbers. We have adopted a systematic approach and departed from the usual representation of natural numbers (ordinal ω). The formal definitions of this article 1 can be organized in three categories: (1) developing a Coq library of common set theoretical notions and facts about pairs, functions, ordinals, transfinite recursion, Grothendieck universes, etc. (the Sets in Coq side), (2) building specific ingredients for models of typed λ-calculi, and (3) building set theoretical models of those theories within Coq (both fall into the Coq in Sets side).

A Tutorial on Recursive Types in Coq

1998

This document is an introduction to the definition and use of recursive types in the Coq proof environment. It explains how recursive types like natural numbers and infinite streams are defined in Coq, and the kind of proof techniques that can be used to reason about them (case analysis, induction, inversion of predicates, co-induction, etc). Each technique is illustrated through an executable and self-contained Coq script.

Interacting with Modal Logics in the Coq Proof Assistant

This paper describes an embedding of higher-order modal logics in the Coq proof assistant. Coq's capabilities are used to implement modal logics in a minimalistic manner, which is nevertheless sufficient for the formalization of significant, non-trivial modal logic proofs. The elegance, flexibility and convenience of this approach, from a user perspective , are illustrated here with the successful formalization of Gödel's ontological argument.

Two Applications of Logic Programming to Coq

2020

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 ...