The Coq Proof Assistant A Tutorial
Rapport Technique
Sign up for access to the world's latest research
Abstract
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 ...
Related papers
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.
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.
Journal of Automated Reasoning, 2010
In this paper we propose an effective procedure for translating a proof term of the Calculus of Inductive Constructions (CIC), which is very similar to a program written in a prototypal functional programming language, into a tactical expression of the high-level specification language of a CIC-based proof assistant like coq [1] or matita [2]. As a use case, we report on our implementation of this procedure in matita and on the translation of 668 proofs generated by coq 7.3.1 [3] 1 , from their logical representation as CIC proof terms to their high-level representation as tactical expressions of matita's user interface language.
2007
This report presents the mathematical foundation of the proof assistant Sparkle, which is dedicated to the lazy functional language Clean. The mathematical foundation provides a formalization of the programming, logic and proof languages that are supported by Sparkle. Furthermore, it formalizes the reduction of programs and the semantics of properties, and provides proofs for the soundness of the dened tactics.
IFIP International Federation for Information Processing, 2008
We investigate here a new version of the Calculus of Inductive Constructions (CIC) on which the proof assistant Coq is based: the Calculus of Congruent Inductive Constructions, which truly extends CIC by building in arbitrary first-order decision procedures: deduction is still in charge of the CIC kernel, while computation is outsourced to dedicated first-order decision procedures that can be taken from the shelves provided they deliver a proof certificate. The soundness of the whole system becomes an incremental property following from the soundness of the certificate checkers and that of the kernel. A detailed example shows that the resulting style of proofs becomes closer to that of the working mathematician.
ENTCS, 2006
This paper presents an emacs interface for an interactive editor for proofs and programs. The interface allows for editing proofs in the same way as we write programs, but in addition offers commands that help term construction. It differs from most other proof editors for its support for direct construction of terms rather than tactics for building them.
Proof assistants based on type theory allow the user to adopt either a functional style, or a relational style (e.g., by using inductive types). Both styles have pros and cons. Relational style may be preferred because it allows the user to describe only what is true, discard momentarily the termination question, and stick to a rule-based description. However, a relational specification is usually not executable. This paper proposes to turn an inductive specification into a functional one, in the logical setting itself, more precisely Coq in this work. We define for a certain class of inductive specifications a way to extract functions from them and automatically produce the proof of soundness of the extracted function w.r.t. its inductive specification. In addition, using user-defined modes which label inputs and outputs, we are able to extract several computational contents from a single inductive type.
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).
2014
This paper presents a formalization of Nuprl's metatheory in Coq. It includes a nominal-style de nition of the Nuprl language, its reduction rules, a coinductive computational equivalence, and a Currystyle type system where a type is de ned as a Partial Equivalence Relation (PER) à la Allen. This type system includes Martin-Löf dependent types, a hierarchy of universes, inductive types and partial types. We then prove that the typehood rules of Nuprl are valid w.r.t. this PER semantics and hence reduce Nuprl's consistency to Coq's consistency.
Journal of Automated Reasoning, 1993
imps is an Interactive Mathematical Proof System intended as a general purpose tool for formulating and applying mathematics in a familiar fashion. The logic of imps is based on a version of simple type theory with partial functions and subtypes. Mathematical specification and inference are performed relative to axiomatic theories, which can be related to one another via inclusion and theory interpretation. imps provides relatively large primitive inference steps to facilitate human control of the deductive process and human comprehension of the resulting proofs. An initial theory library containing almost a thousand repeatable proofs covers significant portions of logic, algebra and analysis, and provides some support for modeling applications in computer science.

Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.