Preface
Basics
- Introduction
- Enumerated Types
- Proof by Simplification
- Proof by Rewriting
- Proof by Case Analysis
- More Exercises
Induction: Proof by Induction
Lists: Working with Structured Data
Poly: Polymorphism and Higher-Order Functions
Tactics: More Basic Tactics
- The apply Tactic
- The apply ... with ... Tactic
- The inversion Tactic
- Using Tactics on Hypotheses
- Varying the Induction Hypothesis
- Unfolding Definitions
- Using destruct on Compound Expressions
- Review
- Additional Exercises
Logic: Logic in Coq
IndProp: Inductively Defined Propositions
- Inductively Defined Propositions
- Using Evidence in Proofs
- Inductive Relations
- Case Study: Regular Expressions
- Improving Reflection
- Additional Exercises
Maps: Total and Partial Maps
ProofObjects: The Curry-Howard Correspondence
- Proof Scripts
- Quantifiers, Implications, Functions
- Connectives as Inductive Types
- Programming with Tactics
- Equality
IndPrinciples: Induction Principles
- Basics
- Polymorphism
- Induction Hypotheses
- More on the induction Tactic
- Induction Principles in Prop
- Formal vs. Informal Proofs by Induction
SfLib: Software Foundations Library
Rel: Properties of Relations
Imp: Simple Imperative Programs
- Arithmetic and Boolean Expressions
- Coq Automation
- Evaluation as a Relation
- Expressions With Variables
- Commands
- Evaluation
- Reasoning About Imp Programs
- Additional Exercises
ImpParser: Lexing and Parsing in Coq
ImpCEvalFun: Evaluation Function for Imp
- A Broken Evaluator
- A Step-Indexed Evaluator
- Relational vs. Step-Indexed Evaluation
- Determinism of Evaluation Again
Extraction: Extracting ML from Coq
Equiv: Program Equivalence
- Behavioral Equivalence
- Properties of Behavioral Equivalence
- Program Transformations
- Proving That Programs Are Not Equivalent
- Extended Exercise: Nondeterministic Imp
- Additional Exercises
Hoare: Hoare Logic, Part I
Hoare2: Hoare Logic, Part II
- Decorated Programs
- Finding Loop Invariants
- Weakest Preconditions (Optional)
- Formal Decorated Programs (Optional)
HoareAsLogic: Hoare Logic as a Logic
Smallstep: Small-step Operational Semantics
- A Toy Language
- Relations
- Multi-Step Reduction
- Small-Step Imp
- Concurrent Imp
- A Small-Step Stack Machine
Auto: More Automation
Types: Type Systems
Stlc: The Simply Typed Lambda-Calculus
StlcProp: Properties of STLC
MoreStlc: More on the Simply Typed Lambda-Calculus
Sub: Subtyping
Typechecking: A Typechecker for STLC
Records: Adding Records to STLC
References: Typing Mutable References
- Definitions
- Syntax
- Pragmatics
- Operational Semantics
- Typing
- Properties
- References and Nontermination
- Additional Exercises
RecordSub: Subtyping with Records
Norm: Normalization of STLC
LibTactics: A Collection of Handy General-Purpose Tactics
- Tools for Programming with Ltac
- Identity Continuation
- Untyped Arguments for Tactics
- Optional Arguments for Tactics
- Wildcard Arguments for Tactics
- Position Markers
- List of Arguments for Tactics
- Databases of Lemmas
- On-the-Fly Removal of Hypotheses
- Numbers as Arguments
- Testing Tactics
- Check No Evar in Goal
- Helper Function for Introducing Evars
- Tagging of Hypotheses
- More Tagging of Hypotheses
- Deconstructing Terms
- Action at Occurence and Action Not at Occurence
- An Alias for eq
- Common Tactics for Simplifying Goals Like intuition
- Backward and Forward Chaining
- Introduction and Generalization
- Rewriting
- Inversion
- Induction
- Coinduction
- Decidable Equality
- Equivalence
- N-ary Conjunctions and Disjunctions
- Tactics to Prove Typeclass Instances
- Tactics to Invoke Automation
- Tactics to Sort Out the Proof Context
- Tactics for Development Purposes
- Compatibility with Standard Library
UseTactics: Tactic Library for Coq: A Gentle Introduction
- Tactics for Introduction and Case Analysis
- Tactics for N-ary Connectives
- Tactics for Working with Equality
- Some Convenient Shorthands
- Tactics for Advanced Lemma Instantiation
- Summary
UseAuto: Theory and Practice of Automation in Coq Proofs
- Basic Features of Proof Search
- How Proof Search Works
- Examples of Use of Automation
- Advanced Topics in Proof Search
- Decision Procedures
- Summary
PE: Partial Evaluation
- Generalizing Constant Folding
- Partial Evaluation of Commands, Without Loops
- Partial Evaluation of Loops
- Partial Evaluation of Flowchart Programs