Explore the Rocq Documentation
FOUNDATIONS FOR BEGINNERS
Introduction To Rocq
The Rocq Prover
Coq'Art
This textbook is a foundational book that introduces readers to the Rocq prover and its underlying formal system, the Calculus of Inductive Constructions (CIC). The book provides a comprehensive guide to interactive theorem proving, combining theory with practical applications. It covers key concepts such as inductive types, recursive functions, and proof construction, while offering numerous examples and case studies, including the formalization of algorithms and mathematical proofs. Coq'Art serves as both an introduction for beginners and a reference for experts, making it an essential resource for anyone working with Rocq or exploring formal methods.
Software Foundations: Logical Foundations (Volume 1)
Logical Foundations is the entry-point to the series. It covers functional programming, basic concepts of logic, computer-assisted theorem proving, and Rocq.
EXPLORING THE INTERMEDIATE LEVEL
Certified Programming with Dependent Types
Certified Programming with Dependent Types (CPDT) is a hands-on guide to advanced programming and proving using the Rocq prover. The book focuses on leveraging Roqc’s dependent type system to write certified programs, where correctness is formally verified alongside implementation. It introduces key concepts such as inductive types, type theory, proof automation, and advanced tactics, providing a blend of theoretical foundations and practical examples. CPDT is particularly known for its focus on proof engineering and building large-scale verified systems efficiently. Aimed at readers with some prior exposure to Rocq, it serves as an invaluable resource for those looking to master the interplay between programming and formal verification.
Programs and Proofs: Mechanizing Mathematics with Dependent Types
The primary audience of the manuscript are the readers with expertise in software development and programming and knowledge of discrete mathematic disciplines on the level of an undergraduate university program. The high-level goal of the course is, therefore, to demonstrate how much the rigorous mathematical reasoning and development of robust and intellectually manageable programs have in common, and how understanding of common programming language concepts provides a solid background for building mathematical abstractions and proving theorems formally. The low-level goal of this course is to provide an overview of the Rocq prover, taken in its both incarnations: as an expressive functional programming language with dependent types and as a proof assistant providing support for mechanized interactive theorem proving.
Reference Manual
The reference manual is the authoritative source of documentation for the Rocq prover. It contains a changelog describing updates to Rocq, which we recommend you read when you upgrade.
ELEVATED EXPERTISE
Mathematical Components
Mathematical Components is the name of a library of formalized mathematics for the Coq proof assistants. It covers a variety of topics, from the theory of basic data structures (e.g., numbers, lists, finite sets) to more advanced results in various flavors of algebra. This library constitutes the infrastructure for the machine checked proofs of the Four Color Theorem and of the Odd Order Theorem. This book aims at providing an introducing to the design patterns used throughout this library, so as to ease its use for other projects. While there are several books around covering the usage of the Coq system and the theory it is based on, the Mathematical Components library uses a few design patterns that differ from the methodology propose in other sources. As a consequence, this book provides a slightly non-standard presentation of Coq, putting upfront the formalization choices and the proof style that are the pillars of the library. This books targets two natures of audience. On one hand newcomers, in particular beginners with background in mathematics rather than computer science, should find a soft introduction to the programming language of Coq, Gallina, and to the Ssreflect proof language. On the other hand, accustomed Coq users will find a substantial account of the formalization style that made the Mathematical Components library possible.
Computer Arithmetic and Formal Proofs: Verifying Floating-point Algorithms with the Coq System
Floating-point arithmetic is ubiquitous in modern computing, as it is the tool of choice to approximate real numbers. Due to its limited range and precision, its use can become quite involved and potentially lead to numerous failures. One way to greatly increase confidence in floating-point software is by computer-assisted verification of its correctness proofs. This book provides a comprehensive view of how to formally specify and verify tricky floating-point algorithms with the Coq proof assistant. It describes the Flocq formalization of floating-point arithmetic and some methods to automate theorem proofs. It then presents the specification and verification of various algorithms, from error-free transformations to a numerical scheme for a partial differential equation. The examples cover not only mathematical algorithms but also C programs as well as issues related to compilation.