Introduction and Contents — Coq 8.12.0 documentation

\[\begin{split}\newcommand{\as}{\kw{as}} \newcommand{\Assum}[3]{\kw{Assum}(#1)(#2:#3)} \newcommand{\case}{\kw{case}} \newcommand{\cons}{\textsf{cons}} \newcommand{\consf}{\textsf{consf}} \newcommand{\Def}[4]{\kw{Def}(#1)(#2:=#3:#4)} \newcommand{\emptyf}{\textsf{emptyf}} \newcommand{\End}{\kw{End}} \newcommand{\kwend}{\kw{end}} \newcommand{\even}{\textsf{even}} \newcommand{\evenO}{\textsf{even}_\textsf{O}} \newcommand{\evenS}{\textsf{even}_\textsf{S}} \newcommand{\Fix}{\kw{Fix}} \newcommand{\fix}{\kw{fix}} \newcommand{\for}{\textsf{for}} \newcommand{\forest}{\textsf{forest}} \newcommand{\Functor}{\kw{Functor}} \newcommand{\In}{\kw{in}} \newcommand{\Ind}[4]{\kw{Ind}[#2](#3:=#4)} \newcommand{\ind}[3]{\kw{Ind}~[#1]\left(#2\mathrm{~:=~}#3\right)} \newcommand{\Indp}[5]{\kw{Ind}_{#5}(#1)[#2](#3:=#4)} \newcommand{\Indpstr}[6]{\kw{Ind}_{#5}(#1)[#2](#3:=#4)/{#6}} \newcommand{\injective}{\kw{injective}} \newcommand{\kw}[1]{\textsf{#1}} \newcommand{\length}{\textsf{length}} \newcommand{\letin}[3]{\kw{let}~#1:=#2~\kw{in}~#3} \newcommand{\List}{\textsf{list}} \newcommand{\lra}{\longrightarrow} \newcommand{\Match}{\kw{match}} \newcommand{\Mod}[3]{{\kw{Mod}}({#1}:{#2}\,\zeroone{:={#3}})} \newcommand{\ModA}[2]{{\kw{ModA}}({#1}=={#2})} \newcommand{\ModS}[2]{{\kw{Mod}}({#1}:{#2})} \newcommand{\ModType}[2]{{\kw{ModType}}({#1}:={#2})} \newcommand{\mto}{.\;} \newcommand{\nat}{\textsf{nat}} \newcommand{\Nil}{\textsf{nil}} \newcommand{\nilhl}{\textsf{nil\_hl}} \newcommand{\nO}{\textsf{O}} \newcommand{\node}{\textsf{node}} \newcommand{\nS}{\textsf{S}} \newcommand{\odd}{\textsf{odd}} \newcommand{\oddS}{\textsf{odd}_\textsf{S}} \newcommand{\ovl}[1]{\overline{#1}} \newcommand{\Pair}{\textsf{pair}} \newcommand{\plus}{\mathsf{plus}} \newcommand{\SProp}{\textsf{SProp}} \newcommand{\Prop}{\textsf{Prop}} \newcommand{\return}{\kw{return}} \newcommand{\Set}{\textsf{Set}} \newcommand{\Sort}{\mathcal{S}} \newcommand{\Str}{\textsf{Stream}} \newcommand{\Struct}{\kw{Struct}} \newcommand{\subst}[3]{#1\{#2/#3\}} \newcommand{\tl}{\textsf{tl}} \newcommand{\tree}{\textsf{tree}} \newcommand{\trii}{\triangleright_\iota} \newcommand{\Type}{\textsf{Type}} \newcommand{\WEV}[3]{\mbox{$#1[] \vdash #2 \lra #3$}} \newcommand{\WEVT}[3]{\mbox{$#1[] \vdash #2 \lra$}\\ \mbox{$ #3$}} \newcommand{\WF}[2]{{\mathcal{W\!F}}(#1)[#2]} \newcommand{\WFE}[1]{\WF{E}{#1}} \newcommand{\WFT}[2]{#1[] \vdash {\mathcal{W\!F}}(#2)} \newcommand{\WFTWOLINES}[2]{{\mathcal{W\!F}}\begin{array}{l}(#1)\\\mbox{}[{#2}]\end{array}} \newcommand{\with}{\kw{with}} \newcommand{\WS}[3]{#1[] \vdash #2 <: #3} \newcommand{\WSE}[2]{\WS{E}{#1}{#2}} \newcommand{\WT}[4]{#1[#2] \vdash #3 : #4} \newcommand{\WTE}[3]{\WT{E}{#1}{#2}{#3}} \newcommand{\WTEG}[2]{\WTE{\Gamma}{#1}{#2}} \newcommand{\WTM}[3]{\WT{#1}{}{#2}{#3}} \newcommand{\zeroone}[1]{[{#1}]} \end{split}\]

# Introduction and Contents

This is the reference manual of Coq. Coq is an interactive theorem prover. It lets you formalize mathematical concepts and then helps you interactively generate machine-checked proofs of theorems. Machine checking gives users much more confidence that the proofs are correct compared to human-generated and -checked proofs. Coq has been used in a number of flagship verification projects, including the CompCert verified C compiler, and has served to verify the proof of the four color theorem (among many other mathematical formalizations).

Users generate proofs by entering a series of tactics that constitute steps in the proof. There are many built-in tactics, some of which are elementary, while others implement complex decision procedures (such as `lia`, a decision procedure for linear integer arithmetic). Ltac and its planned replacement, Ltac2, provide languages to define new tactics by combining existing tactics with looping and conditional constructs. These permit automation of large parts of proofs and sometimes entire proofs. Furthermore, users can add novel tactics or functionality by creating Coq plugins using OCaml.

The Coq kernel, a small part of Coq, does the final verification that the tactic-generated proof is valid. Usually the tactic-generated proof is indeed correct, but delegating proof verification to the kernel means that even if a tactic is buggy, it won't be able to introduce an incorrect proof into the system.

Finally, Coq also supports extraction of verified programs to programming languages such as OCaml and Haskell. This provides a way of executing Coq code efficiently and can be used to create verified software libraries.

To learn Coq, beginners are advised to first start with a tutorial / book. Several such tutorials / books are listed at https://coq.inria.fr/documentation.

This manual is organized in three main parts, plus an appendix:

- The first part presents the specification language of Coq, that allows to define programs and state mathematical theorems. Core language presents the language that the kernel of Coq understands. Language extensions presents the richer language, with notations, implicits, etc. that a user can use and which is translated down to the language of the kernel by means of an "elaboration process".

- The second part presents the interactive proof mode, the central feature of Coq. Writing proofs introduces this interactive proof mode and the available proof languages. Built-in decision procedures and programmable tactics presents some more advanced tactics, while Creating new tactics is about the languages that allow a user to combine tactics together and develop new ones.

- The third part shows how to use Coq in practice. Libraries and plugins presents some of the essential reusable blocks from the ecosystem and some particularly important extensions such as the program extraction mechanism. Command-line and graphical tools documents important tools that a user needs to build a Coq project.

- In the appendix, History and recent changes presents the history of Coq and changes in recent releases. This is an important reference if you upgrade the version of Coq that you use. The various indexes are very useful to quickly browse the manual and find what you are looking for. They are often the main entry point to the manual.

The full table of contents is presented below:

## Contents

- Introduction and Contents

Specification language

- Core language
  - Basic notions and conventions
    - Syntax and lexical conventions
      - Syntax conventions
      - Lexical conventions
    - Essential vocabulary
    - Settings
      - Attributes
      - Flags, Options and Tables
        - Locality attributes supported by `Set` and `Unset`
  - Sorts
  - Functions and assumptions
    - Binders
    - Functions (fun) and function types (forall)
    - Function application
    - Assumptions
  - Definitions
    - Let-in definitions
    - Type cast
    - Top-level definitions
    - Assertions and proofs
  - Conversion rules
    - β-reduction
    - ι-reduction
    - δ-reduction
    - ζ-reduction
    - η-expansion
    - Proof Irrelevance
    - Convertibility
  - Typing rules
    - The terms
    - Typing rules
    - Subtyping rules
    - Admissible rules for global environments
    - The Calculus of Inductive Constructions with impredicative Set
  - Variants and the `match` construct
    - Variants
      - Private (matching) inductive types
    - Definition by cases: match
  - Record types
    - Primitive Projections
      - Primitive Record Types
      - Reduction
      - Compatibility Projections and `match`
  - Inductive types and recursive functions
    - Inductive types
      - Simple inductive types
      - Simple annotated inductive types
      - Parameterized inductive types
      - Mutually defined inductive types
    - Recursive functions: fix
    - Top-level recursive functions
    - Theory of inductive definitions
      - Types of inductive objects
      - Well-formed inductive definitions
        - Arity of a given sort
        - Arity
        - Type of constructor
        - Positivity Condition
        - Strict positivity
        - Nested Positivity
        - Correctness rules
        - Template polymorphism
      - Destructors
        - The match ... with ... end construction
      - Fixpoint definitions
        - Typing rule
        - Reduction rule
  - Co-inductive types and co-recursive functions
    - Co-inductive types
      - Caveat
    - Co-recursive functions: cofix
    - Top-level definitions of co-recursive functions
  - Section mechanism
  - The Module System
    - Modules and module types
    - Using modules
      - Examples
    - Typing Modules
    - Libraries and qualified names
      - Names of libraries
    - Qualified identifiers
      - Libraries and filesystem
  - Primitive objects
    - Primitive Integers
    - Primitive Floats
  - Polymorphic Universes
    - General Presentation
    - Polymorphic, Monomorphic
    - Cumulative, NonCumulative
      - An example of a proof using cumulativity
    - Cumulativity Weak Constraints
    - Global and local universes
    - Conversion and unification
    - Minimization
    - Explicit Universes
    - Printing universes
      - Polymorphic definitions
    - Universe polymorphism and sections
  - SProp (proof irrelevant propositions)
    - Basic constructs
    - Encodings for strict propositions
    - Issues with non-cumulativity
- Language extensions
  - Existential variables
    - Inferable subterms
    - Explicit displaying of existential instances for pretty-printing
    - Solving existential variables using tactics
  - Implicit arguments
    - The different kinds of implicit arguments
      - Implicit arguments inferable from the knowledge of other arguments of a function
      - Implicit arguments inferable by resolution
    - Maximal and non-maximal insertion of implicit arguments
      - Trailing Implicit Arguments
    - Casual use of implicit arguments
    - Declaration of implicit arguments
      - Implicit Argument Binders
      - Mode for automatic declaration of implicit arguments
      - Controlling strict implicit arguments
      - Controlling contextual implicit arguments
      - Controlling reversible-pattern implicit arguments
      - Controlling the insertion of implicit arguments not followed by explicit arguments
      - Combining manual declaration and automatic declaration
    - Explicit applications
    - Displaying implicit arguments
    - Displaying implicit arguments when pretty-printing
    - Interaction with subtyping
    - Deactivation of implicit arguments for parsing
    - Implicit types of variables
    - Implicit generalization
  - Extended pattern matching
    - Variants and extensions of `match`
      - Multiple and nested pattern matching
      - Pattern-matching on boolean values: the if expression
      - Irrefutable patterns: the destructuring let variants
        - First destructuring let syntax
        - Second destructuring let syntax
      - Controlling pretty-printing of match expressions
        - Printing nested patterns
        - Factorization of clauses with same right-hand side
        - Use of a default clause
        - Printing of wildcard patterns
        - Printing of the elimination predicate
        - Printing matching on irrefutable patterns
        - Printing matching on booleans
    - Patterns
    - Multiple patterns
    - Aliasing subpatterns
    - Nested patterns
    - Disjunctive patterns
    - About patterns of parametric types
      - Parameters in patterns
    - Implicit arguments in patterns
    - Matching objects of dependent types
    - Understanding dependencies in patterns
    - When the elimination predicate must be provided
      - Dependent pattern matching
      - Multiple dependent pattern matching
      - Patterns in `in`
    - Using pattern matching to write proofs
    - Pattern-matching on inductive objects involving local definitions
    - Pattern-matching and coercions
    - When does the expansion strategy fail?
  - Syntax extensions and notation scopes
    - Notations
      - Basic notations
      - Precedences and associativity
      - Complex notations
      - Simple factorization rules
      - Displaying symbolic notations
      - The Infix command
      - Reserving notations
      - Simultaneous definition of terms and notations
      - Displaying information about notations
      - Locating notations
      - Inheritance of the properties of arguments of constants bound to a notation
      - Notations and binders
        - Binders bound in the notation and parsed as identifiers
        - Binders bound in the notation and parsed as patterns
        - Binders bound in the notation and parsed as terms
        - Binders not bound in the notation
        - Notations with expressions used both as binder and term
      - Notations with recursive patterns
      - Notations with recursive patterns involving binders
      - Predefined entries
      - Custom entries
      - Syntax
    - Notation scopes
      - Global interpretation rules for notations
      - Local interpretation rules for notations
        - Opening a notation scope locally
        - Binding types or coercion classes to a notation scope
      - The `type_scope` notation scope
      - The `function_scope` notation scope
      - Notation scopes used in the standard library of Coq
      - Displaying information about scopes
    - Abbreviations
    - Numerals and strings
      - Numeral notations
      - String notations
    - Tactic Notations
  - Setting properties of a function's arguments
    - Manual declaration of implicit arguments
    - Automatic declaration of implicit arguments
    - Renaming implicit arguments
    - Binding arguments to a scope
    - Effects of `Arguments` on unfolding
    - Bidirectionality hints
  - Implicit Coercions
    - General Presentation
    - Classes
    - Coercions
    - Identity Coercions
    - Inheritance Graph
    - Declaring Coercions
    - Displaying Available Coercions
    - Activating the Printing of Coercions
    - Classes as Records
    - Coercions and Sections
    - Coercions and Modules
    - Examples
      - Coercion at function application
      - Coercion to a type
      - Coercion to a function
  - Typeclasses
    - Class and Instance declarations
    - Binding classes
    - Parameterized Instances
    - Sections and contexts
    - Building hierarchies
      - Superclasses
      - Substructures
    - Summary of the commands
      - Typeclasses Transparent, Typeclasses Opaque
      - Settings
      - Typeclasses eauto `:=`
  - Canonical Structures
    - Declaration of canonical structures
    - Notation overloading
      - Derived Canonical Structures
    - Hierarchy of structures
      - Compact declaration of Canonical Structures
  - Program
    - Elaborating programs
      - Syntactic control over equalities
      - Program Definition
      - Program Fixpoint
      - Program Lemma
    - Solving obligations
    - Frequently Asked Questions
  - Vernacular commands
    - Displaying
    - Query commands
    - Requests to the environment
    - Printing flags
    - Loading files
    - Compiled files
    - Loadpath
    - Backtracking
    - Quitting and debugging
    - Controlling display
    - Printing constructions in full
    - Controlling the reduction strategies and the conversion algorithm
    - Controlling the locality of commands
    - Controlling Typing Flags
    - Internal registration commands
      - Exposing constants to OCaml libraries
      - Inlining hints for the fast reduction machines
      - Registering primitive operations

Proofs

- Writing proofs
  - Proof handling
    - Entering and leaving proof editing mode
      - Proof using options
      - Name a set of section hypotheses for `Proof using`
      - Proof modes
    - Navigation in the proof tree
      - Bullets
      - Mandatory Bullets
      - Set Bullet Behavior
    - Requesting information
    - Showing differences between proof steps
      - How to enable diffs
      - How diffs are calculated
    - Controlling the effect of proof editing commands
    - Controlling memory usage
  - Tactics
    - Common elements of tactics
      - Reserved keywords
      - Invocation of tactics
      - Bindings list
      - Intro patterns
      - Occurrence sets and occurrence clauses
    - Applying theorems
    - Managing the local context
    - Controlling the proof flow
    - Case analysis and induction
    - Rewriting expressions
    - Performing computations
      - Conversion tactics applied to hypotheses
    - Automation
    - Controlling automation
      - The hints databases for auto and eauto
        - Creating Hint databases
      - Hint databases defined in the Coq standard library
      - Hint locality
      - Setting implicit automation tactics
    - Decision procedures
    - Checking properties of terms
    - Equality
    - Equality and inductive sets
    - Classical tactics
    - Automating
    - Non-logical tactics
    - Delaying solving unification constraints
    - Proof maintenance
    - Performance-oriented tactic variants
  - The SSReflect proof language
    - Introduction
      - Acknowledgments
    - Usage
      - Getting started
      - Compatibility issues
    - Gallina extensions
      - Pattern assignment
      - Pattern conditional
      - Parametric polymorphism
      - Anonymous arguments
      - Wildcards
      - Definitions
      - Abbreviations
        - Matching
        - Occurrence selection
      - Basic localization
    - Basic tactics
      - Bookkeeping
      - The defective tactics
        - The move tactic.
        - The case tactic
        - The elim tactic
        - The apply tactic
      - Discharge
        - Clear rules
        - Matching for apply and exact
        - The abstract tactic
      - Introduction in the context
        - Simplification items
        - Views
        - Intro patterns
        - Clear switch
        - Branching and destructuring
        - Block introduction
      - Generation of equations
      - Type families
    - Control flow
      - Indentation and bullets
      - Terminators
      - Selectors
      - Iteration
      - Localization
      - Structure
        - The have tactic.
        - Generating let in context entries with have
        - The have tactic and typeclass resolution
        - Variants: the suff and wlog tactics
          - Advanced generalization
    - Rewriting
      - An extended rewrite tactic
      - Remarks and examples
        - Rewrite redex selection
        - Chained rewrite steps
        - Explicit redex switches are matched first
        - Occurrence switches and redex switches
        - Occurrence selection and repetition
        - Multi-rule rewriting
        - Wildcards vs abstractions
        - When SSReflect rewrite fails on standard Coq licit rewrite
        - Existential metavariables and rewriting
      - Rewriting under binders
        - The under tactic
        - Interactive mode
          - The over tactic
        - One-liner mode
      - Locking, unlocking
      - Congruence
    - Contextual patterns
      - Syntax
      - Matching contextual patterns
      - Examples
        - Contextual pattern in set and the : tactical
        - Contextual patterns in rewrite
      - Patterns for recurrent contexts
    - Views and reflection
      - Interpreting eliminations
      - Interpreting assumptions
        - Specializing assumptions
      - Interpreting goals
      - Boolean reflection
      - The reflect predicate
      - General mechanism for interpreting goals and assumptions
        - Specializing assumptions
        - Interpreting assumptions
      - Interpreting equivalences
      - Declaring new Hint Views
      - Multiple views
    - SSReflect searching tool
    - Synopsis and Index
      - Parameters
      - Items and switches
      - Tactics
      - Tacticals
      - Commands
      - Settings
  - Detailed examples of tactics
    - dependent induction
      - A larger example
    - autorewrite
  - Proof schemes
    - Generation of induction principles with `Scheme`
      - Automatic declaration of schemes
      - Combined Scheme
    - Generation of inversion principles with `Derive` `Inversion`
- Built-in decision procedures and programmable tactics
  - Omega: a solver for quantifier-free problems in Presburger Arithmetic
    - Description of `omega`
    - Arithmetical goals recognized by `omega`
    - Messages from `omega`
    - Using `omega`
    - Options
    - Technical data
      - Overview of the tactic
      - Overview of the OMEGA decision procedure
    - Bugs
  - Micromega: tactics for solving arithmetic goals over ordered rings
    - Short description of the tactics
    - Positivstellensatz refutations
    - `lra`: a decision procedure for linear real and rational arithmetic
    - `lia`: a tactic for linear integer arithmetic
      - High level view of `lia`
      - Cutting plane proofs
      - Case split
    - `nra`: a proof procedure for non-linear arithmetic
    - `nia`: a proof procedure for non-linear integer arithmetic
    - `psatz`: a proof procedure for non-linear arithmetic
    - `zify`: pre-processing of arithmetic goals
  - The ring and field tactic families
    - What does this tactic do?
    - The variables map
    - Is it automatic?
    - Concrete usage in Coq
    - Adding a ring structure
    - How does it work?
    - Dealing with fields
    - Adding a new field structure
    - History of ring
    - Discussion
  - Nsatz: tactics for proving equalities in integral domains
    - More about `nsatz`
  - Generalized rewriting
    - Introduction to generalized rewriting
      - Relations and morphisms
      - Adding new relations and morphisms
      - Rewriting and non reflexive relations
      - Rewriting and non symmetric relations
      - Rewriting in ambiguous setoid contexts
    - Commands and tactics
      - First class setoids and morphisms
      - Tactics enabled on user provided relations
      - Printing relations and morphisms
      - Deprecated syntax and backward incompatibilities
    - Extensions
      - Rewriting under binders
      - Subrelations
      - Constant unfolding
    - Strategies for rewriting
      - Definitions
      - Usage
- Creating new tactics
  - Ltac
    - Syntax
    - Semantics
      - Types of values
      - Syntactic values
      - Tactics in terms
      - Substitution
      - Sequence: ;
      - Local application of tactics: [> ... ]
      - Goal selectors
      - Processing multiple goals
      - Do loop
      - Repeat loop
      - Catching errors: try
      - Detecting progress
      - Branching and backtracking
      - Branching with backtracking: +
      - First tactic to succeed
      - Solving
      - First tactic to make progress: ||
      - Conditional branching: tryif
      - Soft cut: once
      - Checking for a single success: exactly_once
      - Checking for failure: assert_fails
      - Checking for success: assert_succeeds
      - Print/identity tactic: idtac
      - Failing
      - Timeout
      - Timing a tactic
      - Timing a tactic that evaluates to a term: time_constr
      - Local definitions: let
      - Function construction and application
      - Pattern matching on terms: match
      - Pattern matching on goals and hypotheses: match goal
      - Filling a term context
      - Generating fresh hypothesis names
      - Computing in a term: eval
      - Getting the type of a term
      - Manipulating untyped terms: type_term
      - Counting goals: numgoals
      - Testing boolean expressions: guard
      - Proving a subgoal as a separate lemma: abstract
    - Tactic toplevel definitions
      - Defining `L`tac symbols
      - Printing `L`tac tactics
    - Examples of using `L`tac
      - Proof that the natural numbers have at least two elements
      - Proving that a list is a permutation of a second list
      - Deciding intuitionistic propositional logic
      - Deciding type isomorphisms
    - Debugging `L`tac tactics
      - Backtraces
      - Tracing execution
      - Interactive debugger
      - Profiling `L`tac tactics
      - Run-time optimization tactic
  - Ltac2
    - General design
    - ML component
      - Overview
      - Type Syntax
      - Type declarations
      - Term Syntax
      - Ltac Definitions
      - Reduction
      - Typing
      - Effects
        - Standard IO
        - Fatal errors
        - Backtracking
        - Goals
    - Meta-programming
      - Overview
      - Generic Syntax for Quotations
        - Built-in quotations
        - Strict vs. non-strict mode
      - Term Antiquotations
        - Syntax
        - Semantics
          - Static semantics
          - Dynamic semantics
      - Match over terms
      - Match over goals
    - Notations
      - Scopes
      - Notations
      - Abbreviations
    - Evaluation
    - Debug
    - Compatibility layer with Ltac1
      - Ltac1 from Ltac2
        - Simple API
        - Low-level API
      - Ltac2 from Ltac1
      - Switching between Ltac languages
    - Transition from Ltac1
      - Syntax changes
      - Tactic delay
      - Variable binding
        - In Ltac expressions
        - In quotations
      - Exception catching

Using Coq

- Libraries and plugins
  - The Coq library
    - The prelude
      - Notations
      - Logic
        - Propositional Connectives
        - Quantifiers
        - Equality
        - Lemmas
      - Datatypes
        - Programming
      - Specification
      - Basic Arithmetic
      - Well-founded recursion
      - Accessing the Type level
      - Tactics
    - The standard library
      - Survey
      - Peano’s arithmetic (nat)
      - Notations for integer arithmetic
      - Real numbers library
        - Notations for real numbers
        - Some tactics for real numbers
      - List library
      - Floats library
    - Users’ contributions
  - Program extraction
    - Generating ML Code
    - Extraction Options
      - Setting the target language
      - Inlining and optimizations
      - Extra elimination of useless arguments
      - Realizing axioms
      - Realizing inductive types
      - Avoiding conflicts with existing filenames
      - Additional settings
    - Differences between Coq and ML type systems
    - Some examples
      - A detailed example: Euclidean division
      - Extraction's horror museum
      - Users' Contributions
  - Program derivation
  - Functional induction
    - Advanced recursive functions
    - Tactics
    - Generation of induction principles with `Functional` `Scheme`
  - Writing Coq libraries and plugins
    - Deprecating library objects or tactics
- Command-line and graphical tools
  - The Coq commands
    - Interactive use (coqtop)
    - Batch compilation (coqc)
    - Customization at launch time
      - By resource file
      - By environment variables
      - By command line options
    - Compiled interfaces (produced using `-vos`)
    - Compiled libraries checker (coqchk)
  - Utilities
    - Using Coq as a library
    - Building a Coq project
      - Building a Coq project with coq_makefile
        - CoqMakefile.local
        - Timing targets and performance testing
        - Reusing/extending the generated Makefile
        - Building a subset of the targets with `-j`
        - Precompiling for `native_compute`
      - Building a Coq project with Dune
    - Computing Module dependencies
    - Embedded Coq phrases inside LaTeX documents
    - Man pages
  - Documenting Coq files with coqdoc
    - Principles
      - Coq material inside documentation.
      - Pretty-printing.
      - Sections
      - Lists.
      - Rules.
      - Emphasis.
      - Escaping to LaTeX and HTML.
      - Verbatim
      - Hyperlinks
      - Hiding / Showing parts of the source
    - Usage
      - Command line options
    - The coqdoc LaTeX style file
  - Coq Integrated Development Environment
    - Managing files and buffers, basic editing
    - Interactive navigation into Coq scripts
    - Vernacular commands, templates
    - Queries
    - Compilation
    - Customizations
    - Using Unicode symbols
      - Displaying Unicode symbols
      - Bindings for input of Unicode symbols
      - Adding custom bindings
      - Character encoding for saved files
  - Asynchronous and Parallel Proof Processing
    - Proof annotations
      - Automatic suggestion of proof annotations
    - Proof blocks and error resilience
      - Caveats
    - Interactive mode
      - Caveats
    - Batch mode
    - Limiting the number of parallel workers

Appendix

- History and recent changes
  - Early history of Coq
    - Historical roots
    - Versions 1 to 5
      - Version 1
      - Version 2
      - Version 3
      - Version 4
      - Version 5
    - Versions 6
      - Version 6.1
      - Version 6.2
      - Version 6.3
    - Versions 7
      - Summary of changes
      - Details of changes in 7.0 and 7.1
        - Main novelties
        - Details of changes
          - Language: new "let-in" construction
          - Language: long names
          - Language: miscellaneous
          - Language: Cases
          - Reduction
          - New tactics
          - Changes in existing tactics
          - Efficiency
          - Concrete syntax of constructions
          - Parsing and grammar extension
          - New commands
          - Changes in existing commands
          - Tools
          - Extraction
          - Standard library
          - New user contributions
      - Details of changes in 7.2
      - Details of changes in 7.3
        - Changes in 7.3.1
      - Details of changes in 7.4
  - Recent changes
    - Version 8.12
      - Summary of changes
      - Changes in 8.12+beta1
        - Kernel
        - Specification language, type inference
        - Notations
        - Tactics
        - Tactic language
        - SSReflect
        - Flags, options and attributes
        - Commands
        - Tools
        - CoqIDE
        - Standard library
        - Reals library
        - Extraction
        - Reference manual
        - Infrastructure and dependencies
      - Changes in 8.12.0
    - Version 8.11
      - Summary of changes
      - Changes in 8.11+beta1
      - Changes in 8.11.0
      - Changes in 8.11.1
      - Changes in 8.11.2
    - Version 8.10
      - Summary of changes
      - Other changes in 8.10+beta1
      - Changes in 8.10+beta2
      - Changes in 8.10+beta3
      - Changes in 8.10.0
      - Changes in 8.10.1
      - Changes in 8.10.2
    - Version 8.9
      - Summary of changes
      - Details of changes in 8.9+beta1
      - Changes in 8.8.0
      - Changes in 8.8.1
    - Version 8.8
      - Summary of changes
      - Details of changes in 8.8+beta1
      - Details of changes in 8.8.0
      - Details of changes in 8.8.1
      - Details of changes in 8.8.2
    - Version 8.7
      - Summary of changes
      - Potential compatibility issues
      - Details of changes in 8.7+beta1
      - Details of changes in 8.7+beta2
      - Details of changes in 8.7.0
      - Details of changes in 8.7.1
      - Details of changes in 8.7.2
    - Version 8.6
      - Summary of changes
      - Potential sources of incompatibilities
      - Details of changes in 8.6beta1
      - Details of changes in 8.6
      - Details of changes in 8.6.1
    - Version 8.5
      - Summary of changes
      - Potential sources of incompatibilities
      - Details of changes in 8.5beta1
      - Details of changes in 8.5beta2
      - Details of changes in 8.5beta3
      - Details of changes in 8.5
      - Details of changes in 8.5pl1
      - Details of changes in 8.5pl2
      - Details of changes in 8.5pl3
    - Version 8.4
      - Summary of changes
      - Potential sources of incompatibilities
      - Details of changes in 8.4beta
      - Details of changes in 8.4beta2
      - Details of changes in 8.4
    - Version 8.3
      - Summary of changes
      - Details of changes
    - Version 8.2
      - Summary of changes
      - Details of changes
    - Version 8.1
      - Summary of changes
      - Details of changes in 8.1beta
      - Details of changes in 8.1gamma
      - Details of changes in 8.1
    - Version 8.0
      - Summary of changes
      - Details of changes in 8.0beta old syntax
      - Details of changes in 8.0beta new syntax
      - Details of changes in 8.0
- Indexes
  - Glossary index
  - Command index
  - Tactic index
  - Attribute index
  - Flags, options and tables index
  - Errors and warnings index
  - General index
- Bibliography

Note

License

This material (the Coq Reference Manual) may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub). Options A and B are not elected.

Other versions v: 8.12.0

Versions
  dev
  stable
  v8.12
  8.11
  8.10
  8.9
  8.8
  8.7
  8.6
  8.5
  8.4
  8.3
  8.2
  8.1
  8.0

Downloads
  PDF