Book Description
The technology of mechanized program verification can play a supporting role in many kinds of research projects in computer science, and related tools for formal proof-checking are seeing increasing adoption in mathematics and engineering. This book provides an introduction to the Coq software for writing and checking mathematical proofs. It takes a practical engineering focus throughout, emphasizing techniques that will help users to build, understand, and maintain large Coq developments and minimize the cost of code change over time.
Two topics, rarely discussed elsewhere, are covered in detail: effective dependently typed programming (making productive use of a feature at the heart of the Coq system) and construction of domain-specific proof tactics. Almost every subject covered is also relevant to interactive computer theorem proving in general, not just program verification, demonstrated through examples of verified programs applied in many different sorts of formalizations. The book develops a unique automated proof style and applies it throughout; even experienced Coq users may benefit from reading about basic Coq concepts from this novel perspective. The book also offers a library of tactics, or programs that find proofs, designed for use with examples in the book. Readers will acquire the necessary skills to reimplement these tactics in other settings by the end of the book.
This open book is licensed under a Creative Commons License (CC BY-NC-ND). You can download Certified Programming with Dependent Types ebook for free in PDF format (4.3 MB).
Table of Contents
Chapter 1
Introduction
Chapter 2
Some Quick Examples
Chapter 3
Introducing Inductive Types
Chapter 4
Inductive Predicates
Chapter 5
Infinite Data and Proofs
Chapter 6
Subset Types and Variations
Chapter 7
General Recursion
Chapter 8
More Dependent Types
Chapter 9
Dependent Data Structures
Chapter 10
Reasoning About Equality Proofs
Chapter 11
Generic Programming
Chapter 12
Universes and Axioms
Chapter 13
Proof Search by Logic Programming
Chapter 14
Proof Search in Ltac
Chapter 15
Proof by Reflection
Chapter 16
Proving in the Large
Chapter 17
A Taste of Reasoning About Programming Language Syntax