Lectures & Homework
We will go through a number of chapters in LF and PLF. For homework, you need to submit the same chapter files. Some chapters introduce new tactics or syntax but most are about practicing theorem proving in some new aspect. See the goals for each chapter.
Lectures
Lecture | Chapter | Notes |
---|---|---|
(1) 7. sept | Basics.v | |
(2) 8. sept | Basics.v Induction.v | Basics.v due on Sept 15th |
(3) 14. sept | Induction.v Lists.v | Induction.v due on Sept 21st |
(4) 15. sept (video only) | Lists.v Poly.v | Lists.v and Poly.v due on Sept 22nd |
(5) 21. sept | Tactics.v | |
(6) 22. sept (video only) | Tactics.v Logic.v | |
(7) 28. sept | Logic.v | Video from 2022, Tactics.v due on Oct 5th |
(8) 29. sept (video only) | Logic.v | Video from 2022, Logic.v due on Oct 6th |
(9) 5. okt | IndProp.v | |
(10) 6. okt (video only) | IndProp.v | |
(11) 12. okt | IndProp.v Maps.v | IndProp.v due on Oct 19th |
(12) 13. okt (video only) | Maps.v | |
(13) 19. oct | Imp.v | Maps.v due on Oct 26th |
(14) 20. oct (video only) | Imp.v Auto.v | Imp.v and Auto.v due on Oct 27th |
(15) 26. oct | ProofObjects.v | |
(16) 27. oct (video only) | ProofObjects.v | Auto.v due on Nov 2nd |
() 2. nov | (no lecture) | |
(17) 3. nov (video only) | Equiv.v | |
(18) 9. nov | Equiv.v Hoare.v | |
(19) 10. nov (video only) | Hoare.v | |
(20) 16. nov | Hoare.v | |
(21) 17. nov (video only) | Hoare.v | Equiv.v and Hoare.v due on Nov 23rd |
(22) 23. nov | Hoare2.v | |
(23) 24. nov (video only) | Hoare2.v | Hoare2.v due on Dec 1st |
(24) 30. nov (video only) | HoareAsLogic.v | HoareAsLogic.v due on exam date |
() 1. dec (video only) | (no lecture) | |
(25) 7. dec | Smallstep.v | |
(26) 8. dec (video only) | Smallstep.v | |
(27) 14. dec | Smallstep.v Types.v | Hoare2.v due on exam date |
(28) 15. dec (video only) | Types.v | Type.v due on exam date |
(28) 20. dec | (No more lecures) | Personal consultation if necessary |
LF
Preface.v
- Goal: talk about the course
Basics.v
- Goal: base FP language, proof language, simple proofs
- Data and Functions
- tactics: simpl, reflexivity
- Proof by Simplification, Proof by Rewriting
- tactics: intros
- Proof by Case Analysis
- bullets
- tactics: destruct X as eqn:Y
Induction.v
- Goal: induction on natural numberss
- Separate compilation
- Proof by Induction
- tactics: induction
- Proofs Within Proofs
- tactics: assert
- Formal vs. Informal Proof
- More exercises
- tactics: replace
Lists.v
- Goal: look at data structures
- Pairs of Numbers
- Lists of Numbers
- Bags via Lists
- Reasoning About Lists, Induction on Lists, List Exercises
- Options
- Partial Maps
Poly.v
- Goal: look at almost std. lib. definitions, exercises
- Polymorphic Lists
- Polymorphic Pairs
- Polymorphic Options, Functions as Data, Anonymous Functions
- Map
- Fold
- Functions That Construct Functions
Tactics.v
- Goal: provide tools to theoretically prove almost anything
- The [apply] Tactic
- tactics: apply
- exercises: silly_ex, apply_exercise1
- The [apply with] Tactic
- tactics: apply with
- The [injection] and [discriminate] Tactics
- tactics: injection, discriminate
- Using Tactics on Hypotheses
- tactics: apply in
- Varying the Induction Hypothesis
- tactics: generalize dependent
- Unfolding Definitions, Using [destruct] on Compound Expressions
- tactics: unfold
- Additional Exercises
Logic.v
- Goal: more tools for easier proving of logic idioms
- the Prop type, Logical Connectives
- Falsehood and Negation
- Truth, Logical Equivalence
- Setoids and Logical Equivalence
- Existential Quantification
- Programming with Propositions
- Applying Theorems to Arguments
- Functional Extensionality
- Propositions vs. Booleans, Working with Decidable Properties
- Classical vs. Constructive Logic
IndProp.v
- Goal: Safely adding theories/assumptions
- The Collatz Conjecture, Transitive Closure, Permutations, Evenness
- Using Evidence in Proofs
- Induction on Evidence
- Inductive Relations
- A Digression on Notation
- Case Study: Regular Expressions
- tactics: remember
- weak_pumping (hint: finish 1st App case and copy-paste the rest, lemmas: app_length, add_le_cases, rewrite app_assoc, plus_le, pumping_constant_0_false hint: destruct s1 in MStarApp case)
- Case Study: Improving Reflection
Maps.v
- Goal: more data structures and exercises
- The Coq Standard Library, Identifiers, Total Maps
- Partial Maps
Imp.v
- Goal: exercise tactic(al)s and inductives
- Arithmetic and Boolean Expressions, Coq Automation
- tactics: ;, try, repeat, lia, clear, rename, assumption, contradiction, constructor
- Evaluation as a Relation
- Expressions With Variables, Commands, Evaluating Commands
- Additional Exercises
Auto.v
- Goal: automatically proving (large number) of simple cases
ProofObjects.v
- Goal: Proofs are programs and programs are proofs
- Proof Scripts
- Quantifiers, Implications, Functions
- Programming with Tactics
- Logical Connectives as Inductive Types
- Equality
- Coq's Trusted Computing Base
- More Exercises
- Proof Irrelevance (Advanced)
PLF
Equiv.v
- Goal: exercise proofs of stateful programs
- Behavioral Equivalence
- Properties of Behavioral Equivalence
- Program Transformations
- Proving Inequivalence
Hoare.v
- Goal: Standard way of proving properties of imperative programs
- Assertions
- Hoare Triples
- Proof rules
- Summary
- Additional exercises
Hoare2.v
- Goal: Standard way of proving properties of imperative programs
- Decorated Programs
- Formal Decorated Programs
- Finding loop invariants
HoareAsLogic.v
- Goal: Theoretical side of Hoare triples
- Hoare Logic and Model Theory
- Hoare Logic and Proof Theory
- Derivability
- Soundness and Completeness
- Postscript: Decidability
Smallstep.v
- Goal: Shows how to give meanings to programs
- A Toy Language
- Relations
- Multi-Step Reduction
- Small-Step Imp
- Concurrent Imp
- A Small-Step Stack Machine
- Aside: A normalize Tactic
Types.v
- Goal: Types that will give guarantees later
- Typed Arithmetic Expressions
Stlc.v
- Goal: Define simply typed lambda-calculus
- Overview
- Syntax
- Operational Semantics
- Typing
StlcProp.v
- Goal: Now having types gives us guarantees
- Canonical Forms
- Progress
- Preservation
- Type Soundness
- Uniqueness of Types
- Context Invariance (Optional)