Volume 1: Discrete Math in Coq (alpha)
Table of Contents
Index
Roadmap
Preface
Top
Welcome
Overview
Logic
Proof Assistants
Functional Programming
Further Reading
Practicalities
Chapter Dependencies
System Requirements
Exercises
Downloading the Coq Files
Lecture Videos
Note for Instructors
Translations
Thanks
Functional Programming in Coq (
Basics
)
Top
Introduction
Data and Functions
Enumerated Types
Days of the Week
Homework Submission Guidelines
Booleans
Function Types
Compound Types
Modules
Numbers
Proof by Simplification
Proof by Rewriting
Proof by Case Analysis
More on Notation (Optional)
Fixpoints and Structural Recursion (Optional)
More Exercises
Proof by Induction (
Induction
)
Top
Proof by Induction
Proofs Within Proofs
Formal vs. Informal Proof
More Exercises
Working with Structured Data (
Lists
)
Top
Pairs of Numbers
Lists of Numbers
Reasoning About Lists
Induction on Lists
Search
List Exercises, Part 1
List Exercises, Part 2
Options
Partial Maps
Polymorphism and Higher-Order Functions (
Poly
)
Top
Polymorphic Lists
Polymorphic Pairs
Polymorphic Options
Functions as Data
Higher-Order Functions
Filter
Anonymous Functions
Map
Fold
Functions That Construct Functions
Additional Exercises
More Basic Tactics (
Tactics
)
Top
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 in Coq (
Logic
)
Top
Logical Connectives
Conjunction
Disjunction
Falsehood and Negation
Truth
Logical Equivalence
Existential Quantification
Programming with Propositions
Applying Theorems to Arguments
Coq vs. Set Theory
Propositions and Booleans
Classical vs. Constructive Logic
Functional Extensionality
Inductively Defined Propositions (
IndProp
)
Top
Inductively Defined Propositions
Using Evidence in Proofs
Inversion on Evidence
Induction on Evidence
Inductive Relations
Aside: Strong Induction
Case Study: Regular Expressions
Additional Exercises
Insertion Sort (
Sort
)
Top
Permutations
The Insertion-Sort Program
Specification of Correctness
Proof of Correctness
Making Sure the Specification is Right
Proving Correctness from the Alternate Spec
The Moral of This Story
Combinatorics (
Combo
)
Top
Learning to count all over again
Sums and products: simple counting
Order in the court: factorial and permutations
Relating factorial to permutations
The division rule
Disregarding order: choose
Defining choose in terms of factorial
Other identities for choice
The binomial theorem
sets, cardinality, and countability (
Sets
)
Top
Syntax for sets
A word about priorities
Adding sets to Coq
A set-theoretic notion of relations and functions
Functions for counting: injections, surjections, and bijections
Cardinality
Countability
Russell's paradox
Graphs
Top
Graph: Graph theory
Postscript
Top
Looking Back
Looking Forward
Other sources
Bibliography (
Bib
)
Top
Resources cited in this volume