Volume 0: Discrete Math in Coq (alpha)
Table of Contents
Index
Roadmap
Preface
Welcome
Overview
Logic
Proof Assistants
Functional Programming
Further Reading
Practicalities
Chapter Dependencies
System Requirements
Exercises
Downloading the Coq Files
Lecture Videos
Note for Instructors
Recommended Citation Format
Translations
Thanks
Day01_intro
Intro: Functional Programming in Coq
Introduction
What is functional programming?
Getting the tools in order
Data and Functions
Enumerated Types
Days of the Week
Homework Submission Guidelines
Booleans
Function Types
Case study: DNA nucleotides
How to succeed in this course
Day02_types
Separate Compilation
Types
Compound Types
Modules
Numbers
Comparisons
Fixpoints and Structural Recursion
Functions as Data
Higher-Order Functions
Functions That Construct Functions
Day03_recursion
Recursion
Refresher
Anonymous functions and fixpoints
Case study: binary and trinary numbers
What's happening here?
Day04_structures
Structures
Lists
Polymorphic Pairs
Polymorphic Options
Fancier data structures
Day05_lists
Lists
Combine and split
Filter
Higher-order Functions and Anonymous Functions: Together Forever
Map
Higher-order predicates: forallb and existsb
Case study: DNA strands and amino acids
Day06_sorting
Insertion sort
What makes a sort correct?
Identifying sortedness
Day07_trees
Binary trees
What are trees for?
Traversals
Binary search trees (BSTs)
Day08_sets
Sets
Sets from lists
Set operations
Sets from sorted lists
Sets from BSTs
Day09_levenshtein
Case study: DNA edit distance
Levenshtein's edit distance
Day10_expressions
Arithmetic and Boolean Expressions
Syntax
Evaluation
Optimization
Expressions With Variables
States
Syntax
Evaluation
Encodings
Compilation
Formal proof
Day11_propositions
Propositions
Simple proofs
Proof by Simplification
The
intros
and
apply
Tactics
Logical connectives
Conjunction
Disjunction
Truth
Proof by Rewriting
The
apply
Tactic
The
apply
...
with
...
Tactic
Propositions so far
Tactics so far
What's happening here?
Day12_cases
Proof by Case Analysis
Logical Connectives
Conjunction
Disjunction
Falsehood and Negation
More Exercises
Proofs Within Proofs
The
injection
and
discriminate
Tactics
Logical Equivalence
Using Tactics on Hypotheses
Unfolding Definitions
Using
destruct
on Compound Expressions
Day13_induction
Induction: Proof by Induction
Overview
Applying Theorems to Arguments
Structural induction
More Exercises
One last hard one
Day14_exists
Existential Quantification
Propositions and Booleans
Classical vs. Constructive Logic
Day15_induction2
Varying the Induction Hypothesis
When to Vary
Generalizing the IH Explicitly
To vary or not to vary
Programming with Propositions
Day16_indprop
Inductive propositions
Evenness
Using Evidence in Proofs
Inversion on Evidence
Induction on Evidence
Inductive Relations
Reasoning about minima
Case study: getting
natset
right
Day17_sorting
Permutations
A computational interpretation
Sortedness
Proofs with Sortedness
Proof of Correctness
Making Sure the Specification is Right
Proving Correctness from the Alternate Spec
The Moral of This Story
Day18_levenshtein
Getting Levenshtein right
Edit-generating functions
Proving validity
Proving Levenshtein valid
Going the distance
Optimality for Levenshtein edit distance
Postscript
Looking Back
Looking Forward
Other sources